craft.iss 20051205

Moderator: MacroQuest Developers

echoism
a ghoul
a ghoul
Posts: 131
Joined: Tue Oct 19, 2004 9:59 am

craft.iss 20051205

Post by echoism » Mon Dec 05, 2005 4:09 pm

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()
}

eolewis
orc pawn
orc pawn
Posts: 26
Joined: Tue Oct 04, 2005 4:11 pm

Post by eolewis » Thu Dec 15, 2005 12:19 pm

sweet.... this is a good enough TS script for me :D