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

Help on Classes here…..


Guest
 Share

Recommended Posts

Ok in my game Pocket Monsters Plus i waant all 493+ pokemon to be playable/unlockable.
At first i was going to make the main 17 classes the pokemon types (fire,water, etc.) and make all the poekmon mere sprite changes. :/

Then i noticed how gay that was and now i am planning on making each pokemon a seperate class. That way they will all have the stats, abilities etc. they have in the other games. The only problem with that is having 493 classes  :huh:
Will that lag down my game at all???

Another problem im having is the Pokemon's evolutions. My first idea was to make the evolved classes locked. And then have someone here on the forums cook up a script that changes the Pokemon's class once it has reached a certan level. :renzo:
Link to comment
Share on other sites

To make the class locked, go into your Server folder and open up the Class folder. In there, it should have a list of classes that you've made. Open up the file of the classes you want to be locked and change the "Locked=0" to "Locked=1."

As for the evolutions, you can try something like this:

```
If GetPlayerClass(Index) = 0* and GetPlayerLevel(Index) = (50) Then
Call SetPlayerClass(Index, 1*)
Call SetPlayerSprite(Index, 1*)
Call SendPlayerData(Index)
End If
```
EDIT: Why don't colors work for me?

Anyway, the numbers in with the *'s next to them are the class numbers. Change those to whatever works with your game. Let's say your class 5 is Pikachu and your class 18 is Raichu. In the IF statement, the "0" would be changed to a "5." Also, in the **Call SetPlayerClass** statement, the "1" would be changed to an "18", since that is what you want the person to evolve into.

The number in parenthesis, "50," is the level you want the pokemon to evolve at. Change that to whatever you want.
Link to comment
Share on other sites

You can simply put it in Sub PlayerLevelUp(Index), just before the End Sub, at the very end. ^^

Also, you could post your topic in the Questions forum next time. =P That way, you might get an answer more quickly AND your posts would count towards your total. ^^
Link to comment
Share on other sites

Go to your Server folder and look for the folder labeled "Scripts." In it, there should be something called "Main." Open it up. Now, you should see a bunch of code. Look or search for this using CTRL + F:

```
Sub PlayerLevelUp(Index)
```
Once you've found it, look at it as a whole. It should be like this by default:

```
' Executes when a players experience exceeds the next level requirement.
Sub PlayerLevelUp(Index)
Dim TotalExp

Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index)
TotalExp = GetPlayerExp(Index) - GetPlayerNextLevel(Index)
Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1)

Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1)
Call SetPlayerExp(Index, TotalExp)
Loop

Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, 0)
End Sub
```
Simply add my code before the **End Sub** statement, so it should end up being like this:

```
' Executes when a players experience exceeds the next level requirement.
Sub PlayerLevelUp(Index)
Dim TotalExp

Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index)
TotalExp = GetPlayerExp(Index) - GetPlayerNextLevel(Index)
Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1)

Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1)
Call SetPlayerExp(Index, TotalExp)
Loop

Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, 0)

' Evolves pokemon

If GetPlayerClass(Index) = 0 and GetPlayerLevel(Index) = 50 Then
Call SetPlayerClass(Index, 1)
Call SetPlayerSprite(Index, 1)
Call SendPlayerData(Index)
End If

End Sub
```
Of course, you'd need to make the necessary changes to the code. I explained this in my first post.
Link to comment
Share on other sites

