Updated, works great now.

Scripts and support for your favorite MUD client.
Gizep
Sojourner
Posts: 150
Joined: Thu Mar 10, 2005 4:34 pm
Location: Menzoberranzan
Contact:

Updated, works great now.

Postby Gizep » Wed Mar 30, 2005 7:01 pm

I just wanna store all of my identified items in a database, I've been trying to get it working and it never saves, ive used all of the examples I could find on this board and none of them work, even after i worked the bugs out and got them stored to a variable.
Last edited by Gizep on Thu Apr 07, 2005 2:34 pm, edited 2 times in total.
Gizep
Sojourner
Posts: 150
Joined: Thu Mar 10, 2005 4:34 pm
Location: Menzoberranzan
Contact:

Postby Gizep » Thu Mar 31, 2005 11:32 am

Ok, got mine working, here's the share....

Here's how it works

I created a zmud database:
name - text
keywords - text
location - text
aflags - text
iflags - text
weight - number
value - number
ac - number
affects - text
effects - text
ceffects - text
ccrit - text
date - text
damage - text
type - text

VERY IMPORTANT:
the database must be opened and on the screen, although it can be minimized.


lookup "a glowing crimson dagger"
retrieves a glowing crimson dagger from the database.

after using lookup, you can call the variable directly using

say @tempitem
etc...

This has no aliases besides lookup, because we just use the You feel informed: to trigger the db lookup.
If anyone can figure out how to make it update when the item changes, please help me out here.


#TRIGGER {Name '{&itemname}'} {lookup @itemname} "Identify"
#TRIGGER {Keyword '&keywords', Item type: &type} {} "Identify"
#TRIGGER {Item will give you following abilities: &aflags} {} "Identify"
#TRIGGER {Item is: &iflags} {} "Identify"
#TRIGGER {Weight: &weight, Value: &value} {} "Identify"
#TRIGGER {Affects :&taffects} {@affects = @affects @taffects} "Identify"
#TRIGGER {You feel informed:} {@itemname = "";@keywords = "";@type = "";@aflags = "";@iflags = "";@weight = "";@value = "";@ac = 0;@location = "";@affects = "";@taffects = "";@affects = "";@effects = "";@ccrit = "";@damage = "";@ceffects = "";#T+ Identify}
#TRIGGER {Special Effects : &effects} {} "Identify"
#TRIGGER {Combat Critical : &ccrit} {} "Identify"
#TRIGGER {Damage Dice is '&damage'} {} "Identify"
#TRIGGER {Called Effects : &ceffects} {} "Identify"
#TRIGGER {AC-apply is* &ac} {} "Identify"
#TRIGGER {$} {createitem;#T- Identify} "Identify"

#ALIAS lookup {#DBFIRST;@tempitem = "";@Found = 0;#WHILE (!%null( %rec)) {#IF (&Name = %1) {@tempitem = Name:&name;#IF (&aflags != %null) {@tempitem = @tempitem Affect Flags:&aflags};#IF (&iflags != %null) {@tempitem = @tempitem Item Flags:&iflags};#IF (&weight != 0) {@tempitem = @tempitem Weight:&weight};#IF (&value != 0) {@tempitem = @tempitem Value:&value};#IF (&location != %null) {@tempitem = @tempitem Location:&location};#IF (&ac != 0) {@tempitem = @tempitem AC:&ac};#IF (&damage != %null) {@tempitem = @tempitem Dice:&damage};#IF (&affects != %null) {@tempitem = @tempitem Affects:&affects};#IF (&effects != %null) {@tempitem = @tempitem Combat Effects:&effects};#IF (&ceffects != %null) {@tempitem = @tempitem Called Effects:&ceffects};#IF (&ccrit != %null) {@tempitem = @tempitem Combat Critical:&ccrit};#IF (&date != %null) {@tempitem = @tempitem Last Updated:Last Updated:&date};@Found = 1};#DBNEXT};#IF (@Found = 1) {#say @tempitem} {#SAY Item Not In Database}}




** Note **

These Aliases are used by the script and are not meant to be executed by hand....

