I'm making a custom job system, and its going good, I made 90% of the code fine, but I'm having problems thinking of a way to do this, Basically, When you join the game, if your level one, no experience, a picturebox pops up asking what job you want, nothing to serious, just a part of your title, Example, NAME: Xolor JOB: Blacksmith etc.. now, I'm going to have about 4 or five options on the picbox, when I choose one and hit OK it saves me as that, heres my server packet and my client one.. What I need help understanding and with is if I choose option 1 then the packet makes me Job #1 if I pick Option 2 then the packet makes me job #2 etc...
ClientCode:
Sub SendSetJob(ByVal Name As String, ByVal Job As Byte)
Dim Packet As String
Packet = "SETJOB" & SEP_CHAR & Name & SEP_CHAR & Job & SEP_CHAR & END_CHAR
Call SendData(Packet)
End Sub
Server in Handle dataCode:
' :::::::::::::::::::::::
' :: Set Race Job ::
' :::::::::::::::::::::::
If LCase(Parse(0)) = "setjob" Then
' The index
n = FindPlayer(Parse(1))
' The race
i = Val(Parse(2))
If i >= 0 Or i <= 3 Then
' Check if player is online
If n > 0 Then
Call GlobalMsg(GetPlayerName(n) & " become a new & getplayerjob(n).", BrightBlue)
Call SetPlayerJob(n, i)
Call SendPlayerData(n)
Else
Call PlayerMsg(Index, "Player is not online.", White)
End If
Exit Sub
End If