• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

New vocation if i get X reborns

vexler222

Active Member
Joined
Apr 22, 2012
Messages
714
Solutions
15
Reaction score
47
Hello, i have problem with this script, its work with level but i try change it to reborns and not work ';/

Code:
function onAdvance(cid, skill, oldLevel, newLevel)

            function getPlayerResets(name)
           return db.getResult("SELECT resets FROM players WHERE name="..db.escapeString(name)..""):getDataInt("resets")
            end
       
    if getPlayerResets(getPlayerName(cid)) >= 10 and getPlayerVocation(cid) == 6 then
        if getPlayerStorageValue(cid, 11806) == -1 then
            doPlayerSetVocation(cid, 10)
            doPlayerSetStorageValue(cid, 11806, 1)
        end
    end
    return true
end
 
Does the player even reach that point inside the code? Since you got 3 checks inside, if the player has greater-than-or-equal-to 10 resets and if the player current vocation is equal to 6.

Then also you check if the player has not received the storage id 11806.

You can either put some print statments and check how far the script gets executed. Also i do not recommend to get resets through the database, just use storage and store it there.

Also do not forgot to post tfs version.
 
Does the player even reach that point inside the code? Since you got 3 checks inside, if the player has greater-than-or-equal-to 10 resets and if the player current vocation is equal to 6.

Then also you check if the player has not received the storage id 11806.

You can either put some print statments and check how far the script gets executed. Also i do not recommend to get resets through the database, just use storage and store it there.

Also do not forgot to post tfs version.

So where i can get storage reborn system? Now i use it CreatureEvent - [MOD] Reset/Reborn system + highscore V2.0
 
Back
Top