[edit by Lea] This tutorial works in MSE2 and below. If using a newer version, please view the updated tutorial at the link below. On page three of this thread, the discussion switches! Thanks! http://www.valkoria.com/CharCreateSprit ... SE3_50.pdfAuthor: grimsk8ter11
Difficulty: 2/5
:: SERVER SIDE ::In modServerTCP, replace all of SendNewCharClasses with:
Code:
Sub SendNewCharClasses(ByVal Index As Long)
Dim Packet As String
Dim i As Long
Packet = "NEWCHARCLASSES" & SEP_CHAR & Max_Classes & SEP_CHAR
For i = 0 To Max_Classes
Packet = Packet & GetClassName(i) & SEP_CHAR & GetClassMaxHP(i) & SEP_CHAR & GetClassMaxMP(i) & SEP_CHAR & GetClassMaxSP(i) & SEP_CHAR & Class(i).STR & SEP_CHAR & Class(i).DEF & SEP_CHAR & Class(i).SPEED & SEP_CHAR & Class(i).MAGI & SEP_CHAR & Class(i).Sprite & SEP_CHAR
Next i
Packet = Packet & END_CHAR
Call SendDataTo(Index, Packet)
End Sub
:: CLIENT SIDE ::In frmNewChar, make 2 picture boxes, name them: picpic and picSprite.
picpic Properties:
Code:
Size 32x32
border style = none
appearance = flat
picSprites Properties:
Code:
Size 32x32
border style = none
appearance = flat
visible = false
auto redraw = true
auto resize = true
Make a timer named Timer. Give it the properties:
Code:
enabled = true
interval = 50
Timer Code:
Code:
On Error Resume Next
If optMale.Value = True Then
Call BitBlt(picpic.hDC, 0, 0, PIC_X, PIC_Y, picSprites.hDC, 0, Int(Class(cmbClass.ListIndex).Sprite) * PIC_Y, SRCCOPY)
Else
Call BitBlt(picpic.hDC, 0, 0, PIC_X, PIC_Y, picSprites.hDC, 0, Int(Class(cmbClass.ListIndex).Sprite) * PIC_Y, SRCCOPY)
End If
Finally, add a Form_Load sub for the form and put the following inside of it:
Code:
picSprites.Picture = LoadPicture(App.Path & "\sprites.bmp")
In modHandleData, find:
Code:
"newcharclasses"
Replace from:
Code:
n = n + 1
Down to:
Code:
Next i
With:
Code:
n = n + 1
For i = 0 To Max_Classes
Class(i).Name = Parse(n)
Class(i).HP = Val(Parse(n + 1))
Class(i).MP = Val(Parse(n + 2))
Class(i).SP = Val(Parse(n + 3))
Class(i).Str = Val(Parse(n + 4))
Class(i).DEF = Val(Parse(n + 5))
Class(i).SPEED = Val(Parse(n + 6))
Class(i).MAGI = Val(Parse(n + 7))
Class(i).Sprite = Val(Parse(n + 8))
n = n + 9
Next i
That's all!