|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: 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!! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: 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. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: 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 |
|
|
|
killjack Beginner
Joined: 21 Oct 2007 Posts: 11
|
Posted: Tue Oct 23, 2007 1:50 am |
it shows record when I open the DB windows at all times.
thanks progonoi! |
|
|
|
|
|