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

getVocation() TFS 1.2 Doubot

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi, I didn't understand a function in TFS 1.2, just wanna know how this function works, if check promotion too or not.

Code:
player:getVocation():getBase():getId() == 1

Thanks.

btw, is doubt not doubot, XDDD
 
In your code, underneath the following:
Code:
player:getVocation():getBase():getId() == 1

add:
Code:
print(
"getVocation() = " .. player:getVocation() .. "\n" ..
"getVocation():getBase() = " .. player:getVocation:getBase() .."\n" ..
"getVocation():getBase():getId() = " .. player:getVocation:getBase():getId()
)

Trigger the code in your game and see what it printed in the console window.
This should give you a little bit of insight into what data it returns.

To answer your question; yes it does check for promotions.
getVocation():getBase():getId() would return 1 for a Sorcerer or 5 for a Master Sorcerer.
 
Last edited:
Back
Top