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


Joined: 17 May 2002
Posts: 0

PostPosted: Tue Apr 16, 2002 12:19 am   

Help with Database/triggers/alias
 
Here's what I've created

I play a mud where chants require i mix certain herbs. I have a database i created that has the chant names and the components they require listed

Name Of Chant | Comp1 | comp2 | comp3 | comp4

some of these have 1 component some have 5 and others have somewhere in between

what i'm wondering is if it's possible to get zmud to pull the values from comp1 comp2 comp3 comp4 and post them in a line like:

mix comp1 comp2 comp3 comp4

and help is much appreciated
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Tue Apr 16, 2002 1:15 am   
 
Once you've selected the record using #FIND, you can use the data with the & operator.

#FIND @chant All {Name of Chant} 1
mix &comp1 &comp2 &comp3 &comp4

I'm not sure if your multiple word field name is going to cause problems.

Troubadour
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Apr 16, 2002 1:16 am   
 
A little bit more information about your setup is required, but basically, if you put the name of the chant in one field and the components required for that chant in another field, this can be done easily. You might want to try looking into
%db
%dbget
%find
%query

Kjata
Reply with quote
draz
Newbie


Joined: 17 May 2002
Posts: 0

PostPosted: Tue Apr 16, 2002 1:26 am   
 
I'll try to clear this up a little.

My Datbase has currently 5 fields:
Name of Chant
1st Component
2nd Component
3rd Component
4th Component

what i want is to extract the values of:
1st 2nd 3rd 4th and paste them prefixed with mix:

Mix 1st 2nd 3rd 4th
I'm a bit of a hard core Merc lover so I eventually want this to work when i type cast 'float'
my Zmud will spit out:
mix Anise 'Irish Moss'
chant self

hope that is what you wanted :P
I will look at dbget
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Apr 16, 2002 1:46 am   
 
The easiest way to do this would be to ignore the database and just put the herbs in the alias to start with.

#AL float {mix Anise 'Irish Moss';chant self}

LightBulb
Vague questions get vague answers
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