Siddin submitted this for access,
Ok, first of all, the only things i'm going to delete in this macro are the coords that i start to recircle after i loot, anybody who uses this will have to put those coords in as well.
Rich (BB code):
| Written by Siddin
|You will need to get mq2twist and mq2moveutils
|from the macroquest2 forums.
#event EXP "You gain experience!!"
#event EXP "You gain party experience!!"
#event NeedTarget "You must select a target for this spell!"
#event NeedTarget2 "Your target is out of range, get closer!"
#event seetarget "You cannot see your target."
#event targetid "#*#has worn off."
#event logoff "LOADING, PLEASE WAIT..."
Sub main
/declare pause int outer 1
/declare healsong int outer 1
/declare SeloSong int outer 8
/declare DirgeSong int outer 7
/declare targetammount int outer 0
/echo Selo's: ${Me.Gem[${SeloSong}].Name}
:needtarget
/call event_needtarget
/call selosong
:MainLoop
/doevents
/if (!${Target.ID}) {
/keypress forward hold
/delay 3s
/goto :needtarget
}
/nomodkey /keypress forward hold
/call healsong
/call selosong
/call GMCheck
/call dirgesong
/delay 1S
/nomodkey /keypress forward hold
/goto :MainLoop
:loot
/call event_exp
/goto :pause
/return
Sub GMCheck
/if (${Spawn[gm].ID}) {
/Log GM entered the zone!
/log For safty reasons ending the macro
/echo GM entered the zone!
/echo For safty reasons ending the macro
/circle off
/keypress forward
/twist 6
/delay 3s
/twist 1
/q
}
/return
Sub Event_NeedTarget
/squelch /if (!${Target.ID}) /squelch /target npc radius 140
/keypress forward hold
/if (${Target.ID}) /twist 2 3 4 5
/return
Sub Event_NeedTarget2
/squelch /target npc radius 140
/keypress forward hold
/return
Sub Event_seetarget
/varcalc targetammount ${targetammount}+1
/if (${targetammount}>=10) {
/squelch /target npc radius 140
/twist reset
/varset targetammount 0
/return
}
/return
Sub Event_targetid
/varset targetammount 0
/return
sub selosong
/if (${SeloSong}) /if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=4) {
/echo Selos about to die
/twist 8
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/twist 2 3 4 5
/varset healsong 0
/call healsong
/doevents
/return
}
/return
sub dirgesong
/if (!${Target.ID}) /return
/if (${Me.CurrentMana}>=880) {
/echo dirge
/twist ${DirgeSong}
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/twist 2 3 4 5
/varset healsong 0
/call healsong
/doevents
/return
}
/return
Sub healsong
/if (${healsong}==0) /if (${Me.PctHPs}<=95) {
/twist 1 2 3 4 5
/varset healsong 1
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) {
/twist 2 3 4 5
/varset healsong 0
/return
}
/return
Sub Event_quit
/circle off
/keypress forward
/keypress left
/keypress right
/twist off
:doeventloop
/doevents
/goto :doeventloop
/return
Sub Event_logoff
/delay 60s
/keypress forward
/keypress left
/keypress right
/camp desktop
/endmac
/return
Sub Event_EXP
/twist 8
/squelch /target npc radius 160
/if (${Target.ID}) {
/twist 2 3 4 5
/return
} else {
/twist 8
/goto ;looting
}
:looting
/target npc radius 75
/if (${Target.ID}) {
/twist 2 3 4 5
/goto :endxp
}
/target npc corpse radius 200
/if (!${Target.ID}) /goto :endxp
/if (${Target.ID} {
/circle off
/call LootMob
/goto :looting
}
:endxp
/circle on (xcoords) (ycoords)
/return
Sub LootMob
/declare LootChance int inner 0
/declare LootSlot int inner 0
/declare LootCheck int inner 0
/declare LootTotal int inner 0
/face fast
/keypress forward
/keypress back
/stick 5
:Distance
/if (${Target.Distance}<=10) {
/stick off
/loot
} else {
/goto :Distance
}
/stick off
/loot
/delay 1s
/if (!${Corpse.Items}) {
/echo NO LOOT! Cheap Bastard!
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup
/cleanup
/return
}
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/itemnotify loot${LootSlot} leftmouseup
/delay 5
/autoinventory
/delay 5
/next LootSlot
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup
/cleanup
/return



