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

<skill id="2005" levels="1" name="Pollen">
   <set name="power" val="50.0"/>
  <set name="target" val="TARGET_SELF"/>
  <set name="skillType" val="MANAHEAL"/>
  <set name="operateType" val="OP_ACTIVE"/>
  <set name="buffDuration" val="15000"/>
  <set name="castRange" val="-1"/>
  <set name="effectRange" val="-1"/>
  <set name="isPotion" val="true"/>
  <for>
    <effect count="7" name="ManaHealOverTime" time="1" val="48" stackOrder="50" stackType="MpRecover"/>
  </for>
</skill>

i didnt test it i think it works

  • 0
Posted

I tried with Mana drugs but they don't restore any mp and there's not even a buff effect icon on my list... Mana potions did work tho.. =/

Rafole where can i change those code lines? what file/folder?

  • 0
Posted

I tried with Mana drugs but they don't restore any mp and there's not even a buff effect icon on my list... Mana potions did work tho.. =/

Rafole where can i change those code lines? what file/folder?

go into your gameserver folder--->data--->stats--->skills--->and search for 2000-2099.xml open it and replace id=2005 with this from rafole

  • 0
Posted

Edited it but it's not working even after restarting the server, mana potions still give instant mp.

What else can i try?

i think that to do this u must edit java... i am not sure.. but mana drug is a way just edit it in skills

  • 0
Posted

i think that to do this u must edit java... i am not sure.. but mana drug is a way just edit it in skills

How? I'm really new to editing these files can you please guide me in the process?

  • 0
Posted

And... where can i find mana drug xml...? xD

I tried replacing mana potions xml with healing potions one and playing around with it a bit but without success... (good thing i always make backups..)

  • 0
Posted

And... where can i find mana drug xml...? xD

I tried replacing mana potions xml with healing potions one and playing around with it a bit but without success... (good thing i always make backups..)

that made mana pots same as Healing pots...

well my way is correct i think :P

find mana drug id and do the same as u did with healin'

  • 0
Posted

Fact is i can't find mana drug ID and your code didn't work at all, even after restarting server mana potions still gave 100 mp, maybe i have to edit some different files?

  • 0
Posted

Maybe it's different on gracia epilogue? o.o

this is my xml file:

<skill id="2002" levels="1" name="Healing Drug">
	<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>
<skill id="2003" levels="1" name="Squash Seed">
	<!-- Summer Squash Event Skill (http://www.lineage2.com/archive/2006/11/fall_harvest.html) -->
	<set name="itemConsumeCount" val="1" />
	<set name="target" val="TARGET_SELF" />
	<set name="skillType" val="SPAWN" />
	<set name="operateType" val="OP_ACTIVE" />
	<set name="hitTime" val="1500" />
	<set name="staticHitTime" val="true" />
	<set name="npcId" val="12774" />
	<set name="despawnDelay" val="120000" />
</skill>
<skill id="2004" levels="1" name="Large Squash Seed">
	<!-- Summer Squash Event Skill (http://www.lineage2.com/archive/2006/11/fall_harvest.html) -->
	<set name="itemConsumeCount" val="1" />
	<set name="target" val="TARGET_SELF" />
	<set name="skillType" val="SPAWN" />
	<set name="operateType" val="OP_ACTIVE" />
	<set name="hitTime" val="1500" />
	<set name="staticHitTime" val="true" />
	<set name="npcId" val="12777" />
	<set name="despawnDelay" val="120000" />
</skill>
<skill id="2005" levels="1" name="Nectar">
	<!-- Summer Squash Event Skill (http://www.lineage2.com/archive/2006/11/fall_harvest.html) -->
	<set name="target" val="TARGET_SELF" />
	<set name="skillType" val="NOTDONE" />
	<set name="operateType" val="OP_PASSIVE" />
</skill>

 

 

While in the items itemhandlers folder i have a ManaPotion.java file and this is the code inside it:

 

package handlers.itemhandlers;

import com.l2jserver.Config;
import com.l2jserver.gameserver.model.L2ItemInstance;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;

public class ManaPotion extends ItemSkills
{
/**
 * 
 * @see com.l2jserver.gameserver.handler.IItemHandler#useItem(com.l2jserver.gameserver.model.actor.L2Playable, com.l2jserver.gameserver.model.L2ItemInstance)
 */
@Override
public void useItem(L2Playable playable, L2ItemInstance item)
{
	if (!Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT)
	{
		playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
		return;
	}
	super.useItem(playable, item);
}
}

 

 

Still not working =/

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

    • I always welcome bug reports and never ban ppl - until proven leaker - not sure where the "arrogant" part comes from, I would like to know what exactly let you think that (quote me please, and not 12y old quotes as the other frog meme dude). I request bug reports to be properly detailed, otherwise it's a waste of time. Other than that, I don't see where I have been arrogant. I got proper discussions with many ppl, not sure why you wouldn't be one of them.   I got 76 bug reports in my list (21 on forums, 55 on gitlab).   I have a single bug report regarding lvl 4 clan quest, which has to be tested since it's not even clear about what is supposed to be broken. Seven Signs was never reworked and is basically L2J based (we got a rework branch to test/commit with reworked AIs). Geoengine got no specific issues (at my knowledge), pathfinding was reworked lately to be way more performant, and I still try to improve performance using some pool system. Movement was partially fixed in latest 410, and probably will get another rework soon (notably reverting to the task wallclock).   "I" surely didn't spend 12y over geoengine - Hasha cared about geoengine during rev 334 / 354 / 390 / 395 and 397. It is solely his work, and always tagged as it. He was rewarded with money for his work, and almost a decade of aCis access.   aCis is a community work, things tagged with Tryskell is my work, the leftover is someone else work. 22 ppl worked as developers in this project over 14 years.   I would gladly accept whatever list of fixes/reports you have to share. You will even be rewarded (you probably know about cookie system), as anyone else sharing bug report or fixes.   My main concerns lately is the lack of decent L2OFF IL data, it is my main bottleneck actually. If you're aware about decent L2OFF data to parse, let me know.
    • Your project doesn't compare to aCis; you have to be an idiot to use that. I know someone who bought the High Five "PREMIUM" version, which has the same bugs as the free version. If you want, I can share his latest premium version. Players are going through walls with their bad geoengine, falling under the Olympiad. If you want, I can record and prove what I'm saying. The aCis project is 50 steps ahead of yours and it's not even stable...
    • l2jteon, l2joneo l2jscoria etc etc. and from that we went to this 
    • Thanks a lot. Sadly I can't give more reactions today, but thanks again!
  • 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