Class EquipRandomAmountOfItemAction

java.lang.Object
games.stendhal.server.entity.npc.action.EquipRandomAmountOfItemAction
All Implemented Interfaces:
ChatAction, PostTransitionAction

@Dev(category=ITEMS_OWNED, label="Item+") public class EquipRandomAmountOfItemAction extends Object implements ChatAction
Chooses and equips the specified item from a list
  • Constructor Details

    • EquipRandomAmountOfItemAction

      public EquipRandomAmountOfItemAction(String item, int min, int max)
      Creates a new EquipRandomAmountOfItemAction.
      Since stackable, min and max must be > 0.
      If min > max, min is treated like max and vice versa
      Parameters:
      item - stackable item
      min - minimum quantity
      max - maximum quantity
    • EquipRandomAmountOfItemAction

      @Dev public EquipRandomAmountOfItemAction(String item, int min, int max, @Dev(defaultValue="1") int multiplayer)
      Creates a new EquipRandomItemAction.
      Since stackable, min and max must be > 0.
      If min > max, min is treated like max and vice versa
      Parameters:
      item - stackable item
      min - lower bound
      max - upper bound
      multiplayer - ie, only return numbers multiples of X
  • Method Details