Hey everyone in this tutorial i’ll be showing you how to make a global shop or world shop whatever you wanna call it like the one in Eclipse Renewal.
lets start off with the server.
Go to modEnumerations and add
go to modhandledata and in the list add
HandleDataSub(CClientOpenShop) = GetAddress(AddressOf HandleClientOpenShop)
stick this at the bottom of modhandledata
Private Sub HandleClientOpenShop(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer as clsbuffer Dim i as long Set Buffer = new Clsbuffer Buffer.WriteBytes Data() i = buffer.readlong Call SendOpenShop(Index, i) TempPlayer(index).InShop = i Set buffer = nothing End Sub
should be it for the server save and compile
now for the client
Go to **modEnumerations **add
Next go to modclienttcp and at the bottom add
Sub ClientOpenShop(Byval ShopNum as long) Dim buffer as clsbuffer InShop = ShopNum Set buffer = new Clsbuffer Buffer.WriteLong CClientOpenShop Buffer.Writelong ShopNum SendData Buffer.Toarray() Set buffer = Nothing End Sub
Now make a button somewhere on frmMain
and click it and put there
(1) = shop number that you want to be the world shop
Save and compile
Now on button click shop will open
let me know if i forgot anything and enjoy.