function removeMob(uid)
if Creature(uid) then
doRemoveCreature(uid)
end
end
mob = doSummonCreature(name, pos) -- returns uid
addEvent(removeMob, 15000, mob)
monster_storages = {}
function on...(...)
pid = doSummonCreature(name, pos)
if monster_storages[pid] == nil then monster_storages[pid] = {} end
monster_storages[pid][23485] = 2 -- value
end
monster_storages = {}
function doCreatureSetStorage(cid, key, value)
if monster_storages[cid] == nil then monster_storages[cid] = {} end
monster_storages[cid][key] = value
return true
end
function getCreatureStorage(cid, key, value)
if monster_storages[cid] == nil then
return -1
else
if monster_storages[cid][key] ~= nil then
return monster_storages[cid][key]
else
return -1
end
end
end