Jump to content
  • 0

[HELP] How to make mana potions restore mana like hp potions


Question

Posted

I'd love to know how to make mana potions slowly restore mp over time and add some delay on them, just like hp potions, since i'm a newbie i know little to no java code, anybody can guide me step-to-step on how to edit them? thanks.

Recommended Posts

  • 0
Posted

open 2200-2299.xml

 

id 2288

 

	<skill id="2288" levels="6" name="Elixir of Mental Strength">
	<table name="#power"> 75 125 175 250 350 420 </table>
	<table name="#minLvl"> 0 20 40 52 61 76 </table>
	<table name="#maxLvl"> 20 40 52 61 76 86 </table>
	<set name="itemConsumeCount" val="1" />
	<set name="power" val="#power" />
	<set name="target" val="TARGET_SELF" />
	<set name="skillType" val="MANAHEAL" />
	<set name="operateType" val="OP_ACTIVE" />
	<set name="reuseDelay" val="300000" />
	<set name="staticReuse" val="true" />
	<set name="sharedReuse" val="2287-1" />
	<set name="isPotion" val="true" />
	<cond msgId="113" addName="1">
		<and>
			<player flyMounted="False" />
			<player level="#minLvl" />
			<not>
				<player level="#maxLvl" />
			</not>
		</and>
	</cond>
</skill>

  • 0
Posted

Elixir of Mental Strenght still gives instant mp, the only difference is it has delay...

