Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8335459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:41:03+00:00 2026-06-09T03:41:03+00:00

I want to trigger an action after a certain time, I’ve been googling how

  • 0

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);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:41:04+00:00Added an answer on June 9, 2026 at 3:41 am

    Since this code uses Project Insanity, you should use the built-in scheduled event facility provided by server.event.EventManager.

    Below is example code:

    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);
    
      /* only if the parameter Client c isn't declared final */
      final Client client = c;
      /* set these to the location you'd like to teleport to */
      final int x = ...;
      final int y = ...;
    
      EventManager.getSingleton().addEvent(new Event() {
    
        public void execute(final EventContainer container) {
          client.getPA().movePlayer(x, y, 0);
        }
      }, 1800000); /* 30 min * 60 s/min * 1000 ms/s = 1800000 ms */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

stackoverflow world! I have h:panelGrid, containing some elements. I want to trigger an action
I want to trigger a special action in the save() method of a Django
I want to trigger on click of a button this: <asp:Button runat=server ID=submit Text=Submit
If I want to trigger an error in my interpreter I call this function:
I have an click function that I want to trigger outside of the function
I came in to scenario that I want to trigger service on specific time.
I have a div, containing text and a few links. I want to trigger
I have been using State machine based design tools for some time, and have
I have added Struts2 interceptor, There I want to change calling action if some
I have a page that automatically refreshes content via Ajax. I want this to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.