Jump to content

Multifunctionzone


^Wyatt

Recommended Posts

7 minutes ago, MaDu7zU said:

l2jAcis 

Bug: When someone kills another players and will survive...he will deflag after 30 seconds or so.

Just need to check that player isinside this zone updatepvpflag

Link to comment
Share on other sites

49 minutes ago, Reborn12 said:

Just need to check that player isinside this zone updatepvpflag

 

	@Override
	protected void onEnter(L2Character character)
	{
		character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
		character.setInsideZone(ZoneId.MULTI_FUNCTION, true);
		
		if (character instanceof L2PcInstance)
		{
			L2PcInstance activeChar = ((L2PcInstance) character);
			if (classes != null && classes.contains(""+activeChar.getClassId().getId()))
			{
				activeChar.teleToLocation(147448, 26850, -2200, 0);
				activeChar.sendMessage("Your class is not allowed in the flag zone.");
				return;
			}
			
			for (L2ItemInstance o : activeChar.getInventory()._items)
			{
				if (o.isEquipable() && o.isEquipped() && !checkItem(o))
				{
					int slot = activeChar.getInventory().getSlotFromItem(o);
					activeChar.getInventory().unEquipItemInBodySlotAndRecord(slot);
					activeChar.sendMessage(o.getItemName()+ " unequiped because is not allowed inside this zone.");
				}
			}
			
			if (give_noblesse)
				noblesse.getEffects(activeChar, activeChar);
			if (pvp_enabled)
				activeChar.updatePvPFlag(1);
			
			activeChar.sendMessage("You entered in a flag zone.");
			clear(activeChar);
		}
	}

Here?

 

 

The only line with isInsideZone is this one:

	public static void givereward(L2PcInstance player)
	{
		if (player.isInsideZone(ZoneId.MULTI_FUNCTION))
		{
			for (int[] reward : rewards)
			{
				PcInventory inv = player.getInventory();
				inv.addItem("Custom Reward", reward[0], reward[1], player,  player);
			}
		}
	}

Should i put here like this:

	public static void givereward(L2PcInstance player)
	{
		if (player.isInsideZone(ZoneId.MULTI_FUNCTION))
		{
			for (int[] reward : rewards)
			{
				PcInventory inv = player.getInventory();
				inv.addItem("Custom Reward", reward[0], reward[1], player,  player);
			}
			if (pvp_enabled)
				activeChar.updatePvPFlag(1);		
		}
	}

 

 

Found 1 more bug. When some1 hits another player and enter the zone already flagged. In 30 seconds its deflagged

Edited by MaDu7zU
Link to comment
Share on other sites

  • 1 month later...

Hello Guys, the diff patch doesn't work for me in L2jFrozen, i've setted it up in core and in config/ini file, i haven't 0 errors in Eclipse and seem to doesn't work nothing from it why? I have not errors in GameServer console.

Here is my MultiFunctionZone.ini ( i've tried the same and as MultiFunctionZone.properties)
My PvP zone is Primeval Isle!

 

# ---------------------------------------------------------------------------
# MultiFunctionZone - custom addon for your server
# ---------------------------------------------------------------------------
# This option will turn on PvP flag to all people when entering to the zone
EnablePvP = True

# If set to false, zone will be no-restart zone
NoRestartZone = True

# If set to false, zone will be no-logout zone
NoLogoutZone = True

# If set to false, zone will be no-store zone
NoStoreZone = True

# Give noblesse after revive?
ReviveNoblesse = True

# Heal after revive?
ReviveHeal = True

# Delay, in seconds, to wait before revive
# 0 to disable
ReviveDelay = 0

# Set the spawn points where players will be teleported on revive, if enabled
# example:10711,-24437,-3643;9180,-24096,-3754;7911,-22713,-3685;6990,-22554,-3442;4892,-23466,-3745
SpawnLoc = 10711,-24437,-3643;9180,-24096,-3754;7911,-22713,-3685;6990,-22554,-3442;4892,-23466,-3745

# Random respawn radius
RespawnRadius = 900

# If set to true, players will take noblesse blessing when entering
GiveNoblesse = True

# Remove buffs when entering to the zone
RemoveBuffs = False

# Remove pets when entering to the zone
RemovePets = False

# Special rewards when hunting inside this zone
# example: 9999,1
Rewards = 9999,1

# List of Items(id's) that won't be usable inside this area and also will be unequiped when entering
# (armor, weapons, scrolls, potions, etc), example: 728,7575, 6383, 1538
Items = 

# List of Grades that won't be usable inside this area and also will be unequiped when entering
# example: D,C,B,A,S,S80,S84
Grades = 

# Items with this enchant or more won't be usable inside this area and also will be unequiped when entering
# 0 to disable
Enchant = 0

# Players with one of that classes won't be able to enter to the zone
# example: 93,85,12
Classes = 


P.S. Should i change something and in zone.xml because i use it as it is provided from the diff patch, i didn't changed nothing there.
 

        <zone id="16385" name="Custom" type="MultiFunctionZone" shape="NPoly" minZ="-15000" maxZ="-10000">
             <node X="130000" Y="160000" />
             <node X="130000" Y="130000" />
             <node X="160000" Y="130000" />
             <node X="160000" Y="160000" />
        </zone>


Thank you in advance guys!

King Regards
 

Edited by Rydar
Link to comment
Share on other sites

  • 1 month later...

another way to convert this into INT i get error 
 

	       public static boolean checkItem (ItemInstance item)
       {
                   int o = item.getItem().getCrystalType();    <- on this line after = 


l2jacis

Edited by Xenokage
Link to comment
Share on other sites

2 hours ago, Xenokage said:

another way to convert this into INT i get error 
 


	       public static boolean checkItem (ItemInstance item)
       {
                   int o = item.getItem().getCrystalType();    <- on this line after = 


l2jacis

i dont know why you need this, but its logical error since you trying to convert enum to int.

item.getItem().getCrystalType().ordinal();

 

Link to comment
Share on other sites

i dont know why you need this, but its logical error since you trying to convert enum to int.


item.getItem().getCrystalType().ordinal();

 

thank you

Edited by Xenokage
Link to comment
Share on other sites

  • 6 months later...

Hello, acis 370 rev, maybe anyone can help me fix? 

 

    [javac] C:\Users\Gezis\aCis_gameserver\java\net\sf\l2j\gameserver\model\zone\type\L2MultiFunctionZone.java:125: error: cannot find symbol
    [javac] 			ThreadPool.getInstance().scheduleGeneral(new Runnable()
    [javac] 			          ^
    [javac]   symbol:   method getInstance()
    [javac]   location: class ThreadPool
    [javac] 1 error

BUILD FAILED

Reborn12 (helping me) Thanks to him.

One more question, how to add button to village or revive? Or only to village button if revive function on, because if need go to town it can't because always flag and pvp.

 

Edited by Gezis
Link to comment
Share on other sites

  • 1 month later...

i have 2 problem in my server and i dont know how to fix .

 

one problem is when 1 player hit  another player and wait for 20 sec . is unflaged .

 

and 2 problem is i need to come out ( to village button)

 

i have look post here but i cant fix pliz help me . 

 

l2jacis pack  interlude 

Edited by xrhstos1994
Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

i have l2jfrozen  my mind is gonna explode :D i have adpat everything the zone is working but the weird think is and my problem if i use the zone 1632 that someone suggested i dont get pvp, but if i use the normal zone the  16385 iget pvp but my char speed goes to 66 only when is in the zone i dont get that what i have done wrong? so if i use other zone ids my pseed is fine dont get pvp i am confused 

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
  • 4 months later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...