remember, ur sprite won't change with your class unless you make it so add this
Call SetPlayerSprite(Index, Sprite)
after call setplayerclass and then u need to ad a sendplayerdata, so the whole script should look like this:
```
If GetPlayerClass(Index) = 0* and GetPlayerLevel(Index) = (50) Then
Call SetPlayerClass(Index, 1*)
Call SetPlayerSprite(Index, 1*)
Call SendPlayerData(index)
ElseIf GetPlayerClass(Index) = 0* and GetPlayerLevel(Index) = (50) Then
Call SetPlayerClass(Index, 1*)
Call SetPlayerSprite(Index, 1*)
Call SendPlayerData(index)
End If

```This is what you would replace Sub PlayerLevelUp(index) with
```
' Executes when a players experience exceeds the next level requirement.
Sub PlayerLevelUp(Index)
If GetPlayerClass(Index) = 0* and GetPlayerLevel(Index) = (50) Then
Call SetPlayerClass(Index, 1*)
Call SetPlayerSprite(Index, 1*)
Call SendPlayerData(index)
ElseIf GetPlayerClass(Index) = 0* and GetPlayerLevel(Index) = (50) Then
Call SetPlayerClass(Index, 1*)
Call SetPlayerSprite(Index, 1*)
Call SendPlayerData(index)
End If
Dim TotalExp

Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index)
TotalExp = GetPlayerExp(Index) - GetPlayerNextLevel(Index)
Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1)

Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 20)
Call SetPlayerExp(Index, TotalExp)
Loop

Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, 0)
End Sub

```(this is untested, but it has the General Idea for it)
EDIT: Darn, beat to it…
Link to comment
Share on other sites

Yeah, it would get a little very code-heavy, but it would work.

Here's a workaround, however, which works if you allow every Pokemon to evolve at the same levels - every basic pokemon evolves to stage 1 at level 35 and then at level 70, for example.

```
' Executes when a players experience exceeds the next level requirement.
Sub PlayerLevelUp(Index)
Dim TotalExp
Dim Levels

Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index)
TotalExp = GetPlayerExp(Index) - GetPlayerNextLevel(Index)
Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1)
Levels = Levels + 1
Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1)
Call SetPlayerExp(Index, TotalExp)
Loop
If Levels = 1 Then
Call MapMsg(GetPlayerMap(Index), GetPlayerName(Index) & " has gained a level!", 0)
Else
    Call MapMsg(GetPlayerMap(Index), GetPlayerName(Index) & " has just won " & Levels & " levels!", 0)
End If
Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, 0)

'Pokemon Evolution Script by Roujo ^_^
Dim Level
Dim PokeNum

Level = GetPlayerLevel(index)
PokeNum = GetPlayerClass(index)

Select Case Level
Case 35
Select Case PokeNum
Case 1
Call SetPlayerClass(index, 2) 'Because Bulbasaur evolves into Ivysaur
Call SetPlayerSprite(index, 2) 'This implies that your sprite sheet fits Pokemon Numbers =P
Case 4
Call SetPlayerClass(index, 5) 'Because Charmander evolved into Charmeleon
Call SetPlayerSprite(index, 5)
Case 7
... //And so on and so forth 'till
Case 459
Call SetPlayerClass(index, 460) 'Snover to Abomasnow, last know Pokemon to evolve.
Call SetPlayerSprite(index, 460)
End Select
Call SendPlayerData(index)
If GetPlayerClass(index) != PokeNum Then
Call PlayerMsg(index, "You have evolved into " & GetPlayerClassName(index) & "!", 9)
End If
Case 70
Select Case PokeNum
Case 2
Call SetPlayerClass(index, 3) 'Ivysaur to Venosaur
Call SetPlayerSprite(index, 3)
Case 5
Call SetPlayerClass(index, 6) 'Charmeleon to Charizard
Call SetPlayerSprite(index, 6)
Case 8
... //And so on and so forth 'till
Case 444
Call SetPlayerClass(index, 445) 'Garbite to Garchomp, last know Pokemon to evolve to Stage 2.
Call SetPlayerSprite(index, 445)
End Select
Call SendPlayerData(index)
If GetPlayerClass(index) != PokeNum Then
Call PlayerMsg(index, "You have evolved into " & GetPlayerClassName(index) & "!", 9)
End If
Case 100
Call PlayerMsg(index, "Congratulations!", 9)
Call GlobalMsg("Player " & GetPlayerName(index) & " has reached Level 100!", 9)
End Select
'End of Pokemon Evolution Script by Roujo
End Sub

```
It's been a while since I've played Pokemon, but I found the info in on [this website](http://bulbapedia.bulbagarden.net/wiki/List_of_Pokémon_by_evolution_family).

I even added an Evolution Message, plus a special Level 100 message. =P
Use them if you want to! ^^

Anyway, I hope this helps! =)
Roujo

EDIT: Changed the comment marks from // to '  –- It has been a while since I've played with SadScript XD
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...