Jump to content

Recommended Posts

Posted

first i would like to say this is not my work,Credits go to OURO for working this out for me.

 

this is for a custom transformation every time you pic up "Dragon Slayer Evil Spirit-Health"

you will "transform into the Demonic Prince" just like when you pick up Zarich and Akmhana.

 

i could not work it out untill i asked then OURO posted it.

so i want to share it with you guys also.

 

 

this is for L2J...might work on other's im not sure.

 

This is the core patch(use eclipse):

 

Index: C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/CursedWeapon.java
===================================================================
--- C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/CursedWeapon.java (revision 3222)
+++ C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/CursedWeapon.java (working copy)
@@ -341,6 +341,10 @@
        {
            transformationId = 301;
        }
+        else if(_itemId == 11097)
+        {
+           transformationId = 311;
+        }
        
        if (_player.isTransformed())
        {
Index: C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java  (revision 3222)
+++ C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java  (working copy)
@@ -4672,7 +4672,8 @@
       _transformationId = getTransformationId();
       
       if (_transformationId == L2Transformation.TRANSFORM_AKAMANAH
-               || _transformationId == L2Transformation.TRANSFORM_ZARICHE)
+               || _transformationId == L2Transformation.TRANSFORM_ZARICHE
+               || _transformationId == L2Transformation.TRANSFORM_CUSTOM)
           return;
       
       Connection con = null;
Index: C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/L2Transformation.java
===================================================================
--- C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/L2Transformation.java (revision 3222)
+++ C:/Documents and Settings/Ouro/Mis documentos/workspace/L2_GameServerPruebas/java/net/sf/l2j/gameserver/model/L2Transformation.java (working copy)
@@ -33,6 +33,7 @@
    
    public static final int TRANSFORM_ZARICHE = 301;
    public static final int TRANSFORM_AKAMANAH = 302;
+    public static final int TRANSFORM_CUSTOM = 311;
    
    private L2PcInstance _player;
    private long _startTime;

 

 

and the next 3 files are for datapack:

 

add to gameserver\data\cursedWeapons.xml , remenber change dropRate for test it easy.

   <item id="11097" skillId="24000" name="Dragon Slayer Evil Spirit-Heatlh">
       <dropRate val="1" /> <!-- 100000 for 100% -->
       <duration val="300" /> <!-- in minutes -->
       <durationLost val="3" /> <!-- in minutes -->
       <disapearChance val="50" /> <!-- in % -->
       <stageKills val="10" /> <!-- Integer -->
   </item>

 

change all on gameserver\data\scripts\transformations\DemonPrince.java for:

 

package transformations;

import net.sf.l2j.gameserver.model.L2Transformation;
import net.sf.l2j.gameserver.instancemanager.TransformationManager;

/**
* This is currently only a test of the java script engine
*
* @author durgus
*
*/
public class DemonPrince extends L2Transformation
{
   public DemonPrince()
   {
       // id, duration (secs), colRadius, colHeight
       super(311, 1800, 33.0, 49.0);
  
   }
  
   public void onTransform()
   {
       // Set charachter name to transformed name
       getPlayer().getAppearance().setVisibleName("Demon Prince");
       getPlayer().getAppearance().setVisibleTitle("");
   }
  
   public void onUntransform()
   {
       // set character back to true name.
       getPlayer().getAppearance().setVisibleName(null);
       getPlayer().getAppearance().setVisibleTitle(null); 
   }
  
   public static void main(String[] args)
   {
       TransformationManager.getInstance().registerTransformation(new DemonPrince());
   }
}

 

 

and add new xml on gameserver\data\stats\skills, called 24000.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<list>
<skill id="24000" levels="10" name="Dragon Slayer Evil Spirit-Health">
 <!-- Below is a copy of 3603 Demon Sword Zariche -->
 <table name="#maxCp"> 12 13 14 15 17 19 21 23 25 27 </table>
 <table name="#pAtk"> 3 4.5 6 7.5 9 10.5 11 11.5 12 12.5 </table>
 <table name="#mAtk"> 3 3.25 3.5 3.75 4 4.25 4.5 5 5.5 5.75 </table>
 <table name="#pDef"> 2.5 2.6 2.7 2.8 2.9 3 3.25 3.5 3.75 4 </table>
 <table name="#mDef"> 3 3.1 3.2 3.3 3.4 3.5 3.75 4 4.25 4.5 </table>
 <table name="#runSpd"> 4 6 8 10 12 14 16 18 19 20 </table>
 <table name="#accCombat"> 15 20 25 30 35 40 45 50 55 60 </table>
 <set name="target" val="TARGET_SELF"/>
 <set name="skillType" val="BUFF"/>
 <set name="operateType" val="OP_PASSIVE"/>
 <set name="isMagic" val="true"/>
 <set name="minPledgeClass" val="2"/>
 <for>
   <mul order="0x30" stat="maxCp" val="#maxCp"/>
   <mul order="0x30" stat="pAtk" val="#pAtk"/>
   <mul order="0x30" stat="mAtk" val="#mAtk"/>
   <mul order="0x30" stat="pDef" val="#pDef"/>
   <mul order="0x30" stat="mDef" val="#mDef"/>
   <add order="0x40" stat="accCombat" val="#accCombat"/>
   <add order="0x40" stat="runSpd" val="#runSpd"/>
   <add order="0x40" stat="absorbDam" val="100"/> <!-- absorb 100% HP from damage inflicted on enemies -->
   <mul order="0x30" stat="regCp" val="20"/>
 </for>
</skill>
</list>

 

i would add some pics but i still have to patch my core(im learning how to patch it.lol).

 

 

hope this works for all who want it.

enjoy and give credits to OURO.

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