Thread: Base to full Herblore, Fletching, etc.

Results 1 to 7 of 7
  1. #1 Base to full Herblore, Fletching, etc. 
    Registered Member

    Join Date
    Apr 2007
    Age
    25
    Posts
    296
    Thanks given
    14
    Thanks received
    18
    Rep Power
    299
    Add this method:

    Code:
    public void herblore(int delitem, int additem, int gfx, int emote, int addam, String message, int lvl, int xp)
    {
    if (playerLevel[15] >= lvl)
    {
    deleteItem(delitem, getItemSlot(delitem), 1);
    addItem(additem, addam);
    stillgfx(gfx, absX, absY);
    setAnimation(emote);
    sendMessage(message);
    addXP(xp, 15);
    }
    }
    If you have half a brain, you'd know how to fix this if it has errors, and how to make it work.

    Basic layout of it:

    herblore(vialofwaterid, unfinishedpot, gfxid, emoteid, 1, "message", requiredlvl, xpadded);

    Explanation:

    The Item ID Of a Vial Of Water.
    The Item ID of the unfinished potion.
    The GFX ID of making a potion.
    The Emote ID of making a potion.
    The Message to send when you make the potion.
    The level required to make the potion.
    The exp to add.

    You should be able to manipulate this and make full herblore, fletching, or whatever.
    Current project: PURSE
     

  2. #2  
    Banned

    Join Date
    May 2007
    Posts
    2,690
    Thanks given
    115
    Thanks received
    45
    Rep Power
    0
    is not full herblore ( if is full it needs iding ) and here is a example of it :

    Code:
                case 199:
                    if (playerLevel[15] >= 3) { // identifying guam
                    addSkillXP(3, 15);
                    deleteItem(199, GetItemSlot(199), 1);
                    sendMessage("You identify the herb");
                    addItem(249, 1);
                    } else if (playerLevel[15] < 3) {
                    sendMessage("You aren't high enough herblore to identify this herb");
                    }
                    GoOn = false;
                    break;
     

  3. #3  
    ~Legend Rene
    Guest
    Full herblore handled..
    public class Herblore {
    public static void identify(int playerID, int ItemID) {
    client c = (client) ProjectLegendX.playerHandler.players[playerID];
    int newItem = 0;
    int itemXP = 0;
    boolean keepOn = true;
    // Get New ItemID
    if (ItemID == 199 && c.playerLevel[15] >= 1) { newItem = 249; itemXP = 3; }
    else if (ItemID == 201 && c.playerLevel[15] >= 3) { newItem = 1534; itemXP = 3; }
    else if (ItemID == 203 && c.playerLevel[15] >= 5) { newItem = 251; itemXP = 4; }
    else if (ItemID == 205 && c.playerLevel[15] >= 11) { newItem = 253; itemXP = 5; }
    else if (ItemID == 207 && c.playerLevel[15] >= 20) { newItem = 255; itemXP = 6; }
    else if (ItemID == 209 && c.playerLevel[15] >= 25) { newItem = 257; itemXP = 8; }
    else if (ItemID == 211 && c.playerLevel[15] >= 30) { newItem = 2998; itemXP = 8; }
    else if (ItemID == 213 && c.playerLevel[15] >= 40) { newItem = 259; itemXP = 9; }
    else if (ItemID == 215 && c.playerLevel[15] >= 48) { newItem = 261; itemXP = 10; }
    else if (ItemID == 217 && c.playerLevel[15] >= 54) { newItem = 263; itemXP = 11; }
    else if (ItemID == 219 && c.playerLevel[15] >= 59) { newItem = 3000; itemXP = 12; }
    else if (ItemID == 2485 && c.playerLevel[15] >= 65) { newItem = 265; itemXP = 13; }
    else if (ItemID == 3049 && c.playerLevel[15] >= 67) { newItem = 2481; itemXP = 13; }
    else if (ItemID == 3051 && c.playerLevel[15] >= 70) { newItem = 267; itemXP = 14; }
    else { c.LegendS("You need a higher level to identify this herb."); keepOn = false; }
    if (keepOn) {
    int Slot = c.GetItemSlot(ItemID);
    c.LegendS("You identify the herb to be " + c.GetItemName(newItem) + ".");
    c.deleteItem(ItemID, Slot, 1);
    c.addItem(newItem, Slot);
    c.addSkillXP(15, itemXP);
    }
    }

    public static void combine(int playerID, int Main, int Second) {
    // Unfinished Potion IDs: 91-111, 2483, 3002, 3004, 3406, 4840, 7652-7658
    // Vial of water: 227
    client c = (client) ProjectLegendX.playerHandler.players[playerID];
    int newItem = 0;
    int itemXP = 0;
    int Slot = c.GetItemSlot(Main);
    boolean moveOn = true;
    if ((Main == 227 && Second == 249) || (Main == 249 && Second == 227)) { newItem = 91; itemXP = 12; } /* Unfinished #91 */
    else if ((Main == 91 && Second == 221) || (Main == 221 && Second == 91)) { newItem = 121; itemXP = 13; } /* Attack Pot */
    else if ((Main == 251 && Second == 227) || (Main == 227 && Second == 251)) { newItem = 93; itemXP = 19; } /* Attack Pot */
    else if ((Main == 93 && Second == 235) || (Main == 235 && Second == 93)) { newItem = 175; itemXP = 19; } /* Attack Pot */
    else { moveOn = false; }
    if (moveOn) {
    c.LegendS("You mix a " + c.GetItemName(Main) + " and a " + c.GetItemName(Second) + " to make a " + c.GetItemName(newItem) + ".");
    c.addSkillXP(15, itemXP);
    c.deleteItem(Main, Slot, 1);
    c.deleteItem(Second, c.GetItemSlot(Second), 1);
    c.addItem(newItem, Slot);
    }
    }

    public static void grind(int playerID, int ItemID) {
    client c = (client) ProjectLegendX.playerHandler.players[playerID];
    int newItem = 0;
    int itemXP = 0;
    int Slot = c.GetItemSlot(ItemID);
    boolean moveOn = true;
    if (ItemID == 237) { newItem = 235; }
    else { moveOn = false; }
    if (moveOn) {
    c.LegendS("You grind the " + c.GetItemName(ItemID) + " into " + c.GetItemName(newItem) + ".");
    c.addSkillXP(15, itemXP);
    c.deleteItem(ItemID, Slot, 1);
    c.addItem(newItem, Slot);
    }
    }
    }
     

  4. #4  
    Registered Member

    Join Date
    Apr 2007
    Age
    25
    Posts
    296
    Thanks given
    14
    Thanks received
    18
    Rep Power
    299
    Ah well. At least I tried.
    Current project: PURSE
     

  5. #5  
    Member
    Boomer's Avatar
    Join Date
    Sep 2006
    Posts
    1,282
    Thanks given
    309
    Thanks received
    795
    Rep Power
    1111
    Nice code, but it could be made simpler, the vial of water ID is the same no matter what potion, so that doesn't need to be a variable, the message will always be the same, just use GetItemName(item ID), also the emote and the gfx are the same.


    [Only registered and activated users can see links. ] ||| FightScape | InnerFantasy | PkIsle | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
     

  6. #6  
    Registered Member
    Your Name's Avatar
    Join Date
    Oct 2007
    Age
    29
    Posts
    1,442
    Thanks given
    0
    Thanks received
    4
    Rep Power
    172
    well can u do a farming one?
     

  7. #7  
    Horn ( old )
    Guest
    Not many people have farming am i rong?
     


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
  •