Interface IRoleTrader

  • All Superinterfaces:
    IRole

    public interface IRoleTrader
    extends IRole
    • Method Detail

      • setSellOption

        void setSellOption​(int slot,
                           IItemStack currency,
                           IItemStack currency2,
                           IItemStack sold)
        Parameters:
        slot - Slot number 0-17
        currency - Currency item
        currency2 - Currency item number two
        sold - Item to be sold by this npc
      • setSellOption

        void setSellOption​(int slot,
                           IItemStack currency,
                           IItemStack sold)
        Parameters:
        slot - Slot number 0-17
        currency - Currency item
        sold - Item to be sold by this npc
      • getSellOption

        IItemStack getSellOption​(int slot)
        Parameters:
        slot -
        Returns:
        The item being sold in this slot.
      • getCurrency

        IItemStack[] getCurrency​(int slot)
        Parameters:
        slot -
        Returns:
        a ScriptItemStack array of size 2 which contains the currency of this trade
      • removeSellOption

        void removeSellOption​(int slot)
        Parameters:
        slot - Slot number 0-17
      • setMarket

        void setMarket​(java.lang.String name)
        Parameters:
        name - The trader Linked Market name
      • getMarket

        java.lang.String getMarket()
        Returns:
        Get the currently set Linked Market name
      • getPurchaseNum

        int getPurchaseNum​(int slot)
        Parameters:
        slot -
        Returns:
        the number of times an item has been sold on that slot
      • getPurchaseNum

        int getPurchaseNum​(int slot,
                           IPlayer player)
        Parameters:
        slot -
        player -
        Returns:
        the number of times this player has purchased from this trader
      • resetPurchaseNum

        void resetPurchaseNum()
        Sets the purchase count of all slots to 0
      • resetPurchaseNum

        void resetPurchaseNum​(int slot)
        sets the purchase num for that slot to 0
        Parameters:
        slot -
      • resetPurchaseNum

        void resetPurchaseNum​(int slot,
                              IPlayer player)
        sets the purchase num for that slot and player to 0
        Parameters:
        slot -
        player -
      • isSlotEnabled

        boolean isSlotEnabled​(int slot)
        Parameters:
        slot -
        Returns:
        if this slot is enabled
      • isSlotEnabled

        boolean isSlotEnabled​(int slot,
                              IPlayer player)
        Parameters:
        slot -
        player -
        Returns:
        if this slot is enabled for this player
      • disableSlot

        void disableSlot​(int slot)
        prevent an item from being sold on that slot
        Parameters:
        slot -
      • disableSlot

        void disableSlot​(int slot,
                         IPlayer player)
        disables the slot for this player
        Parameters:
        slot -
        player -
      • enableSlot

        void enableSlot​(int slot)
        allow an item to be sold on that slot
        Parameters:
        slot -
      • enableSlot

        void enableSlot​(int slot,
                        IPlayer player)
        enables the slot for this player
        Parameters:
        slot -
        player -