Page 1 of 1

craft.iss 20051205

Posted: Mon Dec 05, 2005 4:09 pm
by echoism
20051205:This is a quick and dirty script that I wrote to auto-combine the selected recipe from the tradeskill window. It will auto-inventory until the cursor is empty, then it will combine the selected recipe. This will repeat until the tradeskill window closes, or you run out of components.

Caution: it will drop things onto the ground if you run out of room.

Useful for making things like celestial essence, without your wrist going numb.

Code: Select all

;craft.iss

#macro displayStatus()
echo Auto Combine ${craftStatus}
#endmac

#macro ProcessQueue()
if ${QueuedCommands}
  while ${QueuedCommands}
      ExecuteQueued
#endmac

function main()
{
	call craft_init
	while "${Window[TradeskillWnd].Open} && ${craftStatus.Equal[Started]}"
	{
		while "${Cursor.ID}"
			Window[TradeskillWnd].Child[COMBW_AutoInvButton]:LeftMouseUp
		Window[TradeskillWnd].Child[COMBW_CombineButton]:LeftMouseUp
		ProcessQueue()
		wait 10
	}
	if "${craftStatus.Equal[Started]}"
		craftStatus:Set[Finished: Window Closed]
	return 0
}

function t_OutOfStuff()
{
	craftStatus:Set[Finished: Out of Components]
}

function craft_init()
{
	ext -require isxeq
	AddTrigger t_OutOfStuff "Sorry, but you don't have everything you need for this recipe in your general inventory."
	DeclareVariable craftStatus string script "Started"
	displayStatus()
}

function atexit()
{
	displayStatus()
}

Posted: Thu Dec 15, 2005 12:19 pm
by eolewis
sweet.... this is a good enough TS script for me :D