@q @program asys-icroom 1 99999 d i ( asys-icroom v1.2 Jessy @ FurryMUCK 6/97, 2/99 asys-icroom runs Argo +icroom command, which is used to toggle a room's in-character status. The primary impact of this is that automatic experience points are only granted when a coded skill is successfully used in an IC room. INSTALLATION: asys-icroom uses the default Argo installation method. Port and install lib-argo. Set asys-icroom W. Type '+install asys-icroom' to install this program and its actions. See lib-argo and the Argo manual for further information. asys-icroom may be freely ported. Please comment any changes. ) (2345678901234567890123456789012345678901234567890123456789012345678901) $def thisVersion "1.2" $define Tell me @ owner swap notify $enddef $include $lib/reflist $include $lib/argo lvar scratch (* workspace var *) lvar ourCounter (* misc. counter var *) lvar ourDataObj (* dbref: object holding system-wide data *) lvar ourArg (* inital arg string, unmodified *) lvar ourCom (* string: 'official' name of command *) : Install ( -- ) (* install program into Argo system *) caller program? not if (* confirm installation method *) ">> Programs must be installed via the " "+install" GetCommandName strcat " command." strcat Tell exit then prog "@a/version" getpropstr if (* confirm re-install *) ">> Reinstalling..." Tell else ">> Installing..." Tell then (* record 'official' name of prog; remove old links *) prog "@a/name" "asys-icroom" setprop RecOldActions #0 "+icroom" newexit dup scratch ! (* create command *) prog setlink prog "@a/version" thisVersion setprop (* set version *) scratch @ "@a/version" thisVersion setprop #0 "@a/comm_list/+icroom" scratch @ setprop (* register command *) #0 "@a/prog_list/" prog name strcat prog setprop scratch @ "@a/name" "+icroom" setprop ">> Installed." Tell ; : DoUninstall (* uninstall program from Argo *) prog "@a/name" getpropstr if #0 "@a/prog_list/" prog "@a/name" getpropstr strcat getprop not if ">> " prog name strcat " is not currently installed." strcat Tell pid kill then else ">> " prog name strcat " is not currently installed." strcat Tell pid kill then ">> Please confirm: You wish to uninstall " prog name strcat "?" strcat Tell ReadYesNo not if ">> Aborted." Tell pid kill Then background "@a/comm_list/+xxx" RemoveCommand #0 "@a/prog_list/" prog "@a/name" getpropstr strcat remove_prop RecOldActions ">> Uninstalled. Please edit the online manual as appropriate." Tell ; : DoHelp ( -- ) (* display help screen *) " " Tell "asys-icroom (#" prog intostr strcat ")" strcat Tell " " Tell "The " command @ strcat " command is used to toggle the In-Character status of rooms. The " "primary effect of IC rooms is that successful use of a coded skill" " may grant automatic experience points, but only if the room you " "are in, or a room above it in the enivornment tree, is set IC. " "Your MUCK may also have rules (or at least points of etiquette) " "about what kind of behavior is acceptable in IC areas. A notation " "in the top right corner of your character sheet displays whether " "you are currently in an IC or OOC area." strcat strcat strcat strcat strcat strcat strcat strcat Tell " " Tell "Syntax: " command @ strcat " [<#room>] (default is 'here'; staff only)" strcat Tell " " Tell "See the Argo Manual for further information." Tell ; : DoICroom ( -- ) (* toggle room arg's CharGen status *) StaffCheck not if (* check permission *) ">> Permission denied." Tell exit then ourArg @ if (* find room to set: default is 'here' *) ourArg @ match dup if dup room? not if ">> Sorry, you must specifiy a room." Tell pop exit then else ">> '" ourArg @ Capitalize strcat " not found." strcat Tell pop exit then else loc @ then (* toggle ic status *) dup "@a/ic" getpropstr if dup "@a/ic" remove_prop 0 else dup "@a/ic" "yes" setprop 1 then swap (* notify *) ">> " swap name strcat " is now" strcat swap not if " not" strcat then " a In-Character room." strcat Tell ; : main "me" match me ! (* initialize *) GetDataObj ourDataObj ! strip ourArg ! trig "@a/name" getpropstr ourCom ! ourArg @ if ourArg @ "#" stringpfx if "#help" ourArg @ stringpfx if DoHelp exit else "#enable" ourArg @ stringpfx if DoEnable exit else "#disable" ourArg @ stringpfx if DoDisable exit else "#version" ourArg @ stringpfx if DoVersion else "#install" ourArg @ stringpfx if Install exit else "#uninstall" ourArg @ stringpfx if DoUninstall exit then then then then then then then then me @ ArgoPermCheck Disabled? DoICRoom ; . c q @set asys-icroom=W