openkore can you make example of marco using this code "@store (<name>) Looks for an…
- User
openkore
can you make example of marco using this code "@store () Looks for an item in a store and returns index or -1 if the item was not found."
- Assistant
Certainly! In OpenKore, macros are used to automate tasks and can be written using the Macro Plugin. The code snippet you provided,
@store (<name>), seems like a command within a macro to search for an item in a store and return its index or-1if the item isn't found.Here is an example of how you might use this macro feature within OpenKore to check for a specific item in a store. Let's assume you want to find an item called "Potion":
macro checkStore { # Replace 'Potion' with the actual name of the item you are looking for. $item_name = "Potion" # Call the @store command to find the item's index in the store. $item_index = @store($item_name) # Check if the item was found. if ($item_index == -1) { log "Item \"$item_name\" not found in store." } else { log "Item \"$item_name\" found at index $item_index in store." } }