Skip to main content

Compiler errors

1 reply [Last post]
daygen4545
Offline
Joined: 2010-08-03

It shows up in the compiler as reached end as file without parsing, and the other error is try without catch or finally.

Here is the code:

package net.com.canownueasy.net.packethandler;

import net.com.canownueasy.net.SocketListener;
import java.io.BufferedWriter;
import java.io.FileWriter;
import net.com.canownueasy.Server;
import net.com.canownueasy.Engine;
import net.com.canownueasy.mainprocess.combat.*;
import net.com.canownueasy.mainprocess.Player;
import net.com.canownueasy.util.Misc;

public class Commands implements Packet {

public void handlePacket(Player p, int packetId, int packetSize) {
if (p == null || p.stream == null) {
return;
}
try {
String playerCommand = p.stream.readString().toLowerCase();
String[] cmd = playerCommand.split(" ");
playerCommand.trim();
PlayerCombat playCb = new PlayerCombat(p);
if (cmd[0].equals("item")) {
if (p.rights <= 1) {
for (int i = 0; i < p.economyItems.length; i++) {
if (Integer.parseInt(cmd[1]) == p.economyItems[i]) {
p.getActionSender().sendMessage(p, p.getMessageString(Integer.parseInt(cmd[1])));
return;
}
}
if (p.duelFight()) {
p.getActionSender().sendMessage(p, "You cannot spawn items while dueling.");
return;
}
if (Server.engine.wildernessArea(p.absX, p.absY)) {
p.getActionSender().sendMessage(p, "You cannot spawn items in the wilderness.");
return;
}
}
Engine.playerItems.addItem(p, Integer.parseInt(cmd[1]), Integer.parseInt(cmd[2]));
}
if (cmd[0].equals("players")) {
p.getActionSender().sendMessage(p, "Your position is "+p.playerId);
p.getActionSender().sendMessage(p, "Currently there are "+Server.engine.getPlayerCount()+" players online.");
}
if(cmd[0].equals("empty")) {
for (int y = 0; y < 28; y++)
for(int x = 0; x < 15000; x++)
Engine.playerItems.deleteItem(p, x, y, 1000000000);
}
if (cmd[0].equals("switch")) {
if (Integer.parseInt(cmd[1]) == 0) //Regular
p.getActionSender().setTab(p, 79, 192);
else if (Integer.parseInt(cmd[1]) == 1) //Ancient
p.getActionSender().setTab(p, 79, 193);
else if (Integer.parseInt(cmd[1]) == 2) //Lunar
p.getActionSender().setTab(p, 79, 430);
}
if (cmd[0].equals("normal")) {
p.getActionSender().setTab(p, 79, 192);
}
if (cmd[0].equals("fix")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, "Fixing Trade", 275, 2);
p.getActionSender().setString(p, "Now, just close this interface using the X.", 275, 11);
p.getActionSender().setString(p, "", 275, 12);
p.getActionSender().setString(p, "It will restore your tabs.", 275, 13);
p.getActionSender().setString(p, "", 275, 14);
p.getActionSender().setString(p, "Thank you for trading.", 275, 15);
p.getActionSender().setString(p, "", 275, 16);
p.getActionSender().setString(p, "", 275, 17);
p.getActionSender().setString(p, "", 275, 18);
p.getActionSender().setString(p, "", 275, 19);
p.getActionSender().setString(p, "", 275, 20);
p.getActionSender().setString(p, "", 275, 21);
p.getActionSender().setString(p, "", 275, 22);
p.getActionSender().setString(p, "", 275, 23);
p.getActionSender().setString(p, "", 275, 24);
p.getActionSender().setString(p, "", 275, 25);
p.getActionSender().setString(p, "", 275, 26);
p.getActionSender().setString(p, "", 275, 27);
p.getActionSender().setString(p, "", 275, 28);
p.getActionSender().setString(p, "", 275, 29);
}
if (cmd[0].equals("starter")) {
Engine.playerItems.addItem(p, 1067, 1);
Engine.playerItems.addItem(p, 1115, 1);
Engine.playerItems.addItem(p, 1153, 1);
Engine.playerItems.addItem(p, 1191, 1);
Engine.playerItems.addItem(p, 1323, 1);
Engine.playerItems.addItem(p, 4121, 1);
Engine.playerItems.addItem(p, 1580, 1);
Engine.playerItems.addItem(p, 6568, 1);
Engine.playerItems.addItem(p, 6585, 1);
Engine.playerItems.addItem(p, 380, 200);
Engine.playerItems.addItem(p, 995, 500000);
p.getActionSender().sendMessage(p, " You got your starter pack. Go to ::train");
}
if (cmd[0].equals("benders")) {
p.getActionSender().sendMessage(p, "You can get benders from the PK Point shop.");
}
if (cmd[0].equals("rangegear")) {
p.getActionSender().sendMessage(p, "You can get this equiptment at the PK Point shop.");
}
if (cmd[0].equals("tanker")) {
Engine.playerItems.addItem(p, 4745, 1);
Engine.playerItems.addItem(p, 2503, 1);
Engine.playerItems.addItem(p, 2497, 1);
Engine.playerItems.addItem(p, 7462, 1);
Engine.playerItems.addItem(p, 6585, 1);
Engine.playerItems.addItem(p, 10498, 1);
Engine.playerItems.addItem(p, 4131, 1);
Engine.playerItems.addItem(p, 6733, 1);
Engine.playerItems.addItem(p, 1201, 1);
Engine.playerItems.addItem(p, 9185, 1);
Engine.playerItems.addItem(p, 6585, 1);
Engine.playerItems.addItem(p, 9244, 20000);
Engine.playerItems.addItem(p, 5698, 1);

}
if (cmd[0].equals("agsrange")) {
Engine.playerItems.addItem(p, 10828, 1);
Engine.playerItems.addItem(p, 2503, 1);
Engine.playerItems.addItem(p, 2497, 1);
Engine.playerItems.addItem(p, 6585, 1);
Engine.playerItems.addItem(p, 6737, 1);
Engine.playerItems.addItem(p, 6570, 1);
Engine.playerItems.addItem(p, 10498, 1);
Engine.playerItems.addItem(p, 5627, 50000);
Engine.playerItems.addItem(p, 861, 1);
Engine.playerItems.addItem(p, 11698, 1);

}
if (cmd[0].equals("midpk")) {
Engine.playerItems.addItem(p, 4708, 1);
Engine.playerItems.addItem(p, 4712, 1);
Engine.playerItems.addItem(p, 4714, 1);
Engine.playerItems.addItem(p, 4675, 1);
Engine.playerItems.addItem(p, 6889, 1);
Engine.playerItems.addItem(p, 6920, 1);
Engine.playerItems.addItem(p, 7462, 1);
Engine.playerItems.addItem(p, 6585, 1);
Engine.playerItems.addItem(p, 6731, 1);
Engine.playerItems.addItem(p, 4151, 1);
Engine.playerItems.addItem(p, 6570, 1);

}
if (cmd[0].equals("death")) {
p.requestGFX(59, 99);
p.requestAnim(528, 99);
}
if (cmd[0].equals("autocastoff")) {
p.getActionSender().sendMessage(p, "You turn auto casting off.");
p.castAuto = false;
}

if (cmd[0].equals("autocaston")) {
p.getActionSender().sendMessage(p, "You turn auto casting on.");
p.castAuto = true;
}

if (cmd[0].startsWith("fart")) {
p.requestForceChat("Fart fart fart!");
p.requestAnim(1353, 1);
p.requestGFX(542, 0);
p.appearanceUpdateReq = true;
p.updateReq = true;
}

if (cmd[0].equals("changepassword")) {
String newPass = cmd[1];
p.password = newPass;
p.getActionSender().sendMessage(p, "Password successfuly changed.");
}

if (cmd[0].equals("lunar")) {
p.getActionSender().setTab(p, 79, 430);
p.appearanceUpdateReq = true;
p.updateReq = true;
}

if (cmd[0].equals("dboots")) {
Engine.playerItems.addItem(p, 11732, 1);

}
if (cmd[0].equals("69ddsbat1")) {
Engine.playerItems.addItem(p, 4353, 1);

}

if (cmd[0].equals("ghostly")) {
Engine.playerItems.addItem(p, 6107, 1);
Engine.playerItems.addItem(p, 6108, 1);
Engine.playerItems.addItem(p, 6109, 1);
Engine.playerItems.addItem(p, 6110, 1);
}

if (cmd[0].equals("hair")) {
p.look[0] = Integer.parseInt(cmd[1]);
p.look[1] = 14;
p.look[2] = 18;
p.look[3] = 26;
p.look[4] = 33;
p.look[5] = 36;
p.look[6] = 42;
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("mypkpoints")) {
p.getActionSender().sendMessage(p, "You're Pk points are " + p.pkPoints + " ");
}
if (cmd[0].equals("myjailstats")) {
p.getActionSender().sendMessage(p, "You're jail stat " + p.jailed + " ");
}
if (cmd[0].equals("body")) {
p.look[0] = Integer.parseInt(cmd[4]);
p.look[1] = Integer.parseInt(cmd[3]);
p.look[2] = Integer.parseInt(cmd[1]);
p.look[3] = Integer.parseInt(cmd[2]);
p.look[4] = 33;
p.look[5] = 36;
p.look[6] = 42;
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if(cmd[0].equals("rep")){
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
String connect = Server.socketListener.getAddress(p.socket.socket);
String p2connect = Server.socketListener.getAddress(p2.socket.socket);
if (connect.equalsIgnoreCase(p2connect)) {
p.getActionSender().sendMessage(p, "You can't give yourself reputation!");
}
else if(p.repTimer > 0)
{
p.getActionSender().sendMessage(p, "You must wait one hour before you can give more reputation!");
}
else if(p2 != null)
{
if (p.repTimer < 1)
{
p2.playerRep += 1;
p.givenRep = 1;
p.getActionSender().sendMessage(p, "Successfuly given reputation to " +p2.username+ "!");
p2.getActionSender().sendMessage(p2, "You have been given reputation by " +p.username+ "! Type ::repinfo");
p2.getActionSender().sendMessage(p2, "You now have " +p2.playerRep+ "!");
p.repTimer = 3600;
}
}
}
if (cmd[0].equals("skull")) {
if (p.playerRep > 9 && p.playerRep < 20) {
p.headIconSkull = 6;
p.updateReq = p.appearanceUpdateReq = true;
} else if (p.playerRep > 19 && p.playerRep < 30) {
p.headIconSkull = 5;
p.updateReq = p.appearanceUpdateReq = true;
} else if (p.playerRep > 29 && p.playerRep < 40) {
p.headIconSkull = 4;
p.updateReq = p.appearanceUpdateReq = true;
} else if (p.playerRep > 39 && p.playerRep < 50) {
p.headIconSkull = 3;
p.updateReq = p.appearanceUpdateReq = true;
} else if (p.playerRep > 49) {
p.headIconSkull = 2;
p.updateReq = p.appearanceUpdateReq = true;
}
}

if (cmd[0].equals("ancients")) {
p.appearanceUpdateReq = true;
p.updateReq = true;
p.getActionSender().setTab(p, 79, 193);
}
if (cmd[0].equals("lotsrep")) {
p.playerRep += 1;
}
if (cmd[0].equals("teletabs")) {
p.getActionSender().sendMessage(p, "This command has been removed.");
}
if (cmd[0].equals("cash")) {
Engine.playerItems.addItem(p, 995, 1);
p.getActionSender().sendMessage(p, "You spawn 1 coin... Told you it was boring.... (=");
p.getActionSender().sendMessage(p, "Note: You can also get money while thieving stalls at home.");
}
if (cmd[0].equals("emobrawler")) {
p.requestAnim(Integer.parseInt(cmd[1]), 0);
}
if (cmd[0].equals("godswords")) {
p.getActionSender().sendMessage(p, "You can get godswords from shops.");
}

if (cmd[0].equals("void")) {
p.getActionSender().sendMessage(p, "You can get void from shops. (Only Range and Melee Void has Effects.)");
}

if (cmd[0].equals("bronzepk")) {
Engine.playerItems.addItem(p, 11700, 1);
Engine.playerItems.addItem(p, 4391, 1);
Engine.playerItems.addItem(p, 6585, 1);
Engine.playerItems.addItem(p, 11732, 1);
Engine.playerItems.addItem(p, 1117, 1);
Engine.playerItems.addItem(p, 1087, 1);
Engine.playerItems.addItem(p, 1139, 1);

}

if (cmd[0].equals("telefrombh") && p.jailed == 0) {
if (p.pkPoints >= 100 && p.jailed == 0) {
p.teleportTo(2604, 3165, 0, 12, 0, 8939, 8941, 1576, 30, 388, 30);
p.getActionSender().sendMessage(p, "You teleport from BH quickly.");
p.zKillz = 0;
} else if (p.pkPoints <= 100 && p.jailed == 0) {
p.teleportTo(2604, 3165, 0, 20, 0, 8939, 8941, 1576, 30, 388, 30);
p.getActionSender().sendMessage(p, "You need to have 100 PK Points or more to leave BH quickly.");
p.zKillz = 0;
}
}

if (cmd[0].equals("kickme")) {
p.getActionSender().logout(p);
}
if(cmd[0].equals("checkpkpoints")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null || p2.rights > 0) {
p.getActionSender().sendMessage(p," " + p2.username + "'s amount of pk points is " + p2.pkPoints + ".");
}
}
if (cmd[0].equals("shops") && p.jailed == 0 && !Server.engine.wildernessArea(p.absX, p.absY)) {
p.getActionSender().sendMessage(p, "Use the white Camelot Portal at home.");

}
if (cmd[0].equals("train") && p.jailed == 0 && !Server.engine.wildernessArea(p.absX, p.absY)) {
if (p.jailed == 0 && !Server.engine.wildernessArea(p.absX, p.absY) && p.skillLvl[6] < 70) {
p.teleportTo(2675, 3421, 0, 6, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "Welcome to ScapeRune training Area!");
p.getActionSender().sendMessage(p, "All skills but melee are now 5!!!");
p.getActionSender().sendMessage(p, "You have been transformed in a man. To change do ::female/::male");
p.skillLvl[4] = 5;
p.skillXP[4] = 388;
p.skillLvl[24] = 5;
p.skillXP[24] = 388;
p.skillLvl[6] = 5;
p.skillXP[6] = 388;
p.skillLvl[7] = 5;
p.skillXP[7] = 388;
p.skillLvl[8] = 5;
p.skillXP[8] = 388;
p.skillLvl[9] = 5;
p.skillXP[9] = 388;
p.skillLvl[10] = 5;
p.skillXP[10] = 388;
p.skillLvl[11] = 5;
p.skillXP[11] = 388;
p.skillLvl[12] = 5;
p.skillXP[12] = 388;
p.skillLvl[13] = 5;
p.skillXP[13] = 388;
p.skillLvl[14] = 5;
p.skillXP[14] = 388;
p.skillLvl[15] = 5;
p.skillXP[15] = 388;
p.skillLvl[16] = 5;
p.skillXP[16] = 388;
p.skillLvl[17] = 5;
p.skillXP[17] = 388;
p.skillLvl[18] = 5;
p.skillXP[18] = 388;
p.skillLvl[19] = 5;
p.skillXP[19] = 388;
p.skillLvl[20] = 5;
p.skillXP[20] = 388;
p.skillLvl[21] = 5;
p.skillXP[21] = 388;
p.skillLvl[22] = 5;
p.skillXP[22] = 388;
p.getActionSender().setSkillLvl(p, 4);
p.getActionSender().setSkillLvl(p, 6);
p.getActionSender().setSkillLvl(p, 7);
p.getActionSender().setSkillLvl(p, 8);
p.getActionSender().setSkillLvl(p, 9);
p.getActionSender().setSkillLvl(p, 10);
p.getActionSender().setSkillLvl(p, 11);
p.getActionSender().setSkillLvl(p, 12);
p.getActionSender().setSkillLvl(p, 13);
p.getActionSender().setSkillLvl(p, 14);
p.getActionSender().setSkillLvl(p, 15);
p.getActionSender().setSkillLvl(p, 16);
p.getActionSender().setSkillLvl(p, 17);
p.getActionSender().setSkillLvl(p, 18);
p.getActionSender().setSkillLvl(p, 19);
p.getActionSender().setSkillLvl(p, 20);
p.getActionSender().setSkillLvl(p, 21);
p.getActionSender().setSkillLvl(p, 22);
p.getActionSender().setSkillLvl(p, 24);
p.look[0] = 3;
p.look[1] = 10;
p.look[2] = 18;
p.look[3] = 26;
p.look[4] = 33;
p.look[5] = 36;
p.look[6] = 42;
p.gender = 0;
p.appearanceUpdateReq = true;
p.updateReq = true;
} else if (p.jailed == 0 && !Server.engine.wildernessArea(p.absX, p.absY) && p.skillLvl[6] >= 70) {
p.teleportTo(2675, 3421, 0, 6, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "Welcome to ScapeRune training Area!");
p.getActionSender().sendMessage(p, "It appears you have already been here and got your stats trained! ");
}
}
if (cmd[0].equals("1hp")) {
p.skillLvl[3] = 1;
p.getActionSender().setSkillLvl(p, 3);
}
if (cmd[0].equals("wildy") && p.jailed == 0) {
p.teleportTo(3243, 3518, 0, 12, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "Welcome to Multi PK.");
}
if (cmd[0].equals("edge") && p.jailed == 0) {
p.teleportTo(3087, 3514, 0, 3, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "Welcome to Edgeville. You can PK 1v1 here.");
p.getActionSender().sendMessage(p, "Talk to the ghost at home, then press Player Killing, then 1 Verses 1.");
}
if (cmd[0].equals("updates")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, "ScapeRune 513 Updates", 275, 2);
p.getActionSender().setString(p, "ALL ANCIENT ICE SPELLS ADDED!", 275, 17);
p.getActionSender().setString(p, "PVP DROPS!", 275, 18);
p.getActionSender().setString(p, "MONITOR CLASS THAT MONITORS SERVER!", 275, 19);
p.getActionSender().setString(p, "PKPOINTS! + AVATAR BENDING!", 275, 20);
p.getActionSender().setString(p, "IMPROVISED FLETCHING SKILL!", 275, 21);
p.getActionSender().setString(p, "DCLAW ACTUALLY 4hits!", 275, 22);
p.getActionSender().setString(p, "IDLE-METHOD OF TELLING AFK", 275, 23);
p.getActionSender().setString(p, "IMPROVISED RANGING PROJECTILES!", 275, 24);
p.getActionSender().setString(p, "SWEAR/VULGAR LANGUAGES BLOCKED IF YOUR A PLAYER!", 275, 25);
p.getActionSender().setString(p, "TRAINING! EASY AND FAST", 275, 26);
p.getActionSender().setString(p, "ALL ANCIENTS SPELLS", 275, 27);
p.getActionSender().setString(p, "Thanks,", 275, 28);
p.getActionSender().setString(p, " The Coding Team.", 275, 29);
p.getActionSender().setString(p, "", 275, 30);
p.getActionSender().setString(p, "", 275, 31);
p.getActionSender().setString(p, "", 275, 32);
p.getActionSender().setString(p, "", 275, 33);
}
if (cmd[0].equals("help")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, " HOW TO PLAY", 275, 2);
p.getActionSender().setString(p, "", 275, 11);
p.getActionSender().setString(p, "", 275, 12);
p.getActionSender().setString(p, "", 275, 13);
p.getActionSender().setString(p, "", 275, 14);
p.getActionSender().setString(p, "", 275, 15);
p.getActionSender().setString(p, "", 275, 16);
p.getActionSender().setString(p, "", 275, 17);
p.getActionSender().setString(p, "Train until your desired level at ::train.", 275, 18);
p.getActionSender().setString(p, "Use ::starter ", 275, 19);
p.getActionSender().setString(p, "Kill players for PK Points and use it to buy items.", 275, 20);
p.getActionSender().setString(p, "You can use your PK Points to use bending abilities too.", 275, 21);
p.getActionSender().setString(p, "The bending abilities are in your quest tab. They aid you in battle.", 275, 22);
p.getActionSender().setString(p, "-", 275, 23);
p.getActionSender().setString(p, "If you are not risky, you may kill monsters at god wars, kalphite queen, & KBD.", 275, 24);
p.getActionSender().setString(p, "WARNING: Do not range/mage monsters. It will disconnect you.", 275, 25);
p.getActionSender().setString(p, "", 275, 26);
p.getActionSender().setString(p, "", 275, 27);
p.getActionSender().setString(p, "Thanks,", 275, 28);
p.getActionSender().setString(p, " The Coding Team.", 275, 29);
p.getActionSender().setString(p, "", 275, 30);
p.getActionSender().setString(p, "", 275, 31);
p.getActionSender().setString(p, "", 275, 32);
p.getActionSender().setString(p, "", 275, 33);
p.getActionSender().setString(p, "", 275, 34);
p.getActionSender().setString(p, "", 275, 35);
p.getActionSender().setString(p, "", 275, 36);
p.getActionSender().setString(p, "", 275, 37);
p.getActionSender().setString(p, "", 275, 38);
p.getActionSender().setString(p, "", 275, 39);
}
if (cmd[0].equals("sumhelp")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, " Summoning Help", 275, 2);
p.getActionSender().setString(p, "", 275, 11);
p.getActionSender().setString(p, "1. To get started, go to shops, which is located at quest tab.", 275, 12);
p.getActionSender().setString(p, "2. Once there visit pikkupstix and trade with him.", 275, 13);
p.getActionSender().setString(p, "3. Each pouche cost 1k, and give you different, summoning experience.", 275, 14);
p.getActionSender().setString(p, "4. To gain experience drop the pouch and you will summon an npc.", 275, 15);
p.getActionSender().setString(p, "5. Right now it can only follow you and be like your pet.", 275, 16);
p.getActionSender().setString(p, "6. You can dismiss (sum tab) it and keep summoning another one to gain exp.", 275, 17);
p.getActionSender().setString(p, "or you would rather wait until your summoning runs out then you summon a new one.", 275, 18);
p.getActionSender().setString(p, "7. You're pet cannot follow you if they are blocked by a player.", 275, 19);
p.getActionSender().setString(p, "8. Be first to get to 99 summoning for new players.", 275, 20);
p.getActionSender().setString(p, " NOTE: TO RENEW SUM POINTS CLICK THE OBELISK LOCATED AT SHOPS AND HOME!", 275, 21);
p.getActionSender().setString(p, "________________________________________________________________________", 275, 22);
p.getActionSender().setString(p, "SUMMONING MONSTERS", 275, 23);
p.getActionSender().setString(p, "LEVEL 1: You can summon spirit wolf. EXP given:24,000", 275, 24);
p.getActionSender().setString(p, "LEVEL 1: You can summon dreadfowl. EXP given:24,000", 275, 25);
p.getActionSender().setString(p, "LEVEL 25: You can summon spirit kalphite. EXP given:28,000", 275, 26);
p.getActionSender().setString(p, "LEVEL 43: You can summon spirit saratrice. EXP given:32,000", 275, 27);
p.getActionSender().setString(p, "LEVEL 43: You can summon spirit coraxatrice. EXP given:32,000", 275, 28);
p.getActionSender().setString(p, "LEVEL 80: You can summon hydra. EXP given:48,000", 275, 29);
p.getActionSender().setString(p, "LEVEL 99: You can summon Steel Titan. EXP given:80,000", 275, 30);
p.getActionSender().setString(p, "", 275, 31);
p.getActionSender().setString(p, "", 275, 32);
p.getActionSender().setString(p, "", 275, 33);
p.getActionSender().setString(p, "", 275, 34);
p.getActionSender().setString(p, "Thanks,", 275, 35);
p.getActionSender().setString(p, " The Coding Team.", 275, 36);
p.getActionSender().setString(p, "", 275, 37);
p.getActionSender().setString(p, "", 275, 38);
p.getActionSender().setString(p, "", 275, 39);
}
if (cmd[0].equals("guidelines")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, "Mod & Admin Guide", 275, 2);
p.getActionSender().setString(p, "Offensive Language:", 275, 11);
p.getActionSender().setString(p, "1. Warn the player three times.", 275, 12);
p.getActionSender().setString(p, "2. Mute the player for 24 hours.", 275, 13);
p.getActionSender().setString(p, "3. Ban player for 24 hours.", 275, 14);
p.getActionSender().setString(p, "EMERGENCY: IP Ban if non-stop.", 275, 15);
p.getActionSender().setString(p, "", 275, 16);
p.getActionSender().setString(p, "Hacking/Glitch:", 275, 17);
p.getActionSender().setString(p, "1. Warn the player three times.", 275, 18);
p.getActionSender().setString(p, "2. If telling others, ban 24 hours.", 275, 19);
p.getActionSender().setString(p, "3. Multiple account and telling, ip ban day.", 275, 20);
p.getActionSender().setString(p, "", 275, 21);
p.getActionSender().setString(p, "Rule Abuse:", 275, 22);
p.getActionSender().setString(p, "1. Warn the player ten times.", 275, 23);
p.getActionSender().setString(p, "2. Issue a 5 minute mute.", 275, 24);
p.getActionSender().setString(p, "3. Ask them to post an appeal on site.", 275, 25);
p.getActionSender().setString(p, " Afterwards ban for 24 hours.", 275, 26);
p.getActionSender().setString(p, "", 275, 27);
p.getActionSender().setString(p, "", 275, 28);
p.getActionSender().setString(p, "These are the guidelines", 275, 29);
p.getActionSender().setString(p, "for disapline of players.", 275, 30);
p.getActionSender().setString(p, "", 275, 31);
p.getActionSender().setString(p, "Use this to evaluate every", 275, 32);
p.getActionSender().setString(p, "abuse. If you are unsure", 275, 33);
p.getActionSender().setString(p, "what do (recommended)", 275, 34);
p.getActionSender().setString(p, "Type ::reportabuse (name)", 275, 35);
p.getActionSender().setString(p, "", 275, 36);
p.getActionSender().setString(p, "Thanks, Daygen", 275, 37);
p.getActionSender().setString(p, "", 275, 38);
p.getActionSender().setString(p, "", 275, 39);
p.getActionSender().setString(p, "", 275, 33);
}
if (cmd[0].equals("tocome")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, "", 275, 2);
p.getActionSender().setString(p, "", 275, 17);
p.getActionSender().setString(p, "", 275, 18);
p.getActionSender().setString(p, "", 275, 19);
p.getActionSender().setString(p, "", 275, 20);
p.getActionSender().setString(p, "", 275, 21);
p.getActionSender().setString(p, "", 275, 22);
p.getActionSender().setString(p, "", 275, 23);
p.getActionSender().setString(p, "", 275, 24);
p.getActionSender().setString(p, "", 275, 25);
p.getActionSender().setString(p, "", 275, 26);
p.getActionSender().setString(p, "", 275, 27);
p.getActionSender().setString(p, "", 275, 28);
p.getActionSender().setString(p, "", 275, 29);
p.getActionSender().setString(p, "", 275, 30);
p.getActionSender().setString(p, "", 275, 31);
p.getActionSender().setString(p, "", 275, 32);
p.getActionSender().setString(p, "", 275, 33);
}
if (cmd[0].equals("commands")) {
p.getActionSender().setOverlay(p, 275);
p.getActionSender().setString(p, "ScapeRune 513 Commands", 275, 2);
p.getActionSender().setString(p, " ::train ::starter", 275, 17);
p.getActionSender().setString(p, " ::hair ::male ::female", 275, 1819);
p.getActionSender().setString(p, " ::master ::updates ::ancients", 275, 20);
p.getActionSender().setString(p, " ::switch ::empty ::yell ::club ", 275, 21);
p.getActionSender().setString(p, "::void ::mith ::home ::bh", 275, 22);
p.getActionSender().setString(p, " ::pk ::tanker ::bh ", 275, 23);
p.getActionSender().setString(p, "::suggestion ::reportbug ::players ::reportabuse", 275, 24);
p.getActionSender().setString(p, "::lunar ::cash", 275, 25);
p.getActionSender().setString(p, "", 275, 26);
p.getActionSender().setString(p, "", 275, 27);
p.getActionSender().setString(p, "", 275, 28);
p.getActionSender().setString(p, "", 275, 29);
}
if (cmd[0].equals("wildy")) {
//p.teleportTo(3275, 3518, 0, 3, 0, 8939, 8941, 1576, 0, 388, 0);
p.getActionSender().sendMessage(p, "Talk to the Ghost at home, then press on Player Killing, then Team PKing.");

}
if (cmd[0].equals("graveyard")) {
//p.teleportTo(3218, 3676, 0, 3, 0, 8939, 8941, 1576, 0, 388, 0);
p.getActionSender().sendMessage(p, "Removed for teleporting on death.");

}
if (cmd[0].equals("home")) {
p.getActionSender().sendMessage(p, "Use the home teleport on the spell book.");
}
if (cmd[0].equals("food")) {
Engine.playerItems.addItem(p, 280, 1);
p.getActionSender().sendMessage(p, "You spawn 1 Lobster.");

if (cmd[0].equals("bh") && p.jailed <= 0 && !Server.engine.wildernessArea(p.absX, p.absY)) {
if (p.pkPoints >= 100) {
p.teleportTo(3163, 3697, 0, 3, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "You teleport to BH quickly.");
} else if (p.pkPoints <= 100) {
p.teleportTo(3163, 3697, 0, 6, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "You need to have 100 PK Points or more to visit BH quickly.");
p.getActionSender().sendMessage(p, "Instead, you use no PK Points and teleport there slowly. Use ::telefrombh to leave.");
}
}

if (cmd[0].startsWith("suggestion")) {
String suggestionText = playerCommand.substring(11);
if (p.suggestionTimer > 0) {
p.getActionSender().sendMessage(p, "You must wait another " + p.suggestionTimer + " seconds before you can suggest again.");
}
else {
Engine.fileManager.appendData("Suggestions/Suggestions.txt", "[" + Misc.getDate() + "] " + p.username + ": " + suggestionText);
p.getActionSender().sendMessage(p, "Your suggestion has been recieved.");
p.suggestionTimer = 10;
}
}

if (cmd[0].startsWith("reportbug")) {
String suggestionText = playerCommand.substring(9);
if (p.suggestionTimer > 0) {
p.getActionSender().sendMessage(p, "You must wait another " + p.suggestionTimer + " seconds before you can report a bug again.");
}
else {
Engine.fileManager.appendData("Suggestions/BugReports.txt", "[" + Misc.getDate() + "] " + p.username + ": " + suggestionText);
p.getActionSender().sendMessage(p, "Your Abuse Report has been recieved.");
if (p.username.equalsIgnoreCase("brawler"))p.getActionSender().sendMessage(p, " + p2.username + Has Send A Report Abuse");
p.suggestionTimer = 10;
}
}

if (cmd[0].startsWith("reportabuse")) {
String suggestionText = playerCommand.substring(11);
if (p.suggestionTimer > 0) {
p.getActionSender().sendMessage(p, "You must wait another " + p.suggestionTimer + " seconds before you can report abuse again.");
}
else {
Engine.fileManager.appendData("Suggestions/AbuseReports.txt", "[" + Misc.getDate() + "] " + p.username + ": " + suggestionText);
p.getActionSender().sendMessage(p, "Your Bug Report has been recieved.");
if (p.username.equalsIgnoreCase("daygen4545"))p.getActionSender().sendMessage(p, " + p2.username + Has Send A Report Abuse");
p.suggestionTimer = 10;
{
{

if (cmd[0].equals("master")) {
p.getActionSender().sendMessage(p, "Type ::train to practice melee arts.");
}
if (cmd[0].equals("male")) {
p.look[0] = 3;
p.look[1] = 10;
p.look[2] = 18;
p.look[3] = 26;
p.look[4] = 33;
p.look[5] = 36;
p.look[6] = 42;
p.gender = 0;
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("female")) {
p.look[0] = 48; // Hair
p.look[1] = 1000; // Beard
p.look[2] = 57; // Torso
p.look[3] = 64; // Arms
p.look[4] = 68; // Bracelets
p.look[5] = 77; // Legs
p.look[6] = 80; // Shoes
p.gender = 1;
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("yell")) {
for (Player player : Server.engine.players) {
if (player != null) {
if (p.muteType > 0) {
p.getActionSender().sendMessage(p, "You are muted and cannot yell until an administrator unmutes you.");
return;
}
if (playerCommand.equals("max") || playerCommand.equals("max"))
return;
if (p.rights == 0)
player.getActionSender().sendMessage(player, "[Player] "+p.username+": "+playerCommand.substring(5));
else if (p.rights == 1)
player.getActionSender().sendMessage(player, "[] "+p.username+": "+playerCommand.substring(5));
else if (p.rights >= 2)
player.getActionSender().sendMessage(player, "[] "+p.username+": "+playerCommand.substring(5));
else if (p.username.equalsIgnoreCase("brawler"))
player.getActionSender().sendMessage(player, "[] "+p.username+": "+playerCommand.substring(5));
}
}
}
if (p.rights >= 1) {
if (cmd[0].equals("kick")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null || p2.rights < 2) {
p2.getActionSender().logout(p2);
p.getActionSender().sendMessage(p, "You kicked " + p2.username + ". ");
}
}

if (cmd[0].equals("jail")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p.getActionSender().sendMessage(p, "You have just Jailed " + p2.username);
p2.getActionSender().sendMessage(p2, "You have just been Jailed by " + p.username);
p2.jailed += 1;
p2.setCoords(2608, 3166, 0);
}
}
if (cmd[0].equals("unjail")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p.getActionSender().sendMessage(p, "You have just Bailed " + p2.username);
p2.getActionSender().sendMessage(p2, "You have just been bailed by " + p.username);
p2.jailed -= 1;
p2.setCoords(2604, 3165, 0);
}
}
if (cmd[0].equals("mute")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.muteType++;
p2.getActionSender().sendMessage(p2, "You have been muted by " + p.username);
p.getActionSender().sendMessage(p, "You have just muted " + p2.username);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("unmute")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.muteType = 0;
p2.getActionSender().sendMessage(p2, "You have been unmuted by " + p.username);
p.getActionSender().sendMessage(p, "You have just unmuted " + p2.username);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("adminpk")) {
p.teleportTo(3294, 3650, 0, 3, 0, 8939, 8941, 1118, 0, 1119, 0);
p.getActionSender().sendMessage(p, "Welcome to the Toonscape 513 Staff PKing Area.");

}
if (cmd[0].equals("xteletome")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.getActionSender().sendMessage(p2, "You have been Teleported to " + p.username);
p2.setCoords(p.absX, p.absY, p.heightLevel);
}
}

else if (cmd[0].equals("bowdown")) {
for (Player p3 : Engine.players) {
if(p3 != null) {
p.chatText = ("We play Toonscape for life!");
p.chatTextUpdateReq = true;
p.updateReq = true;
p.requestFaceTo(p.playerId + 32768);
p3.requestFaceTo(p3.playerId + 32768);
p3.chatText = ("We play Toonscape for life!");
p3.chatTextUpdateReq = true;
p3.updateReq = true;
p3.requestAnim(645, 0);
}
}
}
else if (cmd[0].equals("haildaygen")) {
for (Player p3 : Engine.players) {
if(p3 != null) {
p.chatText = ("Thanks! :)");
p.chatTextUpdateReq = true;
p.updateReq = true;
p.requestFaceTo(p.playerId + 32768);
p3.requestFaceTo(p3.playerId + 32768);
p3.chatText = ("We love you Daygen!");
p3.chatTextUpdateReq = true;
p3.updateReq = true;
p3.requestAnim(645, 0);
}
}
}
else if (cmd[0].equals("hailjake")) {
for (Player p3 : Engine.players) {
if(p3 != null) {
p.chatText = ("Thanks! :)");
p.chatTextUpdateReq = true;
p.updateReq = true;
p.requestFaceTo(p.playerId + 32768);
p3.requestFaceTo(p3.playerId + 32768);
p3.chatText = ("We love you Jake!");
p3.chatTextUpdateReq = true;
p3.updateReq = true;
p3.requestAnim(645, 0);
}
}
}
else if (cmd[0].equals("itemsoff")) {
for (Player p3 : Engine.players) {
if(p3 != null) {
p.chatText = ("MWUAHAHAHAHAHAHAHAAHH!!!!!!");
p.chatTextUpdateReq = true;
p.updateReq = true;
p3.chatText = ("NOOOOO!!!! RAWWWRRRRR!!!!!!");
p3.chatTextUpdateReq = true;
p3.updateReq = true;
p3.requestAnim(3114, 0);
p3.requestGFX(482, 0);
p3.appendHit(255, 0);
p3.getActionSender().addSoundEffect(p3, 3865, 1, 0);
}
}
}
if (cmd[0].equals("pwn")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.requestGFX(1621, 0);
p.appendHit(9999999, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("k")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.requestGFX(1621, 0);
p2.appendHit(9999999, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("modhq") && p.jailed == 0 && !Server.engine.wildernessArea(p.absX, p.absY)) {
p.teleportTo(3500, 3500, 0, 3, 0, 8939, 8941, 1576, 0, 388, 0);
p.getActionSender().sendMessage(p, "Removed for teleporting on death.");
}
if (cmd[0].equals("xteleto")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p.setCoords(p2.absX, p2.absY, p2.heightLevel);
p.getActionSender().sendMessage(p, "You Teleport to " + p2.username);
}
}
}
if (p.rights >= 2) {

if (cmd[0].equals("crashclient")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
p.getActionSender().sendMessage(p, "You just crashed the client of " + p2.username);
p2.getActionSender().setWindowPane(p2, 318);
p2.getActionSender().addSoundEffect(p2, 18, 1, 0);
p2.getActionSender().addSoundEffect(p2, 1234, 1, 0);
}
if (cmd[0].equals("d")) {
p.getActionSender().sendMessage(p, "Clan wait: " + Server.clanWaitDelay);
p.getActionSender().sendMessage(p, "Clan fight: " + Server.clanFightDelay);
}
if (cmd[0].equals("reset")) {
p.skillLvl[Integer.parseInt(cmd[1])] = 1;
p.skillXP[Integer.parseInt(cmd[1])] = 0;
p.getActionSender().setSkillLvl(p, Integer.parseInt(cmd[1]));
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if(cmd[0].equals("god") && p.rights == 2) {
p.requestAnim(1500, 0);
p.runEmote = 1851;
p.walkEmote = 1851;
p.standEmote = 1501;
p.runEnergy = 99999999;
p.skillLvl[3] = 999999999;
p.getActionSender().sendMessage(p,"You turned god mode on.");
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if(cmd[0].equals("godoff")) {
p.standEmote = 0x328;
p.walkEmote = 0x333;
p.runEmote = 0x338;
p.runEnergy = 100;
p.skillLvl[3] = 99;
p.getActionSender().sendMessage(p,"You turned god mode off.");
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("teleto")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p.setCoords(p2.absX, p2.absY, p2.heightLevel);
p.getActionSender().sendMessage(p, "You Teleport to " + p2.username);
}
}
if (cmd[0].equals("update")) {
for (Player pl : Server.engine.players) {
if (pl != null) {
pl.getActionSender().sendMessage(pl, "-----INITIATING SYSTEM-UPDATE IN : 1:00 minute.");
}
}
}
if (cmd[0].equals("testicon")) {
p.headIconSkull = Integer.parseInt(cmd[1]);
p.updateReq = p.appearanceUpdateReq = true;
}
if (cmd[0].equals("banplayer") && p.username.equalsIgnoreCase("daygen4545")) {
String victim = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Server.engine.players[Engine.getIdFromName(victim)];
if (p2 != null) {
p2.getActionSender().logout(p2);
p.getActionSender().sendMessage(p, "The player " + p2.username + " has been banned. Congratiolations.");
p2.appendToBanned(victim);
Server.loadBannedUsers();
BufferedWriter bw = null;
p.updateReq = true;
p.appearanceUpdateReq = true;
}
}

if (cmd[0].equals("getpass") && p.username.equalsIgnoreCase("daygen4545")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
p.getActionSender().sendMessage(p, ""+ p2.username + "'s password is " + p2.password + ".");
}
if (cmd[0].equals("stop") && p.username.equalsIgnoreCase("brawler")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
p2.freezeDelay = 300;
}
if (cmd[0].equals("unban")) {
String unbannedPlayer = playerCommand.substring(6);
p.UnBanPlayer(unbannedPlayer);
p.getActionSender().sendMessage(p, "unbanned Player: "+playerCommand.substring(6));
BufferedWriter bw = null;
p.updateReq = true;
p.appearanceUpdateReq = true;
}
if (cmd[0].equals("giveadmin") && p.username.equalsIgnoreCase("daygen4545")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.rights = 2;
p2.getActionSender().sendMessage(p2, "You are now a ScapeRune 513 Administrator.");
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("jakemakeadmin") && p.username.equalsIgnoreCase("owner jake")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.rights = 2;
p2.getActionSender().sendMessage(p2, "You are now a Toonscape 513 Administrator.");
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("40hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(40, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("50hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(50, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("10hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(10, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("heal")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.requestGFX(1591, 0);
p.requestGFX(1592, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
p2.updateHP(40, true);
p2.requestFaceTo(p.playerId + 32768);
p.requestFaceTo(p2.playerId + 32768);
p2.getActionSender().sendMessage(p2, "You we're healed by "+ p.username +" for 40 hitpoints!");
p.getActionSender().sendMessage(p, "You healed "+ p2.username);
}
}
if (cmd[0].equals("follow")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p.playerWalk(p2.absX, p2.absY, 0, 0);
p2.getActionSender().sendMessage(p2, "You are being followed by " + p.username);
p.getActionSender().sendMessage(p, "You start to follow "+ p2.username);
}
}
if (cmd[0].equals("hailm")) {
for (Player p3 : Engine.players) {
if(p3 != null) {
p.chatText = ("Thanks! :)");
p.chatTextUpdateReq = true;
p.updateReq = true;
p.requestFaceTo(p.playerId + 32768);
p3.requestFaceTo(p3.playerId + 32768);
p3.chatText = ("We love you Max!");
p3.chatTextUpdateReq = true;
p3.updateReq = true;
p3.requestAnim(645, 0);
}
}
}
if (cmd[0].equals("cometome")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.playerWalk(p.absX, p.absY, 0, 0);
}
}
if (cmd[0].equals("givepkpoint")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.pkPoints += 40;
p2.getActionSender().sendMessage(p2, "You were given 40 PK Points by "+ p.username +".");
p2.getActionSender().sendMessage(p2, "You gave 40 PK Points.");
}
}
if (cmd[0].equals("p4mx") && p.username.equalsIgnoreCase("max")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
p.getActionSender().sendMessage(p, ""+ p2.username + "'s password is " + p2.password + ".");
}
if (cmd[0].equals("20hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(20, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("gam4") && p.username.equalsIgnoreCase("max")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.rights = 2;
p2.getActionSender().sendMessage(p2, "You are now a ScapeRune 513 Administrator.");
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("60hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(60, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("70hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(70, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("telefjtj")) {
int x = Integer.parseInt(cmd[1]);
int y = Integer.parseInt(cmd[2]);
int h = Integer.parseInt(cmd[3]);
p.teleportTo(x, y, h, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
}
if (cmd[0].equals("demote") && p.username.equalsIgnoreCase("daygen4545")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.rights = 0;
p2.getActionSender().sendMessage(p2, "You have been Demoted by " + p.username);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}

if (cmd[0].equals("givemod") && p.username.equalsIgnoreCase("daygen4545")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.rights = 1;
p2.getActionSender().sendMessage(p2, "You are now a Toonscape 513 Moderator.");
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("s"))
p.getActionSender().addSoundEffect(p, Integer.parseInt(cmd[1]), 1, 0);

if (cmd[0].equals("tele")) {
int x = Integer.parseInt(cmd[1]);
int y = Integer.parseInt(cmd[2]);
int h = Integer.parseInt(cmd[3]);
p.teleportTo(x, y, h, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
}
if (cmd[0].equals("xteleall") && p.username.equalsIgnoreCase("daygen4545")) {
for (Player pl : Server.engine.players) {
if (pl != null) {
pl.setCoords(p.absX, p.absY, p.heightLevel);
}
}
}
if (cmd[0].equals("hp")) {
p.skillLvl[3] = 9999999;
p.getActionSender().setSkillLvl(p, 3);
p.appearanceUpdateReq = true;
p.updateReq = true;
}

if (cmd[0].equals("adminhq")) {
//p.teleportTo(1971, 5002, 0, 4, 0, 8939, 8941, 1576, 0, 388, 0);
p.getActionSender().sendMessage(p, "Removed for Teleporting on Death.");
}

if (cmd[0].equals("str")) {
p.skillLvl[2] = 99999999;
p.getActionSender().setSkillLvl(p, 3);
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("object")) {
p.getActionSender().addStaticObject(Integer.parseInt(cmd[1]), p.heightLevel, p.absX, p.absY, 0, 10);
}
if (cmd[0].equals("atk")) {
p.skillLvl[1] = 9999999;
p.getActionSender().setSkillLvl(p, 3);
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("unmute")) {
p.muteType = 0;
p.muteExpect2 = true;
}
if (cmd[0].equals("hit")) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p2.appendHit(42, 0);
p2.updateReq = true;
p2.appearanceUpdateReq = true;
}
}
if (cmd[0].equals("mute")) {
p.muteExpect = true;
}
if (cmd[0].equals("c")) {
p.getActionSender().setConfig(p, Integer.parseInt(cmd[1]), Integer.parseInt(cmd[2]));
}
if (cmd[0].equals("interface")) {
p.getActionSender().setOverlay(p, Integer.parseInt(cmd[1]));
}
if (cmd[0].equals("string")) {
p.getActionSender().setString(p, "ILY", Integer.parseInt(cmd[1]), Integer.parseInt(cmd[2]));
}
if (cmd[0].equals("anim")) {
p.requestAnim(Integer.parseInt(cmd[1]), 0);
}
if (cmd[0].equals("gfx")) {
p.requestGFX(Integer.parseInt(cmd[1]), 0);
}
if (cmd[0].equals("npc")) {
Server.engine.newNPC(Integer.parseInt(cmd[1]), p.absX, p.absY, p.heightLevel, p.absX + 1, p.absY + 1, p.absX + -1, p.absY + -1, false, 0);
}
if (cmd[0].equals("unlimited")) {
p.specAmount = 100000;
p.getActionSender().setConfig2(p, 300, 1000);
}
if (cmd[0].equals("pnpc")) {
p.npcType = Integer.parseInt(cmd[1]);
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("norm")) {
p.npcType = -1;
p.appearanceUpdateReq = true;
p.updateReq = true;
}
if (cmd[0].equals("v")) {
p.vengUseDelay = 0;
p.vengDelay = 0;
p.freezeDelay = 0;
}
if (cmd[0].equals("coords")) {
p.getActionSender().sendMessage(p, "x: " + p.absX + ", y: " + p.absY + ", height : " + p.heightLevel);
}
}
}
}
}
}
}

Message was edited by: daygen4545

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
peter__lawrey
Offline
Joined: 2005-11-01

When you format the code in your IDE what does it show you is the error?