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.



×
×
  • Create New...