Postado Junho 25, 2014 11 anos Olá, no meu servidor quando está tendo um evento ele dá storage para os players, porém quando usam o comando !go /go, de mudar os outfit de toda a guild, o leader dá fora do evento e os membros da guild que estão dentro mudam de outfit, saindo das cores AZUL X RED =/ Tentei colocar pra não dar mais não sei como, podem me ajudar?? <!-- Guild Outfit Command --> <config name="guild-outfit-config"><![CDATA[ exhaust = 30 -- in seconds storage = 3005 -- storage value used to save exhaustion ]]></config> <talkaction words="!go;/go" event="script"><![CDATA[ domodlib('guild-outfit-config') local config = { exhaustion = exhaust, storage = storage } function onSay(cid, words, param, channel) if(exhaustion.check(cid, config.storage)) then doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustion .. " seconds.") return true end local playerGuild = getPlayerGuildId(cid) if(not playerGuild or playerGuild == 0) then doPlayerSendCancel(cid, "Sorry, you're not in a guild.") return true end if(getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!") return true end local outfit, members = getCreatureOutfit(cid), 0 local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")" for _, tid in ipairs(getPlayersOnline()) do if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then local newOutfit = outfit if(not canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons)) then local tmpOutfit = getCreatureOutfit(tid) newOutfit.lookAddons = 0--tmpOutfit.lookAddons if(not canPlayerWearOutfit(tid, outfit.lookType, 0)) then newOutfit.lookType = tmpOutfit.lookType end end doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, newOutfit) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members = members + 1 end end exhaustion.set(cid, config.storage, config.exhaustion) doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")") return true end ]]></talkaction> Os storages são esses... 140125, 140124 Tentei adicionar isso, mais não sei onde e nem consegui que funcionasse.. if (getPlayerStorageValue(cid, 140125) ~= -1) then return doPlayerSendCancel(cid, "Você não pode usar invisible durante o evento!") and doSendMagicEffect(getThingPos(cid), 2) end if (getPlayerStorageValue(cid, 140124) ~= -1) then return doPlayerSendCancel(cid, "Você não pode usar invisible durante o evento!") and doSendMagicEffect(getThingPos(cid), 2) end
Postado Junho 26, 2014 11 anos <!-- Guild Outfit Command --> <config name="guild-outfit-config"><![CDATA[ exhaust = 30 -- in seconds storage = 3005 -- storage value used to save exhaustion ]]></config> <talkaction words="!go;/go" event="script"><![CDATA[ domodlib('guild-outfit-config') local config = { exhaustion = exhaust, storage = storage } function onSay(cid, words, param, channel) if (getPlayerStorageValue(cid, 140125) ~= -1) or (getPlayerStorageValue(cid, 140124) ~= -1) then doPlayerSendCancel(cid, "Você não pode usar invisible durante o evento!") doSendMagicEffect(getThingPos(cid), 2) return true end if(exhaustion.check(cid, config.storage)) then doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustion .. " seconds.") return true end local playerGuild = getPlayerGuildId(cid) if(not playerGuild or playerGuild == 0) then doPlayerSendCancel(cid, "Sorry, you're not in a guild.") return true end if(getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!") return true end local outfit, members = getCreatureOutfit(cid), 0 local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")" for _, tid in ipairs(getPlayersOnline()) do if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then local newOutfit = outfit if(not canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons)) then local tmpOutfit = getCreatureOutfit(tid) newOutfit.lookAddons = 0--tmpOutfit.lookAddons if(not canPlayerWearOutfit(tid, outfit.lookType, 0)) then newOutfit.lookType = tmpOutfit.lookType end end doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, newOutfit) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members = members + 1 end end exhaustion.set(cid, config.storage, config.exhaustion) doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")") return true end ]]></talkaction> Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Junho 26, 2014 11 anos Autor Não pegou, o comando agora nem faz nada.... Alguem me ajudaaaa ? =(
Postado Junho 26, 2014 11 anos <!-- Guild Outfit Command --> <config name="guild-outfit-config"><![CDATA[ exhaust = 30 -- in seconds storage = 3005 -- storage value used to save exhaustion ]]></config> <talkaction words="!go;/go" event="script"><![CDATA[ domodlib('guild-outfit-config') local config = { exhaustion = exhaust, storage = storage } function onSay(cid, words, param, channel) if (getPlayerStorageValue(cid, 140125) ~= -1) or (getPlayerStorageValue(cid, 140124) ~= -1) then doPlayerSendCancel(cid, "Você não pode usar invisible durante o evento!") doSendMagicEffect(getThingPos(cid), 2) return true else if(exhaustion.check(cid, config.storage)) then doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustion .. " seconds.") return true end local playerGuild = getPlayerGuildId(cid) if(not playerGuild or playerGuild == 0) then doPlayerSendCancel(cid, "Sorry, you're not in a guild.") return true end if(getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!") return true end local outfit, members = getCreatureOutfit(cid), 0 local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")" for _, tid in ipairs(getPlayersOnline()) do if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then local newOutfit = outfit if(not canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons)) then local tmpOutfit = getCreatureOutfit(tid) newOutfit.lookAddons = 0--tmpOutfit.lookAddons if(not canPlayerWearOutfit(tid, outfit.lookType, 0)) then newOutfit.lookType = tmpOutfit.lookType end end doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, newOutfit) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members = members + 1 end end exhaustion.set(cid, config.storage, config.exhaustion) doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")") end return true end ]]></talkaction> Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Junho 26, 2014 11 anos Autor Também não night! [26/6/2014 20:5:31] >>> Loading custom_commands.xml ...[Error - ScriptManager::loadFromXml] Cannot load mod custom_commands.xml [26/6/2014 20:5:31] Line: 128, Info: Input is not proper UTF-8, indicate encoding ! linha 128; doPlayerSendCancel(cid, "Você não pode usar invisible durante o evento!")
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.