Thread: How could I get this to happen

Results 1 to 5 of 5
  1. #1 How could I get this to happen 
    Banned
    Join Date
    Mar 2008
    Posts
    371
    Thanks given
    3
    Thanks received
    8
    Rep Power
    0
    Ok, how would I edit this code

    Code:
    if (UsedOnObjectID == 2783 && playerHasItem(436)) {
    deleteItem(436, 1);
    addItem(995, 2000);
    }
    That's the code I want to make it that they can get 3 different things from the chest at random. Can I use something to make this happen?
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jan 2007
    Age
    30
    Posts
    4,417
    Thanks given
    3
    Thanks received
    105
    Rep Power
    0
    Nvm didn't read it fully..I don't think theres a way that is already in servers, you would have to edit it youself
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2007
    Posts
    994
    Thanks given
    25
    Thanks received
    47
    Rep Power
    604
    Code:
    private int[] items { 995,1038,1049 };
    Code:
    if (UsedOnObjectID == 2783 && playerHasItem(436)) {
    deleteItem(436, 1);
    addItem(items[misc.random(items.length)], 1);
    }
    for 3 chances

    Code:
    if (UsedOnObjectID == 2783 && playerHasItem(436)) {
    deleteItem(436, 1);
            for(int x = 0; x < 3; x++){
                    addItem(items[misc.random(items.length)], 1);
            }
    }
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Mar 2008
    Posts
    371
    Thanks given
    3
    Thanks received
    8
    Rep Power
    0
    @ bluurr

    Code:
    client.java:18: ';' expected
            private int[] items {8002,13643,13645,13664};
                               ^
    client.java:18: not a statement
            private int[] items {8002,13643,13645,13664};
                                 ^
    client.java:18: ';' expected
            private int[] items {8002,13643,13645,13664};
    Reply With Quote  
     

  5. #5  
    Registered Member
    ViperSniper's Avatar
    Join Date
    Apr 2007
    Age
    30
    Posts
    2,417
    Thanks given
    367
    Thanks received
    82
    Rep Power
    976
    private int[] items = {8002,13643,13645,13664};
    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
  •