musicmud-2.1.6/data/
musicmud-2.1.6/data/help/
musicmud-2.1.6/data/policy/
musicmud-2.1.6/data/wild/
musicmud-2.1.6/data/world/
musicmud-2.1.6/doc/
musicmud-2.1.6/src/ident/
musicmud-2.1.6/src/lua/
musicmud-2.1.6/src/lua/include/
musicmud-2.1.6/src/lua/src/lib/
musicmud-2.1.6/src/lua/src/lua/
musicmud-2.1.6/src/lua/src/luac/
--lua

local nations = function(block)
  local n = {}
  for i, v in children("nations_zone") do
    if (block or not getstr(v, "blockname") and getobj(v, "treatas")==block) or v==block then
      n[i] = v
    end
  end
  local m = {}
  for i, v in n do
    m[getn(n)-i] = v
  end
  return m
end

local any = nil

local doblock = function(block)
  local bname = nil
  if %any then 
    bname = "Neutral"
  end
  if block then
    bname = getstr(block, "blockname")
  end
  if bname then
    send(pl, format("%s : \n\n", bname))
  end
  for i, v in %nations(block) do
  if getobj(v, "start")==owner(v) then
    local notes = ""
    if getintd(v, "playable", 1)==0 then
      notes = " ^r[not playable]^n"
    end
    if getstr(v, "shortcountry") then
      send(pl, format("%-20s %s (%s)%s", getstr(v, "name"), getstr(v, "country"),
		getstr(v, "shortcountry"), notes))
    else
      send(pl, format("%-20s %s%s", getstr(v, "name"), getstr(v, "country"), notes))
    end
  end
  end
  send(pl, "\n")
end

startpager(pl)
send(pl, "@@=Defined Nations")
send(pl, "");

for i,v in children("nations_zone") do
  if getobj(v, "treatas")==nil and getstr(v, "blockname") then
    doblock(v)
    any = 1
  end
end

doblock(nil)

send(pl, "@@=")
endpager(pl)