Postado Novembro 19, 2020 4 anos Olá, alguem poderia está me ajudando ? Coloquei 1 player de uma guild em cima do trono para dominar, aparece uma msg falando q ele e a guild dele estão no ''comando do castle'' so que quando o castle fecha, ele e mandando para o templo e nao anuncia que a guild dele venceu o castle of honor. E quando o player que pisou por ultimo no trono do castle tenta executar o comando para ter acesso as aréas do castle, fala '''coh''' sua guild nao e dona do castelo. Alguem ai ajuda plix? DATA/LIB ''015-COH'' -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas) COH_AREA = {{x = 619, y = 675, z = 7}, {x = 716, y = 775, z = 7}} -- Canto superior esquerdo / inferior direito do Castle -- // Não mexa daqui para baixo COH_STATUS = 201320111714 COH_PREPARE1 = 201320111715 COH_PUSHSTOR = 201320111716 COH_PREPARE2 = 201320111717 function doCastleRemoveEnemies() for index, creature in ipairs(getPlayersOnline()) do if isInArea(getThingPos(creature), COH_AREA[1], COH_AREA[2]) then if getPlayerGuildName(creature) ~= getGlobalStorageValue(COH_STATUS) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end end end return true end DATA/MOVEMENTS/SCRIPTS ''COH'' -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Voce não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle Of Honor] Voce e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle Of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Voce não possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) doBroadcastMessage("[Castle Of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle Of Honor] Voce não possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) doBroadcastMessage("[Castle Of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!") end end return true end Editado Novembro 19, 2020 4 anos por daniel.braga989 (veja o histórico de edições)
Postado Novembro 19, 2020 4 anos cadê o código? [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Novembro 19, 2020 4 anos Autor 2 minutos atrás, Vodkart disse: cadê o código? Editei la. @Vodkart Alguem plix? preciso disso muito urgente, da 1 força ai galera na humilda.
Postado Novembro 20, 2020 4 anos Autor Solução Olá a todos, Finalmente descobri o que estava acontecendo. O systema do castle não estava reconhecendo a guild com nome ''014'' quando dominava, por isso spamava msg varias vezes que a guild estava com o domínio do castle. Depois de varios tests feitos com amigos, consegui descobrir que o jogo não estava reconhecendo a guild com o nome em numeros. Obg a todos ai que tirou um tempinho para está vizualizando aqui ou me enviando msg, pois sei que muitos ai tem o dia corrido e mts das vezes o pessoal sao muito ingratos pela ajuda. Obrigado a todos de nvoo
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.