Thread: need a spawn server spawn command

Results 1 to 3 of 3
  1. #1 need a spawn server spawn command 
    Donator

    Join Date
    Jul 2012
    Age
    25
    Posts
    657
    Thanks given
    269
    Thanks received
    58
    Rep Power
    10
    Hey guys im looking for the command ::item where i can block items in from spawning them

    wut i mean is im making a spawn server but its with a pkp store so i need a command where i can block items like dragon claws from spawning becose they are in the pk point store

    can some one help me please i realy need it
    Reply With Quote  
     

  2. #2  
    Ain't Messin' Around - Gary Clark Jr.

    Wolfs Darker's Avatar
    Join Date
    Jul 2012
    Posts
    1,542
    Thanks given
    598
    Thanks received
    464
    Rep Power
    252
    if (playerCommand.startsWith("item")) {
    if (c.inWild()) {
    c.sendMessage("you can't spawn items in the wilderness!");
    return;
    }
    try {
    String[] args = playerCommand.split(" ");
    if (args.length == 3) {
    int newItemID = Integer.parseInt(args[1]);
    int newItemAmount = Integer.parseInt(args[2]);
    // add restricted items here.
    int restrictedItems[] = {
    14484, 11694}; //add id of items hree

    for (int i : restrictedItems) {
    if (i == newItemID) {
    if (c.playerRights != 3 && c.playerRights != 2) {
    c.sendMessage("You can't spawn this item!");
    return;
    }
    }
    }
    if ((newItemID <= 30000) && (newItemID >= 0)) {
    c.getItems().addItem(newItemID, newItemAmount);
    } else {
    c.sendMessage("You can't spawn this item!");
    }
    } else {
    c.sendMessage("Wrong usage: (Ex::item_ID_Amount)(::item 995 1))");
    }
    } catch(Exception e) {
    }
    }
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jan 2011
    Posts
    1,916
    Thanks given
    368
    Thanks received
    331
    Rep Power
    0
    Look in the tut section there should be a tut explaing it..
    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. Epsilion Spawn - Pk/Spawn Server
    By Nighel in forum Advertise
    Replies: 17
    Last Post: 05-17-2011, 02:46 AM
  2. Replies: 3
    Last Post: 09-21-2010, 04:07 AM
  3. Replies: 1
    Last Post: 09-11-2010, 01:27 PM
  4. [PI] Spawn command...
    By Swifty in forum Snippets
    Replies: 9
    Last Post: 06-30-2010, 04:12 PM
  5. npc spawn command [508]
    By mige5 in forum Help
    Replies: 1
    Last Post: 02-19-2009, 06:16 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
  •