Jump to content

Recommended Posts

Posted (edited)


//This code provides lvl 80 character

 

 

===================================================================

Config.java    (revision 0)

===================================================================

+ public static boolean ENABLE_CMD_UPLEVEL;

+ public static int UPLEVEL_ITEM_ID;

+ public static int UPLEVEL_ITEM_COUNT;

              public static String ALLOWED_SKILLS;

         public static String ALLOWED_SKILLS;

         public static FastList<Integer> ALLOWED_SKILLS_LIST = new FastList<>();

 

 

 

 

 

 +           ENABLE_CMD_UPLEVEL = Boolean.parseBoolean(L2JFrozenSettings.getProperty("EnableUpSystem", "True"));

 +           UPLEVEL_ITEM_ID = Integer.parseInt(L2JFrozenSettings.getProperty("UpLevelItemID", "3481"));

 +           UPLEVEL_ITEM_COUNT = Integer.parseInt(L2JFrozenSettings

ALT_SERVER_NAME_ENABLED = Boolean.parseBoolean(L2JFrozenSettings.getProperty("ServerNameEnabled", "false"));

ANNOUNCE_TO_ALL_SPAWN_RB = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AnnounceToAllSpawnRb", "false"));

 

 

 

===================================================================

gameserver/handler/VoicedCommandHandler.java

===================================================================

            import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Voting;

            import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding;

+           import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.UpLevel;

 

 

 

 

+        if (Config.ENABLE_CMD_UPLEVEL)

+ registerVoicedCommandHandler(new UpLevel());

+ if (Config.BANKING_SYSTEM_ENABLED)

+ {

+ registerVoicedCommandHandler(new BankingCmd());

+ }

 

 

if (Config.CTF_COMMAND)

{

registerVoicedCommandHandler(new CTFCmd());

}

===================================================================

gameserver/handler/voicedcommandhandlers/UpLevel.java    (revision 0)

===================================================================

package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;

 

import java.text.SimpleDateFormat;

 

import com.l2jfrozen.Config;

import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;

import com.l2jfrozen.gameserver.model.PcInventory;

import com.l2jfrozen.gameserver.model.L2World;

import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;

import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;

import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;

import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;

import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;

 

/*

 * Edited By Dagger

 */

public class UpLevel implements IVoicedCommandHandler

{

   private static final String[] VOICED_COMMANDS = {"up"};

   

   public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)

   {

   if (command.equalsIgnoreCase("up"))

   

   {

   

    if(activeChar.getInventory().getItemByItemId(Config.UPLEVEL_ITEM_ID) != null && activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID).getCount() >= Config.UPLEVEL_ITEM_COUNT)

            {

            activeChar.getInventory().destroyItemByItemId("GoldDragon", Config.UPLEVEL_ITEM_ID, Config.UPLEVEL_ITEM_COUNT, activeChar, activeChar.getTarget());

                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16));

   activeChar.getStat().addExp(activeChar.getStat().getExpForLevel(81));

                activeChar.sendMessage("Felicidades : "+activeChar.getName()+" Ha Ganado LvL 80 usando el comando .up ! .");

                activeChar.broadcastUserInfo();

              }

            else

            {

                activeChar.sendMessage("No tienes el item necesario para usar este comando !!! ");

                return true;

            }

   }

   

   return false;

   }

 

   public String[] getVoicedCommandList()

    {

   return VOICED_COMMANDS;

   }

}

//No dejar nueva linea

===================================================================

gameserver.config.functions.l2jfrozen.properties

===================================================================

# Npc Protector Message

ProtectorMessage = Hey Tu ! aqui no se puede matar !!!

+#

+#Comando .up ( Enable = True | Disable = False )

+#Subir de nivel 80 al personaje

+EnableUpSystem = True

+UpLevelItemID = 3481

+UpLevelItemCount = 1

//No dejar nueva linea

 

Edited by osvaldotl2015
Posted

mate dad shit will give npe(null pointer exception) :) if the UPLEVEL_ITEM_ID is not enough count in your invetory probably you should make a check for the count in your invetory. and also you need a check for the lvl up,if they are already 80 lvl to not use it again. 

