Originally Posted by
NICKIminaj
So I added this:
https://www.rune-server.org/runescap...objects-6.html
Everything was fine, got no errors. My source didnt have fileutilities.java and npcspawning.java but i found these classes on the internet and added them into the source. So I've done everything but it doesn't work. I cant remove any objects, idk what im doing wrong.
I've put the objects in NPCSpawning.java (as described in the snippet)
Code:
public static void spawnNPCS() { //under this
//World.deleteObject(new WorldTile(3085, 3504, 0));
World.deleteObject(new WorldTile(3083, 3492, 0));// Boulder at edgeville
World.deleteObject(new WorldTile(3087, 3516, 0));// Beacon at edgeville
World.deleteObject(new WorldTile(3097, 3502, 0));// Tree at edge
World.deleteObject(new WorldTile(3083, 3500, 0));// Edge
World.deleteObject(new WorldTile(3092, 3488, 0));// Desk at edgeville bank
World.deleteObject(new WorldTile(3090, 3517, 0));// Chest at edge ditch
World.deleteObject(new WorldTile(3082, 3518, 0));// Tree at edgeville
}
Would be nice if someone could give me a hint
Use an IDE Such-as Eclispe, and run the server. (Remember to import the libs into the buildpath.)
if an error comes up when you go near the deleted object in-game
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV VVV
I'm guessing you're using a Foxtrot-Matrix based source from the downloads
the fix is very simple.
Add
Code:
if (World.restrictedTiles != null) {
for (WorldTile restrictedTile : World.restrictedTiles) {
if (restrictedTile != null) {
int restX = restrictedTile.getX(), restY = restrictedTile.getY();
int restPlane = restrictedTile.getPlane();
if (object.getX() == restX && object.getY() == restY && object.getPlane() == restPlane) {
World.spawnObject(
new WorldObject(-1, 10, 2, object.getX(), object.getY(), object.getPlane()), false);
unclip(object, localX, localY);
return;
}
}
}
}
Under
Code:
public void spawnObject(WorldObject object, int plane, int localX, int localY, boolean original) {
if (original) {
So it looks like
Code:
public void spawnObject(WorldObject object, int plane, int localX, int localY, boolean original) {
if (original) {
if (World.restrictedTiles != null) {
for (WorldTile restrictedTile : World.restrictedTiles) {
if (restrictedTile != null) {
int restX = restrictedTile.getX(), restY = restrictedTile.getY();
int restPlane = restrictedTile.getPlane();
if (object.getX() == restX && object.getY() == restY && object.getPlane() == restPlane) {
World.spawnObject(
new WorldObject(-1, 10, 2, object.getX(), object.getY(), object.getPlane()), false);
unclip(object, localX, localY);
return;
}
}
}
}
objects[plane][localX][localY][slot] = object;
clip(object, localX, localY);
} else {