Here's a few pre-test functions to do something like that. Haven't tested, debugged, or anything else to it. Just soft of a layout for a possible solution:
Code: Select all
/declare CorpseArray[100] int outer 0
#event Consent "has give you consent"
|or whatever the consent message is....
Sub Event_Consent(string EvtText)
/declare counter int local 1
/if (${EvtText.Find[${Me.Zone}]}) { |only add corpses in the same zone as you. guess it wouldn't matter as you woulnd't get a valid id from it anyway
:CorpseLoop
/if (${CorpseArray[${counter}]}==0) {
/varset CorpseArray[${counter}] ${Spawn[${EvtText.Mid[1,1]} corpse].ID}
|Use Mid, Left, Right, Whatever to find the name of the person that consented you depending what you're comfortable with and the consent message text
/return
}
/varcalc counter ${counter}+1
/goto :CorpseLoop
}
/return
Then you could replace your :loop2 with something like...
Code: Select all
:loop2
/for ParamCount 1 to 100
/if (${Spawn[${CorpseArray[${ParamCount}]}]}) {
/if (${Spawn[${CorpseArray[${ParamCount}]}].Distance}>100) { |Max drag distance == ???
/tar id ${CorpseArray[${ParamCount}]}
/cor
/delay 1
}
/next ParamCount
|move to next ParamCount if Corpse Found
}
/varset CorpseArray[${ParamCount}] 0
| sets array value to 0 if corpse not found
/next ParamCount
/goto :loop2
Anyway, just some partial code I threw together after thinking about it a little It wont run as it is cause I know I make a lot of silly typos and such, but will give yo a direction to go if you go that way. No clue how an array size of 100 will react time wise, etc.