does anyone have any idea why this doesnt work?
i know it can be done better but im just trying to get it to work for now
Code:
package org.dementhium.content.activity.impl;
import org.dementhium.model.Item;
import org.dementhium.model.Location;
import org.dementhium.model.player.Player;
import org.dementhium.util.Area;
/**
*
* @author Gomballz
*/
public class ClueScrolls {
public static final Area[] Easy_Clue_1 = {
Area.rectangle(Location.locate(1887, 3162, 0), Location.locate(1885, 3160, 0)),
};
public boolean itemActionEasyClue1(Player player, Item item, int actionId, String action, Object... params) {
for (int i = 0; i < Easy_Clue_1.length;) {
if (item.getId() == 952) {
player.animate(830);
if (item.getId() == 13159 && Easy_Clue_1[i].isInArea(player.getLocation())) {
player.getInventory().addItem(13158, 1);
player.getInventory().deleteItem(13159, 1);
player.sendMessage("You Dig up a treasure chest!");
return true;
} else {
player.sendMessage("You find nothing.");
return true;
}
}
}
return false;
}
}
also i know item ids are wrong but just made it to test