Skip to content

Loot Manager

qqtnn edited this page Oct 31, 2024 · 6 revisions

Loot Manager Module Documentation

Overview

The Loot Manager module provides a comprehensive set of functions for managing lootable items and objects within the game, enhancing player interactions with the game environment.

Functions

Get Item Identifier

loot_manager.get_item_identifier(obj)

Note

Retrieves the unique identifier of an item, crucial for differentiating and tracking items in the game world.

Is Interactable Object

loot_manager.is_interactuable_object(obj)

Note

Determines if the specified object is interactable, aiding in automating interactions within the game.

Is Lootable Item

loot_manager.is_lootable_item(obj, exclude_potions, exclude_gold)

  • obj: gameobject - The item to check.
  • exclude_potions: boolean - When this is true, potions will return false so you can easily ignore them.
  • exclude_gold: boolean - When this is true, gold will return false so you can easily ignore it.

Note

Checks whether an item is lootable, facilitating inventory management and item collection strategies.

Is Potion Necessary

loot_manager.is_potion_necesary()

Evaluates the player's current inventory to determine the necessity of looting a potion.

Can Loot Potion

loot_manager.can_loot_potion()

Assesses whether the player can loot a potion based on inventory space and game conditions.

Is Gold

loot_manager.is_gold(obj)

Note

Identifies if the object in question is gold, an essential aspect of resource management.

Is Potion

loot_manager.is_potion(obj)

Note

Checks if the object is a potion, aiding in automating potion collection and usage.

Is Shrine

loot_manager.is_shrine(obj)

Note

Determines whether an object is a shrine, useful for automated interactions with game shrines.

Is Obols

loot_manager.is_obols(obj)

Note

Identifies if the object is obols, a specific type of in-game currency or item.

Is Locked Chest

loot_manager.is_locked_chest(obj)

Note

Checks if a chest is locked, which is key for deciding whether to attempt opening it.

Has Whispering Key

loot_manager.has_whispering_key(obj)

Note

Determines if an object, typically a chest, contains a whispering key.

Is Ore Exception

loot_manager.is_ore_exception(obj)

Note

Identifies if an ore object is an exception, often used in specialized loot collection logic.

Is Chest Exception

loot_manager.is_chest_exception(obj)

Note

Determines if a chest is an exception, aiding in automated decision-making regarding chest interactions.

Is Event Trigger Exception

loot_manager.is_event_trigger_exception(obj)

Note

Checks if an object is an exception in triggering events, important for automating event-related actions.

Get All Items and Chests Sorted by Distance

loot_manager.get_all_items_and_chest_sorted_by_distance()

Retrieves all lootable items and chests in the game environment, sorted by their distance from the player.

Any Item Around

loot_manager.any_item_around(point, threshold, exclude_potions, exclude_gold)

  • point: vec3 - The center point to check around.
  • threshold: Number - The radius to check within.
  • exclude_potions, exclude_gold: Booleans to exclude specific items.

Note

Scans for any items within a specified radius, with options to exclude potions and gold, aiding in targeted loot collection.

Loot Item

loot_manager.loot_item(obj, exclude_potions, exclude_gold)

  • obj: gameobject - The item to loot.
  • exclude_potions, exclude_gold: Booleans to exclude these types of items.

Note

Executes the action of looting a specified item, with options to filter out potions and gold.

Loot Item with Orbwalker

loot_manager.loot_item_orbwalker(item)

  • item: gameobject - The item for the orbwalker to loot.

Note

Requests the orbwalker to loot a specific item, integrating item collection into movement and combat routines.

Interact with Object

loot_manager.interact_with_object(obj)

Note

Triggers an interaction with the specified game object, useful for engaging with various elements in the game world.

Interact with Vendor and Sell All

loot_manager.interact_with_vendor_and_sell_all(vendor)

  • vendor: gameobject - The vendor to interact with.

Note

Automates the process of interacting with a vendor and selling all items in the player's inventory, streamlining inventory management.

Sell All Items

loot_manager.sell_all_items()

  • Executes the action of selling all items in the player's inventory. This function requires the vendor window to be open already.

Salvage All Items

loot_manager.salvage_all_items()

  • Executes the action of salvaging all items in the player's inventory. This function requires the vendor window to be open already.

Sell Specific Item

loot_manager.sell_specific_item(item)

  • item: item_data - The specific item to sell.
  • Sells a specified item from the player's inventory. This function requires the vendor window to be open already.

Salvage Specific Item

loot_manager.salvage_specific_item(item)

  • item: item_data - The specific item to salvage.
  • Salvages a specified item from the player's inventory. This function requires the vendor window to be open already.

Note

The actions to sell or salvage items interact directly with the game's vendor interface. Ensure that the vendor interface is open before attempting to use these functions to prevent errors or unexpected behavior.

Interact with Vendor and Repair All

loot_manager.interact_with_vendor_and_repair_all(vendor)

  • vendor: gameobject - The vendor to interact with.

Repair All Items

loot_manager.repair_all_items()

  • Executes the action of repair all items. This function requires the vendor window to be open already.

Use Item

loot_manager.use_item(item_data)

Move Item To Stash

loot_manager.move_item_to_stash(item_data)

Move Item From Stash

loot_manager.move_item_from_stash(item_data)

Drop Item

loot_manager.drop_item(item_data)

Buy Item

loot_manager.buy_item(item_data)

Get Current Vendor

loot_manager.get_current_vendor()

Is In Vendor Screen

loot_manager.is_in_vendor_screen()

Get Current Vendor

loot_manager.get_vendor_currency_type() note: 0 gold, 3 obols

Get Vendor Items

loot_manager.get_vendor_items() table of item data