[EO] World Shop (or global shop)

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

Call ClientOpenShop(1)

(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.

what does a world shop do if you don’t mind me asking.

world shop is like in games that have one big shop with all the big items in all this does is make it you make a shop button and it opens the shop.

Oh I see now, that’s neat.

If it’s one standard global shop, maybe the client shouldn’t be telling the server which shop it wants to open.

I cant remember the exact code but I usually make a button on frmMain and put this in the click event

'Change number to shop number
Call Openshop(1)

This way is much easier.

hey, Nice! this like a cash shop in games ~

really good.

Log in to reply