Code:
package ardi.content;
import ardi.util.Misc;
import ardi.model.players.Client;
public class Crystalkey {
Client c;
public static int commonReward[][] = {{10404, 1},{10406, 1},{10408, 1},{10410, 1},{10412, 1},{10414,1},{10416, 1},{10418, 1},
{10420, 1},{10422, 1},{10424, 1},{10426, 1},{10428, 1},{10430, 1},{10432, 1},{10434, 1},{10436, 1},{10438, 1},{10394, 1},
{626, 1},{628, 1},{630, 1},{632, 1},{634, 1},{2894, 1},{2902, 1},{2904, 1},{2912, 1},{2914, 1},{2922, 1},{2924, 1},{2932, 1},{2942, 1},
{7534, 1},{ 6858, 1},{6859, 1},{7053, 1},{10836, 1},{10837, 1},{10838, 1},{10839, 1},{10840, 1},{6654, 1},{6655, 1},{6656, 1}};
public static int commonLoot() {
return commonReward[(int) (Math.random() * commonReward.length)][(int) (commonReward.length)];
}
public static int uncommonReward[][] = {{10400, 1},{10402, 1},{2362, 1},{537, 1},{452, 1},{1618, 1},{1632, 1},{5304, 1},{1734, 1},
{1733, 1},{384, 1},{7937, 1}};
public static int uncommonLoot() {
return uncommonReward[(int) (Math.random() * uncommonReward.length)][(int) (uncommonReward.length)];
}
public static int rareReward[][] = {{4087, 1},{11732, 1},{1187, 1},{6571, 1},{6920, 1},{555, 1},{562, 1},{560, 1},{565, 1},{3145, 1},
{392, 1},{3025, 1},{6686, 1},{11230, 1},{2453, 1}};
public static int rareLoot() {
return rareReward[(int) (Math.random() * rareReward.length)][(int) (rareReward.length)];
}
public static int superRareReward[][] = {{19412, 1},{19413, 1},{19414, 1},{19420, 1},{19404, 1},{299, 1},{989, 1},{6199, 1},
{2707, 1}};
public static int superRareLoot() {
return superRareReward[(int) (Math.random() * superRareReward.length)][(int) (superRareReward.length)];
}
public static int legendaryReward[][] = {{19415, 1},{19416, 1},{19417, 1},{19409, 1},{19408, 1},{19410, 1},{12756, 1},
{6199, 1},{2707, 1}};
public static int legendaryLoot() {
return legendaryReward[(int) (Math.random() * legendaryReward.length)][(int) (legendaryReward.length)];
}
public static void searchChest(Client c) {
if (c.getItems().playerHasItem(989)) {
c.getItems().deleteItem(989, 1);
c.sendMessage("You open the chest");
int pool = Misc.random(180);
int superRarePointReward = Misc.random(superRareReward.length);
int legendaryPointReward = Misc.random(legendaryReward.length);
if (pool == 10 || pool == 20 || pool == 30 || pool == 40 || pool == 50 || pool == 60 || pool == 70 || pool == 80 || pool == 90 || pool == 100) {
} else if (pool == 25 || pool == 51 || pool == 75 || pool == 101 || pool == 125) {
} else if (pool == 45 || pool == 91 || pool == 145) {
if (superRarePointReward != 1) {
} else {
int superRarePoint = Misc.random(1);
if (superRarePoint == 0) {
c.bossPoints += 500;
c.sendMessage("You have recieved 500x boss points.");
} else {
c.votePoints += 5;
c.sendMessage("You have recieved 5x vote points.");
}
}
} else if (pool == 5) {
if (legendaryPointReward != 1) {
} else {
int legendaryPoint = Misc.random(1);
if (legendaryPoint == 0) {
c.bossPoints += 1000;
c.globalMessage("[@red@Crystal Key@bla@] @blu@" + c.playerName + "@bla@ has just recieved @red@1000@bla@ Boss Points." );
} else {
c.votePoints += 10;
c.globalMessage("[@red@Crystal Key@bla@] @blu@" + c.playerName + "@bla@ has just recieved @red@10@bla@ vote points." );
}
}
} else {
}
} else {
c.sendMessage("You need a Crystal key to open the chest.");
}
}
}