I'm quite sure I know how to fix this. In my Ruse source the RegionClipping.java is quite shitty, also I had missing .gz files in data/maps. So I found another RegionClipping.java from another ruse source and ripped it and fixed other relevant methods that came with it. Now when I click on objects it registers the first click packet and it's fixed for my purposes. I was having problems since I couldn't code certain ladders as it was getting denied at the RegionClipping.objectsExists() part inside ObjectActionPacketListener.java
Code:
if(id > 0 && id != 6 && !RegionClipping.objectExists(gameObject) && id != 9294) {
// player.getPacketSender().sendMessage("An error occured. Error code: "+id).sendMessage("Please report the error to a staff member.");
return;
}
Another cheap fix would be this
Code:
public static boolean objectExists(GameObject object) {
Location loc = Location.getLocation(object);
Position pos = object.getPosition();
int id = object.getId();
boolean barrows = pos.getZ() == -1
&& object.getDefinition() != null
&& (object.getDefinition().getName().toLowerCase()
.contains("sarcophagus") || object.getDefinition()
.getName().toLowerCase().contains("staircase"))
|| loc != null && loc == Location.BARROWS;
boolean catherbyAquariums = id == 10091 && pos.getX() >= 2829
&& pos.getX() <= 2832 && pos.getY() >= 3441
&& pos.getY() <= 3447;
boolean freeForAllPortal = id == 38700 && pos.getX() == 2814
&& pos.getY() == 5509;
boolean warriorsGuild = id == 15653 && pos.getX() == 2877
&& pos.getY() == 3546 || loc == Location.WARRIORS_GUILD;
boolean fightPit = id == 9369 && pos.getX() == 2399
&& pos.getY() == 5176 || id == 9368 && pos.getX() == 2399
&& pos.getY() == 5168;
boolean barbCourseRopeswing = id == 2282 && pos.getX() == 2551
&& pos.getY() == 3550;
boolean lumbridgeCastle = id == 12348 && pos.getX() == 3207
&& pos.getY() == 3217 || id == 1738 && pos.getX() == 3204
&& pos.getY() == 3207 || id == 1739 && pos.getX() == 3204
&& pos.getY() == 3207 && pos.getZ() == 1 || id == 1739
&& pos.getX() == 3204 && pos.getY() == 3229 && pos.getZ() == 1;
boolean rfd = id == 12356
&& (pos.getX() == 1900 && pos.getY() == 5345
|| pos.getX() == 1899 && pos.getY() == 5366
|| pos.getX() == 1910 && pos.getY() == 5356 || pos
.getX() == 1889 && pos.getY() == 5355);
boolean lunar = id == 29944 && pos.getX() == 2111 && pos.getY() == 3917;
boolean chaosTunnels = id == 28779; // It checks player coords anyway
boolean trees = id == 1306
&& pos.getX() == 2696
&& pos.getY() == 3423
|| id == 1307
&& (pos.getX() == 2727 && pos.getY() == 3501 || pos.getX() == 2729
&& pos.getY() == 3481);
boolean godwars = pos.getZ() == 2;
boolean lawAltar = id == 2485 && pos.getX() == 2463
&& pos.getY() == 4831;
boolean mageBankLever = id == 5959 && pos.getX() == 3090
&& pos.getY() == 3956;
boolean well = id == 884 && pos.getX() == 3084 && pos.getY() == 3502;
boolean waterRcAltar = id == 2480 && pos.getX() == 3483 && pos.getY() == 4835;
boolean crystalChest = id == 172 && pos.getX() == 3077 && pos.getY() == 3497;
if (well || mageBankLever || lawAltar || trees || chaosTunnels || lunar || barrows || rfd || lumbridgeCastle || barbCourseRopeswing || catherbyAquariums || freeForAllPortal || warriorsGuild || fightPit || godwars || barrows || waterRcAltar || crystalChest)
return true;
int[] info = getObjectInformation(object.getPosition());
if (info != null) {
if (info[2] == object.getId()) {
return true;
}
}
return false;
}
Add
Code:
boolean ornatePool = id == 29241;
and add that to the long chain of returning true cases.
Code:
if (ornatePool || well || ...