ba1 @verb #6319:"qfind" none none none rdo #6319 @program #6319:"qfind" none none none "Copied from Quadir (#9780):find Oct 21 13:09:51 1999" "This verb was programmed by Quadir (#9780) " " to help Cecil (#7404) with his quota problems" "Errors: " "E_LENGTH --> The length of a quota contrib was not 4 " "E_VALID --> The quota was donated to a non-valid object " "E_PLAYER --> The quota was donated to a non-player " "E_TYPE --> One of the quota donations was not a number " "E_BACK --> Donated, but never received " "E_MATCH --> Quota donated was not the same as quota received" "E_CRASH --> Error caused verb to crash " {players, done} = {players(), {}} player:tell("Searching...") for x in [1..length(players)] who = players[x] try for z in [1..length(who.quota_contribs)] quota = who.quota_contribs[z] if (length(quota) != 4) player:Tell("...", $su:left("E_LENGTH", 9), "--> ", who, ".quota_contribs[", z, "] => ", length(quota)) elseif (!valid(quota[1])) player:Tell("...", $su:left("E_VALID", 9), "--> ", who, ".quota_contribs[", z, "][1] => ", quota[1]) elseif (!is_player(quota[1]) && !quota[1]:isa($project)) player:tell("...", $su:left("E_PLAYER", 9), "--> ", who, ".quota_contribs[", z, "][1] => ", quota[1]) elseif (typeof(quota[2]) != $INT) player:tell("...", $su:left("E_TYPE", 9), "--> ", who, ".quota_contribs[", z, "][2] | ", quota[1], " => ", quota[2]) elseif (typeof(quota[3]) != $INT) player:tell("...", $su:left("E_TYPE", 9), "--> ", who, ".quota_contribs[", z, "][3] | ", quota[1], " => ", quota[3]) elseif (typeof(quota[4]) != $INT) player:tell("...", $su:left("E_TYPE", 9), "--> ", who, ".quota_contribs[", z, "][4] | ", quota[1], " => ", quota[4]) else mine = {} for back in (quota[1].quota_contribs) if (back[1] == who) mine = back endif $cmd_utils:suspend_if_needed(0) endfor if (!mine) player:Tell("...", $su:left("E_BACK", 9), "--> ", who, ".quota_contribs[", z, "] => ", quota[1]) elseif ((a = {who, -quota[2], -quota[3], -quota[4]}) != mine && !(a in done)) done = setadd(done, a) player:tell("...", $su:left("E_MATCH", 9), "--> ", who, ".quota_contribs[", z, "] => ", quota[1]) endif endif $cmd_utils:suspend_if_needed(0) endfor except (ANY) player:Tell("...", $su:left("E_CRASH", 9), "-->", who, `z ! E_VARNF => 0' ? tostr(".quota_contribs[", z, "]") | "") endtry $cmd_utils:suspend_if_needed(0) endfor player:tell($su:space(15, " "), "...Done") "Last modified by Dax (#789) on Wed May 4 06:45:17 2005 MDT." . 0