• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Big problem on my Console

lSenturion2

Member
Joined
Oct 2, 2019
Messages
44
Reaction score
17
Hello there, can you help me with a big problem on my ot ? I am able to pay you if you can fix my problem.

when the players login on the server , the console get crashed and shows this message a lot of times.
Warning -- getVocation: Vocationd id 4294967295 not found.

by the way, this problem makes the console increase the RAM and gets down the ot
 

Evil Puncker

prolonged absenteeism
TFS Developer
Joined
May 30, 2009
Messages
7,957
Solutions
203
Reaction score
3,787
I have already asked you for the reset script so we can fix the error but you didn't answer...

 
OP
OP
L

lSenturion2

Member
Joined
Oct 2, 2019
Messages
44
Reaction score
17
Code:
local config =
{
   levelLimit = 2000, --limit of course
   kickTime = 2000, --(in miliseconds) time before player gets kicked
   removeInventory = false, --remove items from inventory after reset? (to prevent players using items with level required after reset)
   newLevel = 8, --new level after reset
   newExp = 1, --new exp after reset
   resetSkills = true, --reset skills?
   skillLevel = 11, --new skills level after reset
   resetMagic = true, --reset magic level?
   newMagic = 2, --new magic level after reset
   resetHealth = true, --reset health?
   newHealth = 1100, --new player health/healthmax after reset
   resetMana = true, --reset mana?
   newMana = 1100, --new player mana/manamax after reset
   resetVocation = true, --delete promotion?
   resetProfesion = true --delete promotion?
}
 
local displayMessage, message = true, "You have reached the level limit, you will be kicked in " .. config.kickTime / 1000 .. " seconds."
 
function onAdvance(cid, skill, oldlevel, newLevel)
 
   if(skill == SKILL__LEVEL and isPlayer(cid)) then
      if newLevel >= config.levelLimit then
         local queries = {}
         local id = getPlayerGUID(cid)   
 
         if displayMessage then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, message)
            doTeleportThing(cid, {x = 19114, y = 19200, z = 7})
         end
         if config.removeInventory then
            table.insert(queries, "delete from player_items where player_id = " .. id .. ";")
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Save your items on the depot or will be deleted after the reset.")
         end
         if config.resetSkills then
            for i = 1, 6 do
               table.insert(queries, "update player_skills set value = " .. config.skillLevel .. ", count = 0 where skillid = " .. i - 1 .. " and player_id = " .. id .. ";")
            end
         end
         doPlayerAddItem(cid, 18093, 1)
         setPlayerReborn(cid,getPlayerReborn(cid)+1)
         table.insert(queries, "update players set level = " .. config.newLevel .. ", experience = " .. config.newExp .. "" .. (config.resetMagic and ", maglevel = " .. config.newMagic .. "" or "") .. (config.resetHealth and ", health = " .. config.newHealth .. ", healthmax = " .. config.newHealth .. "" or "") .. (config.resetMana and ", mana = " .. config.newMana .. ", manamax = " .. config.newMana .. "" or "") .. (config.resetVocation and ", promotion = 0" or "") .. (config.resetProfesion and ", vocation = 0" or "") .. ";")
         addEvent(reset, config.kickTime, getCreatureName(cid), queries)
      else
         if config.levelLimit - newLevel <= 10 then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need " .. config.levelLimit - newLevel .. " levels more to reach the limit".. (config.removeInventory and ", remember to save your items at the depot" or "") .. ".")
         end
      end
   end
   return true
end
 
function reset(p, queries)
   if getPlayerByName(p) ~= nil then
      doRemoveCreature(getCreatureByName(p))
      db.executeQuery("update players set online = 0 where id = " .. getPlayerGUIDByName(p) .. ";")
   end
   for i = 1, table.maxn(queries) do
      if not db.executeQuery(queries[i]) then
         print("[RESET] Unable to execute query: " .. queries[i])
      end
   end
   return true
end
 

Arkemis

Well-Known Member
Joined
Sep 4, 2021
Messages
82
Solutions
1
Reaction score
59
Location
United States
Please read the support board rules before posting. You've opened multiple threads in violation.

 
Top