Jump to content
  • 0

Mobs That Drop Only Adena / Custom


Question

Posted (edited)

Hello,

 

I would appreciate if someone would help me out with a little scripting. I would like that mobs drop only Adena and the custom items, the IDs don't really matter for the moment, I will be able to edit those myself, just make space for few of them.

 

Here's the file, I think it's somewhere around ln 197. My idea was to make an if around the chance, like if the itemid != adenaid || itemid != smthelse, then the chance for anything else to drop is 0%, not sure if that would work, just trying to contribute as much info as I can. If you have a better solution, much thanks from me!

 

Drops are stored into .xml's so clearing with SQL query won't work.

 

https://mega.nz/#!DJNliL4T!i_2DL5QIaxYivQBBOUWbkte_OygOQHPuOfRtkynQzmg

Edited by RHDS

10 answers to this question

Recommended Posts

  • 0
Posted

You should look for the class which is loading the drop lists. I have got NpcParser. In there you should just make check like this:

if(!ArrayUtils.contains(Config.POSSIBLE_DROP_IDS, itemId))

continue;

  • 0
Posted (edited)

You should look for the class which is loading the drop lists. I have got NpcParser. In there you should just make check like this:

if(!ArrayUtils.contains(Config.POSSIBLE_DROP_IDS, itemId))

continue;

I assume I have to define somewhere POSSIBLE_DROP_IDS, but that's all I know,  I have minimal scripting knowledge, unfortunately I have no idea where to put that if and how to adjust it so it works for me.

 

I would appreciate if someone could share the full code.

Edited by RHDS
  • 0
Posted

L2Attackable, doItemDrop( method.

That would cause all of those useless drops to exist in the memory and be sorted out every time monster drops the item.

  • 0
Posted (edited)

He has, obviously, to drop existing drop system. He can hardcode chance according different points : isMinion, getLevel, isChampion, isRaidBoss.

 

In your exemple, you also feed NpcTemplate droplists. My point was to remove it.

Edited by Tryskell
  • 0
Posted (edited)

Guys, I mentioned before that I'm quite new to scripting and all that. I see that you're giving hints on how to achieve this, but since I'm new, I have little to no idea how to apply them. I would appreciate a more in depth description or a full code that I could analyze and learn from myself.

 

If it's not that easily achievable then I can just put x1 drop as a bandaid fix.

Edited by RHDS
  • 0
Posted

From my pov keeping the ratę x1 is the best option to control the drop. About unwanted drop, yeah, skipping code is the solution.

  • 0
Posted (edited)

Add this code and don't worry. Only adena in the drop list. Less memory without magic.

 

NpcTable.java

if (dropDat.getItemId() != PcInventory.ADENA_ID)
	continue;

If you need something more you need things:

  1. Be a Customer aCis and take this code;
  2. Buy this code from me (5 euro). Joke.  :happyforever:
Edited by Rootware
  • 0
Posted

 

Add this code and don't worry. Only adena in the drop list. Less memory without magic.

 

NpcTable.java

if (dropDat.getItemId() != PcInventory.ADENA_ID)
	continue;

If you need something more you need things:

  1. Be a Customer aCis and take this code;
  2. Buy this code from me (5 euro). Joke.  :happyforever:

 

Where exactly do I add that?

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
Answer this question...

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



×
×
  • Create New...