Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Advanced Classes


Sunku
 Share

Recommended Posts

That are functions, you can use them.
```
If player(index).level = 10 and getplayerclass(index) = [Class] Then
SetPlayerClass(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

```
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

@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

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

@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

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

@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.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.
Link to comment
Share on other sites

@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

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

@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

@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

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

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...