15-03-2008, 12:19 AM
This will add a scroll bar to control the frequency of npc movement. This was only tested on MSE1.
Difficulty: 1/5
::Server Side::
modGeneral
Sub GameAi Search for
Replace with
modTypes
NpcRec add:
modDatabase
Sub LoadNpcs add:
Sub SaveNpc add:
modServerTcp
sub SendEditNpcTo add and the end of the packet
modHandleData
find "savenpc" add
::Client Side::
modHandleData
find "updatenpc" add
find "editnpc" add
modTypes
find NpcRec add
modGameLogic
Sub NpcEditorInit add
sub NpcEditorOk add
modClientTCP
sub sendsavenpc Add to the end of the packet
Add a scroll bar in frmNpcEditor for the movement
Add a label for displaying the movement number
Add
If there any errors please let me know.
Difficulty: 1/5
::Server Side::
modGeneral
Sub GameAi Search for
Code:
i = Int(Rnd * 5)
Code:
i = Int(Rnd * Npc(NpcNum).Movement) + 1
modTypes
NpcRec add:
Code:
Movement As Byte
modDatabase
Sub LoadNpcs add:
Code:
Npc(i).Movement = Val(GetVar(FileName, "NPC" & i, "Movement"))
Sub SaveNpc add:
Code:
Call PutVar(FileName, "NPC" & NpcNum, "Movement", Trim$(Npc(NpcNum).Movement))
modServerTcp
sub SendEditNpcTo add and the end of the packet
Code:
Npc(NpcNum).Movement
modHandleData
find "savenpc" add
Code:
Npc(N).Movement = Val(Parse$(15))
::Client Side::
modHandleData
find "updatenpc" add
Code:
Npc(n).Movement = 0
find "editnpc" add
Code:
Npc(n).Movement = Val(Parse$(15))
modTypes
find NpcRec add
Code:
Movement as Byte
modGameLogic
Sub NpcEditorInit add
Code:
frmNpcEditor.scrlMovement.Value = Npc(EditorIndex).Movement
sub NpcEditorOk add
Code:
Npc(EditorIndex).Movement = frmNpcEditor.scrlMovement.Value
modClientTCP
sub sendsavenpc Add to the end of the packet
Code:
.Movement
Add a scroll bar in frmNpcEditor for the movement
Add a label for displaying the movement number
Add
Code:
Private Sub scrlMovement_Change()
lblMovement.Caption = (scrlMovement.Value)
End Sub
If there any errors please let me know.