Thread: [PI] Walking in events - Not working!

Results 1 to 8 of 8
  1. #1 [PI] Walking in events - Not working! 
    Banned
    Join Date
    Mar 2013
    Posts
    143
    Thanks given
    0
    Thanks received
    17
    Rep Power
    0
    Hello!

    I'm currently trying to add Wilderness Agility course, but I have been stuck since this morning.
    I can't find the issue. It's really irritating me and I'll decide to give up soon..

    If anyone can help me, that'd be great!!

    Alright, so the issue is, that my walkTo method doesn't work Inside events. I've tried the Task scheduler, Cycle eventhandler and even the normal eventhandler, same issue.

    I'm currently using this command:
    Code:
    	if(playerCommand.equalsIgnoreCase("test")) {
    		c.getPA().walkTo(0, 1);
    		return;
    	}
    When I type ::test, my players walks. It works 100%!
    BUT if I put the walkTo in an event, it won't do it.




    Code:
    	public static void enterPipe(final Client c) {
    	//Start event :)
    			eventTicker = 0;
    			c.cantDoActions = false;
    			c.startAnimation(844);
    		CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    			@Override
    			public void execute(CycleEventContainer container) {
    				eventTicker++; // 13 needed
    				c.startAnimation(844);
    				c.getPA().playerWalk(0, 1);
    			//	c.startAnimation(844);
    			}
    			//Stop event :)
    			@Override
    			public void stop() {
    				eventTicker = 0;
    				c.cantDoActions = false;
    			}
    			
    		}, 3);
    	}
    The red part indicates that each 3 cycles, the player will walk 1 Y, but it doesn't work..

    Here's the method for walkingTo:

    Code:
     public void walkTo(int i, int j) {
    		 c.newWalkCmdSteps = 0;
    		 if (++c.newWalkCmdSteps > 50) {
    			 c.newWalkCmdSteps = 0;
    		 }
    		 int k = c.getX() + i;
    		 k -= c.mapRegionX * 8;
    		 c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;
    		 int l = c.getY() + j;
    		 l -= c.mapRegionY * 8;
    
    		 for (int n = 0; n < c.newWalkCmdSteps; n++) {
    			 c.getNewWalkCmdX()[n] += k;
    			 c.getNewWalkCmdY()[n] += l;
    		 }
    	 }
    As I mentioned before, any help is greatly appriciated!!
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Mar 2013
    Posts
    143
    Thanks given
    0
    Thanks received
    17
    Rep Power
    0
    bump
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Mar 2013
    Posts
    143
    Thanks given
    0
    Thanks received
    17
    Rep Power
    0
    bump, rep++ if anyone can help me.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jul 2011
    Posts
    691
    Thanks given
    163
    Thanks received
    161
    Rep Power
    0
    Quote Originally Posted by DesolaceRSPS View Post
    Code:
    		c.getPA().walkTo(0, 1);
    Code:
    				c.getPA().playerWalk(0, 1);
    I know this is going to be a lot to ask of you. But I am going to ask you to very closely inspect the two different methods you are calling.
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Mar 2013
    Posts
    143
    Thanks given
    0
    Thanks received
    17
    Rep Power
    0
    Quote Originally Posted by Jesse Pinkman View Post
    I know this is going to be a lot to ask of you. But I am going to ask you to very closely inspect the two different methods you are calling.
    It's the same method (it does the same thing).
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Mar 2013
    Posts
    143
    Thanks given
    0
    Thanks received
    17
    Rep Power
    0
    bump
    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Mar 2013
    Posts
    143
    Thanks given
    0
    Thanks received
    17
    Rep Power
    0
    bump
    Reply With Quote  
     

  8. #8  
    Aymen
    Guest
    bump
    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. Replies: 17
    Last Post: 01-17-2013, 06:07 AM
  2. Replies: 2
    Last Post: 01-09-2013, 09:44 PM
  3. Replies: 5
    Last Post: 08-22-2010, 04:36 AM
  4. Replies: 0
    Last Post: 02-15-2009, 07:06 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
  •