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 =/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...