Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hotel Map Moral
#1
Hotel Map Moral

Very fun and easy

CLIENT SIDE:

modGameLogic, under:

Code:
' Party request

add:

Code:
' Map inn If LCase(Mid(MyText, 1, 10)) = "/sleep" Then Call SendInnSleep MyText = "" Exit Sub End If


in modClientTCP, under :
Code:
Sub SendJoinParty()

add, this sub:

Code:
Sub SendInnSleep()
Dim Packet As String
Packet = "INNSLEEP" & SEP_CHAR & END_CHAR
Call SendData(Packet)
End Sub



In frmMapProperties add to the list of cmbMoral a new line and type on it "Inn"

SERVER SIDE:


In modHandleData, under:

Code:
' :: Respawn map packet ::


add:

Code:
' ::::::::::::::::::::::::::
' :: Sleep Request packet ::
' ::::::::::::::::::::::::::
If LCase(Parse(0)) = "innsleep" Then
If Map(GetPlayerMap(Index)).Moral = MAP_MORAL_INN Then
Call TakeItem(Index, 1, 100) 'Change the valeu from 1(ItemNum) for the # you want and 100(GetValue) from the # you want
Call SetPlayerHP(Index, GetPlayerMaxHP(Index))
Call SetPlayerMP(Index, GetPlayerMaxMP(Index))
Call SetPlayerSP(Index, GetPlayerMaxSP(Index))
Call SendHP(Index)
Call SendMP(Index)
Call SendSP(Index)
Call PlayerMsg(Index, "You sleep...", White)
Else
Call PlayerMsg(Index, "You cant sleep here...", White)
End If
Exit Sub
End If

Done!

Can some 1 post an add to this, that if inn is selected on cmdMoral in frmMapProperties it apears 2 txtboxes and on it you type the item and the value that you wana get?

Server and client, in modConstants

unde:

Code:
Public Const MAP_MORAL_SAFE = 1

add:

Code:
Public Const MAP_MORAL_INN = 2



NOTE FROM GRIM:
REMIND EM LATER TO ADD THE UPDATE REQUESTED IN THIS TUT
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)