Postado Novembro 1, 2014 10 anos Autor Bom amigo, eu tentei desenvolver algo mais fácil de edição. Eu fiz de um modo que você pode adicionar todas as outfits em um script só. Basta ir editando a tabela de outfits, do mesmo modo que eu fiz Não testei. local outfits = { [4113] = { items = { [1] = {itemid = 2476, ammount = 5}, [2] = {itemid = 2477, ammount = 5}, [3] = {itemid = 2396, ammount = 5}, }, out = { [1] = 131, -- Female [2] = 139, -- Male }, storageId = 10101, }, } function onUse(cid, item) local t = outfits[item.uid] if t then if getPlayerStorageValue(cid, t.storageId) <= 0 then for r = 1, #t.items do if(getPlayerItemCount(cid, t.items[r].itemid) < t.items[r].ammount) then doPlayerSendTextMessage(cid, 22, "You need "..t.items[r].ammount.." "..getItemNameById(t.items[r].itemid)) return true end doPlayerRemoveItem(cid, t.items[r].itemid, t.items[r].ammount) end doPlayerAddOutfit(cid, t.out[getPlayerSex(cid) + 1], 3) doPlayerSendTextMessage(cid, 22, "You won a new outfit.") setPlayerStorageValue(cid, t.storageId, 1) end end return true end Nossa Orochi, belo script '-' me sinto humilhado! hehe Não deu error na distro, porém algo não deu certo.. Eu puxo a alavanca, e além dela não virar, ela não me manda nenhuma mensagem que eu preciso dos items ou que ganhei o addon .. Alguma coisa não funcionou, talvez a forma que coloquei.. olha como coloquei o script..pode ver se fiz algo errado ? Sò editei os items,storage(seguindo padrão), e os addons .. local outfits = { [4112] = { items = { [1] = {itemid = 2189, ammount = 1}, [2] = {itemid = 2191, ammount = 1}, [3] = {itemid = 2187, ammount = 1}, [4] = {itemid = 2190, ammount = 1}, [5] = {itemid = 2181, ammount = 1}, [6] = {itemid = 2188, ammount = 1}, [7] = {itemid = 8921, ammount = 1}, [8] = {itemid = 2160, ammount = 25}, }, out = { [1] = 130, -- Female [2] = 138, -- Male }, storageId = 100003, }, } function onUse(cid, item) local t = outfits[item.uid] if t then if getPlayerStorageValue(cid, t.storageId) <= 0 then for r = 1, #t.items do if(getPlayerItemCount(cid, t.items[r].itemid) < t.items[r].ammount) then doPlayerSendTextMessage(cid, 22, "You need "..t.items[r].ammount.." "..getItemNameById(t.items[r].itemid)) return true end doPlayerRemoveItem(cid, t.items[r].itemid, t.items[r].ammount) end doPlayerAddOutfit(cid, t.out[getPlayerSex(cid) + 1], 3) doPlayerSendTextMessage(cid, 22, "You won a new outfit.") setPlayerStorageValue(cid, t.storageId, 1) end end return true end Programador/Scripter/Mapper nível NOOB ?
Postado Novembro 1, 2014 10 anos Bom.. voce sabe que ali na tabela onde voce colocou [4112], é o UniqueID, certo? Confere direitinho ai. Se não funcionar, a gente começa uma bateria de testes kk Tony Araújo
Postado Novembro 1, 2014 10 anos Autor Sei sim, o uniqueID está certo conforme a alavanca .. tô tentando aqui, se conseguir me ajudar, agente vai testando! ////up Programador/Scripter/Mapper nível NOOB ?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.