Jump to content
  • 0

how to set a place as party zone


Question

Posted

Hello all..i was wondering how i can set a place as party zone..(i have multifunction code also may i can do it from there? and how.) also if the player isn't in a party of 5+ players he will not be aible to walk in party area that i will set for...
sorry for bad english..

7 answers to this question

Recommended Posts

  • 0
Posted

Create new zone and add check inside onEnter() method.

 

if ((player.isInParty() && player.isPartyLeader()) || (player.isInParty() && player.getParty().getPartyleader().isInInside(ZoneId.PARTY_ZONE)))
{
	// allow here.
}

 

  • 0
Posted
On 9/18/2020 at 9:46 PM, Rootware said:

Create new zone and add check inside onEnter() method.

 


if ((player.isInParty() && player.isPartyLeader()) || (player.isInParty() && player.getParty().getPartyleader().isInInside(ZoneId.PARTY_ZONE)))
{
	// allow here.
}

 

this, but also you need to change the requestleaveparty so the player wont be able to leave if he is in the zone, or you can make it so that if the player leaves the party then he is automaticaly teleport in town

  • 0
Posted
11 hours ago, Jobalabido said:

this, but also you need to change the requestleaveparty so the player wont be able to leave if he is in the zone, or you can make it so that if the player leaves the party then he is automaticaly teleport in town

Also he has to handle disconnects 

  • 0
Posted
4 hours ago, MoNsT3ReN4RgY said:

hello all..i found this code for donatorzone..is it possible to work for my situation?

 

https://www.l2jbrasil.com/topic/134182-l2jfrozen-zonas-protegidas-isnewbie-ishero-isdonator/

We can't see the post, can you copy the code on pastebin?

  • 0
Posted (edited)
public class L2DonatorZone extends L2ZoneType
{
	public L2DonatorZone (final int id)
	{
		super (id);
	}
 
	@Override
	protected void onEnter (final L2Character character)
	{
		if (character instanceof L2PcInstance)
		{
          L2PcInstance player = (L2PcInstance)character;
			if (player.getParty()==null || player.getParty.getMembers.size<6){//if player in not in party or if party has 5 or less people
				player.sendMessage ("You need a party of 6 or more people to enter this zone");
				player.teleportTo(1,1,1);//teleport to another location
			}
          player.setInPartyZone(true);
		}
	}
 
	@Override
	protected void onExit (final L2Character character){
      	L2PcInstance player = (L2PcInstance) character;
      	player.setInPartyZone(false);
	}
 
	@Override
	protected void onDieInside (final L2Character character){
	}
 
	@Override
	protected void onReviveInside (final L2Character character){
	}
 
}

So you will need to make a variable private boolean _isInPartyZone = false; and two methods

