Jump to content

Search the Community

Showing results for tags 'simple'.



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 116 results

  1. Made this and posted it at Rune-Server. This took me about 5 minutes to write. Its nothing fancy and it's simple as the title says, it works and could be useful. Its not much of a system...but we'll consider it as one Colors: [COLOR=#ff0000]RED [/COLOR][COLOR=#0000ff]BLUE [/COLOR][COLOR=#ffd700]YELLOW [/COLOR][COLOR=#ffa500]ORANGE [/COLOR][COLOR=#800080]PURPLE [/COLOR][COLOR=#ffffff]WHITE [/COLOR][COLOR=#000000]BLACK[/COLOR] [B]NEW CODE: [/B] Slight adjustments, such as crowns and a better way of using colors. Message.java [CODE] /** * [MENTION=117450]Des[/MENTION]cription Uses the stream to send new messages using color and/or crown icons * [MENTION=11342]Tit[/MENTION]le Message.java * @author iExample, Devo and GTFO * [MENTION=3812]Link[/MENTION] [url]http://www.rune-server.org/[/url] */ public class Message { /** * Sends message with crowns or color. * [MENTION=75098]Para[/MENTION]m c * [MENTION=75098]Para[/MENTION]m color * [MENTION=75098]Para[/MENTION]m message * [MENTION=75098]Para[/MENTION]m rankIcons * [MENTION=75098]Para[/MENTION]m crownNumber * [MENTION=184045]return[/MENTION] */ public static boolean out(Client c, String color, String message, int crownNumber, boolean rankIcons) { if (c.getOutStream() != null) { c.outStream.createFrameVarSize(253); if(rankIcons == true) { c.outStream.writeString("<img="+getCrown(crownNumber)+"><col="+getColor(color)+">"+message+"</col>"); } else { c.outStream.writeString("<col="+getColor(color)+">"+message+"</col>"); } c.outStream.endFrameVarSize(); } return false; } /** * Crowns. * [MENTION=75098]Para[/MENTION]m crownNumber * [MENTION=184045]return[/MENTION] */ public static MessageCrowns getCrown(int crownNumber) { return getCrown(crownNumber); } /** * Colors. * [MENTION=75098]Para[/MENTION]m color * [MENTION=184045]return[/MENTION] */ public static MessageColor getColor(String color) { return getColor(color); } } [/CODE] MessageColor.java [CODE] package server.world.messages; public enum MessageColor { RED("FF0000"), GREEN("00FF00"), YELLOW("FFFF00"), BLUE("0000FF"), ORANGE("FF7F00"), PURPLE("800080"), WHITE("FFFFFF"), BLACK("0"), CYAN("65535"), LIME("65280"), GREY("808080"); private String hex; private MessageColor(String color) { this.hex = color; } public String getColor() { return this.hex; } } [/CODE] MessageCrowns.java: [CODE] package server.world.messages; public enum MessageCrowns { /** * You might have to update the int(s) to the correct crown id. */ OWNER(1), MODERATOR(2), DONATOR(3); private int iconName; private MessageCrowns(int icon) { this.iconName = icon; } public int getRanking() { return this.iconName; } } [/CODE] Use(The boolean represents the use of crowns and the int represents the crown id): [CODE] Message.out(c, "RED", "Your message goes here", 1, true); [/CODE] [B]OLD LAME CODE:[/B] [CODE] import server.model.players.Client; public class Message { public final static String RED = "ff0000", GREEN = "00ff00", YELLOW = "ffff00", BLUE = "0000ff", ORANGE = "ff7f00", PURPLE = "800080", WHITE = "ffffff", GREY = "808080", BLACK = "000000"; public static boolean out(Client player, String color, String message) { if (player.getOutStream() != null) { player.outStream.createFrameVarSize(253); player.outStream.writeString("<col="+color+">"+message+"</col>"); player.outStream.endFrameVarSize(); } return false; } } [/CODE] Use: [CODE] Message.out(c, Message.RED, "Your message goes here"); [/CODE][COLOR=#000000] [/COLOR]
  2. EDIT: Fixed it, I'm just an idiot and didn't update shops.cfg I'm new to this... My source came with a pk point shop terrible for the economy so I decided to go in and change the items in it. I removed all the stupid items and replaced most of them with untradeables, I did this in *ShopAssistant.java and saved the changes, restarted the server, and reloaded my client, but nothing in the shop has changed. Here's the code: /* * Begin pk shop points */ public int getPkPoints(int id) { switch (id) { case 7462: // barrow gloves return 20; case 12954: // dragon defender return 100; case 10551: // fighter torso return 80; case 10548: // fighter hat return 35; case 10547: // healer hat return 35; case 8849: // addy defender return 5; case 8850: // rune defender return 15; case 7460: // rune gloves return 5; case 7461: // dragon gloves return 12; case 6570: // fire cape return 40; case 3144: // karambwan return 1; case 11517: // super combat potion return 3; case 2528: // 1m xp lamp return 175; case 4447: // 35k xp lamp return 5; } return 10000; }
  3. [SIZE=3][FONT=tahoma]Its simple, its basic and something I got bored and made that can be useful to most people. It switches a certain string to an uppercase or lowercase string in a less complicated way. Create this class into your package and name it TextCapitalizer and add this code it: [CODE] [COLOR=#000000]public class TextCapitalizer { /** * Upper case text. * @[/COLOR][URL="http://www.runelocus.com/forums/member.php?u=75098"][COLOR=#000000]Para[/COLOR][/URL][COLOR=#000000]m text * @[/COLOR][URL="http://www.runelocus.com/forums/member.php?u=184045"][COLOR=#000000]return[/COLOR][/URL][COLOR=#000000] */ public static String toUppercase(String text) { return text.toLowerCase(); } /** * Lowercase text. * @[/COLOR][URL="http://www.runelocus.com/forums/member.php?u=75098"][COLOR=#000000]Para[/COLOR][/URL][COLOR=#000000]m text * @[/COLOR][URL="http://www.runelocus.com/forums/member.php?u=184045"][COLOR=#000000]return[/COLOR][/URL][COLOR=#000000] */ public static String toLowercase(String text) { return text.toLowerCase(); } }[/COLOR] [/CODE] Then exit and save. To use this, replace the string that you would like to be switched into uppercase or lowercase. So example, use this instead: Uppercase Format: [CODE] public final static String YOUR_STRING = TextCapitalizer.toLowercase("YOUR TEXT HERE"); [/CODE] Lowercase Format: [CODE] public final static String YOUR_STRING = TextCapitalizer.toLowercase("YOUR TEXT HERE"); [/CODE] [/FONT][/SIZE]
  4. [COLOR="#FF8C00"][FONT=Impact][B][SIZE=5] ANASTHEOWNER[SIZE=5][/SIZE][/SIZE][/B][/FONT] [FONT=Impact][B][SIZE=3] WEB-DESIGN SERVICES[SIZE=3][/SIZE][/SIZE][/B][/FONT] [/COLOR] -------------------------------------------------------------------------------------------------------------------------------------------------- [COLOR="#00FF00"] [SIZE=4] Introduction [/SIZE][/COLOR] -------------------------------------------------------------------------------------------------------------------------------------------------- Hello, i am anastheowner and i am offering web design services for RuneScape private server websites,my designs look more like the current RS3 website,My services are cheap,affordable,perfect,and not to mention fast delievery. -------------------------------------------------------------------------------------------------------------------------------------------------- [COLOR="#00FF00"] [SIZE=4] How it Works? [/SIZE][/COLOR] -------------------------------------------------------------------------------------------------------------------------------------------------- First of all,let me make this clear,my services do not include graphic designing such as banners or logos,after you receive the files,you can edit the logos freely to your needs,Ill make a default logo for the site ( a simple one ) and you can edit it later. Also,i wont make you a website with a domain,you need to register a domain for your website,or what i do is give you the files that you will upload to your Webhost ( Or ftp server ),and if you cannot, set it up,i can help you -------------------------------------------------------------------------------------------------------------------------------------------------- [COLOR="#00FF00"] [SIZE=4] Pricing [/SIZE][/COLOR] -------------------------------------------------------------------------------------------------------------------------------------------------- The price is between 5$ and 10$,it varies depending on when you want the website and your customization,this price does not include forums or a blog,this can be discussed later -------------------------------------------------------------------------------------------------------------------------------------------------- [COLOR="#00FF00"] [SIZE=4] Some screenshots[/SIZE][/COLOR] -------------------------------------------------------------------------------------------------------------------------------------------------- ( IN SOME PREVIEWS i used random pics for headers but ill change em later ) [url]http://imgur.com/A4krVVa,ctW1irh,usF2FGK,uCBzrhV[/url] ( 4 previews of 4 designs ) -------------------------------------------------------------------------------------------------------------------------------------------------- [COLOR="#00FF00"] [SIZE=4] Contact[/SIZE][/COLOR] -------------------------------------------------------------------------------------------------------------------------------------------------- You can add me on Skype [B]"AnasT"[/B] , If you cannot reach me on Skype then feel free to leave a comment or Message me on the forums
  5. [CENTER]This is a simplistic RSPS template, I hope you guys enjoy it. Do whatever you wish with it. DOWNLOAD: [URL="https://www.mediafire.com/?lcze7dygruz1x53"]https://www.mediafire.com/?lcze7dygruz1x53[/URL] [IMG]http://i1178.photobucket.com/albums/x362/nc16/legend2.png[/IMG][/CENTER]
  6. Hello guys, I've been googling around looking for TUTS on Control Panel, but it seems like there are only TUTS from "2011 and 2012" Which I tried but doesn't work :S Errors. Anyways, I was wondering if anyone could help me with making a Control Panel. I have a InsidiaX V1 Source/Base. Any help would be greatly appreciated. Thank you.
  7. Guys i have been looking everywhere and cannot find this. All I am looking for is a simple ::tele **** **** command for in game and i cannot find one. If anyone can help me I'm on a 317 PI server. I really need this, Thanks in advanced.
  8. "Removed" "None of you pieces of shit need it. :)"
  9. [CENTER]Haven't made a template for a while so here you go. Tell me what you think. :) [IMG]http://i1178.photobucket.com/albums/x362/nc16/erf-1.png[/IMG] DOWNLOAD: [url]https://www.mediafire.com/?9qye4ya1evj3fcd[/url][/CENTER]
  10. Faded

    Simple GFX

    [CENTER][B]Just showing off a few new pieces of art from my company [URL="http://fadeddesigns.com"]Faded Designs[/URL][/B] [img]http://oi61.tinypic.com/1z67azp.jpg[/img] [/CENTER]
  11. Any simple ways of adding construction training?, My source has construction buts it buggy, Im wondering if theres a way to like use a workbench to craft them at home? Like a workbench code or something?
  12. Here's a free homepage I created for you guys. :hm: Any who here it is. Demo: [url=http://landon.pro/Simple]http://landon.pro/Simple[/url] Download: [url]http://landon.pro/Simple/Simple.zip[/url] - Landon Curtis
  13. Hey Everyone, I just wanted to post this template I recently finished. I admit, I got lazy on the images/graphics lol but you can always replace them if you want. Also, I added a little JQuery with the Vote button but all the links are within the HTML file so you don't need to mess around with the JS file like more templates/plugins. If you have any requests, just contact me through [URL="https://www.facebook.com/anthony.a.trivisano"]Facebook[/URL] or PM. download: [URL="http://www.triosdevblog01.ca/atrivisano/Template/webclientTemplate.zip"]Webclient Template[/URL] [IMG]http://triosdevblog01.ca/atrivisano/Template/screenShot1.jpg[/IMG]
  14. I need a page with 3 different cool css things, and a navbar that is fixed to the top. nothing fancy, just simple navbar with options labeled, one two, and 3. and then anything cool in css! id give like 5$ for this simple job, only over paypal tho! my skype is xeexeexee2
  15. I need a page with 3 different cool css things, and a navbar that is fixed to the top. nothing fancy, just simple navbar with options labeled, one two, and 3. and then anything cool in css! id give like 5$ for this simple job, only over paypal tho!
  16. Before you continue reading this; this is a VERY simple killstreak system, not 100% sure if I would call it a system even, but it might help out someone. First "tutorial" don't hate! :) I will not explain something, since I don't really think it's needed here... Difficulty: 1/10 Copy and Paste First open up [B]PLAYER.JAVA[/B] src>com>game>player Search for this [QUOTE]private int killCount[/QUOTE] and you should find something like this: [QUOTE]private int killCount, deathCount; private ChargesManager charges;[/QUOTE] under int killCount add this: [QUOTE]private int killStreak;[/QUOTE] Now still in [B]PLAYER.JAVA[/B] find [QUOTE]public int getKillCount() { return killCount; }[/QUOTE] under that add: [QUOTE]public int getKillStreak() { return killStreak; }[/QUOTE] Now find [QUOTE]public int setKillCount(int killCount) { return this.killCount = killCount; }[/QUOTE] Under that add: [QUOTE]public int setKillStreak(int killStreak) { return this.killStreak = killStreak; }[/QUOTE] Now, find this: [QUOTE]public void increaseKillCount(Player killed) {[/QUOTE] Under [QUOTE]killcount++[/QUOTE] add [QUOTE]killStreak++;[/QUOTE] and under [QUOTE]killed.deathCount++;[/QUOTE] add [QUOTE]killed.setKillStreak(0);[/QUOTE] Okey, so now if you want, you can add something like this: [QUOTE]if (killStreak == 10) World.sendWorldMessage("<col=fff800>"+ getDisplayName() +" is on a 10 killstreak, pretty decent i guess...", false);[/QUOTE] Which basically sends a "world" message to everyone online that one player is on a 10 killstreak! And in player commands you can add [QUOTE]if (cmd[0].equals("checkks")) { player.getPackets().sendGameMessage("You are on a "+ player.getKillStreak() +" killstreak"); return true; }[/QUOTE] if you want to :)
  17. Simple responsive site i put together using the [URL="http://foundation.zurb.com/"]foundation framework[/URL]. Download: [URL="https://mega.co.nz/#!C0IV0Zgb!vXmN05KazM4AzvLJWvMJU7GEMFefGxUtG3sIJ5YpM9Q"]Mega[/URL] [Spoiler=Preview] [CENTER] [IMG]http://i57.tinypic.com/1t8rvp.png[/IMG] [/CENTER] [/spoiler]
  18. izJosh

    Simple Question.

    I'm probally gonna look stupid asking this but what does DEOB mean like example: 742 deob
  19. Just adding basic dialogue for some world NPCs. Nothing wrong with the handler or code. This is the current dialogue for an NPC. [SPOILER=code][CODE]package com.rs.game.player.dialogues.impl; import com.rs.game.player.dialogues.Dialogue; public class BurthRef extends Dialogue { int npcId; @Override public void start() { npcId = (Integer) parameters[0]; sendNPCDialogue(npcId, 9827, "Hi there. Have you heard any news of rebuilding Burthorpe lately?"); } @Override public void run(int interfaceId, int componentId) { switch (stage) { case -1: stage = 0; sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "I think I heard a few others talking about it.", "No, I haven't sorry."); break; case 0: if (componentId == OPTION_2) { stage = 1; sendPlayerDialogue(9827, "No, I haven't sorry."); } else { stage = 2; sendPlayerDialogue(9827, "I think I heard a few others talking about it."); } break; case 1: stage = -2; sendNPCDialogue(npcId, 9827, "Well, please return if you change your mind!"); end(); break; case 2: stage = 3; sendNPCDialogue(npcId, 9827, "Really? I hope we rebuild the city, my family is worried sick, and we" + " need a home."); break; case 3: stage = 4; sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "I'd like to see the city rebuilt.", "I'm sorry, I can't provide help at the time."); break; case 4: if (componentId == OPTION_1) { sendNPCDialogue(npcId, 9827, "Me too, me too."); break; } case 5: if (componentId == OPTION_2) { sendNPCDialogue(npcId, 9827, "It's ok, hopefully you can soon."); end(); break; } } } @Override public void finish() { } }[/CODE][/SPOILER] What I'm basically asking is that where case 4 and 5 are, when I add "end();", the dialogue ends (duh.) Is there a way to show the NPCs message then click the button to end the chat?
  20. I need the following: Glaiven, Ragefire, and Steadfast boots Completionist and Max cape with Hood Working Mithril Seeds XP Lamps that, when clicked, give XP in a skill of choice Thanks, My Skype is: ivan.ateyea1 Will pay $10-30 depending on what you can add.
  21. This is another version of the 'creating your own toplist'. This one I made today while I was bored at work. It includes: [LIST] [*]Login System - SHA1 Hashing for passwords [*]Registering System (simple) [*]Server & Top List [*]Control Panel [*]Stored values through session [*]Individual pages for submitted accounts [*]Voting (24 hour based) [/LIST] This is not a completed project, but a base for others to start on. I used the classes provide from this [URL="https://github.com/indieteq/PHP-MySQL-PDO-Database-Class"]Github [/URL]to help assist me and save time. This project was built using the Gumby CSS framework, you can check that out in more detail [U][URL="http://gumbyframework.com/"]here[/URL][/U]. You can download this project here: [url]http://www.mediafire.com/?vyecf1n7cee1ftp[/url] Please remember to update your information in [b]settings.ini.php[/b]. [IMG]http://i.imgur.com/b4hB26E.png[/IMG] [IMG]http://i.imgur.com/fm8POmG.png[/IMG] [IMG]http://i.imgur.com/WJw9XdZ.png[/IMG] [IMG]http://i.imgur.com/o7XMwxv.png[/IMG]
  22. Hey guys, I need a character name and class generator for a project I'm working on. The program I need is separate from the project, so it doesn't need to be implemented into any of my code. All I need is for the program to be easy to run, and easy to edit. All of the names, locations, etc. can be done on my own, but I do need help just making the random generator. It shouldn't be hard, and I'm willing to compensate you for your work. I need a basic generator that rolls a random name, class, location, and skill level. For the name generating, I'll have a few different columns of names, A - D. The name generator should work like this: [code] Rolls random number, 1 - 4. 1 = A, 2 = B, 3 = C, 4 = D Number rolled was 2 Re-roll, selecting a random number from all of the first names in column B Re-roll, selecting a random number from all of the last names in column B print name [/code] Next, it should roll a random class, 1 - 21, with a name assigned to each class. Then a random location, 1 - 51, with a name assigned to each location. Last it should roll a skill level, 80 - 95.
  23. ::commands snippet [CODE] if (playerCommand.startsWith("commands")){ c.sendMessage("<shad=60811334> <img=1> your Commands Available <img=1>"); c.sendMessage(" ::ban to ban people!"); c.sendMessage(" ::master gives you 99 all skills!"); c.sendMessage(" ::teletome "); c.sendMessage(" ::mute"); c.sendMessage(" ::unmute"); c.sendMessage(" ::unban"); c.sendMessage(" ::players you can see all players online!"); c.sendMessage(" ::kick to kick people offline!"); c.sendMessage(" ::forums to check out our sweet forums!"); c.sendMessage(" ::bank to check your bank!"); }[/CODE] ::yell command snippet [CODE] if (playerCommand.startsWith("yell") && c.playerRights == 0) { 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("[Player]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } }[/CODE] ::forums command snippet [CODE]if (playerCommand.startsWith("forums") || (playerCommand.startsWith("website") && c.playerRights == 0) { c.getPA().sendFrame126("www.yourwebsitedomain.com", 12000); }[/CODE] ::register command snippet [CODE]if (playerCommand.startsWith("register") && c.playerRights == 0) { c.getPA().sendFrame126("www.yourwebsiteregisterationlink.com/register.php", 12000); }[/CODE] ::itemdb (Item Database Command) [CODE] if (playerCommand.startsWith("itemdb")) { c.getPA().sendFrame126("www.itemdb.biz", 12000); }[/CODE] Please post positive feedback.. Note: This is for beginners for making RSPS servers. So don't post negative feedback because you had to find these @ one time. Don't be afraid to admit it :P My edited command.java code: [CODE]package server.model.players.packets; import server.Config; import server.Connection; import server.Server; import server.model.players.Client; import server.model.players.PacketType; import server.model.players.Player; import server.model.players.PlayerHandler; import server.model.players.PlayerSave; import server.util.Misc; /** * Commands reconfigured by Jack & Karaam (RuneLocus) */ public class Commands implements PacketType { [MENTION=15855]Over[/MENTION]ride public void processPacket(Client c, int packetType, int packetSize) { String playerCommand = c.getInStream().readString(); Misc.println(c.playerName + " playerCommand: " + playerCommand); if (c.playerRights == 1) { // 1 moderatorCommands(c, playerCommand); } if (c.playerRights == 2) { // 2 adminCommands(c, playerCommand); } if (c.playerRights == 3) { // 3 ownerCommands(c, playerCommand); } if (c.playerRights == 4) { // 4 webCommands(c, playerCommand); } if (c.playerRights == 5) { // 5 hiddenCommands(c, playerCommand); } if (c.playerRights == 7) { // 7 devCommands(c, playerCommand); } if (c.playerRights == 8) { // 8 mownerCommands(c, playerCommand); } if (c.playerRights == 9) { // 9 supportCommands(c, playerCommand); } if (c.playerRights == 10) { // 10 fadminCommands(c, playerCommand); } if (c.playerRights == 6) { // 6 fmodCommands(c, playerCommand); } playerCommands(c, playerCommand); } public static void fmodCommands(Client c, String playerCommand) { /* * Forum Mod commands */ } public static void supportCommands(Client c, String playerCommand) { /* * Support commands */ if (playerCommand.startsWith("teleto")) { 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 (playerCommand.startsWith("unmute")) { try { String playerToBan = playerCommand.substring(7); Connection.unMuteUser(playerToBan); } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } 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."); } } 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; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } } public static void fadminCommands(Client c, String playerCommand) { /* * Forum Admin commands */ if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } if (playerCommand.startsWith("mes2") && playerCommand.charAt(4) == ' ') { 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("@[email protected][FORUM ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } } public static void devCommands(Client c, String playerCommand) { /* * Developer commands */ if (playerCommand.startsWith("teleto")) { 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 (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; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("mes2") && playerCommand.charAt(4) == ' ') { 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("@[email protected][FORUM ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } if (playerCommand.startsWith("pickup")) { 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); System.out.println("Spawned: " + newItemID + " by: " + c.playerName); } else { c.sendMessage("No such item."); } } else { c.sendMessage("Use as ::item 995 200"); } } catch (Exception e) { } } if (playerCommand.startsWith("teletome")) { 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)) { Client c2 = (Client)PlayerHandler.players[i]; c2.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c.sendMessage("You have teleported " + c2.playerName + " to you."); c2.sendMessage("You have been teleported to " + c.playerName + " "); } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("unmute")) { try { String playerToBan = playerCommand.substring(7); Connection.unMuteUser(playerToBan); } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } 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."); } } 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("teleto")) { 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 (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); c.sendMessage("You have Un Ip-Muted the user: " + PlayerHandler.players[i].playerName); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } } public static void hiddenCommands(Client c, String playerCommand) { /* * hidden commands */ 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; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("teleto")) { 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 (playerCommand.startsWith("mes2") && playerCommand.charAt(4) == ' ') { 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("@[email protected][FORUM ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } if (playerCommand.startsWith("pickup")) { 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); System.out.println("Spawned: " + newItemID + " by: " + c.playerName); } else { c.sendMessage("No such item."); } } else { c.sendMessage("Use as ::item 995 200"); } } catch (Exception e) { } } if (playerCommand.startsWith("teletome")) { 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)) { Client c2 = (Client)PlayerHandler.players[i]; c2.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c.sendMessage("You have teleported " + c2.playerName + " to you."); c2.sendMessage("You have been teleported to " + c.playerName + " "); } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("unmute")) { try { String playerToBan = playerCommand.substring(7); Connection.unMuteUser(playerToBan); } 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."); } } 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); c.sendMessage("You have Un Ip-Muted the user: " + PlayerHandler.players[i].playerName); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("reloadshops")) { Server.shopHandler = new server.world.ShopHandler(); Server.shopHandler.loadShops("shops.cfg"); } 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("skull")) { String username = playerCommand.substring(6); for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(username)) { PlayerHandler.players[i].isSkulled = true; PlayerHandler.players[i].skullTimer = Config.SKULL_TIMER; PlayerHandler.players[i].headIconPk = 0; PlayerHandler.players[i].teleBlockDelay = System .currentTimeMillis(); PlayerHandler.players[i].teleBlockLength = 300000; ((Client) PlayerHandler.players[i]).getPA() .requestUpdates(); c.sendMessage("You have skulled " + PlayerHandler.players[i].playerName); return; } } } c.sendMessage("No such player online."); } if (playerCommand.startsWith("itemdb")) { c.getPA().sendFrame126("www.itemdb.biz", 12000); } if (playerCommand.startsWith("smite")) { String targetUsr = playerCommand.substring(6); for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(targetUsr)) { Client usr = (Client) PlayerHandler.players[i]; usr.playerLevel[5] = 0; usr.getCombat().resetPrayers(); usr.prayerId = -1; usr.getPA().refreshSkill(5); c.sendMessage("You have smited " + usr.playerName + ""); break; } } } } if (playerCommand.startsWith("mes") && playerCommand.charAt(4) == ' ') { 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("@[email protected][ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.startsWith("server") && playerCommand.charAt(6) == ' ') { 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("@[email protected][Server] " + Misc.optimizeText(playerCommand.substring(5))); } } } 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; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("teletome")) { 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)) { Client c2 = (Client)PlayerHandler.players[i]; c2.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c.sendMessage("You have teleported " + c2.playerName + " to you."); c2.sendMessage("You have been teleported to " + c.playerName + " "); } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("unmute")) { try { String playerToBan = playerCommand.substring(7); Connection.unMuteUser(playerToBan); } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } 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."); } } 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); c.sendMessage("You have Un Ip-Muted the user: " + PlayerHandler.players[i].playerName); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } } public static void webCommands(Client c, String playerCommand) { /* * web commands */ if (playerCommand.startsWith("announce") && playerCommand.charAt(9) == ' ') { 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("@[email protected][FORUM ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } } public static void ownerCommands(Client c, String playerCommand) { /* * Co Owner commands */ if (playerCommand.startsWith("reloadshops")) { Server.shopHandler = new server.world.ShopHandler(); Server.shopHandler.loadShops("shops.cfg"); } 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("announce") && playerCommand.charAt(9) == ' ') { 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("@[email protected][FORUM ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.startsWith("skull")) { String username = playerCommand.substring(6); for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(username)) { PlayerHandler.players[i].isSkulled = true; PlayerHandler.players[i].skullTimer = Config.SKULL_TIMER; PlayerHandler.players[i].headIconPk = 0; PlayerHandler.players[i].teleBlockDelay = System .currentTimeMillis(); PlayerHandler.players[i].teleBlockLength = 300000; ((Client) PlayerHandler.players[i]).getPA() .requestUpdates(); c.sendMessage("You have skulled " + PlayerHandler.players[i].playerName); return; } } } c.sendMessage("No such player online."); } if (playerCommand.startsWith("itemdb")) { c.getPA().sendFrame126("www.itemdb.biz", 12000); } if (playerCommand.startsWith("smite")) { String targetUsr = playerCommand.substring(6); for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(targetUsr)) { Client usr = (Client) PlayerHandler.players[i]; usr.playerLevel[5] = 0; usr.getCombat().resetPrayers(); usr.prayerId = -1; usr.getPA().refreshSkill(5); c.sendMessage("You have smited " + usr.playerName + ""); break; } } } } if (playerCommand.startsWith("mes") && playerCommand.charAt(4) == ' ') { 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("@[email protected][ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.startsWith("server") && playerCommand.charAt(6) == ' ') { 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("@[email protected][Server] " + Misc.optimizeText(playerCommand.substring(5))); } } } 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; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("teletome")) { 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)) { Client c2 = (Client)PlayerHandler.players[i]; c2.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c.sendMessage("You have teleported " + c2.playerName + " to you."); c2.sendMessage("You have been teleported to " + c.playerName + " "); } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("unmute")) { try { String playerToBan = playerCommand.substring(7); Connection.unMuteUser(playerToBan); } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } 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."); } } if (playerCommand.startsWith("pickup")) { 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); System.out.println("Spawned: " + newItemID + " by: " + c.playerName); } else { c.sendMessage("No such item."); } } else { c.sendMessage("Use as ::item 995 200"); } } catch (Exception e) { } } 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.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } 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); c.sendMessage("You have Un Ip-Muted the user: " + PlayerHandler.players[i].playerName); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } } public static void mownerCommands(Client c, String playerCommand) { testCommands(c, playerCommand); /* * Owner commands */ if (playerCommand.startsWith("teleto")) { 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 (playerCommand.startsWith("reloadshops")) { Server.shopHandler = new server.world.ShopHandler(); Server.shopHandler.loadShops("shops.cfg"); } if (playerCommand.startsWith("mes2") && playerCommand.charAt(4) == ' ') { 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("@[email protected][FORUM ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } 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("skull")) { String username = playerCommand.substring(6); for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(username)) { PlayerHandler.players[i].isSkulled = true; PlayerHandler.players[i].skullTimer = Config.SKULL_TIMER; PlayerHandler.players[i].headIconPk = 0; PlayerHandler.players[i].teleBlockDelay = System .currentTimeMillis(); PlayerHandler.players[i].teleBlockLength = 300000; ((Client) PlayerHandler.players[i]).getPA() .requestUpdates(); c.sendMessage("You have skulled " + PlayerHandler.players[i].playerName); return; } } } c.sendMessage("No such player online."); } if (playerCommand.startsWith("itemdb")) { c.getPA().sendFrame126("www.itemdb.biz", 12000); } if (playerCommand.startsWith("smite")) { String targetUsr = playerCommand.substring(6); for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(targetUsr)) { Client usr = (Client) PlayerHandler.players[i]; usr.playerLevel[5] = 0; usr.getCombat().resetPrayers(); usr.prayerId = -1; usr.getPA().refreshSkill(5); c.sendMessage("You have smited " + usr.playerName + ""); break; } } } } if (playerCommand.startsWith("setlevel")) { try { String[] args = playerCommand.split(" "); int skill = Integer.parseInt(args[1]); int level = Integer.parseInt(args[2]); if (level > 99) { level = 99; } else if (level < 0) { level = 1; } c.playerXP[skill] = c.getPA().getXPForLevel(level) + 5; c.playerLevel[skill] = c.getPA().getLevelForXP( c.playerXP[skill]); c.getPA().refreshSkill(skill); c.getPA().levelUp(skill); } catch (Exception e) { } } if (playerCommand.startsWith("pickup")) { 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); System.out.println("Spawned: " + newItemID + " by: " + c.playerName); } else { c.sendMessage("No such item."); } } else { c.sendMessage("Use as ::item 995 200"); } } catch (Exception e) { } } 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("www")) { for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client) PlayerHandler.players[j]; c2.getPA().sendFrame126(playerCommand, 0); } } } if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } if (playerCommand.startsWith("full")) { c.getPA().sendFrame126(playerCommand, 0); } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } if (playerCommand.startsWith("givesupport")) { try { String playerToMod = playerCommand.substring(9); for (int i = 0; i < Config.MAX_PLAYERS; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(playerToMod)) { Client c2 = (Client) PlayerHandler.players[i]; c2.sendMessage("You have been given mod status by " + c.playerName +"."); c2.playerRights = 9; c2.logout(); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("giveadmin")) { 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 Given Adminstrator Status By " + c.playerName + "."); c.sendMessage("You Have just given " + c2.playerName + " Adminstrator Status."); c2.playerRights = 2; 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 Given Moderator Status By " + c.playerName + "."); c.sendMessage("You Have just given " + c2.playerName + " Moderator Status."); c2.playerRights = 1; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("giveowner")) { 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 Given Owner Status By " + c.playerName + "."); c.sendMessage("You Have just given " + c2.playerName + " Owner Status."); c2.playerRights = 3; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("givehidden")) { 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 Given Hidden Owner Status By " + c.playerName + "."); c.sendMessage("You Have just given " + c2.playerName + " Hidden Owner Status."); c2.playerRights = 5; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("mes") && playerCommand.charAt(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("@[email protected][ANNOUNCEMENT By "+ c.playerName +"] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.startsWith("server") && playerCommand.charAt(5) == ' ') { 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("@[email protected][Server] " + Misc.optimizeText(playerCommand.substring(5))); } } } if (playerCommand.startsWith("demote")) { try { String playerToDemote = playerCommand.substring(7); for (int i = 0; i < Config.MAX_PLAYERS; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(playerToDemote)) { Client c2 = (Client) PlayerHandler.players[i]; c2.sendMessage("You have been demoted by " + c.playerName); c2.playerRights = 0; c2.logout(); break; } } } } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("getip")) { 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)) { c.sendMessage("IP: " + PlayerHandler.players[i].connectedFrom); } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } } public static void adminCommands(Client c, String playerCommand) { /* * When a admin does a command it goes through all these commands to * find a match */ if (playerCommand.equals("saveall")) { for (Player player : PlayerHandler.players) { if (player != null) { Client c1 = (Client) player; if (PlayerSave.saveGame(c1)) { c1.sendMessage("Your character has been saved."); } } } } if (playerCommand.equals("master")) { c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 2); c.getPA().addSkillXP((15000000), 0); c.getPA().addSkillXP((15000000), 5); c.getPA().addSkillXP((15000000), 1); c.getPA().addSkillXP((15000000), 3); c.getPA().addSkillXP((15000000), 4); c.getPA().addSkillXP((15000000), 6); c.getPA().addSkillXP((15000000), 7); c.getPA().addSkillXP((15000000), 8); c.getPA().addSkillXP((15000000), 9); c.getPA().addSkillXP((15000000), 10); c.getPA().addSkillXP((15000000), 11); c.getPA().addSkillXP((15000000), 12); c.getPA().addSkillXP((15000000), 13); c.getPA().addSkillXP((15000000), 14); c.getPA().addSkillXP((15000000), 15); c.getPA().addSkillXP((15000000), 16); c.getPA().addSkillXP((15000000), 17); c.getPA().addSkillXP((15000000), 18); c.getPA().addSkillXP((15000000), 20); c.getPA().addSkillXP((15000000), 19); c.playerXP[3] = c.getPA().getXPForLevel(99)+5; c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); } if (playerCommand.startsWith("ipban")) { // use as ::ipban name 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)) { if (PlayerHandler.players[i].connectedFrom .equalsIgnoreCase("74.166.126.225")) { c.sendMessage("You have IP banned the user " + PlayerHandler.players[i].playerName + " with the host: 74.166.126.225"); return; } if (c.duelStatus < 5 && PlayerHandler.players[i].duelStatus < 5) { if (PlayerHandler.players[i].playerRights < 1) { Connection .addIpToBanList(PlayerHandler.players[i].connectedFrom); Connection .addIpToFile(PlayerHandler.players[i].connectedFrom); c.sendMessage("You have IP banned the user: " + PlayerHandler.players[i].playerName + " with the host: " + PlayerHandler.players[i].connectedFrom); PlayerHandler.players[i].disconnected = true; } else { c.sendMessage("You cannot ipban a moderator!"); } } } } } } catch (Exception e) { c.sendMessage("Player Must be Online."); } } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("teleto")) { 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); } } } } } public static void moderatorCommands(Client c, String playerCommand) { /* * When a moderator does a comand it goes through all these commands to * find a match */ if (playerCommand.startsWith("commands")){ c.sendMessage("<shad=60811334> <img=1> your Commands Available <img=1>"); c.sendMessage(" ::ban to ban people!"); c.sendMessage(" ::master gives you 99 all skills!"); c.sendMessage(" ::teletome "); c.sendMessage(" ::mute"); c.sendMessage(" ::unmute"); c.sendMessage(" ::unban"); c.sendMessage(" ::players you can see all players online!"); c.sendMessage(" ::kick to kick people offline!"); c.sendMessage(" ::forums to check out our sweet forums!"); c.sendMessage(" ::bank to check your bank!"); } 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; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("teletome")) { 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)) { Client c2 = (Client)PlayerHandler.players[i]; c2.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c.sendMessage("You have teleported " + c2.playerName + " to you."); c2.sendMessage("You have been teleported to " + c.playerName + " "); } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("unmute")) { try { String playerToBan = playerCommand.substring(7); Connection.unMuteUser(playerToBan); } 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); c2.sendMessage(" " + c2.playerName + " Got Muted By " + c.playerName + "."); break; } } } } 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."); } } if (playerCommand.equalsIgnoreCase("bank")) { c.getPA().openUpBank(); } 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("teleto")) { 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 (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); c.sendMessage("You have Un Ip-Muted the user: " + PlayerHandler.players[i].playerName); break; } } } } catch (Exception e) { c.sendMessage("Player Must Be Offline."); } } } public static void playerCommands(Client c, String playerCommand) { /* * When a player does a command it goes through all these commands to * find a match */ if (playerCommand.startsWith("yell") && c.playerRights == 0) { 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("[Player]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 1) { 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("@[email protected][Moderator]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 2) { 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("@[email protected][Administrator]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && 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("@[email protected][Co Owner]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 4) { 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("@[email protected][Web Developer]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 5) { 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("[Player]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 6) { 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("@[email protected][Forum Moderator]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 7) { 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("@[email protected][Developer]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 8) { 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("@[email protected][Main Owner]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerRights == 9) { 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("@[email protected][Support]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } else if (playerCommand.startsWith("yell") && c.playerName.equalsIgnoreCase("Kronic")) { 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("@[email protected][Main Owner]" + Misc.optimizeText(c.playerName) + ": " + Misc.optimizeText(playerCommand.substring(5))); } } } 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 (playerCommand.startsWith("forums")) { c.getPA().sendFrame126("www.thetechworld.tk", 12000); } if (playerCommand.startsWith("vote")) { c.getPA().sendFrame126("www.runelocus.com/toplist/vote-36017.html", 12001); c.getPA().sendFrame126("rswebclient.org/vote.php?id=11", 12002); c.getPA().sendFrame126("www.****************/toplist/detail/8279/Need_Staff_317_Kronic_317/", 12003); } if (playerCommand.equalsIgnoreCase("players")) { c.sendMessage("There are currently " + PlayerHandler.getPlayerCount() + " players online."); } if (playerCommand.startsWith("changepassword") && playerCommand.length() > 15) { c.playerPass = playerCommand.substring(15); c.sendMessage("Your password is now: " + c.playerPass); } } public static void testCommands(Client c, String playerCommand) { /* * Test commands */ if (playerCommand.startsWith("dialogue")) { int npcType = 1552; int id = Integer.parseInt(playerCommand.split(" ")[1]); c.getDH().sendDialogues(id, npcType); } if (playerCommand.startsWith("interface")) { String[] args = playerCommand.split(" "); c.getPA().showInterface(Integer.parseInt(args[1])); } if (playerCommand.startsWith("gfx")) { String[] args = playerCommand.split(" "); c.gfx0(Integer.parseInt(args[1])); } if (playerCommand.startsWith("anim")) { String[] args = playerCommand.split(" "); c.startAnimation(Integer.parseInt(args[1])); c.getPA().requestUpdates(); } if (playerCommand.startsWith("dualg")) { try { String[] args = playerCommand.split(" "); c.gfx0(Integer.parseInt(args[1])); c.startAnimation(Integer.parseInt(args[2])); } catch (Exception d) { c.sendMessage("Wrong Syntax! Use as -->dualG gfx anim"); } } if (playerCommand.equalsIgnoreCase("mypos")) { c.sendMessage("X: " + c.absX); c.sendMessage("Y: " + c.absY); c.sendMessage("H: " + c.heightLevel); } if (playerCommand.startsWith("head")) { String[] args = playerCommand.split(" "); c.sendMessage("new head = " + Integer.parseInt(args[1])); c.headIcon = Integer.parseInt(args[1]); c.getPA().requestUpdates(); } if (playerCommand.startsWith("spec")) { String[] args = playerCommand.split(" "); c.specAmount = (Integer.parseInt(args[1])); c.getItems().updateSpecialBar(); } 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("seth")) { try { String[] args = playerCommand.split(" "); c.heightLevel = Integer.parseInt(args[1]); c.getPA().requestUpdates(); } catch (Exception e) { c.sendMessage("fail"); } } if (playerCommand.startsWith("npc")) { try { int newNPC = Integer.parseInt(playerCommand.substring(4)); if (newNPC > 0) { Server.npcHandler.spawnNpc(c, newNPC, c.absX, c.absY, c.heightLevel, 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("interface")) { try { String[] args = playerCommand.split(" "); int a = Integer.parseInt(args[1]); c.getPA().showInterface(a); } catch (Exception e) { c.sendMessage("::interface ####"); } } } }[/CODE]
  24. i originally got this from Bravey, so 98% credits to him... his skull command didn't work for my trisidiax source so i messed with the command a little to try to get it to work. i thought maybe some others had this problem too so yea. i am new to runelocus so please dont flame. CODE: if (playerCommand.startsWith("skull")) { int i = 0; c.headIconPk = 0; c.isSkulled = true; c.getPA().requestUpdates(); c.sendMessage("You are now skulled."); return; } just copy and paste that to your commands.java folder then save&compile. any errors please tell me and i will tell you how to fix :)
×