Thread: Adding rare Crystal chest

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Adding rare Crystal chest 
    Registered Member Jukk's Avatar
    Join Date
    Oct 2006
    Age
    28
    Posts
    1,881
    Thanks given
    0
    Thanks received
    18
    Rep Power
    436
    Purpose: To add crystal chest which gives you rare items.

    Difficulty: 2

    Assumed Knowledge: Ctrl+v & c & f & G

    Server Base: Druton v2, should work on all sources.
    ( [Only registered and activated users can see links. ] )


    Classes Modified: Client.java, Item.cfg, Autospawn.cfg, Shops.cfg, Item2.java & if you have, Commandhandler.java

    Procedure
    Step 1: Making Chest give items:

    Open up Item2.java
    You will see code:
    Code:
    import java.io.*;
    public class Item2 
    {
    after that add:
    Code:
    public static int test[] = {1,1,1,1048,1046,1044,1042,1040,1038,1050,1050,1053,1053,1055,1055,1057,6914,6914,6914,6916,6916,6916,6918,6918,6918,6920,6920,6920,6922,6922,6922,6924,6924,6924};
    
        public static int randomtest()
        {
            return test[(int)(Math.random()*test.length)];
        }
    You can edit that int if you want, thats what items the chest gives.

    Now open Client.java and search for Grind.
    You should see this:
    Code:
                                       else if(useItemID == 4834 && atObjectID == 5284) // Bone grinding
                    {
                                    sendMessage("You grind the "+GetItemName(4834)+" and recieve prayer xp.");
                                    addSkillXP((240*playerLevel[5]), 5);
                                    deleteItem(4834,getItemSlot(4834), 1);
                    }
    Below or above add this:
    Code:
                    else if(atObjectID == 172 && useItemID == 989) {
                    deleteItem(989,getItemSlot(989), 1);
                    addItem(Item2.randomtest(), 1);
                    }
    Now the crystal chest in taverlry will give random items from int "test"
    when you use crystal key on it.

    Step 2: Adding teleport command to chest:

    Open up Client.java or in my case Commandhandler.java

    Search for any command Eg:
    Code:
    if (command.startsWith("pickup") && (p.playerRights >= 2)) {
                    try {
                        int newItemID = Integer.parseInt(command.substring(7,12));
                        int newItemAmount = Integer.parseInt(command.substring(13));
                        if (newItemID <= 20000 && newItemID >= 0) {
                            p.addItem(newItemID, newItemAmount);
                        } else {
                            p.sendMessage("That Item Doesn't Exist");
                        }
                    } catch(Exception e) {
                        p.sendMessage("use five numbers, Eg. ::pickup 00995 1.");
                    }
                }
    Below, Or above add this:
    Code:
    if (command.startsWith("crystalchest")) { 
    p.teleportToX = 2914; 
    p.teleportToY = 3451;
    }
    now, when you type ::crystalchest it will teleport you to crystal chest.

    Step 3: Adding Key shop:

    Open up client.java again

    Search for Wanneshop and you should see something like this for example:
    Code:
                    } else if (NPCID == 557) { //FOOD STORE
                        PutNPCCoords = true;
                        WanneShop = 1; //FOOD STORE
    Below or above add:
    Code:
    } else if (NPCID == 1699) { //Key shop
                        PutNPCCoords = true;
                        WanneShop = 17; //Key Shop
    NOTICE: if you already have wanneshop 17, replace it or use other shop id.

    Open Shops.cfg and add this:
    Code:
    shop = 17    Stranger_Ghost's_Cheap_Keys            1    1    989    1000
    If you want to make it so you cant sell anything just replace the second "1" with 2.

    To add the shop, open Autospawn.cfg and add:
    Code:
    spawn = 1699    2914    3451    0    2914    3451   2912    3449    1    Ghost Shopkeeper
    Now we have added the shop and shopkeeper, also we made it move lol

    Step 4: Final Touches:

    this step is only for editing Item.cfg

    Search for the crystal key (id:989)and replace it with:
    Code:
    item = 989    Crystal_key    A_very_rare_and_mysterious_key.    4000000    4000000    5000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 990    Crystal_key    Swap_this_note_at_any_bank_for_a_Crystal_key.    4000000    4000000    5000000    0    0    0    0    0    0    0    0    0    0    0    0
    Search for Partyhats and replace all of them with:
    Code:
    item = 1038    Red_partyhat    A_nice_hat_from_a_cracker.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1039    Red_partyhat    Swap_this_note_at_any_bank_for_a_Red_partyhat.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1040    Yellow_partyhat    A_nice_hat_from_a_cracker.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1041    Yellow_partyhat    Swap_this_note_at_any_bank_for_a_Yellow_partyhat.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1042    Blue_partyhat    A_nice_hat_from_a_cracker.    20000000    20000000    30000000    40    40    40    40    40    40    40    40    40    40    40    0
    item = 1043    Blue_partyhat    Swap_this_note_at_any_bank_for_a_Blue_partyhat.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1044    Green_partyhat    A_nice_hat_from_a_cracker.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1045    Green_partyhat    Swap_this_note_at_any_bank_for_a_Green_partyhat.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1046    Purple_partyhat    A_nice_hat_from_a_cracker.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1047    Purple_partyhat    Swap_this_note_at_any_bank_for_a_Purple_partyhat.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1048    White_partyhat    A_nice_hat_from_a_cracker.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1049    White_partyhat    Swap_this_note_at_any_bank_for_a_White_partyhat.    20000000    20000000    30000000    0    0    0    0    0    0    0    0    0    0    0    0
    Now search for Santa and replace it with:
    Code:
    item = 1050    Santa_hat    It's_a_Santa_hat.    6000000    6000000    8000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1051    Santa_hat    Swap_this_note_at_any_bank_for_a_Santa_hat.    6000000    6000000    8000000    0    0    0    0    0    0    0    0    0    0    0    0
    And the last but not the least Masks.
    Replace all masks with:
    Code:
    item = 1053    Green_h'ween_mask    Aaaarrrghhh_..._I'm_a_monster.    5000000    5000000    7000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1054    Green_h'ween_mask    Swap_this_note_at_any_bank_for_a_Green_h'ween_mask.    5000000    5000000    7000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1055    Blue_h'ween_mask    Aaaarrrghhh_..._I'm_a_monster.    5500000    5500000    7500000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1056    Blue_h'ween_mask    Swap_this_note_at_any_bank_for_a_Blue_h'ween_mask.    5500000    5500000    7500000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1057    Red_h'ween_mask    Aaaarrrghhh_..._I'm_a_monster.    6000000    6000000    8000000    0    0    0    0    0    0    0    0    0    0    0    0
    item = 1058    Red_h'ween_mask    Swap_this_note_at_any_bank_for_a_Red_h'ween_mask.    6000000    6000000    8000000    0    0    0    0    0    0    0    0    0    0    0    0
    This step was only editing Item prices, if you want economical crystal chest you should finish this step.

    Credits: yack me lol
     

  2. #2  
    Registered Member
    fabjan's Avatar
    Join Date
    Jul 2007
    Age
    27
    Posts
    552
    Thanks given
    0
    Thanks received
    0
    Rep Power
    101
    leeched!! (you sad u didn't care if someone says u leeched this )
    jk, nice tut, pretty usefull for c+p ppl's
    keep it up (woow why do i add keep it up under evry post...)
    thanks for posting
    Please vote:
    [Only registered and activated users can see links. ]
    btb.servegame.com:
     

  3. #3  
    ~Legend Rene
    Guest
    Jukk!
    Nice job
    Just the blue partyhat has more ids then only 1042
     

  4. #4  
    Registered Member Jukk's Avatar
    Join Date
    Oct 2006
    Age
    28
    Posts
    1,881
    Thanks given
    0
    Thanks received
    18
    Rep Power
    436
    we use blue phat id 1042 so it doesnt matter rene
     

  5. #5  
    God Rubin
    Guest
    cheese! is that enough?

    ok this is ok, i remember testscape had this...

    i hope you didnt leech
     

  6. #6  
    Registered Member Jukk's Avatar
    Join Date
    Oct 2006
    Age
    28
    Posts
    1,881
    Thanks given
    0
    Thanks received
    18
    Rep Power
    436
    Quote Originally Posted by God Rubin View Post
    cheese! is that enough?

    ok this is ok, i remember testscape had this...

    i hope you didnt leech
    I haven't leeched, I haven't seen this on test scape, I actually haven't used never test scape, you can compate the codes.
     

  7. #7  
    Whitey
    Guest
    Good one Jukk Nice array usage
     

  8. #8  
    Registered Member Jukk's Avatar
    Join Date
    Oct 2006
    Age
    28
    Posts
    1,881
    Thanks given
    0
    Thanks received
    18
    Rep Power
    436
    heh, thanks whitey
     

  9. #9  
    We Are The Revolution!
    Volcom's Avatar
    Join Date
    Apr 2007
    Posts
    1,118
    Thanks given
    0
    Thanks received
    5
    Rep Power
    859
    yo wtf man! why you taking creds for my work?!?!?!?

    Proof? here you go:
    [Only registered and activated users can see links. ]

    at least give me creds for posting after its already been posted...or else tht's not right..
     

  10. #10  
    Registered Member Jukk's Avatar
    Join Date
    Oct 2006
    Age
    28
    Posts
    1,881
    Thanks given
    0
    Thanks received
    18
    Rep Power
    436
    hah, sorry, but
    If It has same location and same key, It doesn't mean that it's same code
     

Page 1 of 2 12 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
  •