Jump to content

Recommended Posts

Posted

Well , It's Been AGES since i shared this thing , and i thought it would be better if i shared the new version to you.

no more talking.

 

Here's The Diff:

Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4307)
+++ java/config/l2jmods.properties	(working copy)
@@ -132,3 +132,20 @@
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------#
+#Noblesse Item Configs
+#---------------------#
+NoblesseItemEnabled = False
+
+# ID Of The Noblesse Item
+# Default : 6673 ( Festival Adena )
+NoblesseItemId = 6673
+
+# Noblesse Item Lvl Restriction
+# A Player Lower than 76 level won't be able to use this item
+NoblesseItemLvlRestriction = True
+
+# Noblesse Item Sub Restriction
+# A Player That is not with his subclass won't be able to use this item
+NoblesseItemSubRestriction = True
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 4307)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -882,6 +882,11 @@
     public static boolean L2JMOD_WEDDING_FORMALWEAR;
     public static int L2JMOD_WEDDING_DIVORCE_COSTS;

+    public static int NOBLESSE_ITEM_ID;
+    public static boolean NOBLESSE_ITEM_LEVEL_RESTRICTION;
+    public static boolean NOBLESSE_ITEM_SUBCLASS_RESTRICTION;
+    public static boolean NOBLESSE_ITEM_ENABLED;
+    
     // Packet information
     /** Count the amount of packets per minute ? */
     public static boolean  COUNT_PACKETS           = false;
@@ -1858,7 +1863,11 @@
                 L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                 L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                 L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
