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

Class changing by rep


jedboy10
 Share

Recommended Posts

i was wondering if there was a way to make a script kind of like the heaven/hell script on the forums. ecept when the player reaches a certain level he turns into either a good or evil class such a going from wizard to mage/necromancer. anyone know if this is possible?
Link to comment
Share on other sites

No. What I'm saying is that you need a reputation system in place. If you have that, whoever scripted it should be able to accommodate the needed checks upon leveling. It's just a matter of checking a variable, but the variable needs to exist.

For the sake of clarity, which script are you even referencing? I'll write something up for you if I know what you need.
Link to comment
Share on other sites

```
If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Reputation") >= SOME_NUMBER Then
    Call SetPlayerClass(Index, ClassnumberHere)
    Call PlayerMsg(Index, "You are now CLASSNAME", 9)
End if
```
A quick swap of the rep variable with what Evil did gives you this. It's pretty straightforward. Mess around with it.
Link to comment
Share on other sites

```
PlayerRep = GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Reputation")
If PlayerRep <> "" Then
If CInt(PlayerRep) >= SOME_NUMBER Then
    Call SetPlayerClass(Index, ClassnumberHere)
    Call PlayerMsg(Index, "You are now CLASSNAME", 9)
End If
Else
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Reputation", 0)
End If

```
Add PutVar if the player didn't have the rep variable at all to prevent errors.
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...