Jump to content

Question

11 answers to this question

Recommended Posts

  • 0
Posted

Hello there.

 

If i remember correctly you have to modify the calculateRewards(L2Character) in L2Attackable.java. Just add a line killer.giveItem(...) with the proper arguments including the id of the item you want to give.

  • 0
Posted

Need to add seal stones to all monsters because seven signs have some problems.... I tried and did this to add to monsters between 70-75 levels

 

 

Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- a/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
+++ b/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
@@ -302,4 +302,5 @@
                        }
                }
+
               
                // Manage Base, Quests and Sweep drops of the L2Attackable.
@@ -1129,5 +1130,11 @@
                                else
                                        item = calculateCategorizedRewardItem(player, cat, levelModifier);
-                               
+                                if(getLevel() >= 70 && getLevel() <= 75)
+                                {
+                                        int min_seal_red = Rnd.get(700,1400);
+                                        int min_seal_green = Rnd.get(34350,69000);
+                                        player.addItem("BlueSealStone", 6362, min_seal_red, null, true);
+                                        player.addItem("GreenSealStone", 6361, min_seal_green, null, true);
+                                }
                                if (item != null)
                                {

 

But when i kill for example hot springs monsters it gives me 2 times red and 2 times green stones.

  • 0
Posted

Need to add seal stones to all monsters because seven signs have some problems.... I tried and did this to add to monsters between 70-75 levels

Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- a/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
+++ b/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
@@ -302,4 +302,5 @@
                        }
                }
+
               
                // Manage Base, Quests and Sweep drops of the L2Attackable.
@@ -1129,5 +1130,11 @@
                                else
                                        item = calculateCategorizedRewardItem(player, cat, levelModifier);
-                               
+                                if(getLevel() >= 70 && getLevel() <= 75)
+                                {
+                                        int min_seal_red = Rnd.get(700,1400);
+                                        int min_seal_green = Rnd.get(34350,69000);
+                                        player.addItem("BlueSealStone", 6362, min_seal_red, null, true);
+                                        player.addItem("GreenSealStone", 6361, min_seal_green, null, true);
+                                }
                                if (item != null)
                                {

But when i kill for example hot springs monsters it gives me 2 times red and 2 times green stones.

 

I already answered you, we use a spawnlist which doesn't use sealstone.

 

Which means there are mobs which got those stones.

 

Which means, edit the godamn spawns to pick directly mobs with stones. You can help yourself with any L2J IL spawnlist.

  • 0
Posted

Need to add seal stones to all monsters because seven signs have some problems.... I tried and did this to add to monsters between 70-75 levels

Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- a/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
+++ b/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
@@ -302,4 +302,5 @@
                        }
                }
+
               
                // Manage Base, Quests and Sweep drops of the L2Attackable.
@@ -1129,5 +1130,11 @@
                                else
                                        item = calculateCategorizedRewardItem(player, cat, levelModifier);
