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


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Fri Mar 01, 2002 3:12 am   

help with drinking trig
 
okay i have two char on the mud i'm playing and i need to set a trigger to drink from eather a canteen(1 char) or a mug (second char) but i don't want to have to make to diffrent drinking trigs
i have attempted to make one that does it but it sends drink canteen|mug so i made it use a varible called drink with canteen|mug.

but it still sends drink canteen|mug to the mud

#VAR drink {canteen|mug}
#TRIGGER {^Your throat is completely dry.} {drink @drink}
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Fri Mar 01, 2002 5:32 am   
 
You can do something like umm...

#TRIGGER {^Your throat is completely dry.} {drink %item(@drink,%random(1,%numitems(@drink)))}

Iljhar
Reply with quote
raks
Beginner


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Fri Mar 01, 2002 5:43 am   
 
okay, I will try that one. The one i was trying to use does not work.
Reply with quote
raks
Beginner


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Fri Mar 01, 2002 5:55 am   
 
okay
#TRIGGER {^Your throat is completely dry.} {drink %item(@drink,%random(1,%numitems(@drink)))}
does not work.
it sends
drink (canteen|mug) to the and the otherone
sends drink canteen|mug with does not work
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 01, 2002 7:09 am   
 
Let me fire up zMud, I've seen this in 6.26 only.

If it is 6.26 post this into the Beta forum:

I got a width 65535|( score|) in the Beta 6.26
See that forum for my post.

TonDiening
Beta Upgrading to 6.26
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Mar 01, 2002 8:41 am   
 
The immediate solution to your problem is:
#TRIGGER {^Your throat is completely dry.} {#IF (%char="CanteenCharactersNameHere") {drink canteen} {drink mug}}
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 01, 2002 11:40 am   
 
Vijilante gives the answer to your question



For the other issues

I can only reproduce your output:

drink (canteen|mug)

by using %additem(s,list) incorrectly as %additem(list,s):

#VAR drink {1972 Dom Perignon|shot glass}
#VAR drink %additem(@drink,"")
#ECHO Variable drink contains: @drink[green]

Variable drink contains: (1972 Dom Perignon|shot glass)

Double check your drink variable maybe as iljhar's

#TRIGGER {^Your throat is completely dry.} {drink %item(@drink,%random(1,%numitems(@drink)))}

Works if the variable drink is defined properly.

TonDiening
Beta Upgrading to 6.26
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Mar 01, 2002 5:19 pm   
 
For the character that uses the canteen, change the variable to:
#VAR drink canteen

For the character that uses the mug, change the variable to:
#VAR drink mug

LightBulb
All scripts untested unless otherwise noted
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