@program phones-pagers.muf 1 10000 d i $include $lib/rp $include $lib/alynna lvar param : smatchBoxItem (d s s -- i) "d s s" checkargs (OLDSYS) 0 (LocationToReplace) 4 rotate 4 rotate boxDir (ItemToFind FoundResult Object Proploc) begin over over nextprop swap pop dup "" stringcmp not not while over over "/name" strcat getpropstr 5 pick smatch if rot pop (Remove old result) dup dup "/" rinstr strcut swap pop atoi (Work out present slot) rot rot (Replace result) then repeat pop pop swap pop ; PUBLIC findBoxItem : prefix[ str:type -- str:prefix ] type @ tolower case "PA*" smatch when "72" end "PH*" smatch when "74" end "IM*" smatch when "46" end "IR*" smatch when "47" end "NT*" smatch when "68" end "DL*" smatch when "35" end "CS*" smatch when "27" end endcase ; : svstype[ str:type -- str:outtype ] type @ tolower case "PA*" smatch when "Pager" end "PH*" smatch when "Phone" end "IM*" smatch when "IM" end "IR*" smatch when "Infrared link" end "NT*" smatch when "Network link (Satellite)" end "DL*" smatch when "Data link (Cable)" end "CS*" smatch when "Cyberspace link" end endcase ; : phpart[ dbref:target -- str:phpart ] target @ int intostr "00000" swap strcat dup strlen 5 - strcut ; : mynum[ str:type -- str:num ] type @ tolower case "pa*" when me @ "gear" "Pager*" smatchBoxItem if { "pa" prefix me @ phpart }cat else "" then end "ph*" when me @ "gear" "Phone*" smatchBoxItem if { "ph" prefix me @ phpart }cat else "" then end "im*" when me @ "gear" "IM*" smatchBoxItem if { "im" prefix me @ phpart }cat else "" then end "ir*" when me @ "gear" "Infrared*" smatchBoxItem if { "ir" prefix me @ phpart }cat else "" then end "nt*" when me @ "gear" "Network link*" smatchBoxItem if { "nt" prefix me @ phpart }cat else "" then end "dl*" when me @ "gear" "Data link*" smatchBoxItem if { "dl" prefix me @ phpart }cat else "" then end "cs*" when me @ "gear" "Cyberspace link*" smatchBoxItem if { "cs" prefix me @ phpart }cat else "" then end ; : main param ! command @ "+pa*"