Forum rules
- Check if a topic exists before creating a new one.
- Duplicate topics will be immediately deleted.
- Issues lacking detail or sources (where applicable) will be deleted immediately.
- Unimplemented content is not bugged content. Do not report unimplemented content.
- IF YOUR BUG IS EXPLOITABLE DO NOT REPORT IT HERE. DM the report to a Bug Janitor instead.
- Repeated violation of these rules may result in a user being denied access to this section.
I'm writing some bot scripts and I noticed that an opened door is not being returned as a node, instead a null object is returned.
The door in question is a double door and both sides aren't recognised once opened.
the door moves when opened, most likely. It is no longer on that tile. Open doors are separate gameobjects with different IDs in most cases, as well. Welcome to runescape.
Ceikry wrote: ↑Wed May 08, 2024 3:13 pm
the door moves when opened, most likely. It is no longer on that tile. Open doors are separate gameobjects with different IDs in most cases, as well. Welcome to runescape.
I wrote a function which returned the correct Node for Object ID: 26911 at Loc: 3100, 3509
/**
* Gets the object node with matching id and coordinates.
* @param id the id of the object
* @param x the x location of the object
* @param y the y location of the object
* @param z the z location of the object
* @return the object node with matching id and coordinates or null.
* @author Legendary Rare
*/
private fun getObjectNode(id: Int, x: Int, y: Int, z: Int): Node? {
var scenery = RegionManager.getObject(z, x, y, id)
if (scenery != null) {
var realScenery: Scenery = scenery!!
var sceneryList: List<Scenery> = listOf(realScenery)
return scriptAPI.processEvaluationList(sceneryList, acceptedId = id)
}
return null
}