Jump to content

Recommended Posts

Posted (edited)

this is the code i added, it's working

/*
 * This file is part of the L2J Mobius project.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.l2jmobius.gameserver.model.zone.type;

import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.zone.ZoneType;

/**
 * Bighead zones give entering players big heads
 * @author durgus
 */
public class FlagZone extends ZoneType
{
	public FlagZone(int id)
	{
		super(id);
	}
	
	@Override
	protected void onEnter(Creature creature)
	{
		if (creature instanceof Player)
		{
			SkillTable.getInstance().getSkill(1323, 1).applyEffects(creature, creature);
			((Player) creature).setPvpFlag(1);
			((Player) creature).sendMessage("You entered a Pvp Flag zone.");
			((Player) creature).broadcastUserInfo();
			
		}
	}
	
	@Override
	protected void onExit(Creature creature)
	{
		if (creature instanceof Player)
		{
			((Player) creature).stopSkillEffects(1323);
			((Player) creature).setPvpFlag(0);
			((Player) creature).sendMessage("You left the Pvp Flag zone.");
			((Player) creature).broadcastUserInfo();
			
		}
	}
	
	@Override
	protected void onDieInside(Creature creature)
	{
		onEnter(creature);
	}
	
	@Override
	protected void onReviveInside(Creature creature)
	{
		onEnter(creature);
	}
}
case "FlagZone":
{
      temp = new FlagZone(zoneId);
		break;
}

but primeval isle is set as town zone, i deleted primeval from PeaseZone, then changed type, then move it and changed type too but 0 effect... i am getting flagged in primeval but its set as town zone still so can't fight, what am i missing?

Edited by Dramzes
Posted

Primeval it is a town zone. check townzones xml an you will find it. change cordinates there to another place and you are done. do not delete town zone you will get error.

Posted
12 hours ago, andy1984 said:

Primeval it is a town zone. check townzones xml an you will find it. change cordinates there to another place and you are done. do not delete town zone you will get error.

oh man i am so stupid .... i was changing primeval from peace zone only... did not check townzone... thx a lot

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

    • Thank you for sharing this with us!   
    • Server L2 Reborn x1 C4 Signature   I am looking to buy a client modification, such as l2.ini or other possible files on the server The server uses SmartGuard protection, but as far as I understand, not all files are checked before launch   Сервер L2 Reborn x1 C4 Signature Ищу возможность приобрести модификацию клиента, например l2.ini или других возможных файлов на сервере. На сервере установлена защита SmartGuard, но, насколько я понимаю, не все файлы проверяются перед запуском. _______________________________________________________________ https://join.skype.com/invite/C72FPnumKn7e - Skype https://t.me/rebornclient - Telegram  
    • 🎉 The Big Moment Has Arrived! 🎉   Tomorrow is the day we've all been waiting for! L2KvN is opening its gates again, and we are waiting for you all to start this epic journey together! 🌟   🗓️ Date: November 17, 2024 ⏰ Time: 20:00 Greece (Athens), Russia (Moscow), Lithuania 18:00 United Kingdom 13:00 USA (Eastern Time), Argentina 10:00 AM US (Pacific Time) 14:00 Brazil 05:00 Russia (Vladivostok) ✨ What awaits you: ⚔️ Unique gameplay and intense PvP encounters 🎁 Exclusive events and rich rewards 👥 Live community and instant support 📈 Continuous upgrades for the ultimate experience 💬 Bring your friends, organize your teams, and get ready to conquer the world of L2KvN! 📢 Don't forget: We are here to help you! If you are a Clan Leader or Streamer, please contact us to become a part of this great community. 🛡️ The countdown is over – tomorrow we start! The game is just beginning… again! 💪   🌍 Dating in the world of L2KvN!
    • Very cool.   Unfortunately, I can't afford this fee.
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
  • Topics

×
×
  • Create New...