| ----------------------------------------------------------------------------
| SUB: Grab Corpse
| ----------------------------------------------------------------------------
Sub GrabCorpse
DEBUGN GrabCorpse Enter
/declare i int local
/declare CorpseFarthest int local 0
/declare CorpseFarthestTemp int local 0
/if (${FindItemCount[Tiny Jade Inlaid Coffin]}) {
/if (${SpawnCount[pccorpse ${Me} radius ${MaxRadius}]} && ${Me.AltAbilityReady[Summon Remains]}) {
/target ${Me}
/delay 10
/call CastWhat "Summon Remains" ${Me.ID} GrabCorpse 0
/delay 30
/return
}
}
/if (${SpawnCount[pccorpse ${Me} radius 89]} && !${DragCorpse} && ${Math.Distance[${CampYLoc},${CampXLoc}]}>=${CampRadius}) {
/corpsedrag
/varset DragCorpse 1
/echo Hey I found my corpse. Running back to camp for a rez
/varset Pulled 1
/if (${GMailEvents.Find[drag]}) /call GmailSend "Hey I found my corpse. Running back to camp for a rez!"
}
DEBUGN GrabCorpse Leave
/return