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'

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


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