@q @program asys-finished 1 99999 d i ( asys-finished v1.2 Jessy@FurryMUCK 6/97, 2/99 asys-finished runs Argo +finished command, which is used to finalize character generation. INSTALLATION: asys-finished uses the default Argo installation method. Port and install lib-argo. Set asys-finished W. Type '+install asys-finished' to install this program and its action. USAGE: +finished, then follow prompts. See lib-argo and the Argo manual for further information. asys-finished may be freely ported. Please comment any changes. ) (2345678901234567890123456789012345678901234567890123456789012345678901) $def thisVersion "1.2" $define Tell me @ owner swap notify $enddef $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 *) : DoInstall ( -- ) (* 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 then (* record 'official' name of prog; remove old links *) prog "@a/name" "asys-finished" setprop RecOldActions #0 "+finished" newexit dup scratch ! (* create command *) prog setlink prog "@a/version" thisVersion setprop (* set version *) scratch @ "@a/version" thisVersion setprop (* register command *) #0 "@a/comm_list/+finished" scratch @ setprop #0 "@a/prog_list/" prog name strcat prog setprop scratch @ "@a/name" "+finished" 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/+finished" 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-finished \(#" prog intostr strcat "\)" strcat Tell " " Tell "The " command @ strcat " command is used to indicate you have completed character generation" " and are ready to enter play. Use this command with caution: after e" "ntering the " strcat strcat strcat command @ strcat " command, you may not lower levels for skills, etc., you may not tak" "e further advantages or disadvantages, and increases to Stats cost 3" "points rather than 1." strcat strcat strcat Tell " " Tell "Syntax: " command @ strcat ", then follow prompts." strcat Tell " " Tell "This command is not available if the system parameter character_appr" "oval is set to 'yes' \(the default\). If character approval is requi" "red, you will need to page " strcat strcat ourDataObj @ "@a/sysparms/monitor" getpropstr A-An strcat ", who will review your character before approval." strcat Tell ; : DoFinished ( -- ) (* finalize character generation *) (* check: location ok? *) CheckCGRoom not if ">> Sorry, this command must be used in a designated setup room." Tell exit then ourDataObj @ "@a/sysparms/character_approval" getpropstr "yes" smatch if ">> Sorry, automatic character approval is currently disabled." Tell ">> You must page " ourDataObj @ "@a/sysparms/monitor" getpropstr A-An strcat " for character approval." strcat Tell exit then ">> Please confirm: You have made all the settings you want to " "make and" strcat Tell " are ready to enter play?" Tell ">> [Enter 'yes' to confirm, or any other string to exit]" Tell ReadLine strip "yes" swap stringpfx if me @ "@a/status" "ap" setprop ">> Done. You are now ready to enter play." Tell else ">> Aborted." Tell then ; : main "me" match me ! (* initialize *) GetDataObj ourDataObj ! strip ourArg ! trig "@a/name" getpropstr ourCom ! ourArg @ if ourArg @ "#" stringpfx if "#help" ourArg @ stringpfx if DoHelp else "#enable" ourArg @ stringpfx if DoEnable else "#disable" ourArg @ stringpfx if DoDisable else "#version" ourArg @ stringpfx if DoVersion else "#install" ourArg @ stringpfx if DoInstall else "#uninstall" ourArg @ stringpfx if DoUninstall else ">> #Argument not understood." Tell then then then then then then exit then then me @ ArgoPermCheck Disabled? DeadCheck DoFinished ; . c q @set asys-finished=W