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

Joined: 01 May 2002
Posts: 1

PostPosted: Wed May 01, 2002 3:37 am   

Trigger for DB Question
ok pretty much - i have triggers that automatically record all of the effects, abilities and stuff from all the equip i id and stuff, im able to place all that and the equip name into a variable and heres where im stuck - this is what it looks like when i id something

Current bid is: 111
You feel informed:
This item is in PERFECT condition
Object 'orb cor'valden', Item type: LIGHT
Item will give you following abilities: NONE
Can be worn on: TAKE
Weight: 10, Value: 3500
Spell: detect magic Level: 20 Charges: 10 left out of 10 max
Can affect you as :
Affects : Str By 1
Affects : Mana By 15
Restricted Classes and Races :
Thief, Warrior, Barbarian, Monk

-i can record everything except the last line (the line after the restricted classes and races) what variable would i use, or what would i do to record that last line?

- next how do i setup a trigger so that zmud will automatically compare the name of the item i just identified to all the items in my database to make sure i dont duplicate it?

Reply with quote

Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed May 01, 2002 12:24 pm   
What do you mean what variable you would need? Aren't you storing it all in a record variable?

For catching the line, you could do:
#TRIGGER {Restricted Classes and Races:$(*)} {...}

You could the store this in a text field in the database, or you can also create an option list field in the database and give it all the possible values. Then, you convert what you captured into a stringlist, using:
%replace("%1", ", ", "|")

and it should be stored nicely in the database.

As for avoiding duplicates in the database, you can use %find and %query to see if any item matches the one you are trying to add.

Reply with quote

Joined: 19 May 2002
Posts: 15

PostPosted: Sun May 19, 2002 8:46 am   
Also make sure that your trigger is set up as "prompt" not new line, this will set the trigger off at the end of the line, not waiting for the next line, this MAY fix your problem
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