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.
|
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
I think im going in the right direction. Anyone know where I could put this and or using the correct methods?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); } }
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.
easy way add it into the existing loop (gameticks)
That code will only be used when the player coords is 2870, and y 10237.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);
}
}
Make a boolean for that checks if the player is in your desired location. (example is desert areas, multi area).
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?
instead of exact coordinates, make it a boundary.
Find a process() method or some sort in the Player method, if this is the ole Matrix-based.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |