I added this to my script when i made them...
Somewhere in your macro, add the lines..
#Event EvtCommandDrag "[MQ2] SRogue-Drag #*#"
/alias /drag /echo SRogue-Drag
Next add the following 3
| SRogue-Drag command. For draggin bodies
Sub Event_EvtCommandDrag(string EvtText)
/Declare Command string
/if (${EvtText.Arg[0].Equal["[MQ2]"]}) {
/varset Command ${EvtText.Arg[3]}
} else {
/return
}
/if (${gFuncInUse(int)}>0) {
/echo === EventDrag::Function already active ===
/return
}
/if (${Command.Equal[NULL]} || ${Command.Equal[single]}) {
/varset gFuncInUse 1
/call DragSingle
/varset gFuncInUse 0
/goto :Event_EvtCommandDrag_Done
}
/if (${Command.Equal[lots]}) {
/varset gFuncInUse 1
/call DragAll
/varset gFuncInUse 0
}
:Event_EvtCommandDrag_Done
/return
| Drag a single corpse that is already the target
Sub DragSingle
/echo Dragging your current target. Clear target to terminate.
/if (${Target.ID}==0) {
/echo === No target to drag. Terminated.
/return
}
/if (${Target.Type.NotEqual["corpse"]}) {
/echo === Your target is not a corpse! Terminated.
/return
}
/newif (${Target.ID}==0) /goto
/corpse
/delay 3
/doevents
/goto
/echo Single drag done.
/return
| Drag lots and lots of corpses
Sub DragAll
/Declare LastCorpse string
/Declare TotalCount int
/Declare Counter int
/varset Counter 0
/varset TotalCount 0
/echo Dragging all the corpses in my area that I can.
/echo Target any corpse you want pulled, target yourself to
/echo end the gathering phase, and beging moving them all out
/Delay 1
/call GMCheck
/doevents
/if (${Target.ID}==0) /goto
/if (${Target.CleanName.Equal[${LastCorpse}]}) /goto
/if (${Target.CleanName.Equal[${Me.Name}]}) /goto
/if (${Target.Type.NotEqual[corpse]}) /goto
/echo === Adding ${Target.CleanName} to the corpse list. Last is ${LastCorpse}
/corpse
/varcalc TotalCount ${TotalCount(int)}+1
/varset gDragList[${TotalCount(int)}] ${Target.CleanName}
/varset LastCorpse ${Target.CleanName}
/goto
/if (${TotalCount(int)}<1) {
/echo === No Targets to drag. Drag mode terminated.
/return
}
/echo Dragging ${TotalCount} bodies.
/target
/doevents
/for Counter 1 to ${Math.Calc[${TotalCount(int)}]}
/if (${Target.CleanName.Equal[${Me.Name}]}) /goto
/target ${gDragList[${Counter(int)}]}
/corpse
/delay 1
/next Counter
/if (${Target.CleanName.NotEqual["${Me.Name}"]}) /goto
/echo === Dragging done. ${TotalCount} corpses drug!
/return

