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

[Talkaction] Outfits!

Kekox

Well-Known Member
Joined
Apr 4, 2009
Messages
1,264
Reaction score
60
Location
Venezuela
Well since the tibia client is limited to 25 outfits in the windows outfits im making a talkaction that player can say !outfit <name> and then his outfit change to the outfit he said..

I've started making it:
Lua:
local outfits = {
      ["cult"] =  {lookType = 59, storage = 21000}
}

function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
		return true
	end

    if(outfits[param] == nil) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only use cult param.")
		return true
	end
	
    if(getPlayerStorageValue(cid, outfits[param].storage) == false) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You didnt complete the quest of the "..param.." outfit.")
		return true
	end
	
	doPlayerChangeOutfit(cid, {lookType = 59})
	return true
end
But when the playr sey !outfit cult it just change the outfit to the "invisible" one.. Like when you say utana vid and then I try to open the outfit windows and I get debug o.o
 
what about this
Lua:
local outfits = {["cult"] = {lol = 194 , storage = 91000}}
function onSay(cid, words, param, channel)


    if(param == '') then
         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
       return true
    end

    if (outfits[param] == nil) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only use cult param.")
                return true
    end
        
    if (getPlayerStorageValue(cid, outfits[param].storage) < 0) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You didnt complete the quest of the "..param.." outfit.")
                return true
    end
    local tmp = getCreatureOutfit(cid)
    tmp.lookType = outfits[param].lol
        doCreatureChangeOutfit(cid, tmp) 
         
        return true
end
 
Back
Top