Sunku Posted July 27, 2011 Author Share Posted July 27, 2011 lets say your a warrior and you get to a certain level and you become a paladin how would i do that. Link to comment Share on other sites More sharing options...
erkro1 Posted July 27, 2011 Share Posted July 27, 2011 Play around with SetPlayerClass, GetPlayerClass and Getplayerlevel. ;) Link to comment Share on other sites More sharing options...
erkro1 Posted July 27, 2011 Share Posted July 27, 2011 Play around with SetPlayerClass, GetPlayerClass and Getplayerlevel. ;) Link to comment Share on other sites More sharing options...
Sunku Posted July 27, 2011 Author Share Posted July 27, 2011 @Erwin:> Play around with SetPlayerClass, GetPlayerClass and Getplayerlevel. ;)i was hopping if someone could tell me where those are.:p Link to comment Share on other sites More sharing options...
erkro1 Posted July 27, 2011 Share Posted July 27, 2011 That are functions, you can use them.```If player(index).level = 10 and getplayerclass(index) = [Class] ThenSetPlayerClass(index) [class]End If```**This is pseudo-code**If you would do it with more than one class I recommend using Select Case. ;) Link to comment Share on other sites More sharing options...
The New World Posted July 27, 2011 Share Posted July 27, 2011 ```Select Case GetPlayerClass(Index) Case 1, 3:      If GetPlayerLevel(Index) = 10 Then         SetPlayerClass(Index, 3)      Elseif GetPlayerLevel(Index) = 20          SetPlayerClass(Index, 5)      End If      End If Case 2, 4:      If GetPlayerLevel(Index) = 10 Then         SetPlayerClass(Index, 4)      Elseif GetPlayerLevel(Index) = 20          SetPlayerClass(Index, 6)      End If```Formatted via iPod Touch. Link to comment Share on other sites More sharing options...
Sunku Posted July 27, 2011 Author Share Posted July 27, 2011 @Rose:> ```> Select Case GetPlayerClass(Index)> > Â Case 1, 3:> Â Â Â Â Â Â If GetPlayerLevel(Index) = 10 Then> Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 3)> Â Â Â Â Â Â Elseif GetPlayerLevel(Index) = 20> Â Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 5)> Â Â Â Â Â Â End If> > Â Â Â Â Â Â End If> > Â Case 2, 4:> Â Â Â Â Â Â If GetPlayerLevel(Index) = 10 Then> Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 4)> Â Â Â Â Â Â Elseif GetPlayerLevel(Index) = 20> Â Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 6)> Â Â Â Â Â Â End If> > ```> Formatted via iPod Touch.thank you now how do i do this with out the other classes(example paladin) showing up?*EDIT* it doesn't work Link to comment Share on other sites More sharing options...
The New World Posted July 28, 2011 Share Posted July 28, 2011 Of course it doesn't work. For one you probably don't have 6 classes or MAX_CLASSES set to 6, and aside from that, the lack of scrolling on the iPod Touch left me without the ability to see the extra End If I included.Basically the code figures out the players class. If the Class is Class 1, which is the starting class, or Class 3 which is the advanced class for class one, then run the code within' that case, which is, if the characters level is 10, upgrade them to class 3, and if they're level is 20, upgrade them to class 5\. Same thing for the next case. If you don't understand this, try researching. Link to comment Share on other sites More sharing options...
Sunku Posted July 28, 2011 Author Share Posted July 28, 2011 @Rose:> Of course it doesn't work. For one you probably don't have 6 classes or MAX_CLASSES set to 6, and aside from that, the lack of scrolling on the iPod Touch left me without the ability to see the extra End If I included.> > Basically the code figures out the players class. If the Class is Class 1, which is the starting class, or Class 3 which is the advanced class for class one, then run the code within' that case, which is, if the characters level is 10, upgrade them to class 3, and if they're level is 20, upgrade them to class 5\. Same thing for the next case. If you don't understand this, try researching.oh i see whatcha mean thank you rose what would i be without you….don't answer that*edit*got this error after trying to compile>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/05ccf70e9abd04b9ac3ca88c96fa7c78.bmp) Link to comment Share on other sites More sharing options...
erkro1 Posted July 28, 2011 Share Posted July 28, 2011 Change the line to SetPlayerClass(index, [class num])Replace class numer with a class. Link to comment Share on other sites More sharing options...
The New World Posted July 28, 2011 Share Posted July 28, 2011 If you don't add the entire list of required parameters then you're doing nothing at all. With or without an error. Build off the code I gave you. Also, google and right click + definition are also very helpful. I use them everyday. Especially for navigation. x.x Link to comment Share on other sites More sharing options...
Tohob Posted July 29, 2011 Share Posted July 29, 2011 im an idiot, but it looks 2 me like what it does is automatically change your class once you reach the specified level? if so, that seems quite strange for an advanced class system, although it is a pretty simple way to do it o,o Link to comment Share on other sites More sharing options...
Sunku Posted July 29, 2011 Author Share Posted July 29, 2011 ok what i am trying to say is:>! I meant like class advancements but without having them in the classes you can select.so once you reach a certain level you become the next advancement. Link to comment Share on other sites More sharing options...
Tohob Posted July 29, 2011 Share Posted July 29, 2011 were you thinking of a solid line, like basic class > advanced, or did you want each class able to advance into multiple advanced ones? dont know how to word it well.. Link to comment Share on other sites More sharing options...
Beanie93 Posted July 29, 2011 Share Posted July 29, 2011 @Axis:> ok what i am trying to say is:> > >! I meant like class advancements but without having them in the classes you can select.> so once you reach a certain level you become the next advancement.http://www.touchofdeathforums.com/smf/index.php/topic,70427.0.htmlUse that textbox at the top-right of the site that says, "Search…". It's useful for everyone.And, for your information, we're not here to write the code for you. We're here to teach you how to do it. In your case, do what Erwin said; Mess with the GetPlayerClass, SetPlayerClass and GetPlayerLevel functions. Link to comment Share on other sites More sharing options...
Sunku Posted July 29, 2011 Author Share Posted July 29, 2011 @Beanie93:> http://www.touchofdeathforums.com/smf/index.php/topic,70427.0.html> Use that textbox at the top-right of the site that says, "Search…". It's useful for everyone.> And, for your information, we're not here to write the code for you. We're here to teach you how to do it. In your case, do what Erwin said; Mess with the GetPlayerClass, SetPlayerClass and GetPlayerLevel functions.ok also what i'm trying to do is make it where those locked classes are advancements from the chosen classes Link to comment Share on other sites More sharing options...
Beanie93 Posted July 29, 2011 Share Posted July 29, 2011 Use Select Case.Use Rose's code as a reference on how to:@Rose:> ```> Select Case GetPlayerClass(Index)> > Â Case 1, 3:> Â Â Â Â Â Â If GetPlayerLevel(Index) = 10 Then> Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 3)> Â Â Â Â Â Â Elseif GetPlayerLevel(Index) = 20> Â Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 5)> Â Â Â Â Â Â End If> > Â Â Â Â Â Â End If> > Â Case 2, 4:> Â Â Â Â Â Â If GetPlayerLevel(Index) = 10 Then> Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 4)> Â Â Â Â Â Â Elseif GetPlayerLevel(Index) = 20> Â Â Â Â Â Â Â Â Â Â SetPlayerClass(Index, 6)> Â Â Â Â Â Â End If> > ```> Formatted via iPod Touch. Link to comment Share on other sites More sharing options...
Sunku Posted July 29, 2011 Author Share Posted July 29, 2011 @Beanie93:> Use Select Case.> Use Rose's code as a reference on how to:i have several times i get nothing from it or what i make of it. Link to comment Share on other sites More sharing options...
Beanie93 Posted July 29, 2011 Share Posted July 29, 2011 I said use it as a reference, not copy-paste it and/or edit it.With this I mean, write the code yourself and use that code of Rose's as a reference on how to do it. Link to comment Share on other sites More sharing options...
Sunku Posted July 29, 2011 Author Share Posted July 29, 2011 @Beanie93:> I said use it as a reference, not copy-paste it and/or edit it.> With this I mean, write the code yourself and use that code of Rose's as a reference on how to do it.i know what you meant i studied the code carefully and i tried making cases to make the classes go to different classes and evreything nothing worked Link to comment Share on other sites More sharing options...
Beanie93 Posted July 29, 2011 Share Posted July 29, 2011 Give me the code you have written, then. I'll take a look. Link to comment Share on other sites More sharing options...
Sunku Posted July 29, 2011 Author Share Posted July 29, 2011 @Beanie93:> Give me the code you have written, then. I'll take a look.well i did that the first time rose gave me the code and i dind't write it down let me look at it again and see if i remember cuz i have bad memory O.o Link to comment Share on other sites More sharing options...
Beanie93 Posted July 29, 2011 Share Posted July 29, 2011 Alright.Basicly, you need to check if the player has reached a certain level, so, let's say.Warrior advances at Level 12\. You'll need to check that if your Warrior's level is 12, it advances it's class to Paladin. As I said, you need to mess with GetPlayerClass, SetPlayerClass and GetPlayerLevel. Link to comment Share on other sites More sharing options...
Sunku Posted July 29, 2011 Author Share Posted July 29, 2011 @Beanie93:> Alright.> Basicly, you need to check if the player has reached a certain level, so, let's say.> Warrior advances at Level 12\. You'll need to check that if your Warrior's level is 12, it advances it's class to Paladin. As I said, you need to mess with GetPlayerClass, SetPlayerClass and GetPlayerLevel.oh i left the set player class out of it derp.*Edit*the code i am using works fine ok thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now