• 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!

Vocations bug!

Cypher

TwinkSoft Owner
Joined
Mar 21, 2011
Messages
834
Reaction score
16
Hey guys, I'm TibiaStrike.com owner and the server was going very good untill yesterday, some players lose their vocations after a certain amount of time. I'm not sure why does that happen!

PS: I just fired my 2 devs because they betray'd me and took some of my players to 'their' OT.

Any suggestions?

If you help you will be paid with:

- OtLand Rep
- 1 Donation item in the server

Thank you
 
In the DB the vocation says "8" but when the player log in the console says Error: bla bla bla vocation "45975437" doesn't exist bla bla.

And the server crashes when the bugged player attacks a monster.
 
[11:13:25.903] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

[11:13:25.904] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

[11:13:25.908] Jack Tha Ripper has logged in.

and the vocation is 8 = elit knight
 
Nope for some reason it's 0 now...
what should i check in login.xml? and where is that file:p all i know is login.lua
 
Login.xml Check its or any other login function that can make a player Set a new Voc that doesnt exists

Edit --
vocations.xml if the change just the number of the vocs?
 
login.xml where? login.lua =
Lua:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
accountManager = "Account Manager"                       
managerCounter = 0

   for i, player in ipairs(getOnlinePlayers()) do
      if accountManager:lower() == player:lower() then             
      managerCounter = managerCounter + 1
      end 
   end
 
   if managerCounter >= 3 then
      return false
   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) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(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, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "Reward")

	registerCreatureEvent(cid, "GuildMotd")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")	
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "PvP")
registerCreatureEvent(cid, "battlearenadeath")
registerCreatureEvent(cid, "battlearenadeath2")
registerCreatureEvent(cid, "battlearenalogout")

local spawnA = {x=31362,y=32645,z=7}
local spawnB = {x=31309,y=32584,z=6}
local gameLobby = {x=31448,y=32686 ,z=7}

--Check if logged out inside Arena
if getPlayerStorageValue(cid,11114) == 1 and getPlayerStorageValue(cid,11113) < 1 then
	--Remove Team
	setPlayerStorageValue(cid,11112,0)
	--Tele to Lobby
	doTeleportThing(cid,gameLobby,true)
	doCreatureSay(cid,"You logged out inside the arena.",TALKTYPE_ORANGE_1)
	--Remove Quitter Status
	setPlayerStorageValue(cid,11114,0)
end

--Check If In Arena
if getPlayerStorageValue(cid,11113) == 1 then

	--Remove arena death
	setPlayerStorageValue(cid,11113,0)
	--Heal them.
	doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
	doCreatureAddMana(cid, getCreatureMaxMana(cid))
	doRemoveConditions(cid, true)
	--Game in progress
	if getGlobalStorageValue(20008) == 1 then
	doCreatureSay(cid,"Back in the action!",TALKTYPE_ORANGE_1)
		--Teleport player to their spawn point
		if getPlayerStorageValue(cid,11112) == 1 then
			doTeleportThing(cid, spawnA, true)
		elseif getPlayerStorageValue(cid,11112) == 2 then
			doTeleportThing(cid, spawnB, true)
		end
	else
		doTeleportThing(cid,gameLobby,true)
	end
end

    if (InitArenaScript ~= 0) then
    InitArenaScript = 1

        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end

    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
        setPlayerStorageValue(cid, 42355, 0)
    end
    setPlayerStorageValue(cid, 42350, 0)
    setPlayerStorageValue(cid, 42352, 0) 	 registerCreatureEvent(cid, "KillPoints") registerCreatureEvent(cid, "VipCheck")      if(InitHistory == 0) then
        local historyPage = addEvent(historyPage, 60000, {})
        InitHistory = historyPage
    end
registerCreatureEvent(cid, "PlayerDeath") 
return true
end

function historyPage(parameters)
    local historyPage = addEvent(historyPage, 60000, {})
    if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then
        setGlobalStorageValue(23456, (tonumber(os.date("%d"))))
        db.query("UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;")
        db.query("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;")
    end
    db.query("UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;")
end

Edit:
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="1" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="4.0" attackspeed="700" soulmax="100" gainsoulticks="60" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
It turn to this vocation but it crashes the server when it does this... or freezes the window
 
it gave me this when i login:
[11:41:20.571] [Warning - Vocations::getVocation] Vocation 4294967295 not found

[11:41:20.571] [Warning - Vocations::getVocation] Vocation 4294967295 not found

[11:41:20.575] Jack Tha Ripper has logged in.
and it crashes when i atack the monster! only when i atack...
suddenly when i try doing somting in the Db and when i try to restart i got this error...
phpmyadmin:#1040 Cannot log in to the MySQL server

[11:43:54.511] Failed connecting to database - MYSQL ERROR: Too many connections
(1040)

[11:43:54.512] > ERROR: Couldn't estabilish connection to SQL database!
 
funny part is only when he atacks make the server crash... but when he just get's atack noting happens:S
when he logges in again i check the char with mc and i got this:
11:47 Your last visit was on Wed Dec 07 01:09:47 2011.
11:47 You see Jack Tha Ripper (Level 240). He is . He is Leader of the Target Lost.
Health: [3665 / 3665], Mana: [1195 / 1195].
IP: 94.254.42.145, Client: 860.
Position: [X: 32231] [Y: 32226] [Z: 10].
it only say he is . so they vocation is gone?
 
funny part is only when he atacks make the server crash... but when he just get's atack noting happens:S
when he logges in again i check the char with mc and i got this:
11:47 Your last visit was on Wed Dec 07 01:09:47 2011.
11:47 You see Jack Tha Ripper (Level 240). He is . He is Leader of the Target Lost.
Health: [3665 / 3665], Mana: [1195 / 1195].
IP: 94.254.42.145, Client: 860.
Position: [X: 32231] [Y: 32226] [Z: 10].
it only say he is . so they vocation is gone?

Yes, did you do what i told you?
 
i comment every one exept:
<event type="login" name="FirstItems" event="script" value="firstitems2.lua"/>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
<event type="think" name="Idle" event="script" value="idle.lua"/>
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>

still when he logges in he get's the vocation change
 
he got invalid promotion level
try
SQL:
Update `players` SET `promotion` = '1' WHERE `name` = 'Player_name_here';
SQL:
Update `players` SET `vocation` = '8' WHERE `name` = 'player_name_here';
 
his promotion is already 1
The firstitem2.lua is just gives item first time login noting with vocation...
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)		npcHandler:onCreatureSay(cid, type, msg)		end
function onThink()				npcHandler:onThink()					end

local node1 = keywordHandler:addKeyword({'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
--[[
local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
	node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
]]--

npcHandler:addModule(FocusModule:new())
 
Look in the most Scripts just from this String "4294967295"
takes like 10 mins but i think you will find the thing that is wrong.


i leave now out with me friend so cant do more now ^^
sorry but i hope this helps ^^
 
Back
Top