Jump to content
  • 0
Sign in to follow this  
GomuGomuFruit

crystal key chest dementhium

Question

does anyone know how to make crystal chest work? ive tryed alot of methods im pretty sure this piece is wrong

import org.dementhium.content.minigames.CrystalChest;

and yes i do have the import :P

[code] player.getInventory().addItem(new ChanceItem(CRYSTAL_CHEST_REWARDS));[/code]

but here is rest :S

itemonobjecthandler.java

[code] } else if (def.getName().toLowerCase().equals("closed chest")) {
if (player.getInventory().contains(989)) {
if (!player.getInventory().contains(989)) {
player.sendMessage("You do not have a crystal key.");
return;
}
player.getInventory().getContainer().remove(new Item(989));
player.getInventory().addItem(new ChanceItem(CRYSTAL_CHEST_REWARDS));
player.getInventory().refresh();
player.sendMessage("You open the Closed Chest.");
return;
}[/code]

crystalchest.java

[code] private static final ChanceItem[] CRYSTAL_CHEST_REWARDS = new ChanceItem[] {
new ChanceItem(new Item(995, 2000), 27), new ChanceItem(new Item(1631, 1), 100), new ChanceItem(new Item(1969, 1), 27),
new ChanceItem(new Item(441, 150), 8), new ChanceItem(new Item(454, 1), 7), new ChanceItem(new Item(2363, 3), 9),
new ChanceItem(new Item(556, 50), 9), new ChanceItem(new Item(558, 50), 9), new ChanceItem(new Item(559, 50), 9),
new ChanceItem(new Item(557, 50), 9), new ChanceItem(new Item(554, 50), 9), new ChanceItem(new Item(555, 50), 9),
new ChanceItem(new Item(560, 10), 9), new ChanceItem(new Item(564, 10), 9), new ChanceItem(new Item(562, 10), 9),
new ChanceItem(new Item(561, 10), 9), new ChanceItem(new Item(563, 10), 9),
new ChanceItem(new Item(985, 1), 3), new ChanceItem(new Item(987, 1), 3), new ChanceItem(new Item(995, 750), 3),
};[/code]

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
hmm, idont know man. Edited by Lord Vexia
lmaoo..

Share this post


Link to post
Share on other sites
  • 0
[quote name='GomuGomuFruit']why post then?[/QUOTE]

Is 'this': [code] private static final ChanceItem[] CRYSTAL_CHEST_REWARDS = new ChanceItem[] {
new ChanceItem(new Item(995, 2000), 27), new ChanceItem(new Item(1631, 1), 100), new ChanceItem(new Item(1969, 1), 27),
new ChanceItem(new Item(441, 150), 8), new ChanceItem(new Item(454, 1), 7), new ChanceItem(new Item(2363, 3), 9),
new ChanceItem(new Item(556, 50), 9), new ChanceItem(new Item(558, 50), 9), new ChanceItem(new Item(559, 50), 9),
new ChanceItem(new Item(557, 50), 9), new ChanceItem(new Item(554, 50), 9), new ChanceItem(new Item(555, 50), 9),
new ChanceItem(new Item(560, 10), 9), new ChanceItem(new Item(564, 10), 9), new ChanceItem(new Item(562, 10), 9),
new ChanceItem(new Item(561, 10), 9), new ChanceItem(new Item(563, 10), 9),
new ChanceItem(new Item(985, 1), 3), new ChanceItem(new Item(987, 1), 3), new ChanceItem(new Item(995, 750), 3),
};[/code] all that's in the CrystalChest class, or did you not post it all?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×