heya.
I'm having some trouble with the removing global objects.
original post of author: https://www.rune-server.ee/runescape...l-objects.html
What the snippet allows is to use a delete object method via npcspawning.
which worked completely fine.
Untill i started on a new source which did not have npcspawning.
So i added everything in from my old source including the npcspawning method.
and everything required from the snippet.
After initiating everything, the npcs get spawned but the objects do not get removed.
npcpspawn.java
Code:
package com.rs.utils.spawning;
import com.rs.game.World;
import com.rs.game.WorldObject;
import com.rs.game.WorldTile;
public enum NPCSpawning {
//meiyerditch Storekeepers
test(1, 1, 1, 0, false),
private int npcId;
private int posX;
private int posY;
private int height;
private boolean spawned;
NPCSpawning(int id, int x, int y, int z, boolean spawned) {
this.npcId = id;
this.posX = x;
this.posY = y;
this.height = z;
this.spawned = spawned;
}
public static void spawnNpcs() {
for (NPCSpawning spawn : NPCSpawning.values()) {
World.spawnNPC(spawn.npcId, new WorldTile(spawn.posX, spawn.posY, spawn.height), 0, spawn.spawned);
World.deleteObject(new WorldTile(1, 1, 0));//test
}
}
}
as i said the npcs do get spawned but it does not read the deleteobject method.
and i could just spawn -1's on all the required locations but that will not handle the clipping logic.
all help is appreciated.