Checking Secondary Class level

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Checking Secondary Class level

#1 Post by imaginethat »

I am hoping this is a simple question/answer, but am also keen to know where the answer comes from so I don't have to ask easy questions and can get them myself without wasting other peoples time.

How do I check what my secondary class level is?
I can check player.level to find primary class level and move on to bigger mobs if at a certain level, but would like to check if secondary class level is also ready to move on, or should my character swap classes and continue in this area before moving on. Does that make sense?
Doing the actual class swap is discussed in the forums, and in the 1-10 xml docs, so no issue there, just the identifying of the secondary class level is the bit Im missing.

Where can I find out all the syntax around functions and what options there player.class player.level player.??? etc etc

thanks in advance
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Checking Secondary Class level

#2 Post by lisa »

player.Class2

If you have a look in rom/classes/pawn.lua from line 55-154 is a list of all the data you can get from a (pawn) which is basically any player or mob.

line 63 has
self.Class2 = CLASS_NONE;

so player.Class2 is your characters second class, something to keep in mind is that the class may be returned as a number, if you look at lines 11-19 in same file it says what the numbers mean.

So let's say you wanted to do something if your second class is druid.

Code: Select all

if player.Class2 == 8 then
printf("My second class is druid.\n")
end
This will print in the MM window that your second class is druid, if it is of course.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Re: Checking Secondary Class level

#3 Post by imaginethat »

Thanks for the prompt reply, and directing me to the pawn.lua file, thought I had looked though most files, but obviously missed that one.

I have not tried it (at work atm), but not quite sure this is going to give me the level of my secondary class, just the name (or number) or it.

How do I then convert this to the level on the secondary class?

cheers
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Checking Secondary Class level

#4 Post by lisa »

Ahh yep sorry, level is this

Code: Select all

player.Level2
line 66 of same file ;)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Re: Checking Secondary Class level

#5 Post by imaginethat »

many thanks for the speedy replies, very much appreciated. Will use it tonight.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Checking Secondary Class level

#6 Post by rock5 »

Also, I'm pretty sure, with the latest updates I've made to the bot, you should be able to just change class without having to reload the profile or anything. It should switch to your other classes skill set, from your profile automatically, as soon as it does a player:update().
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Post Reply