• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

onKill add aid to monster corpse

This should work...
Code:
function setaid(pos)
   corpse = getTileItemByType(pos, ITEM_TYPE_CONTAINER).uid
   if corpse ~= 0 then
     doItemSetAttribute(corpse, "aid", 9999)
   end
end

function onKill(cid, target, lastHit)
   addEvent(setaid, 0, getThingPos(target))
return true
end
 
This should work...
Code:
function setaid(pos)
   corpse = getTileItemByType(pos, ITEM_TYPE_CONTAINER).uid
   if corpse ~= 0 then
     doItemSetAttribute(corpse, "aid", 9999)
   end
end

function onKill(cid, target, lastHit)
   addEvent(setaid, 0, getThingPos(target))
return true
end
thanks working good i have another question
how to add here and if not moveitem aid 9999
Code:
    if (v and v.corpse == moveitem.itemid and getGlobalStorageValue(tileitem.itemid) < 1) then
 
Last edited:
Back
Top