Ir para conteúdo
  • 0

Addon Doll


gahgah

Pergunta

5 respostass a esta questão

Posts Recomendados

  • 0
function onSay(cid, words, param)
local femaleOutfits = { ["citizen"]={136,206320}, ["hunter"]={137,206321}, ["mage"]={138,206322}, ["knight"]={139,206323}, ["nobleman"]={140,206324}, ["summoner"]={141,206325}, ["warrior"]={142,206326}, ["barbarian"]={147,206327}, ["druid"]={148,206328}, ["wizard"]={149,206329}, ["oriental"]={150,206330}, ["pirate"]={155,206331}, ["assassin"]={156,206332}, ["beggar"]={157,206333}, ["shaman"]={158,206334}, ["norsewoman"]={252,206335}, ["nightmare"]={269,206336}, ["jester"]={270,206337}, ["brotherhood"]={279,206338}, ["demonhunter"]={288,206339}, ["yalaharian"]={324,206340}, ["warmaster"]={335,206341}}
local maleOutfits = { ["citizen"]={128,216320}, ["hunter"]={129,216321}, ["mage"]={130,216322}, ["knight"]={131,216323}, ["nobleman"]={132,216324},["summoner"]={133,216325}, ["warrior"]={134,216326}, ["barbarian"]={143,216327}, ["druid"]={144,216328}, ["wizard"]={145,216329}, ["oriental"]={146,216330}, ["pirate"]={151,216331}, ["assassin"]={152,216332}, ["beggar"]={153,216333}, ["shaman"]={154,216334}, ["norsewoman"]={251,216335}, ["nightmare"]={268,216336}, ["jester"]={273,216337}, ["brotherhood"]={278,216338}, ["demonhunter"]={289,216339}, ["yalaharian"]={325,216340}, ["warmaster"]={336,216341}}
local msg = {"Digite o nome correto!", "Voce não possui Addon Doll!", "Bad param!", "Você recebeu seus addons.", "Você já tem esse addon"}
local param = string.lower(param)
if(getPlayerItemCount(cid, 9693) > 0) then
if (param ~= "" and maleOutfits[param] or femaleOutfits[param]) then
local sex = getPlayerSex(cid) == 0 and femaleOutfits[param] or maleOutfits[param]
if getPlayerStorageValue(cid, sex[2]) == -1 then 
doPlayerAddOutfit(cid, sex[1], 3)
setPlayerStorageValue(cid, sex[2], 1)
doPlayerRemoveItem(cid, 9693, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[5])
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
end
return true
end

Editado por Vodkart
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...