Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Player.addExpAndSp()


    for(int i = 0; i < strvals.length; i++)
    {
      strvals[i] = strvals[i].trim();
      vals[i] = strvals[i].isEmpty() ? 0 : Long.parseLong(strvals[i]);
    }
    player.addExpAndSp(vals[0], vals[1], false, false);
    player.sendMessage("Admin is adding you " + vals[0] + " exp and " + vals[1] + " SP.");
    activeChar.sendMessage("Added " + vals[0] + " exp and " + vals[1] + " SP to " + player.getName() + ".");
  }

  private void setSubclass(final L2Player activeChar, final L2Player player)
View Full Code Here


            broadcastPacket(new SpawnEmitter(this, attacker));
            ThreadPoolManager.getInstance().scheduleGeneral(new SoulConsumeTask(attacker), 1000);
          }
          xpsp[0] = applyOverhit(killer, xpsp[0]);
          xpsp = attacker.applyVitality(this, xpsp[0], xpsp[1], 1.0);
          attacker.addExpAndSp((long) xpsp[0], (long) xpsp[1], false, true);
        }
        rewards.remove(attacker);
      }
      else
      {
View Full Code Here

      if(pXp <= tXp)
      {
        return;
      }
      removeItem(player, Config.SERVICES_DELEVEL_ITEM, Config.SERVICES_DELEVEL_COUNT);
      player.addExpAndSp(-(pXp - tXp), 0, false, false);
    }
  }

  public void onLoad()
  {
View Full Code Here

    {
      return;
    }
    if(!prof || prof && Config.RATE_QUESTS_OCCUPATION_CHANGE)
    {
      player.addExpAndSp((long) (exp * getRateQuestsReward()), (long) (sp * getRateQuestsReward()), false, false);
    }
    else
    {
      player.addExpAndSp(exp, sp, false, false);
    }
View Full Code Here

    {
      player.addExpAndSp((long) (exp * getRateQuestsReward()), (long) (sp * getRateQuestsReward()), false, false);
    }
    else
    {
      player.addExpAndSp(exp, sp, false, false);
    }
  }

  /**
   * Add player to get notification of characters death
View Full Code Here

      }
      Functions.removeItem(activeChar, SkillTreeTable.NORMAL_ENCHANT_BOOK, 1);
    }
    if(Rnd.chance(rate))
    {
      activeChar.addExpAndSp(0, -1 * requiredSp, false, false);
      Functions.removeItem(activeChar, 57, requiredAdena);
      activeChar.sendPacket(new SystemMessage(SystemMessage.SP_HAS_DECREASED_BY_S1).addNumber(requiredSp), new SystemMessage(SystemMessage.SUCCEEDED_IN_ENCHANTING_SKILL_S1).addSkillName(_skillId, _skillLvl), new SkillList(activeChar), new ExEnchantSkillResult(1));
      Log.add(activeChar.getName() + "|Successfully enchanted|" + _skillId + "|to+" + _skillLvl + "|" + rate, "enchant_skills");
    }
    else
View Full Code Here

    {
      activeChar.sendPacket(Msg.ITEMS_REQUIRED_FOR_SKILL_ENCHANT_ARE_INSUFFICIENT);
      return;
    }
    Functions.removeItem(activeChar, SkillTreeTable.UNTRAIN_ENCHANT_BOOK, 1);
    activeChar.addExpAndSp(0, sl.getCost()[1] * sl.getCostMult(), false, false);
    activeChar.addSkill(newSkill, true);
    if(_skillLvl > 100)
    {
      SystemMessage sm = new SystemMessage(SystemMessage.Untrain_of_enchant_skill_was_successful_Current_level_of_enchant_skill_S1_has_been_decreased_by_1);
      sm.addSkillName(_skillId, _skillLvl);
View Full Code Here

      activeChar.sendPacket(Msg.ITEMS_REQUIRED_FOR_SKILL_ENCHANT_ARE_INSUFFICIENT);
      return;
    }
    Functions.removeItem(activeChar, SkillTreeTable.CHANGE_ENCHANT_BOOK, 1);
    Functions.removeItem(activeChar, 57, requiredAdena);
    activeChar.addExpAndSp(0, -1 * requiredSp, false, false);
    int levelPenalty = Rnd.get(Math.min(4, _skillLvl % 100));
    _skillLvl -= levelPenalty;
    if(_skillLvl % 100 == 0)
    {
      _skillLvl = sl.getBaseLevel();
View Full Code Here

    }
    Functions.removeItem(activeChar, SkillTreeTable.SAFE_ENCHANT_BOOK, 1);
    if(Rnd.chance(rate))
    {
      activeChar.addSkill(skill, true);
      activeChar.addExpAndSp(0, -1 * requiredSp, false, false);
      Functions.removeItem(activeChar, 57, requiredAdena);
      activeChar.sendPacket(new SystemMessage(SystemMessage.SP_HAS_DECREASED_BY_S1).addNumber(requiredSp), new SystemMessage(SystemMessage.SUCCEEDED_IN_ENCHANTING_SKILL_S1).addSkillName(_skillId, _skillLvl), new ExEnchantSkillResult(1));
      activeChar.sendPacket(new SkillList(activeChar));
      updateSkillShortcuts(activeChar);
      Log.add(activeChar.getName() + "|Successfully safe enchanted|" + _skillId + "|to+" + _skillLvl + "|" + rate, "enchant_skills");
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.