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


Joined: 15 Nov 2004
Posts: 18

PostPosted: Thu Jul 14, 2005 5:00 pm   

Using a var as a list of things to trigger from
 
Can you program a var to be a list of items to drop if you pick them from a corpse....

IE

You get a goblin shortsword
You get a ring of pain
You get a goblin helm

the var would hold:
---------------------
goblin shortsword
goblin helm

and would trigger like:

You get (@varname)

Is this possible?
Am I explaining it well?

Thanks
-T
Reply with quote
godzilla1
Beginner


Joined: 14 Jul 2005
Posts: 22
Location: Budapest

PostPosted: Thu Jul 14, 2005 5:08 pm   
 
Correct. Need to know the exact pattern though. (Is there space, punctuacon, end line after the items?)

The pattern of the trigger should be
^You get a ({@varname})(.)
or
^You get a ({@varname})(%q) if not end line.
Reply with quote
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Thu Jul 14, 2005 7:34 pm   ({@citizens})
 
This gave me an idea.. i made a trigger

({@citizens})

and it contained

#cw bold,white

so every word in the citizens variable list would be colored white...

eg @citizens = bob|zugg|johnnymac|etc

but it only colors the first in the list. any ideas?
Reply with quote
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Thu Jul 14, 2005 7:36 pm   
 
oh forget that. after i made it again it works. thanks!
Reply with quote
godzilla1
Beginner


Joined: 14 Jul 2005
Posts: 22
Location: Budapest

PostPosted: Fri Jul 15, 2005 5:54 am   
 
tThe ({@citizens}) itself isnt enough in the pattern.
eg @citizens = bob|zugg|johnnymac|etc

it will trigger on bobo , azugg etc.
Put a wild char after variable, and either make case sensitive trigger, either put wild char before wariable too.
({@varname})(%q) <- similar to this
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