@program #996 1 1000 d i ( New sheet - Alynna Trypnotk 2002 ) $include $lib/strings $include $lib/alynna $include $lib/rp $include $lib/case $def notify ansi_notify $def ptellme me @ "_prefs/shprefix" getprop dup if tostr swap strcat tellme else pop tellme then lvar page lvar target lvar cur lvar count lvar linestore lvar short : MakeDots ( i i -- s } Chars long, Position of dot ) "" -3 rotate 0 begin ( s chars dot count ) 3 pick over = not while over over 1 + = if "*^BBLACK^" else "-" then 5 rotate swap strcat -4 rotate 1 + repeat pop pop pop "^BGREEN^^WHITE^" swap strcat "^NORMAL^" strcat ; : MakeDie ( i -- s ) dup 1 < if pop "20" 0 then dup 1 = if pop "20" 0 then dup 2 = if pop "12" 0 then dup 3 = if pop "10" 0 then dup 4 = if pop "8" 0 then dup 5 = if pop "6" 0 then dup 5 > if pop "4" 0 then pop "1d" swap strcat ; : Racial ( Shin/Fox Animae RR 4 CP 13 Racial Die 1d6 .1 .41 .50 .60rj .78 ) str ( Race/Species 1-40 ) str target @ "@rp/race" getpropstr "/" target @ "@rp/species" getpropstr cat 40 lj ( Racial Rank 41-50 ) str "RR ^YELLOW^" target @ "@rp/Racial-Rank" getpropstr dup not if pop "0" then "^NORMAL^" cat 10 lj ( CP 51-60 ) str "CP ^CYAN^" target @ "@rp/xp" getprop target @ "@rp/xpspent" getprop - 100 / dup not if pop "0" then dup int? if intostr then 5 rj "^NORMAL^" cat 10 lj ( Racial Die 60-78 right justified ) str " Racial Die ^YELLOW^" target @ "@rp/Racial-Rank" getpropstr atoi dup not if pop "0" 0 then dup 1 = if pop "10" 0 then dup 2 = over 3 = or if pop "8" 0 then dup 4 = over 5 = or if pop "6" 0 then dup 5 > if pop "4" 0 then pop "1d" swap "^NORMAL^" cat 18 rj cat ptellme ; : Stats str ( Line 1 ) str ( Body section ) "Body" 8 rj ": ^BGREEN^^WHITE^|" 6 target @ "@rp/Body" getpropstr atoi MakeDots "^BBLACK^^WHITE^|^NORMAL^^YELLOW^ " target @ "@rp/Body" getpropstr "^NORMAL^ + ^BGREEN^^WHITE^|^NORMAL^" 2 target @ "@rp/Bodyplus" getpropstr atoi MakeDots "^BBLACK^^WHITE^|^NORMAL^^YELLOW^ " target @ "@rp/Bodyplus" getpropstr dup not if pop "0" then strcat "^NORMAL^ = " strcat target @ "@rp/Body" getpropstr atoi target @ "@rp/Bodyplus" getpropstr atoi + MakeDie 4 .left "^YELLOW^" swap "^NORMAL^" cat 40 lj ( Essence Indicator ) str "Essence: ^GREEN^" target @ "@rp/essence" getpropval "^NORMAL^/^YELLOW^" target @ "@rp/Body" getpropstr atoi target @ "@rp/Bodyplus" getpropstr atoi + target @ "@rp/Mind" getpropstr atoi + target @ "@rp/Mindplus" getpropstr atoi + target @ "@rp/Spirit" getpropstr atoi + target @ "@rp/Spiritplus" getpropstr atoi + target @ "@rp/boon/Quickened/?" getpropstr "yes" stringcmp not if 2 * then "^NORMAL^" cat 38 lj cat ptellme str ( Line 2 ) ( Mind Section ) str "Mind" 8 rj ": ^BGREEN^^WHITE^|" 6 target @ "@rp/Mind" getpropstr atoi MakeDots "^BBLACK^^WHITE^|^NORMAL^^YELLOW^ " target @ "@rp/Mind" getpropstr "^NORMAL^ + ^BGREEN^^WHITE^|^NORMAL^" 2 target @ "@rp/Mindplus" getpropstr atoi MakeDots "^BBLACK^^WHITE^|^NORMAL^^YELLOW^ " target @ "@rp/Mindplus" getpropstr dup not if pop "0" then strcat "^NORMAL^ = " strcat target @ "@rp/Mind" getpropstr atoi target @ "@rp/Mindplus" getpropstr atoi + MakeDie 4 .left "^YELLOW^" swap "^NORMAL^" cat 40 lj ( Essence Bar ) str "^BGREEN^^WHITE^|" target @ "@rp/Body" getpropstr atoi target @ "@rp/Bodyplus" getpropstr atoi + target @ "@rp/Mind" getpropstr atoi + target @ "@rp/Mindplus" getpropstr atoi + target @ "@rp/Spirit" getpropstr atoi + target @ "@rp/Spiritplus" getpropstr atoi + target @ "@rp/boon/Quickened/?" getpropstr "yes" stringcmp not if 2 * then target @ "@rp/essence" getpropval makedots "^BBLACK^^WHITE^|^NORMAL^" cat 38 lj cat ptellme str str ( Spirit Section ) "Spirit" 8 rj ": ^BGREEN^^WHITE^|" 6 target @ "@rp/Spirit" getpropstr atoi MakeDots "^BBLACK^^WHITE^|^NORMAL^^YELLOW^ " target @ "@rp/Spirit" getpropstr "^NORMAL^ + ^BGREEN^^WHITE^|^NORMAL^" 2 target @ "@rp/Spiritplus" getpropstr atoi MakeDots "^BBLACK^^WHITE^|^NORMAL^^YELLOW^ " target @ "@rp/Spiritplus" getpropstr dup not if pop "0" then strcat "^NORMAL^ = " strcat target @ "@rp/Spirit" getpropstr atoi target @ "@rp/Spiritplus" getpropstr atoi + MakeDie 4 .left "^YELLOW^" swap "^NORMAL^" cat 40 lj str "^GREEN^Natures: ^CYAN^" target @ "nature" getstat dup if tostr ", " ":" subst else pop "None set." then "^NORMAL^" cat 38 lj cat ptellme ; : Skills -1 count ! "" linestore ! target @ "@rp/skill/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/skill/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Skill ) cur @ "" "@rp/skill/" subst capitalize 20 lj ( Level ) target @ cur @ "/level" strcat getprop toint not if " ^GREEN^No rank^NORMAL^" 16 lj else " ^GREEN^Rank " target @ cur @ "/level" strcat getpropstr atoi intostr 1 lj "^NORMAL^ " str "(^CYAN^1d" target @ cur @ "/level" strcat getpropstr atoi ldie "^NORMAL^) " cat 8 lj then ( Focus ) target @ cur @ "/focus" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : Qualities -1 count ! "" linestore ! target @ "@rp/quality/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/quality/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Quality ) cur @ "" "@rp/quality/" subst capitalize 23 lj " " ( Level ) str "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi intostr " Essence^NORMAL^" cat 10 rj " " ( Special ) target @ cur @ "/special" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : Abilities -1 count ! "" linestore ! target @ "@rp/ability/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/ability/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Skill ) cur @ "" "@rp/ability/" subst capitalize 20 lj target @ cur @ "/level" strcat getprop toint not if " ^GREEN^No rank^NORMAL^" 16 lj else " ^GREEN^Rank " target @ cur @ "/level" strcat getpropstr atoi intostr 1 lj "^NORMAL^ " str "(^CYAN^1d" target @ cur @ "/level" strcat getpropstr atoi ldie "^NORMAL^) " cat 8 lj then ( Special ) target @ cur @ "/special" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : Spells -1 count ! "" linestore ! target @ "@rp/spellbook/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/spellbook/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Skill ) cur @ "" "@rp/spellbook/" subst capitalize 20 lj target @ cur @ "/level" strcat getprop toint not if " ^GREEN^No rank^NORMAL^" 16 lj else " ^GREEN^Rank " target @ cur @ "/level" strcat getpropstr atoi intostr 1 lj "^NORMAL^ " str "(^CYAN^1d" target @ cur @ "/level" strcat getpropstr atoi ldie "^NORMAL^) " cat 8 lj then ( Focus ) target @ cur @ "/focus" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : Boons -1 count ! "" linestore ! target @ "@rp/boon/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/boon/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Skill ) cur @ "" "@rp/boon/" subst capitalize 20 lj target @ cur @ "/level" strcat getprop toint not if " ^GREEN^No rank^NORMAL^" 16 lj else " ^GREEN^Rank " target @ cur @ "/level" strcat getpropstr atoi intostr 1 lj "^NORMAL^ " str "(^CYAN^1d" target @ cur @ "/level" strcat getpropstr atoi ldie "^NORMAL^) " cat 8 lj then ( Special ) target @ cur @ "/special" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : Kata -1 count ! "" linestore ! target @ "@rp/kata/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/kata/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Skill ) cur @ "" "@rp/kata/" subst capitalize 20 lj ( Level ) target @ cur @ "/level" strcat getprop toint not if " ^GREEN^No rank^NORMAL^" 16 lj else " ^GREEN^Rank " target @ cur @ "/level" strcat getpropstr atoi intostr 1 lj "^NORMAL^ " str "(^CYAN^1d" target @ cur @ "/level" strcat getpropstr atoi ldie "^NORMAL^) " cat 8 lj then ( Focus ) target @ cur @ "/special" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : Banes -1 count ! "" linestore ! target @ "@rp/bane/" nextprop begin dup while cur ! short @ if count @ 1 + count ! linestore @ str "^YELLOW^" cur @ "" "@rp/bane/" subst capitalize 19 lj "^GREEN^" target @ cur @ "/level" strcat getpropstr atoi "^NORMAL^/" "^CYAN^d" target @ cur @ "/level" strcat getpropstr atoi ldie intostr 2 lj "^NORMAL^ " cat strcat linestore ! count @ 3 % 2 = if linestore @ ptellme "" linestore ! then else str ( Skill ) cur @ "" "@rp/bane/" subst capitalize 20 lj target @ cur @ "/level" strcat getprop toint not if " ^GREEN^No rank^NORMAL^" 16 lj else " ^GREEN^Rank " target @ cur @ "/level" strcat getpropstr atoi intostr 1 lj "^NORMAL^ " str "(^CYAN^1d" target @ cur @ "/level" strcat getpropstr atoi ldie "^NORMAL^) " cat 8 lj then ( Special ) target @ cur @ "/special" strcat getpropstr dup if ", " ":" subst "^YELLOW^" swap "^NORMAL^" else pop then cat ptellme then target @ cur @ nextprop repeat pop short @ if count @ 3 % 2 < if linestore @ ptellme "" linestore ! then then ; : help "New sheet by Alynna Trypnotk (C) 2002" .tell "Based on Nilesta's sheet, which was based on my MPI sheet." .tell " " .tell "Format:" .tell " sheet See your own Sheet" .tell " sheet [name] See another persons sheet, if it isn't private" .tell " " .tell "Typing '/page' after either command above will pause the sheet" .tell "between sections. Wizards may view any sheet, regardless of" .tell "privacy." .tell " " .tell "Props on yourself:" .tell "_prefs/sheet/private? -- If set 'yes' makes your sheet private" .tell "_prefs/sheet/page? -- If set 'yes' defaults to a /page" .tell " " .tell ; : main dup "#help" stringcmp not if help exit then command @ "ssheet" smatch if 1 short ! then 0 page ! dup "/page" instr if "" "/page" subst strip 1 page ! then me @ "_prefs/sheet/page?" getpropstr "yes" stringcmp not if 1 page ! then dup not if pop me @ target ! else .pmatch dup target ! ok? not if "Invalid argument." .tell exit then target @ "_prefs/sheet/private?" getpropstr "yes" stringcmp not me @ "W" flag? not and if "That person has set their sheet private." .tell exit then then ( Name ) target @ me @ "W" flag? if unparseobj else name then header ptellme Racial "Stats" header ptellme Stats page @ if "[Press return to continue]" .tell read pop then "Skills" header ptellme Skills page @ if "[Press return to continue]" .tell read pop then "Spells" header ptellme Spells page @ if "[Press return to continue]" .tell read pop then "Kata" header ptellme Kata page @ if "[Press return to continue]" .tell read pop then "Qualities" header ptellme Qualities page @ if "[Press return to continue]" .tell read pop then "Abilities" header ptellme Abilities page @ if "[Press return to continue]" .tell read pop then "Boons" header ptellme Boons page @ if "[Press return to continue]" .tell read pop then "Banes" header ptellme Banes "Fools Moon RPsystem Sheet 3.0 by Alynna" footer ptellme ; . c q