Jump to content
  • 0

Question

13 answers to this question

Recommended Posts

  • 0
Posted

mpike kapios apo tous admins tou server se hide kai buggare olo to sustima..Prin apo auto leitourgouse distixos ton kodika dn ksero pou na ton vro dn einai diko m to pack

ee tote pws perimeneis na se boh8isoume?

  • 0
Posted
 public void createPartyOfTeam(int teamId)

  {

    int count = 0;

    L2Party party = null;

    

    FastList<L2PcInstance> list = new FastList();

    for (L2PcInstance p : this.players.keySet()) {

      if (getTeam(p) == teamId) {

        list.add(p);

      }

    }

    for (L2PcInstance player : list)

    {

      if ((count % 9 == 0) && (list.size() - count != 1)) {

        party = new L2Party(player, 1);

      }

      if (count % 9 < 9) {

        player.joinParty(party);

      }

      count++;

    }

  }

  

  public void divideIntoTeams(int number)

  {

    int i = 0;

    while (EventManager.getInstance().players.size() != 0)

    {

      i++;

      L2PcInstance player = (L2PcInstance)EventManager.getInstance().players.get(Rnd.get(EventManager.getInstance().players.size()));

      if ((player.getClassId().getId() != 16) && (player.getClassId().getId() != 97))

      {

        this.players.put(player, new int[] { i, 0, 0 });

        

        EventManager.getInstance().players.remove(player);

        if (i == number) {

          i = 0;

        }

      }

    }

    i = getPlayersOfTeam(1).size() > getPlayersOfTeam(2).size() ? 1 : 0;

    while (EventManager.getInstance().players.size() != 0)

    {

      i++;

      L2PcInstance player = (L2PcInstance)EventManager.getInstance().players.get(Rnd.get(EventManager.getInstance().players.size()));

      

      this.players.put(player, new int[] { i, 0, 0 });

      

      EventManager.getInstance().players.remove(player);

      if (i == number) {

        i = 0;

      }

    }

  }

  

  public void forceSitAll()

  {

    for (L2PcInstance player : this.players.keySet())

    {

      player.abortAttack();

      player.abortCast();

      player.setIsParalyzed(true);

      player.setIsInvul(true);

      player.startAbnormalEffect(AbnormalEffect.HOLD_2);

    }

  }

  

  public void forceStandAll()

  {

    for (L2PcInstance player : this.players.keySet())

    {

      player.stopAbnormalEffect(AbnormalEffect.HOLD_2);

      player.setIsInvul(false);

      player.setIsParalyzed(false);

    }

  }

  

  public void InvisAll()

  {

    for (L2PcInstance player : this.players.keySet())

    {

      player.abortAttack();

      player.abortCast();

      player.getAppearance().setInvisible();

    }

  }

  

  public void unInvisAll()

  {

    for (L2PcInstance player : this.players.keySet())

    {

      player.getAppearance().setVisible();

      player.broadcastCharInfo();

    }

  }

  

  public boolean getBoolean(String propName)

  {

    return this.config.getBoolean(this.eventId, propName);

  }

  

  public int[] getColor(String owner)

  {

    return this.config.getColor(this.eventId, owner);

  }

  

  public int getInt(String propName)

  {

    return this.config.getInt(this.eventId, propName);

  }

  

  public Set<L2PcInstance> getPlayerList()

  {

    return this.players.keySet();

  }

  

  public FastList<L2PcInstance> getPlayersOfTeam(int team)

  {

    FastList<L2PcInstance> list = new FastList();

    for (L2PcInstance player : getPlayerList()) {

      if (getTeam(player) == team) {

        list.add(player);

      }

    }

    return list;

  }

  

  protected EventTeam getPlayersTeam(L2PcInstance player)

  {

    return (EventTeam)this.teams.get(Integer.valueOf(((int[])this.players.get(player))[0]));

  }

  

  public FastList<L2PcInstance> getPlayersWithStatus(int status)

  {

    FastList<L2PcInstance> list = new FastList();

    for (L2PcInstance player : getPlayerList()) {

      if (getStatus(player) == status) {

        list.add(player);

      }

    }

    return list;

  }

  

  public L2PcInstance getPlayerWithMaxScore()

  {

    L2PcInstance max = (L2PcInstance)this.players.head().getNext().getKey();

    for (L2PcInstance player : this.players.keySet()) {

      if (((int[])this.players.get(player))[2] > ((int[])this.players.get(max))[2]) {

        max = player;

      }

    }

    return max;

  }

  

  public void unequip()

  {

    for (L2PcInstance player : this.players.keySet())

    {

      player.getInventory().unEquipItemInSlot(7);

      player.getInventory().unEquipItemInSlot(8);

    }

  }

  

  public int[] getPosition(String owner, int num)

  {

    return this.config.getPosition(this.eventId, owner, num);

  }

  

  public L2PcInstance getRandomPlayer()

  {

    FastList<L2PcInstance> temp = new FastList();

    for (L2PcInstance player : this.players.keySet()) {

      temp.add(player);

    }

    return (L2PcInstance)temp.get(Rnd.get(temp.size()));

  }

  

  protected L2PcInstance getRandomPlayerFromTeam(int team)

  {

    FastList<L2PcInstance> temp = new FastList();

    for (L2PcInstance player : this.players.keySet()) {

      if (getTeam(player) == team) {

        temp.add(player);

      }

    }

    return (L2PcInstance)temp.get(Rnd.get(temp.size()));

  }

  

  protected FastList<L2PcInstance> getPlayersFromTeamWithStatus(int team, int status)

  {

    FastList<L2PcInstance> players = getPlayersWithStatus(status);

    FastList<L2PcInstance> temp = new FastList();

    for (L2PcInstance player : players) {

      if (getTeam(player) == team) {

        temp.add(player);

      }

    }

    return temp;

  }

  • 0
