Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] World Shop (or global shop)


Officer Johnson
 Share

Recommended Posts

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 

```
CClientOpenShop

```
then 

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 

```
CClientOpenShop

```
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.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...