I reworked the Batwing turnin macro for Niola in South Felwithe. It turns in Bat Wing 400 at a time until you are out of Bat Wings or faction is maxxed. At that point it clears all the spells handed back from inventory and ends. Please try it out and let me know what you think. Enjoy!!!
Rich (BB code):
#turbo 120
#Event TSCursor "#*#because only tradeskill items may go in a tradeskill bag.#*#"
#Event NullSlot "#*#Invalid item slot 'null#*#"
#Event Finished "#1#Faydarks Champions could not possibly get any better."
Sub Main
/declare ItemToHandIn string outer Bat Wing
/declare TurnInTarget string outer Niola
/declare NullExit int outer 0
:MainLoop
:ZoneLoop
/doevents
/call SafeTarget ${TurnInTarget}
/call TurnIn
/call ClearCursor
/if (${FindItemCount[${ItemToHandIn}]}>0) {
/goto :ZoneLoop
} else {
/call CleanInventory
/end
}
/return
/goto :MainLoop
/return
Sub ClearCursor
:redetroy
/if (${Cursor.ID} && ${Cursor.NoDrop}==FALSE) {
/destroy
/delay 1
/goto :redetroy
}
/return
Sub SafeTarget(string targ)
/declare targid int local 0
:retarget
/if (${Target.ID} && ${Target.ID}==${Spawn[${targ}].ID}) /return
/if (${Spawn[${targ}].ID}) {
/varset targid ${Spawn[${targ}].ID}
/if (${Spawn[${targ}].Distance}<100) {
/echo Targeting ${Spawn[${targ}]}
/target id ${targid}
/delay 30 ${Target.ID}==${targid}
}
}
/if (!${Target.ID}) {
/echo [SafeTarget] couldnt find a target, retrying
/delay 1s
/goto :retarget
}
/return
Sub TurnIn
/declare muffintimer timer local 0
/declare i int local
/for i 0 to 3
/if (${FindItemCount[${ItemToHandIn}]}>0) {
:GetMuffin
/varset muffintimer 3s
/itemnotify "${ItemToHandIn}" leftmouseup
:waitformuffin
/if (${Cursor.ID}!=13068) {
/if (${muffintimer}==0) {
/goto :GetMuffin
}
/goto :waitformuffin
}
:retrytrade
/varset muffintimer 3s
/click left target
/click left target
:waitfortrade
/if (${Window[GiveWnd].Child[GVW_MyItemSlot${i}].Tooltip.NotEqual[${ItemToHandIn}]}) {
/goto :waitfortrade
}
/if (${Cursor.ID} && ${Cursor.ID}==13068) {
/if (${muffintimer}==0) {
/goto :retrytrade
}
/goto :waitfortrade
}
}
/next i
:NullFix
/if (${Window[GiveWnd].Open}) /notify GiveWnd GVW_Give_Button leftmouseup
/delay 200 !${Window[GiveWnd].Open}
/return
Sub CursorCheck(int CursorLoop)
/declare i int local
/for i 1 to ${CursorLoop}
/if (${Cursor.ID} && ${Cursor.ID}!=13068) {
/destroy
}
/next i
/return
Sub Event_TSCursor
/declare ItemToDestroy string local Spell:Flare|Spell: Shield of Fire
/declare i int local
/for i 1 to 2
/if (${Cursor.Name.Equal[${ItemToDestroy.Arg[${i},|]}]}) {
/destroy
/delay 5
}
/next i
/doevents
/return
Sub Event_NullSlot
/varset NullExit 1
/echo Opening all bags to correct null slot
/keypress OPEN_INV_BAGS
/timed 100 /keypress CLOSE_INV_BAGS
/return
Sub Event_Finished
/declare StuffToDestroy string local Spell: Flare|Spell: Shield of Fire
/declare i int local
/for i 1 to 2
/if (${FindItemCount[${StuffToDestroy.Arg[${i},|]}]}>0) {
:MoreToDestroy
/doevents
/itemnotify "${StuffToDestroy.Arg[${i},|]}" leftmouseup
/delay 10 ${Cursor.Name.Equal[${StuffToDestroy.Arg[${i},|]}]}
/if (${Cursor.Name.Equal[${StuffToDestroy.Arg[${i},|]}]}) {
/destroy
/delay 10 ${Bool[${Cursor.ID}]}==FALSE
}
/if (${FindItemCount[${StuffToDestroy.Arg[${i},|]}]}>0) {
/goto :MoreToDestroy
}
}
/next i
/squelch /target clear
/endmacro
/return
Sub CleanInventory
/declare StuffToDestroy string local Spell: Flare|Spell: Shield of Fire
/declare i int local
/for i 1 to 2
/if (${FindItemCount[${StuffToDestroy.Arg[${i},|]}]}>0) {
:MoreToDestroy
/doevents
/itemnotify "${StuffToDestroy.Arg[${i},|]}" leftmouseup
/delay 10 ${Cursor.Name.Equal[${StuffToDestroy.Arg[${i},|]}]}
/if (${Cursor.Name.Equal[${StuffToDestroy.Arg[${i},|]}]}) {
/destroy
/delay 10 ${Bool[${Cursor.ID}]}==FALSE
}
/if (${FindItemCount[${StuffToDestroy.Arg[${i},|]}]}>0) {
/goto :MoreToDestroy
}
}
/next i
/squelch /target clear
/return

