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
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sun Jul 02, 2006 3:27 pm   

eq database confusion
 
Greetings all

have a problem trying to get my database to add items i can get 1 item to record but nothing after that.

here's my mud output

Name: a misty ring
Type: ARMOR
Weight: 1, Value: 250, Rent Level: 171
Can be worn on: Finger
AC-apply: [6]
Condition: 75
Affections: +5 to DEX
Requirements:
Str[0] Int [0] Wis [0] Dex [0] Con [0]
Extra Flags: GLOW MAGIC

here's my triggers:

#CLASS {identify} {enable}
#TRIGGER {Name: &{item.name}} {}
#TRIGGER {Type: &{item.kind}} {}
#TRIGGER {Weight: &{item.weight}, Value: &{item.value}, Rent Level: &{item.level}} {}
#TRIGGER {Can be worn on: &{item.wear}} {}
#TRIGGER {AC-apply: ~[&{item.ac}~]} {}
#TRIGGER {Condition: &{item.condition}} {}
#TRIGGER {Affections: &{item.mod}} {}
#TRIGGER {Extra Flags: &{item.flags}} {}
#TRIGGER {$} {#if (%find( @item.name) = "") {#new "" @item};item="";#T- identify}
#TRIGGER {Todam: &{item.damage} (Avg. per hit: &{item.avdam).} {}
#CLASS 0

according to all the other posts it should work hehe, cept it only works once with a empty database. I dunno why it won't add other items.

Any help appreciated

Z
_________________
Spin
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Sun Jul 02, 2006 6:57 pm   
 
At a guess, it looks like your class is enabled by default and then disabled by:

#TRIGGER {$} {#if (%find( @item.name) = "") {#new "" @item};item="";#T- identify}

Without seeing any other of your triggers or aliases, this is the most obvious reason. Usually, DB capture triggers like this are disabled by default and then enabled when needed. This is faster and more efficient since zMUD doesn't have to watch for rarely-used patterns.

#Alias identify {#T+ identify;~identify %1}
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Mon Jul 03, 2006 5:18 am   
 
yea I have a alias that does that, itll add the first thing i identify perfectly but then when I id something else it wont add a new database record, the first one is the only one that sticks, then if i delete that and then reid something else that will stick and be the only one.

I think im doing something wrrong with this line
#TRIGGER {$} {#if (%find( @item.name) = "") {#new "" @item};item="";#T- identify}

but I dunno everything looks ok

Thanks for your help
_________________
Spin
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Mon Jul 03, 2006 12:53 pm   
 
Mixsel wrote:
I think im doing something wrrong with this line
#TRIGGER {$} {#if (%find( @item.name) = "") {#new "" @item};item="";#T- identify}


This works for me using your example:

#TRIGGER "" {$} {#IF (%find(@item.name) = "") {#NEW "" @item;#VAR item "";#T- identify} {#SHOW Item already exists}} "" {}
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Mon Jul 03, 2006 5:34 pm   
 
Argh!, I got something wrong when i clear the database then id something it records, but then when i try something else it says item already exists. now im trying to figure out why that's happening.

i gotta be close hehe just some dumb thing im missing

trying to figure out why "a signet ring" name and "mixsels' Foobard shield" are the same according to my trigger maybe thats it
_________________
Spin
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