Jump to content
  • 0

[Help] Cancel Code


Question

Posted

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

8 answers to this question

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

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

 

  • 0
Posted


### 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.

  • 0
Posted


### 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?

  • 0
Posted

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>

  • 0
Posted

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

 

 

 

  • 0
Posted

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.


  • Posts

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock