Thread: How to make a pickup command?

Results 1 to 8 of 8
  1. #1 How to make a pickup command? 
    Registered Member
    Join Date
    Oct 2008
    Posts
    184
    Thanks given
    0
    Thanks received
    2
    Rep Power
    17
    Can som1 give me the Pickup command fully 1?
    Did u Know That the Combat system of Deltascape Sucked
     

  2. #2  
    Beiber Fever

    Join Date
    Jun 2009
    Posts
    117
    Thanks given
    0
    Thanks received
    1
    Rep Power
    15
    if (command.startsWith("pickup") && playerRights > 2) {
    String[] args = command.split(" ");
    if(args.length == 3) {
    int newItemID = Integer.parseInt(args[1]);
    int newItemAmount = Integer.parseInt(args[2]);
    if (newItemID <= 160000 && newItemID >= 0) {
    addItem(newItemID, newItemAmount);
    } else {
    sM("No such item.");
    }
    } else {
    sM("Oops! Use as :ickup 995 100");
    }
    }
     

  3. #3  
    Registered Member
    Join Date
    Oct 2008
    Posts
    184
    Thanks given
    0
    Thanks received
    2
    Rep Power
    17
    I need pickup for every1 not for Admins
    Did u Know That the Combat system of Deltascape Sucked
     

  4. #4  
    live
    Guest
    if (command.startsWith("pickup") && playerRights > 0) {
    String[] args = command.split(" ");
    if(args.length == 3) {
    int newItemID = Integer.parseInt(args[1]);
    int newItemAmount = Integer.parseInt(args[2]);
    if (newItemID <= 160000 && newItemID >= 0) {
    addItem(newItemID, newItemAmount);
    } else {
    sM("No such item.");
    }
    } else {
    sM("Oops! Use as :ickup 995 100");
    }
    }
    Try that?
    If not keep changing the [0] number
     

  5. #5  
    Registered Member
    Join Date
    Oct 2008
    Posts
    184
    Thanks given
    0
    Thanks received
    2
    Rep Power
    17
    I changed player rights to 0 but dont work?
    Did u Know That the Combat system of Deltascape Sucked
     

  6. #6  
    Registered Member
    Coder Alex's Avatar
    Join Date
    Apr 2009
    Age
    30
    Posts
    1,755
    Thanks given
    86
    Thanks received
    83
    Rep Power
    231
    change > 0 , to >= 0 , because > 0 means mod+ can use!
    and >= , means player , and mod+


    No prob =P
    My english skills back in the days.
    Quote Originally Posted by Coder Alex
    Well, if it's gooded decent, it's good.
     

  7. #7  
    Jddogg9
    Guest
    or if you made a mindless mistake of not compiling... or not turning on and off server after compile
     

  8. #8  
    Insayne
    Guest
    Quote Originally Posted by live View Post
    Try that?
    If not keep changing the [0] number
    Or just don't put player rights.. lol.

    Btw, Delta fails... Hard.
    That could be why too..
     


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
  •