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




  • Posts

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...