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
Melinko
Newbie


Joined: 07 Nov 2000
Posts: 6
Location: USA

PostPosted: Mon Aug 11, 2003 1:55 am   

Need help with a simple trigger.
 
Okay, I've got a trigger that works like this.

Patt: ^(%w) informs you '~[(*)~]'$
Comm: #IF %ismember(%1,@trusted) {#IF %ismember(%2,@item) {get %2;give %2 Hex} {#NOOP}} {#NOOP}

Explanation:
@trusted = People with their bots that go do things for others.
@item = An item or list of items that is broken and needs repair.

Now that that is established, this trigger works perfect. There is only one problem with it. On this mud sometimes our hands are slippery and one of our fingers slips while giving items to another person. My problem is within here.

What happens is while giving a list of items to Hex, I drop more than one and the drop messages vary a bit. (i.e. Your grip loosens and you drop it. You sneeze and drop it. etc...) I am certain the only way to fix this is by having zmud resend the command that was sent to the mud. I tried using !! but that doesn't work because the commands were sent via trigger and not the command line. I was wondering if there is a fuction/command or something like that to send the last thing sent to the mud even if it was through a trigger, and if there is does it work like !! does and can I use it like !3 and resend the 3rd to last thing sent.

-Melinko

Zmud 6.62
XP 3000
200GB HD
ATI 9800 Pro
WinXP 2600
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Aug 11, 2003 11:00 am   
 
#IF (%ismember(%1,@trusted) & %ismember(%2,@item)) {get %2;give %2 Hex}
will achieve the same thing, and is somewhat easier to write and read, so I will use that.
[?] Where to go from here?

One possibility is to use a multistate trig to prove success, such as:

#TR {^(%w) informs you '~[(*)~]'$} {#IF (%ismember(%1,@trusted) & %ismember(%2,@item)) {get %2;give %2 Hex}}
#COND {({You give|You drop|Another you drop|Yet another failure})} {#IF (%1 = "You give") {#ECHO Success!! //also do anything else you wish to do on success} {#ECHO You droppped it!!//and whatever you want to do when you've dropped it}}

There are other possibilities, but this one is the simplest I could think of. Let me know if it doesn't work or if there are problems with it as I don't fully understand what you're trying to do.

Incidentally.. if, when you detect you've failed, you wish to pick it up and give it to them again... try using these commands:
get %t2
give %t2 to %t1
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