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


×
×
  • 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