Jump to content

Aleyasu

Member
  • Content count

    123
  • Joined

  • Last visited

  1. [B][SIZE=4] Hello everyone. Thanks for taking the time to read my post. [/SIZE][/B] I've been trying to make these two commands: [SIZE=3]1.) ::help[/SIZE] Sends a message to all players with player rights 1, 2, 3 and 6 saying that the player who wrote ::help needs help. [SIZE=3]2.) ::reply[/SIZE] if the player is called for example "Tony" and he wrote "::help", all staff members with the rights 1, 2, 3 or 6 would get a message of him needing help and if they would write "::reply tony" they would be teleported to that person, OR both the person who wrote "::help" and the staff member who wrote "::reply" would be teleported to a totally different place. However, this would only work if the staff member wrote "::reply tony" maximum 2 minutes after Tony did, so no staff could use this command to their advantage and to teleport at will. I kept trying to add these commands, but since I suck at coding I couldn't add them. Hope some of you guys might be able to help me. My attemt at this: [CODE] if (playerCommand.equalsIgnoreCase("help")) { if (System.currentTimeMillis() - c.lastHelp < 60000) { c.sendMessage("<col=16711680>You can only do this every 60 seconds."); } 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("<col=16711680>You can't ask for help when you are muted."); return; } if (c.Jail == true) { c.sendMessage("<col=16711680>You can't ask for help in jail."); return; } if (PlayerHandler.players[j].playerRights > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 60000 || PlayerHandler.players[j].playerRights == 6 && System.currentTimeMillis() - c.lastHelp > 60000) { c2.sendMessage("<shad=16711680>"+Misc.optimizeText(c.playerName)+" needs help. Coordinates are: <shad=15536940>"+c.absX+", "+c.absY+"</shad>."); c.sendMessage("<col=16711680>A staff member will help you shortly."); c.lastHelp = System.currentTimeMillis(); } } } } if (playerCommand.startsWith("reply") && c.playerRights >= 1 && c.playerRights <= 3 || c.playerRights == 6) { 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)) { if (System.currentTimeMillis() - c2.lastHelp > 120000) { 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("<col=16711680>There's nobody to help!"); } }[/CODE] Error: [CODE]**Compiling Main Files Please Wait!** src\com\salacious\model\players\packets\Commands.java:171: error: cannot find sy mbol if (System.currentTimeMillis() - c.lastHelp < 60000) { ^ symbol: variable lastHelp location: variable c of type Client src\com\salacious\model\players\packets\Commands.java:185: error: cannot find sy mbol if (PlayerHandler.players[j].playerRight s > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 60000 || PlayerHandler.players[j].playerRights == 6 && System.cu rrentTimeMillis() - c.lastHelp > 60000) { ^ symbol: variable lastHelp location: variable c of type Client src\com\salacious\model\players\packets\Commands.java:185: error: cannot find sy mbol if (PlayerHandler.players[j].playerRight s > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 60000 || PlayerHandler.players[j].playerRights == 6 && System.cu rrentTimeMillis() - c.lastHelp > 60000) { ^ symbol: variable lastHelp location: variable c of type Client src\com\salacious\model\players\packets\Commands.java:188: error: cannot find sy mbol c.lastHelp = System.currentTimeM illis(); ^ symbol: variable lastHelp location: variable c of type Client src\com\salacious\model\players\packets\Commands.java:199: error: cannot find sy mbol if (System.currentTimeMillis() - c2.lastHelp > 1 20000) { ^ symbol: variable c2 location: class Commands Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 5 errors Press any key to continue . . .[/CODE] Thanks a lot for your help.
  2. Automatic donations will be implemented soon!
  3. Thanks evolved, helped me over skype/teamviewe. Vouch for this awesome guy :3
  4. Added. Please add me too :)
  5. We are looking for a co-owner!
  6. Did you read my thread? I said I zipped the things INSIDE of it, not the folder.
  7. I really need help with this!
  8. [COLOR="Blue"][B]Hello. I am using InsidiaX base, and I can't seem to make the auto cache downloader work. The CacheDownloader downloads the cache, but then, it doesn't unzip it fully. It creates some files and put the zipped cache folder there, but doesn't unzip everything. Then the client gives me a message saying: "Error Loading... Contact Staff!"[/COLOR] [U][COLOR="Magenta"]What I did:[/COLOR][/U] [COLOR="Blue"]I have zipped the FILES inside the cache, not the FOLDER. It's a .zip file NOT a .rar file. I have uploaded the .zip file to dropbox. I have changed all names and paths in Client.java Signlink.java and CacheDownloader.java to the correct ones. [/COLOR] My files: [COLOR="SandyBrown"]This is my Cache (on dropbox): [URL="https://dl.dropbox.com/u/29863986/Vengeance-PK.zip"]Vengeance-PK.zip[/URL] This is my CacheDownloader.java (on dropbox): [URL="https://dl.dropbox.com/u/29863986/CacheDownloader.java"]CacheDownloader.java[/URL] This is my client.java (on dropbox): [URL="https://dl.dropbox.com/u/29863986/client.java"]client.java[/URL] This is my signlink.java (on dropbox): [URL="https://dl.dropbox.com/u/29863986/signlink.java"]signlink.java[/URL] I would appreciate help with this A LOT, so I thank you in advance.[/COLOR] [COLOR="Blue"]My skype: Alexus777aci-new [/COLOR] [/B]
  9. Still looking for co-owner!
×