Removed custom item command.
This commit is contained in:
parent
a6d11a96d7
commit
af9ea24ea2
|
@ -192,94 +192,6 @@ public class InvActionHandler implements PacketHandler {
|
||||||
owner.setBusy(false);
|
owner.setBusy(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (item.getDef().getCommand().equalsIgnoreCase("open")) {
|
|
||||||
if (item.getID() == 1321) {
|
|
||||||
int win;
|
|
||||||
int Roll = DataConversions.random(0, 99);
|
|
||||||
if (player.getInventory().remove(1321, 1) > -1) {
|
|
||||||
if (Roll <= 10) {
|
|
||||||
win = 795;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 30) {
|
|
||||||
win = 81;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 40) {
|
|
||||||
win = 828;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 43) {
|
|
||||||
win = 831;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 47) {
|
|
||||||
win = 832;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 55) {
|
|
||||||
win = 576;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 60) {
|
|
||||||
win = 577;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 63) {
|
|
||||||
win = 578;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 67) {
|
|
||||||
win = 579;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 71) {
|
|
||||||
win = 580;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 76) {
|
|
||||||
win = 581;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 85) {
|
|
||||||
win = 10;
|
|
||||||
player.getInventory().add(new InvItem(win, 200000));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Roll <= 100) {
|
|
||||||
win = 1289;
|
|
||||||
player.getInventory().add(new InvItem(win));
|
|
||||||
player.getActionSender().sendInventory();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (item.getID() == 1323) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (item.getDef().getCommand().equalsIgnoreCase("open")
|
} else if (item.getDef().getCommand().equalsIgnoreCase("open")
|
||||||
&& item.getID() == 796) {
|
&& item.getID() == 796) {
|
||||||
final ActiveTile tile = world.getTile(player.getLocation());
|
final ActiveTile tile = world.getTile(player.getLocation());
|
||||||
|
|
Loading…
Reference in New Issue