Skip to content

[Help] Cancel Code

Featured Replies

Hello,I wanted to ask if any developer can help me to find/write a code.

I want make Cancel skills work only on olympiad games!

Skills: Cancellation - 1056

Steal Divinity - 1440

Touch of Death - 342

 

and if there any skills I forgot..add them too please!!

 

For Freya Client CT2.5

The point of such section isn't to give you code you can apply on your server and "kktygtfo", it's to help ppl writing it.

 

There's an skillhandler for all cancel type skills, begin by that. Write something, and show here if not working.

  • Author

The point of such section isn't to give you code you can apply on your server and "kktygtfo", it's to help ppl writing it.

 

There's an skillhandler for all cancel type skills, begin by that. Write something, and show here if not working.

ok thnx for info :)

and if u can be more specifically..

Gameserver\java\com\l2jserver\gameserver\handler\IskillHandler

or

Gameserver\java\com\l2jserver\gameserver\handler\SkillHandler

 


### Eclipse Workspace Patch 1.0
#P testGameserver
Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java	(revision 5117)
+++ java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java	(working copy)
@@ -445,6 +445,12 @@
                     // cancel
                     if (skill.getId() == 1056)
                     {
+                    	if(!((L2PcInstance) activeChar).isInOlympiadMode())
+                		{
+                			((L2PcInstance) activeChar).sendMessage("You can use this skill in olympiad only");
+                			return;
+                		}
+                    		
                     	int lvlmodifier= 52+skill.getMagicLevel()*2;
                     	if(skill.getMagicLevel()==12) lvlmodifier = (Experience.MAX_LEVEL - 1);
                     	int landrate = 90;

 

this is for 1056 id, now i think you can do the others as well.

  • Author


### Eclipse Workspace Patch 1.0
#P testGameserver
Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java	(revision 5117)
+++ java/net/sf/l2j/gameserver/handler/skillhandlers/Disablers.java	(working copy)
@@ -445,6 +445,12 @@
                     // cancel
                     if (skill.getId() == 1056)
                     {
+                    	if(!((L2PcInstance) activeChar).isInOlympiadMode())
+                		{
+                			((L2PcInstance) activeChar).sendMessage("You can use this skill in olympiad only");
+                			return;
+                		}
+                    		
                     	int lvlmodifier= 52+skill.getMagicLevel()*2;
                     	if(skill.getMagicLevel()==12) lvlmodifier = (Experience.MAX_LEVEL - 1);
                     	int landrate = 90;

 

this is for 1056 id, now i think you can do the others as well.

 

Thnx but sorry I didn't saw I need it for freya client...I do not have "Disablers.java" file on my package...

anyone also has ideas?

Rofl. This sh1t with items/skills restriction while you're at the olympiad already exist!

 


### Eclipse Workspace Patch 1.0
#P stats
Index: skills/00300-00399.xml
===================================================================
--- skills/00300-00399.xml	(revision 8641)
+++ skills/00300-00399.xml	(working copy)
@@ -1193,6 +1193,9 @@
		<enchant1 name="magicLvl" val="#enchantMagicLvl" />
		<enchant1 name="hpConsume" val="#ench1hpConsume" />
		<enchant2 name="magicLvl" val="#enchantMagicLvl" />
+		<cond msgId="1509">
+			<player olympiad="false" />
+		</cond>
		<for>
			<effect name="Debuff" abnormalTime="120" val="0" effectPower="80" effectType="DEBUFF" abnormalLvl="1" abnormalType="touch_of_death">
				<mul order="0x30" stat="maxCp" val="0.1" />
Index: skills/01400-01499.xml
===================================================================
--- skills/01400-01499.xml	(revision 8641)
+++ skills/01400-01499.xml	(working copy)
@@ -1158,6 +1158,9 @@
		<set name="operateType" val="OP_ACTIVE" />
		<set name="castRange" val="600" />
		<set name="effectRange" val="1100" />
+		<cond msgId="1509">
+			<player olympiad="false" />
+		</cond>
	</skill>
	<skill id="1441" levels="3" name="Soul to Empower">
		<!-- CT2.5 retail confirmed & Updated to H5 -->
Index: skills/01000-01099.xml
===================================================================
--- skills/01000-01099.xml	(revision 8641)
+++ skills/01000-01099.xml	(working copy)
@@ -1090,6 +1090,9 @@
		<set name="castRange" val="600" />
		<set name="effectRange" val="1100" />
		<set name="maxNegated" val="5" />
+		<cond msgId="1509">
+			<player olympiad="false" />
+		</cond>
	</skill>
	<skill id="1059" levels="3" name="Empower" enchantGroup1="1" enchantGroup2="1">
		<table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>

  • Author

none helped me,but thnx for trying,close topic so spam will stop Thnx

Just add this line to skills you want only to be used in olly:

<cond msgId="1509">

<player olympiad="false" />

</cond>

 

Find skill in data/stats/skills and add this line to skill you want to use in olly only

 

 

 

none helped me,but thnx for trying,close topic so spam will stop Thnx

If you judge people "spam" your topics with answers, avoid to post in this section.

 

Topic closed.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.