Postado Maio 17, 2015 10 anos Olá pessoal! Me deparei com alguns problemas no meu server e recorri ao fórum novamente em busca de ajuda, então vamos lá: SKILLS LIMITADAS As skills do server estão congelando da seguinte maneira: Magic Level: 44 Fist Fighting: 111 Club Fighting: 42 Sword Fighting: 45 Axe Fightinging: 39 Distance Fighting: 50 Shielding: 54 Fishing: 84 Queria aumentar o limite delas e pesquisei sobre, achei um tópico dizendo sobre creaturescripts, onAdvanced e onLogin que poderia causar isso e possuo tais scripts: <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/> <event type="advance" name="PointSystem" event="script" value="PointsSystem.lua"/> <event type="advance" name="SkillUpText" event="script" value="skilluptext.lua"/> <event type="login" name="PlayerLogin" event="script" value="login.lua"/> <event type="login" name="DeathFood" event="script" value="deathfood.lua"/> <event type="login" name="FirstItems" event="script" value="firstitems.lua"/> <event type="login" name="FirstItems2" event="script" value="firstitems2.lua"/> <event type="login" name="BattleLogin" event="script" value="BattleCreatureScript.lua"/> <event type="login" name="MutePlayer" event="script" value="mute_check.lua"/> Advancesave: local config = { savePlayersOnAdvance = true } function onAdvance(cid, skill, oldLevel, newLevel) if(config.savePlayersOnAdvance) then doPlayerSave(cid, true) end return true end PointSystem: -- ####################################### -- ####### Developed by MaXwEllDeN ####### -- ####### Level Points System ####### -- ####### Version: 1.0 ####### -- ####################################### local VocPoints = L_LvlPoints.vocPoints function onAdvance(cid, skill, oldlevel, newlevel) if not (VocPoints[getPlayerVocation(cid)]) then return true end if skill == 8 and getPlayerStorageValue(cid, 14573) < newlevel then if (getPlayerStorageValue(cid, 14574) < 0) then setPlayerStorageValue(cid, 14574, 0) setPlayerStorageValue(cid, 14573, 0) end setPlayerStorageValue(cid, 14573, newlevel) setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)])) doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18) end return true end Skilluptext: local config = { [0] = {msg = "Fist UP!", textcolor = 89}, [1] = {msg = "Club UP!", textcolor = 89}, [2] = {msg = "Sword UP!", textcolor = 89}, [3] = {msg = "Axe UP!", textcolor = 89}, [4] = {msg = "Dist UP!", textcolor = 89}, [5] = {msg = "Shield UP!", textcolor = 89}, [6] = {msg = "Fish UP!", textcolor = 89}, [7] = {msg = "Magic UP!", textcolor = 89}, [8] = {msg = "Level UP!", textcolor = 89} } function onAdvance(cid, skill, oldlevel, newlevel) if config[skill] then doSendAnimatedText(getThingPos(cid), config[skill].msg, config[skill].textcolor) end return true end PlayerLogin: local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } local max_hp = 12000 -- HP Inicial local max_mp = 1000 -- MP Inicial local max_speed = 240 -- MP Inicial function onLogin(cid) local maxaccbyip = 3 local accm = {} local pbi = getPlayersByIp(getPlayerIp(cid)) function antiTumb(cid) for _,player in ipairs(pbi) do if getCreatureName(player) == "Account Manager" then table.insert(accm, player) end end if #accm > maxaccbyip then print("Foi ultrapassado o limite maximo de contas online com o seguinte ip "..convertIntToIP(getPlayerIp(cid)).."\npor motivos de seguranca todos os accounts managers com esse ip foram kickados\nAnti-Nuker System 2.0") for _,player in ipairs(accm) do doRemoveCreature(player) end end return true end addEvent(antiTumb, 10, cid) if getPlayerStorageValue(cid, 18391) == 1 then --- Storage usada no drive.lua setPlayerStorageValue(cid, 18391, 0) doCreatureSetLookDir(cid, 4) doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -Speed) --- Coloque em números a speed que configurou no drive.lua doCreateItem(1514, 1, getCreaturePosition(cid)) doTeleportThing(cid, getCreatureLookPosition(cid)) end local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." if getPlayerStorageValue(cid, 41078) == 1 then setPlayerStorageValue(cid, 41078, -1) elseif getPlayerStorageValue(cid, 41079) == 1 then setPlayerStorageValue(cid, 41078, -1) end else doPlayerAddOutfitId(cid, 1, 0) doCreatureChangeOutfit(cid, {lookType = 214}) str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) setCreatureMaxHealth(cid, max_hp) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setCreatureMaxMana(cid, max_mp) doPlayerAddMana(cid, getPlayerMaxMana(cid)) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Olá, diga 'account' para criar sua conta, ou diga 'cancel' para cancelar.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Olá, diga 'account' diga account para criar seus personagens.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") elseif getPlayerMaxMana(cid) ~= 2500 then setCreatureMaxMana(cid, 2500) doPlayerAddMana(cid, getPlayerMaxMana(cid)-getPlayerMana(cid)) end if(getPlayerGroupId(cid) == 7) then setPlayerGroupId(cid, 1) end registerCreatureEvent(cid, "SpectreFlash") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "Look") registerCreatureEvent(cid, "attackCancel") registerCreatureEvent(cid, "CarAttack") registerCreatureEvent(cid, "RestAttack") registerCreatureEvent(cid, "CarLogout") registerCreatureEvent(cid, "CashCarAttack") registerCreatureEvent(cid, "CashCarLogout") registerCreatureEvent(cid, "SpeedAttack") registerCreatureEvent(cid, "WeaponsAttack") registerCreatureEvent(cid, "DeathFood") registerCreatureEvent(cid, "OutfitBuff") registerCreatureEvent(cid, "CapaLogout") registerCreatureEvent(cid, "GUILDMode") registerCreatureEvent(cid, "evolutionb") registerCreatureEvent(cid, "Zombie") registerCreatureEvent(cid, "ZombieLook") registerCreatureEvent(cid, "CommandsDeath") registerCreatureEvent(cid, "BlockOutfit") registerCreatureEvent(cid, "swordEff") registerCreatureEvent(cid, "Look") registerCreatureEvent(cid, "attackalianca") registerCreatureEvent(cid, "partyAndGuildProtection") registerCreatureEvent(cid, "PointSystem") registerCreatureEvent(cid, "SkillUpText") registerCreatureEvent(cid, "ranksKill") registerCreatureEvent(cid, "ranksLook") registerCreatureEvent(cid, "SampleItems") return true end DeathFood death = 2000 -- quando morre vai nascer com 200 de fome só edita function onLogin(cid) death_food(cid) registerCreatureEvent(cid, "deathfood") return 1 end function death_food(cid) if isCreature(cid) and getPlayerFood(cid) <= 10 then doPlayerFeed(cid,death/2.8) end end FirstItems (itens inicias para todas as classes) function onLogin(cid) if getPlayerStorageValue(cid, 30002) == -1 then local bag = doPlayerAddItem(cid, 1988, 1) doPlayerAddItem(cid, 2461, 1) doPlayerAddItem(cid, 2651, 1) doPlayerAddItem(cid, 2648, 1) doPlayerAddItem(cid, 2643, 1) doAddContainerItem(bag, 2377, 1) doAddContainerItem(bag, 2400, 1) doAddContainerItem(bag, 2144, 100) doAddContainerItem(bag, 2144, 100) setPlayerStorageValue(cid, 30002, 1) end return true end FirstItems2 - itens inicias adicionais para cada vocação function onLogin(cid) setPlayerStorageValue(cid, 54444, -1) if getPlayerStorageValue(cid, 30003) == -1 then local bag = doPlayerAddItem(cid, 1988, 1) setPlayerStorageValue(cid, 30003, 1) if getPlayerVocation(cid) == 1 then doAddContainerItem(bag, 2359, 1) doAddContainerItem(bag, 2329, 1) doAddContainerItem(bag, 2361, 1) elseif getPlayerVocation(cid) == 2 then doAddContainerItem(bag, 2154, 1) doAddContainerItem(bag, 2354, 1) doAddContainerItem(bag, 2355, 1) elseif getPlayerVocation(cid) == 3 then doAddContainerItem(bag, 2149, 1) doAddContainerItem(bag, 2153, 1) doAddContainerItem(bag, 2344, 1) elseif getPlayerVocation(cid) == 4 then doAddContainerItem(bag, 2490, 1) doAddContainerItem(bag, 2540, 1) doAddContainerItem(bag, 2176, 1) elseif getPlayerVocation(cid) == 5 then doAddContainerItem(bag, 2156, 1) doAddContainerItem(bag, 2159, 1) doAddContainerItem(bag, 2194, 1) end end return true end BattleLogin function onLogin(cid) if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == -1 then setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0) setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0) setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0) end registerCreatureEvent(cid, "BattleTeam") registerCreatureEvent(cid, "BattleDeath") return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamOne.storage) == 1 then doPlayerSendCancel(cid, "You may not attack your team mates.") return false end if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamTwo.storage) == 1 then doPlayerSendCancel(cid, "You may not attack your team mates.") return false end return true end return true end function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 then setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1) setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!") if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 then getWinnersBattle(_Lib_Battle_Info.TeamTwo.storage) else doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name) end elseif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1) setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!") if getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage) == 0 then getWinnersBattle(_Lib_Battle_Info.TeamOne.storage) else doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name) end end return true end o point system é um sistema que ganha pontos ao passar de level para distribuir em todas as skills, dei uma olhadinha nos scripts e não achei nada que limitasse, sla peço que analisem pra mim pfvr ;xSTART.LUA Start.lua está assim: function onStartup() db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. ";") return true end [17/05/2015 12:06:16] [Error - GlobalEvent Interface] [17/05/2015 12:06:16] data/globalevents/scripts/start.lua:onStartup [17/05/2015 12:06:16] Description: [17/05/2015 12:06:16] data/globalevents/scripts/start.lua:2: attempt to call field 'executeQuery' (a nil value) [17/05/2015 12:06:16] stack traceback: [17/05/2015 12:06:16] data/globalevents/scripts/start.lua:2: in function <data/globalevents/scripts/start.lua:1> TWO-HANDED WEAPON [17/05/2015 12:06:15] [Warning - Items::loadFromXml] Unknown weaponType two-handed espero que possam me ajudar
Postado Maio 17, 2015 10 anos Para o magic veja esse tópico (sources): http://www.tibiaking.com/forum/topic/41223-max-de-magic-lvl-156-como-aumentar/ Erro do start.lua: Tente mudar db.executeQuery para db.Query Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais... ________________________________________________________________________________ Minhas Sprites: Mega Metagross Mega Abomasnow Pack de Shinys [Posso atualizá-lo com novos shinys a qualquer momento] Tutoriais: [Completo] Criando e adicionando um novo Pokémon [Actions] Criando quest no RME Editores Lua/Xml/Sync Entre outros: Editores Win/Mac/Linux
Postado Maio 17, 2015 10 anos Autor Para o magic veja esse tópico (sources): http://www.tibiaking.com/forum/topic/41223-max-de-magic-lvl-156-como-aumentar/ Erro do start.lua: Tente mudar db.executeQuery para db.Query [17/05/2015 14:09:50] [Error - GlobalEvent Interface] [17/05/2015 14:09:50] data/globalevents/scripts/start.lua:onStartup [17/05/2015 14:09:50] Description: [17/05/2015 14:09:50] data/globalevents/scripts/start.lua:2: attempt to call field 'Query' (a nil value) [17/05/2015 14:09:50] stack traceback: [17/05/2015 14:09:50] data/globalevents/scripts/start.lua:2: in function <data/globalevents/scripts/start.lua:1> quanto ao magic level, é nas sources que mexe segundo o tópico que vc mandou.. o server que to editando veio com sources mas sempre da problema na hora de compilar seguindo tutorias que vejo aqui no tk e não sei se é o processo que dá problema ou se as sources são bugadas mesmo.. caso as sources forem realmente bugadas, posso pegar outras sources limpas para usar, que não vou perder nada do meu server?
Postado Maio 17, 2015 10 anos Olha você tem que tentar baixar uma source de um servidor o mais parecido com o seu possível e em seguida verificar se é compatível, porém tem vezes que o bug é do próprio dev c++ Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais... ________________________________________________________________________________ Minhas Sprites: Mega Metagross Mega Abomasnow Pack de Shinys [Posso atualizá-lo com novos shinys a qualquer momento] Tutoriais: [Completo] Criando e adicionando um novo Pokémon [Actions] Criando quest no RME Editores Lua/Xml/Sync Entre outros: Editores Win/Mac/Linux
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.