Check this problem...

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

Check this problem...

Postby Gizep » Thu Mar 29, 2007 11:27 am

First off, i'm pretty sure I can change the "force character" to something other than ~ but I would rather not.
zstat Tiamat

Code: Select all

#VAR ZoneStats {%query( &Zone =~~ %1, All)}
#FORALL @ZoneStats {lookup %db(%i,Name)}


returns all items in my equipment db that have the word Tiamat in the Zone field.

This generates a syntax error, but works, I would like to resolve the syntax error somehow without changing the functionality of ~

Added Periods to show the place, due to formatting on website here, it's the 2nd ~ if it doesnt look right to you.
#VAR ZoneStats {%query( &Zone =~~ %1, All)}
.......................................................^ syntax error

Second

Using the same alias base, I would like to change it to work something like this:

lstat str

Code: Select all

#VAR ZoneStats {%query( &{%1} != 0 & &{%1} != %null, All)}
#FORALL @ZoneStats {lookup %db(%i,name)}


would return all items that have %1 !%null and != 0

Third

is there anyway to make the expressions dynamic as well?

what I'm really looking to do is take a tell like find maxint hp
which would return all items that have maxint and hp....
kind of an in game query builder without having to really code once it's done.
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
Kegor
Sojourner
Posts: 666
Joined: Wed Feb 28, 2001 6:01 am
Location: St. Cloud, MN
Contact:

Postby Kegor » Mon Apr 02, 2007 5:40 am

You are posting some pretty advanced questions and what not now. I think you would have much better luck getting a good answer at zuggsoft.com.

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 5 guests