Postado Outubro 20, 2012 12 anos Bom é o seguinte eu fiz 2 addon doll em meu ot. Um da a primeira parte de um addon o outro da a outra. Só que esta acontecendo o seguinte se o player tem a primeira parte do addon e vai usar o segundo doll. Fala que o player ja tem o addon. Ou se ja tem a segunda e vai usar o doll pra primeira acontece o mesmo. Então queria ajuda pra arrumar essa talkaction pra poder usar os 2 e funcionar certin cada doll dar uma parte do addon. Aqui vai o script: function onSay(cid, words, param, channel) local cfg = { ["citizen"] = { outfit = { male = 128, female = 136, addon = 2, storage = 11001 }, items = { {9693,1} } }, ["hunter"] = { outfit = { male = 129, female = 137, addon = 2, storage = 11002 }, items = { {9693,1} } }, ["mage"] = { outfit = { male = 130, female = 138, addon = 2, storage = 11003 }, items = { {9693,1} } }, ["knight"] = { outfit = { male = 131, female = 139, addon = 2, storage = 11004 }, items = { {9693,1} } }, ["nobleman"] = { outfit = { male = 132, female = 140, addon = 2, storage = 11005 }, items = { {9693,1} } }, ["summoner"] = { outfit = { male = 133, female = 141, addon = 2, storage = 11006 }, items = { {9693,1} } }, ["warrior"] = { outfit = { male = 134, female = 142, addon = 2, storage = 11007 }, items = { {9693,1} } }, ["barbarian"] = { outfit = { male = 147, female = 143, addon = 2, storage = 11008 }, items = { {9693,1} } }, ["druid"] = { outfit = { male = 148, female = 144, addon = 2, storage = 11009 }, items = { {9693,1} } }, ["wizard"] = { outfit = { male = 149, female = 145, addon = 2, storage = 11010 }, items = { {9693,1} } }, ["oriental"] = { outfit = { male = 150, female = 146, addon = 2, storage = 11011 }, items = { {9693,1} } }, ["pirate"] = { outfit = { male = 151, female = 155, addon = 2, storage = 11012 }, items = { {9693,1} } }, ["assassin"] = { outfit = { male = 152, female = 156, addon = 2, storage = 11013 }, items = { {9693,1} } }, ["beggar"] = { outfit = { male = 153, female = 157, addon = 2, storage = 11014 }, items = { {9693,1} } }, ["shaman"] = { outfit = { male = 154, female = 158, addon = 2, storage = 11015 }, items = { {9693,1} } }, ["norseman"] = { outfit = { male = 251, female = 252, addon = 2, storage = 11016 }, items = { {9693,1} } }, ["nightmare"] = { outfit = { male = 268, female = 269, addon = 2, storage = 11017 }, items = { {9693,1} } }, ["jester"] = { outfit = { male = 273, female = 270, addon = 2, storage = 11018 }, items = { {9693,1} } }, ["brotherhood"] = { outfit = { male = 278, female = 279, addon = 2, storage = 11019 }, items = { {9693,1} } }, ["demon hunter"] = { outfit = { male = 289, female = 288, addon = 2, storage = 11020 }, items = { {9693,1} } }, ["yalaharian"] = { outfit = { male = 325, female = 324, addon = 2, storage = 11021 }, items = { {9693,1} } }, ["wayfarer"] = { outfit = { male = 366, female = 367, addon = 2, storage = 11023 }, items = { {9693,1} } }, ["warmaster"] = { outfit = { male = 335, female = 336, addon = 2, storage = 11022 }, items = { {9693,1} } } } local v, removeItems = cfg[param], 0, 0 if(param == "") then doPlayerSendCancel(cid, "Command requires param.") return true end if(getPlayerStorageValue(cid, v.outfit.storage) == -1) then for i = 1, #v.items do if(getPlayerItemCount(cid, v.items[1]) >= v.items[2]) then removeItems = removeItems+1 end end if(removeItems == #v.items) then if(getPlayerSex(cid) == 1) then doPlayerAddOutfit(cid, v.outfit.male, v.outfit.addon) elseif(getPlayerSex(cid) == 0) then doPlayerAddOutfit(cid, v.outfit.female, v.outfit.addon) end for i = 1, #v.items do doPlayerRemoveItem(cid, v.items[1], v.items[2]) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu uma nova outfit!") doSendMagicEffect(getThingPos(cid), CONST_ME_FIREWORK_YELLOW) setPlayerStorageValue(cid, v.outfit.storage, 1) else for i = 1, #v.items do doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "você precisa " .. v.items[2] .. "x " .. getItemNameById(v.items[1]) .. " para comprar a outfit.") end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você ja tem está outfit.") end return true end "Assinatura removida, aqui não é lugar de vendas e sim de compartilhamento de conteúdo, leia as regras!" Matheus
Postado Outubro 20, 2012 12 anos http://tibiaking.com/forum/topic/17751-de-sugestoes-de-script/#entry95890 neste tópico tem um script que o slaake posto. 16/11/2014 23/11/2014 RIP AnneMotta 21/01/2012 - 15/01/2014 Liga das lendas: DIAMOND É A META
Postado Outubro 20, 2012 12 anos Autor Anne esse script que ele posto quando tu usa da todos addon. Eu quero que de uma parte de tal addon. Vou tentar mudar storage mais nem sei como funciona. Coloco qualquer uma? o.o "Assinatura removida, aqui não é lugar de vendas e sim de compartilhamento de conteúdo, leia as regras!" Matheus
Postado Outubro 20, 2012 12 anos Sim, coloque um número que não foi usado em nenhum script que vai dar certo www.patronum.online
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.