: do_rules me @ "+-------------------------------------------------+" notify me @ "| MUF-Monopoly v0.1-beta, written by Belgarath |" notify me @ "+-----------+-------------------------------------+" notify me @ "| rules | Show this help screen |" notify me @ "| init -opt | Initialize the game, -h for info |" notify me @ "| roll | Roll the dice |" notify me @ "+-----------+-------------------------------------+" notify ; : init_usage me @ "Usage: init -{hrsx}" notify me @ " init -h for help" notify ; : init_help me @ "init -{hrsx}:" notify me @ "h = help" notify me @ "s = standard game (money paid to bank)" notify me @ "x = extra game (money paid to free parking)" notify me @ "r = re-initialize game with an above option" notify ; : prg trigger @ loc @ dbcmp if trigger @ else trigger @ location then ; : total_players dup intostr "player" swap strcat prg swap getpropstr "" stringcmp not if 1 - exit else 1 + total_players then ; : get_space_name prg swap getpropstr "-" explode pop swap pop ; : reset_cc prg "cc1" "Get out of Jail Free%ccjail" 0 addprop prg "cc2" "Receive $25 for services%25" 0 addprop prg "cc3" "Pay school tax of $150%-150" 0 addprop prg "cc4" "Doctor's fee, pay $50%-50" 0 addprop prg "cc5" "Xmas fund matures, collect $100%100" 0 addprop prg "cc6" "Life insurance matures, collect $100%100" 0 addprop prg "cc7" "Go to jail! Go directly to jail!%gtj" 0 addprop prg "cc8" "Pay hospital $100%-100" 0 addprop prg "cc9" "Bank error in your favor, collect $200%200" 0 addprop prg "cc10" "Income tax refund, collect $20%20" 0 addprop prg "cc11" "From sale of stock you get $45%45" 0 addprop prg "cc12" "You inherit $100%100" 0 addprop prg "cc13" "Second in beauty contets, collect $10%10" 0 addprop prg "cc14" "Street repairs%repairs-40-115" 0 addprop prg "cc15" "Opera, collect $50 from each player%50each" 0 addprop prg "cc16" "Advance to go, collect $200%200go" 0 addprop ; : reset_?? prg "??1" "Building loan matures, collect $150%150" 0 addprop prg "??2" "Advance to nearest railroad%rail" 0 addprop prg "??3" "Go directly to jail%gtj" 0 addprop prg "??4" "Advance to go, collect $200%200go" 0 addprop prg "??5" "Advance to nearest utility%util" 0 addprop prg "??6" "Take a ride on the Reading%reading" 0 addprop prg "??7" "Pay poor tax of $15%-15" 0 addprop prg "??8" "Advance to nearest railroad%rail" 0 addprop prg "??9" "Bank pays dividend of $50%50" 0 addprop prg "??10" "Advance to St. Charles Place%scp" 0 addprop prg "??11" "Advance to Boardwalk%board" 0 addprop prg "??12" "Chairman, pay each player $50%-50each" 0 addprop prg "??13" "Go back 3 spaces%-3" 0 addprop prg "??14" "General repairs%repairs-25-100" 0 addprop prg "??15" "Advance to Illinois Avenue%ill" 0 addprop prg "??16" "Get out of Jail Free%??jail" 0 addprop ; : reset_squares prg "0" "Go-go*go*go" 0 addprop prg "1" "Mediterranean Avenue-60/2*10/30/90/160/250*50" 0 addprop prg "2" "Community Chest-cc*cc*cc" 0 addprop prg "3" "Baltic Avenue-60/4*20/60/180/320/450*50" 0 addprop prg "4" "Income Tax-it*it*it" 0 addprop prg "5" "Reading Railroad-200*25/50/100/200*0" 0 addprop prg "6" "Oriental Avenue-100/6*30/90/270/400/550*50" 0 addprop prg "7" "Chance-??*??*??" 0 addprop prg "8" "Vermont Avenue-100/6*30/90/270/400/550*50" 0 addprop prg "9" "Connecticut Avenue-120/8*40/100/300/450/600*50" 0 addprop prg "10" "Jail (Just Visiting)-jail*jail*jail" 0 addprop prg "11" "St. Charles Place-140/10*50/150/450/625/750*100" 0 addprop prg "12" "Electric Company-util*util*util" 0 addprop prg "13" "States Avenue-140/10*50/150/450/625/750*100" 0 addprop prg "14" "Virginia Avenue-160/12*60/180/500/700/900*100" 0 addprop prg "15" "Pennsylvania Railroad-200*25/50/100/200*0" 0 addprop prg "16" "St. James Place-180/14*70/200/550/750/950*100" 0 addprop prg "17" "Community Chest-cc*cc*cc" 0 addprop prg "18" "Tennessee Avenue-180/14*70/200/550/750/950*100" 0 addprop prg "19" "New York Avenue-200/16*80/220/600/800/1000*100" 0 addprop prg "20" "Free Parking-free*free*free" 0 addprop prg "21" "Kentucky Avenue-220/18*90/250/700/875/1050*150" 0 addprop prg "22" "Chance-??*??*??" 0 addprop prg "23" "Indiana Avenue-220/18*90/250/700/875/1050*150" 0 addprop prg "24" "Illinois Avenue-240/20*100/300/750/925/1100*150" 0 addprop prg "25" "B. & O. Railroad-200*25/50/100/200*0" 0 addprop prg "26" "Atlantic Avenue-260/22*110/330/800/975/1150*150" 0 addprop prg "27" "Ventnor Avenue-260/22*110/330/800/975/1150*150" 0 addprop prg "28" "Water Works-util*util*util" 0 addprop prg "29" "Marvin Gardens-280/24*120/360/850/1025/1200*150" 0 addprop prg "30" "Go To Jail-gtj*gtj*gtj" 0 addprop prg "31" "Pacific Avenue-300/26*130/390/900/1100/1275*200" 0 addprop prg "32" "No. Carolina Avenue-300/26*130/390/900/1100/1275*200" 0 addprop prg "33" "Community Chest-cc*cc*cc" 0 addprop prg "34" "Pennsylvania Avenue-320/28*150/450/1000/1200/1400*200" 0 addprop prg "35" "Short Line-200*25/50/100/200*0" 0 addprop prg "36" "Chance-??*??*??" 0 addprop prg "37" "Park Place-350/35*175/500/1100/1300/1500*200" 0 addprop prg "38" "Luxury Tax-lux*lux*lux" 0 addprop prg "39" "Boardwalk-400/50*200/600/1400/1700/2000*200" 0 addprop ; : do_init dup "-" instr not if pop init_usage exit then dup "h" instr if pop init_help exit then dup "r" instr not prg "init" getpropstr "" stringcmp and if pop init_usage exit then dup dup "s" instr not swap "x" instr not and if pop init_usage exit then dup dup "s" instr swap "x" instr and if pop init_usage exit then dup "s" instr if prg ".gameset" "standard" 0 addprop else prg ".gameset" "extra" 0 addprop then reset_squares reset_cc reset_?? prg "init" "done" 0 addprop me @ "Initialization complete." notify pop ; : ^19 " " over strlen strcut swap pop ; : ^40 " " dup strcat over strlen strcut swap pop ; : do_roll random 6 % 1 + random 6 % 1 + ; : show_position dup 0 = if pop exit then dup intostr "player" swap strcat dup prg swap getpropstr prg swap "save" strcat getpropstr "~" explode pop swap pop swap prg swap getpropstr atoi dbref name "| " swap strcat ^19 strcat "| " strcat swap get_space_name ^40 strcat strcat " |" strcat me @ swap notify 1 - show_position ; : do_look 1 total_players not if me @ "> There is no one playing." notify exit then "+------------------+------------------------------------------+" me @ swap notify "| Player | Square occupied |" me @ swap notify "+------------------+------------------------------------------+" me @ swap notify 1 total_players show_position "+------------------+------------------------------------------+" me @ swap notify ; : do_join 1 total_players 1 + "player" swap intostr strcat prg swap me @ intostr 0 addprop prg me @ intostr "save" strcat "0~1500$*none" 0 addprop "> You join the game." me @ swap notify "> " me @ name strcat " joins the game." strcat loc @ #-1 rot notify_except ; : main trigger @ name "init" stringcmp not if do_init exit then trigger @ name "roll" stringcmp not if pop do_roll exit then trigger @ name "rules" stringcmp not if pop do_rules exit then trigger @ name "join" stringcmp not if pop do_join exit then trigger @ loc @ dbcmp if pop do_look exit then ;