Thread: Hyperion Events

Results 1 to 9 of 9
  1. #1 Hyperion Events 
    Why you reading this?

    LoveandPower's Avatar
    Join Date
    Sep 2010
    Posts
    2,166
    Thanks given
    907
    Thanks received
    288
    Rep Power
    390
    So...I am trying to figure out hyperion events could somebody give me an example of how to properly use them?
    Spoiler for sig too large:


    Reply With Quote  
     

  2. #2  
    محمد

    Jamili's Avatar
    Join Date
    Jun 2010
    Posts
    405
    Thanks given
    93
    Thanks received
    249
    Rep Power
    307
    Code:
    CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    				@Override
    				public void execute(CycleEventContainer container) {
    				CODE_HERE
    				}
    
    				@Override
    				public void stop() {
    
    				}
    			}, DELAY

    Spoiler for Honorable mentions:

    Quote Originally Posted by JRFisher View Post
    Dude, learn yourself, it took me 17 months of continuous research to learn how to import a project.
    Quote Originally Posted by Pollution View Post
    When? And Idiot, I'm using a oldschool, it's not easy to get the command for an oldschool, retard c u.
    Quote Originally Posted by Waj_Assif View Post
    I sayin u dont contribute never aall u do is finna tryin attack ppl and always finna start fights .......
    Quote Originally Posted by Kris View Post
    You must be one of those slower breeds.
    Quote Originally Posted by Gandalf View Post
    Just piss off ploter hacker fella dumb fuck. Your a donor to a rsps community, I'm a Mainowner to a Private Server thats 7+ Years old. Lmfao kid, get a life. Don't let my name come out of your mouth again. Or it wont end nicely for you. Understand me big boy?
    Quote Originally Posted by Tojad View Post
    What do you know about Public Void and int without this [] is only 1 integer, why?
    Reply With Quote  
     

  3. #3  
    Why you reading this?

    LoveandPower's Avatar
    Join Date
    Sep 2010
    Posts
    2,166
    Thanks given
    907
    Thanks received
    288
    Rep Power
    390
    aren't cycleevents like...in PI ?

    I am referring to grahams event/world system for Hyperion
    Spoiler for sig too large:


    Reply With Quote  
     

  4. #4  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Code:
    //submits event
    		World.getWorld().submit(new Tick(1) {
    			@Override
    			//what happens when the even time has run through 
    			public void execute() {
    				//code  
                                      c.sendMessage("event executed");
    				//end event after code i s done
    				this.stop();
    			}
    		});
    Reply With Quote  
     

  5. Thankful users:


  6. #5  
    محمد

    Jamili's Avatar
    Join Date
    Jun 2010
    Posts
    405
    Thanks given
    93
    Thanks received
    249
    Rep Power
    307
    Quote Originally Posted by Harlan View Post
    Code:
    //submits event
    		World.getWorld().submit(new Tick(1) {
    			@Override
    			//what happens when the even time has run through 
    			public void execute() {
    				//code  
                                      c.sendMessage("event executed");
    				//end event after code i s done
    				this.stop();
    			}
    		});
    Doesn't it need a delay?

    I think EventManager or w.e is out dated. Use CycleEvent.

    Spoiler for Honorable mentions:

    Quote Originally Posted by JRFisher View Post
    Dude, learn yourself, it took me 17 months of continuous research to learn how to import a project.
    Quote Originally Posted by Pollution View Post
    When? And Idiot, I'm using a oldschool, it's not easy to get the command for an oldschool, retard c u.
    Quote Originally Posted by Waj_Assif View Post
    I sayin u dont contribute never aall u do is finna tryin attack ppl and always finna start fights .......
    Quote Originally Posted by Kris View Post
    You must be one of those slower breeds.
    Quote Originally Posted by Gandalf View Post
    Just piss off ploter hacker fella dumb fuck. Your a donor to a rsps community, I'm a Mainowner to a Private Server thats 7+ Years old. Lmfao kid, get a life. Don't let my name come out of your mouth again. Or it wont end nicely for you. Understand me big boy?
    Quote Originally Posted by Tojad View Post
    What do you know about Public Void and int without this [] is only 1 integer, why?
    Reply With Quote  
     

  7. #6  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Quote Originally Posted by Snoop Dogg View Post
    Doesn't it need a delay?

    I think EventManager or w.e is out dated. Use CycleEvent.
    the delay is set in the Tick class constructor
    Reply With Quote  
     

  8. #7  
    Why you reading this?

    LoveandPower's Avatar
    Join Date
    Sep 2010
    Posts
    2,166
    Thanks given
    907
    Thanks received
    288
    Rep Power
    390
    so...would something like this be correct?

    Code:
    //public void execute(CycleEventContainer container) {
    			public void execute() {
    			for(int j = 0; j < stalls.length;) {
            		int random = Misc.random(60);
            		   if(random > 30) {
            		       c.getPA().addSkillXP(stalls[j][2] * Config.THIEVING_EXPERIENCE, c.playerThieving);
            		       c.sendMessage("You successfully steal from this stall.");
       			    	giveItem(c, ObjId, j);
       			    	return;
            			} else {
            			    //fails
            			    //now handle the npc attacking
            			    c.sendMessage("You fail to thieve from this stall.");
            			    //TODO: make a check if npcs are around, if they are then make them attack the player
            			    return;
            			}
    			}
    		    }
    		    //@Override
    		    //public void stop() {}
    		    
    			}this.stop();
    				}
    			});
    	, 2);
    lol ignore the items commented out
    Spoiler for sig too large:


    Reply With Quote  
     

  9. #8  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Quote Originally Posted by Loveandpower View Post
    so...would something like this be correct?

    Code:
    //public void execute(CycleEventContainer container) {
    			public void execute() {
    			for(int j = 0; j < stalls.length;) {
            		int random = Misc.random(60);
            		   if(random > 30) {
            		       c.getPA().addSkillXP(stalls[j][2] * Config.THIEVING_EXPERIENCE, c.playerThieving);
            		       c.sendMessage("You successfully steal from this stall.");
       			    	giveItem(c, ObjId, j);
       			    	return;
            			} else {
            			    //fails
            			    //now handle the npc attacking
            			    c.sendMessage("You fail to thieve from this stall.");
            			    //TODO: make a check if npcs are around, if they are then make them attack the player
            			    return;
            			}
    			}
    		    }
    		    //@Override
    		    //public void stop() {}
    		    
    			}this.stop();
    				}
    			});
    	, 2);
    lol ignore the items commented out
    not at all, and there's not even using hyperion events?
    Reply With Quote  
     

  10. #9  
    Why you reading this?

    LoveandPower's Avatar
    Join Date
    Sep 2010
    Posts
    2,166
    Thanks given
    907
    Thanks received
    288
    Rep Power
    390
    ah okay...I gotcha... thanks
    Spoiler for sig too large:


    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

Similar Threads

  1. [PJA/Hyperion] Custom Object Loading [PJA/Hyperion]
    By helloevery1 in forum Snippets
    Replies: 20
    Last Post: 11-06-2012, 12:25 AM
  2. Replies: 4
    Last Post: 07-11-2011, 07:29 PM
  3. Replies: 11
    Last Post: 02-20-2011, 09:05 PM
  4. Replies: 6
    Last Post: 06-16-2010, 01:45 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •