Choosing random players from the ground

Ask for help

Moderators: Murderator+, Murderator

Post Reply
korupt
Posts: 3
Joined: 2004-09-03 20:25:31

Choosing random players from the ground

Post by korupt »

Lets say you have 10 ppl in a 3x3 square and you want to select those 10 ppl randomly how would you do?
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

  • create array for serials (size 200 or more)
  • seek for human
  • if found:
    - ignore finditem
    - check is he in square
    - if yes add in array
    - repeat search
  • now use uo.random to get random object from created array
Post Reply