|
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Mon Apr 12, 2004 12:12 am
#IF something= YES. WOnt work! |
Ok, I have made, a find wizard. Well the game a play. many people ask me for finds.
I will show the triggers.
trigger 1: where someone asks for a find.
Pattern: ^(%w) tells you: find (%w)
Value:
#T+ autofinding
#VARIABLE wfind %1
#VARIABLE afind %2
Ok. now, wfind is: wanted find. and the afind is for the autofind.
Now, there can be 4 diffrent triggers for the find.
1, if succeded. and 3 others.
If succeeded it will show me 2 lines. Got trigger on the first line only:
Someone is in a cold mist.
Someone is in the room: space.
Now, i got the trigger like this:
pattern: @afind is in %1
VALUE: #VARIABLE rfinds "%1"
#VARIABLE okfind YES
Now, the person, might not be online, I might fail, and I might not have enough endurance points.
So for all three triggers I got the same value:
#VARIABLE okfind NO
Ok, now that part is clear. Now, here is where it messes up.
I have an alias. to just type: "fi"
So, pattern: fi, value:
find @afind
#WAIT 3000
#IF (@okfind=NO) {tell @wfind %proper( @afind) is not online, or the person does not exsist.} {#ABORT}
#IF (@okfind=YES) {tell @wfind %proper( @afind) is at @rfinds, Standing in a Room named @roomfs.}{#ABORT}
What's the problem? well, it never fires telling what's wrong.
Another thing is, that, I would like to have a limit for the people asking for finds. so. if example Corleidum asks for a find, it should add 1 to the find variable. Hmm, let me explain, somethin glike this..
I want it to auto add the name of the person asking for the find.
something like: whoeverFCount
the default value should be 3.
and when I make a find, it should be 2. and 1. then 0.
When it reaches 0, I want to tell them sorry, your find limit ran out.
Something like that, hope anyone understands, thanks |
|
|
|
Rennus Beginner
Joined: 30 Dec 2003 Posts: 22 Location: USA
|
Posted: Mon Apr 12, 2004 8:03 am |
#IF (@okfind="NO") {tell @wfind %proper( @afind) is not online, or the person does not exsist.} {#ABORT}
#IF (@okfind="YES") {tell @wfind %proper( @afind) is at @rfinds, Standing in a Room named @roomfs.}{#ABORT}
Since its not a number, you have to quote what you are trying to match.
Hope that helps. |
|
|
|
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Mon Apr 12, 2004 12:17 pm |
Great thanks! What about the fact that I would like it to count how many times each user has asked for finds..?
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Apr 12, 2004 3:58 pm |
Instead of counting down, count up. If you use a record variable, you'll only need one which will reduce the clutter in your variable list considerably.
#IF (%db( @Fcount, @wfind)) {#ADDK Fcount @wfind %eval( 1 + %db( @Fcount, @wfind))} {#ADDK Fcount @wfind 1}
#IF (%db( @Fcount, @wfind) < 4)) {fi} {tell @wfind sorry, your find limit ran out} |
|
|
|
|
|
|
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
|
|