Officer Johnson Posted October 22, 2014 Author Share Posted October 22, 2014 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 clsbufferDim i as longSet Buffer = new ClsbufferBuffer.WriteBytes Data()i = buffer.readlongCall SendOpenShop(Index, i)TempPlayer(index).InShop = iSet buffer = nothingEnd Sub```should be it for the server save and compilenow for the clientGo to **modEnumerations **add ```CClientOpenShop```Next go to **modclienttcp** and at the bottom add```Sub ClientOpenShop(Byval ShopNum as long)Dim buffer as clsbufferInShop = ShopNumSet buffer = new ClsbufferBuffer.WriteLong CClientOpenShopBuffer.Writelong ShopNumSendData Buffer.Toarray()Set buffer = NothingEnd 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 shopSave and compileNow on button click shop will open :)let me know if i forgot anything and enjoy. Link to comment Share on other sites More sharing options...
Justin Knight Posted October 22, 2014 Share Posted October 22, 2014 what does a world shop do if you don't mind me asking. Link to comment Share on other sites More sharing options...
Officer Johnson Posted October 22, 2014 Author Share Posted October 22, 2014 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. Link to comment Share on other sites More sharing options...
Justin Knight Posted October 22, 2014 Share Posted October 22, 2014 Oh I see now, that's neat. Link to comment Share on other sites More sharing options...
Matt Posted October 22, 2014 Share Posted October 22, 2014 If it's one standard global shop, maybe the client shouldn't be telling the server which shop it wants to open. Link to comment Share on other sites More sharing options...
Jumbofile Posted October 23, 2014 Share Posted October 23, 2014 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 numberCall Openshop(1)```This way is much easier. Link to comment Share on other sites More sharing options...
My Brave Shine Posted October 25, 2014 Share Posted October 25, 2014 hey, Nice! this like a cash shop in games ~really good. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now