record
musicmud-2.1.6/data/verbs/record · 1.6 KB
From the archive musicmud2.1.6.tar.gz
Download the archive « Back to the archive contents
--lua PFL_NONE 0 3
local start = function(who, jname)
send(pl, format("@@= %s's %s Record", getstr(who, "name"), jname))
send(pl, "")
end
local who
if getn(arg)==0 then
who = pl
else
local t = matchplayer(pl, arg[1])
if not t then
send(pl, "Who?")
return
end
who = t
end
startpager(pl)
local all
for i, v in children("nations_zone") do
local r = getstr(v, "record")
local o = getstr(v, "outstand")
local jname = getstr(v, "jname")
if not jname then
jname = getstr(v, "name")
end
if r and o then
local cur = currency(v)
local ac = getintd(who, r..".count", 0)
local any = nil
for i = 0,ac-1 do
if not any then
if all then
send(pl, "")
end
start(who, jname)
any = 1
all = 1
end
local crim = getstr(who, r.."."..i)
local fine = getintd(who, r.."."..i..".fine", 0)
local when = getintd(who, r.."."..i..".when", 0)
fine = convert(fine, nil, cur)
send(pl, format("%16s %15s %s",
formattime(pl, "%x %H:%M", when),
formatcash(fine, cur, 0),
crim)
)
end
local fine = getintd(who, o, 0)
if fine > 0 then
fine = convert(fine, nil, cur)
if not any then
start(who, jname)
any = 1
all = 1
else
send(pl, "")
end
send(pl, format("outstanding fine : %13s", formatcash(fine, cur, 0)))
end
end
end
if all then
send(pl, "")
send(pl, "@@=")
else
if pl == who then
send(pl, "You have a clean slate.")
else
send(pl, acts(who, "%s has a clean slate."))
end
end