Thread: Main Screen & Minimap Teleporting

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Main Screen & Minimap Teleporting 
    Client God

    Join Date
    Aug 2009
    Posts
    3,127
    Thanks given
    3
    Thanks received
    617
    Rep Power
    907
    Just like in new revisions (rights >=2 && ctrl + shift + click)

    Kept it short.

    Reply With Quote  
     

  2. #2  
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,895
    Thanks given
    1,564
    Thanks received
    2,624
    Rep Power
    5000
    Code:
    static final void processMinimapClick() {
    		if (minimapBlackout == 0) {
    			int mouseX = lastMouseX - 550 - 25;
    			int mouseY = lastMouseY - 4 - 5;
    			if (mouseX >= 0 && mouseY >= 0 && mouseX < 146 && mouseY < 151) {
    				addOption(13, "Walk here", mouseX, mouseX, 0);
    			}
    			if(lastMouseClick == 1) {
    				int clickY = lastClickY - 4 - 5;
    				int clickX = lastClickX - 550 - 25;
    				if (clickX >= 0 && clickY >= 0 && clickX < 146 && clickY < 151) {
    					clickY -= 75;
    					clickX -= 73;
    					int yaw = cameraYaw & 0x7ff;
    					int sineYaw = Rasterizer.sineTable[yaw];
    					int cosineYaw = Rasterizer.cosineTable[yaw];
    					int calcZ = cosineYaw * clickY - sineYaw * clickX >> 11;
    					int caclX = sineYaw * clickY + clickX * cosineYaw >> 11;
    					int destX = (caclX + selfPlayer.x >> 7);
    					int destZ = (selfPlayer.z - calcZ >> 7);
    					if(privilege >= 2 && Client.heldKeys[82] && Client.heldKeys[81]) {
    						teleport(currentBaseX + destX, currentBaseZ + destZ, gameLevel);
    					} else {
    						boolean bool = findPath(true, destZ, 0, 0, 1, 0, 0, destX, selfPlayer.walkQueueX[0], 0, selfPlayer.walkQueueZ[0]);
    						if (bool) {
    							outputStream.putByte(clickX);
    							outputStream.putByte(clickY);
    						    outputStream.putShort(cameraYaw);
    						    outputStream.putByte(57);
    						    outputStream.putByte(10);
    						    outputStream.putByte(10);
    						    outputStream.putByte(89);
    						    outputStream.putShort(selfPlayer.x);
    						    outputStream.putShort(selfPlayer.z);
    						    outputStream.putByte(pathFound);
    						    outputStream.putByte(63);
    						}
    					}
    				}
    			}
    		}
    	}
    Code:
    	static void teleport(int x, int z, int level) {
    		String text = "::tele "+x+" "+z+" "+level;
    		Client.outputStream.writeOpcode(55);
    		Client.outputStream.putByte(text.length() - 1);
    		Client.outputStream.putString(text.substring(2));
    	}
    Code:
    if (SceneGraph.mouseOverX != -1) {
    							int z = SceneGraph.mouseOverY;
    							int x = SceneGraph.mouseOverX;
    							if(privilege >= 2 && Client.heldKeys[82] && Client.heldKeys[81]) {
    								teleport(currentBaseX + x, currentBaseZ + z, gameLevel);
    								Client.crossY = Client.lastClickY;
    								Client.crossIndex = 0;
    								Client.crossState = 1;
    								Client.crossX = Client.lastClickX;
    							} else {
    								boolean cross = Client.findPath(true, z, 0, 0, 0, 0, 0, x, Client.selfPlayer.walkQueueX[0], 0, Client.selfPlayer.walkQueueZ[0]);
    								if (cross) {
    									Client.crossY = Client.lastClickY;
    									Client.crossIndex = 0;
    									Client.crossState = 1;
    									Client.crossX = Client.lastClickX;
    								}
    							}
    							SceneGraph.mouseOverX = -1;
    						}
    Anyone who wants it can impl it. Good job though. (Impl on my 414)
    Reply With Quote  
     


  3. #3  
    Client God

    Join Date
    Aug 2009
    Posts
    3,127
    Thanks given
    3
    Thanks received
    617
    Rep Power
    907
    Quote Originally Posted by Leanbow View Post
    Code:
    static final void processMinimapClick() {
    		if (minimapBlackout == 0) {
    			int mouseX = lastMouseX - 550 - 25;
    			int mouseY = lastMouseY - 4 - 5;
    			if (mouseX >= 0 && mouseY >= 0 && mouseX < 146 && mouseY < 151) {
    				addOption(13, "Walk here", mouseX, mouseX, 0);
    			}
    			if(lastMouseClick == 1) {
    				int clickY = lastClickY - 4 - 5;
    				int clickX = lastClickX - 550 - 25;
    				if (clickX >= 0 && clickY >= 0 && clickX < 146 && clickY < 151) {
    					clickY -= 75;
    					clickX -= 73;
    					int yaw = cameraYaw & 0x7ff;
    					int sineYaw = Rasterizer.sineTable[yaw];
    					int cosineYaw = Rasterizer.cosineTable[yaw];
    					int calcZ = cosineYaw * clickY - sineYaw * clickX >> 11;
    					int caclX = sineYaw * clickY + clickX * cosineYaw >> 11;
    					int destX = (caclX + selfPlayer.x >> 7);
    					int destZ = (selfPlayer.z - calcZ >> 7);
    					if(privilege >= 2 && Client.heldKeys[82] && Client.heldKeys[81]) {
    						teleport(currentBaseX + destX, currentBaseZ + destZ, gameLevel);
    					} else {
    						boolean bool = findPath(true, destZ, 0, 0, 1, 0, 0, destX, selfPlayer.walkQueueX[0], 0, selfPlayer.walkQueueZ[0]);
    						if (bool) {
    							outputStream.putByte(clickX);
    							outputStream.putByte(clickY);
    						    outputStream.putShort(cameraYaw);
    						    outputStream.putByte(57);
    						    outputStream.putByte(10);
    						    outputStream.putByte(10);
    						    outputStream.putByte(89);
    						    outputStream.putShort(selfPlayer.x);
    						    outputStream.putShort(selfPlayer.z);
    						    outputStream.putByte(pathFound);
    						    outputStream.putByte(63);
    						}
    					}
    				}
    			}
    		}
    	}
    Code:
    	static void teleport(int x, int z, int level) {
    		String text = "::tele "+x+" "+z+" "+level;
    		Client.outputStream.writeOpcode(55);
    		Client.outputStream.putByte(text.length() - 1);
    		Client.outputStream.putString(text.substring(2));
    	}
    Code:
    if (SceneGraph.mouseOverX != -1) {
    							int z = SceneGraph.mouseOverY;
    							int x = SceneGraph.mouseOverX;
    							if(privilege >= 2 && Client.heldKeys[82] && Client.heldKeys[81]) {
    								teleport(currentBaseX + x, currentBaseZ + z, gameLevel);
    								Client.crossY = Client.lastClickY;
    								Client.crossIndex = 0;
    								Client.crossState = 1;
    								Client.crossX = Client.lastClickX;
    							} else {
    								boolean cross = Client.findPath(true, z, 0, 0, 0, 0, 0, x, Client.selfPlayer.walkQueueX[0], 0, Client.selfPlayer.walkQueueZ[0]);
    								if (cross) {
    									Client.crossY = Client.lastClickY;
    									Client.crossIndex = 0;
    									Client.crossState = 1;
    									Client.crossX = Client.lastClickX;
    								}
    							}
    							SceneGraph.mouseOverX = -1;
    						}
    Anyone who wants it can impl it. Good job though.
    Wrecked.
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member
    The Reverse's Avatar
    Join Date
    Nov 2014
    Posts
    936
    Thanks given
    168
    Thanks received
    289
    Rep Power
    520
    That is amazing and ty Leanbow

    Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that.
    Martin Luther King, Jr.

    Reply With Quote  
     

  6. #5  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    What a neat concept. I would be even more impressed if you could teleport around using a full-scale map.
    Reply With Quote  
     

  7. #6  
    Client God

    Join Date
    Aug 2009
    Posts
    3,127
    Thanks given
    3
    Thanks received
    617
    Rep Power
    907
    Quote Originally Posted by Jason View Post
    What a neat concept. I would be even more impressed if you could teleport around using a full-scale map.
    Same concept. New clients do it when they render the world map (click on the world map sprite, etc).
    Reply With Quote  
     

  8. #7  
    Extreme Donator Main Screen &amp; Minimap Teleporting Market Banned



    Join Date
    Aug 2011
    Age
    28
    Posts
    3,589
    Thanks given
    1,402
    Thanks received
    1,620
    Rep Power
    5000
    Pretty cool feature

    Attached image

    Attached image
    Discord: Roy#2382

    Reply With Quote  
     

  9. #8  
    Registered Member
    Project's Avatar
    Join Date
    Dec 2010
    Posts
    2,669
    Thanks given
    1,043
    Thanks received
    820
    Rep Power
    1101
    Didn't even know it wasn't already in these revisions, looks nice
    Reply With Quote  
     

  10. #9  
    Client God

    Join Date
    Aug 2009
    Posts
    3,127
    Thanks given
    3
    Thanks received
    617
    Rep Power
    907
    Quote Originally Posted by Logic View Post
    Basic stuff but good job, could maybe expand it by moving through an in-game worldmap like OSBuddy has idk
    I'll have to figure out how to loop through all the regions and generate a map.

    Similar to this:

    Reply With Quote  
     

  11. #10  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Has anyone got this for a non renamed client ?
    Reply With Quote  
     

  12. Thankful users:


Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 5
    Last Post: 04-11-2011, 01:22 PM
  2. Replies: 0
    Last Post: 04-11-2011, 10:37 AM
  3. Main screen?
    By Swifty in forum Configuration
    Replies: 3
    Last Post: 07-21-2009, 02:27 PM
  4. [508]Clicking on main screen..?
    By Proffesor Oak in forum Help
    Replies: 11
    Last Post: 05-08-2009, 05:44 PM
  5. One button on main screen client!
    By Blair' in forum Tutorials
    Replies: 7
    Last Post: 03-31-2009, 08:00 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •