• 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!

Transform player into Item

Magictibiaman

New Member
Joined
May 25, 2009
Messages
371
Reaction score
0
i want to transform a player into a skull
i want to do this through a script
cause i need to edit the function
i know the chameleon rune does this but i can't
find how to access the code
 
USE:
Replace SKULLITEMID for item's id
-1 means forever (time)
Lua:
doSetItemOutfit(cid, SKULLITEMID, -1)

or TALKACTION
dunno about creator, this was posted here at lua&xml forum
transforms player into item
Lua:
<talkaction words="/item" log="yes" access="5" event="script" value="newid.lua"/>

Lua:
function onSay(cid, words, param, channel)
        if(param == '') then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                return true
        end
        local t = string.explode(param, ",")
        t[1] = tonumber(t[1])
        if(not t[1]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
                return true
        end
        if(t[1] >= 10544) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such item does not exist.")
                return true
        end
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your outfit has been turned into a "..getItemNameById(param)..".")
                  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SLEEP)
                    doSetItemOutfit(cid, param, -1)
        return true
end

 
Back
Top