Page 1 of 2

resuse

Posted: Mon Nov 02, 2009 4:57 pm
by remla
admin command to reset skill's reuse time? im ask for this guys :)

Re: resuse

Posted: Mon Nov 02, 2009 8:22 pm
by iamcypher
Hello,
If you want to reuse your skills in a abnormal way change their cooltime in the xml files.

Cheers,
iamcypher.

Re: resuse

Posted: Mon Nov 02, 2009 9:31 pm
by remla
admin command to reset skill's reuse time? WITH ADMIN COMMAND

Re: resuse

Posted: Mon Nov 02, 2009 11:39 pm
by Charus
Edit the reuseTime for that skills at xml files.

Re: resuse

Posted: Tue Nov 03, 2009 1:07 am
by Copyleft
what about an admin command to reset skill's reuse time? quite useful I think

Re: resuse

Posted: Tue Nov 03, 2009 1:07 pm
by iamcypher
Hello,
I do consider this not useful since if you need to test a custom skill you just change it`s reuse time. Why would a admin need to reuse skills i mean, he doesn`t even need skills lol...

iamcypher.

Re: resuse

Posted: Tue Nov 03, 2009 1:34 pm
by Charus
remla wrote:admin command to reset skill's reuse time? im ask for this guys :)
Create the command by useing this method.

Code: Select all

 player.enableSkill([b]skillId[/b]); 
skillId should be the id of the skill that you need to reset.

Re: resuse

Posted: Tue Nov 03, 2009 8:15 pm
by remla
iamcypher for event. Players skill with admin command..

Re: resuse

Posted: Tue Nov 03, 2009 9:07 pm
by janiii
you can check the code which is used for olympiad.

in OlympiadGame.removals():

Code: Select all

// enable skills with cool time <= 15 minutesfor (L2Skill skill : player.getAllSkills())	if (skill.getReuseDelay() <= 900000)		player.enableSkill(skill.getId());

Re: resuse

Posted: Fri Nov 06, 2009 8:30 pm
by iamcypher
Hello,
I made this code:

removed code until further notice ( not working yet)

Not much but it does the trick,

Thanks janiii,
iamcypher.

Re: resuse

Posted: Fri Nov 06, 2009 8:52 pm
by Probe
sorry but why the hell do you want players to be able to reset their reuse time ? :P
why not make it an admin command?

Re: resuse

Posted: Fri Nov 06, 2009 9:02 pm
by iamcypher
Hello,
This command is used for testing purpoces. Players can`t use what they don`t know.

iamcypher.

Edit: Reading code:

Code: Select all

Index: E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/voicedcommandhandlers/reuse.java===================================================================--- E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/voicedcommandhandlers/reuse.java	(revision 0)+++ E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/voicedcommandhandlers/reuse.java	(revision 0)@@ -0,0 +1,53 @@+/*+ * 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 handlers.voicedcommandhandlers;++import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;+import net.sf.l2j.gameserver.model.L2Skill;+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;+import net.sf.l2j.gameserver.network.serverpackets.SkillCoolTime;++/**+ * This class resets the cooltime of all skills.+ *+ * @author Cypher+ */++public class reuse implements IVoicedCommandHandler+{+	private static final String[] _voicedCommands =+	{+		"reuse"+	};+	+	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)+	{+		if (command.equalsIgnoreCase("reuse"))+		{+			for (L2Skill skill : activeChar.getAllSkills())+				activeChar.enableSkill(skill.getId());+			activeChar.sendSkillList();+			activeChar.sendPacket(new SkillCoolTime(activeChar));+			activeChar.sendMessage("Skills cooltime removed!");+		}+		return true;+	}++	public String[] getVoicedCommandList()+	{+		return _voicedCommands;+	}+}\ No newline at end of fileIndex: E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/MasterHandler.java===================================================================--- E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/MasterHandler.java	(revision 6775)+++ E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/MasterHandler.java	(working copy)@@ -221,6 +221,7 @@ 	private static void loadVoicedHandlers() 	{ 		VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new stats());+		VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new reuse()); 		if (Config.L2JMOD_ALLOW_WEDDING) 			VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Wedding()); 		if (Config.BANKING_SYSTEM_ENABLED)\ No newline at end of file

Re: resuse

Posted: Sun Feb 21, 2010 11:08 am
by airyina
iamcypher wrote:Hello,
This command is used for testing purpoces. Players can`t use what they don`t know.

iamcypher.

Edit: Reading code:

Code: Select all

Index: E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/voicedcommandhandlers/reuse.java===================================================================--- E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/voicedcommandhandlers/reuse.java	(revision 0)+++ E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/voicedcommandhandlers/reuse.java	(revision 0)@@ -0,0 +1,53 @@+/*+ * 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 handlers.voicedcommandhandlers;++import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;+import net.sf.l2j.gameserver.model.L2Skill;+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;+import net.sf.l2j.gameserver.network.serverpackets.SkillCoolTime;++/**+ * This class resets the cooltime of all skills.+ *+ * @author Cypher+ */++public class reuse implements IVoicedCommandHandler+{+	private static final String[] _voicedCommands =+	{+		"reuse"+	};+	+	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)+	{+		if (command.equalsIgnoreCase("reuse"))+		{+			for (L2Skill skill : activeChar.getAllSkills())+				activeChar.enableSkill(skill.getId());+			activeChar.sendSkillList();+			activeChar.sendPacket(new SkillCoolTime(activeChar));+			activeChar.sendMessage("Skills cooltime removed!");+		}+		return true;+	}++	public String[] getVoicedCommandList()+	{+		return _voicedCommands;+	}+}\ No newline at end of fileIndex: E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/MasterHandler.java===================================================================--- E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/MasterHandler.java	(revision 6775)+++ E:/Projects/L2/Coding/eclipse/work/Clean Datapack/trunk/datapack_development/data/scripts/handlers/MasterHandler.java	(working copy)@@ -221,6 +221,7 @@ 	private static void loadVoicedHandlers() 	{ 		VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new stats());+		VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new reuse()); 		if (Config.L2JMOD_ALLOW_WEDDING) 			VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Wedding()); 		if (Config.BANKING_SYSTEM_ENABLED)\ No newline at end of file
Why wouldn't you make this an admin command? As you have it set up any player could use it.

Re: resuse

Posted: Tue May 01, 2012 1:00 pm
by DemICE
u sure u tested it on ur server?

Image

Re: resuse

Posted: Tue May 01, 2012 5:30 pm
by MELERIX
lol guys.

there is already a command for that, just use //removereuse on selected target, thats all.