Even tho adding delay to mana potions could as well fix my problem (i don't want mana potions to be spammable...) i'd rather make them slowly restore mp...So is there any way i can do that?

 

P.S.

 

Yeah i have l2j server version 4319, datapack version 7546

  • 0
Posted

why you can't?

 

just change 2288 skill xml with this

 

	<skill id="2288" levels="6" name="Elixir of Mental Strength">
	<set name="itemConsumeCount" val="1" />
	<set name="target" val="TARGET_SELF" />
	<set name="skillType" val="HOT" />
	<set name="operateType" val="OP_ACTIVE" />
	<set name="isPotion" val="true" />
	<set name="buffDuration" val="20000" />
	<cond msgId="113" addName="1">
		<player flyMounted="False" />
	</cond>
	<for>
		<effect count="4" name="HealOverTime" time="5" val="1.5" stackOrder="1.5" stackType="HpRecover" />
	</for>
</skill>

 

and it's oky...

 

i never worked on L2jEpilogue...

  • 0
Posted

By playing around with xml files and testing and reading around the internet etc..etc...

I developed a correct syntax for mprecovery over time:

 

<set name="target" val="TARGET_SELF"/>

<set name="skillType" val="MPHOT"/>

<set name="operateType" val="OP_ACTIVE"/>

<set name="buffDuration" val="15000"/>

<set name="reuseDelay" val="10000"/>

<set name="staticReuse" val="true"/>

<set name="isPotion" val="true"/>

<for>

<effect name="ManaHealOverTime" count="15" time="1" val="50" stackOrder="1" stackType="ManaPotion"/>

</for>

This potion will restore 50 mp each second for 15 seconds for a total of 750 mp (i might lower it a bit, if u want it lower too just change the val="50" to something like: val="30")

The problem is it doesn't seem like skillid 2005 is the mana potions, unless i'm doing something wrong, this code does work if use it under elixir of mental strenght (ID 2288 in xml files), so can anyone confirm that 2005 is the mana potions ID?

  • 0
Posted

its so hard to look into the config ?

 

# ---------------------------------------------------------------------------
# Mana Drugs/Potions
# ---------------------------------------------------------------------------
# This option will enable core support for:
# Mana Drug (item ID 726), using skill ID 10000.
# Mana Potion (item ID 728), using skill ID 10001.
EnableManaPotionSupport = True

 

its also 10000 and i hope u did EnableManaPotionSupport = True

 

<skill id="10000" levels="1" name="Custom Mana Drug">
	<set name="itemConsumeId" val="726" />
	<set name="itemConsumeCount" val="1" />
	<set name="buffDuration" val="15000" />
	<set name="isPotion" val="true" />
	<set name="magicLvl" val="1" />
	<set name="operateType" val="OP_ACTIVE" />
	<set name="skillType" val="MPHOT" />
	<set name="target" val="TARGET_SELF" />
	<cond msgId="113" addName="1">
		<player flyMounted="False" />
	</cond>
	<for>
		<effect count="3" name="ManaHealOverTime" time="5" val="1.5" stackOrder="1.5" stackType="mp_recover" />
	</for>
</skill>

  • 0
Posted

Doh.... thank you very much SkyNet, yes i did enable mana potions, but i didn't pay attention to the skill Id back then cuz they were all rubbish numbers to my inexperienced eyes... =p

It seems to work now, even tho it doesn't display the item name on my chat when i use mana potions, odd o.o

This is my current code:

<skill id="10001" levels="1" name="Custom Mana Potion">
	<set name="itemConsumeId" val="728" />
	<set name="itemConsumeCount" val="1" />
	<set name="target" val="TARGET_SELF"/>
	<set name="skillType" val="MPHOT"/>
	<set name="operateType" val="OP_ACTIVE"/>
	<set name="buffDuration" val="15000"/>
	<set name="reuseDelay" val="10000"/>
	<set name="staticReuse" val="true"/>
	<set name="isPotion" val="true"/>
	<for>
	<effect noicon="1" name="ManaHealOverTime" count="15" time="1" val="35" stackOrder="1" stackType="mp_recover"/>
	</for>
</skill>

  • 0
Posted

Doh.... thank you very much SkyNet, yes i did enable mana potions, but i didn't pay attention to the skill Id back then cuz they were all rubbish numbers to my inexperienced eyes... =p

It seems to work now, even tho it doesn't display the item name on my chat when i use mana potions, odd o.o

This is my current code:

<skill id="10001" levels="1" name="Custom Mana Potion">
	<set name="itemConsumeId" val="728" />
	<set name="itemConsumeCount" val="1" />
	<set name="target" val="TARGET_SELF"/>
	<set name="skillType" val="MPHOT"/>
	<set name="operateType" val="OP_ACTIVE"/>
	<set name="buffDuration" val="15000"/>
	<set name="reuseDelay" val="10000"/>
	<set name="staticReuse" val="true"/>
	<set name="isPotion" val="true"/>
	<for>
	<effect noicon="1" name="ManaHealOverTime" count="15" time="1" val="35" stackOrder="1" stackType="mp_recover"/>
	</for>
</skill>

 

Thanks for this I was looking for this kind of code =)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • aCis (“another Crappy interlude server”) is a commercial project I would not use even if paid. l2jfrozen yes, a 10 year old, effectively dead project produces more reliable results and at least works. l2jhellas also works. aCis might as well be renamed KPMIS (“Keep Paying My Interlude Server”): endless fixes, freemium, and no realistic path to true L2OFF parity, but its recommended like hell. lucera is even better the downside is you just need to dive into code and no sources   lets leave it at that
    • Download Here: https://sitehunterus.blogspot.com/2025/12/exelo-combo-tool-v2.html VirusTotal https://www.virustotal.com/gui/file/2acd067847ee092c7986f55c9f77620d89505d1c0bda34a0ee8f55b9c2905c11?nocache=1 Visit my Blogger list to download 100% free software https://www.freetoolss.com/ https://blackhat8.blogspot.com/ https://hack-crack9.blogspot.com/ https://hackernoons.blogspot.com/ https://sharetools99.blogspot.com/
    • Care to detail why ?   L2JHellas probably got the same issue, it's inherent to L2J if you don't rework Player intentions (and solving it with a Config < 500 attack is stupid, if it works for attack it works for other types of desires), also last time I checked L2JHellas he was using my changesets to fix its own stuff (which is ok, copy-paste my knownlist system which is 10y old is fine, but don't say it will act different since it's literally the same sub-system).   About Lucera code source isn't available so it's easy to say it's better, internally you got no clue what is happening and RU forks got the "feeling" to get everything, but everything is half done, everytime I put an eye on such sources (whatever based on l2ru, they only know how to copy-paste each other).   In the other hand, you seem to use aCis since years (I think I see your name since a decade, and you still use it since you made this topic :   Be a little more appreciative about the work done, it's not only mine but my community aswell, and if you find something, consider to report rather than getting such an idiotic behavior.   I understand you're not forced to share any type of fixes, and than people tend to feel superior when they fix something than aCis didn't yet fix. The thing is, for each bug you found, I found and fixed 10x more than you.   409 is way beyond 382 in all possible ways, if you believe the versus good for you, but don't make ppl believe it's the case, because it's not. There's at least 400+ fixed issues (and that's counting 10 issues by revision, which is kinda low) and entire new systems (spawns, SCHs, pathfind, whole AI implemented, Desire system,...).
    • better than using 409... Search for L2jHellas or Lucera and you won't have any headaches.
  • 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