@q @program asys-rumors 1 99999 d i ( asys-rumors v1.2 Jessy @ FurryMUCK 6/97, 2/99 asys-rumors runs the Argo rumor system, which includes commands +rumors, +gossip, +spread, +quash, +trash, +boost, and +investigate. INSTALLATION: asys-rumor uses the default Argo installation method. Port and install lib-argo. Set asys-roll W. Type '+install asys-roll' to install this program and its actions. USAGE: +rumors [] .......... Display rumors currently circulating in +gossip [] .......... Try to start a rumor in +spread [] .......... Try to increase a rumor's authority in +quash [] ........... Try to decrease a rumor's authority in +trash [] ........... Try to trash a player's reputation in . Success lowers target's Influence. +boost [] ........... Try to boost a player's reputation in . Success raises target's Influence. +investigate [] ..... Try to find out who started a rumor in . You must be a member of for any of these commands to work. That is, you must have the appropriate Influence skill. See lib-argo and the Argo Manual for further information. asys-rumors 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 ourCrit (* i: 1 = crit succ; 0 = normal; -1 = crit fail *) lvar ourCom (* string: 'official' name of command *) lvar ourBoolean (* misc. flow-control var *) lvar vsPlayer (* dbref of player rolling against *) : 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-rumors" setprop #0 "@a/prog_list/" prog name strcat prog setprop RecOldActions #0 "+rumors;+rumours" newexit dup scratch ! (* create command *) prog setlink prog "@a/version" thisVersion setprop (* set version *) scratch @ "@a/version" thisVersion setprop #0 "@a/comm_list/+rumors" scratch @ setprop (* register command *) scratch @ "@a/name" "+rumors" setprop #0 "+gossip" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+gossip" scratch @ setprop scratch @ "@a/name" "+gossip" setprop #0 "+spread" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+spread" scratch @ setprop (* register command *) scratch @ "@a/name" "+spread" setprop #0 "+quash" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+quash" scratch @ setprop scratch @ "@a/name" "+quash" setprop #0 "+trash" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+trash" scratch @ setprop (* register command *) scratch @ "@a/name" "+trash" setprop #0 "+gossip" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+gossip" scratch @ setprop scratch @ "@a/name" "+gossip" setprop #0 "+boost" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+boost" scratch @ setprop scratch @ "@a/name" "+boost" setprop #0 "+investigate" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+investigate" scratch @ setprop scratch @ "@a/name" "+investigate" 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/+rumors" RemoveCommand "@a/comm_list/+gossip" RemoveCommand "@a/comm_list/+spread" RemoveCommand "@a/comm_list/+boost" RemoveCommand "@a/comm_list/+trash" RemoveCommand "@a/comm_list/+quash" RemoveCommand "@a/comm_list/+investigate" RemoveCommand #0 "@a/prog_list/" prog "@a/name" getpropstr strcat remove_prop RecOldActions #0 "@a/prog_list/" prog "@a/name" getpropstr strcat remove_prop ">> Uninstalled. Please edit the online manual as appropriate." Tell ; : DoHelp ( -- ) (* display help screen *) " " Tell "asys-rumors (#" prog intostr strcat ")" strcat Tell " " Tell "The " command @ strcat ourCom @ "+rumors" over smatch if pop " command displays rumors currently active within a given group." strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " Tell "If the group name is not specified, Argo will prompt for one. Rumors " "are displayed as a numbered list: use this number when attempting to " "spread, quash, or investigate a rumor. Each rumor is followed by a " "tag showing how 'authoritative' the rumor is. The levels, in increasing" " order of authority, are:" strcat strcat strcat strcat Tell " " Tell " whispered, muttered, quiet, persitent, convincing, widespread, accepted" Tell " " Tell "You must be a member of a group (that is, have the appropriate Influence " "Skill), in order to display its current rumors." strcat Tell " " Tell "See the Argo Manual for more information on rumors." Tell else "+gossip" over smatch if pop " command lets you attempt to start a rumor within a group. You must " "have Influence within the group in order to make the attempt. A succ" "essful roll will cause Argo to ask you what the rumor is. Enter a str" "ing for the rumor. It will go into circulation as a 'whispered' rumor." strcat strcat strcat strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " Tell "If a group name is not specified, Argo will prompt you for one." Tell " " Tell "You may only use this command once per day." Tell " " Tell "See the Argo Manual for more information on rumors." Tell else "+spread" over smatch if pop " command lets you attempt to increase the authority or believability " "of a rumor that is currently active within a group. Each rumor has a " "status that measures how widespread and how widely believed it is. The" " status levels, in increasing order, are:" strcat strcat strcat strcat Tell " " Tell " whispered, muttered, quiet, persitent, convincing, widespread, accepted" Tell " " Tell "A successful roll will increase the rumor's status " "by 1 level. A critical success will increase by 2. A critical failure wi" "ll decrease by 1." strcat strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " Tell "If a group name is not specified, Argo will prompt you for one. Then, " "specify the rumor you want to spread by its number, or type .l to disp" "lay the numbered list." strcat strcat Tell " " Tell "You must be a member of the relavent Group. You may only use this " "command once per day." strcat Tell " " Tell "See the Argo Manual for more information on rumors." Tell else "+quash" over smatch if pop " command lets you attempt to decrease the authority or believability " "of a rumor that is currently active within a group. Each rumor has a " "status that measures how widespread and how widely believed it is. The" " status levels, in increasing order, are:" strcat strcat strcat strcat Tell " " Tell " whispered, muttered, quiet, persitent, convincing, widespread, accepted" Tell " " Tell "A successful roll will decrease the rumor's status by 1 level. A crit" "ical success will decrease by 2. A critical failure will increase by 1." strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " Tell "If a group name is not specified, Argo will prompt you for one. Then, " "specify the rumor you want to quash, by its number, or type .l to disp" "play the numbered list." strcat strcat Tell " " Tell "You must be a member of the relavent Group. You may only use this " "command once per day." strcat Tell " " Tell "See the Argo Manual for more information on rumors." Tell else "+trash" over smatch if pop " command lets you attempt to trash or harm another player's reputation" " within a group... That is, to lower his or her Influence skill for th" "at group. It is possible to trash a player's reputation to the point " "where he or she has a negative Influence skill level for the group." strcat strcat strcat strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " Tell "If a group name is not specified, Argo will prompt you for one. Then, " "specify the name of the player you want to trash. Argo will then make " "a skill-vs-skill roll between you and the other player. Success lowers" " the other player's Influence by 1. Critical success lowers by 2. Crit" "ical failure raises the other player's Influence by 1, and, if they ar" "e online, they will get a message that you tried to trash their reputa" "tion." strcat strcat strcat strcat strcat strcat Tell " " Tell "You must be a member of the relavent Group. You may only use this " "command once per day." strcat Tell " " Tell "See the Argo Manual for more information on rumors." Tell else "+boost" over smatch if pop " command lets you attempt to boost or help another player's reputation" " within a group... That is, to increase his or her Influence skill for" " that group. It is possible to 'boost' a player who is not in the grou" "p to start with. In other words, you can 'put in a good word' for them" ", with the result that they become part of the group (they get Influen" "ce skill)." strcat strcat strcat strcat strcat strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " tell "If a group name is not specified, Argo will prompt you for one. Then, " "specify the name of the player you want to boost. Argo will then make " "a skill-vs-skill roll between you and the other player. Success raises" " the other player's Influence by 1. Critical success raises by 2. Crit" "ical failure lowers *your* Influence by 1." strcat strcat strcat strcat Tell " " Tell "You must be a member of the relavent Group. You may only use this " "command once per day." strcat Tell " " Tell "See the Argo Manual for more information on rumors." Tell else "+investigate" over smatch if pop " command lets you attempt to find out who started a rumor." strcat Tell " " Tell "Syntax: " command @ strcat " []" strcat Tell " " Tell "If a group name is not specified, Argo will prompt you for one. Then," " enter the number of the rumor you want to investigate, or type .l to" " display the numbered list. Success will tell you who started the rumo" "r. Failure will tell you that you can't find out. Critical Failure wil" "l give you an *incorrect* answer, but will not tell you it is incorrec" "t. You will be notified of a critical success: so, the benefit of a cr" "itical success is that you know for certain that the answer is correct." strcat strcat strcat strcat strcat strcat Tell " " Tell "You must be a member of the relavent Group. You may only use this " "command once per day." strcat Tell " " Tell "See the Argo Manual for more information on rumors." Tell else ">> Help entry not found. Please contact a wizard." Tell then then then then then then then ; : ListRumors ( -- ) (* list rumors for group stored in scratch *) 1 ourCounter ! ourDataObj @ scratch @ "/" strcat nextprop begin (* begin rumor-listing loop *) dup while (* ourBoolean is true if we need to abbreviate strings *) ourDataObj @ over getpropstr dup strlen 68 > ourBoolean @ and if 68 strcut pop "..." strcat then ourCounter @ intostr ")" strcat 4 Pad swap strcat ourBoolean @ not if " [" strcat ourDataObj @ 3 pick "/status" strcat getpropstr strcat "]" strcat then Tell ourCounter @ 1 + ourCounter ! ourDataObj @ swap nextprop repeat (* end rumor-listing loop *) pop ; : CheckCrits ( i -- i ) (* stores crit value in ourCrit, based on die roll i *) dup 3 = over 4 = or if me @ RollXPs 1 else dup 17 = over 18 = or if -1 else 0 then then ourCrit ! ; : CheckTime ( -- i ) (* kill pid if insufficient time has passed *) me @ "W" flag? if exit then (* wizards are exempt from time check *) (* for everyone else, once per day *) me @ "@a/commands/" ourCom @ strcat getprop dup if systime swap - ourDataObj @ "@a/sysparms/rumor_interval" getpropstr ParseTimeString pop >= if 1 else 0 then else 1 then not if ">> Sorry, you have already used this command this interval." Tell pid kill then ; : CheckInfluence ( -- ) (* kill pid if user doesn't have influence *) me @ "@a/skills/" scratch @ "" "@a/rumors/" subst strcat " Influence" strcat GetModAbility 0 <= if ">> Sorry, you don't have influence in the " scratch @ "" "@a/rumors/" subst CapAll strcat " Group." strcat Tell pid kill then ; : GetInstigPlayer ( -- d ) (* get player who started a rumor *) ourDataObj @ scratch @ getprop ; : GetRandomPlayer ( -- d ) (* return a random player *) random dbtop int 1 - % dbref (* grab a random dbref *) begin (* begin player-finding loop *) dup dbtop dbcmp if pop #2 then dup ok? if dup player? if break then then 1 + repeat (* end player-finding loop *) ; : GetGroup ( -- ) (* determine which group rumor applies to *) (* use arg[0] if present *) ourArg @ if ourDataObj @ "@a/groups/" ourArg @ strcat getpropstr if "@a/rumors/" ourArg @ strcat scratch ! else ">> Group '" ourArg @ strcat "' not found." strcat Tell pid kill then else (* otherwise ask *) begin (* begin group-finding loop *) ">> What Group are you interested in?" Tell ">> [Enter a Group for which you have influence, " "or .q to quit]" strcat Tell ReadLine strip QCheck ourDataObj @ "@a/groups/" 3 pick strcat getpropstr if "@a/rumors/" swap strcat scratch ! else ">> Group '" swap CapAll strcat "' not found." strcat Tell continue then break repeat (* end group-finding loop *) then ; : ModifyRep ( i -- ) (* modify vsPlayer's rep by i *) vsPlayer @ scratch @ over over getpropstr atoi 4 rotate + intostr setprop ; : DoRumors ( -- ) (* display rumors for group specified in arg[0] *) 0 ourBoolean ! GetGroup CheckInfluence ourDataObj @ scratch @ "/" strcat nextprop not if ">> There are currently no rumors active in the " scratch @ "" "@a/rumors/" subst CapAll strcat " Group." strcat Tell exit then ourDataObj @ scratch @ getpropstr " " Tell Tell " " Tell ListRumors ; : AddRumor ( -- ) (* add a rumor for one group *) ourDataObj @ scratch @ "/" strcat nextprop dup if begin (* begin next-slot-finding loop *) ourDataObj @ over nextprop while ourDataObj @ swap nextprop repeat (* end next-slot-finding loop *) dup "/" rinstr strcut atoi 1 + intostr strcat scratch ! else scratch @ "/1" strcat scratch ! then ">> We're all ears!" Tell ">> [Enter the rumor, or .q to quit]" Tell ReadLine strip QCheck ourDataObj @ scratch @ rot setprop ourDataObj @ scratch @ "/status" strcat "whispered" setprop ourDataObj @ scratch @ "/instig" strcat me @ setprop ">> It becomes a whispered rumor." Tell ; : DoGossip ( -- ) (* attempt to start a rumor *) CheckTime GetGroup CheckInfluence 3 6 0 Dice (* roll to see if it starts *) CheckCrits (* determine result *) me @ scratch @ "@a/skills/" "@a/rumors/" subst " Influence" strcat getpropstr atoi me @ "@a/stats/pre" getpropstr atoi + <= if AddRumor me @ ourCom @ TimeSet else ">> You try to start a rumor, but it doesn't catch on." Tell me @ ourCom @ TimeSet then ; : GetNumRumor ( s -- s' ) (* return prop for rumor number s for group stored in scratch *) atoi 1 ourCounter ! ourDataObj @ scratch @ "/" strcat nextprop begin (* begin rumor-counting loop *) dup while ourCounter @ 3 pick = if swap pop break then ourCounter @ 1 + ourCounter ! ourDataObj @ swap nextprop repeat (* end rumor-counting loop *) ; : SpreadRumor ( -- ) (* increase a rumor's authority *) ourCrit @ 0 = if (* do it this way for normal success *) ourDataObj @ scratch @ getpropstr dup "whispered" smatch if "muttered" else dup "muttered" smatch if "quiet" else dup "quiet" smatch if "persistent" else dup "persistent" smatch if "convincing" else dup "convincing" smatch if "widespread" else dup "widespread" smatch if "accepted" else dup "accepted" smatch if ">> That's already an accepted fact!" Tell pop exit else ">> Data error. Please contact a wizard." Tell pop exit then then then then then then then swap pop ourDataObj @ scratch @ 3 pick setprop dup "accepted" smatch if " fact." strcat else " rumor." strcat then ">> It becomes " swap A-An strcat Tell exit then (* do it this way for critical success *) ourCrit @ 1 = if ourDataObj @ scratch @ getpropstr dup "whispered" smatch if "quiet" else dup "muttered" smatch if "persistent" else dup "quiet" smatch if "convincing" else dup "persistent" smatch if "widespread" else dup "convincing" smatch if "accepted" else dup "widespread" smatch if "accepted" else dup "accepted" smatch if ">> That's already an accepted fact!" Tell pop exit else ">> Data error. Please contact a wizard." Tell pop exit then then then then then then then swap pop ourDataObj @ scratch @ 3 pick setprop dup "accepted" smatch if " fact." strcat else " rumor." strcat then ">> It becomes " swap A-An strcat Tell exit then ; : QuashRumor ( -- ) (* decrease a rumor's authority *) ourCrit @ 0 = if (* do it this way for normal success *) ourDataObj @ scratch @ getpropstr dup "whispered" smatch if "dies" else dup "muttered" smatch if "whispered" else dup "quiet" smatch if "muttered" else dup "persistent" smatch if "quiet" else dup "convincing" smatch if "persistent" else dup "widespread" smatch if "convincing" else dup "accepted" smatch if "widespread" else ">> Data error. Please contact a wizard." Tell pop exit then then then then then then then swap pop dup "dies" smatch if pop ">> The rumor dies out." Tell ourDataObj @ scratch @ "" setprop ourDataObj @ scratch @ "/instig" "/status" subst "" setprop ourDataObj @ scratch @ "" "/status" subst "" setprop exit else ourDataObj @ scratch @ 3 pick setprop " rumor." strcat then ">> It becomes " swap A-An strcat Tell exit then (* do it this way for critical success *) ourCrit @ 1 = if ourDataObj @ scratch @ getpropstr dup "whispered" smatch if "dies" else dup "muttered" smatch if "dies" else dup "quiet" smatch if "whispered" else dup "persistent" smatch if "muttered" else dup "convincing" smatch if "quiet" else dup "widespread" smatch if "persistent" else dup "accepted" smatch if "convincing" else ">> Data error. Please contact a wizard." Tell pop exit then then then then then then then swap pop dup "dies" smatch if pop ">> The rumor dies out." Tell ourDataObj @ scratch @ "" setprop ourDataObj @ scratch @ dup "/" rinstr 1 - strcut pop "" setprop exit else ourDataObj @ scratch @ 3 pick setprop " rumor." strcat then ">> It becomes " swap A-An strcat Tell exit then ; : DoSpread ( -- ) (* user tries to increase a rumor's authority *) CheckTime GetGroup CheckInfluence ourDataObj @ scratch @ "/" strcat nextprop not if ">> Sorry, there are no currently active rumors for this Group." Tell exit then 1 ourBoolean ! (* ourBoolean true tells ListRumors to abbreviate *) begin (* begin rumor-finding loop *) ">> Which rumor do you want to try to spread?" Tell ">> Enter rumor number, or .l to list, or .q to quit]" Tell ReadLine strip QCheck dup ".l" smatch if " " Tell ListRumors pop continue then dup number? if dup atoi 0 <= if ">> Sorry, you must specify a positive number." Tell pop continue then GetNumRumor dup not if pop ">> Rumor not found." Tell continue then ourDataObj @ over getpropstr dup strlen 68 > if 68 strcut pop "..." strcat then ">> " swap strcat Tell ">> Please confirm: This is the rumor you want to spread? (y/n)" Tell ReadYesNo if "/status" strcat else pop continue then else ">> Sorry, you must specify rumors by number." Tell pop continue then scratch ! break repeat (* end rumor-finding loop *) 3 6 0 Dice (* roll to see if it starts *) CheckCrits ourCrit @ if ourCrit @ 1 = if ">> Critical success!" else ">> Critical failure!" then Tell then (* determine result *) me @ scratch @ "@a/skills/" "@a/rumors/" subst " Influence" strcat getpropstr atoi me @ "@a/stats/pre" getpropstr atoi + <= if SpreadRumor else ourCrit @ if QuashRumor else ">> You try to spread a rumor, but it doesn't catch on." Tell then me @ ourCom @ TimeSet then me @ ourCom @ TimeSet ; : DoQuash ( -- ) (* user attempts to decrease a rumor's authority *) CheckTime GetGroup CheckInfluence ourDataObj @ scratch @ "/" strcat nextprop not if ">> Sorry, there are no currently active rumors for this Group." Tell exit then 1 ourBoolean ! (* ourBoolean true tells ListRumors to abbreviate *) begin (* begin rumor-finding loop *) ">> Which rumor do you want to try to quash?" Tell ">> Enter rumor number, or .l to list, or .q to quit]" Tell ReadLine strip QCheck dup ".l" smatch if " " Tell ListRumors pop continue then (* check: valid entry? *) dup number? if dup atoi 0 <= if ">> Sorry, you must specify a positive number." Tell pop continue then GetNumRumor dup not if pop ">> Rumor not found." Tell continue then ourDataObj @ over getpropstr dup strlen 68 > if 68 strcut pop "..." strcat then ">> " swap strcat Tell ">> Please confirm: This is the rumor you want to quash? (y/n)" Tell ReadYesNo if "/status" strcat else pop continue then else ">> Sorry, you must specify rumors by number." Tell pop continue then scratch ! break repeat (* end rumor-finding loop *) 3 6 0 Dice (* roll to see if it starts *) CheckCrits ourCrit @ if ourCrit @ 1 = if ">> Critical success!" else ">> Critical failure!" then Tell then (* determine result *) me @ scratch @ "@a/skills/" "@a/rumors/" subst " Influence" strcat getpropstr atoi me @ "@a/stats/pre" getpropstr atoi + <= if QuashRumor else ourCrit @ if SpreadRumor else ">> You try to quash a rumor, but no one's buying it." Tell then then me @ ourCom @ TimeSet ; : DoTrash ( -- ) (* user tries to trash another's rep in a group *) CheckTime GetGroup CheckInfluence scratch @ "" "@a/rumors/" subst CapAll scratch ! begin (* begin player-finding loop *) ">> Who's reputation do you want to trash?" Tell ">> [Enter a player in the " scratch @ strcat " Group, or .q to quit]" strcat Tell ReadLine strip QCheck .pmatch dup #-1 dbcmp if ">> Player not found." Tell pop continue then dup #-2 dbcmp if ">> Ambiguous. I don't know who you mean." Tell pop continue then dup ArgoCheck not if ">> " swap name strcat " is not an Argo player." strcat Tell continue then dup "@a/skills/" scratch @ strcat " Influence" strcat GetModAbility not if ">> " swap name strcat " is not a member of the " strcat scratch @ strcat " Group." strcat Tell continue then break repeat (* end player-finding loop *) vsPlayer ! "@a/skills/" scratch @ strcat " Influence" strcat scratch ! NukeStack (* calculate user's results *) me @ scratch @ GetModAbility me @ "@a/stats/pre" getpropstr atoi + 3 6 0 Dice - (* calculate opposing player's results *) vsPlayer @ scratch @ GetModAbility vsPlayer @ "@a/stats/pre" getpropstr atoi + 3 6 0 Dice - (* compare results: put true if user succeeds *) over 0 >= if dup 0 >= if over over > over 4 <= or if 1 else 0 then else 1 then else 0 then if ourCrit @ if ">> Critical success!" Tell -2 else -1 then ">> You successfully trash " vsPlayer @ name strcat "'s reputation in the " strcat scratch @ "" "@a/skills/" subst "" " Influence" subst strcat " Group." strcat else ourCrit @ if ">> Critical failure!" Tell vsPlayer @ ">> " me @ name strcat " is trying to trash your " "reputation in the " strcat scratch @ "" "@a/skills/" subst "" " Influence" subst strcat " Group." strcat notify 1 else 0 then ">> You try to trash " vsPlayer @ name strcat "'s reputation, but no one's listening." strcat then Tell ModifyRep me @ ourCom @ TimeSet pop pop ; : DoBoost CheckTime GetGroup CheckInfluence scratch @ "" "@a/rumors/" subst CapAll scratch ! begin (* begin player-finding loop *) ">> Who's reputation do you want to boost?" Tell ">> [Enter a player in the " scratch @ strcat " Group, or .q to quit]" strcat Tell ReadLine strip QCheck .pmatch dup #-1 dbcmp if ">> Player not found." Tell pop continue then dup #-2 dbcmp if ">> Ambiguous. I don't know who you mean." Tell pop continue then dup ArgoCheck not if ">> " swap name strcat " is not an Argo player." strcat Tell continue then dup me @ dbcmp if ">> Sorry, you can't boost your own reputation." Tell pop continue then break repeat (* end player-finding loop *) vsPlayer ! "@a/skills/" scratch @ strcat " Influence" strcat scratch ! NukeStack (* calculate user's results *) me @ scratch @ GetModAbility me @ "@a/stats/pre" getpropstr atoi + 3 6 0 Dice - (* calculate opposing player's results *) vsPlayer @ scratch @ GetModAbility vsPlayer @ "@a/stats/pre" getpropstr atoi + 3 6 0 Dice - (* compare results: put true if user succeeds *) over 0 >= if dup 0 >= if over over > over 4 <= or if 1 else 0 then else 1 then else 0 then if ourCrit @ if ">> Critical success!" Tell 2 else 1 then ">> You successfully boost " vsPlayer @ name strcat "'s reputation in the " strcat scratch @ "" "@a/skills/" subst "" " Influence" subst strcat " Group." strcat else ourCrit @ if ">> Critical failure!" Tell ">> You try to modify " vsPlayer @ name strcat "'s reputation, but it does not go over well at all." strcat Tell -1 me @ vsPlayer ! ModifyRep pop pop exit else 0 then ">> You try to boost " vsPlayer @ name strcat "'s reputation, but no one's listening." strcat then Tell ModifyRep me @ ourCom @ TimeSet pop pop ; : DoInvestigate ( -- ) (* user tries to find out who started a rumor *) CheckTime GetGroup CheckInfluence ourDataObj @ scratch @ "/" strcat nextprop not if ">> Sorry, there are no currently active rumors for this Group." Tell exit then 1 ourBoolean ! (* ourBoolean true tells ListRumors to abbreviate *) begin (* begin rumor-finding loop *) ">> Which rumor do you want to investigate?" Tell ">> Enter rumor number, or .l to list, or .q to quit]" Tell ReadLine strip QCheck dup ".l" smatch if ListRumors pop continue then dup number? if dup atoi 0 <= if ">> Sorry, you must specify a positive number." Tell pop continue then GetNumRumor ourDataObj @ over getpropstr dup strlen 68 > if 68 strcut pop "..." strcat then ">> " swap strcat Tell ">> Please confirm: This is the rumor you want " "to investigate? (y/n)" strcat Tell ReadYesNo if "/instig" strcat else pop continue then then scratch ! break repeat (* end rumor-finding loop *) 3 6 0 Dice (* roll for investigation *) CheckCrits ourCrit @ if ourCrit @ 1 = if ">> Critical success!" Tell GetInstigPlayer else GetRandomPlayer then ">> You find out that " swap name strcat " started this rumor." strcat Tell me @ ourCom @ TimeSet pop exit then me @ scratch @ "@a/skills/" "@a/rumors/" subst dup "/" rinstr 1 - strcut pop dup "/" rinstr 1 - strcut pop " Influence" strcat GetModAbility me @ "@a/stats/pre" GetModAbility + <= if ">> You find out that " GetInstigPlayer name strcat " started this rumor." strcat Tell else ">> You are unable to determine who started this rumor." Tell then me @ ourCom @ TimeSet ; : 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 Install else "#uninstall" ourArg @ stringpfx if DoUninstall else ">> #Argument not understood." Tell then then then then then then exit then then me @ ArgoPermCheck Disabled? DeadCheck ourCom @ "+rumors" smatch if DoRumors else ourCom @ "+gossip" smatch if DoGossip else ourCom @ "+spread" smatch if DoSpread else ourCom @ "+quash" smatch if DoQuash else ourCom @ "+trash" smatch if DoTrash else ourCom @ "+boost" smatch if DoBoost else ourCom @ "+investigate" smatch if DoInvestigate else ">> Command not understood." Tell then then then then then then then ; . c q @set asys-rumors=W