Thread: [Ip] Help with Adding hunter and construction

Results 1 to 6 of 6
  1. #1 [Ip] Help with Adding hunter and construction 
    Registered Member
    Join Date
    Nov 2012
    Posts
    123
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Will Rep .. Need help adding the hunter and construction skill tab someone plz help!
    Reply With Quote  
     

  2. #2  
    Registered

    Join Date
    Sep 2012
    Age
    29
    Posts
    1,984
    Thanks given
    774
    Thanks received
    846
    Rep Power
    5000
    make a new file in the skills folder named Hunter.java and add all of this in it


    Code:
    package server.model.players.skills;
     
    import server.model.players.Client;
    import server.Config;
    import server.util.Misc;
     
     
     
    public class Hunter {
     
        Client c;
         
         
        public Hunter(Client c) {
            this.c = c;
        }
     
     
         
    public void CatchImpling(String npcName, int Net, int npcId, int itemId, int AmtExp, int Req, int playerId) {
    //npcName = Server.npcHandler.getNpcListName(npcId);
        if (System.currentTimeMillis() - c.foodDelay >= 1500) { 
            if (c.playerLevel[21] >= Req) { 
                if (HasNet()) { 
                    if (c.getItems().playerHasItem(11260,1)){
                        HandleCatch(itemId, AmtExp, Req, "Impling");
                    }else{ 
                        c.sendMessage("you need a impling jar to catch this");
                        return;         
                    }   
                } else { 
                    c.sendMessage("You need to equip a butterfly net!"); 
                    return;
                }   
            } else {
                c.sendMessage("You need atleast "+ Req +" Hunter To catch that Impling!");
                return;
            }
                c.foodDelay = System.currentTimeMillis();
        }
    }
     
    public void CatchButterfly(String npcName, int Net, int npcId, int itemId, int AmtExp, int Req, int playerId) {
    //npcName = Server.npcHandler.getNpcListName(npcId);
        if (System.currentTimeMillis() - c.foodDelay > 1500) { //anti spamm
            if (c.playerLevel[21] >= Req) { //first we check if he's high enough to catch
                if (HasNet()) { 
                    HandleCatch(itemId, AmtExp, Req, "Butterfly");
                } else {
                    c.sendMessage("You need to be wearing a butterfly net!"); 
                    return;
                    }   
            } else {
                c.sendMessage("You need at least "+ Req +" Hunter To catch that Butterfly!");
                return;
            }
                c.foodDelay = System.currentTimeMillis();
        }
    }
     
     
    public void HandleCatch(int ID, int XP,int Req, String Name) {
        if (c.playerLevel[21] + Misc.random(10) > Misc.random(20) + Req) {
            c.sendMessage("You Cought a"+ Name +"!"); 
            c.getItems().addItem(ID, 1); 
            c.startAnimation(6999);
            c.getPA().addSkillXP(XP, 21); 
        } else {
            c.sendMessage("You Failed To Catch The "+Name+".");
            c.startAnimation(6999);
        }
    }
     
    public boolean HasNet(){
        if (c.playerEquipment[c.playerWeapon] == 10010 || c.playerEquipment[c.playerWeapon] == 11259){
            return true;
    }else{ 
    return false;
    }
    }
     
    public void RefreshRabbits() {
        c.getPA().object(19337, 2257, 3336, 0, 10);
        c.getPA().object(19337, 2261, 3334, 1, 10);
        }
         
    public void giveRabbit() {
    if (Misc.random(10) < 3){
        if (Misc.random(25) == 1){
            c.getItems().addItem(10132, 1);
        }else{
            c.getItems().addItem(3226, 1);
        }
    }else{
        c.sendMessage("you fail to catch the rabbit.");
    }
    }
     
     
     
    }
    now open client.java

    look for catchnpc and catchhunternpc

    remove both of those methods


    now look for this

    Code:
    private Crafting crafting = new Crafting(this);
    then add this under it


    Code:
    private Hunter hunter = new Hunter(this);
    now still in client look for


    Code:
    public Crafting getCrafting()
    and then add this under that


    Code:
    public Hunter getHunter() {
        return hunter;
    }
    now go to auctionhandler and find the hunter npcs and change the beginning of the imps to this


    Code:
    c.gethunter().CatchImpling
    and change the beginning of the butterfly to this


    Code:
    c.gethunter().CatchButterfly
    they should look like this


    Code:
    c.gethunter().CatchImpling("Dragon Impling", 10010, 6064, 11256, 25000, 90, c.playerId);
    c.gethunter().CatchButterfly("Black Warlock", 10010, 5082, 10014, 18000, 85, c.playerId);
    and last for now add this under object first click in actionhandler


    Code:
    case 19337:
         int X = c.objectX;
         int Y = c.objectY;
            c.getPA().object(-1, X, Y, 0, 10);      
            c.rabbitNeedSpawn = true;   
            c.rabbitTimer = 15; 
            c.getPA().addSkillXP(1500, 21);
            c.getPA().object(19338, X, Y, 0, 10);   
            c.sendMessage("you flush the rabbit out the hole and find a rabbit");
            c.gethunter().giveRabbit();
     
    break;
    now add this in your client.java at the top near all the other int's

    Code:
    public boolean rabbitNeedSpawn = false;
    public int rabbitTimer = 0;
    then add this in the client.java process


    Code:
    if (rabbitNeedSpawn == true && rabbitTimer <= 0){
        RefreshRabbits();
    }else{
        rabbitTimer -- ;
    }
    add this anywhere in client.java


    Code:
    public void RefreshRabbits() {
        getPA().object(19337, 2257, 3336, 0, 10);
        getPA().object(19337, 2261, 3334, 1, 10);
        }
         
    public void giveRabbit() {
    if (Misc.random(10) <= 2){
        if (Misc.random(25) == 1){
            getItems().addItem(10132, 1);
        }else{
            getItems().addItem(3226, 1);
        }
    }else{
        sendMessage("you fail to catch the rabbit.");
    }
    http://www.rune-server.org/runescape...0-done-pi.html

    Reply With Quote  
     

  3. #3  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Quote Originally Posted by Volsung View Post
    make a new file in the skills folder named Hunter.java and add all of this in it


    Code:
    package server.model.players.skills;
     
    import server.model.players.Client;
    import server.Config;
    import server.util.Misc;
     
     
     
    public class Hunter {
     
        Client c;
         
         
        public Hunter(Client c) {
            this.c = c;
        }
     
     
         
    public void CatchImpling(String npcName, int Net, int npcId, int itemId, int AmtExp, int Req, int playerId) {
    //npcName = Server.npcHandler.getNpcListName(npcId);
        if (System.currentTimeMillis() - c.foodDelay >= 1500) { 
            if (c.playerLevel[21] >= Req) { 
                if (HasNet()) { 
                    if (c.getItems().playerHasItem(11260,1)){
                        HandleCatch(itemId, AmtExp, Req, "Impling");
                    }else{ 
                        c.sendMessage("you need a impling jar to catch this");
                        return;         
                    }   
                } else { 
                    c.sendMessage("You need to equip a butterfly net!"); 
                    return;
                }   
            } else {
                c.sendMessage("You need atleast "+ Req +" Hunter To catch that Impling!");
                return;
            }
                c.foodDelay = System.currentTimeMillis();
        }
    }
     
    public void CatchButterfly(String npcName, int Net, int npcId, int itemId, int AmtExp, int Req, int playerId) {
    //npcName = Server.npcHandler.getNpcListName(npcId);
        if (System.currentTimeMillis() - c.foodDelay > 1500) { //anti spamm
            if (c.playerLevel[21] >= Req) { //first we check if he's high enough to catch
                if (HasNet()) { 
                    HandleCatch(itemId, AmtExp, Req, "Butterfly");
                } else {
                    c.sendMessage("You need to be wearing a butterfly net!"); 
                    return;
                    }   
            } else {
                c.sendMessage("You need at least "+ Req +" Hunter To catch that Butterfly!");
                return;
            }
                c.foodDelay = System.currentTimeMillis();
        }
    }
     
     
    public void HandleCatch(int ID, int XP,int Req, String Name) {
        if (c.playerLevel[21] + Misc.random(10) > Misc.random(20) + Req) {
            c.sendMessage("You Cought a"+ Name +"!"); 
            c.getItems().addItem(ID, 1); 
            c.startAnimation(6999);
            c.getPA().addSkillXP(XP, 21); 
        } else {
            c.sendMessage("You Failed To Catch The "+Name+".");
            c.startAnimation(6999);
        }
    }
     
    public boolean HasNet(){
        if (c.playerEquipment[c.playerWeapon] == 10010 || c.playerEquipment[c.playerWeapon] == 11259){
            return true;
    }else{ 
    return false;
    }
    }
     
    public void RefreshRabbits() {
        c.getPA().object(19337, 2257, 3336, 0, 10);
        c.getPA().object(19337, 2261, 3334, 1, 10);
        }
         
    public void giveRabbit() {
    if (Misc.random(10) < 3){
        if (Misc.random(25) == 1){
            c.getItems().addItem(10132, 1);
        }else{
            c.getItems().addItem(3226, 1);
        }
    }else{
        c.sendMessage("you fail to catch the rabbit.");
    }
    }
     
     
     
    }
    now open client.java

    look for catchnpc and catchhunternpc

    remove both of those methods


    now look for this

    Code:
    private Crafting crafting = new Crafting(this);
    then add this under it


    Code:
    private Hunter hunter = new Hunter(this);
    now still in client look for


    Code:
    public Crafting getCrafting()
    and then add this under that


    Code:
    public Hunter getHunter() {
        return hunter;
    }
    now go to auctionhandler and find the hunter npcs and change the beginning of the imps to this


    Code:
    c.gethunter().CatchImpling
    and change the beginning of the butterfly to this


    Code:
    c.gethunter().CatchButterfly
    they should look like this


    Code:
    c.gethunter().CatchImpling("Dragon Impling", 10010, 6064, 11256, 25000, 90, c.playerId);
    c.gethunter().CatchButterfly("Black Warlock", 10010, 5082, 10014, 18000, 85, c.playerId);
    and last for now add this under object first click in actionhandler


    Code:
    case 19337:
         int X = c.objectX;
         int Y = c.objectY;
            c.getPA().object(-1, X, Y, 0, 10);      
            c.rabbitNeedSpawn = true;   
            c.rabbitTimer = 15; 
            c.getPA().addSkillXP(1500, 21);
            c.getPA().object(19338, X, Y, 0, 10);   
            c.sendMessage("you flush the rabbit out the hole and find a rabbit");
            c.gethunter().giveRabbit();
     
    break;
    now add this in your client.java at the top near all the other int's

    Code:
    public boolean rabbitNeedSpawn = false;
    public int rabbitTimer = 0;
    then add this in the client.java process


    Code:
    if (rabbitNeedSpawn == true && rabbitTimer <= 0){
        RefreshRabbits();
    }else{
        rabbitTimer -- ;
    }
    add this anywhere in client.java


    Code:
    public void RefreshRabbits() {
        getPA().object(19337, 2257, 3336, 0, 10);
        getPA().object(19337, 2261, 3334, 1, 10);
        }
         
    public void giveRabbit() {
    if (Misc.random(10) <= 2){
        if (Misc.random(25) == 1){
            getItems().addItem(10132, 1);
        }else{
            getItems().addItem(3226, 1);
        }
    }else{
        sendMessage("you fail to catch the rabbit.");
    }
    http://www.rune-server.org/runescape...0-done-pi.html
    Nice ;D


    Sick sig.

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  4. #4  
    CodexBot


    Join Date
    Sep 2011
    Age
    30
    Posts
    884
    Thanks given
    136
    Thanks received
    153
    Rep Power
    148
    Volsung he didn't ask how to add hunter he asked how to add hunter and construction skill tabs.
    Reply With Quote  
     

  5. #5  
    Registered

    Join Date
    Sep 2012
    Age
    29
    Posts
    1,984
    Thanks given
    774
    Thanks received
    846
    Rep Power
    5000
    Quote Originally Posted by Geek View Post
    Volsung he didn't ask how to add hunter he asked how to add hunter and construction skill tabs.
    did not see that bit lol

    try following this guide, for the 602 skill tab.

    http://www.rune-server.org/runescape...skill-tab.html

    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2012
    Posts
    123
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    I dnt wanna add hunting yet im trying to just add the skill tab that way hunter and construction skills show on my client
    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. [PI] Removing Hunter + Construction Skill
    By Vault in forum Tutorials
    Replies: 39
    Last Post: 01-01-2014, 07:09 PM
  2. [Refactored] Hunter and Construction
    By +Reality+ in forum Help
    Replies: 1
    Last Post: 07-05-2012, 01:09 PM
  3. Replies: 6
    Last Post: 05-15-2011, 07:38 PM
  4. Construction, Hunter StatIcons?
    By R0cky 0wnz in forum RS2 Server
    Replies: 6
    Last Post: 06-16-2010, 08:40 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
  •