misc.random(5) - 5 being the number you change , not done randomising in a while.
I think?
|
Ok so I'm making a basic bounty hunter and when i enter I want to make it randomise which door you enter at but I don't know how. Say my codes like this, how would i randomise it?-
Code:case 30204: //bh enterance if (p.absX == 3242 && p.absY == 3574) { p.setCoords(1675, 5599, 4); } else if (p.absX == 3241 && p.absY == 3574) p.setCoords(1675, 5599, 4); break;
misc.random(5) - 5 being the number you change , not done randomising in a while.
I think?
Code:final int random = Misc.random(2); if(random == 0) tele1 else if(random == 1) tele2 else if(random == 2) tele3
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |