@q @program asys-roll 1 99999 d i ( asys-roll v1.2 Jessy @ FurryMUCK 6/97, 2/99 asys-roll runs the Argo +prove and +roll commands, used to compare characters' abilities, or to make rolls against them, respectively. INSTALLATION: asys-roll 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: +prove []] [to ] +roll []] [to ] The command syntax looks complex when expressed formally like this, but in practice it is fairly flexible and intuitive. In general, construct and imperative English sentence that expresses what you want to prove or roll; the command will most likely be able to parse your input, ranging from something as simple as... +roll str to something as complex as... +prove that my concealment ability is higher than Mistral's, to Cain, Able, and Monitor1. See lib-argo and the Argo Manual for further information. asys-rolls may be freely ported. Please comment any changes. ) (2345678901234567890123456789012345678901234567890123456789012345678901) $def thisVersion "1.2" $define Tell me @ swap notify $enddef $include $lib/argo $include $lib/reflist 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 *) lvar ourString (* stores input from keyboard *) lvar ourBoolean (* use for true/false checks *) lvar ourProp (* user's prop to prove/roll against *) lvar ourFormat (* ourProp formatted for output; ability name *) lvar ourValue (* user's value for ourProp *) lvar ourModifier (* stores die-roll modifier *) lvar tellPlayers (* players to be notified; store as string of dbrefs *) lvar vsPlayer (* dbref of player to prove/roll against *) lvar vsProp (* vsPlayer's prop to prove/roll against *) lvar vsFormat (* vsProp formatted for output; ability name *) lvar vsValue (* target player's value for vsProp *) lvar atLeast (* true if prove is in 'at least' format *) lvar ourCrit (* i: 1 = crit succ; 0 = normal; -1 = crit fail *) lvar ourObject (* dbref: object to prove *) : 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-roll" setprop #0 "@a/prog_list/" prog name strcat prog setprop RecOldActions #0 "+roll" newexit dup scratch ! (* create command *) prog setlink prog "@a/version" thisVersion setprop (* set version *) scratch @ "@a/version" thisVersion setprop #0 "@a/comm_list/+roll" scratch @ setprop #0 "@a/prog_list/" prog name strcat prog setprop scratch @ "@a/name" "+roll" setprop #0 "+prove" newexit dup scratch ! (* create command *) prog setlink scratch @ "@a/version" thisVersion setprop (* set version *) #0 "@a/comm_list/+prove" scratch @ setprop scratch @ "@a/name" "+prove" setprop ">> Installed." Tell ; : DoUninstall ( -- ) (* uninstall program from Argo *) ">> Please confirm: You wish to uninstall " (* confirm *) prog name strcat "?" strcat Tell ReadLine not if ">> Aborted." Tell pid kill Then background "@a/comm_list/+roll" RemoveCommand "@a/comm_list/+prove" RemoveCommand #0 "@a/prog_list/" prog "@a/name" getpropstr strcat remove_prop RecOldActions ">> Uninstalled. Please edit the online manuals as appropriate." Tell ; : DoHelp ( -- ) (* display help screen *) " " Tell "asys-roll (#" prog intostr strcat ")" strcat Tell " " Tell ourCom @ "+prove" smatch if "The $command command is used to display your level for a specified " "Ability, to prove that your level for an Ability is at least " "a certain value, to comapre your level for an Ability to that " "of another player, to prove that an object you're carrying is " "an Argo object, or to prove that it is an object of a specified " "name or class. The syntax is that of an English imperative " "sentence. Punctuation and 'helper words' can be included, but are " "not required." strcat strcat strcat strcat strcat strcat strcat command @ "$command" subst Tell " " Tell "Syntax:" Tell " " Tell " $command []] [to ]" command @ "$command" subst Tell " $command [is|is at least X] [to ]" command @ "$command" subst Tell " $command [is|are|is a|is an ] [to ]" command @ "$command" subst Tell " " Tell "Examples:" Tell " " Tell " $command str" command @ "$command" subst Tell " $command my Presence is at least 9." command @ "$command" subst Tell " $command that my Concealment ability is higher than Mistral's " "Intelligence, " strcat command @ "$command" subst Tell " to Cain, Able, and Monitor1." Tell " $command sword" command @ "$command" subst Tell " $command sword is a long sword" command @ "$command" subst Tell " $command that Orcrist is a melee weapon, to Gandalf and Bilbo." command @ "$command" subst Tell else "The " command @ strcat " command is used to make an Argo roll, either for one of your abili" "ties, or for one of your abilities versus another player's ability." " The results can either be shown to the room (the default) or to se" "lected players. The syntax is:" strcat strcat strcat strcat Tell " " Tell "+roll []] [to ]" Tell " " Tell "Although the syntax looks complex when expressed formally like this" ", in practice it is relatively intuitive and flexible. As a general" " rule, construct an imperative English sentence expressing what you" " want to roll for, and--optionally--who you want to roll against; t" "he command should be able to parse your input. All of the following" " would be valid examples:" strcat strcat strcat strcat strcat Tell " " Tell " $command str" command @ "$command" subst Tell " $command conversation vs Jessy" command @ "$command" subst Tell " $command my concealment ability against Mistral's Intelligence, " command @ "$command" subst Tell " to Cain, Able, and Monitor1." Tell then ; : ParseNames ( -- i )(* convert string of names to string of dbrefs *) (* return true if we found some *) (* get rid of 'and', in case it's still here *) tellPlayers @ " " " and " subst tellPlayers ! (* build a concatted string of dbrefs of players to tell *) (* ourBoolean will control whether a 'tell' loop is needed *) 0 ourBoolean ! tellPlayers @ " " instr if tellPlayers @ " " explode ourCounter ! "" tellPlayers ! begin (* begin dbref-finding loop *) ourCounter @ while dup strip .pmatch dup not if pop ">> Player " swap Capitalize strcat " not found." strcat Tell else dup location me @ location dbcmp not if ">> " swap name strcat " is not here." strcat Tell ourCounter @ 1 - ourCounter ! pop continue then dup awake? not if ">> " swap name strcat " is not online." strcat Tell ourCounter @ 1 - ourCounter ! pop continue then dup location loc @ dbcmp not if ">> " swap name strcat " is not here." strcat Tell ourCounter @ 1 - ourCounter ! pop continue then ourBoolean @ 1 + ourBoolean ! ourBoolean @ 2 >= if intostr " " swap strcat tellPlayers @ swap strcat tellPlayers ! else intostr tellPlayers @ swap strcat tellPlayers ! then pop then ourCounter @ 1 - ourCounter ! repeat (* end dbref-finding loop *) else (* do it this way for only one player to tell *) tellPlayers @ .pmatch dup if dup awake? if dup location me @ location dbcmp if intostr tellPlayers ! 1 ourBoolean ! else ">> " swap name strcat " is not here." strcat Tell 0 ourBoolean ! then else ">> " swap name strcat " is not online." strcat Tell 0 ourBoolean ! then else ">> Player " tellPlayers @ strcat " not found." strcat Tell pop 0 ourBoolean ! then then ourBoolean @ ; : DoTell ( -- ) (* tell results to room or selected players *) tellPlayers @ if (* this is the to-somebody version *) tellPlayers @ " " explode dup 1 = if pop tellPlayers @ atoi dbref ourString @ " (to you)" strcat tellPlayers @ atoi dbref "@a/store/veron" getpropstr if tellPlayers @ atoi dbref "@a/store/verstring" getpropstr strcat then notify ourString @ " (to " strcat swap atoi dbref name strcat ")" strcat Tell exit else ourString @ " (to " strcat ourString ! ourCounter ! begin (* begin name-getting loop *) ourCounter @ while atoi dbref name ourCounter @ 1 = if "and " swap strcat then ourCounter @ 3 >= if "," strcat then ourCounter @ 1 > if " " strcat then ourString @ swap strcat ourString ! ourCounter @ 1 - ourCounter ! repeat (* end name-getting loop *) ourString @ ")" strcat then ourString ! (* store built string *) ourString @ Tell else (* this way to tell whole room *) "" tellPlayers ! me @ location contents begin dup while ourDataObj @ "@a/temp/$me/telllist" me @ intostr "$me" subst 3 pick REF-add next repeat pop ourDataObj @ "@a/temp/$me/telllist" me @ intostr "$me" subst getpropstr strip "" "#" subst tellPlayers ! then tellPlayers @ " " explode ourCounter ! (* notify *) begin (* begin tell loop *) ourCounter @ while atoi dbref ourString @ over "@a/store/veron" getpropstr if over me @ dbcmp not if over "@a/store/verstring" getpropstr strcat then then notify ourCounter @ 1 - ourCounter ! repeat (* end tell loop *) ; : GetDefaultInfo ( -- )(* player or vsplayer does not have ability *) (* try to find it on library *) scratch ! ourDataObj @ "@a/skills/" scratch @ strcat getpropstr if "@a/skills/" scratch @ strcat else ourDataObj @ "@a/spells/" scratch @ strcat getpropstr if "@a/spells/" scratch @ strcat else ourDataObj @ "@a/psiabs/" scratch @ strcat getpropstr if "@a/psiabs/" scratch @ strcat else ourDataObj @ "@a/langus/" scratch @ strcat getpropstr if "@a/langus/" scratch @ strcat else ourDataObj @ "@a/dis-ad/" scratch @ strcat getpropstr if "@a/dis-ad/" scratch @ strcat else ">> Ability not found." Tell pid kill then then then then then (* check: is it a no default ability? *) dup "@a/spells/" instr over "@a/psiabs/" instr or if ">> " scratch @ CapAll strcat " may not be attempted if you do not know it." strcat Tell pop pid kill then ourBoolean @ not if ourDataObj @ over "/nodef" strcat getpropstr if ">> " scratch @ CapAll strcat " may not be attempted if you do not know it." strcat Tell pop pid kill then then (* store results *) ourBoolean @ if vsProp ! scratch @ CapAll vsFormat ! -1 vsValue ! else ourProp ! scratch @ CapAll ourFormat ! -1 ourValue ! then ; : GetAbility ( d s -- s ) (* find player d's level for s *) (* store vars needed to make roll later *) over ArgoCheck not if pop dup me @ dbcmp if ">> You need to go through setup before using this command." else ">> " swap name strcat " is not an Argo player." strcat then Tell pid kill then (* check: is it a skill? *) over over "@a/skills/" swap strcat GetModAbility if over over "@a/skills/" swap strcat GetModAbility ourDataObj @ "@a/skills/" 4 pick strcat getpropstr "," explode pop swap pop swap pop dup "phy" smatch if pop 3 pick GetPhysSkill atoi + else dup "cra" smatch if pop 3 pick GetCraftSkill atoi + else "@a/stats/" swap strcat 4 pick swap getpropstr atoi + then then ourBoolean @ if vsValue ! else ourValue ! then "@a/skills/" over strcat ourBoolean @ if vsProp ! else ourProp ! then CapAll ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! else pop then else (* check: is it a spell? *) over over "@a/spells/" swap strcat GetModAbility if over over "@a/spells/" swap strcat GetModAbility ourDataObj @ "@a/spells/" 4 pick strcat getpropstr "," explode pop swap pop swap pop "@a/stats/" swap strcat 4 pick swap getpropstr atoi + ourBoolean @ if vsValue ! else ourValue ! then "@a/spells/" over strcat ourBoolean @ if vsProp ! else ourProp ! then CapAll ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! else pop then else (* check: is it a psiab? *) over over "@a/psiabs/" swap strcat GetModAbility if over over "@a/psiabs/" swap strcat GetModAbility ourDataObj @ "@a/psiabs/" 4 pick strcat getpropstr "," explode pop swap pop swap pop "@a/stats/" swap strcat 4 pick swap getpropstr atoi + ourBoolean @ if vsValue ! else ourValue ! then "@a/psiabs/" over strcat ourBoolean @ if vsProp ! else ourProp ! then CapAll ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! else pop then else (* check: is it a language? *) over over "@a/langus/" swap strcat GetModAbility if over over "@a/langus/" swap strcat GetModAbility ourDataObj @ "@a/langus/" 4 pick strcat getpropstr "," explode pop swap pop swap pop "@a/stats/" swap strcat 4 pick swap getpropstr atoi + ourBoolean @ if vsValue ! else ourValue ! then "@a/langus/" over strcat ourBoolean @ if vsProp ! else ourProp ! then CapAll ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! else pop then else (* check: is it a dis-ad? *) over over "@a/dis-ad/" swap strcat GetModAbility if over over "@a/dis-ad/" swap strcat GetModAbility ourBoolean @ if vsValue ! else ourValue ! then "@a/dis-ad/" over strcat ourBoolean @ if vsProp ! else ourProp ! then CapAll ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! else pop then else (* check: is it a stat? *) over over "@a/stats/" swap MatchStat strcat GetModAbility if over over "@a/stats/" swap MatchStat strcat GetModAbility ourBoolean @ if vsValue ! else ourValue ! then "@a/stats/" over MatchStat strcat ourBoolean @ if vsProp ! else ourProp ! then UnAbbreviateStat CapAll ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! else pop then else (* check: physical skill? *) "physical" over stringpfx if over GetPhysSkill atoi ourBoolean @ if vsValue ! else ourValue ! then "@a/temp" ourBoolean @ if vsPlayer @ "@a/temp" vsValue @ setprop vsProp ! pop else ourProp ! then "Physical" ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! "popthis" else pop then pop else (* check: craft skill? *) "craft" over stringpfx if over GetCraftSkill atoi ourBoolean @ if vsValue ! else ourValue ! then "@a/temp" ourBoolean @ if vsPlayer @ "@a/temp" vsValue @ setprop vsProp ! pop else ourProp ! then "Craft" ourBoolean @ if vsFormat ! else ourFormat ! then ourBoolean @ if vsPlayer ! "popthis" else pop then pop else (* player doesn't have it; check lib -- is it defined? *) swap pop GetDefaultInfo then then then then then then then then ; : GetVsInfo ( -- ) (* get ability info for player to roll against *) vsPlayer @ " " instr dup if vsPlayer @ swap strcut strip swap strip FindOther dup vsPlayer ! dup "@a/version" getpropstr not if ">> " swap name strcat " is not an Argo player." strcat Tell pid kill then swap GetAbility else pop vsPlayer @ strip FindOther dup vsPlayer ! dup "@a/version" getpropstr not if ">> " swap name strcat " is not an Argo player." strcat Tell pid kill then ourFormat @ GetAbility then ; : CheckCrits ( i -- i ) (* stores crit value in ourCrit, based on die roll i *) ourValue @ -1 = if dup 6 < over 21 > or if 1 else 0 then else dup 3 = over 4 = or if 1 else dup 17 = over 18 = or if -1 else 0 then then then ourCrit ! ; : DoStraightRoll ( s -- ) (* make a die roll, not against stat *) (* parse die-roll params *) ourBoolean @ if (* ourBoolean is true if we're doing percentiles *) 1 100 else (* parse input string *) ourString @ "" " " subst dup "-" rinstr dup if (* ... modifier *) 1 - strcut strip dup number? if atoi ourModifier ! else ">> Unable to parse." Tell exit then else pop then dup "+" rinstr dup if 1 - strcut strip dup number? if atoi ourModifier ! else ">> Unable to parse." Tell exit then else pop then dup "d" rinstr if (* num dice and num sides *) "d" explode 2 = if strip swap strip swap dup number? not if ">> Unable to parse." Tell pop pop exit then over number? not if ">> Unable to parse." Tell pop pop exit then atoi swap atoi else ">> Unable to parse." Tell pop exit then else atoi 6 then then ourModifier @ (* put modifier on stack *) (* check: over a reasonable max? *) 3 pick 1000 > if ">> Sorry, maximum number of dice is 1000." Tell pop pop pop exit then (* dup dice args; one copy for Dice and one for formatting *) 3 pick 3 pick 3 pick Dice (* construct output string based on results *) ">> " me @ name strcat (* name, verb *) " rolls " strcat ourBoolean @ if "" else (* a-an stuff *) over intostr dup strlen 3 <= if "{8*|11|18}" smatch if "an " else "a " then then then strcat swap intostr strcat (* result *) " on " strcat ourBoolean @ if (* dice type *) "percentiles" strcat ourString ! pop pop pop DoTell exit then 4 pick intostr SpellNum strcat " " strcat rot intostr strcat "-sided " strcat rot 1 = if "die" else "dice" then strcat (* note modifier*) ourModifier @ if ", with a " strcat ourModifier @ 0 > if "+" strcat then ourModifier @ intostr strcat " modifier" strcat then (* notify *) ourString ! DoTell ; : DoPercentile ( -- ) (* roll percentiles *) 1 ourBoolean ! DoStraightRoll ; : DoProve ( -- ) (* prove a player's ability *) vsPlayer @ if (* check: vsPlayer awake? *) vsPlayer @ awake? not if ">> " vsPlayer @ name strcat " is not online." strcat Tell exit then then (* begin constructing output string and examining vals *) ">> " me @ name strcat "'s " strcat ourProp @ "/stats/" instr if ourFormat @ strcat else ourProp @ "/skills/" instr if ourFormat @ " skill" strcat else ourProp @ "/dis-ad/" instr if ourValue @ atoi 0 < if ourFormat @ " disadvantage" strcat else ourFormat @ " advantage" strcat then else ourFormat @ " ability" strcat then then strcat then " is " strcat ourString ! (* 'at least' format *) atLeast @ if ourValue @ atLeast @ atoi >= not if ">> False. You can't prove that." Tell exit else ourString @ "at least " strcat atLeast @ strcat ourString ! DoTell exit then then (* versuse format *) vsPlayer @ if ourString @ ourValue @ vsValue @ > if "higher than " strcat vsPlayer @ name strcat "'s " strcat ourFormat @ vsFormat @ smatch not if vsFormat @ strcat vsProp @ "/stats/" instr not if vsProp @ "/skills/" instr if " skill" else " ability" then strcat then then else ourValue @ vsValue @ = if "equal to " strcat vsPlayer @ name strcat "'s " strcat ourFormat @ vsFormat @ smatch not if vsFormat @ strcat vsProp @ "/stats/" instr not if vsProp @ "/skills/" instr if " skill" else " ability" then strcat then then else "less than " strcat vsPlayer @ name strcat "'s " strcat ourFormat @ vsFormat @ smatch not if vsFormat @ strcat vsProp @ "/stats/" instr not if vsProp @ "/skills/" instr if " skill" else " ability" then strcat then then then then ourString ! DoTell exit then (* straight format *) ourString @ ourValue @ -1 = if "negligable" else ourValue @ intostr then strcat ourString ! DoTell ; : DoRoll ( -- ) (* make an Argo roll *) vsPlayer @ if vsPlayer @ awake? not if ">> " vsPlayer @ name strcat " is not online." strcat Tell exit then then (* check: roll doesn't make sense for a dis-ad *) ourProp @ "/dis-ad/" instr if ">> Sorry, you cannot roll against " ourValue @ atoi 0 < if "a Disadvantage." else "an Advantage." then strcat Tell exit then (* user's name... *) ">> " me @ name strcat ourString ! (* put roll params on stack. ex: 3 6 0 *) ourValue @ -1 = if (* this way if player doesn't have ability *) 4 else 3 then 6 0 (* roll it *) Dice CheckCrits ourModifier @ if (* apply modifier after crit check *) ourModifier @ - then GetRoomMods - (* format output *) ourValue @ -1 = if me @ ourDataObj @ ourProp @ getpropstr "," explode pop rot pop me @ "@a/stats/" rot strcat getpropstr atoi me @ "@a/stats/int" getpropstr atoi rot atoi - dup 0 < if + else pop then ourValue ! pop then dup ourValue @ > if pop " fails " ourString @ 1 strcut pop "{a|e|i|o|u}" smatch if "an " else "a " then strcat else vsPlayer @ if (* roll for vsPlayer if applicable *) vsValue @ -1 = if 4 else 3 then 6 0 Dice dup 17 = over 18 = or if pop " makes a successful " else dup 3 = over 4 = or if pop " fails " ourString @ 1 strcut pop "{a|e|i|o|u}" smatch if "an " else "a " then strcat else GetRoomMods - dup vsValue @ > if pop pop " makes a successful " else ourValue @ 3 pick - vsValue @ 3 pick - <= if pop " fails " ourString @ 1 strcut pop "{a|e|i|o|u}" smatch if "an " else "a " then strcat else pop " makes a successful " then then then then else pop " makes a successful " then then ourString @ swap strcat ourFormat @ strcat " roll" strcat ourString ! vsPlayer @ if ourString @ " against " strcat vsPlayer @ name strcat ourString ! vsProp @ ourProp @ smatch not if ourString @ "'s " strcat vsFormat @ strcat vsProp @ "/stats/" instr not if vsProp @ "/skills/" instr if " skill" else " ability" then strcat then ourString ! then then (* notify if a critical *) ourCrit @ if ourString @ " [CRITICAL]" strcat ourString ! then (* add modifier note *) ourModifier @ if ourString @ " (Mod " strcat ourModifier @ 0 > if "+" strcat then ourModifier @ intostr strcat ")" strcat ourString ! then (* notify *) DoTell ; : DoProveObj ( -- ) (* prove an object *) ">> " me @ name strcat "'s " strcat (* start of output string... *) ourObject @ name strcat " is " strcat (* check: is it an Argo object? *) ourObject @ "@a/version" getpropstr not if "not an Argo object." (* if not, say so... *) else atLeast @ if (* check class if needed *) atLeast @ "" "is an " subst "" "is a " subst "" "is " subst "" "a " subst "" "an " subst "" "are " subst "" "class " subst dup "weapon" smatch if pop "Weapons" then strip atLeast ! ourObject @ "@a/name" getpropstr atLeast @ smatch if atLeast @ CapAll A-An "." strcat else ourDataObj @ "@a/objects/$object/class/$class" ourObject @ "@a/name" getpropstr CapAll "$object" subst atLeast @ "$class" subst getpropstr if "an Argo object of class $class." atLeast @ CapAll "$class" subst else "an Argo object." then then else "an Argo object." then then strcat ourString ! DoTell ; : DoParse ( s -- ) (* parse args *) ourArg @ not if (* default is a straight roll *) "3d6" ourString ! DoStraightRoll exit then ourArg @ CleanString ourString ! (* check 'to' syntax *) ourString @ not if ">> Syntax: " Tell " " command @ strcat " [vs ] [players' stat or ability]" " [to ]" strcat strcat Tell exit then ourString @ "to *" smatch if ">> Syntax: The players that you want to show the results to need" Tell " to come at the end of the command." Tell ">> Example: " command @ strcat " my dex vs Cain to Able" strcat Tell exit then (* strip off some uninformative prefixes *) ourString @ "against my *" smatch if ourString @ 11 strcut swap pop ourString ! then ourString @ "against *" smatch if ourString @ 8 strcut swap pop ourString ! then ourString @ "that my *" smatch if ourString @ 8 strcut swap pop ourString ! then ourString @ "my *" smatch if ourString @ 3 strcut swap pop ourString ! then ourString @ "skill with *" smatch if ourString @ 11 strcut swap pop ourString ! then ourString @ "ability with *" smatch if ourString @ 13 strcut swap pop ourString ! then (* store players to tell *) ourString @ "* to *" smatch if ourString @ " to " explode pop swap strip tellPlayers ! strip ourString ! then (* check for 'at least' format; store value to prove *) ourString @ "* is at least *" smatch if ourString @ " is at least " explode pop strip ourString ! strip UnSpellNum atLeast ! then (* store any modifiers *) ourString @ "* at *" smatch if ourString @ " at " explode pop swap strip dup number? if atoi else ">> Sorry, the modifier you included is not a number." Tell pop exit then ourModifier ! strip ourString ! then (* store name of player rolling against *) ourString @ "* versus *" smatch if ourString @ " versus " explode pop swap strip vsPlayer ! strip ourString ! then ourString @ "* vs *" smatch if ourString @ " vs " explode pop swap strip vsPlayer ! strip ourString ! then ourString @ "* is higher than *" smatch if ourString @ " is higher than " explode pop swap strip vsPlayer ! strip ourString ! then ourString @ "* is lower than *" smatch if ourString @ " is lower than " explode pop swap strip vsPlayer ! strip ourString ! then ourString @ "* against *" smatch if ourString @ " against " explode pop swap strip vsPlayer ! strip ourString ! then (* take care of a couple special cases *) ourString @ "* is *" smatch if ourString @ " is " explode pop strip ourString ! strip UnSpellNum atLeast ! then ourString @ "* is" smatch if ourString @ dup strlen 3 - strcut pop strip ourString ! then (* get players to tell; exit if none are found *) tellPlayers @ if ParseNames not if exit then then (* finish parsing arg *) ourString @ "* skill" smatch ourString @ "* spell" smatch or if ourString @ dup strlen 6 - strcut pop ourString ! then ourString @ "* ability" smatch if ourString @ dup strlen 8 - strcut pop ourString ! then (* check: are we proving an object? If so, handle in DoProveObj *) ourCom @ "+prove" smatch if ourString @ match dup #-1 dbcmp over #-2 dbcmp or not if dup thing? if ourObject ! DoProveObj exit then then then ourString @ UnAbbreviateStat CapAll ourFormat ! "percentiles" ourString @ stringpfx if DoPercentile exit else 0 ourBoolean ! then ourString @ 1 strcut pop number? if DoStraightRoll exit then 0 ourBoolean ! me @ ourString @ GetAbility vsPlayer @ if 1 ourBoolean ! GetVsInfo then ourCom @ "+roll" smatch if DoRoll else DoProve 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 DoParse ; . c q @set asys-roll=W