• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Adding a check to dropItems in Reactor.

Newbie Spellweaver
Joined
Nov 15, 2020
Messages
8
Reaction score
0
I am trying to block certain items from being dropped in game while still being available to be sold @ any NPC. I guess the best way to do this would be to add a check in the dropItems function with the item id's in ReactorActionManager but I am not sure. Seems like WZ editing Item.wz is not a good option for drop issues.

HeavenMS based source.
Thank you for your help!
 
Newbie Spellweaver
Joined
Nov 15, 2020
Messages
8
Reaction score
0
sounds like a reasonable approach

what are you having trouble with? it's a simple check:

if (item.getId() == XXXXXX)
continue;

I was thinking of adding something like this in the dropitems function;

if (d.itemId == 2049100) { // can't drop chaos scrolls
c.getPlayer().message("You can't drop this item.");
return;
}

Unfortunately, it doesn't give any error message in game. I must not add the check in the right place. I am close but i'm missing a little part.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Nov 15, 2020
Messages
8
Reaction score
0
MapleInventoryManipulator.
drop function.

Cool! Gonna take a look into that file! Thanks for the tip :)
EDIT: Easy as that. It works like a charm. Thank you!
 
Last edited:
Upvote 0
Back
Top