Thread: randomise bh enterance?

Results 1 to 5 of 5
  1. #1 randomise bh enterance? 
    Registered Member
    wreckless's Avatar
    Join Date
    Dec 2008
    Posts
    727
    Thanks given
    82
    Thanks received
    78
    Rep Power
    294
    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;
    Reply With Quote  
     

  2. #2  
    Mr Sheen
    Guest
    misc.random(5) - 5 being the number you change , not done randomising in a while.
    I think?
    Reply With Quote  
     

  3. #3  
    Registered Member
    wreckless's Avatar
    Join Date
    Dec 2008
    Posts
    727
    Thanks given
    82
    Thanks received
    78
    Rep Power
    294
    Quote Originally Posted by Mr Sheen View Post
    misc.random(5) - 5 being the number you change , not done randomising in a while.
    I think?
    no that randomises 5 squares of the designated co-ordinates. I want it to randomise the doors you enter at.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Jun 2009
    Posts
    1,076
    Thanks given
    308
    Thanks received
    389
    Rep Power
    341
    Code:
                    final int random = Misc.random(2);
    	if(random == 0)
    		tele1
    	else if(random == 1)
    		tele2
    	else if(random == 2)
    		tele3
    Reply With Quote  
     

  5. #5  
    BUUUUUUHHHHHHRGUR

    Maffchew's Avatar
    Join Date
    Aug 2009
    Age
    30
    Posts
    766
    Thanks given
    3
    Thanks received
    6
    Rep Power
    620
    Quote Originally Posted by Peril View Post
    Code:
                    final int random = Misc.random(2);
    	if(random == 0)
    		tele1
    	else if(random == 1)
    		tele2
    	else if(random == 2)
    		tele3
    Oo i needed that too cheers
    Quote Originally Posted by somebodyy
    hey can you tell me what to look for in NpcCombat for the anti-leech thing cuase i have no idea
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •