Page 1 of 1

Detecting classes

Posted: Sat Nov 10, 2012 4:45 pm
by Cindy
Hi, I am trying to write some code that determines all three class types of the character, (and makes decisions about daily turn-ins based on that).

I am at the house maid, i can store player.Class1 and player.Class2 in variables, but I don't know how to get the third class so that I can do

ExchangeClass(EXCHANGECLASS_MAINCLASS, EXCHANGECLASS_SUBCLASS);

with my algorithmic choice of the two arguments.

Any ideas?

Re: Detecting classes

Posted: Sat Nov 10, 2012 6:23 pm
by lisa
did you try player.Class3 ?

Re: Detecting classes

Posted: Wed Nov 21, 2012 11:52 am
by Cindy

Code: Select all

				ChoiceOptionByName("I want to switch my primary and secondary class.")				
				RoMScript("ExchangeClass(player.Class3, player.Class2); --EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");
				player:sleep();
failed to change class...

Re: Detecting classes

Posted: Wed Nov 21, 2012 12:13 pm
by rock5
According to this post
http://www.solarstrike.net/phpBB3/viewt ... 428#p40428
you have to add 1 to the value. Also when using variables in RoMScript you have to do it a certain way. This should work.

Code: Select all

RoMScript("ExchangeClass("..(player.Class3+1)..","..(player.Class2+1)..")");

Re: Detecting classes

Posted: Wed Nov 21, 2012 12:26 pm
by Cindy
Great thanks. I was missing the inner quotations in my most recent evolution. :)