GKO Posted July 8, 2011 Author Share Posted July 8, 2011 Ok, ive been trying to add this:When you right click on another player in picScreen it will bring up a little menu, which will display the players level, and give the option to trade with this player. But i cant seem to get the code figured out.Could someone please help me with this?Thanks in advanceRegards,GKO Link to comment Share on other sites More sharing options...
kris_hole Posted July 8, 2011 Share Posted July 8, 2011 You need to start off by editing the packet that searches where the mouse is clicked and edit it to also run during a right click, if it's a right click to send a packet to the client telling it to open the menu with the data required. Link to comment Share on other sites More sharing options...
GKO Posted July 8, 2011 Author Share Posted July 8, 2011 Ok soo, can you give me a starter code? Link to comment Share on other sites More sharing options...
kris_hole Posted July 8, 2011 Share Posted July 8, 2011 I don't use EO so… Link to comment Share on other sites More sharing options...
GKO Posted July 13, 2011 Author Share Posted July 13, 2011 Bump Link to comment Share on other sites More sharing options...
GrimReaperReborn Posted July 14, 2011 Share Posted July 14, 2011 In frmMain, find Private Sub picScreen_MouseDownFind this:``` If InMapEditor Then Call MapEditorMouseDown(Button, x, y, False) Else ' left click If Button = vbLeftButton Then ' targetting Call PlayerSearch(CurX, CurY) ' right click ElseIf Button = vbRightButton Then If ShiftDown Then ' admin warp if we're pressing shift and right clicking If GetPlayerAccess(MyIndex) >= 2 Then AdminWarp CurX, CurY End If End If End If```Replace it with:``` If InMapEditor Then Call MapEditorMouseDown(Button, x, y, False) Else ' left click If Button = vbLeftButton Then ' targetting Call PlayerSearch(CurX, CurY) ' right click ElseIf Button = vbRightButton Then If ShiftDown Then ' admin warp if we're pressing shift and right clicking If GetPlayerAccess(MyIndex) >= 2 Then AdminWarp CurX, CurY Else ' this is where your code goes ' first search if a player is here (ask server) ' server will confirm and tell the client to open up the menu with target index ' once an option is clicked, client sends option with target index ' server check if legal and gives go ahead ' your going to have to make a picturebox with option on frmMain End If End If End If```Place your code where I inserted my comments. Good luck.Read up on packets. I think this might be a good one:http://www.touchofdeathforums.com/smf/index.php/topic,69393.msg746513.html Link to comment Share on other sites More sharing options...
erkro1 Posted July 14, 2011 Share Posted July 14, 2011 Thank you Milk, looked a long time for this. :D Link to comment Share on other sites More sharing options...
GKO Posted July 14, 2011 Author Share Posted July 14, 2011 Thank You very much, just finished getting it working. :) 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