Postado Dezembro 17, 2017 7 anos 2 minutos atrás, leozincorsair disse: sim . local vocs = { [1] = {outfit = 400, effect = 35, cd = 1, vname = "Sakura", id = 1, msg = "Você ganhou temporariamente um outfit da Sakura!"}, [2] = {outfit = 93, effect = 14, cd = 1, vname = "Sasuke", id = 502, msg = "Você ganhou temporariamente um outfit da Sasuke!"}, [3] = {outfit = 402, effect = 35, cd = 1, vname = "Naruto", id = 3, msg = "Você ganhou temporariamente um outfit da Naruto!"}, } local storage = 4444 -- storage para nao poder ficar usando toda hora.. function onSay(cid, words, param) if (param == '') then local str = "" str = str .. "Vocations:\n\n" for a = 1, #vocs do str = str..""..vocs[a].vname.."\n" end doShowTextDialog(cid, 7416, str) return true end if getPlayerStorageValue(cid, storage) >= 1 then doPlayerSendTextMessage(cid, 27, "Você já está usando uma outfit") return true end for x = 1, #vocs do if string.find(string.lower(vocs[x].vname), string.lower(param)) and getPlayerVocation(cid) ~= vocs[x].id then doPlayerSendTextMessage(cid, 27, "Sua vocação é " .. getPlayerVocationName(cid) .."") -- quando alguem tenta usar outfit q n é da sua vocação end end for x = 1, #vocs do if string.find(string.lower(vocs[x].vname), string.lower(param)) and getPlayerVocation(cid) == vocs[x].id then addEvent( function() doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, storage, -1) end, vocs[x].cd * 60 * 1000) -- tempo em minutos para a outfit sair doSendMagicEffect(getThingPos(cid), vocs[x].effect) -- efeito que sai quando usa o comando doSetCreatureOutfit(cid, {lookType = vocs[x].outfit, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) setPlayerStorageValue(cid, storage, 1) doPlayerSendTextMessage(cid, 27, "".. vocs[x].msg.. "") end end return true end Teste Editado Dezembro 17, 2017 7 anos por DeeadPool (veja o histórico de edições) Meu facebook Spoiler https://www.facebook.com/csbjgames1 Meu Projeto Spoiler https://www.facebook.com/otpMysterious/?fref=ts Meu Skype Spoiler brendo.dmg.yago Meu Servidor Online: Spoiler Em Construção
Postado Dezembro 17, 2017 7 anos @leozincorsair Tenta assim: local vocs = { [1] = {outfit = 400, effect = 35, cd = 1, vname = "Sakura", id = 1}, [2] = {outfit = 93, effect = 14, cd = 1, vname = "Sasuke", id = 502}, [3] = {outfit = 402, effect = 35, cd = 1, vname = "Naruto", id = 3}, } local storage = 4444 -- storage para nao poder ficar usando toda hora.. function onSay(cid, words, param) if (param == '') then local str = "" str = str .. "Vocations:\n\n" for a = 1, #vocs do str = str..""..vocs[a].vname.."\n" end doShowTextDialog(cid, 7416, str) return true end if getPlayerStorageValue(cid, storage) >= 1 then doPlayerSendTextMessage(cid,25,"Você já está usando uma outfit.") return true end for x = 1, #vocs do if string.find(string.lower(vocs[x].vname), string.lower(param)) and getPlayerVocation(cid) ~= vocs[x].id then doPlayerSendTextMessage(cid,25,"Sua vocação é " .. getPlayerVocationName(cid) ..".") -- quando alguem tenta usar outfit q n é da sua vocação end end for x = 1, #vocs do if string.find(string.lower(vocs[x].vname), string.lower(param)) and getPlayerVocation(cid) == vocs[x].id then addEvent( function() doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, storage, -1) end, vocs[x].cd * 60 * 1000) -- tempo em minutos para a outfit sair doSendMagicEffect(getThingPos(cid), vocs[x].effect) -- efeito que sai quando usa o comando doSetCreatureOutfit(cid, {lookType = vocs[x].outfit, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) setPlayerStorageValue(cid, storage, 1) doPlayerSendTextMessage(cid,25,"Você ganhou temporariamente um outfit de ".. vocs[x].vname .."!") end end return true end se der outro erro manda ai... desiste não mano! MEU SERVER: http://otpokemonxy.net/ Nosso → Grupo Oficial OtPokemon XY 24 Horas Nosso → Site Oficial OtPokemon XY 24 Horas Nossa → Pagina Oficial OtPokemon XY 24 Horas
Postado Dezembro 17, 2017 7 anos Autor Agora apareceu ''sua vocaçao agora e sasuke '' mais nao ganhou o outfit.
Postado Dezembro 17, 2017 7 anos @leozincorsair Seguinte... tira um print e manda aqui... eu coloquei pra aparecer essa mensagem só quando exemplo, uma vocação tentasse usar a outfit de outra.... ex: um naruto falando /out sasuke MEU SERVER: http://otpokemonxy.net/ Nosso → Grupo Oficial OtPokemon XY 24 Horas Nosso → Site Oficial OtPokemon XY 24 Horas Nossa → Pagina Oficial OtPokemon XY 24 Horas
Postado Dezembro 17, 2017 7 anos Autor 3 minutos atrás, gabrielzika disse: @leozincorsair Seguinte... tira um print e manda aqui... eu coloquei pra aparecer essa mensagem só quando exemplo, uma vocação tentasse usar a outfit de outra.... ex: um naruto falando /out sasuke
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.