Jump to content

Kaleem

Members
  • Posts

    3
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Kaleem's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. I would like a trial of : Rock Crabs I would like a trial because I'm not sure if I want to purchase this script, so getting a trial run would really help
  2. So confusing on what you want..so I'll do my best. Usage for grabbing the players inventory as an Item array: inventory.getItems() Since you want to store their initial setup, I'd do something like: initial = inventory.getItems() upon startup To grab the amount of an item object (returned as an integer), simply do: item.getAmount() Put it all together, you should end up with something like this: for (int i = 0; i < inventory.getItems().length; i++) { Item current = inventory.getItems()[i]; //the current item in the respective slot Item in = initial[i]; //the initial item in the respective slot //probably want to skip iteration if the item is null but idk if (in.getAmount() != current.getAmount()) { //if the initial amount is different to the current amount... bank.withdraw(current.getId(), in.getAmount() - current.getAmount()); //withdraw the necessary amount } }
×
×
  • Create New...