Jump to content

Recommended Posts

Posted

Some1 ask me about mana potion at l2j how he can make it work's so... i search on forum and i don't find nothing about it ...for that reason many ppl don't choose l2jserver ..for me is the most stable pack...!!

 

So there you go the patch java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java

 

 

Index: java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java
===================================================================        
--- java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java	(revision 1915)
+++ java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java	(working copy)
@@ -115,6 +122,13 @@

		switch(itemId)
		{
+            		// MANA POTIONS 
+			case 726: // mana drug, xml: 2003 
+				res = usePotion(activeChar, 2003, 1); // configurable through xml 
+				break; 
+			case 728: // mana_potion, xml: 2005 
+				res = usePotion(activeChar, 2005, 1); 
+				break;
			// HEALING AND SPEED POTIONS
			case 65: // red_potion, xml: 2001
				res = usePotion(activeChar, 2001, 1);

 

 

Datapack Side:

 

Index:data/stats/skills/2000-2099.xml
===================================================================
--- data/stats/skills/2000-2099.xml	(revision 4397)
+++ data/stats/skills/2000-2099.xml	(working copy)
@@ -27,32 +27,41 @@
   </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="power" val="0.0"/>
   <set name="target" val="TARGET_SELF"/>
-  <set name="skillType" val="NOTDONE"/>
-  <set name="operateType" val="OP_PASSIVE"/>
+  <set name="hitTime" val="1500"/>
+  <set name="skillType" val="MPHOT"/>
+  <set name="operateType" val="OP_ACTIVE"/>
   <set name="castRange" val="-1"/>
+  <set name="effectRange" val="-1"/>
+  <set name="buffDuration" val="20000"/>
+  <set name="isPotion" val="true"/>
   <for>
+	  <effect count="4" name="ManaHealOverTime" time="5" val="1.5" stackOrder="1.5" stackType="MpRecover"/>
   </for>
</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="power" val="0.0"/>
   <set name="target" val="TARGET_SELF"/>
-  <set name="skillType" val="NOTDONE"/>
-  <set name="operateType" val="OP_PASSIVE"/>
+  <set name="skillType" val="MPHOT"/>
+  <set name="operateType" val="OP_ACTIVE"/>
   <set name="castRange" val="-1"/>
+  <set name="effectRange" val="-1"/>
+  <set name="buffDuration" val="40000"/>
+  <set name="isPotion" val="true"/>
   <for>
+    <effect count="4" name="ManaHealOverTime" time="10" val="1.5" stackOrder="1.5" stackType="MpRecover"/>
   </for>
</skill>
<skill id="2005" levels="1" name="Pollen">
-  <!-- Summer Squash Event Skill (http://www.lineage2.com/archive/2006/11/fall_harvest.html) -->
-  <set name="power" val="0.0"/>
+  <set name="power" val="200.0"/>
   <set name="target" val="TARGET_SELF"/>
-  <set name="skillType" val="NOTDONE"/>
-  <set name="operateType" val="OP_PASSIVE"/>
+  <set name="skillType" val="MANAHEAL"/>
+  <set name="operateType" val="OP_ACTIVE"/>
   <set name="castRange" val="-1"/>
+  <set name="effectRange" val="-1"/>
+  <set name="buffDuration" val="15000"/>
+  <set name="isPotion" val="true"/>
   <for>
   </for>
</skill>

 

This Code Made by l2j

 

--------------------------

 

Because some ppl don't know how to compile :P here the ready l2jcore with the mana potion work's http://www.4shared.com/file/80907204/3c2ee0c6/l2j-core.html  :)

 

For compile the core and made the modify credits going to me  :P

 

--------------------------

 

You only need to modify the datapack side easy to do  ;)

 

Go to data/stats/skills/2000-2099.xml and find skill pollen .

 

<!-- Summer Squash Event Skill (http://www.lineage2.com/archive/2006/11/fall_harvest.html) -->

-  <set name="power" val="200.0"/>  <<--- Here how mana you wanna spawn the player

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

-  <set name="skillType" val="MANAHEAL"/>  << skilll type mana heal like this what i'm write

-  <set name="operateType" val="OP_PASSIVE"/>

- <set name="castRange" val="-1"/>

+  <set name="effectRange" val="-1"/>

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

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

  <for>

  </for>

</skill>

 

Best Regards Cobra!!!

 

ps: If you find this post here delete mine.

ps:For those who don't know how to compile l2j >> http://www.l2jserver.com/trac/wiki/New_L2J_Install :)

Posted

Yup..

 

Thats a Great Share..

 

You Are Awesome xD

 

Thanks For Sharing That Thing.

 

Keep Up With Those Java Thingies And You'll Get Rewarded

  • 4 weeks later...
Posted

Tested on gracia? For me gracia pt 2 doesn't works ;/

 

Maybe you do something wrong read careful what i'm saying .. add this in first line of potion.java and could works fine!

 

// MANA POTIONS 
+			case 726: // mana drug, xml: 2003 
+				res = usePotion(activeChar, 2003, 1); // configurable through xml 
+				break; 
+			case 728: // mana_potion, xml: 2005 
+				res = usePotion(activeChar, 2005, 1); 
+				break;

Also you need to modify the xml to !!

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
Reply to this topic...

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