Code:
public void stealFromStall(int id, int xp, int level, final int i, final int x, final int y) {
if (System.currentTimeMillis() - c.lastThieve < 2500)
return;
if (c.playerLevel[c.playerThieving] >= level) {
if (c.getItems().addItem(id, id2)) {
c.startAnimation(832);
c.getPA().addSkillXP(xp * Config.THIEVING_EXPERIENCE, c.playerThieving);
c.lastThieve = System.currentTimeMillis();
c.sendMessage("You steal a " + server.rs2.items.Item.getItemName(id) + ".");
c.getPA().checkObjectSpawn(634, x, y, 0, 10);
EventManager.getSingleton().addEvent(new Event() {
public void execute(EventContainer p) {
c.getPA().checkObjectSpawn(i, x, y, 0, 10);
p.stop();
}
}, 7000);
}
} else {
c.sendMessage("You must have a thieving level of " + level + " to thieve from this stall.");
}
theiving method in skilling class
Code:
public static final int[] GemStall = {1623,1621, 1617, 1619};
Int string in action handler
Code:
case 2562:
c.getThieving().stealFromStall(GemStall[Misc.random(getGemLength() - 1), c.getItems().addItem(995, 1000)], GemCoin, 30, 25, objectType, obX, obY);
break;
first click object statement
I was thinking by adding like Id2 in my thieving class method to look like
Code:
public void stealFromStall(int id, int id2, int xp, int level, final int i, final int x, final int y) {
Could I make something like public int GemCoins[][] = {995, 1000}
to make the stall give me an object and 1000 coins? Please would appreciate if anyone could help me solve this simple method, i'm new to java. Thanks.
[
- - - Updated - - -
bump.