Originally Posted by
Zeref
There is a method specifically for this in World.java. If not, refer to skills i.e. stumps in woodcutting
Code:
public static void sendObject() {
CoresManager.fastExecutor.schedule(new TimerTask() {
int timer = 300; //5 mins.
@Override
public void run() {
if (timer == 240) {//4 mins
World.sendWorldMessage("<col=FFFF00></col>", false);
} if (timer == 180) {//3 mins
World.sendWorldMessage("<col=FFFF00></col>", false);
} if (timer == 90) {//2 mins
World.sendWorldMessage("<col=FFFF00></col>", false);
} if (timer == 30) {//1 min
World.sendWorldMessage("<col=33CC33></col>", false);
getObject();
World.spawnTemporaryObject(new WorldObject(1, 10, 1, location), 30, false);
} if (timer == 1) {//reset - 0minutes
World.sendWorldMessage("<col=FF0000></col>", false);
timer = 300;
}
if (timer > 0) {
timer--;
}
}
}, 0L, 1000L);
}
Code:
Exception in thread "Fast Executor" java.lang.NullPointerException
at com.rs.game.WorldObject.<init>(WorldObject.java:14)
at com.rs.game.minigames.ObjectFile$1.run(ObjectFile.java:77)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)