Postado Abril 13, 2019 6 anos Olá Comunidade TibiaKing,. Estou utilizando um Baiak Evolution 8.60. Acabei de colocar o sistema COH que o nosso amigo @Absolute postou á um bom tempo atrás. acredito que muitos estão utilizando o mesmo script e podem me ajudar Ao pisar no trono, os players da guild inimiga deveriam ser teleportados para fora do castelo, porém isso não está acontecendo. Vi no script que está em "movements" a função doCastleRemoveEnemies() Essa função é puxada da Lib "015-COH" que possui o seguinte script: COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas) COH_AREA = {{x=1240,y=174,z=4}).uid, {x=1335,y=264,z=9}} -- 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 end end return true end Segue abaixo o script que estou utilizando em movements: 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 a 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 estao 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() -- Comando está bugado, ao subir no piso os players não são teletransportados para fora do castelo doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, va dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você nao 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] Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Voce nao 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] Atencao! A guild "..getPlayerGuildName(cid).." esta muito proxima do domínio, ataquem!") end end return true end Quando dei reload actions para fazer um outro teste, o servidor bugou todas as actions após perceber isso, dei um restart na DISTRO do servidor e os players não conseguiram entrar, aparecia uma mensagem na DISTRO onde era impossível executar um texto do globalevents. Só consegui voltar tudo ao normal quando retirei a "015-COH" de data/lib. (Então o problema estava ali, algum tipo de conflito em algum comando). Perguntas: Essa Lib(script) fica na pasta data/lib ou dentro de data/movements/lib? O erro está somente na lib?? Alguém consegue achar onde está erro?? Fico no aguardo de alguém para me ajudar, Obrigado! Editado Abril 14, 2019 6 anos por Dornellas Achei alguns caminhos para o possível erro. (veja o histórico de edições)
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.