orange - item idCode:case 2561: c.getThieving().stealFromStall(1897, 10, 1); break;
red - thieving level
|
Title says it all. I am new to PI. So go easy on me. I went into actionhandler and changed the cake to money. and the next number to like 5k. but it only gave me 1 coin... how do i do it
orange - item idCode:case 2561: c.getThieving().stealFromStall(1897, 10, 1); break;
red - thieving level
Post your steal from stall method, and the shit in action handler.
Code:public void stealFromNPC(int id) { if (System.currentTimeMillis() - c.lastThieve < 2000) return; for (int j = 0; j < npcThieving.length; j++) { if (npcThieving[j][0] == id) { if (c.playerLevel[c.playerThieving] >= npcThieving[j][1]) { if (Misc.random(c.playerLevel[c.playerThieving] + 2 - npcThieving[j][1]) != 1) { c.getPA().addSkillXP(npcThieving[j][2] * Config.THIEVING_EXPERIENCE, c.playerThieving); c.getItems().addItem(995, npcThieving[j][3]); c.startAnimation(881); c.lastThieve = System.currentTimeMillis(); c.sendMessage("You steal some money..."); break; } else { c.setHitDiff(npcThieving[j][4]); c.setHitUpdateRequired(true); c.playerLevel[3] -= npcThieving[j][4]; c.getPA().refreshSkill(3); c.lastThieve = System.currentTimeMillis() + 2000; c.sendMessage("You fail to steal the NPC."); break; } } else { c.sendMessage("You need a thieving level of " + npcThieving[j][1] + " to steal from this NPC."); } } } } public void stealFromStall(int id, int xp, int level) { if (System.currentTimeMillis() - c.lastThieve < 2500) return; if (Misc.random(100) == 0) { return; } if (c.playerLevel[c.playerThieving] >= level) { if (c.getItems().addItem(id,1)) { c.startAnimation(832); c.getPA().addSkillXP(xp * Config.THIEVING_EXPERIENCE, c.playerThieving); c.lastThieve = System.currentTimeMillis(); c.sendMessage("You steal a " + server.model.items.Item.getItemName(id) + "."); } } else { c.sendMessage("You must have a thieving level of " + level + " to steal from this stall."); } }
I know the id and level. but how do i make it were you get like 5k coins or something..
Code:public void stealFromStall(int xp, int level, int item, int itemAmount) { if (System.currentTimeMillis() - c.lastThieve < 2500) return; if (Misc.random(100) == 0) { return; } if (c.playerLevel[c.playerThieving] >= level) { { c.startAnimation(832); c.getItems().addItem(item, itemAmount); c.getPA().addSkillXP(xp * Config.THIEVING_EXPERIENCE, c.playerThieving); c.lastThieve = System.currentTimeMillis(); c.sendMessage("You steal an item from the stall...."); } } else { c.sendMessage("You must have a thieving level of at least " + level + " to thieve from this stall."); } }Code:case 2561: c.getThieving().stealFromStall(10, 1, 995, 1); break;
nope. doesnt work
I get a error:
src/server/model/players/thieving/.java66: reached end of file while something.
}
1 error
This is my actionhandler for steal a stall:
case 6163:
c.getThieving().stealFromStall(1897, 10, 1);
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |