Postado Abril 5, 2016 9 anos Boa Noite Pessoal, estou com um problema no meu battle field, já tentei diversos scripts e não consegui solucionar; Pois bem, no battle field event tem aquela "parede" que quando o game iniciará elas irão sumir, porem elas n somem, ja tentei remove-las pelo RME e deixa-las, mas mesmo assim nada acontece, o evento esta funcionando perfeitamente, porem com esse pequeno detalhe, gostaria que me ajudassem para eu poder colocar meu otserv online o quanto antes... ficarei grato REP+ NO CASO SERIA BATTLELIB, OBS: posições estão corretas e o id da parede também, OT Baiak 8.6 TFS: 0.4.1 Meu Script : Spoiler _Lib_Battle_Info = { Reward = {1984,1}, TeamOne = {name = "Green Barbarians", storage = 140120, pos = {x=266,y=12,z=6}}, TeamTwo = {name = "Red Wizards",storage = 140121,pos = {x=248,y=12,z=6}}, storage_count = 180400, tpPos = {x=153, y=43, z=7}, limit_Time = 10 -- em minutos } function resetBattle() return setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0) and setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0) end function OpenWallBattle() local B = { {3517,{x=303, y=107, z=6, stackpos = 1}}, {3517,{x=303, y=107, z=6, stackpos = 1}}, {3517,{x=303, y=107, z=6, stackpos = 1}}, {3517,{x=303, y=107, z=6, stackpos = 1}}, } for i = 1, #B do if getTileItemById(B[2], B[1]).uid == 0 thendoCreateItem(B[1], 1, B[2])elsedoRemoveItem(getThingfromPos(B[2]).uid,1)endendend function doBroadCastBattle(type,msg)local players = {}for _, cid in pairs(getPlayersOnline()) doif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 thentable.insert(players, cid)endendfor i = 1, #players dodoPlayerSendTextMessage(players,type,msg)endend function removeBattleTp()local t = getTileItemById(_Lib_Battle_Info.tpPos, 1387).uidreturn t > 0 and doRemoveItem(t) and doSendMagicEffect(_Lib_Battle_Info.tpPos, CONST_ME_POFF)end function getWinnersBattle(storage)local players,str = {},""for _, cid in pairs(getPlayersOnline()) doif getPlayerStorageValue(cid, storage) == 1 thentable.insert(players, cid)endendstr = str .. ""..#players.." Player"..(#players > 1 and "s" or "").." from team "..(getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 and _Lib_Battle_Info.TeamTwo.name or _Lib_Battle_Info.TeamOne.name).." won the event battlefield, they received a ".._Lib_Battle_Info.Reward[2].." "..getItemNameById(_Lib_Battle_Info.Reward[1]).."!"for i = 1, #players dodoPlayerAddItem(players, _Lib_Battle_Info.Reward[1], _Lib_Battle_Info.Reward[2])doRemoveCondition(players, CONDITION_OUTFIT)doTeleportThing(players, getTownTemplePosition(getPlayerTown(players)))setPlayerStorageValue(players, storage, -1)endresetBattle()OpenWallBattle()return doBroadcastMessage(str)end function CheckEvent(delay)if delay > 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 thendoBroadcastMessage("[BattleField Event] We are waiting "..getGlobalStorageValue(_Lib_Battle_Info.storage_count).." players to Battlefield starts")elseif delay == 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 thenlocal players = {}for _, cid in pairs(getPlayersOnline()) doif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 thentable.insert(players, cid)endendfor i = 1, #players dodoRemoveCondition(players, CONDITION_OUTFIT)doTeleportThing(players, getTownTemplePosition(getPlayerTown(players)))setPlayerStorageValue(players, getPlayerStorageValue(players, _Lib_Battle_Info.TeamOne.storage) == 1 and _Lib_Battle_Info.TeamOne.storage or _Lib_Battle_Info.TeamTwo.storage, -1)enddoBroadcastMessage("The event cannot be started because not had enough players.")setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)resetBattle()removeBattleTp()endaddEvent(CheckEvent, 60000, delay-1)end ERRO no Console Spoiler 04/04/2016 20:34:56] Henrique Zera has logged in.[04/04/2016 20:36:41] > Broadcasted message: "The event BattleField was opened and We are waiting 2 Players! Team divided into 1 VS 1".[04/04/2016 20:37:36] Henriqeuee has logged in.[04/04/2016 20:37:41] > Broadcasted message: "[BattleField Event] We are waiting 1 players to Battlefield starts".[04/04/2016 20:37:45] > Broadcasted message: "Battlefield will start in 2 minutes, please create your strategy!".[04/04/2016 20:39:44] > Broadcasted message: "BattleField will begin now!". [04/04/2016 20:41:16] [Error - CreatureScript Interface] [04/04/2016 20:41:16] data/creaturescripts/scripts/BattleCreatureScript.lua:onPrepareDeath[04/04/2016 20:41:16] Description: [04/04/2016 20:41:16] (luaDoCreateItem) Tile not found [04/04/2016 20:39:45] [Error - MoveEvents Interface] [04/04/2016 20:39:45] In a timer event called from: [04/04/2016 20:39:45] data/movements/scripts/BattleMovements.lua:onStepIn[04/04/2016 20:39:45] Description: [04/04/2016 20:39:45] (luaDoCreateItem) Tile not found [04/04/2016 20:41:16] > Broadcasted message: "1 Player from team Red Wizards won the event battlefield, they received a 1 blue tome!". Editado Abril 5, 2016 9 anos por HenriqueFisch13 (veja o histórico de edições)
Postado Abril 5, 2016 9 anos Esta é uma mensagem automática, este tópico foi movido para a área correta. Regras do fórum: http://www.tibiaking.com/forum/topic/1281-regras-gerais/#comment-7680 ➥ Regras | Seções OTServ | Seções BOT
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.