-+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+ X`09`09 light_area(char_row,char_col); X`09`09 hp_player(randint(20)+20,'a horn.'); X`09`09end; X`7B Horn of Tritons `7D X`09 28 :`09with py.flags do X`09`09 begin X`09`09 ident := true; X`09`09 msg_print('All of the seas of the world still (yeah, right)!'); X`09`09 msg_print('The gods of the ocean hear you...'`09 ); X`09`09 blessed := blessed + randint(20); X`09`09 cure_me(blind); X`09`09 cure_me(poisoned); X`09`09end; X`7B Horn of Fog `7D X`09 29 :`09begin X`09`09 msg_print('Thick fog billows out...'); X`09`09 ident := unlight_area(char_row,char_col); X`09`09 msg_print('The nearby creatures are confused'); X`09`09 ident := zap_area(0,0,c_confuse); X`09`09end; X`09 otherwise ; X`09end; X`09end X else X`09case (i5) of X`7BSilver Cross`7D`091 : begin X`09`09`09msg_print('You feel secure...'); X`09`09`09protect_evil; X`09`09`09ident := true; X`09`09 end; X`7BGold Cross`7D`092 : ident := zap_area(%X'0400',100,c_hp); X`7BMithril Cross`7D`093 : begin X x := char_row; X y := char_col; X ident := summon_undead(x,y); X end; X`7BCross`7D`09`094 : begin X x := char_row; X y := char_col; X ident := summon_demon(x,y); X`09`09 end; X`7BCross`7D`09`095 : begin X`09`09`09name := name + '(Empty)'; X`09`09 msg_print('You free a Djinni from the bottle!'); X`09`09 msg_print('He grants you a wish...'); X`09`09 msg_print('"I will raise one of your stats by two..."'); X`09`09 msg_print('"Which stat would you like to raise?"'); X`09`09 ident := (get_com('1=str 2=int 3=wis 4=dex 5=con 6=cha',dir)); X`09`09 if ((dir > '0') and (dir < '7')) then X`09`09`09begin X`09`09`09 tstat := ord(dir)-49; X`09`09`09 ident := gain_stat(tstat,'X'); X`09`09`09 ident := gain_stat(tstat,' and x2, too!'); X`09`09`09end X`09`09 else X`09`09`09msg_print('Oh well, maybe next time.') X`09`09 end; X `7B Corked Bottle of Demons `7D X`09`096 : begin X`09`09`09msg_print('You release several demons!'); X`09`09`09x := char_row; X y := char_col; X`09`09`09for i3 := 1 to 4 do X`09`09`09 summon_demon(x,y); X`09`09`09py.flags.paralysis := py.flags.paralysis + 2; X`09`09`09name := name + '(Empty)'; X`09`09`09ident := true; X`09`09 end; X`09`097 : ident := create_water(char_row,char_col); X`09`098 : ident := destroy_water(char_row,char_col); X`09`099 : begin X`09`09 msg_print('Many Undead appear!'); X x := char_row; X y := char_col; X`09`09 for i3 := 1 to 8 do X`09`09`09 ident := summon_undead(x,y); X`09`09 py.flags.paralysis := py.flags.paralysis + 2; X`09`09 end; X`09`0910 : begin X`09`09`09msg_print('Many Demons appear!'); X x := char_row; X y := char_col; X`09`09`09for i3 := 1 to 8 do X`09`09`09 ident := summon_demon(x,y); X`09`09 py.flags.paralysis := py.flags.paralysis + 2; X`09`09 ident := true; X`09`09 end; X`09`0911: begin X`09`09 with py.stat do X`09`09`09for tstat := sr to ca do X`09`09`09 if restore_stat(tstat,'X') then ident := true; X`09`09 if hp_player(damroll('6d7'),'a statue.') then X`09`09`09ident := true; X`09`09 with py.flags do X`09`09`09begin X`09`09`09 if (slow > 0) then X`09`09`09 begin X`09`09`09 ident := true; X`09`09`09 slow := 1; X`09`09`09 end; X`09`09`09 if (cure_me(blind) or cure_me(poisoned) or X`09`09cure_me(confused) or cure_me(afraid) or restore_level) then X`09`09`09 ident := true; X`09`09`09end; X`09`09 if (ident) then X msg_print('The statue fills you with life and all maladies are cured.') V; X`09`09 end; X`09`0912: ident := true; X `0913 : begin X`09`09 `09redraw := true; X`09`09 `09wizard_light; X`09`09 `09for i3 := (char_col + 1) to (char_col - 1) do X`09`09 `09 for i4 := (char_row + 1) to (char_row - 1) do X`09`09 `09 if (test_light(i4,i3)) then X`09`09`09 redraw := false; X`09`09 `09if (redraw) then`20 X`09`09 `09wizard_light; X`09`09 end; X`09`0914: ident := zap_area(0,2,c_speed); X`09`0915: begin X`09`09`09with py.misc do X`09`09`09 begin X`09`09`09 loss := 0; X`09`09`09 for i3 := 1 to 6 do X`09`09`09 begin X`09`09`09loss := loss+(money`5Bi3`5D-money`5Bi3`5D div 2)*coin$weight; X`09`09`09`09money`5Bi3`5D := money`5Bi3`5D div 2; X`09`09`09 end; X`09`09`09 inven_weight := inven_weight - loss; X`09`09`09 reset_total_cash; X`09`09`09 end; X`09`09`09msg_print('most of your money turns to dust!'); X`09`09`09prt_gold; X`09`09`09prt_weight; X`09`09`09ident := true; X`09`09 end; X`09`0916 : with py.misc do X`09`09 if (cmana < mana) then X`09`09 begin X`09`09 cmana := mana; X`09`09 ident := true; X`09`09 msg_print('Your feel your head clear...'); X`09`09 end; X`09`0917 : ident := item_petrify; X`09`0918 : begin X`09`09 item_ptr`5E.data.damage := '50d5'; X`09`09 item_ptr`5E.data.cost := -1; X`09`09 msg_print('Click!'); X`09`09 ident := true; X`09`09 end; X`09`0919 : ident := detect_creatures(c_monster); X`09`0920 : ident := zap_area(%X'0004',60,c_hp); X`09`0921 : begin X`09`09`09ident := unlight_area(char_row,char_col); X`09`09 end; X`09`0922 : begin X`09`09`09if (get_dir('Which direction?',dur,dumy,y_dumy,x_dumy)) then X`09`09`09 begin X`09`09`09 i3 := char_row; X`09`09`09 i4 := char_col; X`09`09`09 ident := fire_ball(3,dur,i3,i4,40,'Acid Ball'); X`09`09`09 end X`09`09`09else X`09`09`09 p1 := p1 + 1; X`09`09 end; X`09`0923 : ident := detect_creatures(c_invisible); X`09`0924 : ident := ident_spell; X`09`0925 : ident := light_area(char_row,char_col); X`09`0926 : begin X`09`09`09for i3 := 1 to randint(4) do X`09`09`09 begin X`7Bwho's the idiot who wrote these things anyhow? `7D X`09`09`09`09y := char_row; X`09`09`09`09x := char_col; X`09`09`09`09if (cave`5By,x`5D.fval in water_set) then X`09`09`09`09`09summon_water_monster(y,x,false) X`09`09`09`09else X`09`09`09`09`09summon_land_monster(y,x,false); X`09`09`09 end; X`09`09 ident := true; X`09`09 end; X`09`0927 : if (remove_curse) then X`09`09`09begin X`09`09`09 msg_print('Your junk glows black for a moment...'); X`09`09`09 ident := true; X`09`09`09end; X`09`0928 : begin X`09`09`09ident := destroy_area(char_row,char_col); X`09`09 end; X`09`0929 : begin X`09`09`09py.flags.word_recall := 10 + randint(10); X`09`09`09msg_print('You feel dizzy for a moment...'); X`09`09`09ident := true; X`09`09 end; X`09`0930 : begin X`09`09`09msg_print('The teeth flare into flames.'); X`09`09`09py.flags.ring_fire := py.flags.ring_fire+3+randint(3); X`09`09`09ident := true; X`09`09 end; X`09`0931 : begin X`09`09`09msg_print('The Demon teeth try to possess you...'); X`09`09`09lose_exp(100); X`09`09`09change_rep(-10); X`09`09`09ident := true; X`09`09 end; X`09otherwise`09 X`09`09begin X`09`09 msg_print('Todd Gardiner is fat!'); X`09`09 ident := true; X`09`09end; X`09end; X X`09`7B End of instrument actions...`09`09`09`09 `7D X`09`09`09 end; X`09`09`09 if (ident) then X`09`09`09 identify(inven_temp`5E.data); X`09`09`09 if (flags <> 0) then X`09`09`09 with py.misc do X`09`09`09`09begin X`09`09`09`09 exp := exp + round(level/lev); X`09`09`09`09 prt_experience; X`09`09`09`09end; X`09`09`09 desc_charges(item_ptr); X`09`09`09end; X`09`09`09 end; X`09`09 end X`09`09else X`09`09 if (redraw) then draw_cave; X`09 end X`09 else X`09 msg_print('You are not carrying anything to use...'); X`09 end X`09else X`09 msg_print('But you are not carrying anything.'); X end; X X X $ CALL UNPACK BLOW.INC;1 1110196492 $ create 'f' X$ set on X$ on warning then goto bad_build X$ on error then goto bad_build X$ on severe then goto bad_build X$ pascal = "pascal/optimization/nocheck/nolist" X$ link = "link/notrace/nomap" X$ if p1.eqs."LINK" then goto link_stage X$ write sys$output "" X$ write sys$output "==> Compiling MACROS." X$ write sys$output "" X$ macro bit_pos X$ write sys$output "BIT_POS compiled." X$ macro distance X$ write sys$output "DISTANCE compiled." X$ macro get_account X$ write sys$output "GET_ACCOUNT compiled." X$ macro insert X$ write sys$output "INSERT compiled." X$ macro maxmin X$ write sys$output "MAXMIN compiled." X$ macro minmax X$ write sys$output "MINMAX compiled." X$ macro putqio X$ write sys$output "PUTQIO compiled." X$ macro randint X$ write sys$output "RANDINT compiled." X$ macro randrep X$ write sys$output "RANDREP compiled." X$ macro subquad X$ write sys$output "SUBQUAD compiled." X$ macro users X$ write sys$output "USERS compiled." X$ write sys$output "" X$ write sys$output "==> Compiling FORTRAN files." X$ fortran/extended_source/continuations\=99/nolist bit_pos64 X$ write sys$output "BIT_POS64 compiled." X$ fortran/extended_source/continuations\=99/nolist uw_id X$ write sys$output "UW_ID compiled." X$ write sys$output "" X$ write sys$output "==> Creating CDU object file." X$ set command/obj=moriadef moriadef X$ write sys$output "MORIADEF created." X$ write sys$output "" X$ write sys$output "==> Creating MORIALIB.OLB." X$ library/create=(blocks:0,globals:12,history:0,- X keysize:31,modules:12) morialib.olb`20 X$ library morialib bit_pos X$ library morialib get_account X$ library morialib distance X$ library morialib insert X$ library morialib maxmin X$ library morialib minmax X$ library morialib putqio X$ library morialib randint X$ library morialib randrep X$ library morialib subquad X$ library morialib users X$ library morialib bit_pos64 X$ write sys$output "MORIALIB.OLB created." X$ write sys$output "" X$ write sys$output "==> Creating help library." X$ runoff moriahlp.rnh X$ library/create/help moriahlp.hlb moriahlp.hlp X$ write sys$output "MORIAHLP.HLB created." X$ write sys$output "" X$ write sys$output "==> Compiling MAIN module." X$ pascal moria/env=moria.env X$ write sys$output "MAIN module compiled." X$ write sys$output "" X$ write sys$output "==> Compiling PASCAL files." X$ write sys$output "" X$ pascal dungeon/env=dungeon.env X$ write sys$output "DUNGEON compiled." X$ pascal casino X$ write sys$output "CASINO compiled." X$ pascal create X$ write sys$output "CREATE compiled." X$ pascal creature X$ write sys$output "CREATURE compiled." X$ pascal death X$ write sys$output "DEATH compiled." X$ pascal desc X$ write sys$output "DESC compiled." X$ pascal files X$ write sys$output "FILES compiled." X$ pascal generate X$ write sys$output "GENERATE compiled." X$ pascal help X$ write sys$output "HELP compiled." X$ pascal inven X$ write sys$output "INVEN compiled." X$ pascal io X$ write sys$output "IO compiled." X$ pascal misc X$ write sys$output "MISC compiled." X$ pascal netopen X$ write sys$output "NETOPEN compiled." X$ pascal player X$ write sys$output "PLAYER compiled." X$ pascal quest X$ write sys$output "QUEST compiled." X$ pascal save X$ write sys$output "SAVE compiled." X$ pascal screen X$ write sys$output "SCREEN compiled." X$ pascal store X$ write sys$output "STORE compiled." X$ pascal termdef X$ write sys$output "TERMDEF compiled." X$ pascal wizard X$ write sys$output "WIZARD compiled." X$ write sys$output "" X$ LINK_STAGE: X$ write sys$output "==> Linking the files." X$ link/exe=imoria moria,moriadef,casino,create,death,desc,- X files,generate,help,io,misc,netopen,save,termdef,dungeon,- X creature,inven,player,screen,store,wizard,quest,uw_id,- X morialib/lib,sys$system:sys.stb/selective X$ write sys$output "" X$ write sys$output "IMORIA.EXE is now ready for use." X$ goto bye X$ bad_build: X$ write sys$output "An error was encountered. Try again." X$ bye: X$ if f$search("*.OBJ;*") .nes. "" then delete/noconf *.obj;* X$ if f$search("*.ENV;*") .nes. "" then delete/noconf *.env;* X$ if f$search("*.OLB;*") .nes. "" then delete/noconf *.olb;* X$ exit $ CALL UNPACK BUILD.COM;1 604848394 $ create 'f' X`5Binherit('moria.env')`5D module casino; X`20 X const X max_horse_names = 55; X`09races_per_day`09= 10; X`20 X var X out_val : vtype; X`09tics`09`09: integer; X`20 X`5Bglobal,psect(casino$code)`5D procedure enter_casino; X`20 X type X stype`09`09= (jackpot,cherry,orange,bell,bar); X slot`09`09= array`5B1..3`5D of stype; X hand`09`09= array`5B1..15`5D of integer; X drawcard`09= array`5B1..15`5D of vtype; X h_name`09`09= array`5B1..max_horse_names`5D of vtype; X h_stat`09`09= array`5B1..max_horse_names`5D of integer; X`09h_bool`09`09= array`5B1..max_horse_names`5D of boolean; X`09statr = array`5B1..10`5D of real; X`20 X var X msg_flag : boolean; X msg_line : integer; X str_buff : varying`5B20`5D of char; X old_msg : vtype; X gld`09`09: integer; X bet : integer; X horsename : `5Bstatic`5D h_name; X horsestat : `5Bstatic`5D h_stat; X`09closed`09`09: boolean; X`20 X`20 Xvalue X horsename := ('Man ''o War','Secretariat','Seattle Slew','Moksha', X 'Beast Master','Prince of Darkness','Beelzebub', X 'Black Shadow','Gargle Blaster','George Jetson','Covenant', X 'Turiya','Neysa','Sure Thing','Battle Cruiser','Mobie', X 'Arthur Dent','Mr. Creosote','Shadowfax','Bet Twice', X 'I''m a Lumberjack','Dr. Science','Harry The Horse', X 'Tiberius','Hellfire','Mephistopheles','Belial','Pluto', X 'Firesweeper','Cloudminder','Spectacular Bid','Noor', X 'Affirmed','Citation','Dr. Fagen','War Admiral','Epitaph', X 'Not A Chance','Death Pizza','Relay(Cop''s)Horse','Nightmar Ve', X 'Excelsior','Paul Revere','Myxilplick','Mercury','Robohorse V', X 'Hellfire','Bladerunner','Arch Mage','Shadow Runner', X 'Golden Hoof','Necromancer','Heirophant','Jehannum','Transw Varp'); X`20 X`20 +-+-+-+-+-+-+-+- END OF PART 4 +-+-+-+-+-+-+-+-