ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: captainsparrow1882 on December 29, 2009, 03:52:45 AM

Title: Corpse ID
Post by: captainsparrow1882 on December 29, 2009, 03:52:45 AM
I have a problem with opening corpses. In the past I have always used code similar to this:

Code: [Select]
finditem YFM G_2
if #FindCnt > 0
{
  set %CorpseID #FindID
  set #LObjectID %CorpseID
  repeat
  {
    event macro 17 0
    wait 10
  }
  until #ContID = %CorpseID
  ...
}

Nowadays we seem to have instanced corpses only which, in the beginning, have a different #ContID.
Only after the 2 minutes, when the corpse becomes lootable by everyone, the ID changes to %CorpseID.

How do you usually deal with this? Do you just check for #ContType and #ContSize or do you check if the #ContID is in close proximity to the #%CorpseID?

Thanks for your help in advance!
Title: Re: Corpse ID
Post by: Petkiller on December 29, 2009, 05:29:51 AM
Here is what I am using in simple looting script:
finditem %corpseid G_2
if #findid = X
      return
wait 40
      set %corpse #findid
      set #lobjectid %corpse
      event macro 17 0;(open the corpse)
      wait 40
set %corpseContID #contid
finditem POF C_ , %corpseContID ;%corpse
      set %gold #findid
      wait 10
      exevent drag %gold #findstack
       wait 10
      exevent dropc #backpackid
ignoreItem %corpse 1
return