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 Summary

    Constructors
    Constructor
    Description
    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
    EquipRandomAmountOfItemAction(String item, int min, int max, boolean bind)
    Creates a new EquipRandomItemAction.
    Since stackable, min and max must be > 0.
    If min > max, min is treated like max and vice versa
    EquipRandomAmountOfItemAction(String item, int min, int max, int increment)
    Creates a new EquipRandomItemAction.
    Since stackable, min and max must be > 0.
    If min > max, min is treated like max and vice versa
    EquipRandomAmountOfItemAction(String item, int min, int max, int increment, boolean bind)
    Creates a new EquipRandomItemAction.
    Since stackable, min and max must be > 0.
    If min > max, min is treated like max and vice versa
    EquipRandomAmountOfItemAction(String item, int min, int max, int increment, String text)
    Creates a new EquipRandomItemAction.
    Since stackable, min and max must be > 0.
    If min > max, min is treated like max and vice versa
    EquipRandomAmountOfItemAction(String item, int min, int max, int increment, String text, boolean bind)
    Creates a new EquipRandomItemAction.
    Since stackable, min and max must be > 0.
    If min > max, min is treated like max and vice versa
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    fire(Player player, Sentence sentence, EventRaiser npc)
    does some action after a transition.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      public EquipRandomAmountOfItemAction(String item, int min, int max, boolean bind)
      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 amount boundary.
      max - Upper amount boundary.
      bind - Whether or not item should be bound to player.
    • EquipRandomAmountOfItemAction

      @Dev public EquipRandomAmountOfItemAction(String item, int min, int max, @Dev(defaultValue="1") int increment)
      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
      increment - ie, only return numbers multiples of X
    • EquipRandomAmountOfItemAction

      @Dev public EquipRandomAmountOfItemAction(String item, int min, int max, @Dev(defaultValue="1") int increment, boolean bind)
      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 amount boundary.
      max - Upper amount boundary.
      increment - ie, only return numbers multiples of X.
      bind - Whether or not item should be bound to player.
    • EquipRandomAmountOfItemAction

      @Dev public EquipRandomAmountOfItemAction(String item, int min, int max, @Dev(defaultValue="1") int increment, String text)
      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
      increment - ie, only return numbers multiples of X
      text - text to say
    • EquipRandomAmountOfItemAction

      @Dev public EquipRandomAmountOfItemAction(String item, int min, int max, @Dev(defaultValue="1") int increment, String text, boolean bind)
      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 amount boundary.
      max - Upper amount boundary.
      increment - ie, only return numbers multiples of X.
      text - Text to say.
      bind - Whether or not item should be bound to player.
  • Method Details