@program #3049 1 1000 d i $def rpsystem "$rpsystem" match $def rpsys "$rpsystem" match $def notify_exclude ansi_notify_exclude $libdef mdisp $libdef resourcelist $include $lib/gary'sMufUtils-strings $include $muf/rp/utils $include $lib/rp $include $lib/alynna $include $muf/rp/utils $include $muf/rp/boxutils $include $muf/cron : resourcelist { "Gem Mine" "Forest" "Farm" "Mine" "Church" "Ship" "Library" "Real Estate" "Pirate" "Bank" "Mage Guild" "People" "Smuggler" "Performer" "Casino" "Enforcer" "University" "Refinery" } array_make ; PUBLIC resourcelist : mdisp ( d -- ) var target target ! "Resources Overview" header tellme str "Resources(Avail/Total): " target @ "Resources" getstatint target @ "Resourcesspent" getstatint - "/" target @ "Resources" getstatint " | Gil/Max: " target @ "Gil" getstatint "/" target @ "Resources" getstatint target @ "Jnote" "Good With Money" findboxitem if 1.2 * then target @ "Special/Conservative-Spending" getstatint if 1.3 * then target @ "Jnote" "Bad With Money" findboxitem 0.6 * if then target @ "Resources/Bank" getstatint 5 * + target @ "Intelligence" getstatint 5 / + target @ "Willpower" getstatint 10 / + target @ "Jobs/Mundane" getstatint 2 * + 10 * dup target @ "maxgil" rot setstat dup target @ "Newecon?" getstatint not if 2 / target @ "Gil" rot setstat me @ "newecon?" 1 setstat else pop then " | Raw Income: " target @ "Resources" getstatint target @ "Resourcesspent" getstatfloat - target @ "Intelligence" getstatint 5 / + target @ "Willpower" getstatint 10 / + target @ "Resources/Bank" getstatint + target @ "Jobs/Mundane" getstatint 2 * + 0.14 * 2 fchop cat "Resources" pretty tellme str "Libraries" 20 left " - " target @ "Resources/Library" getstatint intostr 2 right " | " "Forests" 20 left " - " target @ "Resources/Forest" getstatint intostr 2 right cat "Resources" pretty tellme str "Real Estate" 20 left " - " target @ "Resources/Real Estate" getstatint intostr 2 right " | " "Mines" 20 left " - " target @ "Resources/Mine" getstatint intostr 2 right cat "Resources" pretty tellme str "Farms" 20 left " - " target @ "Resources/Farm" getstatint intostr 2 right " | " "Churches" 20 left " - " target @ "Resources/Church" getstatint intostr 2 right cat "Resources" pretty tellme str "Gem Mines" 20 left " - " target @ "Resources/Gem Mine" getstatint intostr 2 right " | " "Shipping Lanes" 20 left " - " target @ "Resources/Ship" getstatint intostr 2 right cat "Resources" pretty tellme str "Smugglers" 20 left " - " target @ "Resources/Smuggler" getstatint intostr 2 right " | " "Pirates" 20 left " - " target @ "Resources/Pirate" getstatint intostr 2 right cat "Resources" pretty tellme str "Enforcers" 20 left " - " target @ "Resources/Enforcer" getstatint intostr 2 right " | " "Casinos" 20 left " - " target @ "Resources/Casino" getstatint intostr 2 right cat "Resources" pretty tellme str "Bank Space" 20 left " - " target @ "Resources/Bank" getstatint intostr 2 right " | " "Performers" 20 left " - " target @ "Resources/Performer" getstatint intostr 2 right cat "Resources" pretty tellme str "University Learning" 20 left " - " target @ "Resources/University" getstatint intostr 2 right " | " "Refineries" 20 left " - " target @ "Resources/Refinery" getstatint intostr 2 right cat "Resources" pretty tellme str "Mages' Guild Tuition" 20 left " - " target @ "Resources/Mage Guild" getstatint intostr 2 right " | " "People" 20 left " - " target @ "Resources/People" getstatint intostr 2 right cat "Resources" pretty tellme "Economy - Southern Cross" footer tellme ; PUBLIC mdisp : find-price ( s -- f ) var skill skill ! rpsys "Materials/" skill @ strcat "/Cost" strcat getpropstr atoi 3.0 * 2.0 / #0 "Marketplace/" skill @ strcat getstatint 2 * 100 + 3 / / ; $def POST dup #235 swap force "Market :: " swap strcat #21 swap force : cycler ( #0 "resource cycle" getstatint systime swap - 60 60 * 24 * 30 * 2.5 / < if 600 sleep cycler exit then ) ( MUFCron will call this once an hour (#0:/@mufcron/60/econ:), so if its not time, just exit ) #0 "resource cycle" getstatint systime swap - 60 60 * 24 * 30 * 2.5 / < if exit then #0 "Resource Cycle" systime setstat #235 "+bbpost 31/Monthly Resource Report" force var total var total2 var cur var target var owners 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! ( Farms ) #0 "Farmskip" getstatint not if 0 pop ( Use this to skip stuff ) then cur @ dbref target ! begin target @ player? if target @ "Resources/Farm" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Farm" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Farms/Owners: " total2 @ int "/" total @ "; Food Produced: Average: " total2 @ 2 fchop "; Dull: " total2 @ 1.5 * 2 fchop "; Exotic: " total2 @ 0.5 * 2 fchop var profit "; Total Income: " var repeater 0 repeater ! 0 total ! total2 @ 0.05 * total2 ! begin "Dull Food" find-price total2 @ * "Average Food" find-price total2 @ 1.5 * * + "Exotic Food" find-price total2 @ 0.5 * * + total @ + total ! #0 "Marketplace/Dull Food" getstatfloat total2 @ 1.5 * + #0 "Marketplace/Dull Food" rot setstat #0 "Marketplace/Average Food" getstatfloat total2 @ 1.0 * + #0 "Marketplace/Average Food" rot setstat #0 "Marketplace/Exotic Food" getstatfloat total2 @ 0.5 * + #0 "Marketplace/Exotic Food" rot setstat repeater @ 1 + repeater ! repeater @ 20 = until total @ 2 fchop cat POST total2 @ 20 * total2 ! owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Farm" getstatint total2 @ / total @ * 2 fchop " gil from your farms!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Farm" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Farms ) ( Mages' Guild ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Mage Guild" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Mage Guild" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Mage Guild Attendance/Students: " total2 @ int "/" total @ "; Component of the month: " #0 "@rp/component" getpropstr dup not if pop begin rpsys "talents/" array_get_propdirs dup array_count random swap % array_getitem target ! rpsys "Talents/" target @ strcat "/component" strcat getpropstr if break else continue then repeat target @ else #0 "component" 0 setstat then var spell dup spell ! #1714 "gil" getstatfloat total2 @ + #1714 "gil" rot setstat cat POST owners @ if owners @ foreach swap pop target ! target @ str "You gain cap in " spell @ "!" cat "Resources" pretty ansi_notify target @ "Caps/" spell @ strcat getstatfloat target @ "Resources/Mage Guild" getstatint 0.25 * + dup 4 > if pop 4 then target @ "Caps/" spell @ strcat rot setstat repeat then ( End Mages' Guild ) ( Real Estate ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Real Estate" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Real Estate" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Houses/Owners: " total2 @ int "/" total @ "; Tenants Housed: " random 80 % random 100 % random 100 % + + 23 + total2 @ 5 / + dup target ! 2 fchop var profit "; Total Income: " target @ 15 * .98 * dup total ! 2 fchop "; Taxes: " total @ 0.98 / 0.2 * 2 fchop cat POST total @ 0.98 / 0.2 * 0.66 * #2984 "Gil" getstatint + #2984 "Gil" rot setstat total @ 0.98 / 0.2 * 0.33 * #2961 "Gil" getstatint + #2961 "Gil" rot setstat owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Real Estate" getstatint total2 @ / total @ * 2 fchop " gil from your tenants!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Real Estate" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Real Estate ) ( Forest ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Forest" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Forest" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Forest/Owners: " total2 @ int "/" total @ "; Resources Produced: Wood: " total2 @ 2 fchop "; Paper: " total2 @ 1.5 * 2 fchop " Leather: " total2 @ 0.5 * 2 fchop var profit "; Total Income: " 0 repeater ! 0 total ! total2 @ 0.05 * total2 ! begin "Wood" find-price total2 @ * "Paper" find-price total2 @ 1.5 * * + "Leather" find-price total2 @ 0.5 * * + total @ + total ! #0 "Marketplace/Paper" getstatfloat total2 @ 1.5 * + #0 "Marketplace/Paper" rot setstat #0 "Marketplace/Wood" getstatfloat total2 @ 1.0 * + #0 "Marketplace/Wood" rot setstat #0 "Marketplace/Leather" getstatfloat total2 @ 0.5 * + #0 "Marketplace/Leather" rot setstat repeater @ 1 + repeater ! repeater @ 20 = until total @ 2 fchop cat POST total2 @ 20 * total2 ! owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Forest" getstatint total2 @ / total @ * 2 fchop " gil from your forests!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Forest" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( end Forests ) ( Mines ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Mine" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Mine" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Mines/Owners: " total2 @ int "/" total @ "; Resources Produced: Steel: " total2 @ 0.8 * 2 fchop "; Iron: " total2 @ 1.2 * 2 fchop "; Mythril: " total2 @ 0.3 * 2 fchop var profit "; Total Income: " 0 repeater ! 0 total ! total2 @ 0.05 * total2 ! begin "Iron" find-price total2 @ 1.2 * * "Steel" find-price total2 @ 0.8 * * + "Mythril" find-price total2 @ 0.3 * * + total @ + total ! #0 "Marketplace/Iron" getstatfloat total2 @ 1.2 * + #0 "Marketplace/Iron" rot setstat #0 "Marketplace/Steel" getstatfloat total2 @ 0.8 * + #0 "Marketplace/Steel" rot setstat #0 "Marketplace/Mythril" getstatfloat total2 @ 0.3 * + #0 "Marketplace/Mythril" rot setstat repeater @ 1 + repeater ! repeater @ 20 = until total @ 2 fchop cat POST total2 @ 20 * total2 ! owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Mine" getstatint total2 @ / total @ * 2 fchop " gil from your mines!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Mine" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Mines ) ( Refineries ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Refinery" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Refinery" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Refineries/Owners: " total2 @ int "/" total @ "; Resources Produced: Titanium: " total2 @ 0.4 * 2 fchop "; Steel: " total2 @ 1.2 * 2 fchop "; Adamant: " total2 @ 0.2 * 2 fchop var profit "; Total Income: " 0 repeater ! 0 total ! total2 @ 0.05 * total2 ! begin "Titanium" find-price total2 @ 0.4 * * "Steel" find-price total2 @ 1.2 * * + "Coal" find-price total2 @ * - "Adamant" find-price total2 @ 0.2 * * + total @ + total ! #0 "Marketplace/Titanium" getstatfloat total2 @ 0.4 * + #0 "Marketplace/Titanium" rot setstat #0 "Marketplace/Steel" getstatfloat total2 @ 1.2 * + #0 "Marketplace/Steel" rot setstat #0 "Marketplace/Coal" getstatfloat total2 @ - #0 "Marketplace/Coal" rot setstat #0 "Marketplace/Adamant" getstatfloat total2 @ 0.2 * + #0 "Marketplace/Adamant" rot setstat repeater @ 1 + repeater ! repeater @ 20 = until total @ 2 fchop cat POST total2 @ 20 * total2 ! owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Refinery" getstatint total2 @ / total @ * 2 fchop " gil from your refineries!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Refinery" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Refineries ) ( Performers ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Performer" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Performer" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Performers/Patrons: " total2 @ int "/" total @ "; Performances: " random 80 % random 100 % random 100 % + + 23 + total2 @ 5 / + dup target ! 2 fchop var profit "; Total Income: " target @ 10 * dup total ! 2 fchop cat POST owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Performer" getstatint total2 @ / total @ * 2 fchop " gil from your performers!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Performer" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Performers ) ( Gem Mines ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Gem Mine" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Gem Mine" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Gem Mines/Owners: " total2 @ int "/" total @ "; Resources Produced: Gems: " total2 @ 0.8 * 2 fchop "; Crystals: " total2 @ 1.2 * 2 fchop "; Diamonds: " total2 @ 0.3 * 2 fchop var profit "; Total Income: " 0 repeater ! 0 total ! total2 @ 0.05 * total2 ! begin "Crystals" find-price total2 @ 1.2 * * "Gems" find-price total2 @ 0.8 * * + "Diamonds" find-price total2 @ 0.3 * * + total @ + total ! #0 "Marketplace/Crystals" getstatfloat total2 @ 1.2 * + #0 "Marketplace/Crystals" rot setstat #0 "Marketplace/Gems" getstatfloat total2 @ 0.8 * + #0 "Marketplace/Gems" rot setstat #0 "Marketplace/Diamonds" getstatfloat total2 @ 0.3 * + #0 "Marketplace/Diamonds" rot setstat repeater @ 1 + repeater ! repeater @ 20 = until total @ 2 fchop cat POST total2 @ 20 * total2 ! owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Gem Mine" getstatint total2 @ / total @ * 2 fchop " gil from your gem mines!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Gem Mine" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Gem Mines ) ( Shipping Lanes ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Ship" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Ship" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Lane Protection/Donators: " total2 @ int "/" total @ "; Resources Produced: +" total2 @ dup 50 > if pop 50 then 2 fchop "%; " var profit ( Nuku check me! ) "Total Income: " total2 @ random 3 % 1 + * toint random swap % total ! total @ 2 fchop cat POST ( end check ) #0 "@rp/marketplace/" nextprop target ! begin #0 target @ getprop total2 @ dup 50 > if pop 50 then 100.00 + 100.00 / * #0 target @ rot setprop #0 target @ nextprop target ! target @ not until owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Ship" getstatint total2 @ / total @ * 2 fchop " gil from your shipping lanes!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Ship" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Shipping Lanes ) ( Smugglers ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Smuggler" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Smuggler" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Smugglers/Supporters: " total2 @ int "/" total @ " Resources Produced: +" total2 @ dup 50 > if pop 50 then 2 fchop "%" var profit "; Total Income: " total2 @ random 3 % 1 + * toint random swap % total ! total @ 2 fchop cat POST #0 "@rp/bmarketplace/" nextprop target ! begin #0 target @ getprop total2 @ dup 50 > if pop 50 then 100.00 + 100.00 / * #0 target @ rot setprop #0 target @ nextprop target ! target @ not until owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Smuggler" getstatint total2 @ / total @ * 2 fchop " gil from your shipping lanes!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Smuggler" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Smugglers ) ( Start Pirates ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! var blarg begin target @ player? if target @ "Resources/Enforcer" getstatfloat if Blarg @ target @ "Resources/Enforcer" getstatfloat + blarg ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Pirate" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Pirate" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Pirates/Supporters: " total2 @ int "/" total @ " Resources Produced: -" total2 @ dup 50 > if pop 50.00 then 2 fchop "%" var profit #0 "@rp/marketplace/" nextprop target ! var booty 0 booty ! begin #0 target @ getprop dup booty @ + booty ! total2 @ 100.00 swap - dup 50 < if pop 50.00 then 100.00 / * #0 target @ rot setprop #0 target @ nextprop target ! target @ not until "; Total Income: " booty @ 0.75 * random 3 % 1 + * dup total ! 2 fchop " | Possible Supporters: " owners @ if owners @ foreach swap pop target ! random 100 % 1 + target @ "Subterfuge" getstatint 2 / + blarg @ - target @ "Subterfuge/Piracy" getstatint + target @ "Resources/Pirate" getstatint 2 * - 1 < if target @ name ", " then target @ str "You gain " target @ "Resources/Pirate" getstatint total2 @ / total @ * 2 fchop " gil from your pirates!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Pirate" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then cat POST ( End Pirates ) ( Start Enforcers ) 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Enforcer" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Enforcer" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Enforcers/Supporters: " total2 @ int "/" total @ " Black Market Destruction: " total2 @ dup 50 > if pop 50.00 then 2 fchop "%." var profit #0 "@rp/bmarketplace/" nextprop target ! 0 booty ! begin #0 target @ getprop dup booty @ + booty ! total2 @ 100.00 swap - dup 50 < if pop 50.00 then 100.00 / * #0 target @ rot setprop #0 target @ nextprop target ! target @ not until "; Total Income: " booty @ 0.1 * random 3 % 1 + * dup total ! 2 fchop cat POST owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Enforcer" getstatint total2 @ / total @ * 2 fchop " gil from your enforcers!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Enforcer" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Enforcers ) ( Start Casinos ) total2 @ booty ! 0 array_make owners ! 1 cur ! 0 total ! 0 total2 ! cur @ dbref target ! begin target @ player? if target @ "Resources/Casino" getstatfloat if total @ 1 + total ! total2 @ target @ "Resources/Casino" getstatfloat + total2 ! target @ owners @ 0 array_insertitem owners ! then then cur @ 1 + cur ! cur @ dbref target ! target @ dbtop dbcmp until str "Casinos/Owners: " total2 @ int "/" total @ "; People Served: " random 100 % random 100 % random 100 % + + 23 + total2 @ 5 / + booty @ 300 swap - + 2 / dup target ! 2 fchop var profit "; Total Income: " target @ 15 * dup total ! 2 fchop cat POST owners @ if owners @ foreach swap pop target ! target @ str "You gain " target @ "Resources/Casino" getstatint total2 @ / total @ * 2 fchop " gil from your casinos!" cat "Resources" pretty ansi_notify target @ "Gil" getstatfloat target @ "Resources/Casino" getstatfloat total2 @ / total @ * + target @ "Gil" rot setstat repeat then ( End Casinos ) #235 ".end" force ( cycler ) ; : main var blah mufcron? if cycler exit then ( trig exit? not if "startup" instring if cycler then then ) 1 blah ! me @ mdisp "A) Farms B) Banks C) Churches D) Gambling" tellme "E) Enforcers F) Forests G) Gem Mines H) Artists and Performers" tellme "I) Refineries L) Libraries M) Mines O) University Learning" tellme "P) Pirates R) Real Estate S) Shipping Lanes U) Smugglers" tellme "Z) Resources Q) Quit J) Mages' Guild K) People" tellme "Remember, resources spent no longer produce daily income." tellme var choice read strip choice ! choice @ not choice @ "q" instring or if "Ja ne!" "Resources" pretty tellme exit then choice @ "B" instring if "Banks hold your money for you. In simple basic terms, investments here let you hold more gil. There is absolutely no profit here besides having a place to stash all that gold of yours." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Bank" getstatfloat choice @ + me @ "Resources/Bank" rot setstat main exit then choice @ "J" instring if "So you want to be a mage? Learn the latest components, or catch up on some classics. Investments here turn into cap in various components every month. Caps, if you don't already know, make it cheaper to buy points in something." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resources/Mage Guild" getstatfloat choice @ + dup 10 > if pop "You cannot have more than 10 points of this resource." .tell main exit then me @ "Resources/Mage Guild" rot me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat setstat main exit then choice @ "O" instring if "Not everyone has a 'hobby' Some take it very seriously. Resources devoted here denote the persual of mentors and instructing aids on your desired path. In system terms, every point is 0.2 XP that is deposited directly into your lifepath pool of XP every day. You cannot have more than 10 points here." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resources/University" getstatfloat choice @ + dup 10 > if pop "You cannot have more than 10 points of this resource." .tell main exit then me @ "Resources/University" rot me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat setstat main exit then choice @ "I" instring if "Refineries take base metals and turn them into something grand. They produce steel, adamant and Titanium and sell it to market, and you bring home the bacon. They're very expensive(double cost)." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resources/Refinery" getstatfloat choice @ 2.0 / + dup 10 > if pop "You cannot have more than 10 points of this resource." .tell main exit then me @ "Resources/Refinery" rot me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat setstat main exit then choice @ "H" instring if "Expressing their creativity, and trying to turn a few gil in the process. Backing up the local performers is a good way to show your culture." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Performer" getstatfloat choice @ + me @ "Resources/Performer" rot setstat main exit then choice @ "E" instring if "Enforcers keep the streets clean. Supporting them helps keep you safe. Also, it hampers the efforts of smugglers and ne'er do wells, hurting the black market. This investment does not produce returns, aside from making the city a nicer place to live." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Enforcer" getstatfloat choice @ + me @ "Resources/Enforcer" rot setstat main exit then choice @ "D" instring if "Gambling's a good way to make a lot of money, and ruin lives. Though legal, many sub practices are on the shady side of the law. Enforcer presence will hurt your business." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Casino" getstatfloat choice @ + me @ "Resources/Casino" rot setstat main exit then choice @ "L" instring if "Libraries are places of learning and study. Owning libraries is a good way to encourage the growth of minds and culture, it also provides a convenient place for your own studies(You gain more study points a day)." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Library" getstatfloat choice @ + me @ "Resources/Library" rot setstat main exit then choice @ "F" instring if "Forests are places known most for their trees. Trees can be turned into wood and paper, and the animals that live within yield a token amount of food and leather. These things can be sold at market, and you, the owner, can keep the surplus for yourself." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Forest" getstatfloat choice @ + me @ "Resources/Forest" rot setstat main exit then choice @ "G" instring if "Not all mines produce metals. Jewelry sells at a premium. However, gem mines are very expensive to invest in and/or own(two resource points per)." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Gem Mine" getstatfloat choice @ 2.0 / + me @ "Resources/Gem Mine" rot setstat main exit then choice @ "R" instring if "Join the elite ranks of land owners. Those peasents have to pay YOU to stay where they are. Real estate is a path leading straight to gil in your pocket. Monthly rent fattens your purse." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Real Estate" getstatfloat choice @ + me @ "Resources/Real Estate" rot setstat main exit then choice @ "P" instring if "Supporting pirates is a low down and dirty thing to do. It hurts everyone and depletes the market of goods. However, it's also very profitable." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Pirate" getstatfloat choice @ + me @ "Resources/Pirate" rot setstat main exit then choice @ "M" instring if "You can invest in a mining company or two. Most of the best exist in Drominham and dredge up iron, steel, and even rarer metals and stones. As an investor, you gain a dividend of sales and some surplus." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Mine" getstatfloat choice @ + me @ "Resources/Mine" rot setstat main exit then choice @ "a" instring if "Ah, Agriculture. Food of various qualities, leather, and chocobo are the results of this enterprise." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Farm" getstatfloat choice @ + me @ "Resources/Farm" rot setstat main exit then choice @ "c" instring if "Spiritual rewards are sometimes better than petty material gain." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Church" getstatfloat choice @ + me @ "Resources/Church" rot setstat main exit then choice @ "S" instring if "Your investment goes towards protecting travelling merchants of all kinds. This venture is not as profitable as others, however, it profits the market as a whole. With your efforts, pirate and monterous incursions are warded off, and all goods become more plentiful." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Ship" getstatfloat choice @ + me @ "Resources/Ship" rot setstat main exit then choice @ "U" instring if "Not all goods are sold on the open market. You help move along things that can not or simply will not be sold by the average merchant. Thanks to your donations, illicit and hard to find goods are easier to come by for all, and you turn a small profit for it." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/Smuggler" getstatfloat choice @ + me @ "Resources/Smuggler" rot setstat main exit then choice @ "K" instring if "Great men lead others to greatness. Investment in people allows you a pool of skilled folk to assist you in your endeavors. Your peons have 12s in all stats save one, who has 15, and three skills at 15(with one subskill in each also at 15). Calling these people is not considered an instant thing, they don't sprout from the ground." tellme "How many points?" "Resources" pretty tellme read atoi choice ! me @ "Resources" getstatint me @ "Resourcesspent" getstatfloat - choice @ < choice @ 0 < or if "You don't have that much resources to spend." tellme main exit then me @ "Resourcesspent" getstatfloat choice @ + me @ "Resourcesspent" rot setstat me @ "Resources/People" getstatfloat choice @ + me @ "Resources/People" rot setstat main exit then choice @ "Z" instring if var cost str "It will cost you " me @ "Gil" getstatfloat me @ "maxgil" getstatint / 50 * 100 swap - dup 20 < if pop 20.0 then 100 / me @ "Resources" getstatint dup 10 < if pop 10 then 0.75 * * dup cost ! 2 fchop " XP. Are you sure you want to buy a point of resources? Note, all current gil will be lost towards the effort." cat tellme read "y" instring if me @ "XP" getstatfloat me @ "XPspent" getstatfloat - cost @ < if "You can't afford it." .tell main exit then me @ "XPspent" getstatfloat cost @ + me @ "XPspent" rot setstat me @ "Resources" getstatint 1 + me @ "Resources" rot setstat me @ "Gil" me @ "Resources" getstatint setstat then main exit then .debug-off ; . c q