-                               
+                                if(getLevel() >= 70 && getLevel() <= 75)
+                                {
+                                        int min_seal_red = Rnd.get(700,1400);
+                                        int min_seal_green = Rnd.get(34350,69000);
+                                        player.addItem("BlueSealStone", 6362, min_seal_red, null, true);
+                                        player.addItem("GreenSealStone", 6361, min_seal_green, null, true);
+                                }
                                if (item != null)
                                {

But when i kill for example hot springs monsters it gives me 2 times red and 2 times green stones.

You have added your code inside this loop.  for (DropCategory cat : npcTemplate.getDropData()) {}

 

That's why it is being executed more than once.

  • 0
Posted

I already answered you, we use a spawnlist which doesn't use sealstone.

 

Which means there are mobs which got those stones.

 

Which means, edit the godamn spawns to pick directly mobs with stones. You can help yourself with any L2J IL spawnlist.

i don't understand what you mean... spawnlist don't include drop....

 

I just want to add seal stones to all monsters based on their level.

 

 

You have added your code inside this loop.  for (DropCategory cat : npcTemplate.getDropData()) {}

 

That's why it is being executed more than once.

So where should I add this code?

  • 0
Posted

Stop listening to idiots, the correct way to do it is to add a static reference of your L2DropItem object into the monster's droplist while loading it.

  • 0
Posted (edited)

try this 

net/sf/l2j/gameserver/model/actor/L2Attackable.java
-----------------------------------------------------

    private L2Character _overhitAttacker;
    + private L2PcInstance _PlayerDrop;

	@Override
	public boolean doDie(L2Character killer)
	{
		// Kill the L2Npc (the corpse disappeared after 7 seconds)
		if (!super.doDie(killer))
			return false;
		
	+	if(this instanceof L2MonsterInstance)
	+	{
	+		if (getLevel() >= 70 && getLevel() <= 75)
	+		{
	+			int min_seal_red = Rnd.get(700, 1400);
	+			int min_seal_green = Rnd.get(34350, 69000);
	+			_PlayerDrop.addItem("BlueSealStone", 6362, min_seal_red, null, true);
	+			_PlayerDrop.addItem("GreenSealStone", 6361, min_seal_green, null, true);
	+		}
	+	}
Edited by tazerman2
  • 0
Posted (edited)

Better work on NpcTable.java , as you can see it loads all npcs and adds drops with this method template.addDropData(dropDat, category) where dropDat is is a  DropData instance. Simply use this method again with your own DropData instance (with whatever items  and item counts you want).

Edited by LAGLAG

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • L2GOLD - Gold x45 C4 Project   C4 - Scions of Destiny: Protocol 656   Fully L2Gold Features - Daily Quest - Daily Mining Quest - Ancient Weapons -Refine System  -Rebirth System -Fully configurable everything you want -Gold stats/Gold skills/Gold items working 100% -Zones 100% alike  -Unique donations system (npc or voicedcommand .donate) - On Enchant success announcement ( if +16 for weapon, 8 for armor , 7 for jewel) - Announce of Castle Lord - Announce of Hero  - Olympiad Max A grade - Olympiad Buffs on matches changed to Gold Alike -Buff shop system on selling buffs with command .buffshop Shift+click dropinfo on mobs. and many more ingame addons.   Server is running a Test Server: Online to anyone can test it.   Game Client: https://www.mediafire.com/file/d0000rmt8ym0323/Lineage_2_C4_Client.rar/file   Game Patch: https://www.mediafire.com/file/39sojdex2mgj55k/L2Gold+Patch+C4.rar/file   GM Accounts: ID: root1 pass root1 [ accounts go from  root1 until root20 ]   Regular Accounts Registrations: http://84.247.164.27/?page=register   Some Screenshots: https://imgur.com/a/KSE4kdq   Contact me here via PM (only serious buyers).    Price of the product: Fully Server Pack + Source ( 200 Euros )
    • Https://lineage2dex.com Discord link : https://discord.com/channels/786506979493281794/814778540893536307/1424434670690504874 ## Dexters! **Our x25 server is celebrating its first week!** 🔥 Online stays strong at peak levels!  New players are joining every day, with 200+ new master accounts registered daily — amazing results! ✨ Tomorrow we launch a new episode along with the first event. Full details will be shared in the morning(October 6). 🎁 And for this little celebration, here’s a bonus code with a small gift for you! ## O05-IIW **Contains: ** * x3 - Training Potion 200% (20 min) * x200 - Mana Potions Loyatly (no weight) *The code will remain active until October 6, 7 AM(server time). And be sure, you have at less 20 slots free on inv before using a code.* **👉 How to redeem:** 1. Log in to your Master Account on site. 2. Click the Redeem Bonus Code button at the top of the panel, type code click redeem. 3. Select the account and character you want to receive the gift.  **Codes work only 1 time for 1 Master Account!** ### Enjoy your adventure, Dexters!
    • Complete Server Pack + Source Files:     C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 70 EUR   C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 90 EUR Screenshots: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR The same as C4 but in C6 Client so the Screenshots is the same: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl     C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 50EUR Screenshots: https://imgur.com/a/9kB3oA9   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/Z2kZxuv   Contact me here via PM (only serious buyers). 
    • Where should I modify the IP to be able to put it online for testing?
    • I had issues with Smart Guard to, there is not even support in many cases.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock