I'm quite green when it comes to this stuff, so forgive any ignorance please.
What I'm trying to do is create a check before executing an alias command to see if part of it even needs to be executed.
i.e. I need to hold certain totems to cast. As it stands now I use an alias that executes remove any totem.....hold correct totem.....cast. It's often the case that I'm already holding the correct totem though. Is there a way to first do an if check to see if I'm holding the correct totem so as to not waste time unnecessarily swapping?
Thanks in advance!!!
if check before executing an alias command
Re: if check before executing an alias command
I am green too! But..
You would create triggers to track your current totem.
Then, modify your alias to check your current totem and execute the correct commands.
Example:
Triggers for tracking totems:
Pattern: ^You hold the totem of awesomeness.$
Script: currentTotem = "awesomeness"
Pattern: ^You remove the totem of awesomeness.$
Script: currentTotem = "none"
Alias with check for totem:
Script:
This is a basic example that could be refactored to handle a wider variety of inputs/outputs. If you provide the scripts/pattern for your current alias, I will show you what I mean.
You would create triggers to track your current totem.
Then, modify your alias to check your current totem and execute the correct commands.
Example:
Triggers for tracking totems:
Pattern: ^You hold the totem of awesomeness.$
Script: currentTotem = "awesomeness"
Pattern: ^You remove the totem of awesomeness.$
Script: currentTotem = "none"
Alias with check for totem:
Script:
Code: Select all
if not currentTotem == "awesomeness" then
send("blah, blah, commands here")
end