I want to trigger an action after a certain time, I’ve been googling how I would do this but I have had no luck I guess it’s just the way my game is coded.
Anyways I need to make it to where 30 minutes after the code a1 is triggered, the code a2 is triggered.
a1:
if (itemId == 608) {
c.sendMessage("The scroll has brought you to the Revenants.");
c.sendMessage("They are very ghastly, powerful, undead creatures.");
c.sendMessage("If you defeat them, you may receive astounding treasures.");
c.sendMessage("If you donate you may visit the Revenants anytime without a scroll.");
c.getPA().movePlayer(3668, 3497, 0);
c.gfx0(398);
c.getItems().deleteItem(608, 1);
}
a2:
c.getPA().movePlayer(x, y, 0);
Since this code uses Project Insanity, you should use the built-in scheduled event facility provided by
server.event.EventManager.Below is example code: