Thread: need help with drops.

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 need help with drops. 
    Toonscape
    Guest
    im in client.java..

    when i use an item on object.. for example in my godsword minigame..

    i use a key with the chest. but how its written is that if i use a specific key.. ill get the item thats made with it.. example..

    red key = zammy gs
    blue key = amadyl gs..

    but i made a random drop in item2.java how can i make that..

    red key = zammy gs into.. red key = (random item from item2.java)

    instead of using additem(****, 1);

    i wanna use the random thing..

    whats the method i can use?

    thanks alot
     

  2. #2  
    Banned

    Join Date
    Oct 2007
    Age
    28
    Posts
    2,733
    Thanks given
    32
    Thanks received
    53
    Rep Power
    0
    make it so its addItem(Item2.#####, #);

    the cyan being the item2.java thingy, such as item2.redkey

    and the green being the ammount
     

  3. #3  
    Registered Member
    T-Sex's Avatar
    Join Date
    Jan 2008
    Posts
    1,824
    Thanks given
    0
    Thanks received
    3
    Rep Power
    130
    Code:
    public static int steeldragon[] = {
           1149, 3140, 1187, 4087, 4585, 7158, 4587, 5698, 5698, 1305, 1434, 15156,  1149, 3140, 1187, 4087, 
           4585, 7158, 4587, 5698, 5698, 1305, 1434};
    
        public static int randomsteeldragon() {
            return steeldragon[(int) (Math.random() * steeldragon.length)];
        }
    }
    is that red bit what u lookin for i dont understand u do u want it to drop at random den ye its that
     

  4. #4  
    Banned

    Join Date
    Oct 2007
    Age
    28
    Posts
    2,733
    Thanks given
    32
    Thanks received
    53
    Rep Power
    0
    i think he means wen he uses an item on object, he wants it to give a random item, rather than just 1
     

  5. #5  
    Toonscape
    Guest
    thats right

    so like you have the..

    public static int steeldragon[] = {
    1149, 3140, 1187, 4087, 4585, 7158, 4587, 5698, 5698, 1305, 1434, 15156, 1149, 3140, 1187, 4087,
    4585, 7158, 4587, 5698, 5698, 1305, 1434};

    public static int randomsteeldragon() {
    return steeldragon[(int) (Math.random() * steeldragon.length)];
    }
    }


    an i think its the bit from

    return steeldragon[(int) (Math.random() * steeldragon.length)];

    that i need to put into client.java. so when i use an itme on an object it gives me that random item form item2.java
    Last edited by Toonscape; 04-10-2008 at 07:27 PM. Reason: Double posting is not allowed!
     

  6. #6  
    Banned

    Join Date
    Oct 2007
    Age
    28
    Posts
    2,733
    Thanks given
    32
    Thanks received
    53
    Rep Power
    0
    addItem(Item2.steeldragon, 1);

    instead of

    addItem(995, 1)
     

  7. #7  
    Toonscape
    Guest
    thanks man il lrep++ when im done

    lots of errors with my code.. and btw it was this .. i used this and it worked

    addItem(Item2.randomRewardGs(), 1);



    because i didnt have that void for the method yu sent me.. but yeah that one works for me
    Last edited by Toonscape; 04-10-2008 at 07:46 PM. Reason: Double posting is not allowed!
     

  8. #8  
    Banned

    Join Date
    Oct 2007
    Age
    28
    Posts
    2,733
    Thanks given
    32
    Thanks received
    53
    Rep Power
    0
    no probs mate here to help =)

    i didnt expect u to have it, just an example
    Last edited by Unkn0wn; 04-10-2008 at 07:50 PM. Reason: Double posting is not allowed!
     

  9. #9  
    Banned

    Join Date
    Oct 2007
    Age
    28
    Posts
    2,733
    Thanks given
    32
    Thanks received
    53
    Rep Power
    0
    madden, u told him nothin, u just gave him ur steel drag drops
     

  10. #10  
    Profiler
    Guest
    Just made my first tut, its about drops , how to add one.;
    [Only registered and activated users can see links. ]
     

Page 1 of 2 12 LastLast

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
  •