[PI] Mystery boxes WITH TUT
Hello,
This is for PI rev 317 only.
I will explain the codes.
Post the next items in the clickitem class
Code
Code:
if(itemId == 3062) {
c.getItems().deleteItem(3062, 1);
int[] arrayOfItems ={1050,1048,1046,1044,1042,1040,1038};
c.getItems().addItem(arrayOfItems[Misc.random(arrayOfItems.length)], 1);
}
Item id of Mystery Box (Orange).
Code:
if(itemId == 3062) {
Means the item will be deleted when used.
Code:
c.getItems().deleteItem(3062, 1);
Items the system will choose of giving, the more the less chance you get a rare.
Code:
int[] arrayOfItems ={1050,1048,1046,1044,1042,1040,1038};
Adds item into inventory, and randomizes the item.
Code:
c.getItems().addItem(arrayOfItems[Misc.random(arrayOfItems.length)], 1);
End the code, dont delete
If this ends up in snippits, removal will be next.
Do not copy or leech without my permission.
Thanking would be appreciated :D