Boorinio Posted February 2, 2013 Author Share Posted February 2, 2013 i dont know how to do it, can you write all part of the code? here it is /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jhellas.gameserver.handler.admincommandhandlers; import com.l2jhellas.gameserver.handler.IAdminCommandHandler; import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance; import com.l2jhellas.gameserver.model.entity.engines.CastleWars; /** * This class handles following admin commands: - delete = deletes target * * @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/04/11 10:05:56 $ */ public class AdminDelete implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "castlewars" }; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (command.equals("admin_castlewars")) CastleWars.openRegi(); } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.handler.admincommandhandlers; import com.l2jfrozen.gameserver.handler.IAdminCommandHandler; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.event.CastleWars; /** * This class handles following admin commands: - delete = deletes target * * @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/04/11 10:05:56 $ */ public class AdminReg implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "castlewars" }; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (command.equals("admin_castlewars")) CastleWars.openRegi(); return false; } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } i made this and added this " INSERT INTO `admin_command_access_rights` VALUES ('admin_castlewars','3');" to database but in game where is problem... when i wrote //castlewars ir wrotes that " where is no such command" :// Link to comment Share on other sites More sharing options...
Boorinio Posted February 2, 2013 Author Share Posted February 2, 2013 /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.handler.admincommandhandlers; import com.l2jfrozen.gameserver.handler.IAdminCommandHandler; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.event.CastleWars; /** * This class handles following admin commands: - delete = deletes target * * @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/04/11 10:05:56 $ */ public class AdminReg implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "castlewars" }; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (command.equals("admin_castlewars")) CastleWars.openRegi(); return false; } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } i made this and added this " INSERT INTO `admin_command_access_rights` VALUES ('admin_castlewars','3');" to database but in game where is problem... when i wrote //castlewars ir wrotes that " where is no such command" :// don't forget to register the command in admincommanhandler registerAdminCommandHandler(new AdminReg()); Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 i registered, but something is still wrong :// look at script maybe you did some mistakes? Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 and one more question : 1. how i will change script if I from "if (CastleWars.isRunning && (isinCastleWars && pk.isinCastleWars))" will delete " && pk.isinCastleWars" ? Link to comment Share on other sites More sharing options...
Boorinio Posted February 2, 2013 Author Share Posted February 2, 2013 and one more question : 1. how i will change script if I from "if (CastleWars.isRunning && (isinCastleWars && pk.isinCastleWars))" will delete " && pk.isinCastleWars" ? it depends on your project i can tell for sure but if you delete the pk.isinCastleWars the event will still run fine Link to comment Share on other sites More sharing options...
marwan Posted February 2, 2013 Share Posted February 2, 2013 here private static final String[] ADMIN_COMMANDS = { "castlewars" }; should be private static final String[] ADMIN_COMMANDS = { "admin_castlewars" }; Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 here private static final String[] ADMIN_COMMANDS = { "castlewars" }; should be private static final String[] ADMIN_COMMANDS = { "admin_castlewars" }; Ty man :) Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 it depends on your project i can tell for sure but if you delete the pk.isinCastleWars the event will still run fine And ofcourse thanks you, if i will find some mistake i will report you :)) Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 it depends on your project i can tell for sure but if you delete the pk.isinCastleWars the event will still run fine And ofcourse thanks you, if i will find some mistake i will report you :)) Link to comment Share on other sites More sharing options...
iitmtii Posted February 2, 2013 Share Posted February 2, 2013 I have some reports: in event there is no count down...(thats bad) and when i start event my gm char stuck(but i dont know why) :/ Link to comment Share on other sites More sharing options...
`Rοmeο Posted February 3, 2013 Share Posted February 3, 2013 cool share rewarded. Link to comment Share on other sites More sharing options...
NinjaStep Posted February 3, 2013 Share Posted February 3, 2013 Gj mate Link to comment Share on other sites More sharing options...
Boorinio Posted February 3, 2013 Author Share Posted February 3, 2013 I have some reports: in event there is no count down...(thats bad) and when i start event my gm char stuck(but i dont know why) :/ I didn't get the second part as far for the countdown it's easy... cool share rewarded. Thanks one more time Gj mate Thank you dude!!! Link to comment Share on other sites More sharing options...
Dεbian Posted February 3, 2013 Share Posted February 3, 2013 Gz, rewarded. Link to comment Share on other sites More sharing options...
Recommended Posts