Postado Setembro 26, 2022 2 anos .Qual servidor ou website você utiliza como base? Bsae Canary Qual o motivo deste tópico? Correção Fix Está surgindo algum erro? Se sim coloque-o aqui. Citar Não me mostra nenhum erro, simplesmente o script não faz sua função, que seria proibir o monstro de atacar o membro da guild. Você tem o código disponível? Se tiver publique-o aqui: local emper_dmg = CreatureEvent("Empr_Dmg") function emper_dmg.onThink(creature) addEvent(function(cid) local creature = Creature(cid) if not creature then return end local spectators = Game.getSpectators(Position(191, 294, 6), false, false, 10, 10, 10, 10) for i = 1, #spectators do local targetMonster = creature:getMonster() if not targetMonster:isPlayer() then return false end if targetMonster:isPlayer() and targetMonster == spectators[i] then local playerid = Player(targetMonster) local guild = targetMonster:getGuild() local Guild_ID = guild:getId() if Guild_ID == infoLua[2] then return false else return true end end end return true end, 1000, creature:getId()) end emper_dmg:register() infoLua[2] = ID da guild dominante. Editado Setembro 26, 2022 2 anos por xBlackWolf (veja o histórico de edições) xBlackWolf THX @Storm Night Best Avatar Ever
Postado Outubro 1, 2022 2 anos Em 25/09/2022 em 21:46, xBlackWolf disse: .Qual servidor ou website você utiliza como base? Bsae Canary Qual o motivo deste tópico? Correção Fix Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: local emper_dmg = CreatureEvent("Empr_Dmg") function emper_dmg.onThink(creature) addEvent(function(cid) local creature = Creature(cid) if not creature then return end local spectators = Game.getSpectators(Position(191, 294, 6), false, false, 10, 10, 10, 10) for i = 1, #spectators do local targetMonster = creature:getMonster() if not targetMonster:isPlayer() then return false end if targetMonster:isPlayer() and targetMonster == spectators[i] then local playerid = Player(targetMonster) local guild = targetMonster:getGuild() local Guild_ID = guild:getId() if Guild_ID == infoLua[2] then return false else return true end end end return true end, 1000, creature:getId()) end emper_dmg:register() infoLua[2] = ID da guild dominante. Adicione em criaturescript: Spoiler function onCombat(cid, target) if(not isPlayer(target)) then return TRUE else targets = getMonsterTargetList(cid) if getPlayerGuildId(target) == getGlobalStorageValue(123123) then addEvent(check,1000,cid,targets) return FALSE else return TRUE end end end function check(cid,targets) for i=1, #targets do if getPlayerGuildId(targets[i]) == getGlobalStorageValue(123123) then addEvent(check,1000,cid,targets) return FALSE else stopEvent(check) return TRUE end end end adicione na criatura: <script> <event name="guard"/> </script>
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.