- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
UnixCode
Hello all i need help at something, cause i have not tried it again. Anyway...
Let's take an example:
I want from a fastlist (type L2PCINSTANCE) to select 1 player , and he becomes hero.The player will be selected randomly, how can i do it?
i have tried:
int r; FastList <L2PcInstance> players = new FastList<L2PcInstance>(); { for(L2PcInstance p: players){ r = Rnd.get(p.getObjectId()); } for(L2PcInstance p2 :players){ if(r == p2.getObjectId()) p2.setHero(true); }but i dont think it will work, can anyone help me with this? :D
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now