Page 1 of 1

Drag and Drag lots

Posted: Thu May 13, 2004 10:15 pm
by Mysteryman
I use this from an alias...... they both work.. the first is for draggin a single corpse, the second is for dragin any you target.. then target yourself, and it will begin. Target yourself again and it will end. I have drug up to 12 corpses at 1x, at a full run, and never droped 1.

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
}

:DragSingle_Loop
/newif (${Target.ID}==0) /goto :DragSingle_Done

/corpse
/delay 3
/doevents
/goto :DragSingle_Loop

:DragSingle_Done
/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

:DragAll_Targeting_Loop
/Delay 1
/call GMCheck
/doevents

/if (${Target.ID}==0) /goto :DragAll_Targeting_Loop
/if (${Target.CleanName.Equal[${LastCorpse}]}) /goto :DragAll_Targeting_Loop
/if (${Target.CleanName.Equal[${Me.Name}]}) /goto :DragAll_Targeting_Done
/if (${Target.Type.NotEqual[corpse]}) /goto :DragAll_Targeting_Loop

/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 :DragAll_Targeting_Loop

:DragAll_Targeting_Done
/if (${TotalCount(int)}<1) {
/echo === No Targets to drag. Drag mode terminated.
/return
}

/echo Dragging ${TotalCount} bodies.
/target

:DragAll_KeepGoing
/doevents
/for Counter 1 to ${Math.Calc[${TotalCount(int)}]}
/if (${Target.CleanName.Equal[${Me.Name}]}) /goto :DragAll_Done
/target ${gDragList[${Counter(int)}]}
/corpse
/delay 1
/next Counter
/if (${Target.CleanName.NotEqual["${Me.Name}"]}) /goto :DragAll_KeepGoing
:DragAll_Done
/echo === Dragging done. ${TotalCount} corpses drug!
/return

Posted: Thu Jun 24, 2004 1:42 pm
by ecsos
hey i thought this was great, but it's not a complete package,.
i just changed it to a simple macro. very straightforward, and only for dragging multiple corpses. array size is 54 but i would probably not try it with that many, :p

Code: Select all

| Drag lots and lots of corpses 
Sub Main 
/Declare LastCorpse string 
/Declare TotalCount int 
/Declare Counter int 
/declare gDragList[54] string

/varset Counter 0 
/varset TotalCount 0 

/target clear

/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 
:DragAll_Targeting_Loop 
/Delay 1 
|/call GMCheck 
/doevents 

/if (${Target.ID}==0) /goto :DragAll_Targeting_Loop 
/if (${Target.Name.Equal[${LastCorpse}]}) /goto :DragAll_Targeting_Loop 
/if (${Target.Name.Equal[${Me.Name}]}) /goto :DragAll_Targeting_Done 
/if (${Target.Type.NotEqual[corpse]}) /goto :DragAll_Targeting_Loop 

/echo === Adding ${Target.Name} to the corpse list. Last is ${LastCorpse} 
/corpse 

/varcalc TotalCount ${TotalCount(int)}+1 
/varset gDragList[${TotalCount(int)}] ${Target.Name} 
/varset LastCorpse ${Target.Name} 
/goto :DragAll_Targeting_Loop 

:DragAll_Targeting_Done 
/if (${TotalCount(int)}<1) { 
/echo === No Targets to drag. Drag mode terminated. 
/return 
} 

/echo Dragging ${TotalCount} bodies. 
/target clear

:DragAll_KeepGoing 
/doevents 
/for Counter 1 to ${Math.Calc[${TotalCount(int)}]} 
/if (${Target.Name.Equal["${Me.Name}"]}) /goto :DragAll_Done 
/target ${gDragList[${Counter(int)}]} 
/corpse 
/delay 1 
/next Counter 
/if (${Target.CleanName.NotEqual[${Me.Name}]}) /goto :DragAll_KeepGoing 
:DragAll_Done 
/echo === Dragging done. ${TotalCount} corpses drug! 
/return