Page 1 of 2

Mob drainers

Posted: Fri Sep 03, 2010 4:18 pm
by Naonah
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:

Hi:)
I have a small problem on my server (PvP) with necro and SH. On pvp areas during pvp they drain mobs to get HP and next attack other players. It is not fair to other players and make these classes overpowered.

It is possible to do this thing --> When you are flagged (in pvp mode) you cant drain mobs (only draining other players is possible).
..and here I need your help. Could you tell me where to look for codes or how to make this fix?

Thank you for all possible answers.
Best regards.

Re: Mob drainers

Posted: Fri Sep 03, 2010 4:27 pm
by jurchiks
why do you have mobs in pvp areas??
or you mean normal areas?

Re: Mob drainers

Posted: Fri Sep 03, 2010 4:29 pm
by Tavo22
Remove the mobs from pvp areas its more simple, i think...

Re: Mob drainers

Posted: Fri Sep 03, 2010 5:01 pm
by Naonah
jurchiks wrote:why do you have mobs in pvp areas??
or you mean normal areas?
Tavo22 wrote:Remove the mobs from pvp areas its more simple, i think...
Yes, I have mobs.
I tried to remove them but then pvp area was "empty" cuz ppl had no reason to be there.
..so I spawned mobs again to force ppl to fight for them (mobs have good drop)

The solution I mentioned in my first post is possible cuz I saw it. I just dont know how to do this "fix":)

Thank you.

Re: Mob drainers

Posted: Fri Sep 03, 2010 6:42 pm
by jurchiks
Then it's a farm zone, not pvp.

Code: Select all

         <cond>            <player chaotic="False" />        </cond>
That's the closest, but it works only if karma > 0.
You could add a FLAGGED condition in ConditionPlayerState if you know what you're doing.
Edit: OR add the same condition in gameserver/skills/l2skills/l2skilldrain.java in useSkill method.
Dunno why it hasn't been introduced yet, you're not the first to ask about it.

Re: Mob drainers

Posted: Sat Sep 04, 2010 9:15 am
by Naonah
I tried to test this. It should work but I have compile error:)

Please have a look:

Code: Select all

Index: L2SkillDrain.java===================================================================--- L2SkillDrain.java   (revision 4411)+++ L2SkillDrain.java   (working copy)@@ -56,7 +56,8 @@     {        if (activeChar.isAlikeDead())            return;-+       if (activeChar.getPvpFlag() > 0)+           return;        boolean ss = false;        boolean bss = false;
Here compile error:

Code: Select all

    [javac] C:\Documents and Settings\bolo.LOL-805AA799D1C\workspace\L2_GameServer\java\com\l2jserver\gameserver\skills\l2skills\L2SkillDrain.java:59: cannot find symbol    [javac] symbol  : method getPvpFlag()    [javac] location: class com.l2jserver.gameserver.model.actor.L2Character    [javac]         if (activeChar.getPvpFlag() > 0)    [javac]                       ^    [javac] 1 error
Do you know what is wrong here?

Of course we can add later a new condition like this:

Code: Select all

if ((activeChar.getPvpFlag() > 0) && target.(here mob instance))return;
... but first we need to fix the first condition formula.

Thank you for your time to reply..

Best regards.

Re: Mob drainers

Posted: Sat Sep 04, 2010 2:06 pm
by RiZe
There is no getPvpFlag method in L2Character, you have to cast the activeChar to L2PcInstance to use that method.

Code: Select all

 if (activeChar instanceof L2PcInstance)    if (((L2PcInstance)activeChar).getPvpFlag() > 0)        return; 

Re: Mob drainers

Posted: Sat Sep 04, 2010 5:13 pm
by Naonah
OK, here final fix for my problem:

Code: Select all

Index: L2SkillDrain.java===================================================================--- L2SkillDrain.java   (revision 4411)+++ L2SkillDrain.java   (working copy)@@ -29,6 +29,7 @@ import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.model.actor.instance.L2CubicInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;+import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.StatusUpdate; import com.l2jserver.gameserver.network.serverpackets.SystemMessage;@@ -64,7 +65,9 @@         {            if (target.isAlikeDead() && getTargetType() != SkillTargetType.TARGET_CORPSE_MOB)                continue;-+           if (activeChar instanceof L2PcInstance)+               if ((((L2PcInstance)activeChar).getPvpFlag() > 0) && target instanceof L2MonsterInstance)+               return;             if (activeChar != target && target.isInvul())                 continue; // No effect on invulnerable chars unless they cast it themselves.  
Thank you all for your help but the biggest thanks to RIZE.

Re: Mob drainers

Posted: Sun Sep 05, 2010 12:05 am
by Tavo22
You should add the condition if the skill is Drain,
may be you are flagged and you cant kill some mobs that are hitting you XD

Re: Mob drainers

Posted: Sun Sep 05, 2010 10:38 am
by Naonah
Tavo22 wrote:You should add the condition if the skill is Drain,
may be you are flagged and you cant kill some mobs that are hitting you XD
to kill mobs use other skills like wind based (SH) or death spike (necro)

btw: It is not possible to add a condition you wrote.

Re: Mob drainers

Posted: Sun Sep 05, 2010 11:24 am
by denser
bad idea to forbid use special skills in pvp....
forbid Healer to heal himself - it not fair! ( especially for Bishops lol )

better try to reduce amount of gained HP from mob. if it pvp server like you wrote - so over-enchanted weapons/skills can give you so horrible result. be aware

Re: Mob drainers

Posted: Sun Sep 05, 2010 12:53 pm
by Scepter
quite a few servers do that with sacrifice on pheonix knight, as it can be op in oly with touch of life and bss on, works quite well.

Re: Mob drainers

Posted: Wed Aug 31, 2011 6:14 pm
by sherlockholmes
So this would be if these mode flag can not you use those skills against moobs? there is no way to drain 0 hp? denser be configured as you can tell me why .. ?

Re: Mob drainers

Posted: Wed Aug 31, 2011 7:39 pm
by hokkeli
Increase mdef/pdef and reduce hp -> less draining -> still same strenght mobs.

Edit: might have issues with dreadnoughts and such.

Re: Mob drainers

Posted: Thu Sep 01, 2011 5:27 pm
by thaiscorpion
Ive got a better solution just make the mobs there stronger so that the players cant steal so much life and wont be worth it to compisate for this strenth in mdef and pdef give them less hp and that way it will work fine i think hope this helps!