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


Joined: 21 Oct 2007
Posts: 11

PostPosted: Mon Oct 22, 2007 12:13 pm   

need a sample trigger with database in zMUD v7.21
 
I'm learning database in zMUD v7.21.
Although have readed the manual, I couldn't complete a successful trigger with database by myself.
I need a sample to study, Could somebody send me a sample trigger with database?
my email address mallon.ghl@163.com

I'll appreciate it!!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Oct 22, 2007 1:56 pm   
 
If you give us more infomation on your specific problem (or on a specific problem), we might be able to help you. Sending you triggers isn't going to help without the text that fires them, and it'll all probably end up much more complex than if we just helped you solve your specific problem, or at least enough of it to get you on the right track.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
killjack
Beginner


Joined: 21 Oct 2007
Posts: 11

PostPosted: Mon Oct 22, 2007 2:39 pm   
 
Thanks Xianfu's response!
I just don't know how to start with database.I've some try but failed.
for example,I build one database named quests.db and create some records.

how to operate this db in triigger,such as get value, query...etc.
the below is one of my failed try to show record 1 of quests.db.
triiger pattern : .....
{#DBLOAD qu
#SHOWDB @1.Type }
nothing is showed in screen.

don't know what's the problem.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Mon Oct 22, 2007 2:59 pm   
 
First off, you have to have the DB window open at all times, otherwise you can't manage any Db related stuff. Its really annoying but thats how I've always understood it works.

You mentioned that you want to get first record out of your DB?

Perhaps %viewrec is what you need?

Quote:

returns the nth record of the current database view. If view is specified, it is a string list whose first value is the name of the View to search, and optional second item is the two-character database name. If DoFormat is specified and is non-zero, the fields are returned formatted, otherwise the raw field data is returned.


I haven't really worked extensively with DB feature myself, so I don't know I can be much more help or even if my suggestion is any good.

Prog
Reply with quote
killjack
Beginner


Joined: 21 Oct 2007
Posts: 11

PostPosted: Tue Oct 23, 2007 1:50 am   
 
it shows record when I open the DB windows at all times.
thanks progonoi!
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