Page 1 of 1
How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 2:48 pm
by surskis
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number:4425
L2JDP Revision
Number:7669
I have no ideas how to make it...
Thanks in advice
Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 4:03 pm
by _DS_
Create new condition.
Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 4:31 pm
by surskis
And how i can make it?
Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 4:38 pm
by jurchiks
Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 4:41 pm
by surskis
Thanks jurchiks for exaple.

Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 4:57 pm
by surskis
Maybe is posible make as
Code: Select all
<cond msgId="113" addName="1"> <and> <player SiegeZone="126" /> </and> </cond>
but with pease zone ?
Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 5:11 pm
by komara_23
surskis wrote:Maybe is posible make as
Code: Select all
<cond msgId="113" addName="1"> <and> <player SiegeZone="126" /> </and> </cond>
but with pease zone ?
SiegeZone="126"
change whit ID of zone where you want and you are done!

Re: How allow skill only in pease zone?
Posted: Sun Nov 28, 2010 5:19 pm
by surskis
what mean 126?
Re: How allow skill only in pease zone?
Posted: Mon Nov 29, 2010 8:45 am
by surskis
Who can explain to me, what
126 mean in
Code: Select all
<cond msgId="113" addName="1"> <and> <player SiegeZone="126" /> </and> </cond>
Re: How allow skill only in pease zone?
Posted: Mon Nov 29, 2010 9:10 am
by SolidSnake
Try this patch (untested)
Code: Select all
Index: java/com/l2jserver/gameserver/model/base/PlayerState.java===================================================================--- java/com/l2jserver/gameserver/model/base/PlayerState.java (revision 4425)+++ java/com/l2jserver/gameserver/model/base/PlayerState.java (working copy)@@ -23,5 +23,6 @@ BEHIND, FRONT, CHAOTIC,- OLYMPIAD+ OLYMPIAD,+ PEACEZONE }Index: java/com/l2jserver/gameserver/skills/DocumentBase.java===================================================================--- java/com/l2jserver/gameserver/skills/DocumentBase.java (revision 4425)+++ java/com/l2jserver/gameserver/skills/DocumentBase.java (working copy)@@ -534,6 +534,11 @@ boolean val = Boolean.valueOf(a.getNodeValue()); cond = joinAnd(cond, new ConditionPlayerState(PlayerState.OLYMPIAD, val)); }+ else if ("peacezone".equalsIgnoreCase(a.getNodeName()))+ {+ boolean val = Boolean.valueOf(a.getNodeValue());+ cond = joinAnd(cond, new ConditionPlayerState(PlayerState.PEACEZONE, val));+ } else if ("ishero".equalsIgnoreCase(a.getNodeName())) { boolean val = Boolean.valueOf(a.getNodeValue());Index: java/com/l2jserver/gameserver/skills/conditions/ConditionPlayerState.java===================================================================--- java/com/l2jserver/gameserver/skills/conditions/ConditionPlayerState.java (revision 4425)+++ java/com/l2jserver/gameserver/skills/conditions/ConditionPlayerState.java (working copy)@@ -74,6 +74,11 @@ if (player != null) return player.isInOlympiadMode() == _required; return !_required;+ case PEACEZONE:+ player = env.player.getActingPlayer();+ if (player != null)+ return isInsidePeaceZone(player) == _required;+ return !_required; } return !_required; }
Then add this
Code: Select all
<cond> <player peacezone="true" /> </cond>
Should allow your skills only in peace zone..
Re: How allow skill only in pease zone?
Posted: Mon Nov 29, 2010 1:47 pm
by surskis
Not works

Re: How allow skill only in pease zone?
Posted: Mon Nov 29, 2010 3:47 pm
by SolidSnake
Ops, my fault.. here the right patch
Code: Select all
Index: java/com/l2jserver/gameserver/model/base/PlayerState.java===================================================================--- java/com/l2jserver/gameserver/model/base/PlayerState.java (revision 4425)+++ java/com/l2jserver/gameserver/model/base/PlayerState.java (working copy)@@ -23,5 +23,6 @@ BEHIND, FRONT, CHAOTIC,- OLYMPIAD+ OLYMPIAD,+ PEACEZONE }Index: java/com/l2jserver/gameserver/skills/DocumentBase.java===================================================================--- java/com/l2jserver/gameserver/skills/DocumentBase.java (revision 4425)+++ java/com/l2jserver/gameserver/skills/DocumentBase.java (working copy)@@ -534,6 +534,11 @@ boolean val = Boolean.valueOf(a.getNodeValue()); cond = joinAnd(cond, new ConditionPlayerState(PlayerState.OLYMPIAD, val)); }+ else if ("peacezone".equalsIgnoreCase(a.getNodeName()))+ {+ boolean val = Boolean.valueOf(a.getNodeValue());+ cond = joinAnd(cond, new ConditionPlayerState(PlayerState.PEACEZONE, val));+ } else if ("ishero".equalsIgnoreCase(a.getNodeName())) { boolean val = Boolean.valueOf(a.getNodeValue());Index: java/com/l2jserver/gameserver/skills/conditions/ConditionPlayerState.java===================================================================--- java/com/l2jserver/gameserver/skills/conditions/ConditionPlayerState.java (revision 4425)+++ java/com/l2jserver/gameserver/skills/conditions/ConditionPlayerState.java (working copy)@@ -14,6 +14,7 @@ */ package com.l2jserver.gameserver.skills.conditions; +import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.base.PlayerState; import com.l2jserver.gameserver.skills.Env;@@ -74,6 +75,11 @@ if (player != null) return player.isInOlympiadMode() == _required; return !_required;+ case PEACEZONE:+ player = env.player.getActingPlayer();+ if (player != null)+ return player.isInsideZone(L2Character.ZONE_PEACE) == _required;+ return !_required; } return !_required; }
Then add this
Code: Select all
<cond msgId="2208"> <player peacezone="true" /> </cond>
Re: How allow skill only in pease zone?
Posted: Mon Nov 29, 2010 6:56 pm
by surskis
Thanks! all works fine

Re: How allow skill only in pease zone?
Posted: Wed Jul 27, 2011 7:20 pm
by darknessneo
wow, exactly what i needed. Thx alot
