Jump to content

Search the Community

Showing results for tags 'expresion'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. hey i am did remake the command.java file since how i did had it whas a disaster itself he try'd to do multiply commands somehow now i fixed that but do i have problems. normally i fix this error easy but somehow it won't work now. the error i get is. [CODE]commands.java329:error: illegal start of expresion public void ownerCommands(Client c, String playerCommand) {[/CODE] here is my commands.java (yes i know i did some parts with rights and other with "public void ownercommands " ect. dont think this really does matter..? [CODE]package server.model.players.packets; import server.Config; import server.Connection; import server.Server; import server.model.players.Client; import server.model.players.combat.*; import server.model.players.PacketType; import server.model.players.PlayerAssistant; import server.model.players.PlayerHandler; import server.util.Misc; import server.util.DonationHandler; import server.util.MadTurnipConnection; import server.clip.region.Region; import server.world.ClanChatHandler; import server.world.ItemHandler; import server.model.players.clanchat.*; import server.model.npcs.NPCDrops; import server.model.minigames.TriviaBot; import server.model.npcs.NPCHandler; import server.EventCheck; import org.runetoplist.*; /** * Commands **/ public class Commands implements PacketType { [MENTION=15855]Over[/MENTION]ride public void processPacket(final Client c, int packetType, int packetSize) { String playerCommand = c.getInStream().readString(); if (playerCommand.startsWith("/") && playerCommand.length() > 1) { if (c.clanId >= 0) { System.out.println(playerCommand); playerCommand = playerCommand.substring(1); ClanChatHandler.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 <= 3 || c.playerRights == 6) // moderatorCommands(c, playerCommand); // if (c.playerRights >= 2 && c.playerRights <= 3 || c.playerRights == 6) // administratorCommands(c, playerCommand); if (c.playerRights == 3 || c.playerRights == 6) ownerCommands(c, playerCommand); // if (c.playerRights == 4 & c.playerRights <= 3 || c.playerRights == 6) // donatorCommands(c, playerCommand); // if (c.playerRights == 5 & c.playerRights <= 3 || c.playerRights == 6) // serverSupportCommands(c, playerCommand); } public void playerCommands(final Client c, String playerCommand) { if(playerCommand.startsWith("commands")) { c.sendMessage("note alwais put :: before ur command."); c.sendMessage("home, dicezone, empty, changepassword, players"); } if (playerCommand.startsWith("yell")) { if (Connection.isMuted(c)) { c.sendMessage("You are muted and cannot yell."); return; } if (c.playerRights == 0) { c.sendMessage("You must be a donator plus to use this command!"); return; } for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client)PlayerHandler.players[j]; String text = Misc.ucFirst(Misc.optimizeText(playerCommand.substring(5))); if (c.playerRights == 1) { c2.sendMessage("<img=1>[<col=12756>Moderator</col>] "+ Misc.optimizeText3(c.playerName) +": " + text +""); } else if (c.playerRights == 2){ c2.sendMessage("<img=2>[<col=16224512>Administrator</col>] "+ Misc.optimizeText3(c.playerName) +": " + text +""); } else if (c.playerRights == 3) { c2.sendMessage("<img=2>[<col=8532295>Owner</col>] "+ Misc.optimizeText3(c.playerName) +": "+ text +""); } else if (c.playerRights == 4) { c2.sendMessage("<img=4>[<col=16723968>Donator</col>] "+ Misc.optimizeText3(c.playerName) +": " + text +""); } else if (c.playerRights == 5) { c2.sendMessage("<img=5><col=25500>[Support]</col> "+ Misc.optimizeText3(c.playerName) +": " + text +""); } else if (c.playerRights == 6) { c2.sendMessage("<col=25500>[Developer]</col><img=6>"+ Misc.optimizeText3(c.playerName) +": " + text +""); /*} else if (c.playerRights == 7) c2.sendMessage("["+c.yellName+"]<img=0>"+ Misc.optimizeText3(c.playerName) +": " + text +"");*/ } } } } if(playerCommand.startsWith("home")) { c.getPA().startTeleport(3086, 3496, 0, "modern"); } if (playerCommand.startsWith("changepassword") && playerCommand.length() > 15) { c.playerPass = playerCommand.substring(15); c.sendMessage("Your password is now: " + c.playerPass); } if (playerCommand.equalsIgnoreCase("players")) { c.sendMessage("There are currently "+PlayerHandler.getPlayerCount()+ " players online."); } //donorcommands if (c.playerRights == 4 & c.playerRights <= 3 || c.playerRights == 6) { if (playerCommand.startsWith("setyellname")) { if (c.totalInterbellumPoints < 250) { c.sendMessage("Only super donators can use this command."); return; } String newName = playerCommand.substring(12); //newName = newName.substring(0, 15); c.yellName = newName; c.sendMessage("You have changed your yell name to: "+c.yellName+"."); } if (c.playerRights == 4 & c.playerRights <= 3 || c.playerRights == 6) { if(playerCommand.startsWith("dzone")) { c.getPA().startTeleport(2583, 9449, 0, "modern"); } //moderatorCommands if (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 6) { if(playerCommand.startsWith("jail")) { if(c.inWild()) { c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, get out of the wild to jail-unjail!"); return; } try { String playerToBan = playerCommand.substring(5); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Client c2 = (Client)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("unjail")) { if(c.inWilderness) { c.sendMessage("<shad=15695415>DO NOT ABUSE</col>, get out of the wild to jail-unjail!"); return; } try { String playerToBan = playerCommand.substring(7); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Client c2 = (Client)PlayerHandler.players[i]; c2.getPA().startTeleport(3086, 3493, 0, "modern"); 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."); } if (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 6) { if (playerCommand.startsWith("mute")) { try { String playerToBan = playerCommand.substring(5); Connection.addNameToMuteList(playerToBan); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been muted by: " + c.playerName); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 6) { 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 (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 6) { if (playerCommand.startsWith("xto")) { String name = playerCommand.substring(8); for (int i = 0; i < Config.MAX_PLAYERS; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName.equalsIgnoreCase(name)) { c.getPA().movePlayer(PlayerHandler.players[i].getX(), PlayerHandler.players[i].getY(), PlayerHandler.players[i].heightLevel); } } } } if (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 6) { if (playerCommand.startsWith("xtome")) { try { String playerToTele = playerCommand.substring(10); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToTele)) { Client c2 = (Client)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("reloadshops") && c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 5 || c.playerRights == 6) { Server.shopHandler = new server.world.ShopHandler(); for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client)PlayerHandler.players[j]; c2.sendMessage("<shad=15695415>[Simplicity News]:" + c.playerName + " " + " has refilled the shops.</col> "); } } } if (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 5 || c.playerRights == 6) { if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(c.bankingTab); } } } } if (c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 5 || c.playerRights == 6) { if (playerCommand.equalsIgnoreCase("staffzone")) { c.getPA().startTeleport(1973, 5002, 0, "modern"); c.sendMessage("Welcome to the staff zone."); } //admincommands if (c.playerRights >= 2 && c.playerRights <= 3 || c.playerRights == 6) { 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(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { PlayerHandler.players[i].disconnected = true; c.sendMessage("You have banned: "+playerToBan); } } } } catch(Exception e) { c.sendMessage("Player is offline."); } } } } if (c.playerRights >= 2 && c.playerRights <= 3 || c.playerRights == 6) { if (playerCommand.startsWith("unban")) { try { String playerToBan = playerCommand.substring(6); Connection.removeNameFromBanList(playerToBan); c.sendMessage(playerToBan + " has been unbanned."); } catch(Exception e) { e.printStackTrace(); } } } } if (c.playerRights >= 2 && c.playerRights <= 3 || c.playerRights == 6) { if (playerCommand.startsWith("item")) { 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:(::pickup_ID_Amount)(::item 995 1))"); } } catch(Exception e) { } } } public void ownerCommands(Client c, String playerCommand) { if (playerCommand.startsWith("object")) { try { String[] args = playerCommand.split(" ", 3); int id = Integer.parseInt(args[1]); c.getPA().object(id, c.absX, c.absY, 0, 10); } catch(Exception e) { } } if (playerCommand.startsWith("ipban")) { try { String playerToBan = playerCommand.substring(6); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Connection.addIpToBanList(PlayerHandler.players[i].connectedFrom+" - " +PlayerHandler.players[i].playerName); Connection.addIpToFile(PlayerHandler.players[i].connectedFrom+" - " +PlayerHandler.players[i].playerName); c.sendMessage("You have IP banned the user: "+PlayerHandler.players[i].playerName+" with the host: "+PlayerHandler.players[i].connectedFrom); Client c2 = (Client)PlayerHandler.players[i]; c2.disconnected = true; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } if (playerCommand.startsWith("unipban")) { try { String name = playerCommand.substring(8); if (Connection.unipBan(name)) c.sendMessage("You have un-ipbanned the user: "+name); else c.sendMessage("No such name found in the ipban list."); } catch(Exception e) { c.sendMessage("Error"); } if (playerCommand.startsWith("ipmute")) { try { String playerToBan = playerCommand.substring(7); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Connection.addIpToMuteList(PlayerHandler.players[i].connectedFrom); c.sendMessage("You have IP Muted the user: "+PlayerHandler.players[i].playerName); Client c2 = (Client)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("unipmute")) { try { String playerToBan = playerCommand.substring(9); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Connection.unIPMuteUser(PlayerHandler.players[i].connectedFrom); Connection.unMuteUser(PlayerHandler.players[i].playerName); c.sendMessage("You have unipmuted the user: "+PlayerHandler.players[i].playerName); 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("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("unpc")) { c.isNpc = false; c.updateRequired = true; c.appearanceUpdateRequired = true; } if (playerCommand.startsWith("infspec")) { c.specAmount = 5000000.0; } if (playerCommand.startsWith("spec")) { c.specAmount = 10.0; } 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("master")) { for(int i = 0; i < c.playerLevel.length; i++) { c.playerXP[i] = c.getPA().getXPForLevel(99)+5; c.playerLevel[i] = c.getPA().getLevelForXP(c.playerXP[i]); c.getPA().refreshSkill(i); } if (playerCommand.equals("alltome")) { for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client)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("update")) { String[] args = playerCommand.split(" "); int a = Integer.parseInt(args[1]); PlayerHandler.updateSeconds = a; PlayerHandler.updateAnnounced = false; PlayerHandler.updateRunning = true; PlayerHandler.updateStartTime = System.currentTimeMillis(); } } } } } } } } [/CODE]
×