Postado Maio 27, 2015 10 anos Alguem pode me ajudar, estou com um erro quando abro o distro e tento logar aparece o seguinte erro e não loga: [27/05/2015 12:46:37] Account Manager has logged in. [27/05/2015 12:46:37] [Error - CreatureScript Interface] [27/05/2015 12:46:37] data/creaturescripts/scripts/war.lua:onLogin [27/05/2015 12:46:37] Description: [27/05/2015 12:46:37] data/lib/war.lua:110: attempt to call global 'getTeamSpawn' (a nil value) [27/05/2015 12:46:37] stack traceback: [27/05/2015 12:46:37] data/lib/war.lua:110: in function 'cronWar' [27/05/2015 12:46:37] data/creaturescripts/scripts/war.lua:10: in function <data/creaturescripts/scripts/war.lua:1> [27/05/2015 12:46:37] Account Manager has logged out. [27/05/2015 12:46:38] [Error - CreatureScript Interface] [27/05/2015 12:46:38] In a timer event called from: [27/05/2015 12:46:38] data/creaturescripts/scripts/mc.lua:onLogin [27/05/2015 12:46:38] Description: [27/05/2015 12:46:38] (internalGetPlayerInfo) Player not found when requesting player info #28 [27/05/2015 12:46:42] [Error - CreatureScript Interface] [27/05/2015 12:46:42] In a timer event called from: [27/05/2015 12:46:42] data/creaturescripts/scripts/war.lua:onLogin [27/05/2015 12:46:42] Description: [27/05/2015 12:46:42] (luaDoRemoveCreature) Creature not found Script ta assim: war.lua function onLogin(cid) doPlayerPopupFYI(cid, '•[Team War - Updates]•\nAnti-Combo SD (Ativado) - Combo Delay 1 Min\nAnti-Kill MC (Ativado) - O Jogador Sera Punido Automaticamente\nAnti-MC (Ativado) - 2 Jogadores Por IP\nAnti-Free CTF (Ativado) - O Mode (Roba Bandeira) So Vai Ativar se Tiver Mais que [6] Players Online!\nChange Map System - Entregar [10x] A Bandeira ou Matar [50x] O Time Inimigo [Ambos os Placares o Time Vencedor Ganha o Premio]\nPlacar em Tempo Real\nServidor Resetado Dia [11/11/14] As 15:00!') doPlayerSendTextMessage(cid, 19, "Duvidas ou Sugestoes? [Help] Reclamacoes Sujeito Leva (Muted)!") doPlayerAddAddons(cid, 2) doPlayerAddAddons(cid, 1) if warInitialized == 0 then warInitialized = 1 setPlayerStorageValue(cid, STORAGE_TEAM_ID, 1) setMap(1) cronWar() end setPlayerStorageValue(cid, STORAGE_TEAM_ID, 0) setPlayerStorageValue(cid, STORAGE_DEPOT, 0) setTeam(cid) doTeleportThing(cid, getSpawn(cid), TRUE) return TRUE end mc.lua local config = { max = 2, -- número de players permitido com o mesmo ip group_id = 1 -- kikar apenas player com o group id 1 } local accepted_ip_list = {} -- lista dos players permitidos a usar MC, exemplo: {"200.85.3.60", "201.36.5.222"} local function antiMC(p) if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then doRemoveCreature(p.pid) end return true end function onLogin(cid) if getPlayerGroupId(cid) <= config.group_id then if isInArray(accepted_ip_list,doConvertIntegerToIp(getPlayerIp(cid))) == false then addEvent(antiMC, 1000, {pid = cid, max = config.max+1}) end end return true end Mais vale a lagrima da derrota doque a Covardia de não ter lutado , Prefiro morrer de Pé do que sempre viver ajoelhado. Kaio santos "soldier killed"
Postado Maio 27, 2015 10 anos voce adicionou mapa novo no server? -@edit: faz tempo que nao mexo mais nesse serv =s - Posta o data/creaturescripts/war.lua e o data/lib/war.lua Editado Maio 27, 2015 10 anos por Nextbr (veja o histórico de edições)
Postado Maio 27, 2015 10 anos Autor voce adicionou mapa novo no server? -@edit: faz tempo que nao mexo mais nesse serv =s - Posta o data/creaturescripts/war.lua e o data/lib/war.lua -- config -- WAR_MAP_NAMES = {'FIBULA', 'EDRON', ' VENORE', 'THAIS', 'ARENA', 'ARENA 3', 'ARENA 1', 'ARENA 2'} WAR_SPAWNS = {} WAR_SPAWNS[1] = {{2,2},{3,3}} -- map 1 WAR_SPAWNS[2] = {{5,5},{6,6}} -- map 2 WAR_SPAWNS[3] = {{8,8},{9,9}} -- map 3 WAR_SPAWNS[4] = {{11,11},{12,12}} -- map 4 WAR_SPAWNS[5] = {{36,36},{34,34}} -- map 5 WAR_SPAWNS[6] = {{37,37},{38,38}} -- map 6 WAR_SPAWNS[7] = {{41,41},{42,42}} -- map 8 positions = { {{x = 260,y = 535, z = 9},{x = 280,y = 555, z = 9}}, {{x = 1003,y = 907, z = 7},{x =1013,y = 917, z = 7}}, {{x = 970,y = 973, z = 7},{x = 984,y = 987, z = 7}} } WAR_MAP_CYCLE = {{1,2},{2,3},{3,4},{4,5},{5,6},{6,7},{7,1}} WAR_COLORS = {{98,94,94,94},{89,89,89,89}} WAR_TEAM_NAMES = {'Team Red','Team Blue'} WAR_BROADCAST_INTERVAL_TOP5 = 213 WAR_START_LEVEL = 140 WAR_TEAMS = 1 WAR_POINTS_FOR_KILL = 3 WAR_POINTS_FOR_KILL_ASSIST = 1 -------------------------------------------------------- STORAGE_LAST_KILLER_GUID = 10100 STORAGE_LAST_KILLER_GUID_TIMES = 10101 STORAGE_LAST_KILLER_IP = 10200 STORAGE_LAST_KILLER_IP_TIMES = 10201 STORAGE_LAST_KILLER_ACCOUNT = 10300 STORAGE_LAST_KILLER_ACCOUNT_TIMES = 10301 STORAGE_POINTS = 11000 STORAGE_TEAM_ID = 12000 STORAGE_SKULL = 13000 STORAGE_DEPOT = 14000 GLOBAL_STORAGE_MAP = 500 GLOBAL_STORAGE_MAP_CHANGE_TIME = 501 GLOBAL_STORAGE_TEAM_1_FRAGS = 600 GLOBAL_STORAGE_TEAM_2_FRAGS = 700 GLOBAL_STORAGE_BROADCAST_TOP5 = 800 warInitialized = 0 function getTime(s) local n = math. floor(s / 60) s = s - (60 * n) return n, s end function getSpawn(cid) local map_info = WAR_MAP_CYCLE[getGlobalStorageValue(GLOBAL_STORAGE_MAP)] local map_id = map_info[1] local map_spawns = WAR_SPAWNS[map_id] local team_spawns = map_spawns[getPlayerStorageValue(cid, STORAGE_TEAM_ID)] return getTownTemplePosition(team_spawns[math.random(1,#team_spawns)]) end function getTeamMembers(id) local players = getPlayersOnline() local team = {} if #players == 0 then return team end for i, cid in ipairs(players) do if getPlayerStorageValue(cid, STORAGE_TEAM_ID) == id and getPlayerGroupId(cid) == 1 then table.insert(team, cid) end end return team end function updateOutfit(cid) if WAR_TEAMS == 1 then --outfit local colors = WAR_COLORS[getPlayerStorageValue(cid, STORAGE_TEAM_ID)] local outfit = getCreatureOutfit(cid) outfit.lookHead = colors[1] outfit.lookBody = colors[2] outfit.lookLegs = colors[3] outfit.lookFeet = colors[4] doCreatureChangeOutfit(cid, outfit) end end function setTeam(cid) if WAR_TEAMS ~= 1 then setPlayerStorageValue(cid, STORAGE_TEAM_ID, 1) else local team1 = getTeamMembers(1) local team2 = getTeamMembers(2) if #team1 >= #team2 then setPlayerStorageValue(cid, STORAGE_TEAM_ID, 2) setPlayerStorageValue(cid, 3000, 1) else setPlayerStorageValue(cid, STORAGE_TEAM_ID, 1) setPlayerStorageValue(cid, 3001, 1) end updateOutfit(cid) end end function cronWar() if getGlobalStorageValue(GLOBAL_STORAGE_MAP_CHANGE_TIME) < os.time() then -- change map local map_info = WAR_MAP_CYCLE[getNextMapId()] local map_id = map_info[1] doTeleportThing(pid,getTeamSpawn(pid),false) -- teleporta para a base if WAR_TEAMS == 1 then doBroadcastMessage(getTeamScore(), MESSAGE_STATUS_DEFAULT) end setMap(getNextMapId()) elseif getGlobalStorageValue(GLOBAL_STORAGE_BROADCAST_TOP5) < os.time() then -- broadcast top 5 setGlobalStorageValue(GLOBAL_STORAGE_BROADCAST_TOP5, os.time()+WAR_BROADCAST_INTERVAL_TOP5) addEvent(doBroadcastMessage, 1000, getTop5Players(), MESSAGE_STATUS_CONSOLE_ORANGE) end addEvent(cronWar, 1000) end function getNextMapId() if getGlobalStorageValue(GLOBAL_STORAGE_MAP) == #WAR_MAP_CYCLE then return 1 end return getGlobalStorageValue(GLOBAL_STORAGE_MAP)+1 end function getTop5Players() local players = getPlayersOnline() if #players == 0 then return top5text end local player1 = {0,-1} local player2 = {0,-1} local player3 = {0,-1} local player4 = {0,-1} local player5 = {0,-1} local top5text = "Top 5 Fragers Online" for i, cid in ipairs(players) do if getPlayerStorageValue(cid,19999) > player1[2] then player5 = {player4[1], player4[2]} player4 = {player3[1], player3[2]} player3 = {player2[1], player2[2]} player2 = {player1[1], player1[2]} player1 = {cid, getPlayerStorageValue(cid,19999)} elseif getPlayerStorageValue(cid,19999) > player2[2] then player5 = {player4[1], player4[2]} player4 = {player3[1], player3[2]} player3 = {player2[1], player2[2]} player2 = {cid, getPlayerStorageValue(cid,19999)} elseif getPlayerStorageValue(cid,19999) > player3[2] then player5 = {player4[1], player4[2]} player4 = {player3[1], player3[2]} player3 = {cid, getPlayerStorageValue(cid,19999)} elseif getPlayerStorageValue(cid,19999) > player4[2] then player5 = {player4[1], player4[2]} player4 = {cid, getPlayerStorageValue(cid,19999)} elseif getPlayerStorageValue(cid,19999) > player1[2] then player5 = {cid, getPlayerStorageValue(cid,19999)} end end if player1[1] > 0 then top5text = top5text .. "\n1. " .. getCreatureName(player1[1]) .. " - " .. player1[2]+1 .. " frags" end if player2[1] > 0 then top5text = top5text .. "\n2. " .. getCreatureName(player2[1]) .. " - " .. player2[2]+1 .. " frags" end if player3[1] > 0 then top5text = top5text .. "\n3. " .. getCreatureName(player3[1]) .. " - " .. player3[2]+1 .. " frags" end if player4[1] > 0 then top5text = top5text .. "\n4. " .. getCreatureName(player4[1]) .. " - " .. player4[2]+1 .. " frags" end if player5[1] > 0 then top5text = top5text .. "\n5. " .. getCreatureName(player5[1]) .. " - " .. player5[2]+1 .. " frags" end return top5text end function getTeamScore() return WAR_TEAM_NAMES[1] .. " - " .. getGlobalStorageValue(GLOBAL_STORAGE_TEAM_1_FRAGS) .. " : " .. getGlobalStorageValue(GLOBAL_STORAGE_TEAM_2_FRAGS) .. " - " .. WAR_TEAM_NAMES[2] end function setMap(id) local map_info = WAR_MAP_CYCLE[id] setGlobalStorageValue(GLOBAL_STORAGE_MAP,id) local players = getPlayersOnline() for i, cid in ipairs(players) do addEvent(doRemoveCreature, 5*1000, cid, true) setPlayerStorageValue(cid,17778,0) -- seta verificacao de bandeira em 0 setPlayerStorageValue(cid,17777,0) -- seta verificacao de bandeira em 0 setGlobalStorageValue(17778,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(17779,0) -- ninguem ficar com bandeira time vermelho! setGlobalStorageValue(18888,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(18889,0) -- ninguem ficar com bandeira time vermelho!! setGlobalStorageValue(5002,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(5001,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(4002,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(4001,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(11544 ,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(11543,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(5555,0) -- ninguem ficar com bandeira time verde! setGlobalStorageValue(5656,0) -- ninguem ficar com bandeira time verde! doCreatureSetSkullType(cid, 0) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doChangeSpeed(cid, -getCreatureSpeed(cid) + getCreatureBaseSpeed(cid)) doTeleportThing(cid, getSpawn(cid), TRUE) removeConditions(cid) end end function removeConditions(cid) doRemoveCondition(cid, CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_PARALYZE) doRemoveCondition(cid, CONDITION_ENERGY) doRemoveCondition(cid, CONDITION_FIRE) doRemoveCondition(cid, CONDITION_POISON) doRemoveCondition(cid, CONDITION_DRUNK) end Mais vale a lagrima da derrota doque a Covardia de não ter lutado , Prefiro morrer de Pé do que sempre viver ajoelhado. Kaio santos "soldier killed"
Postado Maio 30, 2015 10 anos Autor @up Mais vale a lagrima da derrota doque a Covardia de não ter lutado , Prefiro morrer de Pé do que sempre viver ajoelhado. Kaio santos "soldier killed"
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.