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.