Thread: Pi how would i make infinite run like near reality?

Results 1 to 4 of 4
  1. #1 Pi how would i make infinite run like near reality? 
    Registered Member Obito Uchiha's Avatar
    Join Date
    Oct 2010
    Posts
    765
    Thanks given
    2
    Thanks received
    30
    Rep Power
    46
    Hey i was wondering how i could make infinite run just like near reality.
    If u know this Pleas be nice and leave a message thanks.

    And ill even rep
    Reply With Quote  
     

  2. #2  
    GooRoo
    Guest
    1. Formula (Add this in PlayerAssistant)
    Code:
    public double getAgilityRunRestore() {
    	return 2260 - (c.playerLevel[16] * 10);
    }
    2. In Client class under "process() {" (If you use eventmanager for this, set the timer on a tick (600ms))
    Code:
    if (runEnergy < 100) {
    	if (System.currentTimeMillis() > getPA().getAgilityRunRestore(this) + lastRunRecovery) {
    		runEnergy++;
    		lastRunRecovery = System.currentTimeMillis();
    		getPA().sendFrame126(runEnergy+"%", 149);
    	}
    }
    3. In Player class under "absY += Misc.directionDeltaY[dir];"
    Code:
    if (isRunning()) {
    	Client c = (Client) this;
    	if (runEnergy > 0) {
    		runEnergy--;
    		c.getPA().sendFrame126(runEnergy+"%", 149);
    	} else {
    		isRunning2 = false;
    		c.getPA().setConfig(173, 0);
    	}
    }
    4. Add these anywhere in Player class
    Code:
    public int runEnergy = 100;
    public long lastRunRecovery;
    public boolean isRunning() {
    	return isNewWalkCmdIsRunning() || (isRunning2 && isMoving);
    }
    5. To save the energy when a player logs, place these in PlayerSave class
    Code:
    characterfile.write("run-energy = ", 0, 13);
    characterfile.write(Integer.toString(p.runEnergy), 0, Integer.toString(p.runEnergy).length());
    characterfile.newLine();
    Code:
    else if (token.equals("run-energy")) {
    	p.runEnergy = Integer.parseInt(token2);
    }
    and in client class, somewhere in the "initialize" method add:
    Code:
    c.getPA().sendFrame126(runEnergy+"%", 149);
    6. To make the run button work, go to ClickingButtons packet and add:
    Code:
    			case 152 :
    				if (c.runEnergy < 1) {
    					c.isRunning = false;
    					c.getPA().setConfig(173, 0);
    					return;
    				}
    				c.isRunning = !c.isRunning;
    				c.getPA().setConfig(173, c.isRunning ? 0 : 1);
    				break;
    And that's it
    Credits to Russian.
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Apr 2011
    Age
    29
    Posts
    1,360
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    He wants it so it lasts forever, not drains right away
    Reply With Quote  
     

  4. #4  
    Registered Member PvM Hussain's Avatar
    Join Date
    Aug 2013
    Posts
    266
    Thanks given
    23
    Thanks received
    3
    Rep Power
    11
    Player.java

    Code:
    				else {
    					isMoving = true;
    					str.writeBits(2, 2);		
    					str.writeBits(3, Misc.xlateDirectionToClient[dir1]);
    					str.writeBits(3, Misc.xlateDirectionToClient[dir2]);
    					if(updateRequired) str.writeBits(1, 1);		
    					else str.writeBits(1, 0);
    					if (playerEnergy > 0) {
    						playerEnergy -= 1; // i removed this so it wont drain :D
    					} else {
    						isRunning2 = true; //changed from false to true  so i can even run if it is 0% &
    }
    				}
    http://i43.tinypic.com/24v1la8.gif
    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. second reality client run.bat HELP!
    By Obito Uchiha in forum Help
    Replies: 7
    Last Post: 10-07-2013, 02:22 AM
  2. Infinite Run Energy!
    By im s0 fly in forum Help
    Replies: 6
    Last Post: 10-11-2012, 03:23 AM
  3. Run Energy the new, the old, or infinite?
    By Defcon in forum Voting
    Replies: 8
    Last Post: 08-25-2010, 02:57 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •