Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Thu Oct 10, 2002 4:30 am   

What happen?
 
Could anyone help me figure this problem out? It seem one of my healing trigger doesn't wanna work anymore. This is the setting...

(%w) reports: (%d)/(%d) hp

#if %ismember( %lower( %1), @friends) {#if (%2 < %3) {operate %1} {clear}}


friends (is my variable and it contain the name Bob)

Master Bob reports: 578/578 hp 226/823 mana 613/613 mv.

Or

Bob reports: 578/578 hp 226/823 mana 613/613 mv.


Before it work perfectly, but now, the trigger doesn't get hit.

What it suppose to do is if the person name is in my friend list, and their currentt hp is below their max hp, I will operate name.. when they report and have the current hp equal to the max hp, I will type clear to the mud. Can anyone figure out why it doesn't work anymore?
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Thu Oct 10, 2002 7:25 am   
 
It looks fine syntax-wise. I just tested it and the trigger gets fired for me. Did the mud add extra spaces between reports: and 578/578 hps? To get the easy things out of the way, are you sure the that friends variable is populated? Turn on 'show triggers' in your preferences and see if the trigger is being fired. If it isn't then it's the output that's changed somehow.

Iljhar
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Thu Oct 10, 2002 7:56 pm   
 
I had show triggers turn on, and this is what I got

Marvin reports: 322/504 hp 371/371 mana 491/538 mv.

[(%w) reports: (%d)/(%d) hp-> #if %ismember( %lower( Marvin), @friends) {#if (377 < 504) {operate Marvin} {clear}}]

the problem is, it isn't entering operate marvin to the mud
Reply with quote
Eldaron
Newbie


Joined: 12 Nov 2001
Posts: 7
Location: Germany

PostPosted: Thu Oct 10, 2002 9:50 pm   
 
I just copy and pasted that script and it works perfectly in ZMud 6.34

Eldaron

-----
Eldaron
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Oct 10, 2002 9:50 pm   
 
Try:
#IF (%ismember(%lower(%1), @friends)) {#IF (%2 < %3) {operate %1} {clear}}

If that still doesn't work, then try:
#IF (%ismember(%lower(%1), @friends)) {#IF (%2 < %3) {operate %1} {clear}} {#SAY %1 is not your friend.}

and check to see if you get the message:
name is not your friend.

If you do, then the problem would be that it is not finding %1 in @friends and you need to investigate the contents of this variable to find out why.

Kjata
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Fri Oct 11, 2002 1:50 am   
 
Oh, the problem is he isn't my friend, even when the value is in my friend variable. Anyone know how to set up a proper variable for this trigger?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Oct 11, 2002 2:13 am   
 
A normal stringlist should do. Each element in the stringlist is the name of one of your friends:
#VAR friends {Marvin|Bob|Zugg|etc.}

You can add new names by using the #ADDITEM command:
#ADDITEM friends {PHLN}

Use the #DELITEM command to remove a name from the list:
#DELITEM friends {PHLN}

You can also add/delete items using the Settings Editor.

Kjata
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Fri Oct 11, 2002 2:44 am   
 
that is the same variable that I have before, even when I delete the old one and made a new one, friends, it still won't read it, keep saying target is not your friend, even when target is listed under friends variable, this is all very confusing, can anyone figure out this glitch?
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Fri Oct 11, 2002 8:26 pm   
 
Well, since this old trigger won't fire anymore since it can't read the friends variable, can anyone help me make a trigger that goes something like this...

type gr pc every 5 seconds,
this will show

[50] Target 504/ 504 hp 371/ 371 mana 288/ 538 mv

check the current hp with the max hp, if the current is below the max, operate Target then gr pc again, and keep doing it till the Target is heal, then gr pc every 5 seconds again, Target is a variable set by me.

If no one can help me with that, then help me fix my old trigger? Healing without these trig is painful :(, since you have to like spam operate Target like mad
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 12, 2002 2:48 am   
 
It used to work. Now it doesn't. Obviously, something changed.

zMUD doesn't change things by itself, so the question is:
What did you change right before it stopped working?

HINT: This trigger works fine just the way it is, for everyone but you. That means that either you don't have the person's name in @friends, or you've changed some of the default preferences, probably special character assignments.

Also, since normal zMUD commands that work for everyone else aren't working for you, anything else we suggest will probably have the same problem.

LightBulb
Senior Member
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sat Oct 12, 2002 4:41 am   
 
That suck... :(
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 12, 2002 6:52 am   
 
Sorry, I didn't mean to discourage you. You said right off that the original trigger used to work perfectly. That means there's nothing wrong with the trigger itself, it's something else; and once you find out what it is and fix it, the trigger will go back to working. The most obvious possibility is a change to Special Characters in Preferences.

LightBulb
Senior Member
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Sat Oct 12, 2002 7:45 am   
 
Make sure you only have one @friends variable.

Troubadour
(Win 98, Pentium III, 550 MHz)
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sat Oct 12, 2002 8:35 am   
 
there is only one friends, and how do I restore the special characters thing to it default?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 12, 2002 5:44 pm   
 
Open the character (Connect or Offline)
Click the Prefs button
Select Special Characters
Click the Help button
Check each character against the default listed in the helpfile. Make sure they are all enabled.
For this trigger, the special characters used are Command (#), Variable (@), and Parameter (%).

You should know if this is the problem. Most people would remember for at least a few days if they changed anything in Prefs.

Based on what shows with "Show Triggers" on,
quote:
Marvin reports: 322/504 hp 371/371 mana 491/538 mv.

[(%w) reports: (%d)/(%d) hp-> #if %ismember( %lower( Marvin), @friends) {#if (377 < 504) {operate Marvin} {clear}}]

the trigger is working (it fired) and replacing the parameters with the correct info. It looks to me like marvin isn't your friend. Perhaps Marvin or MARVIN is? The solution to matching case is to use %lower (or %upper or %proper) on both parts.
Marvin reports: 322/504 hp 371/371 mana 491/538 mv.

(%w) reports: (%d)/(%d) hp-> #if %ismember( %lower( %1), %lower(@friends)) {#if (%2 < %3) {operate %1} {clear}}


LightBulb
Senior Member
Reply with quote
PHLN
Adept


Joined: 30 Dec 2001
Posts: 220
Location: Canada

PostPosted: Sat Oct 12, 2002 6:01 pm   
 
wow, this work!, thanks so much!!!!!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net