deathtaker26 Posted October 2, 2010 Author Share Posted October 2, 2010 ;D hey I was working on a part for my game that when a player goes on a ferry or goes all the way to the left of there base it pulls up a menu of places asking them where they want to go and it has a list of map names and areas to take them to I made it to work with a scripted tile it kinda sucks atm im going to make it so that it can call up different menus but for now its just 1 menu all the same for every tile so…. yeah but I will make it better.**Please rate 1-10 on how I did cause this was my first time using packets**anyway for now this is what I haveClientwith the other tiles add this to constants```Public Const TILE_TYPE_MENU As Byte = 15```in the enum's above this``` ' Make sure SMSG_COUNT is below everything else SMSG_COUNT```add this```SDUNMENU```and still in the enums but above this``` ' Make sure CMSG_COUNT is below everything else CMSG_COUNT```add this```CDUNMENU```now in mod handle data under```HandleDataSub(STradeStatus) = GetAddress(AddressOf HandleTradeStatus)```add```HandleDataSub(SDUNMENU) = GetAddress(AddressOf HandleDUNMENU)```still in the mod handle data some where with all the other subs add this```Private Sub HandleDUNMENU(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteBytes Data() Frmdunmenu.Visible = TrueEnd Sub```in modclienttcp add```Public Sub DUNMENU() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CDUNMENU SendData Buffer.ToArray() Set Buffer = NothingEnd Sub```now in the frmeditor_map with all the other attributes make an optdunmenu don't put anything in the code for itnow in modgameeditor under``` ' trap If frmEditor_Map.optTrap.Value Then .Type = TILE_TYPE_TRAP .Data1 = MapEditorHealAmount .Data2 = 0 .Data3 = 0 End If```add``` 'dungeon menu If frmEditor_Map.OptDunmenu.Value Then .Type = TILE_TYPE_MENU .Data1 = 0 .Data2 = 0 .Data3 = 0 End If```now in mod text under``` Case TILE_TYPE_WARP DrawText TexthDC, tX, tY, "W", QBColor(BrightBlue)```add``` Case TILE_TYPE_MENU DrawText TexthDC, tX, tY, "DM", QBColor(BrightBlue)```done with client now to serverSERVER SIDEIn ModPlayer under``` If .Type = TILE_TYPE_WARP Then MapNum = .Data1 x = .Data2 y = .Data3 'TempPlayer(Index).CanPlayerMove = 1 Call PlayerWarp(index, MapNum, x, y) Moved = YES End If```add``` If .Type = TILE_TYPE_MENU Then Call Dungeonmenu(index) Moved = YES End If```with the constants under rest of the tiles add```Public Const TILE_TYPE_MENU As Byte = 15```in the enum's above this``` ' Make sure SMSG_COUNT is below everything else SMSG_COUNT```add this```SDUNMENU```and still in the enums but above this``` ' Make sure CMSG_COUNT is below everything else CMSG_COUNT```add this```CDUNMENU```in modplayer under```Public Sub StunNPC(ByVal index As Long, ByVal MapNum As Long, ByVal spellnum As Long) ' check if it's a stunning spell If Spell(spellnum).StunDuration > 0 Then ' set the values on index MapNpc(MapNum).Npc(index).StunDuration = Spell(spellnum).StunDuration MapNpc(MapNum).Npc(index).StunTimer = GetTickCount End IfEnd Sub```add```Sub Dungeonmenu(ByVal index As Long)Call DUNMENU(index)End Sub```in modhandldata add this under all the rest of these things but above the end sub``` HandleDataSub(CDUNMENU) = GetAddress(AddressOf HandleDUNMENU)```above```Private Sub HandlePlayerMsg(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)```add```Private Sub HandleDUNMENU(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteBytes Data()Call DUNMENU(index)Set Buffer = NothingEnd Sub```now in modservertcp above```Public Sub MapMsg(ByVal MapNum As Long, ByVal msg As String, ByVal Color As Long)```add```Public Sub DUNMENU(ByVal index As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SDUNMENU SendDataTo index, Buffer.ToArray Set Buffer = NothingEnd Sub```now back to the client just add the attached fileshttp://www.freemmorpgmaker.com/files/imagehost/pics/8082086c73a0982ff2d32d34f628e4c7.rarto edit the list just got to frmdunmenu and retype on the listand add these to the codes for the travel button and dblclick listIf list1.text = "(your map name here)" thencall warpto( your map number here)exit subend if[![](http://www.freemmorpgmaker.com/files/imagehost/pics/e12c834332efff0457281441ddc05a19.jpg)](http://www.freemmorpgmaker.com/files/imagehost/#e12c834332efff0457281441ddc05a19.jpg) Link to comment Share on other sites More sharing options...
Mulkaar Posted October 3, 2010 Share Posted October 3, 2010 That's amazing work even a stripped down version is great could you add a few screenshots of the menu etc? Link to comment Share on other sites More sharing options...
deathtaker26 Posted October 3, 2010 Author Share Posted October 3, 2010 @Opportune:> That's amazing work even a stripped down version is great could you add a few screenshots of the menu etc?yeah if you can tell me where i can get a good screen shot maker i googled it all cost money. Link to comment Share on other sites More sharing options...
JSchilli1 Posted October 3, 2010 Share Posted October 3, 2010 Use PrtScrn. It's a button on your keyboard. Open Paint, and paste.-JS1 Link to comment Share on other sites More sharing options...
deathtaker26 Posted October 3, 2010 Author Share Posted October 3, 2010 @JSchilli1:> Use PrtScrn. It's a button on your keyboard. Open Paint, and paste.> > -JS1woah i didnt know that COOL! Link to comment Share on other sites More sharing options...
JSchilli1 Posted October 3, 2010 Share Posted October 3, 2010 Yeah, it took me a while to figure it out too. Cool edit though.-JS1 Link to comment Share on other sites More sharing options...
deathtaker26 Posted October 3, 2010 Author Share Posted October 3, 2010 thanks i just posted a pic im going to make it where it reads the map names as data Link to comment Share on other sites More sharing options...
Mulkaar Posted October 3, 2010 Share Posted October 3, 2010 Woah the screenshot is awesome! Seriously amazing work thanks a lot. Link to comment Share on other sites More sharing options...
deathtaker26 Posted October 3, 2010 Author Share Posted October 3, 2010 @Opportune:> Woah the screenshot is awesome! Seriously amazing work thanks a lot.thanks ^^ Link to comment Share on other sites More sharing options...
SawQuart Posted October 3, 2010 Share Posted October 3, 2010 I'm really impressed with what people are doing with Origins. It really was an upgrade from EE. Link to comment Share on other sites More sharing options...
deathtaker26 Posted October 4, 2010 Author Share Posted October 4, 2010 yep Thanks to EO I should be done with visual basics by the end of march next year so i can move on to c++ this is great i mean i'm already doing packets now thanks to EO Link to comment Share on other sites More sharing options...
Mulkaar Posted October 4, 2010 Share Posted October 4, 2010 @Jungletoeâ„¢:> I'm really impressed with what people are doing with Origins. It really was an upgrade from EE.Same, EO has sparked completely new stuff. Link to comment Share on other sites More sharing options...
deathtaker26 Posted October 4, 2010 Author Share Posted October 4, 2010 it is because it is easier to use and much faster so it dont take 30min to test one simple thing…. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted January 1, 2012 Share Posted January 1, 2012 sorry for the necro post, but I'm going to test this and see if it works with EO2.0, because it's actually a good system. Then I will report backEdit: It doesn't work, but after a few modifications I got it to work on EO2.0, only problem is when you warp it warps to the same coords as the other map, so if your travel tile is on top of a block on the other map, it will be glitched. Link to comment Share on other sites More sharing options...
Justn Posted January 3, 2012 Share Posted January 3, 2012 I posted the fix on the source index page forgot to post it here I have this in my source and i added where u can choose what x and y spot u go too not just the map number also got to work with the conversation system I'm adding in a travel cost ill post them all here when i finish cause I didn't really like the map tile :) Link to comment Share on other sites More sharing options...
evilbunnie Posted January 3, 2012 Share Posted January 3, 2012 Son, you've got a while to go before you move to C++. This code is horrendously messy and needs a clean up. Link to comment Share on other sites More sharing options...
Justn Posted January 3, 2012 Share Posted January 3, 2012 @Captain:> Son, you've got a while to go before you move to C++. This code is horrendously messy and needs a clean up.That is why I don't use the edit I worked on anymore and just pay you to share you wonderful coding skills =) oh did I mention he does great work for cheap? Link to comment Share on other sites More sharing options...
Whackeddie99 Posted January 3, 2012 Share Posted January 3, 2012 Justn, the fix you added in source codes doesn't work alone. There's other things needed I remember.And I would love to see you post x y coordinates code, I would definitely use this. Was thinking of writing a code where you can Only warp to some maps if you're a certain level. Link to comment Share on other sites More sharing options...
Growlith1223 Posted February 25, 2012 Share Posted February 25, 2012 Does this rly even work?Cuz i was sitting here for 5 minutes reading the posts and to me, it sounds like it don't work :/ Link to comment Share on other sites More sharing options...
Justn Posted February 25, 2012 Share Posted February 25, 2012 Yes it works just not very good…. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted February 25, 2012 Share Posted February 25, 2012 I got it to work, but it took awhile. Link to comment Share on other sites More sharing options...
Growlith1223 Posted February 25, 2012 Share Posted February 25, 2012 How do you make this load the X and Y coordinates?Do you have to edit the player warpto sub? Link to comment Share on other sites More sharing options...
iSnow Posted March 15, 2012 Share Posted March 15, 2012 I would think this stuff would work in CS:DE since it doesnt rely on the DD7 Modules very much at all, obviously there might be some changes to the source to make this work however. Hmm, might be worth a try to make one more feature for CS:DE. Link to comment Share on other sites More sharing options...
deathtaker26 Posted March 16, 2012 Author Share Posted March 16, 2012 this topic was from 2010 -_-…. why did you revive it... Link to comment Share on other sites More sharing options...
Justn Posted March 16, 2012 Share Posted March 16, 2012 @Crest:> this topic was from 2010 -_-…. why did you revive it...It's been active all year though :) 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