[17/01/2014 10:52:46] data/talkactions/scripts/teste.lua:23: unfinished long string near '<eof>'
[17/01/2014 10:52:46] Reloaded talk actions.
Script Usada:
function onSay(cid, words, param) local femaleOutfits = { [["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}}, ["trainer"]={1465}, ["vinganca"]={1443} } local maleOutfits = { ["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}}, ["trainer"]={1465}, ["vinganca"]={1443} } local msg = {"Digite !addon e o nome correto. Por exemplo: !addon um, dois ou tres", "Voce não possui 5 diamonds!", "Bad param!", "Você recebeu seu addons!"} local param = string.lower(param) if(getPlayerItemCount(cid, 2145) >= 5) then if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then doPlayerRemoveItem(cid, 2145, 5) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, femaleOutfits[param][1], 3) else doPlayerAddOutfit(cid, maleOutfits[param][1], 3) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end return TRUE end
Pergunta
homersapiens 46
local femaleOutfits = { [["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}}, ["trainer"]={1465}, ["vinganca"]={1443} }
local maleOutfits = { ["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}}, ["trainer"]={1465}, ["vinganca"]={1443} }
local msg = {"Digite !addon e o nome correto. Por exemplo: !addon um, dois ou tres", "Voce não possui 5 diamonds!", "Bad param!", "Você recebeu seu addons!"}
local param = string.lower(param)
if(getPlayerItemCount(cid, 2145) >= 5) then
if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then
doPlayerRemoveItem(cid, 2145, 5)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
if(getPlayerSex(cid) == 0)then
doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
else
doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
end
return TRUE
end
Link para o comentário
https://xtibia.com/forum/topic/227342-talkaction-outfits/Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados