Jump to content

madmonkey

Member
  • Content count

    105
  • Joined

  • Last visited

About madmonkey

  • Rank
    Steel Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. madmonkey

    can't attack npc.

    hey i am using a pretty good base to start with but i did notice that i can't attack 1npc, yes this npc is "Torag the Corrupted". now i know some basics of how it's passble. Note: other barrow brothers are attackable. I am did try to find a problem in this but i can't find it. this is what i have, barrows.java [CODE]// object,npc,HP,MAXHIT,ATTACK,DEFENCE,X,Y,TYPE, AHRIM(6821,2025, 1050, 20, 175, 175, 3556, 9701, 0), DHAROK(6771, 2026, 1000, 24, 200, 200, 3554, 9716, 1), GUTHAN(6773, 2027, 1000,24, 275, 200, 3538, 9702, 2), KARIL(6822, 2028,1050, 20, 175, 175, 3549, 9683, 3), TORAG(6772, 2029, 1000, 23, 275, 200, 3568, 9686, 4), VERAC(6823, 2030, 1000, 24, 275,200, 3575, 9706, 5);[/CODE] npcanims.xml [CODE]<npcDefinition> <id>2028</id> <name>karil the tainted</name> <examine>Run away!</examine> <respawn>10</respawn> <combat>98</combat> <hitpoints>100</hitpoints> <maxHit>21</maxHit> <attackSpeed>5</attackSpeed> <attackAnim>2075</attackAnim> <defenceAnim>-1</defenceAnim> <deathAnim>-1</deathAnim> </npcDefinition> <npcDefinition> <id>2029</id> <name>torag the corrupted</name> <examine>Run away!</examine> <respawn>10</respawn> <combat>115</combat> <hitpoints>100</hitpoints> <maxHit>23</maxHit> <attackSpeed>5</attackSpeed> <attackAnim>2068</attackAnim> <defenceAnim>-1</defenceAnim> <deathAnim>-1</deathAnim> </npcDefinition> <npcDefinition> <id>2030</id> <name>verac the defiled</name> <examine>Run away!</examine> <respawn>10</respawn> <combat>115</combat> <hitpoints>100</hitpoints> <maxHit>24</maxHit> <attackSpeed>5</attackSpeed> <attackAnim>2062</attackAnim> <defenceAnim>2063</defenceAnim> <deathAnim>-1</deathAnim>[/CODE] npc.cfg [CODE] npc = 2025 Ahrim_the_Blighted 98 100 npc = 2026 Dharok_the_Wretched 115 100 npc = 2027 Guthan_the_Infested 115 100 npc = 2028 Karil_the_Tainted 98 100 npc = 2029 Torag_the_Corrupted 115 100 npc = 2030 Verac_the_Defiled 115 100[/CODE] there is not 1 of them in spawnconfig since that is getting done in barrows.java. if someone could help me out shall be very helpfull since i am have no idea what i am missing :P
  2. yes i am still having that file yes.
  3. becuse of the help from omniex i know for 90% sure that the problem is within the mysql but i dont know how to fix this for someone who helps me out that my server is working, i thank you alot omniex for your help you already did if u can help me more shall be nice. Anyone who can help your welcome to help since i am dont know it anymore, i created a mysql database but it doesn't work somehow.
  4. [quote name='omniex'][code] [18-4-15 18:54]: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Commun ications link failure [18-4-15 18:54]: Caused by: java.net.ConnectException: Connection timed out: con nect [18-4-15 18:54]: at com.mysql.jdbc.StandardSocketFactory.connect(Standard SocketFactory.java:253) [18-4-15 18:54]: at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:290) [18-4-15 18:54]: ... 16 more [18-4-15 18:54]: MySQL Error:DELETE FROM `online` WHERE id = 1; [18-4-15 18:54]: java.lang.NullPointerException [18-4-15 18:54]: at server.util.PlayersOnline.query(PlayersOnline.java:29 ) [/code] what was the last thing you edited on the server? and have you ever ran the server before?[/QUOTE] I did Chance Xp rates from skills that whas last i did. And yes i could log in untill yesterday for about 4months long i had no problems with logging in or out and since today he won't do it anymore.
  5. [CODE][18-4-15 18:53]: Simplicity is now online. [18-4-15 18:54]: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Commun ications link failure The last packet successfully received from the server was 1.429.376.050.122 mill iseconds ago. The last packet sent successfully to the server was 0 millisecond s ago. [18-4-15 18:54]: at sun.reflect.NativeConstructorAccessorImpl.newInstance 0(Native Method) [18-4-15 18:54]: at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62) [18-4-15 18:54]: at sun.reflect.DelegatingConstructorAccessorImpl.newInst ance(DelegatingConstructorAccessorImpl.java:45) [18-4-15 18:54]: at java.lang.reflect.Constructor.newInstance(Constructor .java:408) [18-4-15 18:54]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) [18-4-15 18:54]: at com.mysql.jdbc.SQLError.createCommunicationsException (SQLError.java:1074) [18-4-15 18:54]: at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionI mpl.java:2214) [18-4-15 18:54]: at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.j ava:773) [18-4-15 18:54]: at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection .java:46) [18-4-15 18:54]: at sun.reflect.NativeConstructorAccessorImpl.newInstance 0(Native Method) [18-4-15 18:54]: at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62) [18-4-15 18:54]: at sun.reflect.DelegatingConstructorAccessorImpl.newInst ance(DelegatingConstructorAccessorImpl.java:45) [18-4-15 18:54]: at java.lang.reflect.Constructor.newInstance(Constructor .java:408) [18-4-15 18:54]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) [18-4-15 18:54]: at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionI mpl.java:352) [18-4-15 18:54]: at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegist eringDriver.java:282) [18-4-15 18:54]: at java.sql.DriverManager.getConnection(DriverManager.ja va:664) [18-4-15 18:54]: at java.sql.DriverManager.getConnection(DriverManager.ja va:247) [18-4-15 18:54]: at server.util.PlayersOnline.createCon(PlayersOnline.jav a:17) [18-4-15 18:54]: at server.model.players.Client.initialize(Client.java:61 9) [18-4-15 18:54]: at server.model.players.PlayerHandler.process(PlayerHand ler.java:122) [18-4-15 18:54]: at server.Server.main(Server.java:193) [18-4-15 18:54]: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsExcept ion: Communications link failure The last packet successfully received from the server was 1.429.376.050.122 mill iseconds ago. The last packet sent successfully to the server was 0 millisecond s ago. [18-4-15 18:54]: at sun.reflect.NativeConstructorAccessorImpl.newInstance 0(Native Method) [18-4-15 18:54]: at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62) [18-4-15 18:54]: at sun.reflect.DelegatingConstructorAccessorImpl.newInst ance(DelegatingConstructorAccessorImpl.java:45) [18-4-15 18:54]: at java.lang.reflect.Constructor.newInstance(Constructor .java:408) [18-4-15 18:54]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) [18-4-15 18:54]: at com.mysql.jdbc.SQLError.createCommunicationsException (SQLError.java:1074) [18-4-15 18:54]: at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341) [18-4-15 18:54]: at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionI mpl.java:2137) [18-4-15 18:54]: ... 15 more [18-4-15 18:54]: Caused by: java.net.ConnectException: Connection timed out: con nect [18-4-15 18:54]: at java.net.DualStackPlainSocketImpl.connect0(Native Met hod) [18-4-15 18:54]: at java.net.DualStackPlainSocketImpl.socketConnect(DualS tackPlainSocketImpl.java:79) [18-4-15 18:54]: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPl ainSocketImpl.java:345) [18-4-15 18:54]: at java.net.AbstractPlainSocketImpl.connectToAddress(Abs tractPlainSocketImpl.java:206) [18-4-15 18:54]: at java.net.AbstractPlainSocketImpl.connect(AbstractPlai nSocketImpl.java:188) [18-4-15 18:54]: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java :172) [18-4-15 18:54]: at java.net.SocksSocketImpl.connect(SocksSocketImpl.java :392) [18-4-15 18:54]: at java.net.Socket.connect(Socket.java:589) [18-4-15 18:54]: at java.net.Socket.connect(Socket.java:538) [18-4-15 18:54]: at java.net.Socket.<init>(Socket.java:434) [18-4-15 18:54]: at java.net.Socket.<init>(Socket.java:244) [18-4-15 18:54]: at com.mysql.jdbc.StandardSocketFactory.connect(Standard SocketFactory.java:253) [18-4-15 18:54]: at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:290) [18-4-15 18:54]: ... 16 more [18-4-15 18:54]: MySQL Error:DELETE FROM `online` WHERE id = 1; [18-4-15 18:54]: java.lang.NullPointerException [18-4-15 18:54]: at server.util.PlayersOnline.query(PlayersOnline.java:29 ) [18-4-15 18:54]: at server.util.PlayersOnline.offline(PlayersOnline.java: 50) [18-4-15 18:54]: at server.model.players.Client.initialize(Client.java:62 0) [18-4-15 18:54]: at server.model.players.PlayerHandler.process(PlayerHand ler.java:122) [18-4-15 18:54]: at server.Server.main(Server.java:193) [18-4-15 18:54]: java.lang.NullPointerException [18-4-15 18:54]: at server.util.PlayersOnline.destroyCon(PlayersOnline.ja va:41) [18-4-15 18:54]: at server.model.players.Client.initialize(Client.java:62 1) [18-4-15 18:54]: at server.model.players.PlayerHandler.process(PlayerHand ler.java:122) [18-4-15 18:54]: at server.Server.main(Server.java:193) [18-4-15 18:54]: [REGISTERED]: test [18-4-15 18:54]: [DEREGISTERED]: test[/CODE] this is the error it give's
  6. use "jarmaker" and fellow a guide on youtube it's pretty easy if u did once (9/10 guides) are fine on youtube and easy to understand.
  7. Nope i dont have any from this Sql stuff i used a base that already sql had handeld and never got a problem with it since i am using this one (already 4 month)
  8. I am coding for a some time already and learn most coding by meself and looking on internet about how to do stuff only somehow i now got something and i have no idea how to fix this. I do this all for learning coding java since i am hope to run a server myself someday. No i dont wanna use ide i wanna learn coding this way so i have to correct it all without help from ide. yesterday this diddn't happen but now it does. what i do/did. - running the server (put it online for meself and my co-owner) - running my client.jar (or the run.bat) doesn't matter. - logging on my server. this whas no problem untill today. this happends today. -running server. - running client (did try .jar en .bat) - log on. - holding black screen for about 1min. -auto log off before i can do something. and here is what my server run.bat says. thanks already for evryone that did read this and try to help me out :D [IMG]http://i58.tinypic.com/5dqyw4.png[/IMG]
  9. added: i fixed the errors by using this, [CODE]if (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { if (playerCommand.equalsIgnoreCase("mypos")) { c.sendMessage("X: "+c.absX+" Y: "+c.absY+" H: "+c.heightLevel); } } } if (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { if(playerCommand.startsWith("unpc")) { c.isNpc = false; c.updateRequired = true; c.appearanceUpdateRequired = true; } if (c.playerRights == 3 || c.playerRights == 6) { if (playerCommand.startsWith("infspec")) { c.specAmount = 5000000.0; } if (c.playerRights == 3 || c.playerRights == 6) { if (playerCommand.startsWith("spec")) { c.specAmount = 10.0; } if (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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 (c.playerRights == 3 || c.playerRights == 6) { 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] but now the commands (this commands listed here) won't work... please help..
  10. [quote name='Rog3r']Why did you put a tab? [code]public void ownerCommands(Client c, String playerCommand) {[/code] should do the trick ;)[/QUOTE] thanks for answare but to bad it diddn't do the trick if u have perhaps other idea's i like to hear them since all my commands work, only the "owner" commands won't work
  11. 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]
  12. hello, i am try to make a good server but i found a problem and dont know whare to look, this i found out, combat vs monsters = perfect pvp combat = isn't good i have a chaotic crossbow and it works fine on monsters but when i try to attack my frend in wildy it says "you can't use *** bolts, doesn't matter what bolts i use. also the special attack giving problems in pvp, when attacking monster with spec= 100% good but when attacking another player it does spec +normal hit if someone can tell me what file i need to have and perhaps an idea how to fix shall be nice :D "thanks" for who helps me out :D
  13. still need help please!>
  14. [quote name='malimt']this right here; [CODE] } elsepublic void buyFromShopPrice(int removeId, int removeSlot){ FIX IT AT THE END, PUT A SPACE BETWEEN THE ){ SO IT BECOMES ) { [/CODE] There are too many errors in this, if you want to keep it, you'd have to go through all the files and makes sure that they are correct.[/QUOTE] if that whas the error than no shop shall work, so this not the error still i did try it (who know's) but diddn't work.
×