-
+                NOBLESSE_ITEM_ID						= Integer.parseInt(L2JModSettings.getProperty("NoblesseItemId", "6673"));
+                NOBLESSE_ITEM_LEVEL_RESTRICTION			= Boolean.parseBoolean(L2JModSettings.getProperty("NoblesseItemLvlRestriction", "True"));
+                NOBLESSE_ITEM_SUBCLASS_RESTRICTION		= Boolean.parseBoolean(L2JModSettings.getProperty("NoblesseItemSubRestriction", "True"));
+                NOBLESSE_ITEM_ENABLED					= Boolean.parseBoolean(L2JModSettings.getProperty("NoblesseItemEnabled", "False"));
+                
                 if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                 {
                     TVT_EVENT_ENABLED = false;
Index: java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- java/net/sf/l2j/gameserver/GameServer.java	(revision 4307)
+++ java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -136,6 +136,7 @@
import net.sf.l2j.gameserver.handler.itemhandlers.Harvester;
import net.sf.l2j.gameserver.handler.itemhandlers.MercTicket;
import net.sf.l2j.gameserver.handler.itemhandlers.MysteryPotion;
+import net.sf.l2j.gameserver.handler.itemhandlers.NoblesseItem;
import net.sf.l2j.gameserver.handler.itemhandlers.PaganKeys;
import net.sf.l2j.gameserver.handler.itemhandlers.Potions;
import net.sf.l2j.gameserver.handler.itemhandlers.Recipes;
@@ -476,6 +477,10 @@
		_itemHandler.registerItemHandler(new SpecialXMas());
		_itemHandler.registerItemHandler(new SummonItems());
		_itemHandler.registerItemHandler(new BeastSpice());
+		
+		if (Config.NOBLESSE_ITEM_ENABLED)
+		_itemHandler.registerItemHandler(new NoblesseItem());
+		
         _log.config("ItemHandler: Loaded " + _itemHandler.size() + " handlers.");

		_skillHandler = SkillHandler.getInstance();
Index: java/net/sf/l2j/gameserver/handler/itemhandlers/NoblesseItem.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/itemhandlers/NoblesseItem.java	(revision 0)
+++ java/net/sf/l2j/gameserver/handler/itemhandlers/NoblesseItem.java	(revision 0)
@@ -0,0 +1,54 @@
+package net.sf.l2j.gameserver.handler.itemhandlers;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.handler.IItemHandler;
+import net.sf.l2j.gameserver.model.L2ItemInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
+import net.sf.l2j.gameserver.serverpackets.MagicSkillUser;
+
+public class NoblesseItem implements IItemHandler
+{
+    private static final int ITEM_IDS[] = 
+    {
+        Config.NOBLESSE_ITEM_ID
+    };
+    
+    public void useItem(L2PlayableInstance playable, L2ItemInstance item)
+    {
+            if(!(playable instanceof L2PcInstance))
+                return;
+            L2PcInstance activeChar = (L2PcInstance)playable;
+            if(activeChar.isNoble())
+            {
+                activeChar.sendMessage("You Are Already A Noblesse!");
+                return;
+            } 
+            if (activeChar.getLevel() < 76 && Config.NOBLESSE_ITEM_LEVEL_RESTRICTION)
+            {
+            	activeChar.sendMessage("You Must Be Over 76 Level To Use This Item!");
+            	return;
+            }
+            if (!activeChar.isSubClassActive() && Config.NOBLESSE_ITEM_SUBCLASS_RESTRICTION)
+            {
+            	activeChar.sendMessage("You Must Be With Your Subclass To Use This Item!");
+            	return;
+            }
+            else
+            {
+                MagicSkillUser MSU = new MagicSkillUser(playable, activeChar, 2023, 1, 1, 0);
+                activeChar.sendPacket(MSU);
+                activeChar.broadcastPacket(MSU);
+                activeChar.setNoble(true);
+                activeChar.sendMessage("You Are Now a Noble,You Are Granted With Noblesse Status , And Noblesse Skills.");
+                activeChar.broadcastUserInfo();
+                activeChar.getInventory().addItem("Noblesse Tiara",7694, 1, activeChar, playable);
+                playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
+            }
+        }
+
+    public int[] getItemIds()
+    {
+        return ITEM_IDS;
+    }
+}
\ No newline at end of file

 

Enjoy.

Posted
  On 6/26/2010 at 8:58 AM, Celko™ said:

Stefoulis is back ? :o Niceeee

Can i ask?What do you mean new version?What difference this custom item have?

 

 

well , the last version i've shared

hadn't any restrictions about level and active subclass.

eh , this gives you noblesse tiara when u click the item

also , when u clicked appeared the social action that appears when you become a hero. now its just a firework effect.

last one, the other wasnt that configurable. the only config was enable/disable.

now it has configs about the restrictions , the item id and enable/disable.

Posted
  On 6/26/2010 at 9:01 AM, Stefoulis15 said:

well , the last version i've shared

hadn't any restrictions about level and active subclass.

eh , this gives you noblesse tiara when u click the item

also , when u clicked appeared the social action that appears when you become a hero. now its just a firework effect.

last one, the other wasnt that configurable. the only config was enable/disable.

now it has configs about the restrictions , the item id and enable/disable.

too nice.

Thnx for sharing.

Keep up :D

Posted
  On 6/26/2010 at 10:18 AM, +cs.Tribal®™ said:

WOOOOOOW!

I'm soo excited, Stef is BACK!

I hope you make the forum full of shares mate!

Jeus are u that... god..

 

Anyway, nice to have u back stef.

Posted
  On 7/1/2010 at 6:00 PM, Chronos™ said:

Stefoulis where i have to add this code?

 

Look at package.

  • 2 weeks later...

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

    • We remind you that right now you can create a new character and get the benefits of the bonus-start, which will begin on April 19th. These advantages include: — 10 sets of buff scrolls (phys or mage, depending on class), — 10 packs of +50% Drop/Spoil runes (2 hours each), — 10 packs of +50% Exp runes (2 hours each). Moreover, characters between level 21 and 30 will receive upon login: — 6 sets of buff scrolls, — 6 packs of +50% Drop/Spoil runes (2h each), — 6 packs of +50% Exp runes (2h each). Don't miss the chance to start your adventure on Airin!
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
    • It's also the players' fault, because there have been decent servers implementing some of the things you said plus some other 'innovations', plus many QOL things for newbies (ingame bestiary, with drops searchers, etc). In the end, it's the players who decide to feed into that shit and play the most garbage servers simply because the owners of the servers gave their clan leaders 100 euros, or they insta quit the server because they didn't win the first QA, etc, etc, etc.   In the end, if a server is garbage or great it doesn't really matter if the players don't wanna stay in there.   Players are no better than the devs themselves, in the end it seems there are abusive devs who will milk the shit out of their willingly milkable players, or there are none, goes both ways.
    • In my opinion, L2 is dead because the people who make servers didn’t adapt to today’s reality. People are getting older, life moves faster, there are more responsibilities, and less free time. And I’m not even talking about newcomers—how can you expect someone new to this game to learn by Googling every drop location or quest requirement? These things should’ve been integrated into the game, made accessible with just a few clicks through the interface. Instead, so much time was wasted trying to recreate retail-like features that no one asked for. Everyone hates autofarm, but why? Because admins never found a smart way to implement it. You could have made it available only in specific zones, with reduced drops, working like Adrenaline, or auto-teleporting to farm for a limited time per day—just enough to help people with limited time stay relevant in-game. There should also be zones with better drops, where active farming actually matters. Other features feel pointless—like the Life Stone system. Spamming LS to get a skill? Instead, you could create a system where you level up the skill with low chances per level, something that feels progressive and fair. Crafting should be simpler too. Right-click a recipe, and the required materials should show up right there. As for sieges, why not create daily clan war events at peak hours—one for Europeans, one for Latinos? You could spawn crystals inside or outside castles that give points and trigger PvP. Add a boss during the event that gives even more points, and let the top clan in the ranking take the castle. I could go on forever, but what’s the point? The community died because the people who had the knowledge to improve the game just took the easy way out, copying the same server formula over and over until no one could enjoy playing it anymore.
    • It's not because I'm an admin that he treated me differently. I actually gave him several clients from my side without him even knowing they came from me, and most of them had no issues. I was also waiting 3–4 weeks at times for things I bought from AvE, even when I was in a rush. He still delivered in the end. That said, I'm not defending him blindly. I'm just saying it's unlikely he’d risk scamming someone over 60–100€, especially knowing how quickly word spreads here.
  • Topics

×
×
  • Create New...