Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.NpcHtmlMessage


          fortress.setJdbcState(JdbcEntityState.UPDATED);
          fortress.update();
          FortressSiegeEvent event = fortress.getSiegeEvent();
          event.despawnEnvoy();
        }
        player.sendPacket(new NpcHtmlMessage(player, this, fileName, 0));
        break;
      case COND_FAIL:
        player.sendPacket(new NpcHtmlMessage(player, this, _failDialog, 0));
        break;
    }
  }
View Full Code Here


        break;
      case COND_FAIL:
        filename = _failDialog;
        break;
    }
    player.sendPacket(new NpcHtmlMessage(player, this, filename, val));
  }
View Full Code Here

        {
          player.teleToLocation(_loc);
        }
        break;
      case COND_FAIL:
        player.sendPacket(new NpcHtmlMessage(player, this, _failDialog, 0));
        break;
    }
  }
View Full Code Here

        break;
      default:
        filename = getHtmlPath(npcId, val, player);
        break;
    }
    player.sendPacket(new NpcHtmlMessage(player, this, filename, val));
  }
View Full Code Here

      else
      {
        if ((playerClan != null) && (playerClan.getCastle() > 0))
        {
          Castle castle = ResidenceHolder.getInstance().getResidence(playerClan.getCastle());
          NpcHtmlMessage html = new NpcHtmlMessage(player, this);
          html.setFile("merchant/territorystatus.htm");
          html.replace("%npcname%", getName());
          html.replace("%castlename%", HtmlUtils.htmlResidenceName(castle.getId()));
          html.replace("%taxpercent%", String.valueOf(castle.getTaxPercent()));
          html.replace("%clanname%", playerClan.getName());
          html.replace("%clanleadername%", playerClan.getLeaderName());
          player.sendPacket(html);
        }
        else
        {
          showChatWindow(player, "residence2/clanhall/noAgitInfo.htm");
View Full Code Here

        showChatWindow(player, "residence2/clanhall/agit_oel_mahum_messeger_9.htm");
      }
    }
    else if (command.equalsIgnoreCase("listClans"))
    {
      NpcHtmlMessage msg = new NpcHtmlMessage(player, this);
      msg.setFile("residence2/clanhall/azit_messenger003.htm");
      List<CTBSiegeClanObject> siegeClans = siegeEvent.getObjects(SiegeEvent.ATTACKERS);
      for (int i = 0; i < 5; i++)
      {
        CTBSiegeClanObject siegeClan = CollectionUtils.safeGet(siegeClans, i);
        if (siegeClan != null)
        {
          msg.replace("%clan_" + i + "%", siegeClan.getClan().getName());
        }
        else
        {
          msg.replaceNpcString("%clan_" + i + "%", NpcString.__UNREGISTERED__);
        }
        msg.replace("%clan_count_" + i + "%", siegeClan == null ? StringUtils.EMPTY : String.valueOf(siegeClan.getPlayers().size()));
      }
      player.sendPacket(msg);
    }
    else
    {
View Full Code Here

  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    ClanHall clanHall = getClanHall();
    Clan clan = clanHall.getOwner();
    NpcHtmlMessage msg = new NpcHtmlMessage(player, this);
    if (clan != null)
    {
      msg.setFile("residence2/clanhall/messenger_yetti001.htm");
      msg.replace("%owner_name%", clan.getName());
    }
    else
    {
      msg.setFile("residence2/clanhall/messenger_yetti001a.htm");
    }
    msg.replace("%siege_date%", TimeUtils.toSimpleFormat(clanHall.getSiegeDate()));
    player.sendPacket(msg);
  }
View Full Code Here

            player.teleToLocation(loc);
          }
        }
        else
        {
          player.sendPacket(new NpcHtmlMessage(player, this, _siegeDialog, 0));
        }
        break;
      case COND_FAIL:
        player.sendPacket(new NpcHtmlMessage(player, this, _failDialog, 0));
        break;
    }
  }
View Full Code Here

        break;
      case COND_FAIL:
        filename = _failDialog;
        break;
    }
    player.sendPacket(new NpcHtmlMessage(player, this, filename, val));
  }
View Full Code Here

              String oldVar = player.getVar("ng1");
              player.setVar("ng1", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
              player.addExpAndSp(Experience.LEVEL[6] - player.getExp(), 127, 0, 0, true, false);
              player.addAdena(11567);
            }
            player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q1-2.htm", val));
            return;
          }
          player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q1-1.htm", val).replace("%tonpc%", getQuestNpc(1, player)));
          return;
        }
        if (player.getLevel() < 10)
        {
          if (player.getVarB("p1q2"))
          {
            if (!player.getVarB("ng2"))
            {
              String oldVar = player.getVar("ng2");
              player.setVar("ng2", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
              long addexp = Experience.LEVEL[10] - player.getExp();
              player.addExpAndSp(addexp, addexp / 24, 0, 0, true, false);
            }
            player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q3-1.htm", val).replace("%tonpc%", getQuestNpc(3, player)));
            return;
          }
          player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q2-1.htm", val).replace("%tonpc%", getQuestNpc(2, player)));
          return;
        }
        if (player.getLevel() < 15)
        {
          if (player.getVarB("p1q3"))
          {
            if (!player.getVarB("ng3"))
            {
              String oldVar = player.getVar("ng3");
              player.setVar("ng3", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
              long addexp = Experience.LEVEL[15] - player.getExp();
              player.addExpAndSp(addexp, addexp / 22, 0, 0, true, false);
              player.addAdena(38180);
            }
            player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q4-1.htm", val).replace("%tonpc%", getQuestNpc(4, player)));
            return;
          }
          player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q3-1.htm", val).replace("%tonpc%", getQuestNpc(3, player)));
          return;
        }
        if (player.getLevel() < 18)
        {
          if (player.getVarB("p1q4"))
          {
            if (!player.getVarB("ng4"))
            {
              String oldVar = player.getVar("ng4");
              player.setVar("ng4", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
              long addexp = Experience.LEVEL[18] - player.getExp();
              player.addExpAndSp(addexp, addexp / 5, 0, 0, true, false);
              player.addAdena(10018);
            }
            player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q4-2.htm", val));
            return;
          }
          player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q4-1.htm", val).replace("%tonpc%", getQuestNpc(4, player)));
          return;
        }
        player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q-no.htm", val));
        return;
      }
      player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q-no.htm", val));
      return;
    }
    super.showChatWindow(player, val);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.NpcHtmlMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.