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
ceroddick
Beginner


Joined: 23 Jul 2004
Posts: 13

PostPosted: Fri Dec 03, 2004 3:49 am   

easy trigger need cant get to work
 
I want a trigger that I can turn on and off with the trigger word "hours". I think that is a trigger right? What I want it to do is stand up move to a location drink move back and sit down. This is what I have have so far but cant make it work. All help is greatly appriciated.

#TRIGGER {hours}{#ALARM -10:00 {stand;u;n;drink f;s;d;sit bench}}

I want it to do more advance stuff also like when game says I am hungry to walk to the store by food eat food go back and sit back down. I think I can combine them so they are in the same trigger that I can turn on and off. right?

Confused....

Thanks in advance.
Reply with quote
isop
Newbie


Joined: 20 Oct 2004
Posts: 5

PostPosted: Fri Dec 03, 2004 8:37 am   
 
It seems you have a couple of common terms confused.

You want an alias, when you type hours, which will make you stand, move a couple rooms, drink, move back, and sit every 10 minutes. if that is what you want, all you need to do is
#ALIAS {hours}{#ALARM -10:00 {stand;u;n;drink f;s;d;sit bench}}

To turn it off, you need to
#unalias hours
but then you need to type the whole alias in again the next time.

It can get a little more complicated if you want an on/off switch, so I will wait to see if this helps. The only way I can think of doing it is to add an on/off variable for it, and an #if statement. Maybe someone else has a better idea.

A #trigger is a command which executes when you recieve text on your screen from the mud, or from another trigger or alarm.

For example, a trigger related to your above topic

#Trigger {You are thirsty} {stand;u;n;drink f;s;d;sit bench}

Hope this helps.

Isop
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 03, 2004 1:44 pm   
 
here is an adjustment to the alias pattern This fixes spacing between {} and creates a temporary alarm instead

#ALIAS {hours} {#ALARM "ALRdrink" {+10:00} {stand;u;n;drink f;s;d;sit bench}}


Or if you are wanting triggers

#TRIGGER {You are thirsty.} {stand;u;n;drink f;s;d;sit} "Regen"
#TRIGGER {You are hungry.} {stand;dirs and commands} "Regen"

To turn them on #T+ regen
To turn them off #T- regen
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
ceroddick
Beginner


Joined: 23 Jul 2004
Posts: 13

PostPosted: Fri Dec 03, 2004 3:29 pm   
 
OK cool. THANK YOU for your help I will try it tonight. I did have one thought after I wrote that last night. What happens if the character is hungry and thirsty at the same time? Will it try and run both triggers? If so, can I incorporate some kind of if statement with a flag. So it sees ”you are thirsty” waits like 1/2 sec to see if the “you are hungry” command also comes up. If it see the hungry it takes me to eat then takes me to drink after eating. If it doesn’t see the you are hungry command it just takes me to drink. Then waits for the next time for the mud to say I am thirsty. And make it so if I am not hungry or thirsty with in x amount of minutes it does a random action (simple action like who or a social). Or is it better to separate the random action from the above trigger? So I guess I am wondering if I can incorporate some kind of if-else statements into a trigger and or alias and how it would be done in the above example and I think I can take it from there.


#TRIGGER {You are thirsty.} {stand;u;n;drink f;s;d;sit} "Regen"
#TRIGGER {You are hungry.} {stand;dirs and commands} "Regen"

To turn them on #T+ regen
To turn them off #T- regen

THANK YOU much again for you help on this one
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Dec 03, 2004 4:01 pm   
 
I have written an AutoEat script that may help you. take a look at http://forums.zuggsoft.com/phpbb/viewtopic.php?t=10787&highlight=autoeat
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 03, 2004 4:21 pm   
 
You are right the would both run at the same time which isn't good :P, Well managing them both would be a little harder this should work for now....

#TRIGGER {You are thirsty.} {#T- regen;#TEMP "resit" {You sit} {#T+ Regen};stand;u;n;drink f;s;d;sit} "Regen"
#TRIGGER {You are hungry.} {#T- regen;#TEMP "resit" {You sit} {#T+ Regen};stand;dirs and commands} "Regen"
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
ceroddick
Beginner


Joined: 23 Jul 2004
Posts: 13

PostPosted: Fri Dec 03, 2004 5:33 pm   
 
Thanks for the help. Decided to use one trigger. So when it say you are hungry charc goes to drink and to eat. Solved both with one stone. Thanks for you help

And wow that autoeat is crazy. Wasnt what I was looking for this time but saved it might come in handy latter when I finally get some hours on this charcter.

Thanks
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Dec 03, 2004 5:37 pm   
 
The AutoEat script is great for base eating crap. You just have to have the food in your container or on your person. I was thinking about updating it to try and look at multiple containers one day. And using the latest changes in 7.05 capabilities.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
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