|
nigma Newbie
Joined: 30 Apr 2007 Posts: 7
|
Posted: Fri Aug 03, 2007 9:16 pm
Prompt Trigger Causing new prompts without the option set |
I'm back to using zMud for now.
Ok, I know it is a problem between the keyboard and chair, but when configuring a sipper for Imperian which looks like the example below, the prompt keeps spamming through.
Quote: |
H:165 M:61 E:725 W:1005 <eb> |
Code: |
#TRIGGER {H:(%1) M:(%3) E:(%5) W:(%7) <(%9)>}
{
currenthealth=%1
currentmana=%3
#if (@currenthealth<@healthsip and @elixirbalance=1) {dh}
#if (@currentmana<@manasip and @elixirbalance=1) {dm}}
"Healing" {nocr|prompt} |
In the above example, the new prompts keep scrolling by. The elixlbalance, manasip, and healthsip variables are all set elsewhere to values that do not require any sipping. the dh and dm aliases just have a sip if the conditions are met.
What option I have I set or forgotten to unset so that I am not sending needless information to the mud? This is literally the only trigger set up for this mud, so there is nothing else I created that is firing off.
Thanks.[/code] |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Fri Aug 03, 2007 9:42 pm |
You shouldn't use %1's etc inside the pattern, If its a number, use %d. %1's etc are for related the info you get from the pattern inside variables for example, therefore if there's several %d's inside the pattern, %1 relates to the first one thus currenthp=%1.
I'm not familiar with Imperian at all myself, but everything else seems to be as it should, though.
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Aug 03, 2007 10:04 pm |
I don't know what all is possible for what you have in %9 like progonoi I do not play Imperian. But I think it would be safe to say that %x will work for it.
Also like progonoi I cannot see anything leaping out at me as being wrong except for the use of the %1 etc where you should be using %d. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
nigma Newbie
Joined: 30 Apr 2007 Posts: 7
|
Posted: Fri Aug 03, 2007 10:48 pm |
If I understand those suggestions they would relate more toward performance, and I thank you for the suggestions.
The original issue is that when the trigger is enabled, I keep getting prompt after prompt whether or not the conditions are true and the aliases are executed. The only thing in the trigger above that could cause it in my limited knowledge would be if in the options I have "Newline" checked. I don't. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Aug 04, 2007 12:50 am |
The point we are trying to make is that we looked at the trigger for things that were wrong with it. We only found those things.
The prompt or newline options could cause it to NOT fire when you need it to in certain muds but won't cause your problem.
This is almost a cosmetic change but it could help.
#if ((@currenthealth<@healthsip) and (@elixirbalance=1)) {dh}
#if ((@currentmana<@manasip) and (@elixirbalance=1)) {dm}
More likely you need to change something in your dh or dm aliases. You do have elixirbalance=0 in those aliases don't you? |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Aug 04, 2007 4:22 am |
The %1-%9 in the pattern isn't related to performance, it's related to getting the trigger to fire. The way that %1-%9 behaves when you put it in a trigger pattern isn't defined anywhere, so there's no way of knowing which wildcards it's using. You're not supposed to use those variables in the trigger pattern.
The proper way to do this would probably be something like this:
H:(%d) M:(%d) E:(%d) W:(%d) <(%a)>
You might also want to use ^ at the start to make sure it only fires on real prompts.
See also this KB topic. |
|
|
|
|
|