public void setInPartyZone(boolean b){_isInPartyZone = b;} and 
public boolean getInPartyZone(){return _isInPartyZone;} inside L2PcInstance.
Then you will have to find the requestLeave(i don't know the name of the packet) and write something like: if(player.getInPartyZone())return; or disable /leave command when he is in that zone, sorry for the abstract second part of the code but I don't know the packet :(. Also some of the methods my need adjustment, i have never worked on l2jfrozen

Edited by Jobalabido

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • - CHAPTER IV NEW START FROM 16.MAY.2026 - RATES Experience (EXP) 30x Skill Points (SP) 30x Adena 10x Drop for Spoil 10x General Drop 10x RaidBoss Drop 3x Manor 4x Quest Drop 2x Quest Reward 3x Fishing Drop 10x Vitality System 25x Clan Reputation Point 2x ENCHANTS Safe Enchant +3 Max. Enchant +16 Normal Scroll chance 70% Blessed Scroll chance 80% Max donation enchant is +8 Yogi event enchant rate is 35% -Olf Max Enchant +9 enchant rates: +1 to +3 100%, +4 65%, +5 65%, +6 60%, +7 60%, +8 50%, +9 45% Elemental Max. Level Level 7 Elemental Stone chance 55% Elemental Crystal chance 50% CONFIGURATION Buffs, Dances, Songs Duration 2 hours Buff Slots 28+4+12 Max. Clients per PC 2 / IP 4 Olympiads Max. Enchant +8 Premium Geodata and Pathnodes Sub-Class Max. Level 85 Offline Shop mode Auto Learn Skills Vitality System Champions System Wedding System Class Master AUTO EVENTS Team vs. Team Last Man Standing Treasure Hunt Korean Style Capture the Flag Lucky Creatures Protect the King Russian Roulette Fight For Throne Deathmatch Domination TvT VIP Advanced Zombies Treasure Hunt No-PvP Hunting Grounds Mass Domination Lucky Chests Mutant Battlefields Mini Events Rabbits Simon Says Summer Meleons Pirates Treasure Hitman - Bounty Hunters Medal Collector Boss Random Etc. RAIDS RESPAWN TIME Valakas 72 hours / 24 hours random spawn Antharas 72 hours / 8 hours random spawn Baium 48 hours / 2 hours random spawn Baylor 24 hours/ 12 hours random spawn Beleth 48 hour OTHER Special Goddess of Destruction and Heroic Cloaks Goddess of Destruction .dress me Armors PvP + Rank + RPC Reward system Daily Quests available in community board New Achievements system Tournament system 1vs1 + Daily Tournament Academy Search for newbies, with payment Party Matching with class filter and manage Register to Fortress Siege as single player Cancelled buffs will return in 60 seconds (disabled) Improved .acpon will use now: MP, CP, GCP, GHP. SOULS Maximum number of slots for Private Store is 50 The maximum level for subclass is up to level 85 Multiple commands with advanced options, see them in com board You can view a monster drop rate and list by using shift+click Olympiad - Heroes are formed every Saturday at 01:05 GMT+2 Advanced Community Board with lots of new features for perfect play Advanced NPC buffer with almost all skills and up to 4 schemes per character Special Quiz event every 5 hours with over 500 questions and good reward Custom special Raids with special drop, with A.I against bots All major raids drop Donation Coins and Divine S Scrolls Super T.Rex with better drop and starting premium pets Glittering Medals from all mobs to exchange for special items Reduced number of clan members to raise the clan level and less reputation required Clan / Alliance has a reduced penalty AutoFarm, Community Cleaner, Weapon Repair system, Player Info, Server Online Statistics And many more... http://l2viserion.com https://www.facebook.com/l2viserion
    • - CHAPTER IV NEW START FROM 16.MAY.2026 - RATES Experience (EXP) 30x Skill Points (SP) 30x Adena 10x Drop for Spoil 10x General Drop 10x RaidBoss Drop 3x Manor 4x Quest Drop 2x Quest Reward 3x Fishing Drop 10x Vitality System 25x Clan Reputation Point 2x ENCHANTS Safe Enchant +3 Max. Enchant +16 Normal Scroll chance 70% Blessed Scroll chance 80% Max donation enchant is +8 Yogi event enchant rate is 35% -Olf Max Enchant +9 enchant rates: +1 to +3 100%, +4 65%, +5 65%, +6 60%, +7 60%, +8 50%, +9 45% Elemental Max. Level Level 7 Elemental Stone chance 55% Elemental Crystal chance 50% CONFIGURATION Buffs, Dances, Songs Duration 2 hours Buff Slots 28+4+12 Max. Clients per PC 2 / IP 4 Olympiads Max. Enchant +8 Premium Geodata and Pathnodes Sub-Class Max. Level 85 Offline Shop mode Auto Learn Skills Vitality System Champions System Wedding System Class Master AUTO EVENTS Team vs. Team Last Man Standing Treasure Hunt Korean Style Capture the Flag Lucky Creatures Protect the King Russian Roulette Fight For Throne Deathmatch Domination TvT VIP Advanced Zombies Treasure Hunt No-PvP Hunting Grounds Mass Domination Lucky Chests Mutant Battlefields Mini Events Rabbits Simon Says Summer Meleons Pirates Treasure Hitman - Bounty Hunters Medal Collector Boss Random Etc. RAIDS RESPAWN TIME Valakas 72 hours / 24 hours random spawn Antharas 72 hours / 8 hours random spawn Baium 48 hours / 2 hours random spawn Baylor 24 hours/ 12 hours random spawn Beleth 48 hour OTHER Special Goddess of Destruction and Heroic Cloaks Goddess of Destruction .dress me Armors PvP + Rank + RPC Reward system Daily Quests available in community board New Achievements system Tournament system 1vs1 + Daily Tournament Academy Search for newbies, with payment Party Matching with class filter and manage Register to Fortress Siege as single player Cancelled buffs will return in 60 seconds (disabled) Improved .acpon will use now: MP, CP, GCP, GHP. SOULS Maximum number of slots for Private Store is 50 The maximum level for subclass is up to level 85 Multiple commands with advanced options, see them in com board You can view a monster drop rate and list by using shift+click Olympiad - Heroes are formed every Saturday at 01:05 GMT+2 Advanced Community Board with lots of new features for perfect play Advanced NPC buffer with almost all skills and up to 4 schemes per character Special Quiz event every 5 hours with over 500 questions and good reward Custom special Raids with special drop, with A.I against bots All major raids drop Donation Coins and Divine S Scrolls Super T.Rex with better drop and starting premium pets Glittering Medals from all mobs to exchange for special items Reduced number of clan members to raise the clan level and less reputation required Clan / Alliance has a reduced penalty AutoFarm, Community Cleaner, Weapon Repair system, Player Info, Server Online Statistics And many more... http://l2viserion.com https://www.facebook.com/l2viserion
    • TG Support: Buying Proxy | Channel: Buying Proxy Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server! Create your account for free here
    • It’s been a while since this situation started. As I’ve mentioned before, you are no longer kids you’re grown adults. Please resolve your disagreements through DMs, not forum threads.   I understand that you are competitors, but the rest of the community isn’t interested in your disputes. Stop publicly accusing each other and focus on handling issues privately.   The reputation system is not to be abused. Hearing complaints like “he downvoted me” every day is not productive. This thread will remain locked. Please grow up and handle your problems through private messages.
    • It's owned by a person from down under. Nikita is not even a CEO.     Another honorable mention of who does actually hold a sort of authority: Troyz.     The project itself is - or, at least, used to be TERRIBLY corrupt and is known for having multiple alts on maxcheaters selling fabricated items in the past.        P.S. Their staff split up and the leftovers formed a new project called "darkdragon", utilizing old database of Reborn they had for marketing purposes.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..