Jump to content

Question

Posted

geia sas. psaxnw tropo na kanw thn Heine pvp zone etsi wste opote kapoios phgainei ekei automata na mpainei se mia omada kai na paizei pvp me thn antipalh omada me eidiko reward system. dhladh to spawn sthn heine na einai san na mpike se tvt kateuthian xwris npc gia event join kai tetoia. yparxei kapoios kwdikos? xrhsimopoiw l2jfrozen.

 

euxaristw.

11 answers to this question

Recommended Posts

  • 0
Posted

Nomizw oti sto frozen uparxei idi auto pou zitas an thimame kala.. psaksto ligo.

den nomizw. se poio meros? nomizw mono to primeval isle einai custom pvp zone me auto flag mono. oxi omades kai tetoia.

  • 0
Posted

nomizw den xreiazontai oloi oi kwdikoi toy tvt. mporei na ginei kai me ena aplo setTeam kai reward.

kati san auto

me ligo onEnter() onExit() onDieInside() methodous tha pekseis me kapoio uparxon zone i kapoio kainourio

  • 0
Posted

kati san auto

me ligo onEnter() onExit() onDieInside() methodous tha pekseis me kapoio uparxon zone i kapoio kainourio

epeidi eimai ligo noob akoma thelw na rwtisw:

 

1. poios einai o kwdikos gia set tuxaia omada?

 

2. poios einai o kwdikos gia apagoreusi xtupimaton sthn idia omada? ta tvt xrhsimopoioyn kwdikoys poy einai mono gia event

 

3. poios einai o kwdikos gia reward poy na isxyei mono gia ekeino to meros?

  • 0
Posted

Ίσως αυτό σε βοηθήσει να κάνεις αυτό που θες με τις μεθόδους..

http://www.maxcheaters.com/topic/139771-multifunctionzone/

 

Και αφού δεν θες να είναι event, γιατί δε το κάνεις να πηγαίνουν μόνο party εκεί?

Αν το κάνεις όπως λες, ποια η ουσία για να μην πάνε απλά σε tvt?

  • 0
Posted (edited)

Ίσως αυτό σε βοηθήσει να κάνεις αυτό που θες με τις μεθόδους..

http://www.maxcheaters.com/topic/139771-multifunctionzone/

 

Και αφού δεν θες να είναι event, γιατί δε το κάνεις να πηγαίνουν μόνο party εκεί?

Αν το κάνεις όπως λες, ποια η ουσία για να μην πάνε απλά σε tvt?

sta tvt exei diaforetiko reward ap auto poy thelw na valw sthn heine. ta tvt den einai synexia kai den exoyn kai buffs.

 

to multifunctionzone den exei teams.

Edited by Tristis
  • 0
Posted

15 line δουλειά είναι.

 

1) team split method

2) friendly-fire method

3) new zone type

4) reward inside

to kserw oti einai mikros kwdikos. an moy ta egrafes pio sygkekrimena tha hmastan comple :-\

  • 0
Posted (edited)

me tin voitheia toy devlin (ty) ekana ton kwdiko etsi giati den eixe xrono na moy ekshgisei perissotera.

package com.l2jfrozen.gameserver.model.zone.type;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;

import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
import com.l2jfrozen.gameserver.model.zone.L2ZoneType;
import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;

public abstract class L2FlagZone extends L2ZoneType
{
   private boolean _enabled;
   private String _target;
   private Future<?> _task;
   public L2FlagZone(int id)
   {
       super(id);
      _enabled = true;
      _target = "pc";
   }
   
   public static final List<L2PcInstance> _registeredPlayers = new ArrayList<>();
   public static ArrayList<L2PcInstance> _teamOne = new ArrayList<>();
   public static ArrayList<L2PcInstance> _teamTwo = new ArrayList<>();
   
   
   
   @Override
   public void setParameter(String name, String value)
   {
     
      if(name.equals("default_enabled"))
      {
         _enabled = Boolean.parseBoolean(value);
      }
      else if(name.equals("target"))
      {
         _target = String.valueOf(value);
      }
      else
      {
         super.setParameter(name, value);
      }
   }
   
   
   @Override
   protected void onEnter(L2Character character)
   {
       if (character instanceof L2PcInstance)
       {
         // Set pvp flag
          ((L2PcInstance) character).setPvpFlag(1);
          ((L2PcInstance) character).setTeam(1);
           ((L2PcInstance) character).broadcastUserInfo();
            if((character instanceof L2PlayableInstance && _target.equalsIgnoreCase("pc") || character instanceof L2PcInstance && _target.equalsIgnoreCase("pc_only") || character instanceof L2MonsterInstance && _target.equalsIgnoreCase("npc")) && _task == null);
       }
   }
   private static void splitPlayers()
   {
    boolean swap = true;
    for (L2PcInstance registeredPlayers : _registeredPlayers)
    {
     if (swap)
      _teamOne.add(registeredPlayers);
     else
      _teamTwo.add(registeredPlayers);
     
     swap = !swap;
    }
   }
      
   public static boolean isSameTeam(L2Character player, L2Character target)
   {
   if (player == target)
       return false;
      if (_teamOne.contains(player) && _teamOne.contains(target))
       return true;
      else if (_teamTwo.contains(player) && _teamTwo.contains(target))
       return true;
      return false;
   }
   
   @Override
   protected void onExit(L2Character character)
   {
       if (character instanceof L2PcInstance)
       {
           ((L2PcInstance) character).setPvpFlag(0);
           ((L2PcInstance) character).broadcastUserInfo();
       }
		{
			
		}
      if(_characterList.isEmpty() && _task != null)
      {
         _task.cancel(true);
         _task = null;
      }
   }

   public String getTargetType()
   {
      return _target;
   }

   public boolean isEnabled()
   {
      return _enabled;
   }

   public void setZoneEnabled(boolean val)
   {
      _enabled = val;
   }
   class ApplySkill implements Runnable
   {
      @Override
      public void run()
      {
         if(isEnabled())
         {
            for(L2Character temp : _characterList.values())
            {
               if(temp != null && !temp.isDead())
               {
                  if((temp instanceof L2PlayableInstance && getTargetType().equalsIgnoreCase("pc") || temp instanceof L2PcInstance && getTargetType().equalsIgnoreCase("pc_only") || temp instanceof L2MonsterInstance && getTargetType().equalsIgnoreCase("npc")));
                 
               }
            }
         }
      }
   }
   @Override
   public void onDieInside(L2Character character)
   {
     
   }
   
   @Override
   public void onReviveInside(L2Character character)
   {
       onEnter(character);
   }
}

to splitPlayers moy to vgazei lathos. epishs den kserw poy na kollhsw ayto:

public static boolean canTarget(L2PcInstance player, L2PcInstance target)
 {
  if ((!registeredPlayers.contains(player) && registeredPlayers.contains(target))
    || (registeredPlayers.contains(player) && !registeredPlayers.contains(target)))
  {
   player.setTarget(null);
            player.sendPacket(ActionFailed.STATIC_PACKET);
            return false;
  }
  
  for (L2PcInstance teamOne : _teamOne)
  {
   for (L2PcInstance teamTwo : _teamTwo)
   {
    if (player == teamOne && target == teamOne || player == teamTwo && target == teamTwo)
    {
     player.setTarget(null);
                    player.sendPacket(ActionFailed.STATIC_PACKET);
                    return false;
    }
   }

sto pcInstance evala auto. moy to vgazei swsto.

		// Add karma to attacker and increase its PK counter
		setPvpKills(getPvpKills() + 1);
		
+		if (isInsideZone(ZONE_FLAG))
+		{
+			// Item Reward system
+			addItem("Loot", 10000, 1, this, true);
+		}
Edited by Tristis

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

    • I work with Kenrix and he is a  next level coder. Hugely Recommended.
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock