First add s scrollbars to your frmNpcEditor, and rename them scrlExp and scrlHp. Make sure you keep the lblStartHp
and lblExpGiven, and set them next to your scrollbars to show you the value. Make sure you set the minimum value at 1.
Next in frmNpcEditor find these 3 subs
Code:
Private Sub scrlStrength_Change()
lblStrength.Caption = CStr(scrlStrength.Value)
lblStartHP.Caption = CStr(scrlStrength.Value * scrlDefense.Value)
lblExpGiven.Caption = CStr(scrlStrength.Value * scrlDefense.Value * 2)
End Sub
Private Sub scrlDefense_Change()
lblDefense.Caption = CStr(scrlDefense.Value)
lblStartHP.Caption = CStr(scrlStrength.Value * scrlDefense.Value)
lblExpGiven.Caption = CStr(scrlStrength.Value * scrlDefense.Value * 2)
End Sub
Private Sub scrlSpeed_Change()
lblSpeed.Caption = CStr(scrlSpeed.Value)
lblExpGiven.Caption = CStr(scrlStrength.Value * scrlDefense.Value * 2)
End Sub
And Replace with
Code:
Private Sub scrlStrength_Change()
lblStrength.Caption = CStr(scrlStrength.Value)
End Sub
Private Sub scrlDefense_Change()
lblDefense.Caption = CStr(scrlDefense.Value)
End Sub
Private Sub scrlSpeed_Change()
lblSpeed.Caption = CStr(scrlSpeed.Value)
End Sub
Next add these 2 subs to your frmNpcEditor
Code:
Private Sub scrlExp_Change()
lblExpGiven.Caption = scrlExp.Value
End Sub
Private Sub scrlHp_Change()
lblStartHP.Caption = scrlHp.Value
End Sub
In Sub NpcEditor, underneath
Code:
frmNpcEditor.scrlMagic.Value = Npc(EditorIndex).Stat(Stats.Magic)
Add
Code:
frmNpcEditor.scrlExp.Value = Npc(EditorIndex).Exp
frmNpcEditor.scrlHp.Value = Npc(EditorIndex).Hp
Now in Sub NpcEditorOK beneath
Code:
Npc(EditorIndex).Stat(Stats.Magic) = frmNpcEditor.scrlMagic.Value
add
Code:
Npc(EditorIndex).Exp = frmNpcEditor.scrlExp.Value
Npc(EditorIndex).Hp(Stats.Magic) = frmNpcEditor.scrlHp.Value
Now in sub HandleUpdateNpc, beneath
Code:
Npc(n).Stat(Stats.Magic) = 0
add
Code:
Npc(n).Exp = 0
Npc(n).Hp = 0
Now in Sub HandleEditNpc, underneath
Code:
Npc(n).Stat(Stats.Magic) = CByte(Parse(14))
add
Code:
Npc(n).Exp = CInt(Parse(15))
Npc(n).Hp = CInt(Parse(16))
Now in Type NpcRec, add
Code:
Hp as integer
Exp as Integer
Now in sub SendSaveNpc before
Code:
& END_CHAR
add
Code:
& SEP_CHAR & .Exp & SEP_CHAR & .Hp
Now we are done Client Side. Now for SERVER side.
In Sub HandleSaveNpc add in
Code:
Npc(n).Exp = Val(Parse(15))
Npc(n).Hp = Val(Parse(16))
In Sub SendEditNpcTo add
Code:
& SEP_CHAR & Npc(NpcNum).Exp & SEP_CHAR & Npc(NpcNum).Hp
Now in Type NpcRec, add
Code:
Hp as integer
Exp as Integer