Thread: [Galkons base] Adding Run Orb

Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1 [Galkons base] Adding Run Orb 
    Registered Member

    Join Date
    Dec 2007
    Age
    29
    Posts
    551
    Thanks given
    0
    Thanks received
    2
    Rep Power
    503
    Purpose: Adding the run Orb
    Difficulty: 1/10, if you have common sense and basic client/Java knowledge.
    Assumed Knowledge: Basic client knowledge, basic Java knowledge.
    Classes Modified: client.java and Sprite.java
    Client Base: Galkons recent refactored base.

    Step 1:

    Go into sprite.java and under

    Code:
    } else if (img.equalsIgnoreCase("prayericon")) {
    				myWidth = 20;
    				myHeight = 20;
    Add this,

    Code:
    } else if (img.equalsIgnoreCase("runorb") || img.equalsIgnoreCase("runclick") || img.equalsIgnoreCase("hoverorbrun")
    				|| img.equalsIgnoreCase("hoverorbrun2")) {
    				myWidth = 57;
    				myHeight = 34;
    Save and close Sprite.java

    Step 2:
    In client.java Find this method.

    Code:
    public void drawHPOrb() {
    Above it add,

    Code:
    public int playerEnergy = 0;
    	
    	public void drawRunOrb() {
    		if (!runClicked) {
    			if (super.mouseX > 713 && super.mouseX < 765 && super.mouseY > 83 && super.mouseY < 118) {
    				hoverorbrun.drawSprite(185, 85);
    			} else {
    				runorb.drawSprite(185, 85);
    			}
    		} else {
    			if (super.mouseX > 713 && super.mouseX < 765 && super.mouseY > 83 && super.mouseY < 118) {
    				hoverorbrun2.drawSprite(185, 85);
    			} else {
    				runClick.drawSprite(185, 85);
    			}
    		}
    		smallText.method382(65280, 229, ""+playerEnergy, 111, true);
    	}
    Step 3:
    Find,
    Code:
    emptyOrb = new Sprite("emptyorb");
    Under it add,

    Code:
    hoverorbrun2 = new Sprite("hoverorbrun2");
    			hoverorbrun = new Sprite("hoverorbrun");
    			runClick = new Sprite("runclick");
    			runorb = new Sprite("runorb");
    ]

    Step 4:
    Find this,
    Code:
    private Sprite hitPointsFill;
    Above it add,

    Code:
    private Sprite hoverorbrun;
    	private Sprite hoverorbrun2;
    	private Sprite runClick;
    	private Sprite runorb;
    Step 5:

    Find this,
    Code:
    hitPointsFill = null;
    Above it add,

    Code:
    hoverorbrun2 = null;
    		hoverorbrun = null;
    		runClick = null;
    		runorb = null;
    Step 6:

    Find this,

    Code:
    drawPrayerOrb();
    Under it add,

    Code:
    drawRunOrb();
    Step 7:

    Find this,

    Code:
    if(pktType == 110)
    Under,
    Code:
    energy = inStream.readUnsignedByte();
    Add this,

    Code:
    playerEnergy = energy;
    Step 8:

    Find,
    Code:
    if(l == 1004) {
    			if(tabInterfaceIDs[10] != -1) {
    				needDrawTabArea = true;
    				tabID = 10;
    				tabAreaAltered = true;
    			}
    		}
    Under it add,

    Code:
    if (l == 1051) {
    			if(!runClicked){
    				runClicked = true;
    				stream.createFrame(185); 
    				stream.writeWord(153);
    			} else {
    				runClicked = false;
    				stream.createFrame(185); 
    				stream.writeWord(152);
    			}
    		}
    Step 9:

    Delclare
    Code:
    public boolean runClicked = false;
    Step 10:

    Find this,

    Code:
    if(super.mouseX >= 742 && super.mouseX <= 764 && super.mouseY >= 1 && super.mouseY <= 23 && tabInterfaceIDs[10] != -1) {
    			menuActionName[1] = "Logout";
    			menuActionID[1] = 1004;
    			menuActionRow = 2;
    under it add,

    Code:
    } else if (super.mouseX > 713 && super.mouseX < 765 && super.mouseY > 83 && super.mouseY < 118) {
    			menuActionName[1] = "Run";
    			menuActionID[1] = 1051;
    			menuActionRow = 2;
    		}

    Save and close client.java.

    SERVER SIDE

    Step 11:

    Add this method into client.java or where you keep your niffty methods.

    Code:
    public void sendEnergy() {
    		outStream.createFrame(110);
    		outStream.writeByte(playerEnergy);
    	}
    Step 12:
    In the
    Code:
    initialize()
    method add in there somewhere,

    Code:
    sendEnergy();
    NOW, if you have decreasing/increasing energy you need to add
    Code:
    sendEnergy();
    in their for it to update!

    Also, get rid of any WirteEnergy(); methods and replace it with sendEnergy();

    EASIEST STEP

    Download these spirtes and add them into the Sprites folder.

    [Only registered and activated users can see links. ]

    Please post errors as i probably missed something, there is no anti leech so please tell me if u get errors.

    Enjoy...
    Reply With Quote  
     

  2. #2  
    Rigged
    Guest
    Does this light up when your cursor is over it and when you click it, you run?
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Dec 2007
    Age
    29
    Posts
    551
    Thanks given
    0
    Thanks received
    2
    Rep Power
    503
    Quote Originally Posted by Rigged View Post
    Does this light up when your cursor is over it and when you click it, you run?
    The hovering is this method,

    Code:
    public void drawRunOrb() {
    		if (!runClicked) {
    			if (super.mouseX > 713 && super.mouseX < 765 && super.mouseY > 83 && super.mouseY < 118) {
    				hoverorbrun.drawSprite(185, 85);
    			} else {
    				runorb.drawSprite(185, 85);
    			}
    		} else {
    			if (super.mouseX > 713 && super.mouseX < 765 && super.mouseY > 83 && super.mouseY < 118) {
    				hoverorbrun2.drawSprite(185, 85);
    			} else {
    				runClick.drawSprite(185, 85);
    			}
    		}
    		smallText.method382(65280, 229, ""+playerEnergy, 111, true);
    	}
    And yes of course it runs when you click it take time to read the tutorial please.
    Reply With Quote  
     

  4. #4  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    WAY WAY Too difficult man.
    But nice i guess.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Dec 2007
    Age
    29
    Posts
    551
    Thanks given
    0
    Thanks received
    2
    Rep Power
    503
    Quote Originally Posted by Conjuration View Post
    WAY WAY Too difficult man.
    But nice i guess.
    I find it WAY WAY too easy to be honest.
    Reply With Quote  
     

  6. #6  
    Retired. Stop PMing me.

    Galkon's Avatar
    Join Date
    Nov 2007
    Age
    14
    Posts
    7,528
    Thanks given
    1,783
    Thanks received
    2,822
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by BlessTheFall View Post
    I find it WAY WAY too easy to be honest.
    Actually this is quite a lot of code, more than I used, but whatever works! Still, not bad.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Yeah look at my tutorial for it, it takes like 1/4 of the code and no serverside code.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Dec 2007
    Age
    29
    Posts
    551
    Thanks given
    0
    Thanks received
    2
    Rep Power
    503
    Quote Originally Posted by Galkon View Post
    Actually this is quite a lot of code, more than I used, but whatever works! Still, not bad.
    I suppose to could make runorb spirte like

    Code:
    private Sprite[] runorb = new Sprite[4];
    Code:
    runorb[0].drawSprite(num, num);
    Code:
    for (int i = 0; i < 4; i++) {
        runorb[i] = null;
    }
    or whatever,

    But thats only one way to be shorted.

    Quote Originally Posted by Conjuration View Post
    Yeah look at my tutorial for it, it takes like 1/4 of the code and no serverside code.
    Ugh, server sided edit only if you wanna send your energy amount the RIGHT WAY, not some fucking sendQuest method.
    Reply With Quote  
     

  9. #9  
    Retired. Stop PMing me.

    Galkon's Avatar
    Join Date
    Nov 2007
    Age
    14
    Posts
    7,528
    Thanks given
    1,783
    Thanks received
    2,822
    Discord
    View profile
    Rep Power
    5000
    Yes. And btw I use a sendString method and it works perfectly fine.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Dec 2007
    Age
    29
    Posts
    551
    Thanks given
    0
    Thanks received
    2
    Rep Power
    503
    Quote Originally Posted by Galkon View Post
    Yes. And btw I use a sendString method and it works perfectly fine.
    Jagex didn't make this packet for nothing,

    Code:
    if(pktType == 110)
    			{
    				if(tabID == 12)
    					needDrawTabArea = true;
    				energy = inStream.readUnsignedByte();
    				pktType = -1;
    				return true;
    			}
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

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