make it so its addItem(Item2.#####, #);
the cyan being the item2.java thingy, such as item2.redkey
and the green being the ammount
|
|
im in client.java..
when i use an item on object.. for example in my godsword minigame..
i use a key with the chest. but how its written is that if i use a specific key.. ill get the item thats made with it.. example..
red key = zammy gs
blue key = amadyl gs..
but i made a random drop in item2.java how can i make that..
red key = zammy gs into.. red key = (random item from item2.java)
instead of using additem(****, 1);
i wanna use the random thing..
whats the method i can use?
thanks alot

make it so its addItem(Item2.#####, #);
the cyan being the item2.java thingy, such as item2.redkey
and the green being the ammount
is that red bit what u lookin for i dont understand u do u want it to drop at random den ye its thatCode:public static int steeldragon[] = { 1149, 3140, 1187, 4087, 4585, 7158, 4587, 5698, 5698, 1305, 1434, 15156, 1149, 3140, 1187, 4087, 4585, 7158, 4587, 5698, 5698, 1305, 1434}; public static int randomsteeldragon() { return steeldragon[(int) (Math.random() * steeldragon.length)]; } }

i think he means wen he uses an item on object, he wants it to give a random item, rather than just 1
thats right
so like you have the..
public static int steeldragon[] = {
1149, 3140, 1187, 4087, 4585, 7158, 4587, 5698, 5698, 1305, 1434, 15156, 1149, 3140, 1187, 4087,
4585, 7158, 4587, 5698, 5698, 1305, 1434};
public static int randomsteeldragon() {
return steeldragon[(int) (Math.random() * steeldragon.length)];
}
}
an i think its the bit from
return steeldragon[(int) (Math.random() * steeldragon.length)];
that i need to put into client.java. so when i use an itme on an object it gives me that random item form item2.java
Last edited by Toonscape; 04-10-2008 at 07:27 PM. Reason: Double posting is not allowed!

addItem(Item2.steeldragon, 1);
instead of
addItem(995, 1)
thanks man il lrep++ when im done
lots of errors with my code.. and btw it was this .. i used this and it worked
addItem(Item2.randomRewardGs(), 1);
because i didnt have that void for the method yu sent me.. but yeah that one works for me
Last edited by Toonscape; 04-10-2008 at 07:46 PM. Reason: Double posting is not allowed!

no probs mate here to help =)
i didnt expect u to have it, just an example
Last edited by Unkn0wn; 04-10-2008 at 07:50 PM. Reason: Double posting is not allowed!

madden, u told him nothin, u just gave him ur steel drag drops
| « How to add drops ( for neebs who dont know :p) | Nooby Ancients » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |