--- lib/scpt/auto.lua.orig Wed Jun 4 22:36:50 2003
+++ lib/scpt/auto.lua Sat Jun 7 15:43:09 2003
@@ -195,6 +195,14 @@
return function(object) if strfind(strlower(object_desc(object, -1, 0)), strlower(%r[1])) then return TRUE end end
elseif r.label == "symbol" then
return function(object) if strchar(get_kind(object).d_char) == %r[1] then return TRUE end end
+ elseif r.label == "inscribed" then
+ return function(object) if object.note ~= 0 and strfind(strlower(quark_str(object.note)), strlower(%r[1])) then return TRUE end end
+ elseif r.label == "discount" then
+ local d1 = r.args.min
+ local d2 = r.args.max
+ if tonumber(d1) == nil then d1 = getglobal(d1) else d1 = tonumber(d1) end
+ if tonumber(d2) == nil then d2 = getglobal(d2) else d2 = tonumber(d2) end
+ return function(object) if is_aware(object) == TRUE and object.discount >= %d1 and object.discount <= %d2 then return TRUE end end
elseif r.label == "tval" then
local tv = r[1]
if tonumber(tv) == nil then tv = getglobal(tv) else tv = tonumber(tv) end
@@ -502,6 +510,33 @@
return xml:collect(""..n.."")
end,
},
+ ["inscribed"] =
+ {
+ "Check is true if object inscription contains word",
+ xml:collect([[=g]]),
+ function ()
+ local n = input_box("Word to find in object inscription?", 79)
+ if n == "" then return end
+ return xml:collect(""..n.."")
+ end,
+ },
+ ["discount"] =
+ {
+ "Check is true if object discount is between 2 values",
+ xml:collect([[]]),
+ function ()
+ local s = ""
+ return xml:collect(s)
+ end,
+ },
["symbol"] =
{
"Check is true if object symbol is ok",
--- src/squeltch.c.orig Fri Jan 10 04:39:22 2003
+++ src/squeltch.c Sat Jun 7 15:32:19 2003
@@ -137,6 +137,8 @@
"not",
"name",
"contain",
+ "inscribed",
+ "discount",
"symbol",
"state",
"status",