Jump to content
  • 0

Fandc Pvp Zone Code (Need Help)


flexcomunicacion

Question

Hello, Im working on a server bassed on fandc project. Right now Im trying to implement a pvp zone. I have this script but I can't make it work in the right way because after some minutes the player gets unflagged. So if someone can help me to make it works and the player to stay flagged until he leave the zone I would apreciate. (Sorry for my English).

 

This is the code:

 

 

 

package zones;
 
import l2f.gameserver.listener.zone.OnZoneEnterLeaveListener;
import l2f.gameserver.model.Creature;
import l2f.gameserver.model.Player;
import l2f.gameserver.model.Zone;
import l2f.gameserver.scripts.ScriptFile;
import l2f.gameserver.utils.ReflectionUtils;
 
 
public class PvPZone implements ScriptFile
{
private static ZoneListener _zoneListener;
 
// Minimum level for allow inside PvP Zone
private static int PVPZONE_MIN_LEVEL = 84;
 
// Teleport location of character if he doesn't meet the criteria when he is trying enter in PvP Zone
private static int PVPZONE_X = 82698;
private static int PVPZONE_Y = 148638;
private static int PVPZONE_Z = -3472;
 
@Override
public void onLoad()
{
_zoneListener = new ZoneListener();
Zone zone = ReflectionUtils.getZone("[pvp_zone]");
zone.addListener(_zoneListener);
 
 
}
 
@Override
public void onReload()
{
 
}
 
@Override
public void onShutdown()
{
 
}
 
public class ZoneListener implements OnZoneEnterLeaveListener
{
 
@Override
public void onZoneEnter(Zone zone, Creature cha)
{
if(zone.getParams() == null || !cha.isPlayable())
return;
 
// Level
if(cha.getLevel() < PVPZONE_MIN_LEVEL)
{
cha.sendMessage("Level " + PVPZONE_MIN_LEVEL + " o mayor es necesario para entrar.");
cha.teleToLocation(PVPZONE_X, PVPZONE_Y, PVPZONE_Z);
}
else
{
cha.getPlayer().sendMessage("Cuidado! Haz entrado en una zona PvP!");
cha.getPlayer().sendMessage("Si no tienes lo necesario abandona este lugar inmediatamente!");
cha.startPvPFlag(null);
 
}
 
@Override
public void onZoneLeave(Zone zone, Creature cha)
{
 
}
}
}

 

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

after some minutes the player gets unflagged. So if someone can help me to make it works and the player to stay flagged until he leave the zone I would apreciate. (Sorry for my English).

Maybe (And I say maybe, because your code is a mess), but you should go at L2PcInstance and find the method updatePvPStatus

public void updatePvPStatus(L2Character target)

And add your zone there. For example:

(It is better if you move your zone with the others zones package).

	@@ -4190,6 +4190,9 @@
	        if (isInDuel() && player.getDuelId() == getDuelId())
	            return;
	+      
	+       if ((isInsideZone(ZoneId.FLAG) && target.isInsideZone(ZoneId.FLAG)))
	+           return;
	+
Link to comment
Share on other sites

  • 0

 

Maybe (And I say maybe, because your code is a mess), but you should go at L2PcInstance and find the method updatePvPStatus

public void updatePvPStatus(L2Character target)

And add your zone there. For example:

(It is better if you move your zone with the others zones package).

	@@ -4190,6 +4190,9 @@
	        if (isInDuel() && player.getDuelId() == getDuelId())
	            return;
	+      
	+       if ((isInsideZone(ZoneId.FLAG) && target.isInsideZone(ZoneId.FLAG)))
	+           return;
	+

Ty so much, I will test it :)

Link to comment
Share on other sites

  • 0

You can make new Runnable that will:

- run every few seconds

- iterate though all players

- find those who are in the zone

- use startPvPFlag on them

Link to comment
Share on other sites

  • 0

@vampir

That sounds so freaking bad :P

 

Simply find piece of code to cancel the flag if inside zone, as suggested above. Find the check for PVP / ARENA zone and do the same. What you want to do, already exists as flag is ignored inside arenas.

Link to comment
Share on other sites

  • 0

Hello again. It don't works... I think I need a function to execute cha.startPvPFlag(null); every xx seconds while in zone :(

And why startPvPFlag? Use updatePvPFlag(1); 

Try this http://pastebin.com/52pdJiWn

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

    • ( Al Twar)][@][( +971552965071 )][ Cytotec Pills in Sharjah, Abu Dhabi/Al ain Deira, Dubai Mall, Dubai Al Quoz Muteena Al Nadha  A 30% DISCOUNT ABORTION +27632505360 CLINIC IN SHARJAH, DUBAI, UAE // QATAR, DOHA, SAUDI ARABIA BAHRAIN, LEGAL & PAIN FREE // SAFE IN , KUWAIT, OMAN, MANAMA//+27632505360 v Al Nahda Women’s Clinic+27632505360 Medical abortion is a term applied to an abortion brought about by medication taken to induce it. This can be accomplished with a variety of medications given either as a single pill or a series of pills and it much safer than surgical abortions. Contact Us To Make An Appointment! On  Abortion pills RU486 (Mifepristone) and Cytotec (Misoprostol) came into use in the early 1990s. RU486 alone or with Cytotec give excellent results when used correctly. RU486 is available only in few countries. In Singapore, the HSA has not approved the use of RU486. Even Cytotec is not licensed for abortion. Studies have confirmed the use of Cytotec before standard abortion procedures have improved safety (that is, less complication) and reduced procedure discomfort. Injudicious use of Cytotec has however resulted in serious side effects to the pregnant women with few deaths reported. These women include those who have already given birth to three or more children, who have not passed their PSLE or have no secondary education, and who are non-Singaporean. Minimizing Abortion Complication Every surgical procedure has its complication. Abortion or termination of pregnancy is no exception. The reason to legalize abortion was to prevent the serious complications that a ccompany back-street abortions. Gynecologists receive extensive training surgery of the womb and when it is performed in the right set-up, the risk of the procedure is substantially reduced. Injury to Womb When TOP is performed, the neck of the womb has to be progressively dilated to a diameter that allows the smallest appropriate vacurette to be used. If the neck is dilated less than adequate, subsequent insertion of other instruments will be difficult and increased the risk the uterus being pierced through by the instruments. Perforating the uterus does no permanent harm to the uterus but additional steps have to be taken to ensure that other abdominal organs are not injured by the event. 
    • Legal Abortion From 1-27 Weeks | Safe Abortion Pills For Sale +27632505360. CALL OR WHATSAPP US NOW : SCHONE  +27632505360 treatment at home Al Ain Al *Satwa* +971552965071_____________________Ajman MA +971552965071 *Price Abortion Pill* in Abu Dhabi *Satwa* ABORTION PILLS FOR SALE IN Dubai mifepristone cost In Ajman +27632505360 Abortion Pill99/Cytotec in Satwa JVC/ Al ain/ Ajman/ Ras Al Khaimah/ UAE mifepristone cost In Ajman Al Aziziyah +971552965071 ________ABORTION PILLS FOR SALE IN DUBAI ABORTION PILLS FOR SALE IN ABU DHABI ABORTION PILLS FOR SALE IN SHARJAH ABORTIaON In the Middle East countries such as UAE( Abu Dhabi, Dubai, Sharjah, Ajman, Umm Al-Quwain, and Fujairah), Kuwait, Qatar, etc., the laws and regulations are based on Islam. Islam forbids killing a life. Islam considers that an individual will have a life after he has attained a soul. It is believed that the fetus attains the soul after 120 days of fertilization. The four schools of thought: Hanafi, Shafi, Hanbali, and Maliki, have different views regarding the abortion of pregnancy. According to the Hanafi school, it is believed that the fetus attains the soul after 120 days of gestation. In contrast, the Maliki school believes that the fetus is ensouled at the point of conception, so abortion is not allowed at any stage of pregnancy. The Shafi school believes that the fetus is ensouled at 80 days, so abortion is only allowed until 80 days. The Hanbali school believes that the fetus attains the soul at 40 days. Some scholars believe that the child of rape is also legitimate, so it is a sin to kill a child. Pregnant mothers have to face a lot of difficulties if they want to abort their child. A woman cannot terminate an unplanned or unwanted pregnancy unless the health of the woman is in danger. The laws of the UAE permit abortion before 120 days of conception. Article 340 of the UAE Penal Code mentions that any woman who undergoes an abortion will be detained for a maximum of one year period and/or fine not exceeding ten thousand dirhams. Safe abortion methods for various stages of pregnancy: UAE Sharjah Dubai Abu Dhabi · Ajmān · Al Ain · Al Awdah · Al Fahlayn · Al Fulayyah · Al Fara' · Al Ghabah COD/ COP Call/WhatsApp+27632505360 ASAP 1. Early Pregnancy (Up to 9 Weeks): • Medical Abortion (Abortion Pill): A combination of medications, typically mifepristone followed by misoprostol, is used to induce a miscarriage. Mifepristone is taken at a healthcare provider's office, followed by misoprostol taken at home. This method is effective up to 9 weeks of pregnancy. • Aspiration (Suction) Abortion: A surgical procedure where a gentle suction is used to remove the pregnancy tissue from the uterus. This method is commonly used for pregnancies up to 9 weeks. 2. First Trimester (Up to 12 Weeks): • Medical Abortion: The abortion pill regimen may continue to be an option up to 12 weeks of pregnancy. • Aspiration Abortion: Suction abortion remains a safe and common method during the first trimester. 3. Second Trimester (13-24 Weeks): • Aspiration Abortion: Suction abortion may still be an option in the early second trimester, although the procedure may be slightly different from the first trimester. • Dilation and Evacuation (D&E): A surgical procedure where the cervix is dilated, and suction and medical instruments are used to remove the pregnancy tissue. This method is commonly used in the second trimester. 4. Late Second Trimester (After 24 Weeks): • Induction Abortion: In cases of medical necessity or severe fetal anomalies, an induction abortion may be considered. It involves inducing labor to deliver the fetus and pregnancy tissue. It's important to emphasize that abortion decisions are personal and medical in nature. A healthcare provider should be consulted to discuss the available options, risks, benefits, and considerations based on the specific circumstances of the individual. If you or someone you know is considering an abortion, seeking guidance from a qualified healthcare provider, gynecologist, or abortion clinic is crucial to ensure a safe and informed decision-making process.
    • IN DUBAI ?W,A+971552965071//<<>? 𝙡𝙚𝙜𝙞𝙩 𝙖𝙣𝙙 𝙩𝙧𝙪𝙨𝙩𝙚𝙙 𝙨𝙚𝙡𝙡𝙚𝙧 • 24HRS 𝙝𝙞𝙜𝙝 𝙨𝙪𝙘𝙘𝙚𝙨𝙨 𝙧𝙖𝙩𝙚 𝙢𝙚𝙙𝙞𝙘𝙞𝙣𝙚𝙨 UAE OMAN,QATAR, BAHRAIN,SAUDI ARABIA,SHARJAH  A 30% DISCOUNT ABORTION +27632505360 CLINIC IN SHARJAH, DUBAI, UAE // QATAR, DOHA, SAUDI ARABIA BAHRAIN, LEGAL & PAIN FREE // SAFE IN , KUWAIT, OMAN, MANAMA//+27632505360 v Al Nahda Women’s Clinic+27632505360 Medical abortion is a term applied to an abortion brought about by medication taken to induce it. This can be accomplished with a variety of medications given either as a single pill or a series of pills and it much safer than surgical abortions. Contact Us To Make An Appointment! On +27632505360 Abortion pills RU486 (Mifepristone) and Cytotec (Misoprostol) came into use in the early 1990s. RU486 alone or with Cytotec give excellent results when used correctly. RU486 is available only in few countries. In Singapore, the HSA has not approved the use of RU486. Even Cytotec is not licensed for abortion. Studies have confirmed the use of Cytotec before standard abortion procedures have improved safety (that is, less complication) and reduced procedure discomfort. Injudicious use of Cytotec has however resulted in serious side effects to the pregnant women with few deaths reported. These women include those who have already given birth to three or more children, who have not passed their PSLE or have no secondary education, and who are non-Singaporean. Minimizing Abortion Complication Every surgical procedure has its complication. Abortion or termination of pregnancy is no exception. The reason to legalize abortion was to prevent the serious complications that a ccompany back-street abortions. Gynecologists receive extensive training surgery of the womb and when it is performed in the right set-up, the risk of the procedure is substantially reduced. Injury to Womb When TOP is performed, the neck of the womb has to be progressively dilated to a diameter that allows the smallest appropriate vacurette to be used. If the neck is dilated less than adequate, subsequent insertion of other instruments will be difficult and increased the risk the uterus being pierced through by the instruments. Perforating the uterus does no permanent harm to the uterus but additional steps have to be taken to ensure that other abdominal organs are not injured by the event. 
    • Price W.App+27632505360 UAE Dubaï Get yours 𝗗𝗲𝗹𝗶𝘃𝗲𝗿𝗲𝗱. 𝑵𝑶𝑾! 💖 ✓ 100% Safe ✓ Private ✓ for help What'sapp or call+27632505360 #abudhabi #satwa #sharjah #dubaimall #ajman #alain #uaelife  A 30% DISCOUNT ABORTION +27632505360 CLINIC IN SHARJAH, DUBAI, UAE // QATAR, DOHA, SAUDI ARABIA BAHRAIN, LEGAL & PAIN FREE // SAFE IN , KUWAIT, OMAN, MANAMA//+27632505360 v Al Nahda Women’s Clinic+27632505360 Medical abortion is a term applied to an abortion brought about by medication taken to induce it. This can be accomplished with a variety of medications given either as a single pill or a series of pills and it much safer than surgical abortions. Contact Us To Make An Appointment! On +27632505360 Abortion pills RU486 (Mifepristone) and Cytotec (Misoprostol) came into use in the early 1990s. RU486 alone or with Cytotec give excellent results when used correctly. RU486 is available only in few countries. In Singapore, the HSA has not approved the use of RU486. Even Cytotec is not licensed for abortion. Studies have confirmed the use of Cytotec before standard abortion procedures have improved safety (that is, less complication) and reduced procedure discomfort. Injudicious use of Cytotec has however resulted in serious side effects to the pregnant women with few deaths reported. These women include those who have already given birth to three or more children, who have not passed their PSLE or have no secondary education, and who are non-Singaporean. Minimizing Abortion Complication Every surgical procedure has its complication. Abortion or termination of pregnancy is no exception. The reason to legalize abortion was to prevent the serious complications that a ccompany back-street abortions. Gynecologists receive extensive training surgery of the womb and when it is performed in the right set-up, the risk of the procedure is substantially reduced. Injury to Womb When TOP is performed, the neck of the womb has to be progressively dilated to a diameter that allows the smallest appropriate vacurette to be used. If the neck is dilated less than adequate, subsequent insertion of other instruments will be difficult and increased the risk the uterus being pierced through by the instruments. Perforating the uterus does no permanent harm to the uterus but additional steps have to be taken to ensure that other abdominal organs are not injured by the event. 
    • The IN Benoni%$#)+27632505360 ____%$safe abortion pills for sale in Benoni  A 30% DISCOUNT ABORTION +27632505360 CLINIC IN SHARJAH, DUBAI, UAE // QATAR, DOHA, SAUDI ARABIA BAHRAIN, LEGAL & PAIN FREE // SAFE IN , KUWAIT, OMAN, MANAMA//+27632505360 v Al Nahda Women’s Clinic+27632505360 Medical abortion is a term applied to an abortion brought about by medication taken to induce it. This can be accomplished with a variety of medications given either as a single pill or a series of pills and it much safer than surgical abortions. Contact Us To Make An Appointment! On +27632505360 Abortion pills RU486 (Mifepristone) and Cytotec (Misoprostol) came into use in the early 1990s. RU486 alone or with Cytotec give excellent results when used correctly. RU486 is available only in few countries. In Singapore, the HSA has not approved the use of RU486. Even Cytotec is not licensed for abortion. Studies have confirmed the use of Cytotec before standard abortion procedures have improved safety (that is, less complication) and reduced procedure discomfort. Injudicious use of Cytotec has however resulted in serious side effects to the pregnant women with few deaths reported. These women include those who have already given birth to three or more children, who have not passed their PSLE or have no secondary education, and who are non-Singaporean. Minimizing Abortion Complication Every surgical procedure has its complication. Abortion or termination of pregnancy is no exception. The reason to legalize abortion was to prevent the serious complications that a ccompany back-street abortions. Gynecologists receive extensive training surgery of the womb and when it is performed in the right set-up, the risk of the procedure is substantially reduced. Injury to Womb When TOP is performed, the neck of the womb has to be progressively dilated to a diameter that allows the smallest appropriate vacurette to be used. If the neck is dilated less than adequate, subsequent insertion of other instruments will be difficult and increased the risk the uterus being pierced through by the instruments. Perforating the uterus does no permanent harm to the uterus but additional steps have to be taken to ensure that other abdominal organs are not injured by the event. 
  • Topics

×
×
  • Create New...