Thread: [508 RS2HD] How to use the event system and create handlers

Results 1 to 3 of 3
  1. #1 [508 RS2HD] How to use the event system and create handlers 
    Fearrichy
    Guest
    The title basically says it all.

    I want to know how to use the event system in rs2hd and create handlers for skills, etc. Would appreciate an example and rep you until my fingers break if you explain to me how this works. I really want to start using rs2hd and understand it.

    Maybe you could even post a tut so that other people can start using rs2hd and understand too

    Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2007
    Posts
    1,017
    Thanks given
    1
    Thanks received
    3
    Rep Power
    562
    World.getInstance().registerEvent() method. Here an example:

    Code:
    World.getInstance().registerEvent(new Event(60000) {
    			public void execute() {
    				p.getActionSender().deleteStaticObject(0, fireX, fireY);
    				p.getUpdateFlags().setAppearanceUpdateRequired(true);
    				World.getInstance().getItemManager().createGroundItem(Location.location(coords[0], coords[1], 0), new Item(592,1));
    				this.stop();
    			}
    		});
    This would execute an event after 60000 MS (60 seconds), delete an ground item and then stop the event (So it only executes once).
    <William.D | Perfectworld> before
    Reply With Quote  
     

  3. #3  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,789
    Discord
    View profile
    Rep Power
    5000
    What you think is a 'handler', dosen't exist in rs2hd.

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •