Jump to content

Featured Replies

Posted
comment_25147

You know those pesky little rocks and bushes that you'd like to add around for some more aesthetic appeal? But there is an issue ...you aren't quite sure as to how to obtain the idea of the object, being that you cannot right-click and examine in debug-mode.

Well, here you go! :D Hope this helps.

			case "objdebug":
				System.out.println("Standing on " + World.getObject(player));
				Region r = World.getRegion(player.getRegionY() | (player.getRegionX() << 8));
				if (r == null) {
					player.getPackets().sendGameMessage("Region is null!");
					return true;
				}
				List<WorldObject> objects = r.getObjects();
				if (objects == null) {
					player.getPackets().sendGameMessage("Objects are null!");
					return true;
				}
				for (WorldObject o : objects) {
					if (o == null || !o.matches(player)) {
						continue;
					}
					System.out.println("Objects coords: " + o.getX() + ", " + o.getY());
					System.out.println("[Object]: id=" + o.getId() + ", type=" + o.getType() + ", rot=" + o.getRotation() + ".");
				}
				return true;

 

  • 9 months later...
  • 2 years later...

Create an account or sign in to comment