Sowether Posted September 9, 2009 Author Share Posted September 9, 2009 Sometimes, when you are passing from a map to another, we get trapped with the message: "Receiving map…" So to try to fix this problem I created a Refresh button that will make you teleport to the same place and get out of this terrible message. I hope you like it and be usefull for you. :embarrassed:**In the Client Side:**_Go to _frmMirage_ and create a Picture Box exactly on the place you want the button_**Click once in the Picture box**And under the options go to Picture and select the picture that you want to be the button**Click twice on the button**This will open the code windowUnder the code:> Private Sub "NAME OF YOUR PICTURE BOX"_Click()Add This:> Call SendData("refresh" & END_CHAR)> MyText = vbNullStringThen search for this:> ' Refresh Player> If LCase$(Mid$(MyText, 1, 8)) = "/refresh" Then> Call SendData("refresh" & END_CHAR)> MyText = vbNullString> Exit Sub> End IfAnd delete everything**Now in Server Side**Search for:> Public Sub Packet_Refresh(ByVal Index As Long)Change for this:> Public Sub Packet_Refresh(ByVal index As Long)> Call PlayerMsg(index, "Your map has been reloaded!", 14)> Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index))> Call SendPlayerData(index)> End Sub)Ok….. That's itSorry about my bad English... I'm BrazilianHope you like it Link to comment Share on other sites More sharing options...
The New World Posted September 9, 2009 Share Posted September 9, 2009 Eclipse Stable. That's all I have to say for people who don't have Visual Basic 6\. Good code though :3 Link to comment Share on other sites More sharing options...
Scorpious2k Posted September 9, 2009 Share Posted September 9, 2009 Nice work.But if you want to get rid of this problem, look here: http://www.touchofdeathforums.com/smf/index.php/topic,51502.msg540803.html#msg540803 Link to comment Share on other sites More sharing options...
HatakeAzzi Posted September 9, 2009 Share Posted September 9, 2009 In truth, has to be:```Call SendData("refresh" & END_CHAR)```Otherwise, it'll not work. ;) Link to comment Share on other sites More sharing options...
kris_hole Posted September 9, 2009 Share Posted September 9, 2009 actually that wouldnt work.Refresh doesnt refresh the players mapn it does its co-ordinates in 2.7solution:Change:```Public Sub Packet_Refresh(ByVal Index As Long) Call SendDataToMap(GetPlayerMap(Index), "playerxy" & SEP_CHAR & Index & SEP_CHAR & GetPlayerX(Index) & SEP_CHAR & GetPlayerY(Index) & END_CHAR)End Sub```To:```Public Sub Packet_Refresh(ByVal Index As long) Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(Index), GetPlayerY(Index))End Sub``` Link to comment Share on other sites More sharing options...
kris_hole Posted September 9, 2009 Share Posted September 9, 2009 and did yo take that idea from kryce may i ask :P? or did you jst think of it?![](http://i165.photobucket.com/albums/u76/kris_hole/Screenshot_0-2.jpg) Link to comment Share on other sites More sharing options...
Sigait Posted September 9, 2009 Share Posted September 9, 2009 I fixed that long ago with a simple refresh in the main lol,I just warped the player at the same map and at the same cord.Sigait. Link to comment Share on other sites More sharing options...
kris_hole Posted September 9, 2009 Share Posted September 9, 2009 Offtopic: Sigait why the prince of light? everyone knows darkness is better. they have the cooler weapons and demons :P Link to comment Share on other sites More sharing options...
Owen F Posted September 9, 2009 Share Posted September 9, 2009 i make a hotkey command that just uses the playerwarp which is handled server side. The server holds your correct coordinates..so..yeah, it works. Link to comment Share on other sites More sharing options...
Sigait Posted September 9, 2009 Share Posted September 9, 2009 @[THE-KRIS:> link=topic=51594.msg542299#msg542299 date=1252492465]> Offtopic: Sigait why the prince of light? everyone knows darkness is better. they have the cooler weapons and demons :PLol I like it the way it is.@[God:> Owen link=topic=51594.msg542301#msg542301 date=1252492688]> i make a hotkey command that just uses the playerwarp which is handled server side. The server holds your correct coordinates..so..yeah, it works.I just made a command /maprefresh and warped the player the way i said before.Sigait. Link to comment Share on other sites More sharing options...
Sowether Posted September 9, 2009 Author Share Posted September 9, 2009 Sorry, I forgot about the server side….. :PAnd no, I had that idea from my own.But I think maybe I had the inspiration from some game, but I don't remember. Link to comment Share on other sites More sharing options...
kris_hole Posted September 10, 2009 Share Posted September 10, 2009 ah okay :Pyeh there was just the tad server side change and it would work fine :) 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