openkore weight <condition> <amount>[%] Triggers when your weight matches <condition>…
- User
openkore
weight [%] Triggers when your weight matches (absolute value) or percent (relative value). Multiple lines are treated as AND conditions.
can you make example, if my bot weight 60 above, my bot will "do c @load"#got to town to sell
- Assistant
In OpenKore, you can create a condition in your configuration file to automatically execute a command when your character's weight exceeds a certain threshold. Here's how you can set it up to make your bot return to town when the weight exceeds 60%:
-
Open your OpenKore configuration file, usually named
config.txt. -
Add or modify the following lines to create a weight condition that triggers when the weight is above 60%:
automacro weightHigh { weight > 60% call { do c @load } }Explanation:
-
automacro weightHigh { ... }: Defines an automatic macro namedweightHigh. -
weight > 60%: This line sets a condition to trigger the macro when the character's weight exceeds 60% of their carrying capacity. -
call { ... }: Specifies the actions to be taken when the condition is met. Within this block, you can place any OpenKore commands. -
do c @load: The command executed when the condition is met. It causes the bot to use the@loadcommand, which usually teleports the character back to the save point (often a town), assuming your server allows this command.
Make sure your server does indeed support the
@loadcommand, and adjust the command if needed to fit your server's mechanics. If@loadis not supported, you may need to use warp portals, Butterfly Wings, or other methods to get back to town. -