Jump to content
  • 0

[Help][H5] Questions About 2 Codes (In Olympiad And Skills)


Question

Posted

Hello maxcheaters..!
so i have an idea about 2 fixes for my server but i need your usefull help to do it right..!

so the first code is about Olympiad... i was thinking how to avoid the prefrenzy, angelic icon and other things like that...!

so i was thinking... if i can put a code that when you are in Oly before start the match, the hp will cannot drop down...! i mean... as much as hp you receive (from buffs or armors, weapons etc.)

the HP cannot drop down! just to staying full! can we do that?!

 

the second code is something about the drain from mobs while in flag...!

i've tried this code on L2PcInstance.java:

		public void doAttack(L2Character target)
		{
			super.doAttack(target);
			
+			if ((getPlayer().getPvpFlag() > 0) && target.isMonster())
+			{
+				getPlayer().stopSkillEffects(false, 310);
+				return;
+			}
			
			// cancel the recent fake-death protection instantly if the player attacks or casts spells
			getPlayer().setRecentFakeDeath(false);
		}

It's working as i want, but...
with the command: 

getPlayer().stopSkillEffects(false, 310);

the skill is getting removed!
what method i have to put for the skill to just don't work while player if flaged but doesn't getting removed?! can we fix that too?!

(if the "false" in stopSkillEffects means that the buff will not removed and if "true" will removed... i checked it and doesn't work.!)

Recommended Posts

  • 0
Posted (edited)

I just checked the code where are you acting and I don't really get why u used "activeChar", wait a second I post you another try

 

						if (absorbDamage > 0)
 						{
+							if ((this instanceof L2PcInstance) && (target instanceof L2MonsterInstance) && (((L2PcInstance) this).getPvpFlag() > 0))
+							{
+								absorbDamage = 0;
+							}
 							setCurrentHp(getCurrentHp() + absorbDamage);
 						}
 					}
try it

 

Error!

Exception in thread "AISTPool-5" java.lang.NullPointerException
	at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Character.java:5092)
	at com.l2jserver.gameserver.model.actor.tasks.character.HitTask.run(HitTask.java:60)
	at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:93)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)

wait a sec... i'm gonna restart the server and try again..!

 

EDIT: Error after restart on server..!

Exception in thread "AISTPool-5" null
java.lang.NullPointerException
	at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Character.java:5092)
	at com.l2jserver.gameserver.model.actor.tasks.character.HitTask.run(HitTask.java:60)
	at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:93)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
null
Exception in thread "AISTPool-1" java.lang.NullPointerException
	at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Character.java:5092)
	at com.l2jserver.gameserver.model.actor.tasks.character.HitTask.run(HitTask.java:60)
	at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:93)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
null
Exception in thread "AISTPool-3" java.lang.NullPointerException
	at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Character.java:5092)
	at com.l2jserver.gameserver.model.actor.tasks.character.HitTask.run(HitTask.java:60)
	at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:93)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)

Edited by xXObanXx
  • 0
Posted (edited)

This thing is pissing me off xDDD i forgot null checks but... however..

 

 

						if (absorbDamage > 0)
 						{
+							if (this != null && (this instanceof L2PcInstance) && (target instanceof L2MonsterInstance) && (((L2PcInstance) this).getPvpFlag() > 0))
+							{
+								absorbDamage = 0;
+							}
 							setCurrentHp(getCurrentHp() + absorbDamage);
 						}
 					}
It's just the wrong way, SkillDrain.java was the correct way :3 Edited by ^Wyatt
  • 0
Posted

This thing is pissing me off xDDD i forgot null checks but... however..

 

 

						if (absorbDamage > 0)
 						{
+							if (this != null && (this instanceof L2PcInstance) && (target instanceof L2MonsterInstance) && (((L2PcInstance) this).getPvpFlag() > 0))
+							{
+								absorbDamage = 0;
+							}
 							setCurrentHp(getCurrentHp() + absorbDamage);
 						}
 					}
It's just the wrong way, SkillDrain.java was the correct way :3

 

sorry... was my fault... i was have error here: 

System.out.println(activeChar);

now i removed this line and working properly..!

problem fixed!!!

thank you very much man!

now... any idea about my first question? (player cannot drop down HP if is in olympiad and match didn't started) (avoid prefrenzy)

  • 0
Posted

If I'm not wrong the only way to prefrenzy is with Conversion weapon so you could just go to .xml of Converstion type weapons and add isolyrestricted="true"

and if you don't want angelic icon I think if u put npc no-attackables it blocks heal too, not sure u should test

  • 0
Posted

If I'm not wrong the only way to prefrenzy is with Conversion weapon so you could just go to .xml of Converstion type weapons and add isolyrestricted="true"

and if you don't want angelic icon I think if u put npc no-attackables it blocks heal too, not sure u should test

i don't think this will help... a good way is to put the items that are giving HP to restricted items in oly or just with some way to make while player is in oly and the match didn't start yet, the hp will update automaticall every second until the match beggins!

  • 0
Posted

It's not about items that give HP, is about items that takes your XP far away :P

As I said, Conversion items :>

 

And no... updating your HP every X time is not a "good way" x'D

  • 0
Posted

It's not about items that give HP, is about items that takes your XP far away :P

As I said, Conversion items :>

 

And no... updating your HP every X time is not a "good way" x'D

hmmm... i will check it.... btw... thank you very much for your help..! you can lock this topic now! ;)

Guest
This topic is now closed to further replies.


  • Posts

    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...