Thread: [PI] 2 commands

Results 1 to 7 of 7
  1. #1 [PI] 2 commands 
    Donator

    Join Date
    Jul 2010
    Posts
    276
    Thanks given
    0
    Thanks received
    1
    Rep Power
    26
    fixed
    Last edited by cynicism; 11-15-2020 at 06:16 AM.
    Reply With Quote  
     

  2. #2  
    Registered Member Dharmesh's Avatar
    Join Date
    Jul 2010
    Posts
    433
    Thanks given
    9
    Thanks received
    13
    Rep Power
    20
    Code:
    if (playerCommand.startsWith("setlevel") && c.playerRights >= 2) {
    				if (c.inWild())
    				return;
    				for (int j = 0; j < c.playerEquipment.length; j++) {
    					if (c.playerEquipment[j] > 0) {
    						c.sendMessage("Please take all your armour and weapons off before using this command.");
    						return;
    					}
    				}
    				try {
    					String[] args = playerCommand.split(" ");
    					int skill = Integer.parseInt(args[1]);
    					int level = Integer.parseInt(args[2]);
    					if (level > 99)
    					level = 99;
    					else if (level < 0)
    					level = 1;
    					c.playerXP[skill] = c.getPA().getXPForLevel(level)+5;
    					c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]);
    					c.getPA().refreshSkill(skill);
    				} catch (Exception e){}
    			}
    dunno about giveitem
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Donator

    Join Date
    Jul 2010
    Posts
    276
    Thanks given
    0
    Thanks received
    1
    Rep Power
    26
    Sorry to be rude but can you even read? I wanted one for something else, not yourself.
    Reply With Quote  
     

  5. #4  
    Banned

    Join Date
    Feb 2010
    Posts
    1,203
    Thanks given
    178
    Thanks received
    173
    Rep Power
    0
    if (playerCommand.equals("giveitem")) {
    String name = playerCommand.substring(8);
    String[] args = playerCommand.split(" ");
    for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    if (PlayerHandler.players[i] != null) {
    Client c2 =(Client)PlayerHandler.players[j];
    if (args.length == 3) {
    int newItemID = Integer.parseInt(args[1]);
    int newItemAmount = Integer.parseInt(args[2]);
    if ((newItemID <= 20000) && (newItemID >= 0)) {
    c2.getItems().addItem(newItemID, newItemAmount);
    c.sendMessage("You have just given "+c2.playerName+" Item: "+newItemID+".");
    c2.sendMessage("You have just recieved an item from "+c.playerName+".");
    }
    }
    }
    Reply With Quote  
     

  6. #5  
    Donator

    Join Date
    Jul 2010
    Posts
    276
    Thanks given
    0
    Thanks received
    1
    Rep Power
    26
    Doesn't work broseph.
    Reply With Quote  
     

  7. #6  
    Registered Member
    IngeniousPentaSquid's Avatar
    Join Date
    Jun 2011
    Age
    28
    Posts
    993
    Thanks given
    47
    Thanks received
    140
    Rep Power
    79
    Sorry to be rude but do you have some courtesy? People try to help you and your arrogant mentality doesn't care. As for "but can you read?" how about using the search bar on Rune-Server or Google, there are a thousand setlevel threads. Or is your lazy mouse able to move it?
    ©®
    Reply With Quote  
     

  8. #7  
    Registered Member Dharmesh's Avatar
    Join Date
    Jul 2010
    Posts
    433
    Thanks given
    9
    Thanks received
    13
    Rep Power
    20
    Quote Originally Posted by Blackup View Post
    Sorry to be rude but can you even read? I wanted one for something else, not yourself.
    Sorry to be rube but you're an asshole.
    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. Replies: 2
    Last Post: 06-07-2011, 08:29 PM
  2. Replies: 9
    Last Post: 11-28-2009, 05:39 AM
  3. Sell Commands / Buy Commands
    By 5simple5 in forum Help
    Replies: 5
    Last Post: 01-17-2009, 06:03 PM
  4. Replies: 19
    Last Post: 11-23-2008, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •