Examples of StatsSet


Examples of net.sf.l2j.gameserver.templates.StatsSet

            if (raidboss != null)
            {
                raidboss.setRaidStatus(StatusEnum.ALIVE);

                StatsSet info = new StatsSet();
                info.set("currentHP", raidboss.getCurrentHp());
                info.set("currentMP", raidboss.getCurrentMp());
                info.set("respawnTime", 0L);

                _storedInfo.put(bossId, info);

                GmListTable.broadcastMessageToGMs("Spawning Raid Boss " + raidboss.getName());
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

    int xspawn = Integer.parseInt(st.nextToken());
    int yspawn = Integer.parseInt(st.nextToken());
    int zspawn = Integer.parseInt(st.nextToken());
    int heading = Integer.parseInt(st.nextToken());

    StatsSet npcDat = new StatsSet();
    npcDat.set("npcId", id);
    npcDat.set("level", 0);
    npcDat.set("jClass", "boat");

    npcDat.set("baseSTR", 0);
    npcDat.set("baseCON", 0);
    npcDat.set("baseDEX", 0);
    npcDat.set("baseINT", 0);
    npcDat.set("baseWIT", 0);
    npcDat.set("baseMEN", 0);

    npcDat.set("baseShldDef", 0);
    npcDat.set("baseShldRate", 0);
    npcDat.set("baseAccCombat", 38);
    npcDat.set("baseEvasRate"38);
    npcDat.set("baseCritRate"38);

    //npcDat.set("name", "");
    npcDat.set("collision_radius", 0);
    npcDat.set("collision_height", 0);
    npcDat.set("sex", "male");
    npcDat.set("type", "");
    npcDat.set("baseAtkRange", 0);
        npcDat.set("baseMpMax", 0);
        npcDat.set("baseCpMax", 0);
    npcDat.set("rewardExp", 0);
    npcDat.set("rewardSp", 0);
    npcDat.set("basePAtk", 0);
    npcDat.set("baseMAtk", 0);
    npcDat.set("basePAtkSpd", 0);
    npcDat.set("aggroRange", 0);
    npcDat.set("baseMAtkSpd", 0);
    npcDat.set("rhand", 0);
    npcDat.set("lhand", 0);
    npcDat.set("armor", 0);
    npcDat.set("baseWalkSpd", 0);
    npcDat.set("baseRunSpd", 0);
    npcDat.set("name", name);
    npcDat.set("baseHpMax", 50000);
    npcDat.set("baseHpReg", 3.e-3f);
    npcDat.set("baseMpReg", 3.e-3f);
    npcDat.set("basePDef", 100);
    npcDat.set("baseMDef", 100);
    L2CharTemplate template = new L2CharTemplate(npcDat);
    boat = new L2BoatInstance(IdFactory.getInstance().getNextId(),template,name);
    boat.getPosition().setHeading(heading);
    boat.setXYZ(xspawn,yspawn,zspawn);
    //boat.spawnMe();
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

          {
              int festivalCycle = rset.getInt("cycle");
              int festivalId = rset.getInt("festivalId");
              String cabal = rset.getString("cabal");

              StatsSet festivalDat = new StatsSet();
              festivalDat.set("festivalId", festivalId);
              festivalDat.set("cabal", cabal);
              festivalDat.set("cycle", festivalCycle);
              festivalDat.set("date", rset.getString("date"));
              festivalDat.set("score", rset.getInt("score"));
              festivalDat.set("members", rset.getString("members"));

              if (Config.DEBUG)
                  _log.info("SevenSignsFestival: Loaded data from DB for (Cycle = " + festivalCycle + ", Oracle = " + cabal + ", Festival = "+ getFestivalName(festivalId));

              if (cabal.equals("dawn"))
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

    if ((rangeXMax - rangeXMin) > (rangeYMax - rangeYMin))
      collisionRadius = rangeYMax - rangeYMin;
    else
      collisionRadius = rangeXMax - rangeXMin;

    StatsSet npcDat = new StatsSet();
    npcDat.set("npcId", id);
    npcDat.set("level", 0);
    npcDat.set("jClass", "door");

    npcDat.set("baseSTR", 0);
    npcDat.set("baseCON", 0);
    npcDat.set("baseDEX", 0);
    npcDat.set("baseINT", 0);
    npcDat.set("baseWIT", 0);
    npcDat.set("baseMEN", 0);

    npcDat.set("baseShldDef", 0);
    npcDat.set("baseShldRate", 0);
    npcDat.set("baseAccCombat", 38);
    npcDat.set("baseEvasRate"38);
    npcDat.set("baseCritRate"38);

    //npcDat.set("name", "");
    npcDat.set("collision_radius", collisionRadius);
    npcDat.set("collision_height", rangeZMax - rangeZMin);
    npcDat.set("sex", "male");
    npcDat.set("type", "");
    npcDat.set("baseAtkRange", 0);
        npcDat.set("baseMpMax", 0);
        npcDat.set("baseCpMax", 0);
    npcDat.set("rewardExp", 0);
    npcDat.set("rewardSp", 0);
    npcDat.set("basePAtk", 0);
    npcDat.set("baseMAtk", 0);
    npcDat.set("basePAtkSpd", 0);
    npcDat.set("aggroRange", 0);
    npcDat.set("baseMAtkSpd", 0);
    npcDat.set("rhand", 0);
    npcDat.set("lhand", 0);
    npcDat.set("armor", 0);
    npcDat.set("baseWalkSpd", 0);
    npcDat.set("baseRunSpd", 0);
    npcDat.set("name", name);
    npcDat.set("baseHpMax", hp);
    npcDat.set("baseHpReg", 3.e-3f);
    npcDat.set("baseMpReg", 3.e-3f);
    npcDat.set("basePDef", pdef);
    npcDat.set("baseMDef", mdef);

    L2CharTemplate template = new L2CharTemplate(npcDat);
    L2DoorInstance door = new L2DoorInstance(IdFactory.getInstance().getNextId(),template, id, name, unlockable);
    door.setRange(rangeXMin, rangeYMin, rangeZMin, rangeXMax, rangeYMax, rangeZMax);
    try
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

     * If a clan member is a member of the highest-ranked party in the Festival of Darkness, 100 points are added per member
     */
    protected void rewardHighestRanked()
    {
      String[] partyMembers;
      StatsSet overallData = getOverallHighestScoreData(FESTIVAL_LEVEL_MAX_31);
        if (overallData != null)
      {
        partyMembers = overallData.getString("members").split(",");
        for (String partyMemberName : partyMembers)
          addReputationPointsForPartyMemberClan(partyMemberName);
      }

      overallData = getOverallHighestScoreData(FESTIVAL_LEVEL_MAX_42);
      if (overallData != null)
      {
        partyMembers = overallData.getString("members").split(",");
        for (String partyMemberName : partyMembers)
          addReputationPointsForPartyMemberClan(partyMemberName);
      }

      overallData = getOverallHighestScoreData(FESTIVAL_LEVEL_MAX_53);
      if (overallData != null)
      {
        partyMembers = overallData.getString("members").split(",");
        for (String partyMemberName : partyMembers)
          addReputationPointsForPartyMemberClan(partyMemberName);
      }

      overallData = getOverallHighestScoreData(FESTIVAL_LEVEL_MAX_64);
      if (overallData != null)
      {
        partyMembers = overallData.getString("members").split(",");
        for (String partyMemberName : partyMembers)
          addReputationPointsForPartyMemberClan(partyMemberName);
      }

      overallData = getOverallHighestScoreData(FESTIVAL_LEVEL_MAX_NONE);
      if (overallData != null)
      {
        partyMembers = overallData.getString("members").split(",");
        for (String partyMemberName : partyMembers)
          addReputationPointsForPartyMemberClan(partyMemberName);
      }
    }
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

            if (i >= FESTIVAL_COUNT)
                festivalId -= FESTIVAL_COUNT;

            // Create a new StatsSet with "default" data for Dusk
            StatsSet tempStats = new StatsSet();
            tempStats.set("festivalId", festivalId);
            tempStats.set("cycle", _signsCycle);
            tempStats.set("date", "0");
            tempStats.set("score", 0);
            tempStats.set("members", "");

            if (i >= FESTIVAL_COUNT)
                tempStats.set("cabal", SevenSigns.getCabalShortName(SevenSigns.CABAL_DAWN));
            else
                tempStats.set("cabal", SevenSigns.getCabalShortName(SevenSigns.CABAL_DUSK));

            newData.put(i, tempStats);
        }

        // Add the newly created cycle data to the existing festival data, and
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

    if (!hasRegisteredBefore(player))
      return 0;

    int stoneCount = 0;

    StatsSet currPlayer = getPlayerData(player);

    stoneCount += currPlayer.getInteger("red_stones");
    stoneCount += currPlayer.getInteger("green_stones");
    stoneCount += currPlayer.getInteger("blue_stones");

    return stoneCount;
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

  public int getPlayerContribScore(L2PcInstance player)
  {
    if (!hasRegisteredBefore(player))
      return 0;

    StatsSet currPlayer = getPlayerData(player);

    return currPlayer.getInteger("contribution_score");
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

        while (rset.next())
        {
          int charObjId = rset.getInt("char_obj_id");

          StatsSet sevenDat = new StatsSet();
        sevenDat.set("char_obj_id", charObjId);
        sevenDat.set("cabal", rset.getString("cabal"));
        sevenDat.set("seal", rset.getInt("seal"));
        sevenDat.set("red_stones", rset.getInt("red_stones"));
        sevenDat.set("green_stones", rset.getInt("green_stones"));
        sevenDat.set("blue_stones", rset.getInt("blue_stones"));
        sevenDat.set("ancient_adena_amount", rset.getDouble("ancient_adena_amount"));
        sevenDat.set("contribution_score", rset.getDouble("contribution_score"));

                if (Config.DEBUG)
          _log.info("SevenSigns: Loaded data from DB for char ID " + charObjId + " (" + sevenDat.getString("cabal") + ")");

        _signsPlayerData.put(charObjId, sevenDat);
        }

        rset.close();
View Full Code Here

Examples of net.sf.l2j.gameserver.templates.StatsSet

  public int setPlayerInfo(L2PcInstance player, int chosenCabal, int chosenSeal)
  {
    int charObjId = player.getObjectId();
    Connection con = null;
    PreparedStatement statement = null;
    StatsSet currPlayerData = getPlayerData(player);

    if (currPlayerData != null)
    {
      // If the seal validation period has passed,
      // cabal information was removed and so "re-register" player
      currPlayerData.set("cabal", getCabalShortName(chosenCabal));
      currPlayerData.set("seal", chosenSeal);

      _signsPlayerData.put(charObjId, currPlayerData);
    }
    else
    {
      currPlayerData = new StatsSet();
      currPlayerData.set("char_obj_id", charObjId);
      currPlayerData.set("cabal", getCabalShortName(chosenCabal));
      currPlayerData.set("seal", chosenSeal);
      currPlayerData.set("red_stones", 0);
      currPlayerData.set("green_stones", 0);
      currPlayerData.set("blue_stones", 0);
      currPlayerData.set("ancient_adena_amount", 0);
      currPlayerData.set("contribution_score", 0);

      _signsPlayerData.put(charObjId, currPlayerData);

      // Update data in database, as we have a new player signing up.
      try
      {
        con = L2DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement(
            "INSERT INTO seven_signs (char_obj_id, cabal, seal) VALUES (?,?,?)");
        statement.setInt(1, charObjId);
        statement.setString(2, getCabalShortName(chosenCabal));
        statement.setInt(3, chosenSeal);
        statement.execute();

        statement.close();
        con.close();

        if (Config.DEBUG)
          _log.info("SevenSigns: Inserted data in DB for char ID " + currPlayerData.getInteger("char_obj_id") + " (" + currPlayerData.getString("cabal") + ")");
      }
      catch (SQLException e)
      {
        _log.severe("SevenSigns: Failed to save data: " + e);
      }
      finally
      {
          try
                {
              statement.close();
              con.close();
          }
          catch (Exception e) {}
      }
    }

    // Increasing Seal total score for the player chosen Seal.
    if (currPlayerData.getString("cabal") == "dawn")
      _signsDawnSealTotals.put(chosenSeal, _signsDawnSealTotals.get(chosenSeal) + 1);
    else
      _signsDuskSealTotals.put(chosenSeal, _signsDuskSealTotals.get(chosenSeal) + 1);

        saveSevenSignsData(player, true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.