Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server.model.players.packets;
- import server.Config;
- import server.Connection;
- import server.Server;
- import server.model.players.Client;
- import java.text.DecimalFormat;
- import server.model.players.PacketType;
- import server.model.players.PlayerHandler;
- import server.util.Misc;
- import server.model.players.CombatAssistant;
- import server.model.players.PlayerSave;
- import server.model.players.Player;
- import java.io.*;
- /**
- * Commands
- **/
- public class Commands implements PacketType
- {
- @Override
- public void processPacket(Client c, int packetType, int packetSize)
- {
- String playerCommand = c.getInStream().readString();
- if(Config.SERVER_DEBUG)
- Misc.println(c.playerName+" playerCommand: "+playerCommand);
- if (playerCommand.startsWith("/") && playerCommand.length() > 1) {
- if (c.clanId >= 0) {
- System.out.println(playerCommand);
- playerCommand = playerCommand.substring(1);
- Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId);
- } else {
- if (c.clanId != -1)
- c.clanId = -1;
- c.sendMessage("You are not in a clan.");
- }
- return;
- }
- if (Config.SERVER_DEBUG)
- Misc.println(c.playerName+" playerCommand: "+playerCommand);
- if (c.playerRights >= 0)
- playerCommands(c, playerCommand);
- if (c.playerRights == 1 || c.playerRights == 2 || c.playerRights == 6 || c.playerRights == 3)
- moderatorCommands(c, playerCommand);
- if (c.playerRights == 2 || c.playerRights == 6 || c.playerRights == 3)
- administratorCommands(c, playerCommand);
- if (c.playerRights == 3 || c.playerRights == 6)
- ownerCommands(c, playerCommand);
- if (c.playerRights == 4)
- DonatorCommands(c, playerCommand);
- }
- public void playerCommands(Client c, String playerCommand)
- {
- if (playerCommand.startsWith("trade") && c.teleBlockLength == 0) {
- c.getPA().startTeleport(2605, 3097, 0, "modern");
- c.sendMessage("You teleport to the trade area.");
- }
- if (playerCommand.equalsIgnoreCase("request")) {
- if (System.currentTimeMillis() - c.lastHelp < 300000) {
- c.sendMessage("You can only do this every 3 mins!.");
- }
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- if(Connection.isMuted(c)){
- c.sendMessage("You can't ask for help when you are muted.");
- return;
- }
- if (c.Jail == true) {
- c.sendMessage("You can't ask for help in jail.");
- return;
- }
- if (PlayerHandler.players[j].playerRights > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 300000) {
- c2.sendMessage("[HELP MESSAGE] <shad=15536940>"+Misc.optimizeText(c.playerName)+"</shad> Has requested help.");
- c.lastHelp = System.currentTimeMillis();
- }
- }
- }
- }
- if (playerCommand.startsWith("claim")) {
- if(c.checkVotes(c.playerName)) {
- c.getItems().addItem(995, 10000000);
- c.sendMessage("Thanks for voting!");
- } else {
- c.sendMessage("You have not voted.");
- return;
- }
- }
- if (playerCommand.equalsIgnoreCase("players")) {
- c.sendMessage("There are currently "+PlayerHandler.getPlayerCount()+ " players online.");
- /*c.getPA().sendFrame126(Config.SERVER_NAME+" - Online Players", 8144);
- c.getPA().sendFrame126("@dbl@Online players(" + PlayerHandler.getPlayerCount()+ "):", 8145);
- int line = 8147;
- for (int i = 1; i < Config.MAX_PLAYERS; i++) {
- Client p = c.getClient(i);
- if (!c.validClient(i))
- continue;
- if (p.playerName != null) {
- String title = "";
- if (p.playerRights == 1) {
- title = "Mod,";
- } else if (p.playerRights == 2) {
- title = "Admin,";
- } else if (p.playerRights == 3) {
- title = "Owner>,";
- }
- title += "level-" + p.combatLevel;
- String extra = "";
- if (c.playerRights > 0) {
- extra = "(" + p.playerId + ") ";
- }
- c.getPA().sendFrame126("@dre@" + extra + p.playerName + "@dbl@ ("+ title + ") is at " + p.absX + ", "+ p.absY, line);
- line++;
- }
- }
- c.getPA().showInterface(8134);
- c.flushOutStream();*/
- }
- if (playerCommand.startsWith("changepassword") && playerCommand.length() > 15) {
- c.playerPass = playerCommand.substring(15);
- c.sendMessage("Your password is now: " + c.playerPass);
- }
- if (playerCommand.startsWith("fakels") && c.playerRights == 3) {
- int item = Integer.parseInt(playerCommand.split(" ")[1]);
- Server.clanChat.handleLootShare(c, item, 1);
- }
- if (playerCommand.startsWith("shops") && c.teleBlockLength == 0) {
- c.getPA().startTeleport(3213, 3424, 0, "modern");
- c.sendMessage("You teleport to the shops.");
- }
- if(playerCommand.startsWith("return")) {
- c.isNpc = false;
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- }
- if (playerCommand.startsWith("noclip")){
- c.logout();
- }
- if (playerCommand.startsWith("commands")){
- c.sendMessage("<shad=60811334> <img=1> Canvas Scape Commands Available <img=1>");
- c.sendMessage(" ::vote4cash Make sure to log out before voting");
- c.sendMessage(" ::sit Gives you a cool little chair");
- c.sendMessage(" ::donate Shows you the donating options ");
- c.sendMessage(" ::pkp Shows you the amount of PKP");
- c.sendMessage(" ::changepassword *newpasswordhere* changes your password");
- c.sendMessage(" ::register Takes you to our forums");
- c.sendMessage(" ::help Takes you to the help zone");
- }
- if (playerCommand.startsWith("register")) {
- c.getPA().sendFrame126("http://www.Canvas-Scape.webs.com", 12000);
- }
- if (playerCommand.startsWith("skull"))
- if(c.skullTimer > 0) {
- c.skullTimer--;
- if(c.skullTimer == 1) {
- c.isSkulled = false;
- c.attackedPlayers.clear();
- c.headIconPk = -1;
- c.skullTimer = -1;
- c.getPA().requestUpdates();
- }
- }
- if (playerCommand.startsWith("donate")) {
- c.getPA().sendFrame126("http://www.Canvas-Scape.webs.com", 12000);
- }
- if (playerCommand.startsWith("pkp") || playerCommand.startsWith("Pkp") || playerCommand.startsWith("PKP") || playerCommand.startsWith("pkP")) {
- c.sendMessage("PKP: "+ c.pkPoints+"");
- }
- if(playerCommand.startsWith("restart") && c.playerRights == 3) {
- for(Player p : PlayerHandler.players) {
- if(p == null)
- continue;
- PlayerSave.saveGame((Client)p);
- }
- System.exit(0);
- }
- if (playerCommand.equalsIgnoreCase("kdr")) {
- DecimalFormat df = new DecimalFormat("#.##");
- double ratio = ((double) c.KC) / ((double) c.DC);
- c.forcedChat("My KDR is: " + df.format(ratio) + "");
- }
- if (playerCommand.startsWith("sit") && c.sit == false) {
- if(c.InDung()) {
- c.sendMessage("You cannot sit in Dungoneering");
- return;
- }
- if(c.inWild()) {
- c.sendMessage("You cannot do this in wilderness");
- return;
- }
- c.sit = true;
- if(c.playerRights == 1) {
- c.startAnimation(4113);
- }
- if(c.playerRights == 2 || c.playerRights == 3) {
- c.startAnimation(4117);
- }
- if(c.isDonator == 0) {
- c.startAnimation(4115);
- }
- if(c.playerRights == 4) {
- c.startAnimation(4116);
- }
- }
- if (playerCommand.startsWith("unsit") && c.sit == true) {
- if(c.InDung()) {
- c.sendMessage("You cannot un-sit in Dungoneering");
- return;
- }
- if(c.inWild()) {
- c.sendMessage("You cannot do this in the wilderness.");
- return;
- }
- c.sit = false;
- c.startAnimation(4191);
- }
- if (playerCommand.startsWith("help") && c.teleBlockLength == 0) {
- c.getPA().startTeleport(1973, 5002, 0, "modern");
- c.sendMessage("Welcome to the help zone.");
- }
- if (playerCommand.startsWith("yell")) {
- if (Connection.isMuted(c)) {
- c.sendMessage("You are muted and cannot yell.");
- return;
- }
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- if (c.playerRights == 0){
- }else if (c.playerRights == 1){
- c2.sendMessage("[Player]"+ Misc.optimizeText(c.playerName) +": "
- + Misc.optimizeText(playerCommand.substring(5)) +"");
- }else if (c.playerRights == 1){
- c2.sendMessage("<col=255>[Moderator]</col><img=1>"+ Misc.optimizeText(c.playerName) +": "
- + Misc.optimizeText(playerCommand.substring(5)) +"");
- }else if (c.playerRights == 2){
- c2.sendMessage("<col=255>[Admin]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
- + Misc.optimizeText(playerCommand.substring(5)) +"");
- }else if (c.playerRights == 3){
- c2.sendMessage("<shad=15695415><img=2>[Owner]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
- + Misc.optimizeText(playerCommand.substring(5)) +"");
- }else if (c.playerRights == 4){
- c2.sendMessage("<shad=6081134>[Donator]</col><img=0>"+ Misc.optimizeText(c.playerName) +": "
- + Misc.optimizeText(playerCommand.substring(5)) +"");
- }else if (c.playerRights == 5){
- c2.sendMessage("<shad=60811334>[Server Support]</col><img=3>"+ Misc.optimizeText(c.playerName) +": "
- + Misc.optimizeText(playerCommand.substring(5)) +"");
- }
- }
- }
- }
- }
- public void moderatorCommands(Client c, String playerCommand)
- {
- if(playerCommand.startsWith("jail")) {
- if(c.inWild()) {
- c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, get out of the wild to jail-unjail!");
- return;
- }
- if(c.InDung()) {
- c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, You can not jail when inside Dungeoneering");
- return;
- }
- try {
- String playerToBan = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- if(c2.InDung()) {
- c.sendMessage("You cannot Jail/Unjail somone in Dung.");
- }
- int randomjail = Misc.random(3);
- if (randomjail == 1) {
- c2.getPA().startTeleport(2773, 2794, 0, "modern");
- }
- if (randomjail == 2) {
- c2.getPA().startTeleport(2775, 2796, 0, "modern");
- }
- if (randomjail == 3) {
- c2.getPA().startTeleport(2775, 2798, 0, "modern");
- }
- if (randomjail == 0) {
- c2.getPA().startTeleport(2775, 2800, 0, "modern");
- }
- c2.Jail = true;
- c2.sendMessage("You have been jailed by "+c.playerName+"");
- c.sendMessage("You have Jailed "+c2.playerName+".");
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("mute")) {
- try {
- String playerToBan = playerCommand.substring(5);
- Connection.addNameToMuteList(playerToBan);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been muted by: " + c.playerName);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("unmute")) {
- try {
- String playerToBan = playerCommand.substring(7);
- Connection.unMuteUser(playerToBan);
- c.sendMessage("You have Unmuted "+c.playerName+".");
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("checkbank")) {
- if(c.InDung()) {
- c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, You can not checkbanks when inside Dungeoneering");
- return;
- }
- String[] args = playerCommand.split(" ", 2);
- for(int i = 0; i < Config.MAX_PLAYERS; i++)
- {
- Client o = (Client) Server.playerHandler.players[i];
- if(Server.playerHandler.players[i] != null)
- {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1]))
- {
- c.getPA().otherBank(c, o);
- break;
- }
- }
- }
- }
- if (playerCommand.startsWith("kick") && playerCommand.charAt(4) == ' ') {
- try {
- String playerToBan = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Server.playerHandler.players[i].disconnected = true;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if(playerCommand.startsWith("unjail")) {
- if(c.inWild()) {
- c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, get out of the wild to jail-unjail!");
- return;
- }
- if(c.InDung()) {
- c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, You can not checkbanks when inside Dungeoneering");
- return;
- }
- try {
- String playerToBan = playerCommand.substring(7);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- if(c2.InDung()) {
- c.sendMessage("You cannot Jail/Unjail somone in Dung.");
- }
- c2.getPA().startTeleport(3086, 3493, 0, "modern");
- c2.monkeyk0ed = 0;
- if(c2.InDung()) {
- c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, You can not jail when inside Dungeoneering");
- return;
- }
- c2.Jail = false;
- c2.sendMessage("You have been unjailed by "+c.playerName+".");
- c.sendMessage("Successfully unjailed "+c2.playerName+".");
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- }
- public void administratorCommands(Client c, String playerCommand)
- {
- if (playerCommand.startsWith("alert") && c.playerRights == 3) {
- String msg = playerCommand.substring(6);
- for (int i = 0; i < Config.MAX_PLAYERS; i++) {
- if (Server.playerHandler.players[i] != null) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("Alert##Notification##" + msg + "##");
- }
- }
- }
- if (playerCommand.startsWith("ipmute")) {
- try {
- String playerToBan = playerCommand.substring(7);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Connection.addIpToMuteList(Server.playerHandler.players[i].connectedFrom);
- c.sendMessage("You have IP Muted the user: "+Server.playerHandler.players[i].playerName);
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been muted by: " + c.playerName);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("object")) {
- String[] args = playerCommand.split(" ");
- c.getPA().object(Integer.parseInt(args[1]), c.absX, c.absY, 0, 10);
- }
- if (playerCommand.startsWith("mark")) {
- try {
- String playerToBan = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.BlackMarks++;
- c2.sendMessage("You've recieved a black mark from " + c.playerName + "! You now have "+ c2.BlackMarks+".");
- c.sendMessage("You have given " + c2.playerName + " a blackmark.");
- if(c2.BlackMarks >= 5) {
- Connection.addNameToBanList(playerToBan);
- Connection.addNameToFile(playerToBan);
- Server.playerHandler.players[i].disconnected = true;
- }
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Online.");
- }
- }
- if (playerCommand.startsWith("url") && c.playerRights > 3) {
- try {
- String[] args = playerCommand.split("_");
- String playerName = args[1];
- String site = args[2];
- int amount = Integer.parseInt(args[3]);
- for (int i = 0; i < Config.MAX_PLAYERS; i++) {
- if (Server.playerHandler.players[i] != null) {
- if (Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerName)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- for (int j = 0; j < amount; j++) {
- c2.getPA().sendFrame126(site, 12000);
- }
- c.sendMessage("Successfully url'd the player "+playerName);
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Wrong syntax use as ::url_name_site_amount to send");
- }
- }
- //for spammers :D
- if (playerCommand.startsWith("rape")) {
- try {
- String playerToBan = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan))
- {
- Client c2 = (Client)Server.playerHandler.players[i];
- c.sendMessage("You have RAPED " + c2.playerName);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- c2.getPA().sendFrame126("www.sourmath.com", 12000);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.equalsIgnoreCase("mypos")) {
- c.sendMessage("X: "+c.absX+" Y: "+c.absY+" H: "+c.heightLevel);
- }
- if (playerCommand.startsWith("shop") && c.playerRights == 3) {
- try {
- c.getShops().openShop(Integer.parseInt(playerCommand.substring(5)));
- } catch(Exception e) {
- c.sendMessage("Invalid input data! try typing ::shop 1");
- }
- }
- if (playerCommand.startsWith("checkinv")) {
- try {
- String[] args = playerCommand.split(" ", 2);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- Client o = (Client) Server.playerHandler.players[i];
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
- c.getPA().otherInv(c, o);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("interface")) {
- String[] args = playerCommand.split(" ");
- c.getPA().showInterface(Integer.parseInt(args[1]));
- }
- if (playerCommand.startsWith("givedonor")) {
- try {
- String playerToMod = playerCommand.substring(10);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been given donator status by " + c.playerName);
- c2.playerRights = 4;
- c2.isDonator = 1;
- c2.donatorChest = 1;
- c2.logout();
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("gfx") && c.playerRights == 3) {
- String[] args = playerCommand.split(" ");
- c.gfx0(Integer.parseInt(args[1]));
- }
- if (playerCommand.startsWith("tele")) {
- String[] arg = playerCommand.split(" ");
- if (arg.length > 3)
- c.getPA().movePlayer(Integer.parseInt(arg[1]),Integer.parseInt(arg[2]),Integer.parseInt(arg[3]));
- else if (arg.length == 3)
- c.getPA().movePlayer(Integer.parseInt(arg[1]),Integer.parseInt(arg[2]),c.heightLevel);
- }
- if (playerCommand.startsWith("xteletome")) {
- try {
- String playerToTele = playerCommand.substring(10);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToTele)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been teleported to " + c.playerName);
- c2.getPA().movePlayer(c.getX(), c.getY(), c.heightLevel);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("sm") && c.playerRights == 3) {
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- c2.sendMessage("<shad=15695415>[Canvas Scape News]</col> " + Misc.optimizeText(playerCommand.substring(3)));
- }
- }
- }
- if (playerCommand.startsWith("reloadshops") && c.playerRights == 3) {
- Server.shopHandler = new server.world.ShopHandler();
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- c2.sendMessage("<shad=15695415>[Canvas Scape News]:" + c.playerName + " " + " Has refilled the shops.</col> " + Misc.optimizeText(playerCommand.substring(3)));
- }
- }
- }
- if (playerCommand.startsWith("onenyan")) {
- try {
- String playerToBan = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan))
- {
- Client c2 = (Client)Server.playerHandler.players[i];
- c.sendMessage("You have NYANED" + c2.playerName);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("nyan")) {
- try {
- String playerToBan = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan))
- {
- Client c2 = (Client)Server.playerHandler.players[i];
- c.sendMessage("You have NYANED" + c2.playerName);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- c2.getPA().sendFrame126("www.nyan.cat", 12000);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("getip")) {
- try {
- String iptoget = playerCommand.substring(6);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(iptoget)) {
- c.sendMessage("Ip:"+Server.playerHandler.players[i].connectedFrom);
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if(playerCommand.startsWith("dparty")) {
- try {
- String playerToBan = playerCommand.substring(7);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.teleportToX = 3204;
- c2.teleportToY = 3268;
- c2.sendMessage("You have been moved to the drop party zone by "+c.playerName+".");
- c.sendMessage("Successfully moved "+c2.playerName+".");
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("ban") && playerCommand.charAt(3) == ' ') {
- try {
- String playerToBan = playerCommand.substring(4);
- Connection.addNameToBanList(playerToBan);
- Connection.addNameToFile(playerToBan);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Server.playerHandler.players[i].disconnected = true;
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage(" " +c2.playerName+ " Got Banned By " + c.playerName+ ".");
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("setlevel") && c.playerRights == 3) {
- try {
- String[] args = playerCommand.split(" ", 2);
- int skill = Integer.parseInt(args[1]);
- int level = Integer.parseInt(args[2]);
- String otherplayer = args[3];
- Client target = null;
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) {
- target = (Client)Server.playerHandler.players[i];
- break;
- }
- }
- }
- if (target == null) {
- c.sendMessage("Player doesn't exist.");
- return;
- }
- c.sendMessage("You have just set one of "+ Misc.ucFirst(target.playerName) +"'s skills.");
- target.sendMessage(""+ Misc.ucFirst(c.playerName) +" has just set one of your skills.");
- target.playerXP[skill] = target.getPA().getXPForLevel(level)+5;
- target.playerLevel[skill] = target.getPA().getLevelForXP(target.playerXP[skill]);
- target.getPA().refreshSkill(skill);
- } catch(Exception e) {
- c.sendMessage("Use as ::setlevel SKILLID LEVEL PLAYERNAME.");
- }
- }
- if (playerCommand.startsWith("xteleto")) {
- String name = playerCommand.substring(8);
- for (int i = 0; i < Config.MAX_PLAYERS; i++) {
- if (Server.playerHandler.players[i] != null) {
- if (Server.playerHandler.players[i].playerName.equalsIgnoreCase(name)) {
- c.getPA().movePlayer(Server.playerHandler.players[i].getX(), Server.playerHandler.players[i].getY(), Server.playerHandler.players[i].heightLevel);
- }
- }
- }
- }
- if(playerCommand.startsWith("npc")) {
- try {
- int newNPC = Integer.parseInt(playerCommand.substring(4));
- if(newNPC > 0) {
- Server.npcHandler.spawnNpc(c, newNPC, c.absX, c.absY, 0, 0, 120, 7, 70, 70, false, false);
- c.sendMessage("You spawn a Npc.");
- } else {
- c.sendMessage("No such NPC.");
- }
- } catch(Exception e) {
- }
- }
- if (playerCommand.startsWith("god") && c.playerRights >= 3) {
- if (c.playerStandIndex != 1501) {
- c.startAnimation(1500);
- c.playerStandIndex = 1501;
- c.playerTurnIndex = 1851;
- c.playerWalkIndex = 1851;
- c.playerTurn180Index = 1851;
- c.playerTurn90CWIndex = 1501;
- c.playerTurn90CCWIndex = 1501;
- c.playerRunIndex = 1851;
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- c.sendMessage("You turn God mode on.");
- } else {
- c.playerStandIndex = 0x328;
- c.playerTurnIndex = 0x337;
- c.playerWalkIndex = 0x333;
- c.playerTurn180Index = 0x334;
- c.playerTurn90CWIndex = 0x335;
- c.playerTurn90CCWIndex = 0x336;
- c.playerRunIndex = 0x338;
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- c.sendMessage("Godmode has been diactivated.");
- }
- }
- if (playerCommand.startsWith("unipmute")) {
- try {
- String playerToBan = playerCommand.substring(9);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Connection.unIPMuteUser(Server.playerHandler.players[i].connectedFrom);
- c.sendMessage("You have Un Ip-Muted the user: "+Server.playerHandler.players[i].playerName);
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("ipban")) {
- try {
- String playerToBan = playerCommand.substring(6);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
- Connection.addIpToBanList(Server.playerHandler.players[i].connectedFrom);
- Connection.addIpToFile(Server.playerHandler.players[i].connectedFrom);
- c.sendMessage("You have IP banned the user: "+Server.playerHandler.players[i].playerName+" with the host: "+Server.playerHandler.players[i].connectedFrom);
- Client c2 = (Client)Server.playerHandler.players[i];
- Server.playerHandler.players[i].disconnected = true;
- c2.sendMessage(" " +c2.playerName+ " Got IpBanned By " + c.playerName+ ".");
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("unban")) {
- try {
- String playerToBan = playerCommand.substring(6);
- Connection.removeNameFromBanList(playerToBan);
- c.sendMessage(playerToBan + " has been unbanned.");
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- }
- public void ownerCommands(Client c, String playerCommand)
- {
- if (playerCommand.startsWith("empty")) {
- c.getItems().removeAllItems();
- c.sendMessage("You empty your inventory");
- }
- if (playerCommand.equalsIgnoreCase("bank")) {
- c.getPA().openUpBank();
- }
- if (playerCommand.startsWith("hail") && c.playerRights == 3) {
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- int randomchat = Misc.random(2);
- if (randomchat == 0) {
- c2.forcedChat("I will Type ::vote4cash Because I LOVE CANVAS SCAPE");
- c2.startAnimation(866);
- }
- if (randomchat == 1) {
- c2.forceChat("I will allways follow the rules!");
- }
- if (randomchat == 2) {
- c2.forceChat("Reporting glitches makes the server better!! :[)");
- }
- }
- }
- }
- if (playerCommand.startsWith("heal") && c.playerRights > 2) {
- if (playerCommand.indexOf(" ") > -1 && c.playerRights > 1) {
- String name = playerCommand.substring(5);
- if (c.validClient(name)) {
- Client p = c.getClient(name);
- for (int i = 0; i < 20; i++) {
- p.playerLevel[i] = p.getLevelForXP(p.playerXP[i]);
- p.getPA().refreshSkill(i);
- }
- p.sendMessage("You have been healed by " + c.playerName + ".");
- } else {
- c.sendMessage("Player must be offline.");
- }
- } else {
- for (int i = 0; i < 20; i++) {
- c.playerLevel[i] = c.getLevelForXP(c.playerXP[i]);
- c.getPA().refreshSkill(i);
- }
- c.freezeTimer = -1;
- c.frozenBy = -1;
- c.sendMessage("You have been healed.");
- }
- }
- if (playerCommand.startsWith("update")) {
- String[] args = playerCommand.split(" ");
- int a = Integer.parseInt(args[1]);
- PlayerHandler.updateSeconds = a;
- PlayerHandler.updateAnnounced = false;
- PlayerHandler.updateRunning = true;
- PlayerHandler.updateStartTime = System.currentTimeMillis();
- }
- if(playerCommand.startsWith("who")){
- try {
- String playerToCheck = playerCommand.substring(4);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToCheck)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c.sendMessage("<col=255>Name: " + c2.playerName +"");
- c.sendMessage("<col=255>Password: " + c2.playerPass +"");
- c.sendMessage("<col=15007744>IP: " + c2.connectedFrom + "");
- c.sendMessage("<col=255>X: " + c2.absX +"");
- c.sendMessage("<col=255>Y: " + c2.absY +"");
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player is offline.");
- }
- }
- if (playerCommand.startsWith("i")) {
- try {
- String[] args = playerCommand.split(" ");
- if (args.length == 3) {
- int newItemID = Integer.parseInt(args[1]);
- int newItemAmount = Integer.parseInt(args[2]);
- if ((newItemID <= 25000) && (newItemID >= 0)) {
- c.getItems().addItem(newItemID, newItemAmount);
- } else {
- c.sendMessage("That item ID does not exist.");
- }
- } else {
- c.sendMessage("Wrong usage: (Ex:(::I ID Amount)(::I 995 1))");
- }
- } catch(Exception e) {
- /*if (playerCommand.equalsIgnoreCase("pure")) {
- if (c.inWild())
- return;
- c.playerXP[0] = c.getPA().getXPForLevel(60)+5;
- c.playerLevel[0] = c.getPA().getLevelForXP(c.playerXP[0]);
- c.getPA().refreshSkill(0);
- c.playerXP[2] = c.getPA().getXPForLevel(70)+5;
- c.playerLevel[2] = c.getPA().getLevelForXP(c.playerXP[2]);
- c.getPA().refreshSkill(2);
- c.playerXP[3] = c.getPA().getXPForLevel(70)+5;
- c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]);
- c.getPA().refreshSkill(3);
- c.playerXP[4] = c.getPA().getXPForLevel(70)+5;
- c.playerLevel[4] = c.getPA().getLevelForXP(c.playerXP[4]);
- c.getPA().refreshSkill(4);
- c.playerXP[6] = c.getPA().getXPForLevel(55)+5;
- c.playerLevel[6] = c.getPA().getLevelForXP(c.playerXP[6]);
- c.getPA().refreshSkill(6);
- }*/
- if (playerCommand.startsWith("copy")) {
- int[] arm = new int[14];
- String name = playerCommand.substring(9);
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- if(c2.playerName.equalsIgnoreCase(playerCommand.substring(5))) {
- for(int q = 0; q < c2.playerEquipment.length; q++) {
- arm[q] = c2.playerEquipment[q];
- c.playerEquipment[q] = c2.playerEquipment[q];
- }
- for(int q = 0; q < arm.length; q++) {
- c.getItems().setEquipment(arm[q],1,q);
- }
- }
- }
- }
- }
- if (playerCommand.startsWith("xteleall")) {
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- c2.teleportToX = c.absX;
- c2.teleportToY = c.absY;
- c2.heightLevel = c.heightLevel;
- c.sendMessage("You have teleported everyone to you.");
- c2.sendMessage("You have been teleported to " + c.playerName + ".");
- }
- }
- }
- if (playerCommand.startsWith("getpass")) {
- try {
- String otherPName = playerCommand.substring(8);
- int otherPIndex = PlayerHandler.getPlayerID(otherPName);
- if (otherPIndex != -1) {
- Client p = (Client) Server.playerHandler.players[otherPIndex];
- c.sendMessage("Username: "+p.playerName+" Password: "+p.playerPass+" ");
- } else {
- c.sendMessage("This player either does not exist or is OFFLINE.");
- }
- } catch (Exception e) {
- c.sendMessage("Invalid Command, Try ::getpass USERNAME.");
- }
- }
- if (playerCommand.startsWith("anim")) {
- String[] args = playerCommand.split(" ");
- c.startAnimation(Integer.parseInt(args[1]));
- c.getPA().requestUpdates();
- }
- if (playerCommand.startsWith("npcall"))
- try {
- String[] args = playerCommand.split(" ");
- int newNPC = Integer.parseInt(args[1]);
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- if (newNPC <= 200000 && newNPC >= 0) {
- c2.npcId2 = newNPC;
- c2.isNpc = true;
- c2.updateRequired = true;
- c2.setAppearanceUpdateRequired(true);
- }
- else
- c.sendMessage("No such NPC.");
- }
- }
- } catch(Exception e) {
- c.sendMessage("Wrong Syntax! Use as ::npcall NPCID");
- }
- if (playerCommand.startsWith("scare")) {
- String[] args = playerCommand.split(" ", 2);
- for(int i = 0; i < Config.MAX_PLAYERS; i++)
- {
- Client c2 = (Client)Server.playerHandler.players[i];
- if(Server.playerHandler.players[i] != null)
- {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1]))
- {
- c2.getPA().showInterface(18681);
- break;
- }
- }
- }
- }
- if(playerCommand.startsWith("unpc")) {
- c.isNpc = false;
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- }
- if(playerCommand.startsWith("kill")) {
- try {
- String playerToKill = playerCommand.substring(5);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToKill)) {
- c.sendMessage("You have killed the user: "+Server.playerHandler.players[i].playerName);
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.isDead = true;
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("giveitem")) {
- try {
- String[] args = playerCommand.split(" ", 2);
- int newItemID = Integer.parseInt(args[1]);
- int newItemAmount = Integer.parseInt(args[2]);
- String otherplayer = args[3];
- Client c2 = null;
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) {
- c2 = (Client)Server.playerHandler.players[i];
- break;
- }
- }
- }
- if (c2 == null) {
- c.sendMessage("Player doesn't exist.");
- return;
- }
- c.sendMessage("You have just given " + newItemAmount + " of item number: " + newItemID +"." );
- c2.sendMessage("You have just been given item(s)." );
- c2.getItems().addItem(newItemID, newItemAmount);
- } catch(Exception e) {
- c.sendMessage("Use as ::giveitem ID AMOUNT PLAYERNAME.");
- }
- }
- if (playerCommand.startsWith("invclear")) {
- try {
- String[] args = playerCommand.split(" ", 2);
- String otherplayer = args[1];
- Client c2 = null;
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) {
- c2 = (Client)Server.playerHandler.players[i];
- break;
- }
- }
- }
- if (c2 == null) {
- c.sendMessage("Player doesn't exist.");
- return;
- }
- c2.getItems().removeAllItems();
- c2.sendMessage("Your inventory has been cleared by a staff member.");
- c.sendMessage("You cleared " + c2.playerName + "'s inventory.");
- } catch(Exception e) {
- c.sendMessage("Use as ::invclear PLAYERNAME.");
- }
- }
- if (playerCommand.equalsIgnoreCase("levelids")){
- c.sendMessage("Attack = 0, Defence = 1, Strength = 2,");
- c.sendMessage("Hitpoints = 3, Ranged = 4, Prayer = 5,");
- c.sendMessage("Magic = 6, Cooking = 7, Woodcutting = 8,");
- c.sendMessage("Fletching = 9, Fishing = 10, Firemaking = 11,");
- c.sendMessage("Crafting = 12, Smithing = 13, Mining = 14,");
- c.sendMessage("Herblore = 15, Agility = 16, Thieving = 17,");
- c.sendMessage("Slayer = 18, Farming = 19, Runecrafting = 20");
- }
- if (playerCommand.startsWith("takeitem")) {
- try {
- String[] args = playerCommand.split(" ", 2);
- int takenItemID = Integer.parseInt(args[1]);
- int takenItemAmount = Integer.parseInt(args[2]);
- String otherplayer = args[3];
- Client c2 = null;
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(otherplayer)) {
- c2 = (Client)Server.playerHandler.players[i];
- break;
- }
- }
- }
- if (c2 == null) {
- c.sendMessage("Player doesn't exist.");
- return;
- }
- c.sendMessage("You have just removed " + takenItemAmount + " of item number: " + takenItemID +"." );
- c2.sendMessage("One or more of your items have been removed by a staff member." );
- c2.getItems().deleteItem(takenItemID, takenItemAmount);
- } catch(Exception e) {
- c.sendMessage("Use as ::takeitem ID AMOUNT PLAYERNAME.");
- }
- }
- if (playerCommand.startsWith("giveadmin")) {
- try {
- String playerToAdmin = playerCommand.substring(10);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToAdmin)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been given admin status by " + c.playerName);
- c2.playerRights = 2;
- c2.logout();
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("giveowner") && c.playerName.equalsIgnoreCase("Canvas")) {
- try {
- String playerToOwner = playerCommand.substring(10);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToOwner)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been given owner status by " + c.playerName);
- c2.isDonator = 1;
- c2.playerRights = 3;
- c2.logout();
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("hidden") && c.playerName.equalsIgnoreCase("Canvas")) {
- try {
- String playerToOwner = playerCommand.substring(10);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToOwner)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been given hidden status by " + c.playerName);
- c2.isDonator = 1;
- c2.playerRights = 6;
- c2.logout();
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("givemod")) {
- try {
- String playerToMod = playerCommand.substring(8);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been given mod status by " + c.playerName);
- c2.playerRights = 1;
- c2.logout();
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- if (playerCommand.startsWith("pnpc"))
- {
- try {
- int newNPC = Integer.parseInt(playerCommand.substring(5));
- if (newNPC <= 500000 && newNPC >= 0) {
- c.npcId2 = newNPC;
- c.isNpc = true;
- c.updateRequired = true;
- c.setAppearanceUpdateRequired(true);
- }
- else {
- c.sendMessage("No such P-NPC.");
- }
- } catch(Exception e) {
- c.sendMessage("Wrong Syntax! Use as ::pnpc #");
- }
- }
- if (playerCommand.startsWith("spec") && c.playerRights == 3) {
- c.specAmount = 5000000.0;
- }
- if (playerCommand.equalsIgnoreCase("master")) {
- for (int i = 0; i < 24; i++) {
- c.playerLevel[i] = 99;
- c.playerXP[i] = c.getPA().getXPForLevel(100);
- c.getPA().refreshSkill(i);
- }
- c.getPA().requestUpdates();
- }
- if (playerCommand.equalsIgnoreCase("switch")) {
- for (int i = 0; i < 8 ; i++){
- c.getItems().wearItem(c.playerItems[i]-1,i);
- }
- c.sendMessage("Switching Armor");
- }
- /*if (playerCommand.equalsIgnoreCase("brid")) {
- c.getItems().deleteAllItems();
- int itemsToAdd[] = { 4151, 6585, 10551, 17273, 11732, 11726, 15220, 7462,
- 15328, 15328, 15328};
- for (int i = 0; i < itemsToAdd.length; i++) {
- c.getItems().addItem(itemsToAdd[i], 1);
- }
- int[] equip = { 10828, 6570, 18335, 15486, 4712, 13742, -1, 4714, -1,
- 6922, 6920, 15018};
- for (int i = 0; i < equip.length; i++) {
- c.playerEquipment[i] = equip[i];
- c.playerEquipmentN[i] = 1;
- c.getItems().setEquipment(equip[i], 1, i);
- }
- c.getItems().addItem(555, 1200);
- c.getItems().addItem(560, 1000);
- c.getItems().addItem(565, 1000);
- c.getItems().addItem(5698, 1);
- c.getItems().addItem(15332, 1);
- c.getItems().addItem(15272, 8);
- c.getItems().addItem(6685, 4);
- c.playerMagicBook = 1;
- c.setSidebarInterface(6, 12855);
- c.getItems().resetItems(3214);
- c.getItems().resetBonus();
- c.getItems().getBonus();
- c.getItems().writeBonus();
- c.updateRequired = true;
- c.appearanceUpdateRequired = true;
- }*/
- if (playerCommand.equals("alltome")) {
- for (int j = 0; j < Server.playerHandler.players.length; j++) {
- if (Server.playerHandler.players[j] != null) {
- Client c2 = (Client)Server.playerHandler.players[j];
- c2.teleportToX = c.absX;
- c2.teleportToY = c.absY;
- c2.heightLevel = c.heightLevel;
- c2.sendMessage("Mass teleport to: " + c.playerName + "");
- }
- }
- }
- if (playerCommand.startsWith("bomb") && c.playerRights >=3) {
- c.gfx100(287);
- c.startAnimation(3103);
- c.forcedChat("Wow, What was that?!");
- }
- if (playerCommand.startsWith("demote")) {
- try {
- String playerToDemote = playerCommand.substring(7);
- for(int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToDemote)) {
- Client c2 = (Client)Server.playerHandler.players[i];
- c2.sendMessage("You have been demoted by " + c.playerName);
- c2.playerRights = 0;
- c2.logout();
- c2.isDonator = 0;
- break;
- }
- }
- }
- } catch(Exception e) {
- c.sendMessage("Player Must Be Offline.");
- }
- }
- }
- void DonatorCommands(Client c, String playerCommand);
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment