Need Influencing Trigger

by Penelope

Back to Mechanic's Corner.

Penelope2006-04-19 21:20:50
Alright, I've become super addicted to influencing and need help. Where I like to influence there are a lot of things and it's hard to keep up with what I have and have no influenced. What I want to do is create just a small script to trigger on "sighs dramatically and searches" that would add the thing I've targeted to a list to dub the word "Complete" over their name and ID on IH. This way it would end up looking something like....

CODE
"Complete"         a shadowlord widowrider
"Complete"         a shadowlord widowrider
"widowrider######"         a shadowlord widowrider
"Complete"         a shadowlord widowrider
"widowrider######"         a shadowlord widowrider
"widowrider######"         a shadowlord widowrider


I'm not really very decent with ZMUD coding outside of #trigger {blah} {react with blah}

I had tried to do #trigger {sighs dramatically and searches} {#trigger {@t} {#sub Complete}} but this only created a trigger called @t and only activated on that particular I just finished and once I influence something else @t trigger changed to something new and the old "complete" was reset back to normal on IH. When I'm targeting everything is stored into an alias/variable/trigger/something called @t so all aliases, macros, etc will just automatically do something like shadowdance scourge @t.

So umm...yeah, long weird request that I'm clueless about and have probably made it more confusing than it should be.
chandestri2006-04-19 21:28:19
QUOTE(Penelope @ Apr 19 2006, 10:20 PM) 280700

Alright, I've become super addicted to influencing and need help. Where I like to influence there are a lot of things and it's hard to keep up with what I have and have no influenced. What I want to do is create just a small script to trigger on "sighs dramatically and searches" that would add the thing I've targeted to a list to dub the word "Complete" over their name and ID on IH. This way it would end up looking something like....

CODE
"Complete"         a shadowlord widowrider
"Complete"         a shadowlord widowrider
"widowrider######"         a shadowlord widowrider
"Complete"         a shadowlord widowrider
"widowrider######"         a shadowlord widowrider
"widowrider######"         a shadowlord widowrider


I'm not really very decent with ZMUD coding outside of #trigger {blah} {react with blah}

I had tried to do #trigger {sighs dramatically and searches} {#trigger {@t} {#sub Complete}} but this only created a trigger called @t and only activated on that particular I just finished and once I influence something else @t trigger changed to something new and the old "complete" was reset back to normal on IH. When I'm targeting everything is stored into an alias/variable/trigger/something called @t so all aliases, macros, etc will just automatically do something like shadowdance scourge @t.

So umm...yeah, long weird request that I'm clueless about and have probably made it more confusing than it should be.


I'd love to see someone post the basics of creating a list on the fly in zMud and then the basics of eliminating from the list as certain criteria are met. Might also help me with creating/resolving afflictions lists too.
Penelope2006-04-19 21:29:35
Oh, I don't mind manually going in and clearing it when I'm done influencing.

What I have been doing is after I successfully beg from something I just type in #trigger {Thing} {#sub complete} and strike enter. Then when I'm finished in the area I go into the prompt and manually remove all the triggers. It's annoying and time consuming, but it's all I know how to do coding wise. blush.gif
Laysus2006-04-19 21:45:26
Chandestri - simple, to create/add to a list, do #additem
To remove from a list, do #delitem
To add/remove more than one, instead of value, have ||
To clear a list completely, #var ""
Penelope2006-04-19 21:46:41
Sorry for the double post, but Laysus is my hero!! KneelSuckers.gif wub.gif
Laysus2006-04-19 21:56:16
What I gave Pen was this

#tr {sighs dramatically and searches} {#additem inf_complete @t}
#tr {~"(%a)~"} {#if (%ismember(%1,@inf_complete)) {#sub Complete}}
#alias inf_reset {#var inf_complete ""}

Only works for begging, but if you replace the message in the first trigger with the influence completion message of your choice, then it should work. You need to reset the list yourself, with the inf_reset alias, because I don't know how long each mob takes to reset, and that many alarms could be rather nasty, anyway.
chandestri2006-04-19 21:56:31
QUOTE(Laysus @ Apr 19 2006, 10:45 PM) 280705

Chandestri - simple, to create/add to a list, do #additem
To remove from a list, do #delitem
To add/remove more than one, instead of value, have ||
To clear a list completely, #var ""


Excellent, Thanks Laysus, something more to play with. Always a good sport. wub.gif
Xavius2006-08-18 12:40:06
Sorry, to necro an ancient thread, but...

CODE
#tr {~"(%a)~"}


...what's that?
Esano2006-08-18 13:14:02
QUOTE(Xavius @ Aug 18 2006, 10:40 PM) 321192

Sorry, to necro an ancient thread, but...

CODE
#tr {~"(%a)~"}


...what's that?



#TRIGGER is self explanatory.

What the {~"(%a)~"} part is is a bit more difficult, but easy once you get the idea. %a is a wildcard, which matches any number of alphanumerical characters. Putting brackets around a wildcard sticks it into a %1-%99 temporary thing. The ~s mean that the next character is sent verbatim, not parsed, so it checks for "abc123" and matches it, then sticks abc123 into %1, which can be used later on.

In this case, it checks if abc123 is part of the stringlist, and if it is, it subs it with Complete.