Jump to content
  • 0

[Help] Legend system


Question

Posted

Hello! I tried to add Stefoulis15 Legend System but it seems it doesn't do anything :P I'm using L2joff. Can someone help? Here is my patch:

 

Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 1475)
+++ java/config/l2jmods.properties	(working copy)
@@ -275,6 +275,28 @@
ManaPotionLevel = 1

# ---------------------------------------------------------------------------
+# Legend System
+# ---------------------------------------------------------------------------
+
+# Custom Legends Title?
+LegendTitle = -Legend-
+
+# Custom Legends Title Color?
+# Values are In RGB Format. Max For Very Int is 255
+LegendTitleColorRed = 0
+LegendTitleColorGreen = 0
+LegendTitleColorBlue = 0
+
+# Custom Legends Name Color?
+# Values are In RGB Format. Max For Very Int is 255
+LegendNameColorRed = 0
+LegendNameColorGreen = 0
+LegendNameColorBlue = 0
+
+# Legends Vitality Level?
+LegendVitalityLevel = 4
+
+# ---------------------------------------------------------------------------
# Welcome message
# ---------------------------------------------------------------------------
# Allow screen welcome message?
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 1475)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -646,6 +646,14 @@
	public static boolean OFFLINE_TRADE_ENABLE;
	public static boolean OFFLINE_CRAFT_ENABLE;
	public static boolean OFFLINE_SET_NAME_COLOR;
+	//public static String LEGEND_TITLE;
+	public static int LEGEND_TITLE_COLOR_RED;
+	public static int LEGEND_TITLE_COLOR_GREEN;
+	public static int LEGEND_TITLE_COLOR_BLUE;
+	public static int LEGEND_NAME_COLOR_RED;
+	public static int LEGEND_NAME_COLOR_GREEN;
+	public static int LEGEND_NAME_COLOR_BLUE;
+	//public static int LEGEND_VITALITY_LEVEL;
	public static int OFFLINE_NAME_COLOR;
	public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT;
	public static int MANA_POTION_LEVEL;
@@ -1958,6 +1966,15 @@
					L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
					L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));

+          //LEGEND_TITLE = String.valueOf(L2JModSettings.getProperty("LegendTitle"));
+					LEGEND_TITLE_COLOR_RED = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorRed", "0"));
+					LEGEND_TITLE_COLOR_GREEN = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorGreen", "0"));
+					LEGEND_TITLE_COLOR_BLUE = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorBlue", "0"));
+					LEGEND_NAME_COLOR_RED = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorRed", "0"));
+					LEGEND_NAME_COLOR_GREEN = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorGreen", "0"));
+					LEGEND_NAME_COLOR_BLUE = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorBlue", "0"));
+					//LEGEND_VITALITY_LEVEL = Integer.parseInt(L2JModSettings.getProperty("LegendVitalityLevel", "0"));
+
					L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False"));
					L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False"));
					L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingFreight", "False"));
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 1475)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -65,6 +65,7 @@
import net.sf.l2j.gameserver.datatables.HennaTable;
import net.sf.l2j.gameserver.datatables.HeroSkillTable;
import net.sf.l2j.gameserver.datatables.ItemTable;
+import net.sf.l2j.gameserver.datatables.LegendSkillTable;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.datatables.NobleSkillTable;
import net.sf.l2j.gameserver.datatables.NpcTable;
@@ -262,8 +263,10 @@

	// Character Character SQL String Definitions:
     private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,last_recom_date,vitality_points,createTime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=? WHERE charId=?";
-    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime FROM characters WHERE charId=?";
+	//private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=? WHERE charId=?";
+    //private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime FROM characters WHERE charId=?";
+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,legend=? WHERE charId=?";
+    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,legend FROM characters WHERE charId=?";

     // Character Teleport Bookmark:
     private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)";
@@ -558,6 +561,7 @@

	private boolean _noble = false;
	private boolean _hero = false;
