This is going to sound idiotic, but im having trouble just getting going...
I am attempting to make a trigger that auto heals by casting a spell. It was easy enough by using the gui and saying
prompt in game looks like this
<100%><100%><100%><well underway>
so I have it going
when: <*%><*%><*%><*>
Send(send to script):
if %1 < 100 then
Send "c 'cure critical"
end -- if
This part is working, but i want the trigger to turn itself off when 1% <100 is no longer true
I also was hoping i could enable it with an alias. Im trying to copy this from an earlier post that and modify it to suit my needs (putting the stolen script at the very bottom of my post), but i think im doing it wrong. Am i supposed to be dropping this alias right into a file like scriptname.lua in the "External script file" box in the scripts menu?
I know this sounds stupid but im very basic at this. Im receiving errors like this, am i supposed to be nestling this in a function or something? I suspect im completely out to lunch in trying to add this alias.
Immediate execution
[string "Script file"]:1: unexpected symbol near '<'
Error context in script:
1*: <aliases>
2 : <alias
3 : name="ToggleTrigger"
any help would be appreciated, im sorry for making such a basic question but im just getting started :(
<aliases>
<alias
name="ToggleTrigger"
match="tt *"
enabled="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>
EnableTrigger ("%1", (GetTriggerOption("%1", "enabled")+1)%%2)
ColourNote ("sienna", "thistle", "%1 trigger is enabled: " .. tostring(GetTriggerOption("%1", "enabled") == 1))
</send>
</alias>
</aliases>
So as i said im modifying these values they arent for my situation exactly but i cant even get started.
I am attempting to make a trigger that auto heals by casting a spell. It was easy enough by using the gui and saying
prompt in game looks like this
<100%><100%><100%><well underway>
so I have it going
when: <*%><*%><*%><*>
Send(send to script):
if %1 < 100 then
Send "c 'cure critical"
end -- if
This part is working, but i want the trigger to turn itself off when 1% <100 is no longer true
I also was hoping i could enable it with an alias. Im trying to copy this from an earlier post that and modify it to suit my needs (putting the stolen script at the very bottom of my post), but i think im doing it wrong. Am i supposed to be dropping this alias right into a file like scriptname.lua in the "External script file" box in the scripts menu?
I know this sounds stupid but im very basic at this. Im receiving errors like this, am i supposed to be nestling this in a function or something? I suspect im completely out to lunch in trying to add this alias.
Immediate execution
[string "Script file"]:1: unexpected symbol near '<'
Error context in script:
1*: <aliases>
2 : <alias
3 : name="ToggleTrigger"
any help would be appreciated, im sorry for making such a basic question but im just getting started :(
<aliases>
<alias
name="ToggleTrigger"
match="tt *"
enabled="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>
EnableTrigger ("%1", (GetTriggerOption("%1", "enabled")+1)%%2)
ColourNote ("sienna", "thistle", "%1 trigger is enabled: " .. tostring(GetTriggerOption("%1", "enabled") == 1))
</send>
</alias>
</aliases>
So as i said im modifying these values they arent for my situation exactly but i cant even get started.