Chojiros Blog

June 06, 2006

Class/LvLWarp + ClassAdvancement.

Be careful not to take out )s and "s in these scripts =)
The PlayerWarps are for warping to another area another area...If you don't want different classes or levels to be warped away, remove all PlayerWarps after the first "ElseIf"
These do work!


'LEVELWARP

Select Case GetPlayerMap(index)
Case [Map]:
If GetPlayerX(Index) = [X] And GetPlayerY(Index) = [Y] Then
If GetPlayerLevel(index) = [LvL] Then
Call PlayerWarp(Index,[Map],[X],[Y])
Call PlayerMsg(index, "You have been warped...",12)
ElseIf GetPlayerClass(index) <> [Class] Then
Call PlayerMsg(index, "You must be level _ or higher to enter this area!", 4)
Call PlayerWarp(Index,[Map],[X],[Y])
End If
End If
End Select


'CLASSWARP.

Select Case GetPlayerMap(index)
Case [Map]:
If GetPlayerX(Index) = [X] And GetPlayerY(Index) = [Y] Then
If GetPlayerClass(index) = [Class] Then
Call PlayerWarp(Index,[Map],[X],[Y])
Call PlayerMsg(index, "You have been warped...",12)
ElseIf GetPlayerClass(index) <> [Class] Then
Call PlayerMsg(index, "Only _____s can enter this area!", 4)
Call PlayerWarp(Index,[Map],[X],[Y])
End If
End If
End Select


'If you want to remove points upon class change, remove the CallSetPlayerPoints line.
'CLASSADVANCEMENT

Select Case GetPlayerMap(index)
Case [Map]:
If GetPlayerX(Index) = [X] And GetPlayerY(Index) = [Y] Then
If GetPlayerClass(index) = [Class] Then
If GetPlayerLevel(Index) = [LvL] Then
Call PlayerWarp(Index,[Map],[X],[Y])
Call PlayerMsg(index, "Congratulations!! You are now an ______!!", 12)
Call PlayerMsg(Index, "You have gained __ stat points!!", 12)
Call GlobalMsg("Congratulations!! " & GetPlayerName & " is now an ______!!", 10)
Call SetPlayerClass(Index, [Class])
Call SetPlayerPoints(Index, GetPlayerPoints(Index) + [PointIncrease])
Call SetPlayerSprite(Index, [Sprite])
ElseIf GetPlayerClass(index) <> [Class] Then
Call PlayerMsg(index, "Only ______ can advance to ______!", 4)
Call PlayerWarp(Index,[Map],[X],[Y])
ElseIf GetPlayerLevel(Index) < [LvL] Then
Call PlayerMsg(Index, "You must be level _ or higher in order to advance!", 4)
Call PlayerWarp(Index,[Map],[X],[Y])
End If
End If
End If
End Select

0 Comments:

Post a Comment

<< Home