Sounds dumb, haven't been around a private server in a while now. Cut slack, if not leave please. Thanks
Question:
You know how every one does removeItem(ID, 3000);
or Whatever.
How would I make it so, in inventoryoptionshandler for item on item. (Just to give you more details, I'm making zulrah scales on blowpipe.)
I've tried multiple functions, all leading me to errors when I do it. Probably a slight mistake in front of my eyes. Or the biggest retard mode ever. Rather than me re-looking, coding, re-looking, I'd rather ask to save me time.
For EX: if I'm using zulrah scale on blowpipe, how do I make it so if player has 4839 in inventory, it'll remove ALL of them in inventory.
I don't want a ghetto rigged blowpipe. So any answers help. I'll show you my previous outlook.
Code:
Item item;
Item[] data = null;
for (int i = 0; i < data.length; i++) {
if (data[i] != null) {
if (data[i].getId() == 29960) {
player.zulrahChargeBP += data.length;
player.getInventory().deleteItem(29960, data.length);
//player.zulrahChargeBP += aData.getAmount();
player.sm("You now have "+player.zulrahChargeBP+" blowpipe charges");
data[i] = null;
}
}
}
Code:
int item;
int count = 0;
Item[] data = null;
for (Item aData : data) {
if (aData != null) {
if (aData.getId() == 29960) {
count += aData.getAmount();
player.getInventory().deleteItem(29960, aData.getAmount());
player.zulrahChargeBP += aData.getAmount();
player.sm("You now have "+player.zulrahChargeBP+" blowpipe charges");
}
}
}
return;
//player.getInventory().deleteItem(quantity);
//player.zulrahChargeBP += quantity;
//player.sm("You now have "+quantity+" blowpipe charges");
}
Please just tell me I'm being retarded and missed the smallest thing it'd make me smile.
Just wanna say, my blowpipe is added, shooting with anims etc. Just adding charges now. Don't wanna buy stupid shit when I can simply add it.