Postado Setembro 22, 2017 7 anos Galera to com um evento em meu servidor chama DESERT WAR, está funcionando 99% o único erro nele é que quando o evento inicia o teleport não some, ele continua aberto no templo e todos os player que entra após o evento ter iniciado fica preso la dentrosem poder se mover, fora isso o evento está encerrando normalmente, levando os player que entraram no tempo certo pro templo de volta e pagando os premio como configurado só preciso que o teleport feche ao iniciar o evento... abaixo segue os 3 scripts encontrados em quem conseguir arrumar pode me dizer por favor em qual das 3 pstas esta o erro para eu trocar o scrip dps? OBG gente DATA/GLOBAL EVENTS/ function onTime () doItemSetAttribute(doCreateItem(1387, 1, {x = 176, y = 53, z = 7, stackpos = 1}), "aid", 2137) doBroadcastMessage("Desert WAR starting in 3 minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(4, 0) setGlobalStorageValue(5, 0) addEvent(startDesert, 3 * 60 * 1000) return true end function startDesert() doRemoveItem(getTileItemById({x = 40, y = 151, z = 7}, 1387).uid, 1) if getGlobalStorageValue(4) > 0 and getGlobalStorageValue(5) > 0 then doBroadcastMessage("Good luck in the desert war event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, 51) > 0 or getPlayerStorageValue(cid, 52) > 0 then doCreatureSetNoMove(cid, false) end end else doBroadcastMessage("Desert War hasn\'t started beacuse there were not enough players.") for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, 51) > 0 or getPlayerStorageValue(cid, 52) > 0 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doCreatureSetNoMove(cid, false) end end end return true end ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- DATA/CREATURESCRIPT function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerStorageValue(cid, 51) == 1 and getPlayerStorageValue(target, 51) == 1 or getPlayerStorageValue(cid, 52) == 1 and getPlayerStorageValue(target, 52) == 1 or getPlayerStorageValue(cid, 71) == 1 and getPlayerStorageValue(target, 71) == 1 or getPlayerStorageValue(cid, 72) == 1 and getPlayerStorageValue(target, 72) == 1 then doPlayerSendCancel(cid, "Você não pode atacar jogadores do seu time!") return false end end return true end function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if getPlayerStorageValue(cid, 51) == 1 then if getGlobalStorageValue(4) > 1 then setPlayerStorageValue(cid, 51, 0) setGlobalStorageValue(4, getGlobalStorageValue(4)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doItemSetAttribute(doCreateItem(3058, 1, getPlayerPosition(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by Black Assassins team.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[DESERT WAR] Você Morreu!") doPlayerSave(cid) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 51) == 1 or getPlayerStorageValue(pid, 52) == 1 then doPlayerSendTextMessage(pid, 18, "Players restante: ".. getGlobalStorageValue(5) .." Black Assassins X ".. getGlobalStorageValue(4) .." Red Barbarians") end end else setPlayerStorageValue(cid, 51, 0) setGlobalStorageValue(4, getGlobalStorageValue(4)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[DESERT WAR] Você foi o último sobrevivente do time perdedor e também ganhou recompensa!") doPlayerAddItem(cid,9971,10) doPlayerAddItem(cid,6527,80) doBroadcastMessage("".. getGlobalStorageValue(5) .." Players do Black Assassins team sobreviveram ao evento e obteram a recompensa de 80 Event Coins e 10 Gold Ingots!") setGlobalStorageValue(5, getGlobalStorageValue(5)-1) doPlayerSave(cid) for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, 52) > 0 then setPlayerStorageValue(cid, 52, 0) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerAddItem(cid,9971,10) doPlayerAddItem(cid,6527,80) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSave(cid) end end end elseif getPlayerStorageValue(cid, 52) == 1 then if getGlobalStorageValue(5) > 1 then setPlayerStorageValue(cid, 52, 0) setGlobalStorageValue(5, getGlobalStorageValue(5)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doItemSetAttribute(doCreateItem(3058, 1, getPlayerPosition(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by Red Barbarians team.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[DESERT WAR] Você Morreu!") doPlayerSave(cid) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 51) == 1 or getPlayerStorageValue(pid, 52) == 1 then doPlayerSendTextMessage(pid, 18, "Players restantes: ".. getGlobalStorageValue(5) .." Black Assassins X ".. getGlobalStorageValue(4) .." Red Barbarians") end end else setPlayerStorageValue(cid, 52, 0) setGlobalStorageValue(5, getGlobalStorageValue(5)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[DESERT WAR] Você foi o último sobrevivente do time perdedor e também ganhou recompensa!") doPlayerAddItem(cid,9971,10) doPlayerAddItem(cid,6527,80) doBroadcastMessage("".. getGlobalStorageValue(4).." Players do Red Barbarians team sobreviveram ao evento e obteram a recompensa de 80 Event Coins e 10 Gold Ingots!") setGlobalStorageValue(4, getGlobalStorageValue(4)-1) doPlayerSave(cid) for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, 51) > 0 then setPlayerStorageValue(cid, 51, 0) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerAddItem(cid,9971,10) doPlayerAddItem(cid,6527,80) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSave(cid) end end end end return true end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ DATA/MOVEMENTS local conditionBlack = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionBlack, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionBlack, {lookType = 134, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}) local conditionRed = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRed, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRed, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}) function onStepIn(cid, item, position, fromPosition) if getPlayerAccess(cid) > 3 or getPlayerLevel(cid) < 80 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser no mínimo level 80!") elseif getGlobalStorageValue(4) >= getGlobalStorageValue(5) then setPlayerStorageValue(cid, 52, 1) setGlobalStorageValue(5, getGlobalStorageValue(5)+1) doAddCondition(cid, conditionBlack) doRemoveCondition(cid, CONDITION_INVISIBLE) doTeleportThing(cid, {x= 713, y= 763, z=6}) doCreatureSetNoMove(cid, true) doPlayerPopupFYI(cid, "-BR-\nVocê entrou! Aguarde o ínicio do evento. Você precisa matar todos os players do time adversário e SOBREVIVER para obter a recompensa.\n\n-ENG-\nYou entered! Wait for the event start. You need to kill all the players of the opposing team and SURVIVE for win the reward.") else setPlayerStorageValue(cid, 51, 1) setGlobalStorageValue(4, getGlobalStorageValue(4)+1) doAddCondition(cid, conditionRed) doRemoveCondition(cid, CONDITION_INVISIBLE) doTeleportThing(cid, {x= 656, y= 795, z=6}) doPlayerPopupFYI(cid, "-BR-\nVocê entrou! Aguarde o ínicio do evento. Você precisa matar todos os players do time adversário e SOBREVIVER para obter a recompensa.\n\n-ENG-\nYou entered! Wait for the event start. You need to kill all the players of the opposing team and SURVIVE for win the reward.") doCreatureSetNoMove(cid, true) end return true end
Postado Setembro 22, 2017 7 anos Solução @Vim Rusha essa é a função que inicia o evento, ao que parece, deve ser ela que remove o teleporte: 1 hora atrás, Vim Rusha disse: function startDesert() doRemoveItem(getTileItemById({x = 40, y = 151, z = 7}, 1387).uid, 1) if getGlobalStorageValue(4) > 0 and getGlobalStorageValue(5) > 0 then doBroadcastMessage("Good luck in the desert war event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, 51) > 0 or getPlayerStorageValue(cid, 52) > 0 then doCreatureSetNoMove(cid, false) end end else doBroadcastMessage("Desert War hasn\'t started beacuse there were not enough players.") for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, 51) > 0 or getPlayerStorageValue(cid, 52) > 0 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doCreatureSetNoMove(cid, false) end end end return true end doRemoveItem(getTileItemById({x = 40, y = 151, z = 7}, 1387).uid, 1) coloque a posição onde o teleporte nasce.
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.