openkore @store () Looks for an item in a store and returns index or -1 if the item was…
- User
openkore
@store () Looks for an item in a store and returns index or -1 if the item was not found.
make openkore marco using this code above
- Assistant
Creating a macro for OpenKore using the code you provided involves automating a task where you search for an item in a store by name and retrieve its index or return -1 if the item is not found. OpenKore macros are typically written in the Macro plugin language. Here’s a simple macro you might start with, considering you have a function
@store()that looks up an item and assuming you have a framework like Macro::Script:automacro findItemInStore { console /The store is open/ call { do checkStore } } macro checkStore { # Define the item you are looking for $itemName = "Apple" # Call the @store function to look for the item @storeResult = @store($itemName) # Print the result if (@storeResult == -1) { log "Item \"$itemName\" was not found in the store." } else { log "Item \"$itemName\" found at index: @storeResult" } }