Posted

 

 public void createPartyOfTeam(int teamId)
  {
    int count = 0;
    L2Party party = null;
    
    FastList<L2PcInstance> list = new FastList();
    for (L2PcInstance p : this.players.keySet()) {
      if (getTeam(p) == teamId) {
        list.add(p);
      }
    }
    for (L2PcInstance player : list)
    {
      if ((count % 9 == 0) && (list.size() - count != 1)) {
        party = new L2Party(player, 1);
      }
      if (count % 9 < 9) {
        player.joinParty(party);
      }
      count++;
    }
  }
  
  public void divideIntoTeams(int number)
  {
    int i = 0;
    while (EventManager.getInstance().players.size() != 0)
    {
      i++;
      L2PcInstance player = (L2PcInstance)EventManager.getInstance().players.get(Rnd.get(EventManager.getInstance().players.size()));
      if ((player.getClassId().getId() != 16) && (player.getClassId().getId() != 97))
      {
        this.players.put(player, new int[] { i, 0, 0 });
        
        EventManager.getInstance().players.remove(player);
        if (i == number) {
          i = 0;
        }
      }
    }
    i = getPlayersOfTeam(1).size() > getPlayersOfTeam(2).size() ? 1 : 0;
    while (EventManager.getInstance().players.size() != 0)
    {
      i++;
      L2PcInstance player = (L2PcInstance)EventManager.getInstance().players.get(Rnd.get(EventManager.getInstance().players.size()));
      
      this.players.put(player, new int[] { i, 0, 0 });
      
      EventManager.getInstance().players.remove(player);
      if (i == number) {
        i = 0;
      }
    }
  }
  
  public void forceSitAll()
  {
    for (L2PcInstance player : this.players.keySet())
    {
      player.abortAttack();
      player.abortCast();
      player.setIsParalyzed(true);
      player.setIsInvul(true);
      player.startAbnormalEffect(AbnormalEffect.HOLD_2);
    }
  }
  
  public void forceStandAll()
  {
    for (L2PcInstance player : this.players.keySet())
    {
      player.stopAbnormalEffect(AbnormalEffect.HOLD_2);
      player.setIsInvul(false);
      player.setIsParalyzed(false);
    }
  }
  
  public void InvisAll()
  {
    for (L2PcInstance player : this.players.keySet())
    {
      player.abortAttack();
      player.abortCast();
      player.getAppearance().setInvisible();
    }
  }
  
  public void unInvisAll()
  {
    for (L2PcInstance player : this.players.keySet())
    {
      player.getAppearance().setVisible();
      player.broadcastCharInfo();
    }
  }
  
  public boolean getBoolean(String propName)
  {
    return this.config.getBoolean(this.eventId, propName);
  }
  
  public int[] getColor(String owner)
  {
    return this.config.getColor(this.eventId, owner);
  }
  
  public int getInt(String propName)
  {
    return this.config.getInt(this.eventId, propName);
  }
  
  public Set<L2PcInstance> getPlayerList()
  {
    return this.players.keySet();
  }
  
  public FastList<L2PcInstance> getPlayersOfTeam(int team)
  {
    FastList<L2PcInstance> list = new FastList();
    for (L2PcInstance player : getPlayerList()) {
      if (getTeam(player) == team) {
        list.add(player);
      }
    }
    return list;
  }
  
  protected EventTeam getPlayersTeam(L2PcInstance player)
  {
    return (EventTeam)this.teams.get(Integer.valueOf(((int[])this.players.get(player))[0]));
  }
  
  public FastList<L2PcInstance> getPlayersWithStatus(int status)
  {
    FastList<L2PcInstance> list = new FastList();
    for (L2PcInstance player : getPlayerList()) {
      if (getStatus(player) == status) {
        list.add(player);
      }
    }
    return list;
  }
  
  public L2PcInstance getPlayerWithMaxScore()
  {
    L2PcInstance max = (L2PcInstance)this.players.head().getNext().getKey();
    for (L2PcInstance player : this.players.keySet()) {
      if (((int[])this.players.get(player))[2] > ((int[])this.players.get(max))[2]) {
        max = player;
      }
    }
    return max;
  }
  
  public void unequip()
  {
    for (L2PcInstance player : this.players.keySet())
    {
      player.getInventory().unEquipItemInSlot(7);
      player.getInventory().unEquipItemInSlot( 8);
    }
  }
  
  public int[] getPosition(String owner, int num)
  {
    return this.config.getPosition(this.eventId, owner, num);
  }
  
  public L2PcInstance getRandomPlayer()
  {
    FastList<L2PcInstance> temp = new FastList();
    for (L2PcInstance player : this.players.keySet()) {
      temp.add(player);
    }
    return (L2PcInstance)temp.get(Rnd.get(temp.size()));
  }
  
  protected L2PcInstance getRandomPlayerFromTeam(int team)
  {
    FastList<L2PcInstance> temp = new FastList();
    for (L2PcInstance player : this.players.keySet()) {
      if (getTeam(player) == team) {
        temp.add(player);
      }
    }
    return (L2PcInstance)temp.get(Rnd.get(temp.size()));
  }
  
  protected FastList<L2PcInstance> getPlayersFromTeamWithStatus(int team, int status)
  {
    FastList<L2PcInstance> players = getPlayersWithStatus(status);
    FastList<L2PcInstance> temp = new FastList();
    for (L2PcInstance player : players) {
      if (getTeam(player) == team) {
        temp.add(player);
      }
    }
    return temp;
  }

 

dn boh8as...anebase edw http://pastebin.com/ olo to arxeio tou event.java

  • 0
Posted

kai uparxi kai ena akoma bug otan kapios paei na mpei uparxi periptosi na min ton afisi kai na tou petaksi minima account already in use.
Eno dn einai mesa ston server.kai h gameserver console leei oti exei gini accept to login kai apla dn mporei na mpei meta o xristis mexri

na gini restart o server.Exeis kamia idea?

  • 0
Posted

kai uparxi kai ena akoma bug otan kapios paei na mpei uparxi periptosi na min ton afisi kai na tou petaksi minima account already in use.

Eno dn einai mesa ston server.kai h gameserver console leei oti exei gini accept to login kai apla dn mporei na mpei meta o xristis mexri

na gini restart o server.Exeis kamia idea?

exei polla bug to phoenix .

dn 3erw pou to brikes alla afto to event pou perases einai gtp.

 

ama psa3eis kai allo 8a breis polu kalutero apo afto pou exeis..

 

afto kai polla alla ta exeis se public....to exeis kanei adapt apo frozen se acis afto?

protected void forceSitAll()
{
for (L2PcInstance player : players.keySet())
{
player.abortAttack();
player.abortCast();
player.setIsParalyzed(true);
player.setIsInvul(true);
player.startAbnormalEffect(AbnormalEffect.HOLD_2);
}
}

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