Hi there! I'm new to Lua and coding in general but have got a small grip on the basics such as variables, strings, functions and operators.
My question is how do I capture parts of 1 line of several similar lines and then manipulate that data with an alias.
Firstly, the line I wish to capture parts of is something like:
You still have to kill * a whittling boy (Child's Play)
Secondly, I wish to capture the mob (a whittling boy) and area of the mob (Child's Play).
Can I use wildcard's or do I need something else? I tried using wildcard's with no luck as a trigger to match the first line of several:
You still have to kill * a whittling boy (Child's Play)
You still have to kill * some sawgrass (The Fire Swamp)
You still have to kill * A Dragon Citizen (The First Ascent)
You still have to kill * A Gargoyle (The First Ascent)
You still have to kill * a bobwhite quail (The Forest of Li'Dnesh)
You still have to kill * a dark brown waterthrush (The Forest of Li'Dnesh)
You still have to kill * the scorpion (The Gauntlet)
You still have to kill * a hidden thief (The Path of the Believer)
You still have to kill * a beer-drinking ratling (Tournament Camps)
I tried the following as the trigger:
You still have to kill * ^\* (*)
And the following as the send:
hold portal
enter
d
rt %2
where %1
Nothing whatsoever happens when i 'campaign check' and the list of mobs left to kill is displayed, not even an error.
I tried asking on the MUD and they said something about regex but that's over my head, I tried looking on Google 'regex Lua' only to get completely confused.
Many thanks in advance,
Smoke-bomb.
My question is how do I capture parts of 1 line of several similar lines and then manipulate that data with an alias.
Firstly, the line I wish to capture parts of is something like:
You still have to kill * a whittling boy (Child's Play)
Secondly, I wish to capture the mob (a whittling boy) and area of the mob (Child's Play).
Can I use wildcard's or do I need something else? I tried using wildcard's with no luck as a trigger to match the first line of several:
You still have to kill * a whittling boy (Child's Play)
You still have to kill * some sawgrass (The Fire Swamp)
You still have to kill * A Dragon Citizen (The First Ascent)
You still have to kill * A Gargoyle (The First Ascent)
You still have to kill * a bobwhite quail (The Forest of Li'Dnesh)
You still have to kill * a dark brown waterthrush (The Forest of Li'Dnesh)
You still have to kill * the scorpion (The Gauntlet)
You still have to kill * a hidden thief (The Path of the Believer)
You still have to kill * a beer-drinking ratling (Tournament Camps)
I tried the following as the trigger:
You still have to kill * ^\* (*)
And the following as the send:
hold portal
enter
d
rt %2
where %1
Nothing whatsoever happens when i 'campaign check' and the list of mobs left to kill is displayed, not even an error.
I tried asking on the MUD and they said something about regex but that's over my head, I tried looking on Google 'regex Lua' only to get completely confused.
Many thanks in advance,
Smoke-bomb.