woot part my idea first post thanx dude for this!
|
FIRST TUT!
Purpose: To add a crystal chest to your server!
Difficulty: 1-2 (must have some coding knowledge)
Server Base: volcomscape, but can work on any source.
Classes Modified: Client.java, and item2.java
Procedure
Step 1: Open up Client.java and declare this void
step2: In client.java search rune();. under tht last } add thisCode:public void crystalkey() { sendMessage("You have opened the crystal chest!"); deleteItem(989,getItemSlot(989),1); addItem(1615,1); addItem(Item2.randomCrystal(), 1); }
it should look something like thisCode://crystal key else if(useItemID == 989 && (atObjectX == 2914 && atObjectY == 3452)) { crystalkey(); }
step3: then add this command:Code:rune(); } //crystal key else if(useItemID == 989 && (atObjectX == 2914 && atObjectY == 3452)) { crystalkey(); }
close client.javaCode:else if (command.equalsIgnoreCase("crystalchest")) { teleportToX = 2914; teleportToY = 3450; sendMessage("Use all of your crystal keys here!"); }
step4: open up item2.java and scroll down to the second code from the bottom, under the last } of tht code add this
and thats itCode: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)]; }
post any errors or questions on here
Credits: 90% me 10% Sith
woot part my idea first post thanx dude for this!
Nice maybe ill use i dunno.
this doesnt even delete the key lmfao.
actually yes it does. u havent even tried the code so dont judge!
P.S. LEARN TO READ!
Code:public void crystalkey() { sendMessage("You have opened the crystal chest!"); deleteItem(989,getItemSlot(989),1); addItem(1615,1); addItem(Item2.randomCrystal(), 1); }
Looks good
♦♦♦♦ Thinks he knows it all, don't wory... Good Tut, Though this was done in Cheez 63 or 80, i can't rember
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |