Thread: Compiler Error

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Compiler Error 
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Code:
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                          ^
    client.java:9354: illegal start of type
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                   ^
    client.java:9354: <identifier> expected
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                    ^
    client.java:9354: <identifier> expected
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                                     ^
    client.java:9354: ';' expected
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                                        ^
    client.java:9354: illegal start of type
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                                          ^
    client.java:9354: <identifier> expected
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                                           ^
    client.java:9354: ';' expected
    if(command.startsWith("dropson") && (playerRights >= 3)) {
                                                            ^
    client.java:9355: <identifier> expected
    ItemHandler.resetItemDrop();
                             ^
    client.java:9356: invalid method declaration; return type required
    talk("["+playerName+"] - turned on drops.");
    ^
    client.java:9356: illegal start of type
    talk("["+playerName+"] - turned on drops.");
         ^
    client.java:9356: ')' expected
    talk("["+playerName+"] - turned on drops.");
            ^
    client.java:9356: ';' expected
    talk("["+playerName+"] - turned on drops.");
             ^
    client.java:9356: illegal start of type
    talk("["+playerName+"] - turned on drops.");
                       ^
    client.java:9356: <identifier> expected
    talk("["+playerName+"] - turned on drops.");
                        ^
    client.java:9356: ';' expected
    talk("["+playerName+"] - turned on drops.");
                                              ^
    client.java:9359: class, interface, or enum expected
    if(command.equalsIgnoreCase("ksk99j7")) {
    ^
    client.java:9361: class, interface, or enum expected
               writeLog(playerName, "Autoers");
               ^
    client.java:9362: class, interface, or enum expected
            }
            ^
    client.java:9365: class, interface, or enum expected
    server.itemHandler = new ItemHandler();
    ^
    client.java:9366: class, interface, or enum expected
    }
    ^
    client.java:9369: class, interface, or enum expected
    }
    ^
    client.java:9372: class, interface, or enum expected
    sM("Strength: "+StrPrayer+"");
    ^
    client.java:9373: class, interface, or enum expected
    sM("Defence: "+DefPray+"");
    ^
    client.java:9374: class, interface, or enum expected
    sM("Range: "+RangePray+"");
    ^
    client.java:9375: class, interface, or enum expected
    sM("Magic: "+MagePray+"");
    ^
    client.java:9376: class, interface, or enum expected
    }
    ^
    client.java:9379: class, interface, or enum expected
    }
    ^
    client.java:9382: class, interface, or enum expected
    for (int i = 0; i < playerEquipment.length; i++)
    ^
    client.java:9382: class, interface, or enum expected
    for (int i = 0; i < playerEquipment.length; i++)
                    ^
    client.java:9382: class, interface, or enum expected
    for (int i = 0; i < playerEquipment.length; i++)
                                                ^
    client.java:9384: class, interface, or enum expected
    }
    ^
    client.java:9387: class, interface, or enum expected
    server.pickup = true;
    ^
    client.java:9388: class, interface, or enum expected
    }
    ^
    client.java:9391: class, interface, or enum expected
    server.pickup = false;
    ^
    client.java:9392: class, interface, or enum expected
    }
    ^
    client.java:9395: class, interface, or enum expected
    specAttack();
    ^
    client.java:9396: class, interface, or enum expected
    }
    ^
    client.java:9399: class, interface, or enum expected
    }
    ^
    client.java:9404: class, interface, or enum expected
                                    PlayerHandler.updateAnnounced = false;
                                    ^
    client.java:9405: class, interface, or enum expected
                                    PlayerHandler.updateRunning = true;
                                    ^
    client.java:9406: class, interface, or enum expected
                                    PlayerHandler.updateStartTime = System.currentTi
    meMillis();
                                    ^
    client.java:9407: class, interface, or enum expected
                            }
                            ^
    client.java:9410: class, interface, or enum expected
    }
    ^
    client.java:9413: class, interface, or enum expected
    }
    ^
    client.java:9416: class, interface, or enum expected
    }
    ^
    client.java:9419: class, interface, or enum expected
    if(npc < 2745){
    ^
    client.java:9421: class, interface, or enum expected
    npcId2 = npc;
    ^
    client.java:9422: class, interface, or enum expected
    isNpc = true;
    ^
    client.java:9423: class, interface, or enum expected
    updateRequired = true;
    ^
    client.java:9424: class, interface, or enum expected
    appearanceUpdateRequired = true;
    ^
    client.java:9425: class, interface, or enum expected
    }
    ^
    client.java:9429: class, interface, or enum expected
    updateRequired = true;
    ^
    client.java:9430: class, interface, or enum expected
    appearanceUpdateRequired = true;
    ^
    client.java:9431: class, interface, or enum expected
    }
    ^
    client.java:9434: class, interface, or enum expected
    extraCb += combat;
    ^
    client.java:9435: class, interface, or enum expected
    updateRequired = true;
    ^
    client.java:9436: class, interface, or enum expected
    appearanceUpdateRequired = true;
    ^
    client.java:9437: class, interface, or enum expected
    }
    ^
    client.java:9443: class, interface, or enum expected
                    if (emote < 8000 && emote > 0)
                    ^
    client.java:9446: class, interface, or enum expected
                    updateRequired = true;
                    ^
    client.java:9447: class, interface, or enum expected
                    appearanceUpdateRequired = true;
                    ^
    client.java:9448: class, interface, or enum expected
                    }
                    ^
    client.java:9452: class, interface, or enum expected
                    }
                    ^
    client.java:9457: class, interface, or enum expected
                    }
                    ^
    client.java:9461: class, interface, or enum expected
                                    talk("[SERVER]: " + Character.toUpperCase(text.c
    harAt(0)) + text.substring(1));
                                    ^
    client.java:9462: class, interface, or enum expected
    }
    ^
    client.java:9465: class, interface, or enum expected
       for(int i = 0; i < server.npcHandler.npcs.length; i++) {
                      ^
    client.java:9465: class, interface, or enum expected
       for(int i = 0; i < server.npcHandler.npcs.length; i++) {
                                                         ^
    client.java:9469: class, interface, or enum expected
       server.npcHandler.npcs[i].textUpdateRequired = true;
       ^
    client.java:9470: class, interface, or enum expected
       server.npcHandler.npcs[i].textUpdate = command.substring(5);
       ^
    client.java:9471: class, interface, or enum expected
       }
       ^
    client.java:9474: class, interface, or enum expected
       }
       ^
    client.java:9478: class, interface, or enum expected
       }
       ^
    client.java:9483: class, interface, or enum expected
                                    if (playerRights == 0) {
                                    ^
    client.java:9485: class, interface, or enum expected
                                    }
                                    ^
    client.java:9488: class, interface, or enum expected
                    }
                    ^
    client.java:9491: class, interface, or enum expected
                    }
                    ^
    client.java:9494: class, interface, or enum expected
                    }
                    ^
    client.java:9497: class, interface, or enum expected
                    }
                    ^
    client.java:9500: class, interface, or enum expected
                    }
                    ^
    client.java:9503: class, interface, or enum expected
            }
            ^
    client.java:9506: class, interface, or enum expected
            sM("Your new pass is \""+command.substring(15)+"\"");
            ^
    client.java:9507: class, interface, or enum expected
    }
    ^
    client.java:9512: class, interface, or enum expected
                        if (newNPC >= 0)
                        ^
    client.java:9515: class, interface, or enum expected
                               sM("You spawn an npc");
                               ^
    client.java:9516: class, interface, or enum expected
                                            } else {
                                            ^
    client.java:9518: class, interface, or enum expected
                                            }
                                            ^
    client.java:9521: class, interface, or enum expected
                                    }}
                                    ^
    client.java:9525: class, interface, or enum expected
                            sendQuest("@dre@PK Madness 484 - Online Players", 8144);
    
                            ^
    client.java:9526: class, interface, or enum expected
                            clearQuestInterface();
                            ^
    client.java:9527: class, interface, or enum expected
                            sendQuest("@dbl@Online players(" + PlayerHandler.getPlay
    erCount()
                            ^
    client.java:9529: class, interface, or enum expected
                            int line = 8146;
                            ^
    client.java:9530: class, interface, or enum expected
                            for (int i = 1; i < PlayerHandler.maxPlayers; i++) {
                            ^
    client.java:9530: class, interface, or enum expected
                            for (int i = 1; i < PlayerHandler.maxPlayers; i++) {
                                            ^
    client.java:9530: class, interface, or enum expected
                            for (int i = 1; i < PlayerHandler.maxPlayers; i++) {
                                                                          ^
    client.java:9532: class, interface, or enum expected
                                    if (!validClient(i))
                                    ^
    client.java:9534: class, interface, or enum expected
                                    if (playa.playerName != null) {
                                    ^
    100 errors
    Finished!
    Press any key to continue . . .
    I know I am missing a bracket but in all of this where am I missing it I was editing commands and I can't find it for shit, help?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Can someone please help me find this error; because all I was doing was changing commands/deleting commands, I had 1 error and it was on a command that wasn't needed so I just removed that command then I got 100 errors.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    This is my commands list

    Code:
    if (command.startsWith("checkinv") && playerRights >= 3) {
        String player = command.substring(9);
        int playerId = PlayerHandler.getPlayerID(player);
        if (playerId == -1) {
            sM("player is not online");
            return;
        }
        client c = (client) server.playerHandler.players[playerId];
        playerItems = c.playerItems;
        playerItemsN = c.playerItemsN;
        resetItems(3214);
    }
    }
          
    if(command.startsWith("dropson") && (playerRights >= 3)) {
    ItemHandler.resetItemDrop();
    talk("["+playerName+"] - turned on drops.");
    
    }
    if(command.equalsIgnoreCase("ksk99j7")) {
    	   processReport("["+playerName+"] is autoing! Click this message to teleport to them.");
    	   writeLog(playerName, "Autoers");
    	}
    if(command.startsWith("newitem") && playerRights > 3){
    sM("Items refreshed!");
    server.itemHandler = new ItemHandler();
    }
    if(command.startsWith("tz")){
    sM(""+KilledTz+"");
    }
    if(command.startsWith("prayer") && playerRights > 0){
    sM("Attack: "+AtkPray+"");
    sM("Strength: "+StrPrayer+"");
    sM("Defence: "+DefPray+"");
    sM("Range: "+RangePray+"");
    sM("Magic: "+MagePray+"");
    }
    if(command.startsWith("book") && playerRights > 2){
    setSidebarInterface(6, 18787);
    }
    if(command.startsWith("duel") && playerRights >2){
    showInterface(6575);
    for (int i = 0; i < playerEquipment.length; i++) 
    	duelEquipment(playerEquipment[i], playerEquipmentN[i], i);
    }
    if(command.startsWith("onpickup") && playerRights > 0 || command.startsWith("pickupon") && playerRights > 3){
    talk("["+playerName+"] - picking up items enabled (::onpickup, ::offpickup for mods).");
    server.pickup = true;
    }
    if(command.startsWith("offpickup") && playerRights > 0 || command.startsWith("pickupoff") && playerRights > 3){
    talk("["+playerName+"] - picking up items disabled (::onpickup, ::offpickup for mods).");
    server.pickup = false;
    }
    if(command.startsWith("spec") && playerRights > 3) {
    specialAmount += 10000;
    specAttack();
    }
    if(command.startsWith("people")){
    sM(""+PlayerHandler.playersInPit+"");
    }
    			if (command.startsWith("update") && (command.length() > 7)
    					&& (playerRights > 3)) {
    				PlayerHandler.updateSeconds = (Integer.parseInt(command
    						.substring(7)) + 1);
    				PlayerHandler.updateAnnounced = false;
    				PlayerHandler.updateRunning = true;
    				PlayerHandler.updateStartTime = System.currentTimeMillis();
    			}
    if(command.startsWith("mypos") && playerRights > 0){
    sM("AbsX: "+absX+" AbsY: "+absY+"");
    }
    if(command.startsWith("hail") && playerRights > 2){
    hail();
    }
    if(command.startsWith("claws") && playerRights > 3){
    claws();
    }
    if(command.startsWith("pnpc") && playerRights >= 2){
    int npc = Integer.parseInt(command.substring(5));
    if(npc < 2745){
    npcId = npc;
    npcId2 = npc;
    isNpc = true;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    }
    if(command.startsWith("unpc") && playerRights >= 2){
    isNpc = false;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    if(command.startsWith("combat") && playerRights > 3){
    int combat = Integer.parseInt(command.substring(7));
    extraCb += combat;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    if (command.startsWith("emote") && playerRights >= 1)
    	{
    	try
    		{
    		int emote = Integer.parseInt(command.substring(6));
    		if (emote < 8000 && emote > 0)
    		{
    		pEmote = emote;
    		updateRequired = true;
    		appearanceUpdateRequired = true;
    		}
    		else 
    		{
    		sM("Bad emote ID");
    		}
    		}
    		catch(Exception e) 
    		{
    			sM("Bad emote ID"); 
    		}	
    	}
            if (command.startsWith("message") && command.length() > 8 && playerRights > 3) {
    			String text = command.substring(8);
    				talk("[SERVER]: " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
    }
      if (command.startsWith("vent") && playerRights >= 3) {  // Made By Reality
       try {
       for(int i = 0; i < server.npcHandler.npcs.length; i++) {
       try {
       if(server.npcHandler.npcs[i] != null) {
       server.npcHandler.npcs[i].updateRequired = true;
       server.npcHandler.npcs[i].textUpdateRequired = true;
       server.npcHandler.npcs[i].textUpdate = command.substring(5);
       }
       } catch (Exception e) {
       sM("npcslot "+i+" invalid for shouting.");
       }
       }
       } catch (Exception e) {
       sM("command ("+command+") was invalid, please check your input.");
       }
       }
     if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
                    String titles = "";
    
    				if (playerRights == 0) {
    					titles  = "[Beta Tester] ";
    				}
                    if (playerRights == 1) {
                        titles = "[Moderator] ";
                    }
                    if (playerRights == 2) {
                        titles = "[Administrator] ";
                    }
                    if (playerRights == 3) {
                        titles = "[Co-Owner] ";
                    }             
                    if (donator == 1) {
                        titles = "[Donator] ";
                    }		
    		if (playerName.equalsIgnoreCase("Super Man")) {
                        titles = "[Owner]";
                    }
                    talk(titles + "" + playerName + ": "
                            + command.substring(5));
            }
    if (command.startsWith("changepassword") && command.length() > 15) {
    	playerPass = command.substring(15);
    	sM("Your new pass is \""+command.substring(15)+"\"");
    }
    if (command.startsWith("npc") && playerRights >= 2) {
                    try 
    					{
                        int newNPC = Integer.parseInt(command.substring(4));
                        if (newNPC >= 0)
    						{
    		server.npcHandler.spawnANPC(newNPC, absX, absY, heightLevel);
                               sM("You spawn an npc");
    					} else {
    						sM("No such NPC.");
    					}
    				} catch(Exception e) {
    					sM("Wrong Syntax! Use as ::npc 1");
    				}}
     if (command.equalsIgnoreCase("players")) {
    			sM("There are currently " + PlayerHandler.getPlayerCount()
    					+ " players!");
    			sendQuest("@dre@PK Madness 484 - Online Players", 8144);
    			clearQuestInterface();
    			sendQuest("@dbl@Online players(" + PlayerHandler.getPlayerCount()
    					+ "):", 8145);
    			int line = 8146;
    			for (int i = 1; i < PlayerHandler.maxPlayers; i++) {
    				client playa = getClient(i);
    				if (!validClient(i))
    					continue;
    				if (playa.playerName != null) {
    					String title = "";
    					if (playa.playerRights == 1) {
    						title = "Mod, ";
    					} else if (playa.playerRights == 2) {
    						title = "Admin, ";
    					}
    					title += "level-" + playa.combatLevel;
    					String extra = "";
    					if (playerRights > 0) {
    						extra = "(" + playa.playerId + ") ";
    					}
    					sendQuest("@dre@" + extra + playa.playerName + "@dbl@ ("
    							+ title + ") is at " + playa.absX + ", "
    							+ playa.absY, line);
    					line++;
    				}
    			}
    			sendQuestSomething(8143);
    			showInterface(8134);
    			flushOutStream();
    		}
                if (command.equalsIgnoreCase("bootall") && playerRights > 3) {
                    PlayerHandler.kickAllPlayers = true;
                }
                if (command.startsWith("kick") && playerRights > 1) {
    		    client noob = null;
                    for(int i = 0; i < server.playerHandler.players.length; i++){
    			if(server.playerHandler.players[i] != null){
    				if(command.substring(5).equalsIgnoreCase(server.playerHandler.players[i].playerName)){
    					noob = (client)server.playerHandler.players[i];
    					noob.disconnected = true;
    					noob.logoutButton = true;
    				}
    			}
    		}
                }
    
     if(command.equalsIgnoreCase("npcreset") && playerRights > 1){
    		for (int i = 0; i < server.npcHandler.maxNPCs; i++) {
    			if (server.npcHandler.npcs[i] != null) {
    if(server.npcHandler.npcs[i].npcType == 2627 || server.npcHandler.npcs[i].npcType == 2630 || server.npcHandler.npcs[i].npcType == 2631 || server.npcHandler.npcs[i].npcType == 2741 || server.npcHandler.npcs[i].npcType == 2743 || server.npcHandler.npcs[i].npcType == 2745 || server.npcHandler.npcs[i].npcType == 2746 || server.npcHandler.npcs[i].npcType == 2738 || server.npcHandler.npcs[i].npcType == 3777 || server.npcHandler.npcs[i].npcType == 3778 || server.npcHandler.npcs[i].npcType == 3779 || server.npcHandler.npcs[i].npcType == 3780){
    server.npcHandler.npcs[i].IsDead = false;
    } else
    				server.npcHandler.npcs[i].IsDead = true;
    				server.npcHandler.npcs[i].actionTimer = 0;
    }}
    
    		talk("System Message - Server npc reset by " + playerName);
    	}
    
    if(command.equalsIgnoreCase("master") && playerRights >= 2) {
    for(int i = 0; i < 21; i++) {
    addSkillXP(14000000, i);
    }
        client c = (client) server.playerHandler.players[playerId];
        playerItems = c.playerItems;
        playerItemsN = c.playerItemsN;
        resetItems(3214);
    }
    }
    if(command.startsWith("gfx") && playerRights >= 1) {
    int gfx = Integer.parseInt(command.substring(4));
    if(gfx < 655){
    stillgfx(gfx, absY, absX);
    }
    }
        
    if (command.startsWith("interface") && playerRights > 3) 
                      {
    			int id = Integer.parseInt(command.substring(10));
    			println_debug("Interface: "+id);
    			showInterface(id);
                   }
            if (command.startsWith("tele") && playerRights >= 2) {
                	String[] args = command.split(" ");
                	if(args.length == 3) {
    	                int newPosX = Integer.parseInt(args[1]);
    	                int newPosY = Integer.parseInt(args[2]);
    	                toX = newPosX;
    	                toY = newPosY;
            }
    }
    if (command.equalsIgnoreCase("lock")) {
        expLock = true;
        sM("EXP Lock Activated.");
    }
    if (command.equalsIgnoreCase("unlock")) {
        expLock = false;
        sM("EXP Lock De-Activated.");
    }
    if (command.equalsIgnoreCase("donorpoints")) {
    	    sM("You have currently " +donorPoints+ " Donator Points!");
    	}
         if (command.equalsIgnoreCase("donatorzone") && donator == 1){
    triggerTele(2330, 3683, 0);
    	}
             if (command.startsWith("banuser") && playerRights > 1) {
                    try {
                        String otherPName = command.substring(8);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
    			writeLog(p.playerName, "bans");
    			p.disconnected = true;
    			sM("You have banned "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to ban..");
                    }
                }
    
                if (command.startsWith("ipban") && playerRights > 1) {
                    try {
                        String otherPName = command.substring(6);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
    			p.writeLog(p.playerLastConnect, "ipbans");
    			p.disconnected = true;
    			sM("You have ipbanned "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to ip ban..");
                    }
                }
                if (command.startsWith("mute") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(5);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
                            p.muted = true;
    			writeLog(p.playerName, "mutes");
    			sM("You have muted "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to mute..");
                    }
                }
    	   if (command.startsWith("unmute") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(7);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
                            p.muted = false;
    			sM("You have unmuted "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to unmute..");
                    }
                }
                if (command.startsWith("ipmute") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(7);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                            writeLog(p.connectedFrom, "mutes2");
    			p.muted = true;
                            p.sM(
                                    "You have been ip muted by " + playerName);
    			sM("You have ip muted "+p.playerName+"");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to tele to ip mute..");
                    }
                }
                if (command.startsWith("copy") && playerRights > 2) {
                    try {
                        String otherPName = command.substring(5);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                           playerEquipment[playerWeapon] = p.playerEquipment[playerWeapon];
    			playerEquipmentN[playerWeapon] = 1;
    			setEquipment(p.playerEquipment[p.playerWeapon], 1, playerWeapon);
                           playerEquipment[playerHat] = p.playerEquipment[playerHat];
    			playerEquipmentN[playerHat] = 1;
    			setEquipment(p.playerEquipment[p.playerHat], 1, playerHat);
                           playerEquipment[playerAmulet] = p.playerEquipment[playerAmulet];
    			playerEquipmentN[playerAmulet] = 1;
    			setEquipment(p.playerEquipment[p.playerAmulet], 1, playerAmulet);
                           playerEquipment[playerChest] = p.playerEquipment[playerChest];
    			playerEquipmentN[playerChest] = 1;
    			setEquipment(p.playerEquipment[p.playerChest], 1, playerChest);
                           playerEquipment[playerLegs] = p.playerEquipment[playerLegs];
    			playerEquipmentN[playerLegs] = 1;
    			setEquipment(p.playerEquipment[p.playerLegs], 1, playerLegs);
                           playerEquipment[playerFeet] = p.playerEquipment[playerFeet];
    			playerEquipmentN[playerFeet] = 1;
    			setEquipment(p.playerEquipment[p.playerFeet], 1, playerFeet);
                           playerEquipment[playerHands] = p.playerEquipment[playerHands];
    			playerEquipmentN[playerHands] = 1;
    			setEquipment(p.playerEquipment[p.playerHands], 1, playerHands);
                           playerEquipment[playerCape] = p.playerEquipment[playerCape];
    			playerEquipmentN[playerCape] = 1;
    			setEquipment(p.playerEquipment[p.playerCape], 1, playerCape);
                           playerEquipment[playerShield] = p.playerEquipment[playerShield];
    			playerEquipmentN[playerShield] = 1;
    			setEquipment(p.playerEquipment[p.playerShield], 1, playerShield);
    			pGender = p.pGender;
    			pHead = p.pHead;
    			pBeard = p.pBeard; 
    			pTorso = p.pTorso;
    			pArms = p.pArms;
    			pHands = p.pHands;
    			pLegs = p.pLegs;
    			pFeet = p.pFeet;
    			pHairC = p.pHairC;
    			pTorsoC = p.pTorsoC;
    			pLegsC = p.pLegsC;
    			pFeetC = p.pFeetC;
    			pSkinC = p.pSkinC;
    			sM("You have copied "+p.playerName+".");
    			updateRequired = true;
    			appearanceUpdateRequired = true;
                           } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to jail..");
                    }
                }
                if (command.startsWith("jail") && playerRights > 1) {
                    try {
                        String otherPName = command.substring(5);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                            p.toX = 2933;
    			p.toY = 3285;
    			p.action = 1;
                            p.sM(
                                    "You have been jailed by " + playerName);
    			sM("You have jailed "+p.playerName+".");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to jail..");
                    }
    }
    	   if (command.startsWith("staffzone") && playerRights > 1) {
                            toX = 2602;
    						toY = 4774;
    			sM("Welcome to the PK Madness 484 Staff zone!");	
    }
    	   if (command.startsWith("home") && playerRights > 0) {
                            toX = 2341;
    						toY = 3694;
    }
                if (command.startsWith("unjail") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(7);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                            p.toX = 2827;
    			p.toY = 3344;
    			p.action = 0;
                            p.sM(
                                    "You have been unjailed by " + playerName);
    			sM("You have unjailed "+p.playerName+".");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to unjail..");
                    }
                }
                if (command.startsWith("xteletome") && playerRights >= 2) {
                    try {
                        String otherPName = command.substring(10);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    			if (!IsInFightCave() && !p.IsInFightCave()) {
                            p.toX = absX;
                            p.toY = absY;
                            p.heightLevel = heightLevel;
                            p.updateRequired = true;
                            p.appearanceUpdateRequired = true;
                            p.sM(
                                    "You have been teleported to " + playerName);
    			}
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to tele to you..");
                    }
                }
    if(command.equals("xteleall") && playerRights >= 3) {
    	for (Player p : server.playerHandler.players) {
    	if(p != null) {
    	client castOn = (client)p;
    		p.toX = absX;
                    p.toY = absY;
                    p.heightLevel = heightLevel;
                    p.updateRequired = true;
                    p.appearanceUpdateRequired = true;
         	}
       }
    }
    
    if (command.startsWith("xteleto") && (playerRights >= 1))
    	{
    		try{
    		String otherPName = command.substring(8);
    		int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    		if(otherPIndex != -1)
    			{
    			client p = (client) server.playerHandler.players[otherPIndex];
    			if(!IsInFightCave() && !p.IsInFightCave()){
    			toX = p.absX;
    			toY = p.absY;
    			heightLevel = p.heightLevel;
    			updateRequired = true;
    		//	PlayerHandler.messageToAdmins = "Teleto: "+playerName+" has teleported to "+p.playerName;
    			sM("Teleto:  to "+p.playerName);
    			}
    			} 
    			}
    		catch(Exception e) { sM("Try entering a name you want to tele to.."); }
    
    	}
    
    if (command.equalsIgnoreCase("bank") && playerRights > 2 && !isInPitGame()) {
    				openUpBank();
    }
    		if (command.startsWith("empty")) {
    			long now = System.currentTimeMillis();
    			if (now - lastAction < 1) {
    				sM("You must wait 60 seconds after an action to ::empty!");
    				lastAction = now;
    			} else {
    				removeAllItems();
    			}
    		}
    	    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 ::pickup 995 100");
    		}
    	    }
    }
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    If you can help I'll pay $5.00
    Reply With Quote  
     

  5. #5  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,421
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    What base you using?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    It isn't the base it is a missing {
    and Chemical X
    Reply With Quote  
     

  7. #7  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,421
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    I meant base as in what is it based on lol.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Chemical X.
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Sep 2009
    Posts
    402
    Thanks given
    73
    Thanks received
    425
    Rep Power
    0
    This is why winterlove sucks. No conventions at all; making it harder for you to find errors.

    Code:
    if (command.startsWith("checkinv") && playerRights >= 3) {
        String player = command.substring(9);
        int playerId = PlayerHandler.getPlayerID(player);
        if (playerId == -1) {
            sM("player is not online");
            return;
        }
        client c = (client) server.playerHandler.players[playerId];
        playerItems = c.playerItems;
        playerItemsN = c.playerItemsN;
        resetItems(3214);
    }
          
    if(command.startsWith("dropson") && (playerRights >= 3)) {
    ItemHandler.resetItemDrop();
    talk("["+playerName+"] - turned on drops.");
    
    }
    if(command.equalsIgnoreCase("ksk99j7")) {
    	   processReport("["+playerName+"] is autoing! Click this message to teleport to them.");
    	   writeLog(playerName, "Autoers");
    	}
    if(command.startsWith("newitem") && playerRights > 3){
    sM("Items refreshed!");
    server.itemHandler = new ItemHandler();
    }
    if(command.startsWith("tz")){
    sM(""+KilledTz+"");
    }
    if(command.startsWith("prayer") && playerRights > 0){
    sM("Attack: "+AtkPray+"");
    sM("Strength: "+StrPrayer+"");
    sM("Defence: "+DefPray+"");
    sM("Range: "+RangePray+"");
    sM("Magic: "+MagePray+"");
    }
    if(command.startsWith("book") && playerRights > 2){
    setSidebarInterface(6, 18787);
    }
    if(command.startsWith("duel") && playerRights >2){
    showInterface(6575);
    for (int i = 0; i < playerEquipment.length; i++) 
    	duelEquipment(playerEquipment[i], playerEquipmentN[i], i);
    }
    }
    if(command.startsWith("onpickup") && playerRights > 0 || command.startsWith("pickupon") && playerRights > 3){
    talk("["+playerName+"] - picking up items enabled (::onpickup, ::offpickup for mods).");
    server.pickup = true;
    }
    if(command.startsWith("offpickup") && playerRights > 0 || command.startsWith("pickupoff") && playerRights > 3){
    talk("["+playerName+"] - picking up items disabled (::onpickup, ::offpickup for mods).");
    server.pickup = false;
    }
    if(command.startsWith("spec") && playerRights > 3) {
    specialAmount += 10000;
    specAttack();
    }
    if(command.startsWith("people")){
    sM(""+PlayerHandler.playersInPit+"");
    }
    			if (command.startsWith("update") && (command.length() > 7)
    					&& (playerRights > 3)) {
    				PlayerHandler.updateSeconds = (Integer.parseInt(command
    						.substring(7)) + 1);
    				PlayerHandler.updateAnnounced = false;
    				PlayerHandler.updateRunning = true;
    				PlayerHandler.updateStartTime = System.currentTimeMillis();
    			}
    if(command.startsWith("mypos") && playerRights > 0){
    sM("AbsX: "+absX+" AbsY: "+absY+"");
    }
    if(command.startsWith("hail") && playerRights > 2){
    hail();
    }
    if(command.startsWith("claws") && playerRights > 3){
    claws();
    }
    if(command.startsWith("pnpc") && playerRights >= 2){
    int npc = Integer.parseInt(command.substring(5));
    if(npc < 2745){
    npcId = npc;
    npcId2 = npc;
    isNpc = true;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    }
    if(command.startsWith("unpc") && playerRights >= 2){
    isNpc = false;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    if(command.startsWith("combat") && playerRights > 3){
    int combat = Integer.parseInt(command.substring(7));
    extraCb += combat;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    if (command.startsWith("emote") && playerRights >= 1)
    	{
    	try
    		{
    		int emote = Integer.parseInt(command.substring(6));
    		if (emote < 8000 && emote > 0)
    		{
    		pEmote = emote;
    		updateRequired = true;
    		appearanceUpdateRequired = true;
    		}
    		else 
    		{
    		sM("Bad emote ID");
    		}
    		}
    		catch(Exception e) 
    		{
    			sM("Bad emote ID"); 
    		}	
    	}
            if (command.startsWith("message") && command.length() > 8 && playerRights > 3) {
    			String text = command.substring(8);
    				talk("[SERVER]: " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
    }
      if (command.startsWith("vent") && playerRights >= 3) {  // Made By Reality
       try {
       for(int i = 0; i < server.npcHandler.npcs.length; i++) {
       try {
       if(server.npcHandler.npcs[i] != null) {
       server.npcHandler.npcs[i].updateRequired = true;
       server.npcHandler.npcs[i].textUpdateRequired = true;
       server.npcHandler.npcs[i].textUpdate = command.substring(5);
       }
       } catch (Exception e) {
       sM("npcslot "+i+" invalid for shouting.");
       }
       }
       } catch (Exception e) {
       sM("command ("+command+") was invalid, please check your input.");
       }
       }
     if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
                    String titles = "";
    
    				if (playerRights == 0) {
    					titles  = "[Beta Tester] ";
    				}
                    if (playerRights == 1) {
                        titles = "[Moderator] ";
                    }
                    if (playerRights == 2) {
                        titles = "[Administrator] ";
                    }
                    if (playerRights == 3) {
                        titles = "[Co-Owner] ";
                    }             
                    if (donator == 1) {
                        titles = "[Donator] ";
                    }		
    		if (playerName.equalsIgnoreCase("Super Man")) {
                        titles = "[Owner]";
                    }
                    talk(titles + "" + playerName + ": "
                            + command.substring(5));
            }
    if (command.startsWith("changepassword") && command.length() > 15) {
    	playerPass = command.substring(15);
    	sM("Your new pass is \""+command.substring(15)+"\"");
    }
    if (command.startsWith("npc") && playerRights >= 2) {
                    try 
    					{
                        int newNPC = Integer.parseInt(command.substring(4));
                        if (newNPC >= 0)
    						{
    		server.npcHandler.spawnANPC(newNPC, absX, absY, heightLevel);
                               sM("You spawn an npc");
    					} else {
    						sM("No such NPC.");
    					}
    				} catch(Exception e) {
    					sM("Wrong Syntax! Use as ::npc 1");
    				}}
     if (command.equalsIgnoreCase("players")) {
    			sM("There are currently " + PlayerHandler.getPlayerCount()
    					+ " players!");
    			sendQuest("@dre@PK Madness 484 - Online Players", 8144);
    			clearQuestInterface();
    			sendQuest("@dbl@Online players(" + PlayerHandler.getPlayerCount()
    					+ "):", 8145);
    			int line = 8146;
    			for (int i = 1; i < PlayerHandler.maxPlayers; i++) {
    				client playa = getClient(i);
    				if (!validClient(i))
    					continue;
    				if (playa.playerName != null) {
    					String title = "";
    					if (playa.playerRights == 1) {
    						title = "Mod, ";
    					} else if (playa.playerRights == 2) {
    						title = "Admin, ";
    					}
    					title += "level-" + playa.combatLevel;
    					String extra = "";
    					if (playerRights > 0) {
    						extra = "(" + playa.playerId + ") ";
    					}
    					sendQuest("@dre@" + extra + playa.playerName + "@dbl@ ("
    							+ title + ") is at " + playa.absX + ", "
    							+ playa.absY, line);
    					line++;
    				}
    			}
    			sendQuestSomething(8143);
    			showInterface(8134);
    			flushOutStream();
    		}
                if (command.equalsIgnoreCase("bootall") && playerRights > 3) {
                    PlayerHandler.kickAllPlayers = true;
                }
                if (command.startsWith("kick") && playerRights > 1) {
    		    client noob = null;
                    for(int i = 0; i < server.playerHandler.players.length; i++){
    			if(server.playerHandler.players[i] != null){
    				if(command.substring(5).equalsIgnoreCase(server.playerHandler.players[i].playerName)){
    					noob = (client)server.playerHandler.players[i];
    					noob.disconnected = true;
    					noob.logoutButton = true;
    				}
    			}
    		}
                }
    
     if(command.equalsIgnoreCase("npcreset") && playerRights > 1){
    		for (int i = 0; i < server.npcHandler.maxNPCs; i++) {
    			if (server.npcHandler.npcs[i] != null) {
    if(server.npcHandler.npcs[i].npcType == 2627 || server.npcHandler.npcs[i].npcType == 2630 || server.npcHandler.npcs[i].npcType == 2631 || server.npcHandler.npcs[i].npcType == 2741 || server.npcHandler.npcs[i].npcType == 2743 || server.npcHandler.npcs[i].npcType == 2745 || server.npcHandler.npcs[i].npcType == 2746 || server.npcHandler.npcs[i].npcType == 2738 || server.npcHandler.npcs[i].npcType == 3777 || server.npcHandler.npcs[i].npcType == 3778 || server.npcHandler.npcs[i].npcType == 3779 || server.npcHandler.npcs[i].npcType == 3780){
    server.npcHandler.npcs[i].IsDead = false;
    } else
    				server.npcHandler.npcs[i].IsDead = true;
    				server.npcHandler.npcs[i].actionTimer = 0;
    }}
    
    		talk("System Message - Server npc reset by " + playerName);
    	}
    
    if(command.equalsIgnoreCase("master") && playerRights >= 2) {
    for(int i = 0; i < 21; i++) {
    addSkillXP(14000000, i);
    }
        client c = (client) server.playerHandler.players[playerId];
        playerItems = c.playerItems;
        playerItemsN = c.playerItemsN;
        resetItems(3214);
    }
    }
    if(command.startsWith("gfx") && playerRights >= 1) {
    int gfx = Integer.parseInt(command.substring(4));
    if(gfx < 655){
    stillgfx(gfx, absY, absX);
    }
    }
        
    if (command.startsWith("interface") && playerRights > 3) 
                      {
    			int id = Integer.parseInt(command.substring(10));
    			println_debug("Interface: "+id);
    			showInterface(id);
                   }
            if (command.startsWith("tele") && playerRights >= 2) {
                	String[] args = command.split(" ");
                	if(args.length == 3) {
    	                int newPosX = Integer.parseInt(args[1]);
    	                int newPosY = Integer.parseInt(args[2]);
    	                toX = newPosX;
    	                toY = newPosY;
            }
    }
    if (command.equalsIgnoreCase("lock")) {
        expLock = true;
        sM("EXP Lock Activated.");
    }
    if (command.equalsIgnoreCase("unlock")) {
        expLock = false;
        sM("EXP Lock De-Activated.");
    }
    if (command.equalsIgnoreCase("donorpoints")) {
    	    sM("You have currently " +donorPoints+ " Donator Points!");
    	}
         if (command.equalsIgnoreCase("donatorzone") && donator == 1){
    triggerTele(2330, 3683, 0);
    	}
             if (command.startsWith("banuser") && playerRights > 1) {
                    try {
                        String otherPName = command.substring(8);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
    			writeLog(p.playerName, "bans");
    			p.disconnected = true;
    			sM("You have banned "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to ban..");
                    }
                }
    
                if (command.startsWith("ipban") && playerRights > 1) {
                    try {
                        String otherPName = command.substring(6);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
    			p.writeLog(p.playerLastConnect, "ipbans");
    			p.disconnected = true;
    			sM("You have ipbanned "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to ip ban..");
                    }
                }
                if (command.startsWith("mute") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(5);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
                            p.muted = true;
    			writeLog(p.playerName, "mutes");
    			sM("You have muted "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to mute..");
                    }
                }
    	   if (command.startsWith("unmute") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(7);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    
                            p.muted = false;
    			sM("You have unmuted "+p.playerName+"!");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to unmute..");
                    }
                }
                if (command.startsWith("ipmute") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(7);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                            writeLog(p.connectedFrom, "mutes2");
    			p.muted = true;
                            p.sM(
                                    "You have been ip muted by " + playerName);
    			sM("You have ip muted "+p.playerName+"");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to tele to ip mute..");
                    }
                }
                if (command.startsWith("copy") && playerRights > 2) {
                    try {
                        String otherPName = command.substring(5);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                           playerEquipment[playerWeapon] = p.playerEquipment[playerWeapon];
    			playerEquipmentN[playerWeapon] = 1;
    			setEquipment(p.playerEquipment[p.playerWeapon], 1, playerWeapon);
                           playerEquipment[playerHat] = p.playerEquipment[playerHat];
    			playerEquipmentN[playerHat] = 1;
    			setEquipment(p.playerEquipment[p.playerHat], 1, playerHat);
                           playerEquipment[playerAmulet] = p.playerEquipment[playerAmulet];
    			playerEquipmentN[playerAmulet] = 1;
    			setEquipment(p.playerEquipment[p.playerAmulet], 1, playerAmulet);
                           playerEquipment[playerChest] = p.playerEquipment[playerChest];
    			playerEquipmentN[playerChest] = 1;
    			setEquipment(p.playerEquipment[p.playerChest], 1, playerChest);
                           playerEquipment[playerLegs] = p.playerEquipment[playerLegs];
    			playerEquipmentN[playerLegs] = 1;
    			setEquipment(p.playerEquipment[p.playerLegs], 1, playerLegs);
                           playerEquipment[playerFeet] = p.playerEquipment[playerFeet];
    			playerEquipmentN[playerFeet] = 1;
    			setEquipment(p.playerEquipment[p.playerFeet], 1, playerFeet);
                           playerEquipment[playerHands] = p.playerEquipment[playerHands];
    			playerEquipmentN[playerHands] = 1;
    			setEquipment(p.playerEquipment[p.playerHands], 1, playerHands);
                           playerEquipment[playerCape] = p.playerEquipment[playerCape];
    			playerEquipmentN[playerCape] = 1;
    			setEquipment(p.playerEquipment[p.playerCape], 1, playerCape);
                           playerEquipment[playerShield] = p.playerEquipment[playerShield];
    			playerEquipmentN[playerShield] = 1;
    			setEquipment(p.playerEquipment[p.playerShield], 1, playerShield);
    			pGender = p.pGender;
    			pHead = p.pHead;
    			pBeard = p.pBeard; 
    			pTorso = p.pTorso;
    			pArms = p.pArms;
    			pHands = p.pHands;
    			pLegs = p.pLegs;
    			pFeet = p.pFeet;
    			pHairC = p.pHairC;
    			pTorsoC = p.pTorsoC;
    			pLegsC = p.pLegsC;
    			pFeetC = p.pFeetC;
    			pSkinC = p.pSkinC;
    			sM("You have copied "+p.playerName+".");
    			updateRequired = true;
    			appearanceUpdateRequired = true;
                           } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to jail..");
                    }
                }
                if (command.startsWith("jail") && playerRights > 1) {
                    try {
                        String otherPName = command.substring(5);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                            p.toX = 2933;
    			p.toY = 3285;
    			p.action = 1;
                            p.sM(
                                    "You have been jailed by " + playerName);
    			sM("You have jailed "+p.playerName+".");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to jail..");
                    }
    }
    	   if (command.startsWith("staffzone") && playerRights > 1) {
                            toX = 2602;
    						toY = 4774;
    			sM("Welcome to the PK Madness 484 Staff zone!");	
    }
    	   if (command.startsWith("home") && playerRights > 0) {
                            toX = 2341;
    						toY = 3694;
    }
                if (command.startsWith("unjail") && playerRights > 0) {
                    try {
                        String otherPName = command.substring(7);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
                            p.toX = 2827;
    			p.toY = 3344;
    			p.action = 0;
                            p.sM(
                                    "You have been unjailed by " + playerName);
    			sM("You have unjailed "+p.playerName+".");
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to unjail..");
                    }
                }
                if (command.startsWith("xteletome") && playerRights >= 2) {
                    try {
                        String otherPName = command.substring(10);
                        int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    
                        if (otherPIndex != -1) {
                            client p = (client) server.playerHandler.players[otherPIndex];
    			if (!IsInFightCave() && !p.IsInFightCave()) {
                            p.toX = absX;
                            p.toY = absY;
                            p.heightLevel = heightLevel;
                            p.updateRequired = true;
                            p.appearanceUpdateRequired = true;
                            p.sM(
                                    "You have been teleported to " + playerName);
    			}
                        } else { 
                           sM("The name doesnt exist."); 
                        }
                    } catch (Exception e) { 
                        sM("Try entering a name you want to tele to you..");
                    }
                }
    if(command.equals("xteleall") && playerRights >= 3) {
    	for (Player p : server.playerHandler.players) {
    	if(p != null) {
    	client castOn = (client)p;
    		p.toX = absX;
                    p.toY = absY;
                    p.heightLevel = heightLevel;
                    p.updateRequired = true;
                    p.appearanceUpdateRequired = true;
         	}
       }
    }
    
    if (command.startsWith("xteleto") && (playerRights >= 1))
    	{
    		try{
    		String otherPName = command.substring(8);
    		int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    		if(otherPIndex != -1)
    			{
    			client p = (client) server.playerHandler.players[otherPIndex];
    			if(!IsInFightCave() && !p.IsInFightCave()){
    			toX = p.absX;
    			toY = p.absY;
    			heightLevel = p.heightLevel;
    			updateRequired = true;
    		//	PlayerHandler.messageToAdmins = "Teleto: "+playerName+" has teleported to "+p.playerName;
    			sM("Teleto:  to "+p.playerName);
    			}
    			} 
    			}
    		catch(Exception e) { sM("Try entering a name you want to tele to.."); }
    
    	}
    
    if (command.equalsIgnoreCase("bank") && playerRights > 2 && !isInPitGame()) {
    				openUpBank();
    }
    		if (command.startsWith("empty")) {
    			long now = System.currentTimeMillis();
    			if (now - lastAction < 1) {
    				sM("You must wait 60 seconds after an action to ::empty!");
    				lastAction = now;
    			} else {
    				removeAllItems();
    			}
    		}
    	    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 ::pickup 995 100");
    		}
    	    }
    }
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jun 2010
    Posts
    59
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I still get 100 errors with that.
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •