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

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