+	private boolean _legend = false;

	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
	private L2Npc _lastFolkNpc = null;
@@ -2779,6 +2783,10 @@
		// Add Hero skills if hero
		if (isHero())
			setHero(true);
+			
+		// Add Legend Skills if legend	
+		if (islegend())
+			setlegend(true);

		// Add clan skills 
		if (getClan() != null)
@@ -7701,7 +7709,8 @@
			statement.setLong(51, getDeathPenaltyBuffLevel());
			statement.setInt(52, getBookMarkSlot());
			statement.setInt(53, getVitalityPoints());
-            statement.setInt(54, getObjectId());
+			statement.setInt(54, islegend() ? 1 : 0);
+            statement.setInt(55, getObjectId());

			statement.execute();
			statement.close();
@@ -10136,7 +10145,8 @@
     	_OlympiadStart = b;
     }

-	public boolean isOlympiadStart(){
+	public boolean isOlympiadStart()
+	{
		return _OlympiadStart;
	}

@@ -10144,6 +10154,28 @@
     {
         return _hero;
     }
+    
+    public boolean islegend()
+    {
+    	return _legend;
+    }
+    
+	public void setlegend(boolean legend)
+	{
+		if (legend && _baseClass == _activeClass)
+		{
+			for (L2Skill s : LegendSkillTable.getLegendSkills())
+				addSkill(s, false); //Dont Save Legend skills to database
+		}
+		else
+		{
+			for (L2Skill s : LegendSkillTable.getLegendSkills())
+				super.removeSkill(s); //Just Remove skills from nonLegend characters
+		}
+		_legend = legend;
+		
+		sendSkillList();
+	}

     public boolean isInOlympiadMode()
     {
Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Character.java	(revision 1475)
+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java	(working copy)
@@ -963,6 +963,10 @@
                 if (weaponInst != null)
                     weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);

+            if (player.islegend() && target instanceof L2PcInstance)
+            {
+            target.setCurrentCp(0);
+            }

         	if (player != null)
         	{
@@ -971,7 +975,8 @@
                 	// If hitted by a cursed weapon, Cp is reduced to 0
         			if (!target.isInvul())
         				target.setCurrentCp(0);
-        		} else if (player.isHero())
+        		} 
+        		else if (player.isHero())
         		{
         			if (target instanceof L2PcInstance && ((L2PcInstance)target).isCursedWeaponEquipped())
                     	// If a cursed weapon is hitted by a Hero, Cp is reduced to 0
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 1475)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -338,6 +338,19 @@
			engage(activeChar);
			notifyPartner(activeChar,activeChar.getPartnerId());
		}
