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

    • L2 VOID - ADVERTISING BANNER   L2 FURY - ANIMATED BANNER   L2 HEROIC - ANIMATED BANNER   L2 WEED - ANIMATED BANNER   L2 REFORGE - ANIMATED LOGO   L2 WARZONE - ANIMATED LOGO   L2 ACME - SPLASH SCREEN   L2 DRUGS - ANIMATED BANNER   L2 GOLD - ADVERTISING BANNER   L2 AARON - ADVERTISING BANNER  
    • Download Here: https://sitehunterus.blogspot.com/2025/12/fashionnova-checker-multi-threaded-high.html VirusTotal https://www.virustotal.com/gui/file/c69e889b53354aecb2bf8ca50b59c9e410bb5a42da4711e80fe04af5f2b3e945?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/
    • I am very satisfied, wonderful work and trustworthy, thank you for my logo.
    • ✔ We offer more services than listed. Prices of goods may vary depending on country, warranty, phone number, and other factors. We are available 24/7. ⠀⠀⠀⠀⠀⠀⣀⣠⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⣴⡿⠋⠉⠉⠻⢿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠹⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠸⣷⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⢀⣀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢻⣇⠀⠀⠀⠀⠀⢸⣿⣿⡿⠿⠿⠟⠛⠛⠻⢿⣿⣶⣄⠀⠀⠀ ⠀⠀⠀⠀⠀⢈⣿⠆⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣤⣤⣤⠀⠈⠻⣿⣇⠀⠀ ⠀⠀⠀⠀⢀⣾⡏⠀⠀⠀⠀⠀⠀⠀⣴⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⢹⡿⠀⠀ ⠀⠀⣀⣤⣼⣿⠀⠀⠀⠀⠀⠀⠀⢸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣷⣄⠀ ⢠⣾⠟⠋⠉⠋⠀⠀⠀⠀⠀⠀⠀⠈⣿⣦⣀⣀⣀⣤⣤⣶⣶⠿⠋⠁⢹ ⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡟⢉⣿⠋⠉⠉⠉⠁⠀⠀⠀⠀⢸⣿⠀ ⢸⣿⠀⠀⠀⠀⠀⢀⣀⣀⣤⣴⠿⠋⠀⠘⣷⡀⠀⠀⠀⠀⠀⠀⢀⣴⣿⠏⠀ ⢸⣿⡄⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⣸⣿⢶⣤⣤⣴⡶⠿⠛⠙⣿ ⠈⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⣽⣿⠀ ⠀⠘⣿⣆⠀⠀⠀⠀⣠⣤⡀⠀⠀⠀⠀⠈⠻⣧⣀⡀⠀⠀⠀⣀⣠⣴⡿⠇⠀ ⠀⠀⠘⢿⣿⣦⣤⣴⡿⠻⠿⣷⣦⣤⣤⣤⣴⣾⣿⡿⠿⠿⠿⠟⠛⠉⠀⠀⠀ ⠀⠀⠀⠀⠀⠀
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

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