Thread: Crystal chest V2

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Crystal chest V2 
    We Are The Revolution!
    Volcom's Avatar
    Join Date
    Apr 2007
    Posts
    1,118
    Thanks given
    0
    Thanks received
    5
    Rep Power
    859
    Purpose:To add crystal chest V2 to your server along with my steel drags!
    i made a V1 (4 months ago) [Only registered and activated users can see links. ]

    Difficulty: 1-2 (must have 2 arms, and hopefully a head.)

    Server Base: volcomscapeV2 (my own source)

    Classes Modified: Client.java, item2.java, autospawn.cfg, and NPCHandler.java

    ~Procedure~
    Step 1: Open up Client.java and declare this void

    Code:
    public void crystalkey()
    {
            sendMessage("You have opened the crystal chest!");
            deleteItem(989,getItemSlot(989),1);
            addItem(1615,1);
            addItem(Item2.randomCrystal(), 1);
    }

    Above is the void that declares the random item it gives you when you use the crystal key on it, also it deletes the key from your inventory.


    step2: In client.java search rune();. under tht last } add this

    Code:
     //crystal key
                    else if(useItemID == 989 && (atObjectX == 2914 && atObjectY == 3452))
                    {
                    crystalkey();
                    }

    this is showing that you use the crystal key(ID 989) at the object crystal chest


    after adding that code it should look like this:

    Code:
            rune();
                    }
                                                                           
                    //crystal key
                    else if(useItemID == 989 && (atObjectX == 2914 && atObjectY == 3452))
                    {
                    crystalkey();
                    }


    step3:
    then add this command:

    Code:
         else if (command.equalsIgnoreCase("crystalchest"))
        {
            teleportToX = 2914;
            teleportToY = 3450;
    
        sendMessage("Use all of your crystal keys here!");
        }

    Optional:
    if you want you can also add a tele as one of your emotes, like i did:

    (search for: update(); and add this below:

    Code:
    sendFrame126("@[email protected]", 182);
    Now close client.java

    step4: open up item2.java and scroll down to the second code from the bottom, under the last } of tht code and add this:

    Code:
     public static int crystal[] = {6918,6916,6924,6920,6914,6889,6922,6237,6295,6215,4716,4708,4753,4745,4732,4726,4718,4710,4755,4747,4734,4728,4720,4712,4757,4749,4736,4730,4722,4714,4759,4751,4738,4724,1038,1044,1046,1048,1040,1050,1057,1053,1055,1050,1037,1419,1961,1959,962,4716,4708,4753,4745,4732,4726,4718,4710,4755,4747,4734,4728,4720,4712,4757,4749,4736,4730,4722,4714,4759,4751,4738,4724,1038,1044,1046,1048,1040,1050,1057,1053,1055,1050,1037,1419,1961,1959,962,4716,4708,4753,4745,4732,4726,4718,4710,4755,4747,4734,4728,4720,4712,4757,4749,4736,4730,4722,4714,4759,4751,4738,4724,1038,1044,1046,1048,1040,1050,1057,1053,1055,1050,1037,1419,1961,1959,962,4716,4708,4753,4745,4732,4726,4718,4710,4755,4747,4734,4728,4720,4712,4757,4749,4736,4730,4722,4714,4759,4751,4738,4724,1038,1044,1046,1048,1040,1050,1057,1053,1055,1050,1037,1419,1961,1959,962,4716,4708,4753,4745,4732,4726,4718,4710,4755,4747,4734,4728,4720,4712,4757,4749,4736,4730,4722,4714,4759,4751,4738,4724,1038,1044,1046,1048,1040,1050,1057,1053,1055,1050,1037,1419,1961,1959,962,4716,4708,4753,4745,4732,4726,4718,4710,4755,4747,4734,4728,4720,4712,4757,4749,4736,4730,4722,4714,4759,4751,4738,4724,1038,1044,1046,1048,1040,1050,1057,1053,1055,1050,1037,1419,1961,1959,962};
        
        public static int randomCrystal()
        {
        return crystal[(int)(Math.random()*crystal.length)];
        }

    ok the above addes the random items that it gives you at the taverly chest when you use a crystal key on it.


    step5:go into autospawn.cfg and above:[ENDOFSPAWNLIST] add:

    Code:
    //Volcoms Steeldragons START(drops crystal keys)//
    spawn = 1592    2999    3410    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2300    3412    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2989    3399    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2990    3412    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2993    3408    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2994    3415    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2995    3403    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2997    3402    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    2999    3398    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3000    3410    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3003    3410    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3004    3405    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3006    3408    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3008    3394    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3009    3400    0    0    0    0    0    2    Steel Dragon
    spawn = 1592    3010    3415    0    0    0    0    0    2    Steel Dragon 
    //Volcoms Steal Dragons END//


    step6:
    go into: NPCHandler.java and search for: Item2.random, and under the last } add:

    Code:
    if(npcs[NPCID].npcType == 1592) 
    {
    ItemHandler.addItem(Item2.randomCrystal(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
    }

    now the steel dragons drop crystal keys,a ont with some nice items (dragon, steel bars, and other decent items )

    So after this you should have a fully working crystal chest, and steel dragons to drop the keys for the chest!

    Step7: the command for the steeldrags!

    Code:
    else if (command.equalsIgnoreCase("steeldragon"))
        {
            teleportToX = 2999;
            teleportToY = 3410;
        sendMessage("L4nd 0f dr4g0n5");
        }


    also optional: also add a emote for the steeldragons to make it easier
    (search for: update(); and add this below the other one:

    Code:
    sendFrame126("@[email protected]",177);


    post any errors or questions on here


    Creds: 100% meeee

    ~Pics!~

    crystal chest using key on chest!



    the items it gives you when you use key on chest!



    Steel Dragons!



    Item Drops From Steel Drops!





    (Since i spent an hour on this, Rep whould be nice )

    POST YOU LEACHERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     

  2. #2  
    RSSJ
    Guest
    if this took you 4 months to do then you have issues or a REALLY sticky keyboard ><, sorry but no rep, this is just TOO simple..
     

  3. #3  
    We Are The Revolution!
    Volcom's Avatar
    Join Date
    Apr 2007
    Posts
    1,118
    Thanks given
    0
    Thanks received
    5
    Rep Power
    859
    i did the origional 4 months ago but i never really thought of making a V2 till earlier. i realized how SIMPLE, but also a VERY GOOD fix for a boring server plus alot of people like it. Just cuz its simple doesnt meen its good . remember that.
     

  4. #4  
    RSSJ
    Guest
    well iv been thinking, and maby this could go good with a nice little halloween event, if i used a bit of your code, or linked a refferal to your tut on my tutorial, but gave you credit, could I?
     

  5. #5  
    We Are The Revolution!
    Volcom's Avatar
    Join Date
    Apr 2007
    Posts
    1,118
    Thanks given
    0
    Thanks received
    5
    Rep Power
    859
    ya if i get creds and you show you got it from my tut, SURE. lol, told you its SIMPLE but VERY GOOD for a simple tut.
     

  6. #6  
    Registered Member Java Jamie's Avatar
    Join Date
    Oct 2007
    Posts
    294
    Thanks given
    0
    Thanks received
    0
    Rep Power
    8
    Pictures and ill rep you.
     

  7. #7  
    Horn ( old )
    Guest
    Yes, would be nice with a few pics of the rewards and stoof
     

  8. #8  
    Registered Member Lord Alan's Avatar
    Join Date
    May 2007
    Age
    25
    Posts
    211
    Thanks given
    0
    Thanks received
    0
    Rep Power
    15
    yay! you came out with your V2! i loved your V1!
    A life spent making mistakes is not only more honorable, but more useful than a life spent doing nothing.
     

  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
    Added pics! enjoy
     

  10. #10  
    I are Bak

    Join Date
    Jan 2007
    Age
    26
    Posts
    150
    Thanks given
    0
    Thanks received
    0
    Rep Power
    15
    i like the crystal chest so i will add it hopefully it works thanks
    R3P+

    ..::NEWEST::..

     

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
  •