Adding a check to dropItems in Reactor.

Results 1 to 5 of 5
  1. #1
    Registered ZTMS is offline
    MemberRank
    Nov 2020 Join Date
    8Posts

    Adding a check to dropItems in Reactor.

    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!


  2. #2
    I'm overrated. Fraysa is offline
    GammaRank
    Apr 2008 Join Date
    4,860Posts

    Re: Adding a check to dropItems in Reactor.

    sounds like a reasonable approach

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

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

  3. #3
    Registered ZTMS is offline
    MemberRank
    Nov 2020 Join Date
    8Posts

    Re: Adding a check to dropItems in Reactor.

    Quote Originally Posted by Fraysa View Post
    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 by ZTMS; 27-12-20 at 06:53 PM.

  4. #4
    Member KayZee is offline
    MemberRank
    Oct 2020 Join Date
    31Posts

    Re: Adding a check to dropItems in Reactor.

    MapleInventoryManipulator.
    drop function.

  5. #5
    Registered ZTMS is offline
    MemberRank
    Nov 2020 Join Date
    8Posts

    Re: Adding a check to dropItems in Reactor.

    Quote Originally Posted by KayZee View Post
    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 by ZTMS; 29-12-20 at 04:34 PM.



Advertisement