Thread: Sending a Interface when a player walks on a set coordinates

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Sending a Interface when a player walks on a set coordinates 
    Alterin 718 boi
    Shivazgod's Avatar
    Join Date
    Jan 2018
    Posts
    88
    Thanks given
    2
    Thanks received
    4
    Rep Power
    0
    Hi, so I'm trying to force a interface to open when a player walks on a certain set coords. I tried adding them to World.java but nothing works
    then I tried to add it to player.java


    Code:
    	public static void KeldaDangerMine(final Player player) {
    	
    	if(player.getX() == 2870 && player.getY() == 10237) {
    		int i = 123;
    			player.getPackets().sendGameMessage("test");
    			player.getInterfaceManager().sendInterface(i);
    			KeldaDangerMine(player);
    	}
    	}
    I think im going in the right direction. Anyone know where I could put this and or using the correct methods?
    Reply With Quote  
     

  2. #2  
    Renown Programmer
    Bartvh's Avatar
    Join Date
    May 2017
    Posts
    370
    Thanks given
    89
    Thanks received
    208
    Rep Power
    497
    Check where your player calculates his next step from the path. I don't think it's in your World class, most likely in the player class or a composite class of the player class.
    Reply With Quote  
     

  3. #3  
    Alterin 718 boi
    Shivazgod's Avatar
    Join Date
    Jan 2018
    Posts
    88
    Thanks given
    2
    Thanks received
    4
    Rep Power
    0
    Quote Originally Posted by Bartvh View Post
    Check where your player calculates his next step from the path. I don't think it's in your World class, most likely in the player class or a composite class of the player class.
    I tried putting it in the player class is there a method maybe I can use to put it in?
    Reply With Quote  
     

  4. #4  
    Sweet milk.
    Sense's Avatar
    Join Date
    May 2012
    Posts
    128
    Thanks given
    20
    Thanks received
    12
    Rep Power
    4
    easy way add it into the existing loop (gameticks)
    Dont drink and drive, smoke and fly.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Feb 2016
    Posts
    31
    Thanks given
    1
    Thanks received
    5
    Rep Power
    18
    public static void KeldaDangerMine(final Player player) {

    if(player.getX() == 2870 && player.getY() == 10237) {
    int i = 123;
    player.getPackets().sendGameMessage("test");
    player.getInterfaceManager().sendInterface(i);
    KeldaDangerMine(player);
    }
    }
    That code will only be used when the player coords is 2870, and y 10237.
    Make a boolean for that checks if the player is in your desired location. (example is desert areas, multi area).
    Reply With Quote  
     

  6. #6  
    Alterin 718 boi
    Shivazgod's Avatar
    Join Date
    Jan 2018
    Posts
    88
    Thanks given
    2
    Thanks received
    4
    Rep Power
    0
    Quote Originally Posted by Muda2 View Post
    That code will only be used when the player coords is 2870, and y 10237.
    Make a boolean for that checks if the player is in your desired location. (example is desert areas, multi area).
    Yeah but that's what I want, and it doesn't work
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Feb 2016
    Posts
    31
    Thanks given
    1
    Thanks received
    5
    Rep Power
    18
    You want it to only show when ur literally standing on a spot? or when hes inside a area? because the code above will only show when the player is standing exactly on the coordinates you entered?
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,084
    Thanks given
    0
    Thanks received
    1,043
    Rep Power
    3608
    instead of exact coordinates, make it a boundary.
    Reply With Quote  
     

  9. #9  
    Alterin 718 boi
    Shivazgod's Avatar
    Join Date
    Jan 2018
    Posts
    88
    Thanks given
    2
    Thanks received
    4
    Rep Power
    0
    Quote Originally Posted by Muda2 View Post
    You want it to only show when ur literally standing on a spot? or when hes inside a area? because the code above will only show when the player is standing exactly on the coordinates you entered?
    Standing literally on a set coord, but that's the thing it doesn't show. that's what I mean
    Reply With Quote  
     

  10. #10  
    Registered Member
    Melvin's Avatar
    Join Date
    Aug 2011
    Posts
    1,150
    Thanks given
    546
    Thanks received
    418
    Rep Power
    1561
    Find a process() method or some sort in the Player method, if this is the ole Matrix-based.


    A creative man is motivated by the desire to achieve, not by the desire to beat others.”


    ― Ayn Rand
    Reply With Quote  
     

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: 2
    Last Post: 03-27-2017, 06:33 PM
  2. [508]Player face on interface
    By GaMePaPa in forum Requests
    Replies: 2
    Last Post: 04-19-2009, 07:49 PM
  3. Player head on interface?
    By Iceman in forum Help
    Replies: 3
    Last Post: 03-30-2009, 03:25 PM
  4. Player Head On Interface
    By AlexMason in forum Requests
    Replies: 0
    Last Post: 09-28-2008, 11:56 PM
  5. Packet 101 - Draw your player model on interface
    By veer in forum RS 503+ Client & Server
    Replies: 0
    Last Post: 09-01-2008, 08:11 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
  •