@q @program asys-award 1 99999 d i ( asys-award v1.2 Jessy @ FurryMUCK 6/97, 2/99 asys-award runs Argo +award command, which is used to modify a character's available character development points. INSTALLATION: asys-award uses the default Argo installation method. Port and install lib-argo. Set asys-award W. Type '+install asys-award' to install this program and its action. USAGE: +award = ... Modifies number of available character development points by . may be a negative number. See lib-argo and the Argo manual for further information. asys-award 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 else ">> Installing..." Tell then (* record 'official' name of prog; remove old links *) prog "@a/name" "asys-award" setprop RecOldActions #0 "+award" newexit dup scratch ! (* create command *) prog setlink prog "@a/version" thisVersion setprop (* set version *) scratch @ "@a/version" thisVersion setprop #0 "@a/comm_list/+award" scratch @ setprop #0 "@a/prog_list/" prog name strcat prog setprop scratch @ "@a/name" "+award" 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/+award" 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-award (#" prog intostr strcat ")" strcat Tell " " Tell "The " command @ strcat " command is used by Argo staff members to modify the number of " "available character development points a player has, either to " "reflect IC experience, or to allow a player to develop a character " "suitable for a feature role that would require more than the " "default number of points, or -- possibly -- as a disciplinary " "measure." strcat strcat strcat strcat strcat strcat Tell " " Tell "Syntax: " command @ strcat " = " strcat Tell " " Tell " may be a positive or negative number." "See the Argo Manual for further information on Character Development " "Points and experience." strcat Tell ; : DoAward ( s -- )(* a staff member modifies a players avail points *) StaffCheck not if (* check permission *) ">> Permission denied." Tell exit then (* check syntax *) ourArg @ not if ">> Syntax: " command @ strcat " = " strcat Tell exit then ourArg @ "=" instr not if ">> Syntax: " command @ strcat " = " strcat Tell exit then ourArg @ "=" explode pop strip swap strip scratch ! (* find player *) strip dup .pmatch dup if swap pop else pop ">> Player " swap Capitalize strcat " not found." strcat Tell exit then (* check data *) scratch @ number? not if ">> Syntax: " command @ strcat " = " strcat Tell exit then (* apply and notify *) dup "@a/avail/main" scratch @ atoi ApplyArgoMod ">> " swap name strcat " awarded " strcat scratch @ strcat " points." 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 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? DoAward ; . c q @set asys-award=W