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


Joined: 11 Nov 2006
Posts: 13

PostPosted: Sun Apr 15, 2007 11:38 pm   

trigger to returon information
 
ok im trying to set up a trigger that, when prompted by a user, will return some information


i have a high level char and one of my abilities is to see other peoples stats, so for example


if the character named tekken tells me

---tekken tells you 'stat'---

then my character would look at him

---look tekken---

and from the info screen return this line Str:[18/70] Int:[10] Wis:[10] Dex:[17] Con:[18] Chr:[10],
in effect telling him

---tell tekken Str:[18/70] Int:[10] Wis:[10] Dex:[17] Con:[18] Chr:[10]---


can anyone help ?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Apr 16, 2007 12:06 am   
 
There are other ways to do this, but this to me was the simplest. Set a trigger to check for the stats. And set a look alias that defines what you are looking at as a target for the trigger to tell.

#TRIGGER {(Str:*Int:*Wis:*)} {tell @Target %1}

#ALIAS {look} {#VAR Target %0 {};~look %0}
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Apr 16, 2007 1:05 am   
 
Or something like this:

#trig {(%w) tells you 'stat'} {look %1}
#cond {Str:*Int:*Wis:*)} {tell %x1 %1}

I'm not sure about the %xn and %n syntaxes, might need some changes.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Illogic
Beginner


Joined: 11 Nov 2006
Posts: 13

PostPosted: Mon Apr 16, 2007 2:50 am   
 
sry i shoulda clarified


i want this all to be completely automated. Im going to leave my char on 24/7 as an aid for newbies who want to know their stats

so what im basically asking is how to make a bot for this process ?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Apr 16, 2007 3:16 am   
 
The option Fang presented would be completely automated. All the newbie would have to do is tell you 'stat'.
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Apr 16, 2007 4:24 am   
 
Though if you're going to be leaving it unattended, it might be best if you added a way for it to get unstuck if the second message never appears:

#trig "StatTrig" {(%w) tells you 'stat'} {look %1;#var StatTarget %1;#alarm "StatTimeout" +5 {tell @StatTarget Sorry, no stats right now. Try again in a moment.;#state StatTrig 0}}
#cond {Str:*Int:*Wis:*)} {tell @StatTarget %1;#untrigger StatTimeout}
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