Vault randomization question

Discussion in 'Plugin Development' started by DrTURTLE2, Jun 18, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    DrTURTLE2

    So I want it so a player gets a random amount a money within like a radius of 50-100 dollars. Anyone have an idea for this?
     
  2. Offline

    HeadGam3z

    Code:java
    1. Random randomGenerator = new Random();
    2. int randomInt = randomGenerator.nextInt(100); // 0-100 (maybe 1-100, not sure)
    3. log("Generated : " + randomInt);
    4.  
     
  3. Offline

    fireblast709

  4. Offline

    DrTURTLE2

  5. Offline

    fireblast709

    DrTURTLE2 I'm against spoonfeeding. Simply googling 'java random' would've answered your question.
     
  6. Offline

    flaaghara

    DrTURTLE2 Gonna assume you are being sarcastic. Here's a tip: Google exactly what he posted and learn for yourself how the Random class works.
     
  7. Offline

    HeadGam3z

    Just gonna get this over with...
    DrTURTLE2
    for 50-100, you could use:
    Code:java
    1. int randomInt = randomGenerator.nextInt(51) + 50;
     
  8. Offline

    DrTURTLE2

    fireblast709 flaaghara HeadGam3z I appreciate the help, but this is why I cringe whenever I post on the bukkit forums because everyone is sarcastic as hell.
     
  9. Offline

    HeadGam3z

  10. Offline

    fireblast709

    DrTURTLE2 I rather teach you to walk than to show you how to run.
     
Thread Status:
Not open for further replies.

Share This Page