|
adler Newbie
Joined: 09 Nov 2007 Posts: 2
|
Posted: Wed Dec 16, 2009 11:40 pm
EQ Database question |
Well, last night I decided I was going to go ahead and make an eq database script. I did some reading on here, found it to be pretty simple..
I'm only having one issue...and it's really a pretty stupid issue to have. The way my mud outputs lore data affects and perms are on their own lines:
For example..
Affects damage roll by 2, level 85.
Affects hit roll by 2, level 85.
Permanent spell protection evil.
Permanent spell protection good.
My triggers are as follows:
#TRIGGER {^Affects %1, level *.} {#var eqaffects %additem(%1,@eqaffects)} "Database"
#TRIGGER {^Permanent spell %1.} {#var eqperm %additem(%1,@eqperm)} "Database"
All I get is the last affect in the list, instead of showing all affects. Any help I could get would be wonderful. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Dec 17, 2009 12:48 am |
I'm not sure whether this is your problem, but you are using incorrect syntax in your triggers. It should be:
Code: |
#TRIGGER {^Affects (*), level *.} {#var eqaffects %additem(%1,@eqaffects)} "Database"
#TRIGGER {^Permanent spell (*).} {#var eqperm %additem(%1,@eqperm)} "Database"
|
You do not use %1, %2, etc. in the trigger pattern. Zmud permitted that syntax, but it was incorrect even then. The proper syntax is to put pattern-matching codes inside parentheses, (). The first set of parentheses will become %1 within the trigger value, the second set will become %2, etc. An asterisk matches anything. You could use other things like %w to match a single word, %d to match a number, etc. Try fixing that. I'm not sure if that is your problem, but it's the first thing to fix. |
|
|
|
adler Newbie
Joined: 09 Nov 2007 Posts: 2
|
Posted: Thu Dec 17, 2009 4:02 am |
Thanks, but that doesn't seem to be the issue in this case.
When I check the variable , I can see it's recording correctly. It's coming out as "protection evil|protection good" which is acceptable. But when I write to the db, I'm only getting "protection evil" it seems the " | " is causing a problem.
Edit: I figured it out, thanks for the help! |
|
|
|
|
|
|
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
|
|