Posted

Use following for "item blabla destroyed", inventory update (you miss it) and weight refresh. It also checks on item consumption (atm you can spam your command even with 0 item, I guess).

if (activeChar.destroyItemByItemId(...
Posted

 

Use following for "item blabla destroyed", inventory update (you miss it) and weight refresh. It also checks on item consumption (atm you can spam your command even with 0 item, I guess).

if (activeChar.destroyItemByItemId(...

Ty :) Code reloaded :) 

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
Reply to this topic...

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



  • Posts

    • A New Chapter Begins We're Rebuilding – Join Our Staff Team After many years of activity, growth, and challenges, it’s finally time for our community to restructure and move forward. We’re ready to turn a new page and evolve into something greater — but we can’t do it without the help of passionate and committed people. That’s why we’re now opening up staff applications for those who want to actively shape the future of our community. If you have the motivation, time, and patience to contribute to something meaningful, this is your chance to step in and make a real impact. What We're Looking For We’re building a fresh and dedicated team of individuals who are ready to support and grow this project. Open roles include: Moderators – to keep the forum clean, safe, and organized Gaming Moderators – to help manage gaming boards (e.g., Lineage, GTA FiveM) Content Creators – to post updates, guides, and articles Community Managers – to engage users and drive activity Technical Staff – for development, backend, and server work We’re not focusing only on Lineage anymore. Our vision is expanding to new areas — including GTA FiveM and other multiplayer games you might have expertise in. If you have a good idea, a server plan, or something new to suggest — we’re open to it. Now’s the time to bring it forward. Requirements We’re looking for individuals who have: A history of activity on the forum (preferred) Available time to contribute consistently A sense of teamwork and responsibility A genuine interest in gaming and community building If you're interested, just send a private message to me or Celestine. (or just reply here) Tell us a few things about yourself and how you’d like to contribute. Let’s bring this community back to life. Let’s rebuild something great — together.   M M G A 
    • Lineage2Network - Interlude Reimagined   Embark on a revitalized journey through the classic Interlude era with Lineage2.Network. Our server is meticulously crafted by veteran players to deliver a seamless and engaging experience, blending the nostalgia of the Chaotic Chronicle with modern enhancements.     Server details   Chronicle: Interlude + Classic Rates: EXP x30 | Adena x10 | Drop x10 | Spoil x10     Server features   Daily Missions - complete special tasks for daily rewards Attendance Rewards - get rewards for online time Custom Events - TVT, DM, CTF NPC buffer duration - 2 hours   Mana Potions - restores 1000 MP, 10s cooldown Ring of Core additional stats: +1 STR Earring of Orfen additional stats: +1 INT Shadow Earring of Zaken - 7 days Shadow Ring of Queen Ant - 7 days   Max buff count - 24 (20 + 4 with Divine Inspiration) Noblesse, Heroic Valor, Flames of Invincibility and Celestial Shield don't take buff slot Reworked Cancel, Mage and Warrior Banes – removed buffs reappear after 30s Block Buffs - block all incoming buffs except from self/party Sweeper Festival added to Spoiler class   Subclass – retail or purchasable Noblesse – retail or purchasable up to Barakiel; collect 8 fragments for full staff 1st & 2nd class free, 3rd needs 700 Halisha Marks or is purchasable New Olympiad System: new stadiums with NPC buffer,  1 week period.     Key dates     Beta Launch: April 14, 2025 Official Launch: May 9, 2025     Check out full server details in our website And visit our discord   Join us and be part of community where classic gameplay meets innovative updates. Whether you're a solo adventurer or part of a formidable clan, Lineage2.Network offers a dynamic and balanced environment for all.  
    • Good day. Our game currency store is looking for suppliers of adena and items on a project such as L2REBORN x10. We also sell Epic jewelry and various items on this project L2REBORN x10. There are items and adena on L2REBORN x1. For all questions, write to us in discord - goddardshop
  • Topics

×
×
  • Create New...