Mob drainers

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Mob drainers

Post 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.
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Mob drainers

Post by jurchiks »

why do you have mobs in pvp areas??
or you mean normal areas?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Tavo22
Posts: 258
Joined: Mon Mar 22, 2010 8:14 pm

Re: Mob drainers

Post by Tavo22 »

Remove the mobs from pvp areas its more simple, i think...
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: Mob drainers

Post 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.
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Mob drainers

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: Mob drainers

Post 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.
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
RiZe
Posts: 122
Joined: Mon Mar 24, 2008 12:44 am
Location: Czech Republic
Contact:

Re: Mob drainers

Post 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; 
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: Mob drainers

Post 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.
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
Tavo22
Posts: 258
Joined: Mon Mar 22, 2010 8:14 pm

Re: Mob drainers

Post 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
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: Mob drainers

Post 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.
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Mob drainers

Post 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
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Scepter
Posts: 64
Joined: Tue Apr 13, 2010 12:36 pm

Re: Mob drainers

Post 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.
Scepter - Main man with a plan.
User avatar
sherlockholmes
Posts: 140
Joined: Sun Sep 26, 2010 8:33 pm
Location: argentina

Re: Mob drainers

Post 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 .. ?
hokkeli
Posts: 69
Joined: Tue Nov 09, 2010 7:05 pm

Re: Mob drainers

Post by hokkeli »

Increase mdef/pdef and reduce hp -> less draining -> still same strenght mobs.

Edit: might have issues with dreadnoughts and such.
thaiscorpion
Posts: 30
Joined: Thu Sep 01, 2011 3:57 am

Re: Mob drainers

Post 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!
Post Reply