#ALIAS createitem {#T- Identify;@tempitem = "";@Found = 0;#DBFIRST;#WHILE (!%null( %rec)) {#IF (&Name = @itemname) {@Found = 1;#say Found It};#DBNEXT};#SAY FOUND: @Found;#IF (@Found == 0) {recordadd} {#say Already In Database Nice Waste My Scrolls!}}


#ALIAS recordadd {#Var ObjectDB "";#Addkey ObjectDB name @itemname;#Addkey ObjectDB keywords @keywords;#Addkey ObjectDB type @type;#Addkey ObjectDB aflags @aflags;#Addkey ObjectDB ac @ac;#Addkey ObjectDB location @location;#Addkey ObjectDB iflags @iflags;#Addkey ObjectDB weight @weight;#Addkey ObjectDB value @value;#Addkey ObjectDB affects @affects;#Addkey ObjectDB taffects @taffects;#Addkey ObjectDB affects @affects;#Addkey ObjectDB effects @effects;#Addkey ObjectDB ccrit @ccrit;#Addkey ObjectDB damage @damage;#Addkey ObjectDB ceffects @ceffects;#Addkey ObjectDB date %time;#NEW Name @ObjectDB;#SHOW "Item added to database.";#T- Identify}
cefiw
Sojourner
Posts: 9
Joined: Thu Oct 28, 2004 3:42 pm

Postby cefiw » Tue Apr 19, 2005 10:35 pm

ok when i went to lookup a item that i just ID's it said it was not in the database... no clue....
Gizep
Sojourner
Posts: 150
Joined: Thu Mar 10, 2005 4:34 pm
Location: Menzoberranzan
Contact:

Postby Gizep » Tue Apr 19, 2005 11:13 pm

if that database doesnt have those exact felds, it wont work, also I think that sticky button may need to be clicked so its always on top, you can still make it minimised that way too.

One more thing, I'm using Zmud 7.05
As long as we live in this world we are bound to encounter problems. If, at such times, we lose hope and become discouraged, we diminish our ability to face difficulties. If, on the other hand, we remember that it is not just ourselves but everyone who has to undergo suffering, this more realistic perspective will increase our determination and capacity to overcome troubles.
-- The Dali Lama
Vari
Sojourner
Posts: 18
Joined: Sat Oct 04, 2003 8:05 pm

hey hey

Postby Vari » Wed Apr 20, 2005 12:08 am

Any one else have a dbase trigger set they share that can report out stats in like a tell or gsay type deal?? Or can yours do that Gizep?
Vari
AKA Christina
Gizep
Sojourner
Posts: 150
Joined: Thu Mar 10, 2005 4:34 pm
Location: Menzoberranzan
Contact:

Postby Gizep » Wed Apr 20, 2005 1:58 pm

Mine does that but cefiw cant seem to get it working based on what's posted here.
As long as we live in this world we are bound to encounter problems. If, at such times, we lose hope and become discouraged, we diminish our ability to face difficulties. If, on the other hand, we remember that it is not just ourselves but everyone who has to undergo suffering, this more realistic perspective will increase our determination and capacity to overcome troubles.
-- The Dali Lama
Gizep
Sojourner
Posts: 150
Joined: Thu Mar 10, 2005 4:34 pm
Location: Menzoberranzan
Contact:

Postby Gizep » Sun Apr 24, 2005 8:49 pm

To make it simple, I stored both the db and the script import file.

This is for Zmud 7.05

Delete old verson before importing.

DB is my current set...I dont have many stats, but I did import the one from that website.
Right click them and save them somewhere.
Remember to make sure its open and minimized using the sticky button.


http://home.comcast.net/~tfields10/Identify.txt
http://home.comcast.net/~tfields10/eqdb.db
As long as we live in this world we are bound to encounter problems. If, at such times, we lose hope and become discouraged, we diminish our ability to face difficulties. If, on the other hand, we remember that it is not just ourselves but everyone who has to undergo suffering, this more realistic perspective will increase our determination and capacity to overcome troubles.
-- The Dali Lama
Nebomosel
Sojourner
Posts: 53
Joined: Sun Jul 01, 2001 5:01 am

Postby Nebomosel » Tue May 24, 2005 7:34 pm

Didn't want the info in the database, just the format to start my own. Unfortunately, the database you have set up for download doesn't load into zmud 7.05. Any suggestions? Even the format posted so I can set my own database up would help

Neb

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 9 guests