• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Monster name

Any suggestion how to do it?
I really don't know.

I would later to know the position of a dead monster to catch him.
it depends on how you're planning on using it later on
you can save it in a new index each time a monster dies, but then you can't really access the creature name in a good way
i could write code for you but i have no idea how you're planning on using it later on, so i don't really know how to store it
what exactly are you planning to do with it?
 
you can set a description to the corpse with something like "The soul of a Demon is still here." or something like that
Code:
local function changeCorpseDescription(pos, name)
    doSetItemSpecialDescription(getThingFromPos(pos).uid, "The soul of a ".. name .." is still here.")
end

function onDeath(cid)
    if isMonster(cid) then
        addEvent(changeCorpseDescription, 5, getCreaturePosition(cid), getCreatureName(cid))
    end
    return true
end

and use something like this with action script
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local description = getItemSpecialDescription(itemEx.uid)
    if description then
        local monster = description:match("The soul of a (.*) is still here.")
        if monster then
            doItemSetSpecialDescription(doPlayerAddItem(cid, 2345).uid, "This paper holds the soul of a ".. monster ..".")
            doRemoveItem(item.uid, 1)
        end
    end
    return true
end
 
Back
Top