Jump to content

Multifunctionzone


^Wyatt

Recommended Posts

its tested :) so i posted :D

If you say so :troll:

 

@ Wyatt

if (pvp_enabled && (activeChar.getPvpFlag() == 0))
{
       activeChar.updatePvPFlag(1);
}

Dont you think dat would be cleaner/bettah?

if (pvp_enabled)
{
       activeChar.updatePvPFlag(1);
}

No difference if you're already flagged or not. I find it kinda useless hih :P

Edited by SweeTs
Link to comment
Share on other sites

If you say so :troll:

 

@ Wyatt

if (pvp_enabled && (activeChar.getPvpFlag() == 0))
{
       activeChar.updatePvPFlag(1);
}
Dont you think dat would be cleaner/bettah?

if (pvp_enabled)
{
       activeChar.updatePvPFlag(1);
}
No difference if you're already flagged or not. I find it kinda useless hih :P

 

Whatever, who cares of that, it's not gonna be commited anywhere and it works both ways so, QQ
Link to comment
Share on other sites

  • 3 weeks later...

Hello,

I use H5 Core rev 5667 so it's pretty close, yet I don't have the Java file "ZoneID.java", how can I make this work without that Java? I will share the code if someone helps me fix that problem :/ Also I will try to adapt to newest revision as I will use the newest revision as well later.

Edit: So I managed to adapt it to rev 5667 H5 stable:

http://pastebin.com/wiMKTScH

 

No errors etc in eclipse.

Console Error:

2013.11.06 21:25:25,934    WARNING    1    com.l2jserver.gameserver.instancemanager.ZoneManager    ZoneData: No such zone type: MultiFunctionZone in file: peace.xml

Anyone can help?

 

Best Regards,

DeathSpank287

Edited by DeathSpank287
Link to comment
Share on other sites

ZoneData: No such zone type: MultiFunctionZone in file: peace.xml

I believe your new file must be named MultiFunctionZone.xml .. :P

 

Edit: Or maybe not.. Well, just check :troll:

Edited by SweeTs
Link to comment
Share on other sites

ZoneData: No such zone type: MultiFunctionZone in file: peace.xml

I believe your new file must be named MultiFunctionZone.xml .. :P

 

Edit: Or maybe not.. Well, just check :troll:

 

Unfortunatelly, after reading you reply, I tried with negative results. Thanks though

Link to comment
Share on other sites

How can we remove clan of player and put it back when he goes out of the zone? But if he gets client crash his clan should be restored too.

 

You should play with CharInfo.java, so the effect will be just visual.

 

 

Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java    (revision 313)
+++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java    (working copy)
@@ -20,6 +20,7 @@
 import net.sf.l2j.gameserver.model.Location;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
 import net.sf.l2j.gameserver.skills.AbnormalEffect;
 
 public class CharInfo extends L2GameServerPacket
@@ -153,10 +154,20 @@
         else
             writeS(_activeChar.getTitle());
         
-        writeD(_activeChar.getClanId());
-        writeD(_activeChar.getClanCrestId());
-        writeD(_activeChar.getAllyId());
-        writeD(_activeChar.getAllyCrestId());
+        if(_activeChar.isInsideZone(ZoneId.ZONE_MULTIFUNCTION))
+        {
+            writeD(0);
+            writeD(0);
+            writeD(0);
+            writeD(0);
+        }
+        else
+        {
+            writeD(_activeChar.getClanId());
+            writeD(_activeChar.getClanCrestId());
+            writeD(_activeChar.getAllyId());
+            writeD(_activeChar.getAllyCrestId());
+        }
Edited by SweeTs
Link to comment
Share on other sites

 

You should play with CharInfo.java, so the effect will be just visual.

Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java    (revision 313)
+++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java    (working copy)
@@ -20,6 +20,7 @@
 import net.sf.l2j.gameserver.model.Location;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
 import net.sf.l2j.gameserver.skills.AbnormalEffect;
 
 public class CharInfo extends L2GameServerPacket
@@ -153,10 +154,20 @@
         else
             writeS(_activeChar.getTitle());
         
-        writeD(_activeChar.getClanId());
-        writeD(_activeChar.getClanCrestId());
-        writeD(_activeChar.getAllyId());
-        writeD(_activeChar.getAllyCrestId());
+        if(_activeChar.isInsideZone(ZoneId.ZONE_MULTIFUNCTION))
+        {
+            writeD(0);
+            writeD(0);
+            writeD(0);
+            writeD(0);
+        }
+        else
+        {
+            writeD(_activeChar.getClanId());
+            writeD(_activeChar.getClanCrestId());
+            writeD(_activeChar.getAllyId());
+            writeD(_activeChar.getAllyCrestId());
+        }

 

Thanks! Awesome!

Link to comment
Share on other sites

Hello,

Edit: So I managed to adapt it to rev 5667 H5 stable:

http://pastebin.com/wiMKTScH

 

No errors etc in eclipse.

Console Error:

2013.11.06 21:25:25,934    WARNING    1    com.l2jserver.gameserver.instancemanager.ZoneManager    ZoneData: No such zone type: MultiFunctionZone in file: peace.xml

Anyone can help?

 

Best Regards,

DeathSpank287

 

Anyone else can help?

Link to comment
Share on other sites

If you say so :troll:

 

@ Wyatt

if (pvp_enabled && (activeChar.getPvpFlag() == 0))
{
       activeChar.updatePvPFlag(1);
}

Dont you think dat would be cleaner/bettah?

if (pvp_enabled)
{
       activeChar.updatePvPFlag(1);
}

No difference if you're already flagged or not. I find it kinda useless hih :P

Whatever, who cares of that, it's not gonna be commited anywhere and it works both ways so, QQ

 

 

Actually it does make a difference! A BIG difference as I have previously shown. But I guess he likes bugs in his code.

 

"commited" to a mod? LoL. This isn't a svn, or a project, it's a mod, fix the stupid bug and get over it. It's not even that complete. You're actually missing many checks that should be in other parts of the core. If you would like to see a fully complete "pvp" flag zone, I'll be happy to share mine. For instance where are your checks in the ZoneManager class? Where are the security and zone checks in the MapRegionTable class? I could go on and on, but I won't. Fix the stupid bug and be done with it.

 

Just because "it works" , and really it doesn't work properly, doesn't mean it's perfect. Stop being so stubborn and ignorant and take advice and bug reports/corrections when given.

 

It can be exploited so people in the "zone" will eventually go back to unflagged status. Doesn't matter if it's an "enclosed" zone or not. Simply hit someone before you teleport or run in to the zone, wait 30-60 seconds after going in to the zone, and you will UNFLAG, if you have not died. If you attack people inside the zone it's simply delayed until you stop attacking + 30-60 seconds (depending on server config).

 

http://www.maxcheaters.com/topic/139771-multifunctionzone/page-9?do=findComment&comment=2245950

 

Wondering if I will be 'punished' with de-rep or whatever because I spoke the truth... Time will tell..

Edited by MlDNlGHT
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...