However!
I'm getting really frustrated by how this client handles triggers and variables, I felt it was easier on zMud and mudmaster.
On mudmaster I have a script that always logs my current hps, mana etc from the prompt.
In the prompt there's also a function that shows the party memeber with the lowest hps.
I have a trigger that puts this name into a variable to be easily targetted to cast a heal spell on(I'm a healer) in
stressfull situations.
I tried to replicate this in Mudlet and after a fair bit of trying(and screaming,and cursing) I've finally
come to the conclusion others might be better at this than I...
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
My normal prompt looks like this:
<462/1169hp 1309/1424m 571/691mv 24e>[Nonexp]
and I've managed to store my current hps etc(in this case 462) as a call-able variable.
I used a regex trigger pattern, and got it to return with an echo:
<(\d+)/1169hp
health = matches[2]
echo(health .. " is my current hp")
but
when I'm teamed up and the prompt changes to this:
[Gimli 39%]<462/1169hp 1309/1424m 571/691mv 24e>[Nonexp]
I cannot seem to successfully grab the name Gimli and store it as a variable, for example Healtarget.
I suspect this has something to do with the square brackets used in the prompt [], and that these
interfers with the coding in Mudlet?
My best result so far is:
(.*)(\w+) (\d+)%]<(.*)/(.*)hp
healtarget = matches[2]
echo(healtarget .. " is the new healtarget")
and this returns: [Giml is the new healtarget
which is unusable for me...
Anyone have a suggestion to how I can fix this?
Any help will be appreciated!