|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Thu May 05, 2005 11:19 am
cast identify & the item database |
So basicly i want zmud to automaticly grab all the info i get when i identify an item and dump it into the items database. Reading through some of the old posts it even seems like it can be done. However i don't really know a whole lot about triggers and i've only just started looking into that database like 20 minutes ago. That's why i'd like to ask; Are there any particular guides/tutorials/helps i should read regarding this?
I had imagined a trigger going off when i cast a succesful identify that would filter the info from the echo'ed msg and then add it to the various fields in my database. |
|
|
|
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Thu May 05, 2005 1:31 pm |
Should take a look at scripting the database in the help file in Zmud
If you post some Identify examples people could guide you through the triggers and database usage |
|
|
|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Thu May 05, 2005 2:03 pm |
Object 'a shocking burst stolen blade dagger' is type weapon, extra flags none.
Wear location: wield
Weight is 3, value is 0, level is 32.
Weapon type is dagger.
Damage is 10d2 (average 15).
Weapons flags: shocking sharp
Affects dexterity by 1.
Affects hitroll by 3.
-------------------------------------------
Object 'wristguard bronze' is type armor, extra flags none.
Wear location: wrist
Weight is 1, value is 22, level is 20.
Armor class is 7 pierce, 7 bash, 7 slash, and 6 vs. magic.
Affects ac by -3.
Affects hp by 18.
----------------------------------------------
Object 'pendant bone' is type jewelry, extra flags hum magic bless burnproof.
Wear location: neck
Weight is 1, value is 100, level is 17.
Affects ac by -3.
Affects saves by -1.
Affects wisdom by 2.
Affects damroll by 2.
---------------------------------------------
There's a couple of identify examples :) |
|
|
|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Thu May 05, 2005 3:01 pm |
wow so i tried goofing around abit with what i could get from the helpfile and this seems to be beyond me..
|
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Thu May 05, 2005 3:23 pm |
Take a look at http://www.silverbridge.org/~varmel/zmud/tutorials/zmuddb.htm
So it would look something like:
#CLASS {identify}
#TRIGGER {Object '&{item.name}' is type &{item.type}, extra flags &{item.flags}.} {}
#TRIGGER {Wear location: &{item.location}} {}
#TRIGGER {Weight is &{item.weight}, value is &{item.value}, level is &{item.level}.} {}
#TRIGGER {Armor class is &{item.acpierce} pierce, &{item.acbash} bash, &{item.acslash} slash} {}
#TRIGGER {Affects ac by &{item.ac}. } {}
#TRIGGER {$} {
; If the there is an item in the database with the name @item.name
; Already then don't add the item.
#if (%find( @item.name) = "") {#new "" @item}
; New item might have been added. Empty the database record.
item = ""
; We have finished identifying the object so we deactivate this trigger class.
#t- identify
}
#CLASS 0
#ALIAS identify {
; Activate the identify trigger class. Then cast the identify spell so
; that there's some output to parse.
#t+ identify
cast identify %1
} |
|
|
|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Thu May 05, 2005 4:36 pm |
THANK YOU!
It is awesome :D |
|
|
|
|
|