Need a turn in macro

dr00d69

Member
Joined
Feb 20, 2007
Messages
209
Reaction score
11
Points
18
Need help editing a turn in macro

I need help writing a macro to turn in an item to a mob, invis (using CoS) then hit trade. The item is put in trade window but before the trade button is hit my toon needs to be invis.

Any ideas where I should start with this? Was thinking of using the cleric epic turn in macro and editing it with my item.

How would I handle using a circlet of shadow to invis myself?

Could I use something like /keypress 5 if it is bound to hotkey 5?? and where would i put it?

Sub main
:mainLoop
/if (${Spawn[npc Zordak Ragefire].ID}) {
/if (${Target.ID}) /squelch /target clear
/delay 2s !${Target.ID}
/squelch /target npc Zordak Ragefire
/delay 2s ${Target.Name.Find[Zordak]}
/if (${Target.Name.Find[Zordak]}) {
/echo Zordak found attempting to give him the Shimmering Pearl
/if (${Cursor.ID}) /autoinventory
/delay 2s !${Cursor.ID}
/itemnotify ${FindItem[Shimmering Pearl].InvSlot} leftmouseup
/delay 2s ${Cursor.ID}
/ubertrade
/delay 2s ${Window[GiveWnd].Open}
/if (${Window[GiveWnd].Open}) {
/notify GiveWnd GVW_Give_Button leftmouseup
/endm
}
}
}
/goto :mainLoop
/return
 
Last edited:
It appears ubertrade no longer works, so I am not sure how I will have to macro give the item to the mob.

Any ideas? I'm looking around at other macros
 
/click left target

seems to replace ubertrade quite nicely. Still getting an error, will keep updating
 
/if (!${Me.Invis}) /useitem Circlet of Shadow

Or something...

I guess if you are on a progression server you need to have it in a top level slot or equipped...
 
Code:
#include spell_routines.inc

Sub Main(string ItemName0, string Invis0, string InvisT, string NPC0)
	/if (!${Defined[ItemName0]} || !${Defined[Invis0]} || !${Defined[InvisT]} || !${Defined[NPC0]}) { 
		/echo Macro usage; Pre target trade NPC and /mac "Item Name" "Invis spell" "Invis spell cast type" "NPC to hand into" 
		/echo Spell cast type is alt item or gem#
		/noparse		/echo NPC uses ${Target.CleanName} 
		/end
	}
	/echo Trading invis
	/delay 1s
	/declare ItemName string outer
	/declare InvisSpell string outer
	/declare TradeNPC string outer
	/declare InvisType string outer
	/delay 1s
	/varset ItemName ${ItemName0}
	/varset InvisSpell ${Invis0}
	/varset TradeNPC ${NPC0}
	/varset InvisType ${InvisT}
	/delay 1s
	
	/echo ${ItemName}
	/echo ${InvisSpell} ${InvisType}
	/echo ${TradeNPC}

	
	/if (${FindItem[${ItemName}].ID} && ${If[${Target.CleanName.Equal[${NPC0}]},1,0]} && ${If[${Target.Distance.Int}<=10,1,0]}) {
		/ctrlkey /itemnotify "${ItemName}" leftmouseup
		/click left target
		/call Cast "${InvisSpell}" ${InvisType}
		/delay 1s
	}
		/if (${Window[GiveWnd].Open} && ${Me.Invis}) {
		/notify GiveWnd GVW_Give_Button leftmouseup
		/delay 1s
		/echo Success!
		/end
		} 
		/echo Macro failed
		/end

I have only tested this with a wiz using AA invis and a cleric using cloudy potion attempting to hand an item to an NPC in the lobby, test works well since the NPC won't accept anything.

I offer no guarantees :p
 
Is there a list somewhere with all the status codes used for mq2? Like me.invis etc?
 
Search button. Wiki. So many wikis. TLO builder that i posted. Lots of options.
 
Guys I would have searched for it if I knew they were called TLOs

LOL!!!

Thanks!! Gonna start messing around and see how far I can get.
 
Search button. Wiki. So many wikis. TLO builder that i posted. Lots of options.
That's useful.. a couple questions.

1) Did you ever repost the files/etc. after our loss of some attachments?
2) I haven't used it, but although it let's you 'build' so shows you the TLO & Members, it doesn't have help/documentation, correct?

If it does, that's massive.

htw
 
Search button. Wiki. So many wikis. TLO builder that i posted. Lots of options.
That's useful.. a couple questions.

1) Did you ever repost the files/etc. after our loss of some attachments?
2) I haven't used it, but although it let's you 'build' so shows you the TLO & Members, it doesn't have help/documentation, correct?

If it does, that's massive.

htw
I updated and reposted in April. It has documentation built in. One of the windows tells you what each TLO or member does, depending on what you have selected. It then lets you "build" your TLO+member and can even create an if statement that you can copy/paste.