Jump to content
  • 0

Question

Posted

Hi. J look for code Queen Ant protection. When player lvl 49+ go do q.ant zone, then his teleported  to outdoor nest. Enter only players lvl 40 - 49 . I found the following codes but it does not work maybe you could help
 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/model/zone/type/L2BossZone.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/zone/type/L2BossZone.java	(revision 1113)
+++ head-src/com/l2jfrozen/gameserver/model/zone/type/L2BossZone.java	(working copy)
@@ -137,6 +137,13 @@
 					return;
 				}
 				
+				if (!player.isGM() && (player.getLevel() < 40 || player.getLevel() > 49) && getId() == 12019)
+				{
+					player.sendMessage("Only players with level 40-49 can enter on Queen Ant zone!");
+					player.teleToLocation(MapRegionTable.TeleportWhereType.Town);
+					return;
+				}
+				
 				// if player has been (previously) cleared by npc/ai for entry and the zone is
 				// set to receive players (aka not waiting for boss to respawn)
 				if (_playersAllowed.contains(character.getObjectId()))
[code]

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

Give a try here

                if (getId() == 12019 && (!player.isGM() && player.getLevel() > 49))
                {
                    player.sendMessage("Only players with level 40-49 can enter on Queen Ant zone!");
                    player.teleToLocation(MapRegionTable.TeleportWhereType.Town);
                    return;
                }
Edited by 'Baggos'
  • 0
Posted

 

if (getId() == 12014)
{
if (player.getLevel() < 40 || player.getLevel() < 49)
{
player.sendMessage("Only players with level 40-49 can enter on Queen Ant zone!");
player.teleToLocation(MapRegionTable.TeleportWhereType.Town);
return;
} 
}
  • 0
Posted

if (getId() == 12014)
{
if (player.getLevel() < 40 || player.getLevel() < 49)
{
player.sendMessage("Only players with level 40-49 can enter on Queen Ant zone!");
player.teleToLocation(MapRegionTable.TeleportWhereType.Town);
return;
} 
}

I forgot for low from 40 level.

You have a mistake...

 

if (player.getLevel() < 40 || player.getLevel() < 49)

 

Now only players with 49+ level goes there.. :P

 

Also, what if is:

if (getId() == 12019 && (!player.isGM() && player.getLevel() < 40) && player.getLevel() > 49)
{

or

if (getId() == 12014)
{
if (player.getLevel() < 40 || player.getLevel() < 49)
{

?

  • 0
Posted (edited)

I forgot for low from 40 level.

You have a mistake...

Now only players with 49+ level goes there.. :P

 

Also, what if is:

if (getId() == 12019 && (!player.isGM() && player.getLevel() < 40) && player.getLevel() > 49)
{

or

if (getId() == 12014)
{
if (player.getLevel() < 40 || player.getLevel() < 49)
{

?

didnt read replies indeed i got error 

wtf

 

edited, i am so damn high today

 

yes indeed i was wrong n lvl 49

 

also i dont read replies

 

 

edit too 

 

i just like to read the 1st statement if it is the id true 

then if the rest is true , continue procedure, coding styles :d

Edited by Ayami-
  • 0
Posted (edited)

Sit to see if we were right though. :P

To see what he will say when connected..

 

 

 

 


edited, i am so damn high today

I want and i to be high...  a good cigarette. haha

Edited by 'Baggos'

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
Answer this question...

×   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

    • Fix Visual Boundary for AutoFarm when entering a new zone. Fix Assassin Interface Automatic SoulShot usage. Fix Assassin Interface not displaying Castle/Base. Fix Achievements displaying item rewards for CommunityBoard & NPC. Fix Prevent players from purchasing their own Auctioned items. Added ''.raid'' and ''.achievement'' commands. Added support for multiple currencies on Auction Added Search feature to Auction. Added Offline Stores Added '.exit' & '.quit' command to Dungeon System so players can now exit/quit dungeons Added VIP Account System (Alternative XP, SP & Drop Rates, Unlocks Costumes) Added Loot Box System Changed DungeonsManager now displays reward list on dungeon pages. Changed GlobalShop to include pages for all currencies. HTML/XML edits
    • When I teleport to town, my current location is differ from the map. How do I fix this?    
    • A New Chapter Begins We're Rebuilding – Join Our Staff Team After many years of activity, growth, and challenges, it’s finally time for our community to restructure and move forward. We’re ready to turn a new page and evolve into something greater — but we can’t do it without the help of passionate and committed people. That’s why we’re now opening up staff applications for those who want to actively shape the future of our community. If you have the motivation, time, and patience to contribute to something meaningful, this is your chance to step in and make a real impact. What We're Looking For We’re building a fresh and dedicated team of individuals who are ready to support and grow this project. Open roles include: Moderators – to keep the forum clean, safe, and organized Gaming Moderators – to help manage gaming boards (e.g., Lineage, GTA FiveM) Content Creators – to post updates, guides, and articles Community Managers – to engage users and drive activity Technical Staff – for development, backend, and server work We’re not focusing only on Lineage anymore. Our vision is expanding to new areas — including GTA FiveM and other multiplayer games you might have expertise in. If you have a good idea, a server plan, or something new to suggest — we’re open to it. Now’s the time to bring it forward. Requirements We’re looking for individuals who have: A history of activity on the forum (preferred) Available time to contribute consistently A sense of teamwork and responsibility A genuine interest in gaming and community building If you're interested, just send a private message to me or Celestine. (or just reply here) Tell us a few things about yourself and how you’d like to contribute. Let’s bring this community back to life. Let’s rebuild something great — together.   M M G A 
  • Topics

×
×
  • Create New...