@program #3010 1 1000 d i $include $ansihack $def rpsystem "$rpsystem" match $include #2123 $include $muf/rp2/utils $include $lib/gary'sMufUtils-strings $include $lib/rp $include $lib/alynna $include $muf/rp/boxutils $def HR "^blue^>^yellow^------------------------------------------------------------^blue^<^ ^" .tell $def notify ansi_notify $def notify_exclude ansi_notify_exclude lvar target lvar result lvar roll1 lvar roll2 lvar roll3 lvar roll4 lvar fumbles lvar crits lvar succs lvar repeater lvar bonusstat lvar cur lvar max lvar target lvar diff lvar tilt : colormaker ( i -- s ) diff ! diff @ 6 < if "^Crimson^<<" exit then diff @ 11 < if "^Red^<|" exit then diff @ 16 < if "||" exit then diff @ 21 < if "^FOREST^|>" exit then "^green^>>" exit ; lvar toggle lvar ttarget : tattletale ( d -- ) toggle @ 2 = if exit then ttarget ! str me @ name 14 left "^blue^|^ ^^aqua^[^yellow^" strcat rpsystem "Caste/" me @ "Caste" getstatstr strcat getpropstr 19 center "^ ^^aqua^] ^blue^|^ ^^aqua^[^yellow^" strcat me @ "Life Style" getstatstr 19 center "^ ^^aqua^] ^blue^|^ ^^aqua^[^yellow^" strcat me @ "Appearance" getstatstr 2 right "/" me @ "Empathy" getstatstr 2 right "/" me @ "Subterfuge" getstatstr 2 right "^aqua^]^ ^" strcat cat target @ swap notify ; : deepscan ( -- ) var awareness str me @ "Special/Appraise" getstatint target @ "Perception" getstatint < not if target @ "Gil" getstatint " gil, " then target @ "sdesc" getpropstr if "Short Desc(" target @ "sdesc" getpropstr "), " then target @ "Jnote" "Fertile" findboxitem if "Fertile, " then target @ "Jnote" "Uncivilized" findboxitem if "Uncivilized, " then target @ "Jnote" "Hideous" findboxitem if "Hideous, " then target @ "Jnote" "Hyperactive" findboxitem if "Hyperactive, " then target @ "Jnote" "Bad Hygiene" findboxitem if "Stinks!, " then target @ "Jnote" "Disgraced Lineage" findboxitem if "Shameful Family, " then target @ "Jnote" "Summonable" findboxitem if "Spirit(summonable), " then target @ "Jnote" "Angel" findboxitem if "Innocent, " then target @ "Jnote" "Exotic Plumage" findboxitem if "Interesting Coat, " then target @ "Jnote" "Fearsome" findboxitem if "Scary, " then target @ "Jnote" "Limp" findboxitem if "Walks with a limp, " then me @ "Arcana/Awareness" getstatint me @ "Special/Scan" getstatint 14 > or if me @ "Arcana/Awareness" getstatint awareness ! me @ "Special/Scan" getstatint 14 > if 25 awareness ! then me @ target @ dbcmp if 24 awareness ! then target @ "@rp/Special/" nextprop if "(" target @ "Special/Fire-Affinity" getstatint target @ "Special/Ice-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "Fire" else pop then target @ "Special/Ice-Affinity" getstatint target @ "Special/Fire-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "Ice" else pop then target @ "Special/Air-Affinity" getstatint target @ "Special/Earth-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "Air" else pop then target @ "Special/Earth-Affinity" getstatint target @ "Special/Air-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "Earth" else pop then target @ "Special/White-Affinity" getstatint target @ "Special/Black-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "White" else pop then target @ "Special/Day-Affinity" getstatint target @ "Special/Night-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "Day" else pop then target @ "Special/Night-Affinity" getstatint target @ "Special/Day-Affinity" getstatint - awareness @ + 25 - dup 0 > if colormaker "Night" else pop then target @ "Special/Divine-Presence" getstatint awareness @ + 25 - dup 0 > if colormaker "Holy" else pop then dup "(" smatch if pop else "^ ^), " then then then target @ player? if target @ "NPC" checkpassword if "(^yellow^NPC^ ^), " then then cat ; : badge-scan var badgetype var badgevalue cur @ "/@rp/badge/" array_get_propvals dup array_count 0 = if pop "" exit then str "" rot foreach toint badgevalue ! badgetype ! badgevalue @ not if continue then "^YELLOW^" badgetype @ 1 strcut swap toupper swap strcat "/" rpsystem str "/badge/" badgetype @ "/" badgevalue @ intostr cat getpropstr "^ ^ " repeat cat ; : package-scan ( -- s ) cur @ target ! str toggle @ not if me @ tattletale then depth 3 = if pop then target @ name 14 left "^blue^|^ ^^aqua^[^yellow^" strcat rpsystem "Caste/" target @ "Caste" getstatstr strcat getpropstr 19 center "^ ^^aqua^] ^blue^|^ ^^aqua^[^yellow^" strcat target @ "Life Style" getstatstr 19 center "^ ^^aqua^] ^blue^|^ ^^aqua^[^yellow^" strcat target @ "Appearance" getstatstr 2 right "/" target @ "Empathy" getstatstr 2 right "/" target @ "Subterfuge" getstatstr 2 right "^aqua^]^ ^ " strcat badge-scan cat .tell deepscan dup not if pop else dup strlen 2 - strcut pop " Notes: " swap strcat .tell then ; lvar owner lvar displayed : glance ( s -- ) 0 toggle ! 0 displayed ! dup not if 1 toggle ! else "pulse" instring if 2 toggle ! else me @ location .num-players 7 > if "Too many players here, use +glance if you want" .tell exit then then then me @ "stealth?" getstatint if me @ location contents cur ! me @ target ! me @ "owner" getstatint dbref me ! begin cur @ player? if cur @ awake? if cur @ "perception" getstatint cur @ "alertness" getstatint + cur @ "stealth" getstatint 3 / + me @ "Cloaking" getstatint 2 / - cur @ "special/telepathy" getstatint 3 / + 5d5 + max ! me @ "Stealth" getstatint me @ "Cloaking" getstatint 2 / + me @ "Subterfuge" getstatint 2 / + toggle @ 2 = if me @ "Intelligence" getstatint else me @ "Dexterity" getstatint then + 5d5 + max @ swap - 2 / succs ! succs @ 1 = if "You have the feeling you're being watched." cur @ swap notify then succs @ 2 = if "Someone is hiding in the area.. you can feel it" cur @ swap notify then succs @ 2 > if "You notice " me @ name strcat " trying to hide in the area." strcat cur @ swap notify cur @ location .num-players 1 = if me @ "+unhide" force then then then then cur @ next dup ok? if cur ! 0 else pop 1 then until else me @ target ! then toggle @ 2 = if exit then target @ location contents cur ! begin cur @ "stealth?" getstatint if cur @ me @ "Stealthbox" getstatint dbref dbcmp not if cur @ "owner" getstatint dbref owner ! me @ "perception" getstatint owner @ "Cloaking" getstatint 2 / - me @ "stealth" getstatint 3 / + me @ "alertness" getstatint + me @ "special/telepathy" getstatint 3 / + 5d5 + owner @ "Stealth" getstatint owner @ "subterfuge" getstatint 2 / + owner @ "Cloaking" getstatint 2 / + owner @ "Intelligence" getstatint + 5d5 + - 2 / succs ! succs @ 2 = if "You have the feeling you're being watched." .tell then succs @ 3 = if "Someone is hiding in the area.. you can feel it" .tell then succs @ 3 > if "You notice " owner @ name strcat " trying to hide in the area." strcat .tell me @ location .num-players 1 = if owner @ "+unhide" force then then then then cur @ next dup ok? if cur ! 0 else pop 1 then until toggle @ 2 = if exit then target @ location contents cur ! begin cur @ "finish" getstatint dup max ! if cur @ player? if cur @ "dark" flag? if 0 else cur @ awake? not if 0 else cur @ me @ dbcmp toggle @ not and if 0 else 1 then then then else 1 then else 0 then if displayed @ not if 1 displayed ! str "Name" 14 left "Caste" 21 center "Life Style" 21 center " " "App/Emp/Sub" cat .tell then package-scan then begin depth if pop then depth not until cur @ next dup ok? if cur ! 0 else pop 1 then until ; . c q