Thread: Broken Commands?

Results 1 to 4 of 4
  1. #1 Broken Commands? 
    现场大

    tiller's Avatar
    Join Date
    Dec 2015
    Posts
    757
    Thanks given
    335
    Thanks received
    164
    Rep Power
    303
    So basically, once i type in ::item 995 1, or ::.pnpc "x number" nothing happens. i tried ripping the same commands but in a different format and nothing works. Can someone please help me.

    if (playerCommand.equals("pnpc")) { c.resetPlayerNpc(); c.playerNpcId = - Pastebin.com
    Attached image
    Reply With Quote  
     

  2. #2  
    oof


    Join Date
    Aug 2012
    Posts
    3,150
    Thanks given
    2,847
    Thanks received
    857
    Rep Power
    2260
    change equals to startsWith
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2015
    Posts
    41
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    pnpc != pnpc <npc id>.
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Feb 2013
    Age
    24
    Posts
    137
    Thanks given
    41
    Thanks received
    21
    Rep Power
    20
    Code:
    if (playerCommand.startsWith("pnpc")) {
    				try {
    					int newNPC = Integer.parseInt(playerCommand.substring(5));
    					c.npcId2 = newNPC;
    					c.getPA().requestUpdates();
    				} catch(Exception e) {
    				}
    			}
    
    if (playerCommand.startsWith("item")) {
    				if (c.inWild())
    					return;
    				String[] args = playerCommand.split(" ");
    				int newItemID = Integer.parseInt(args[1]);
    				int newItemAmount = Integer.parseInt(args[2]);
    				if (args.length == 3) {
    					if ((newItemID <= 21000) && (newItemID >= 0)) {
    						for (int i = 0; i < Config.UNSPAWNABLE.length; i++) {
    							if (c.getItems().getItemName(newItemID).toLowerCase().contains(Config.UNSPAWNABLE[i]) && c.playerRights != 3) {
    								c.sendMessage("This item can not be obtained through spawning, earn it a different way.");
    								return;
    							}
    						}
    						c.getItems().addItem(newItemID, newItemAmount);
    					} else
    						c.sendMessage("No such item.");
    				}
    			}
    		}
    Attached image
    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. Staff Commands Broken!
    By King Bibby in forum Help
    Replies: 8
    Last Post: 05-31-2014, 12:55 AM
  2. Commands for broken armor.
    By xChaos in forum Help
    Replies: 4
    Last Post: 05-06-2013, 07:56 PM
  3. Replies: 0
    Last Post: 12-18-2010, 03:26 AM
  4. 562[RS2HD] Broken commands?
    By ThatDarkMatter in forum Help
    Replies: 5
    Last Post: 04-24-2010, 02:50 AM
  5. COMMANDS- 100% broken down and explained
    By mitch123hoff in forum Tutorials
    Replies: 40
    Last Post: 08-30-2009, 04:31 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
  •