+		
+		if (activeChar.islegend())
+		{
+			//activeChar.setTitle(Config.LEGEND_TITLE);
+			activeChar.getAppearance().setTitleColor(Config.LEGEND_TITLE_COLOR_RED, Config.LEGEND_TITLE_COLOR_GREEN, Config.LEGEND_TITLE_COLOR_BLUE);
+			activeChar.getAppearance().setNameColor(Config.LEGEND_NAME_COLOR_RED, Config.LEGEND_NAME_COLOR_GREEN, Config.LEGEND_NAME_COLOR_BLUE);
+			//activeChar.setVitalityLevel(Config.LEGEND_VITALITY_LEVEL);
+			activeChar.sendMessage("You are a Legend!");
+		}
+		else
+		{
+		  activeChar.sendMessage("You are not a Legend.");
+		}

		if (activeChar.isCursedWeaponEquipped()) 
		{

2 answers to this question

Recommended Posts

  • 0
Posted

this is for l2j

holy crap

Holy crap it can be used anywhere!! xD

The single thing it requests is BRAIN FUNCTION! ^^ very important stuff...

 

Wrong section, locked ^^

Guest
This topic is now closed to further replies.


  • Posts

    • If you don't want spam, stop badmouthing open source code just to try and sell your compiled crap in a licensed DLL, which is probably full of backdoors like any criminal would do.   I'll create a Git repository just to publish the mods Skylord prepared for this garbage for free.   You're the only scammer here, selling a compilation of the source code Guytis gave you. Regards.   It's not easy when you dedicate yourself to insulting, threatening, and harassing people. Just look at your own reality and you'll realize it.
    • (3241-100)/9 = 349 online xD     WHAT I WILL SEE ON NEW SEASON ? *Free VIP characters for everyone for first 3 days after opening ! Unique augmentation trade/sell system (NEW PATCH V3.2). Improved server stability. No more lagg / dc. Pvp map area HIDE Names/clans unique system. Big changes on augmentation system.  rotfl Lucky fortune monsters on levelling area with 10min spawn. Also we will try to push longer seasons ever !  HAHAHAHAHAHA XD Increased giran trading area for sell. New raid boss events in coliseum. Fixed reflect damage skills. New raid boss banshee. Fixed pvp area flag issues. Fixed castle siege pray issues. New pvp map in sea of spores. Increased all mob drops rate by +20%. And much more...   Augment diammond 100% 3x winter xDD   And now the best part   HAHAHAH 1-10 random level LS Augment Also we will try to push longer seasons ever !  HAHAHAHAHAHA XD   GRAND START FROM - 15/08/2025, FRIDAY, 20:00 +3 GMT ! GRAND OPENING FROM - 10/10/2025, FRIDAY, 20:00 +3 GRAND OPENING FROM - 05 DECEMBER 2025, FRIDAY, 20:00 +2 GMT ! GRAND OPENING FROM - 12/052025, FRIDAY, 20:00 +3 GMT ! GRAND OPENING FROM - 23 JANUARY 2026, FRIDAY, 20:00 +2 GMT ! WIPE ! NEW SEASON GRAND OPENING FROM TODAY ! - 23/01/2026, FRIDAY, 20:00 +3 GMT ! OPENING TODAY !!! FROM - 06/03/2026, FRIDAY, 20:00 +3 GMT !   1. When wipe?  2. When will there be any response to the allegations? 3. When will they stop deceiving players with the actual number of players online? 4. When change server name to L2][Wipe the best waste Time][Money?
    • Don't spam my post again. Do you need attention? That guy doesn't work at L2Devs, he's not a programmer, and I've never spoken to him. You should respond to the people you scammed. Regards!
    • “WRONG EMAIL – AND EVERYTHING FALLS APART.” ▪ Requests are different. Sometimes a task takes three days, sometimes thirty minutes. ▪ Recently a regular client contacted us. The account had one e-mail, but another one was required for a specific service. ▪ The screenshot was sent immediately. Task – carefully replace the e-mail in the document so that everything looks natural and leaves no editing traces. ▪ Small details like this are often underestimated. › What usually happens: – one symbol in the e-mail doesn’t match – the system starts checking metadata – questions appear about the file origin – the document goes to additional verification ▪ We simply did it properly: the e-mail matches, the file structure remained intact, the document looks original. ▪ Sometimes a good result is not “magic”, but precision in details. ▪ If your document were checked right now – are you sure there are no small details that could ruin everything? › TG: https://t.me/mustang_service ( https:// t.me/ mustang_service ) › Channel: https://t.me/+JPpJCETg-xM1NjNl ( https:// t.me/ +JPpJCETg-xM1NjNl ) #documentdesign #verification #documents #case #antifraud
    • Skylord  = L2Gold.eu ;   Skylord is the programmer at L2Devs. Look what he posted in my thread. I reported him, and they automatically deleted his post and closed my thread.   They need to trick people into buying this garbage.   You can safely use this extender:   https://maxcheaters.com/topic/253977-%F0%9F%94%A5-l2ext-custom-interlude-vang-%E2%80%93-2026-release/  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..