mh1701 Posted April 8, 2009 Author Share Posted April 8, 2009 ok….. you (the reader) are about to ready my first Souce Code Tut EVER!here it goes........This tutoral will show you how to make your game client go from 'closing when you log off' to 'returning to the Main Menu when you log off'STEP ONE: Open VB and go into 'modGameLogicSTEP TWO: Find the line that says "Call GameDestroy" Change it to "Call GameLogout"STEP THREE: Locate the Sub "Sub GameDestroy" And the end of this sub under "End Sub" put in this.......Sub Gamelogout() ' Unloads all TCP-related things. Call TcpDestroy ' Unloads all DirectX objects. Call DestroyDirectX ' Unloads the BGM in memory (soon-to-be obsolete). Call StopBGM ' Closes the VB6 application. 'End ' Returns to Main Menu frmMirage.Hide Load frmMainMenu frmMainMenu.Show frmMainMenu.SetFocus frmSendGetData.HideEnd SubDONE!I hope this helped some of ya!Please leave any comments or edits to this code if you have any. Link to comment Share on other sites More sharing options...
mh1701 Posted April 8, 2009 Author Share Posted April 8, 2009 or, to simplify that block of code, this would also work…..Sub Gamelogout() Call TcpDestroy Call DestroyDirectX Call StopBGM frmMirage.Hide Load frmMainMenu frmMainMenu.Show frmMainMenu.SetFocus frmSendGetData.HideEnd Sub Link to comment Share on other sites More sharing options...
L0lz Posted April 8, 2009 Share Posted April 8, 2009 Nifty, I do get sick of logging out to switch characters, only to find out the program has been exited. Link to comment Share on other sites More sharing options...
damian666 Posted April 8, 2009 Share Posted April 8, 2009 agreed, this is a nice addition, i also get sick of it closing all the way down ^^great piece :DDamian666 Link to comment Share on other sites More sharing options...
dao Posted April 12, 2009 Share Posted April 12, 2009 good lol but put it in code and also to work on would be nice if when you clicked logout a message box comes up with two buttons one saying "main menu" and the other saying "charecter select" other then that this is great Link to comment Share on other sites More sharing options...
the_best_flash Posted April 12, 2009 Share Posted April 12, 2009 Thanks for the code. It was a pain to have to restart the client to change characters. Nice work. Link to comment Share on other sites More sharing options...
Akselj Posted April 13, 2009 Share Posted April 13, 2009 Thanks! I never would've figured that out. Or mabye I would, but that would have taken weeks… I'm bad with VB. Link to comment Share on other sites More sharing options...
Ridrik Posted July 19, 2009 Share Posted July 19, 2009 Okay, you logout, but then when you are in the main menu, you click on "Quit the game"and it doesn't quit, it just reloads… Link to comment Share on other sites More sharing options...
Kimimaru Posted July 19, 2009 Share Posted July 19, 2009 Yeah, I'm experiencing the same problem as Ridrik, also. It lets you do everything else but exit the game by clicking on the Quit button.EDIT: Also, after you return to the main menu, it says that the server is offline for a few seconds, which displays the incorrect news message. Link to comment Share on other sites More sharing options...
Mr. Bob Firefarter Posted July 19, 2009 Share Posted July 19, 2009 That will require extra sourcing so that it doesn't apply to that button. Link to comment Share on other sites More sharing options...
goku1993 Posted July 20, 2009 Share Posted July 20, 2009 to switch characters you can just add this to the button```Call SwitchCharacter`````` Sub SwitchCharacter()InGame = FalseGettingMap = TrueInEditor = FalseInSpellEditor = FalseInSpawnEditor = FalseRunning = FalsefrmMirage.Socket.ClosefrmMirage.picExitOptions.Visible = FalsefrmMirage.Visible = FalsefrmChars.Visible = true```that s not exactly but pretty much what i did (there are some lines you don't really need in there) Link to comment Share on other sites More sharing options...
RayZ101 Posted August 19, 2010 Share Posted August 19, 2010 ~~I think I messed up somehow, so I removed the script/code, so then when im fixing up by testing the client, the log out button doesnt work, it just stays there.Can you like, give me the original code pretty please? =P~~I'll just rip it outta a diffrent download of stable. 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