I'm just starting to pick up a little coding skills so any help is greatly appreciated. I am trying to make a very simple regex alias to do the following:
Spell: call lightning
Typing this out is quite tedious, because I'll have to do:
Case 1) c 'call lightning'
because 'call' is keyword already reserved for another spell. In the case where I want to target a mob which is not my main target, I'll have to do:
Case 2) c 'call lightning' 2.troll
I tried many variations, but this is the closest that I got to making it work:
Alias: ^cl(.*)
Send: c 'call lightning' %1
This works generally, but it'll also work for when I type:
'cl 2.troll blah blah blah' (meaning it doesn't just check for 1 word after 'cl')
and
'cl2.troll' (without space)
I think I know where my mistake is, * is for repeating 0 or more times. Well I have 2 questions
1) How do I specify only 1 word after 'cl', seperated from 'cl' by a space, and then grab that input as %1?
2) How do I indicate something as %1 %2 or %3 etc? Do I do it with the () brackets? (I actually just kinda copy that regex from somewhere, and change it around abit but don't really understand it..)
Thanks in advance!
Spell: call lightning
Typing this out is quite tedious, because I'll have to do:
Case 1) c 'call lightning'
because 'call' is keyword already reserved for another spell. In the case where I want to target a mob which is not my main target, I'll have to do:
Case 2) c 'call lightning' 2.troll
I tried many variations, but this is the closest that I got to making it work:
Alias: ^cl(.*)
Send: c 'call lightning' %1
This works generally, but it'll also work for when I type:
'cl 2.troll blah blah blah' (meaning it doesn't just check for 1 word after 'cl')
and
'cl2.troll' (without space)
I think I know where my mistake is, * is for repeating 0 or more times. Well I have 2 questions
1) How do I specify only 1 word after 'cl', seperated from 'cl' by a space, and then grab that input as %1?
2) How do I indicate something as %1 %2 or %3 etc? Do I do it with the () brackets? (I actually just kinda copy that regex from somewhere, and change it around abit but don't really understand it..)
Thanks in advance!