Jump to content
  • 0

[help] LF Guide to adapt codes / Some1 can adapt this one?


Question

7 answers to this question

Recommended Posts

  • 0
Posted

Btw, don't send me teamviewer. I will make a patch (addapted) to add it alone.

 

Sorry for double :|

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Blow.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Blow.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Blow.java	(working copy)
@@ -46,14 +46,19 @@
		SkillType.BLOW
	};

-	/*
-	public final static byte FRONT = 50;
-	public final static byte SIDE = 60;
-	public final static byte BEHIND = 70;
-	*/
-	
-	@Override
-	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)

+	public static int FRONT = Config.BLOW_ATTACK_FRONT; 
+    public static int SIDE = Config.BLOW_ATTACK_SIDE; 
+    public static int BEHIND = Config.BLOW_ATTACK_BEHIND; 
+
+    @Override
+	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) 
+    { 
+            if(skill.getId() == 30) 
+            { 
+                    FRONT = 0; 
+                    SIDE = 0; 
+                    BEHIND = Config.BLOW_ATTACK_BEHIND; 
+            } 
	{
		if (activeChar.isAlikeDead())
			return;
@@ -305,9 +310,10 @@
		}else{

			activeChar.removeSs();
-			
		}
	}
+			
+	}

	@Override
	public SkillType[] getSkillIds()
Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Pdam.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Pdam.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Pdam.java	(working copy)
@@ -287,8 +287,22 @@
							player = null;
							smsg = null;
						}
-						else
-							target.reduceCurrentHp(damage, activeChar);
+						else if(skill.getId() == 30) 
+                        { 
+                                double Hpdam = 0; 
+
+                                if (damage >= target.getCurrentHp()) 
+                                { 
+                                        target.setCurrentHp(0); 
+                                        target.doDie(activeChar); 
+                                } 
+                                else 
+                                { 
+                                        Hpdam = (target.getCurrentHp() - damage); 
+                                        target.setCurrentHp(Hpdam); 
+                                } 
+                        } 
+                        else target.reduceCurrentHp(damage, activeChar);
					}
					else
					{

 

Ready!

  • 0
Posted

Btw, don't send me teamviewer. I will make a patch (addapted) to add it alone.

 

Sorry for double :|

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Blow.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Blow.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Blow.java	(working copy)
@@ -46,14 +46,19 @@
		SkillType.BLOW
	};

-	/*
-	public final static byte FRONT = 50;
-	public final static byte SIDE = 60;
-	public final static byte BEHIND = 70;
-	*/
-	
-	@Override
-	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)

+	public static int FRONT = Config.BLOW_ATTACK_FRONT; 
+    public static int SIDE = Config.BLOW_ATTACK_SIDE; 
+    public static int BEHIND = Config.BLOW_ATTACK_BEHIND; 
+
+    @Override
+	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) 
+    { 
+            if(skill.getId() == 30) 
+            { 
+                    FRONT = 0; 
+                    SIDE = 0; 
+                    BEHIND = Config.BLOW_ATTACK_BEHIND; 
+            } 
	{
		if (activeChar.isAlikeDead())
			return;
@@ -305,9 +310,10 @@
		}else{

			activeChar.removeSs();
-			
		}
	}
+			
+	}

	@Override
	public SkillType[] getSkillIds()
Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Pdam.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Pdam.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Pdam.java	(working copy)
@@ -287,8 +287,22 @@
							player = null;
							smsg = null;
						}
-						else
-							target.reduceCurrentHp(damage, activeChar);
+						else if(skill.getId() == 30) 
+                        { 
+                                double Hpdam = 0; 
+
+                                if (damage >= target.getCurrentHp()) 
+                                { 
+                                        target.setCurrentHp(0); 
+                                        target.doDie(activeChar); 
+                                } 
+                                else 
+                                { 
+                                        Hpdam = (target.getCurrentHp() - damage); 
+                                        target.setCurrentHp(Hpdam); 
+                                } 
+                        } 
+                        else target.reduceCurrentHp(damage, activeChar);
					}
					else
					{

 

Ready!

  • 0
Posted

The easiest thing in the world, anyway I may can help you.

 

Send me your id, pass via pm.

 

i love you i dont know why anyway i had forget this post !!!

 

Thanksssssssssssssssssssssssssssssssssssssssssss  [Gr] me trelanes pali  !!! tha ton test amesos!!

  • 0
Posted

GG crystalia, GsL learnt nothing from it and so will request again, and again, and again...

 

And again. And again, and again, and again, and again.

 


 

Give a man a fishpole and he won't ask fishes anymore.

Guest
This topic is now closed to further replies.


×
×
  • Create New...

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