How allow skill only in pease zone?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
How allow skill only in pease zone?
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
» Find Revision
L2J Revision Number:4425
L2JDP Revision Number:7669
I have no ideas how to make it...
Thanks in advice
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: How allow skill only in pease zone?
Create new condition.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
And how i can make it?
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: How allow skill only in pease zone?
here's one good example:
viewtopic.php?p=106310#p106310
viewtopic.php?p=106310#p106310
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
Thanks jurchiks for exaple. 

-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
Maybe is posible make as
but with pease zone ?
Code: Select all
<cond msgId="113" addName="1"> <and> <player SiegeZone="126" /> </and> </cond>
-
- Posts: 16
- Joined: Fri Jul 16, 2010 6:15 pm
Re: How allow skill only in pease zone?
SiegeZone="126"surskis wrote:Maybe is posible make asbut with pease zone ?Code: Select all
<cond msgId="113" addName="1"> <and> <player SiegeZone="126" /> </and> </cond>
change whit ID of zone where you want and you are done!

-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
what mean 126?
-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
Who can explain to me, what 126 mean in
Code: Select all
<cond msgId="113" addName="1"> <and> <player SiegeZone="126" /> </and> </cond>
- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
Re: How allow skill only in pease zone?
Try this patch (untested)
Then add this
Should allow your skills only in peace zone..
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; }
Code: Select all
<cond> <player peacezone="true" /> </cond>

-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
Not works 

- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
Re: How allow skill only in pease zone?
Ops, my fault.. here the right patch
Then add this
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; }
Code: Select all
<cond msgId="2208"> <player peacezone="true" /> </cond>

-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: How allow skill only in pease zone?
Thanks! all works fine 

-
- Posts: 196
- Joined: Mon Apr 26, 2010 11:00 pm
Re: How allow skill only in pease zone?
wow, exactly what i needed. Thx alot 
