Thread: ::item commands

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 ::item commands 
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Anyone know how to make ::item command for certain item wont give?

    like example ::item 11694 and i want to make it cant spawn. Like it will say. Kill the boss to get that item. annyone know? will rep.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2011
    Posts
    178
    Thanks given
    16
    Thanks received
    41
    Rep Power
    30
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    make an exception in your item command and make it send a message
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  4. #4  
    Extreme Donator

    Jilic-Matt's Avatar
    Join Date
    May 2011
    Age
    29
    Posts
    1,612
    Thanks given
    799
    Thanks received
    494
    Rep Power
    540
    http://www.rune-server.org/runescape...ng-tokens.html

    this is good u should look in to this
    Reply With Quote  
     

  5. #5  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Reply With Quote  
     

  6. #6  
    Registered Member
    thim slug's Avatar
    Join Date
    Nov 2010
    Age
    28
    Posts
    4,132
    Thanks given
    1,077
    Thanks received
    1,137
    Rep Power
    5000
    How do you have 1.206k rep power? Lol, anyway, it should work in your config class I think, lol haven't looked at pi in a while, declare an array named what ever you like then loop through it and if the item == array[index] return it and sendMessage("You are unable to spawn that item."):
    Reply With Quote  
     

  7. #7  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Sorry mate, Command code i'm not that good.
    Reply With Quote  
     

  8. #8  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    Quote Originally Posted by Lan Island View Post
    Sorry mate, Command code i'm not that good.
    I can help you with this 5$


    Reply With Quote  
     

  9. #9  
    Registered Member
    white full's Avatar
    Join Date
    Jul 2008
    Posts
    879
    Thanks given
    4
    Thanks received
    19
    Rep Power
    196
    Quote Originally Posted by Lan Island View Post
    Sorry mate, Command code i'm not that good.
    Command code? Not to be rude but code is code. Either you know how to program stuff or you don't whether it be basic or complicated.
    Code:
    if(command == item) {
    String[] commandSplit = command.split(" ");
    int item = Integer.parseInt(commandSplit[1]);
    int amount = Integer.parseInt(commandSplit[2]);
    for(int i = 0; i <= amount; i++) {
    if(item != badItem1 && item != badItem2){
    addItem(item, amount);
    } else {
    gameMessage("You can't spawn this item");
    }
    }
    }
    All basic java, maybe you can go basic-intermediate by adding arrays for bad items. Dont troll on convetions, r-s wont let me do it.
    Some parts may be incorrect but I was going for speed.
    That took me about 72 seconds, I drank some water at about 23 seconds though.
    Reply With Quote  
     

  10. #10  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    Quote Originally Posted by white full View Post
    Command code? Not to be rude but code is code. Either you know how to program stuff or you don't whether it be basic or complicated.
    Code:
    if(command == item) {
    String[] commandSplit = command.split(" ");
    int item = Integer.parseInt(commandSplit[1]);
    int amount = Integer.parseInt(commandSplit[2]);
    for(int i = 0; i <= amount; i++) {
    if(item != badItem1 && item != badItem2){
    addItem(item, amount);
    } else {
    gameMessage("You can't spawn this item");
    }
    }
    }
    All basic java, maybe you can go basic-intermediate by adding arrays for bad items. Dont troll on convetions, r-s wont let me do it.
    Some parts may be incorrect but I was going for speed.
    That took me about 72 seconds, I drank some water at about 23 seconds though.
    Thats a bad way to do it...


    Reply With Quote  
     

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

Similar Threads

  1. [508] Item Commands (Easier Than ::item)
    By Zach11 in forum Tutorials
    Replies: 49
    Last Post: 09-17-2013, 02:40 AM
  2. [PI] better item commands
    By katastrophic in forum Snippets
    Replies: 3
    Last Post: 07-23-2011, 03:24 PM
  3. [PI] Item Commands
    By xTylerR in forum Help
    Replies: 5
    Last Post: 11-14-2010, 03:44 AM
  4. [PI] Add item commands?
    By Tyluur in forum Help
    Replies: 9
    Last Post: 07-17-2010, 11:29 PM
  5. REQ item commands
    By nameless762 in forum Requests
    Replies: 0
    Last Post: 07-20-2008, 05:33 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
  •