0r4nge ownz
January 1st, 2011, 17:16
Ok, so say if you wanted to add.. umm, crystal key on a chest.. or maybe thieving? you click a stall for a random item?
This is how you do it.
In player, Under all the variable's add this.
(A variable would look like this, "public boolean blah = false;" or "public int blah = 0;")
public static int Tutorial[] = {14484, 13736, 1046, 6856, 1050, 14595, 14603, 6858, 6860, 6862, 13113, 13115, 13111, 13110, 13109, 13101, 8950, 2631, 10548, 10549, 10547, 10887, 1057, 13263, 2978, 2980, 2982, 2984, 2986};
public static int RandomItemsTutorial()
{
return Tutorial[(int)(Math.random()*Tutorial.length)];
}
Change "Tutorial", to what you want it to be called.
Change the numbers, such as "14484" to what item ids you want.
Then, if you wanted to to the what ever it is you are doing a random loot.
Where ever you put the item id, put "p.RandomItemsTutorial()"
Anything else you need to ask, just leave a comment. i'l reply.
This is how you do it.
In player, Under all the variable's add this.
(A variable would look like this, "public boolean blah = false;" or "public int blah = 0;")
public static int Tutorial[] = {14484, 13736, 1046, 6856, 1050, 14595, 14603, 6858, 6860, 6862, 13113, 13115, 13111, 13110, 13109, 13101, 8950, 2631, 10548, 10549, 10547, 10887, 1057, 13263, 2978, 2980, 2982, 2984, 2986};
public static int RandomItemsTutorial()
{
return Tutorial[(int)(Math.random()*Tutorial.length)];
}
Change "Tutorial", to what you want it to be called.
Change the numbers, such as "14484" to what item ids you want.
Then, if you wanted to to the what ever it is you are doing a random loot.
Where ever you put the item id, put "p.RandomItemsTutorial()"
Anything else you need to ask, just leave a comment. i'l reply.