14-09-2008, 07:28 PM
I hope this is alright...Sense I like this tutorial, and it's useful for lots of people, I want to update it for the MS4 version. I already have tested it out and everything. And yes, I know it's simple to change and make it work for MS4. Anyway...
::Client Side::
First add this in modGameLogic under the Commands section.
Then in ModClientTCP add this at the bottom.
Then in modEnumerations add this under "Public Enum ClientPackets"
::Server Side::
Now in modHandleData above the "Request edit map packet" add this.
Then in modEnumerations under "Public Enum ClientPackets" add this.
All done.
::Client Side::
First add this in modGameLogic under the Commands section.
Code:
' Save
If LCase(Mid(frmMirage.txtMyChat, 1, 5)) = "/save" Then
Call SaveplayerData
frmMirage.txtMyChat = ""
Exit Sub
End If
Then in ModClientTCP add this at the bottom.
Code:
Sub SaveplayerData()
Dim Packet As String
Packet = CSaveplayerData & END_CHAR
Call SendData(Packet)
End Sub
Then in modEnumerations add this under "Public Enum ClientPackets"
Code:
CSaveplayerData
::Server Side::
Now in modHandleData above the "Request edit map packet" add this.
Code:
' ::::::::::::::::::::::::
' :: Save Player Packet ::
' ::::::::::::::::::::::::
Case CSaveplayerData
If Map(GetPlayerMap(Index)).Moral = MAP_MORAL_SAFE Then
Call SavePlayer(Index)
Call PlayerMsg(Index, "Character Stats & Inventory Saved", Yellow)
Else
Call PlayerMsg(Index, "You must be in a town or house to save!", Yellow)
End If
Exit Sub
Then in modEnumerations under "Public Enum ClientPackets" add this.
Code:
CSaveplayerData
All done.