Thread: [PI] Urgent Dungeoneering key help

Results 1 to 4 of 4
  1. #1 [PI] Urgent Dungeoneering key help 
    Registered Member
    Join Date
    Nov 2011
    Posts
    276
    Thanks given
    60
    Thanks received
    5
    Rep Power
    22
    i have this
    Code:
    for(int i = 0; i < 1; i++) {
            Server.itemHandler.createGroundItem(c, Key1, getRandX(), getRandY(), 1, c.playerId); //just once?
            Server.itemHandler.createGroundItem(c, 18201, getRandX(), getRandY(), 1000, c.playerId);
            }
    i want it to spawn those only once, but it spawns 33 different piles, does anybody know wtf is wrong?

    Code:
    public static int getRandX() {
            int[] randX = new int[] { 3236, 3229, 3235, 3234, 3227, 3228, 3233 };
            return randX[(int) Math.floor(Math.random() * randX.length)];
            }
            public static int getRandY() {
            int[] randY = new int[] { 9313, 9316, 9319, 9312, 9310, 9320, 9314 };
            return randY[(int) Math.floor(Math.random() * randY.length)];
            }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2011
    Posts
    276
    Thanks given
    60
    Thanks received
    5
    Rep Power
    22
    bump
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    why do you have a loop for an int youre not even using + its noit even looping through anything cause it starts at 0 and its less than 1 (0)

    either way try to comment this line out and see if its that

    //Server.itemHandler.createGroundItem(c, 18201, getRandX(), getRandY(), 1000, c.playerId);
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2011
    Posts
    276
    Thanks given
    60
    Thanks received
    5
    Rep Power
    22
    Quote Originally Posted by relex lawl View Post
    why do you have a loop for an int youre not even using + its noit even looping through anything cause it starts at 0 and its less than 1 (0)

    either way try to comment this line out and see if its that

    //Server.itemHandler.createGroundItem(c, 18201, getRandX(), getRandY(), 1000, c.playerId);
    removed the loop and "//" that part out and it still did 30+ piles of keys
    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

Similar Threads

  1. Replies: 37
    Last Post: 08-20-2011, 08:11 PM
  2. [URGENT]Laptop Server Hosting[URGENT]
    By Slawth Baws in forum Help
    Replies: 7
    Last Post: 07-22-2011, 04:31 AM
  3. [urgent]player files not saving![/urgent]
    By silabgarza in forum Help
    Replies: 6
    Last Post: 06-25-2011, 11:40 AM
  4. [URGENT] Coords loading glitch [URGENT]
    By The Myth in forum Help
    Replies: 9
    Last Post: 08-21-2009, 04:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •