Jump to content

Recommended Posts

Posted

Special Gatekeeper

 


 

Description: Normal Gatekeeper, but with special ability, to show how many players are inside those locations.

 

It may be easily edited,  for default it has only 3 locations, without subcategories etc, but if u wish may be added.

 

Its quest based, not an instance.

 

Also more statistics like player killers inside etc may be added (...) Sample screenshot:

 

fs6qp.jpg

 


 

package custom.SpecialGatekeeper;

import com.l2jarchid.Config;
import com.l2jarchid.gameserver.instancemanager.ZoneManager;
import com.l2jarchid.gameserver.model.actor.L2Character;
import com.l2jarchid.gameserver.model.actor.L2Npc;
import com.l2jarchid.gameserver.model.actor.L2Player;
import com.l2jarchid.gameserver.model.quest.Quest;
import com.l2jarchid.gameserver.model.quest.QuestState;
import com.l2jarchid.gameserver.model.zone.L2ZoneType;

/**
* @author Matim
* <br>Special Gatekeeper NPC.
* <br>Show current players count from zone.
* <br>This code may be easily edited.
* <br>By default it has few arenas teleports.
*/
public class SpecialGatekeeper extends Quest
{
protected static L2Player player;

private final static String qn = "SpecialGatekeeper";
private final static int NPC = Config.SPECIAL_GK_NPC_ID;

public SpecialGatekeeper(int questId, String name, String descr) 
{
	super(questId, name, descr);
	addFirstTalkId(NPC);
	addStartNpc(NPC);
	addTalkId(NPC);
}

@Override
public String onAdvEvent(String event, L2Npc npc, L2Player player)
{
	String htmltext = "";

	if(event.equalsIgnoreCase("1"))
		player.teleToLocation(73890, 142656, -3778);
	else if (event.equalsIgnoreCase("2"))
		player.teleToLocation(-86979, 142402, -3643);
	else if (event.equalsIgnoreCase("3"))
		player.teleToLocation(147451, 46728, -3410);
	else if (event.equalsIgnoreCase("4"))
		player.teleToLocation(12312, 182752, -3558);
	else	
		htmltext = "Error, check whole GK code!";
	return htmltext;
}

@Override
public String onFirstTalk(L2Npc npc, L2Player player)
{
	String htmltext = "";
	QuestState qs = player.getQuestState(qn);
	if (qs == null)
		qs = newQuestState(player);

	htmltext = "<html><title>Special Gatekeeper</title><head><body><center>" +
			   "<br><img src=l2ui.bbs_lineage2 height=16 width=80>" +
			   "<font color=AAAAAA>Special Gatekeeper</font><br>" +
                   "<img src=L2UI_CH3.herotower_deco width=256 height=32>" +
                   
                   "Players Inside: <font color=\"LEVEL\">" + getPlayerInsideCount(11600) + "</font>" +
                   "<button value=\"Aden\" action=\"bypass -h Quest SpecialGatekeeper 1\" back=\"L2UI_ch3.bigbutton_over\" fore=\"L2UI_ch3.bigbutton\" width=95 height=21><br>" +
                   
                   "Players Inside: <font color=\"LEVEL\">" + getPlayerInsideCount(10500) + "</font>" +
                   "<button value=\"Giran\" action=\"bypass -h Quest SpecialGatekeeper 2\" back=\"L2UI_ch3.bigbutton_over\" fore=\"L2UI_ch3.bigbutton\" width=95 height=21><br>" +
                   
                   "Players Inside: <font color=\"LEVEL\">" + getPlayerInsideCount(11012) + "</font>" +
                   "<button value=\"MOS\" action=\"bypass -h Quest SpecialGatekeeper 3\" back=\"L2UI_ch3.bigbutton_over\" fore=\"L2UI_ch3.bigbutton\" width=95 height=21><br>" +
                   
                   "Players Inside: <font color=\"LEVEL\">" + getPlayerInsideCount(11013) + "</font>" +
                   "<button value=\"VARKA\" action=\"bypass -h Quest SpecialGatekeeper 4\" back=\"L2UI_ch3.bigbutton_over\" fore=\"L2UI_ch3.bigbutton\" width=95 height=21><br>" +
			   
			   "Players Inside: <font color=\"PI\">" + getPlayerInsideCount(11013) + "</font>" +
                   "<button value=\"VARKA\" action=\"bypass -h Quest SpecialGatekeeper 4\" back=\"L2UI_ch3.bigbutton_over\" fore=\"L2UI_ch3.bigbutton\" width=95 height=21><br>" +

			   "<font color=\"cc9900\"><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></font><br1></center></body></head></html>";
			   
	return htmltext;
}

/**
 * @param zoneId
 * @return player count from given zone ID
 */
public static int getPlayerInsideCount(int zoneId)
{
	int i = 0;
	for (L2ZoneType zone : ZoneManager.getInstance().getAllZones())
		if (zone.getId() == zoneId)
		{
			for (L2Character character : zone.getCharactersInside().values())
				if (character instanceof L2Player)
					i++;
				return i;
		}
	return -1;
}

public static void main(String[] args)
{
	new SpecialGatekeeper(-1, qn, "SpecialGatekeeper");
}
}

Posted

sry , SpecialGatekeeper.java ? no need Scripts? custom/SpecialGatekeeper.java ?

 

Simply look at package.

Posted

wtf ?

 

[Hidden post: You need 200 posts to see it. You currently have 130.]

 

RapBoy,

Comment: nc work...nc share :)

Posts: 181

?

 

 

when the post was created, wasn't hidden at 200 post

Posted

when the post was created, wasn't hidden at 200 post

 

true, I do it after his reply.

 

Anyway. Matim awesome work. ;)

Posted

Matim, i haven't got 200 posts. Can u give me link to this share? I'll be very happy. I saw this gk 1 year ago and it was very nice.

 

1 year ago and the post was created on:

« on: August 25, 2011, 01:26:19 AM »

 

 

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

    • 📦 Mid-October Restock: All 12-18 Month Google One 5TB & Gemini Pro links tested and verified. Instant delivery on KloudItem.com!     FINAL CALL: Google is Shutting This Down After October 2026! Google will NEVER bring back this window of opportunity again. Once this month ends, this massive backdoor upgrade is gone permanently!  BUY 2, GET 1 FREE IS STILL LIVE! Stock up now for yourself, your family, your business, and your friends! Think about it: Every single person you know uses a Gmail account, and everyone is running out of storage. Don't let your loved ones get trapped paying $20–$30 every single month when you can set them up with 5TB Cloud Storage + Gemini Advanced (12–18 Months) right now for only $15! Why Buy Bulk Activations Today? Instant Gift Value: Perfect lifetime-style gift for clients, family, or team members. 100% Private & Safe: Activates on personal Gmails—zero passwords or logins required. Global Access: Works worldwide with zero VPN hassles. Instant Automated Delivery: Receive your activation links in seconds 24/7! ‍ Time is running out fast—secure your extra free licenses before the October deadline hits! Order Your Bundle Now on the Website
    • L2 WARFRONT - INTERLUDE FACTION PvP GRAND OPENING: 30 OCTOBER 2026 | 18:00 UTC    ANGELS VS DEMONS. TWO FACTIONS. ONE WAR. Tired of joining another Interlude server just to spend weeks farming before you can enjoy real PvP? L2 WARFRONT is a heavily customised Lineage 2 Interlude C6 Good vs Evil (GvE) server, built around continuous faction warfare, meaningful objectives and character progression through PvP. Our goal is simple: bring back the excitement of classic Interlude PvP while offering something different from the usual private server experience. CLOSED BETA COMPLETED - 110 PLAYERS PARTICIPATED! Our Closed Beta launched on 3 October, with 110 players. Players experienced real faction battles, tested class balance and helped us identify improvements before Grand Opening. We've listened to the feedback and are continuing to polish the experience for 30 October. Watch actual WARFRONT Closed Beta gameplay: https://www.youtube.com/watch?v=N09KbyAagh0 No cinematic trailers pretending to be gameplay. See the real fights for yourself! SERVER FEATURES FACTION WARFARE Angels vs Demons - two opposing factions Level 80 start with free starter equipment Approximately 25-minute rotating faction battles Moving frontline with capturable outposts Capture the Main Outpost and assault the enemy HQ Strategic respawn locations and battlefield objectives PvP-based rewards and progression MINI AND GRAND EVENTS 1v1, 2v2, 3v3 and 5v5 battles Team vs Team Capture the Flag King of the Hill Chaos and Deathmatch Daily Dion Faction Siege Weekly Giran Clan Siege Grand Boss faction battles Ranked 1v1 Olympiad CUSTOM PROGRESSION Character Mastery Gear Battle XP and equipment progression Battle Pass Custom class and faction balancing PvP rewards and achievements Clan recruitment system   BRING YOUR CLAN! Clan preregistration is already available through our Discord. Eligible preregistered clans can benefit from our special level 8 clan-start promotion. Whether you're coming with an organized clan, a few old friends or completely solo, there will be a place for you in the war. GRAND OPENING FRIDAY, 30 OCTOBER 2026 18:00 UTC / 21:00 MOSCOW Website: https://l2warfront.com Account Registration: https://l2warfront.com/register.html Discord: https://discord.gg/BGt5bfkrTw Closed Beta Gameplay: https://www.youtube.com/watch?v=N09KbyAagh0 Classic Interlude combat, completely reimagined around faction warfare. See you on the battlefield!
    • ⛔ 🔥 YOUR ISSUE DATE IS MATHEMATICALLY IMPOSSIBLE 🎂 On most US DLs the expiry lands on the holder's birthday. Not "around the same time" – exactly on the DOB. Month-day format, not day-month. 03/07 means March 7, not July 3. Mix up the order and you've birthed a date that never existed. Every template revision has a fixed revision date. On a 2012 California DL it's identical on all of them. Your own date – flag. Dates must chain: ISS plus term equals EXP. Break one link and the whole timeline is false. The machine checks arithmetic before it reads the name. 🐎 We verify dates against the state's official documentation before delivery. ✉️ US DL failing on flat ground? Send it – we'll audit the entire timeline. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #drawing #kyc #photoshop #DL #dates
    • 🔥⚔️ LINEAGE 2 REBORN SIGNATURE – CHARACTERS & ADENA FOR SALE! ⚔️🔥 💎 CHARACTERS FOR SALE ✨ Eva’s Saint – Level 78 👑 Noblesse ⚔️ Subclass: Titan 💰 Price: €500 🔥 Archmage 👑 Noblesse ⚔️ Subclass: Destroyer (Destro) – Level 75 💰 Price: €400 💰 ADENA FOR SALE 🪙 1 Billion Adena = €250 📌 Server: L2Reborn Signature 📩 WTS – Want to Sell! Interested in any of these offers? Don't hesitate to contact me! 📬 DM me for more detailed information, screenshots, and serious inquiries. ⚔️ Choose your character, boost your gameplay, and make your next move on L2Reborn Signature! 🔥 #Lineage2 #L2Reborn #L2RebornSignature #EvaSaint #Archmage #Titan #Destro #AdenaForSale #WTS
  • 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..