-+-+-+-+-+-+-+-+ START OF PART 25 -+-+-+-+-+-+-+-+ X`09`09`09 prt_hp; X`09`09`09 old_chp := trunc(chp); X`09`09`09end; X`09`09 if (old_cmana <> trunc(cmana)) then X`09`09`09begin X`09`09`09 if (cmana > mana) then cmana := mana; X`09`09`09 if (is_magii) then prt_mana; X`09`09`09 old_cmana := trunc(cmana); X`09`09`09end X`09`09 end; X`09 end; X`09if ((py.flags.paralysis < 1) and `7B Accept a command? `7D X`09 (py.flags.rest < 1) and X`09 (not(death))) then X`09`7B Accept a command and execute it `7D X`09 repeat X`09 print_stat := 0; X`09 reset_flag := false; X`09 turn_counter := turn_counter + 1; X`09 if (turn_counter > 4000000) then turn_counter := 100000; X`09`09`7B Random teleportation `7D X`09 if (py.flags.teleport) then X`09 if (randint(100) = 1) then X`09`09begin X`09`09 find_flag := false; X`09`09 teleport(40); X`09`09end; X`09 if (not (find_flag)) then X`09 begin X`09`09print('',char_row,char_col); X`09`09save_msg_flag := msg_flag; X`09`09inkey(command); X`09`09if (save_msg_flag) then erase_line(msg_line,msg_line); X`09`09com_val := ord(command); X`09 end; X`09`7B Commands are executed in following case statement `7D X`09`7B The following keys are used for commands:`09`09`09`7D X`09`7B `5EA `5EB `5EC `5ED `5EE `5EF `5EG `5EH `5EI `5EJ `5EK `5EL `5EM `5EN V `5EO `5EP `5ER `5ET `5EU `5EV`09`7D X`09`7B `5EW `5EX `5EY `5EZ `5E_ $ + . / 1 2 3 4 5 6 7 8 9 < > ?`09`09`7D X`09`7B A B C D E F G H I L M P R S T U V W `5D`09`09`09`09`7D X`09`7B a b c d e f h i j l m o p q r s t u v w x `7C`09`09`09`7D X`09 case com_val of X X`09`090,3,25 :begin`09`09`09`09`09`7B`5EY = exit `7D X`09`09`09 flush; X`09`09`09 if (get_com('Enter ''Q'' to quit',command)) then X`09`09`09 case command of X`09`09`09 'q','Q': begin X`09`09`09`09`09 if (total_winner) then X`09`09`09`09`09 begin X`09`09`09`09`09 moria_flag := true; X`09`09`09`09`09 death := true; X`09`09`09`09`09 end X`09`09`09`09`09 else X`09`09`09`09`09 begin X`09`09`09`09`09 if (is_from_file) then X`09`09`09`09`09`09begin Xopen(f1,file_name:=finam,record_length:=1024,history:=old, X`09disposition:=delete,error:=continue); Xclose(f1,error:=continue); X`09`09`09`09`09`09end; X`09`09`09`09`09 clear(1,1); X`09`09`09`09`09 exit; X`09`09`09`09`09 end; X`09`09`09`09`09end; X`09`09`09 otherwise ; X`09`09`09 end; X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0913 : begin `7B`5EM = repeat `7D X`09`09`09 msg_print(old_msg); X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0916 : if (wizard1) then `7B`5EP = password`7D X`09`09`09 begin X`09`09`09 msg_print('Wizard mode off.'); X`09`09`09 wizard1 := false; X`09`09`09 wizard2 := false; X`09`09`09 reset_flag := true; X`09`09`09 no_controly; X`09`09`09 end X`09`09`09else X`09`09`09 begin X`09`09`09 if py.misc.cheated then X`09`09`09 begin X`09`09`09 if check_pswd('doublespeak',true) then X`09`09`09 begin X`09`09`09`09 msg_print('Wizard mode on.'); X`09`09`09`09 controly; X`09`09`09 end X`09`09`09 end X`09`09`09 else X`09`09`09 if check_pswd('',false) then X`09`09`09`09begin X`09`09`09`09 msg_print('Wizard mode on.'); X`09`09`09`09 controly; X`09`09`09`09end; X`09`09`09 reset_flag := true; X`09`09`09 end; X`09`0918 : begin `7B`5ER = redraw `7D X`09`09`09 draw_cave; X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0926 : begin `7B`5EZ = save `7D X`09`09`09 if (total_winner) then X`09`09`09 begin X`09msg_print('You are a Total Winner, your character must be retired...'); X`09msg_print('Use -Y to when you are ready to quit.'); X`09`09`09 end X`09`09`09 else X`09`09`09 begin X`09`09`09 if (search_flag) then X`09`09`09`09search_off; X`09`09`09 py.flags.dead := false; X`09`09`09 save_char(false); X`09`09`09 py.flags.dead := true; X`09`09`09 end; X`09`09`09end; X`09`0931 : if (wizard1 and search_flag) then X`09`09`09begin X`09`09`09 py.misc.cheated := false; X`09`09`09 msg_print('Cheat flag turned off.'); X`09`09`09end X`09`09 else reset_flag:=true; X`09`0936 : begin `7B$ = Shell `7D X`7BFXJLM -- 1-21-90 Kluged out the shell. hahahaha!!!!`7D X`7B`09`09`09 clear(1,1); X`09writeln('`5BEntering DCL shell, type "EOJ" to resume your game`5D'); X`09`09`09 writeln; X`09`09`09 if (want_trap) then disable_the_trap; X`09`09`09 controly; X`09`09`09 shell_out; X`09`09`09 no_controly; X`09`09`09 if (want_trap) then set_the_trap; X`09`09`09 clear(1,1); X`09`09`09 draw_cave; X`09`09`09 reset_flag := true; X`7D`09`09`09end; X`09`0943 :`09begin`09`09`09`09`09`7B+ = lvl help `7D X`09`09`09 writev(out_val,py.misc.expfact:4:2); X`09`09`09 moria_help('Character Classes Experience '+out_val); X`09`09`09 draw_cave; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`0946 : begin `7B. = find `7D X`09`09`09 y := char_row; X`09`09`09 x := char_col; X`09`09`09 if (get_dir('Which direction?',dir_val, X`09`09`09`09`09`09`09com_val,y,x)) then X`09`09`09 begin X`09`09`09 find_flag := true; X`09`09`09 move_char(dir_val); X`09`09`09 end X`09`09`09end; X`09`0947 : begin `7B/ = identify `7D X`09`09`09 ident_char; X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0949 : move_char(com_val - 48); `7B Move dir 1 `7D X`09`0950 : move_char(com_val - 48); `7B Move dir 2 `7D X`09`0951 : move_char(com_val - 48); `7B Move dir 3 `7D X`09`0952 : move_char(com_val - 48); `7B Move dir 4 `7D X`09`0953 : begin `7B Rest one turn `7D X`09`09`09 move_char(com_val - 48); X`09`09`09 sleep(0); `7B Sleep 1/10 a second`7D X`09`09`09 flush; X`09`09`09end; X`09`0954 : move_char(com_val - 48); `7B Move dir 6 `7D X`09`0955 : move_char(com_val - 48); `7B Move dir 7 `7D X`09`0956 : move_char(com_val - 48); `7B Move dir 8 `7D X`09`0957 : move_char(com_val - 48); `7B Move dir 9 `7D X`09`0960 : go_up; `7B< = go up `7D X`09`0962 : go_down; `7B> = go down `7D X`09`0963 : begin `7B? = help `7D X`09`09`09 help; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`0965 :`09begin`09`09`09`09 `7BA = age, Hours`7D X`09`09`09 msg_print(show_char_age); X`09`09`09 msg_print('You have been playing for '+show_play_time); X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0966 : bash; `7BB = bash `7D X`09`0967 : begin `7BC = character`7D X`09`09`09 if (get_com('Print to file? (Y/N)',command)) then X`09`09`09 case command of X`09`09`09 'y','Y': file_character; X`09`09`09 'n','N': begin X`09`09`09`09`09 change_name; X`09`09`09`09`09 draw_cave; X`09`09`09`09`09end; X`09`09`09 otherwise ; X`09`09`09 end; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`0968 : disarm_trap; `7BD = disarm `7D X`09`0969 : eat; `7BE = eat `7D X`09`0970 : refill_lamp; `7BF = refill `7D X`09`0971 :`09begin`09`09`09`09`09`7BG = Game date`7D X`09`09`09 msg_print('The date is '+ X`09`09`09`09 full_date_string(py.misc.cur_age)); X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0972 : begin`09`09`09`09`09`7BH = moria hlp`7D X`09`09`09 moria_help(''); X`09`09`09 draw_cave; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`0973 :`09begin`09`09`09`09 `7BI = Selected inv`7D X`09`09`09 reset_flag := true; X`09`09`09 if (inven_command('I',trash_ptr,'')) then X`09`09`09 draw_cave; X`09`09`09end; X`09`0975 :`09begin`09`09`09`09 `7BK = Know Quest `7D X`09`09`09 if (py.flags.quested) then Xmsg_print('Current quest is to kill a '+c_list`5Bpy.misc.cur_quest`5D.name) X`09`09`09 else X`09`09`09 msg_print('No quest currently.'); X`09`09`09 reset_flag := true; `7Bfree turn`7D X`09`09`09end; X`09`0976 : begin `7BL = location `7D X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09 if ((py.flags.blind > 0) or (no_light)) then X`09`09`09 msg_print('You can''t see your map.') X`09`09`09 else X`09`09`09 begin X`09`09`09 writev(out_val, X`09`09`09 'Section `5B', X`09`09`09 (trunc((char_row-1)/outpage_height)+1):1,',', X`09`09`09 (trunc((char_col-1)/outpage_width )+1):1, X`09`09`09 '`5D; Location = `5B',char_row:1,',',char_col:1,'`5D'); X`09`09`09 msg_print(out_val); X`09`09`09 end; X`09`09`09end; X`09`0977:`09begin`09`09`09`09`09`7BM = money `7D X`09`09`09 reset_flag := true; X`09`09`09 if (inven_command('M',trash_ptr,'')) then X`09`09`09 draw_cave; X`09`09`09end; X`09`0978:`09begin X`09`09`09 mon_name;`09`09`09`09`7BN = name mstr`7D X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0979:`09view_old_mess;`09`09`09 `7BO = Old Mess `7D X`09`0980: begin `7BP = print map`7D X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09 if ((py.flags.blind > 0) or (no_light)) then X`09`09`09 msg_print('You can''t see to draw a map.') X`09`09`09 else X`09`09`09 print_map; X`09`09`09end; X`09`0981 :`09begin`09`09`09`09 `7BQ = toggle more`7D X`09`09`09 msg_terse := not msg_terse; X`09`09`09 if (msg_terse) then X`09`09`09 msg_print('Question ''-More-'' toggled off') X`09`09`09 else X`09`09`09 msg_print('Question ''-More-'' toggled on'); X`09`09`09 reset_flag := true;`09`7BFree move `7D X`09`09`09end; X`09`0982 : rest; `7BR = rest `7D X`09`0983 : if (search_flag) then `7BS = srh mode `7D X`09`09`09 begin X`09`09`09 search_off; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09 end X`09`09`09else if (py.flags.blind > 0) then X`09`09 msg_print('You are incapable of searching while blind.') X`09`09`09else X`09`09`09 begin X`09`09`09 search_on; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09 end; X`09`0984 : tunnel; `7BT = tunnel `7D X`09`0985 :`09blow;`09`09`09`09`09`7BU = use instr`7D X`09`0986 : begin X`09`09`09 msg_record('',false);`09`09`7BV = preVious messages`7D X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0987 :`09begin`09`09`09`09`09`7BW = what time`7D X`09`09`09 msg_print('The current time is '+show_current_time); X`09`09`09 reset_flag := true; X`09`09`09end; X`09`0993 :`09begin`09`09`09`09`09`7B`5D = armr help`7D X`09`09`09 moria_help('Adventuring Armor_Class Armor_List'); X`09`09`09 draw_cave; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`0997 : aim; `7Ba = aim `7D X`09`0998 : examine_book; `7Bb = browse `7D X`09`0999 : closeobject; `7Bc = close `7D X`09`09100: drop; `7Bd = drop `7D X`09`09101: begin `7Be = equipment`7D X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09 if (inven_command('e',trash_ptr,'')) then X`09`09`09 draw_cave; X`09`09`09end; X X`09`09102:`09throw_object(true);`09`09`09`7Bf = fire `7D X`09`09104: throw_object(false);`09`09`09`7Bh = hurlx `7D X`09`09105: begin `7Bi = inventory`7D X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09 if (inven_command('i',trash_ptr,'')) then X`09`09`09 draw_cave; X`09`09`09end; X`09`09106: jamdoor; `7Bj = jam `7D X`09`09108: begin `7Bl = look `7D X`09`09`09 look; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`09109: if (class`5Bpy.misc.pclass`5D.mspell) then X`09`09`09 cast `7Bm = magick `7D X`09`09`09else if (class`5Bpy.misc.pclass`5D.mental) then X`09`09`09 discipline`09`09`09`09`7Bm = monk? :) `7D X`09`09`09else X`09`09`09 sing;`09`09`09`09`09`7Bm = music `7D X`09`09111: openobject; `7Bo = open `7D X`09`09112: if (class`5Bpy.misc.pclass`5D.pspell) then X`09`09`09 pray`09`09`09`09`09`7Bp = pray `7D X`09`09`09else X`09`09`09 play;`09`09`09`09`09`7Bp = play `7D X`09`09113: quaff; `7Bq = quaff `7D X`09`09114: read_scroll; `7Br = read `7D X`09`09115: if (py.flags.blind > 0) then `7Bs = search `7D X`09`09 msg_print('You are incapable of searching while blind.') X`09`09`09else X`09`09`09 search(char_row,char_col,py.misc.srh); X`09`09116: begin `7Bt = unwear `7D X`09`09`09 reset_flag := true; X`09`09`09 if (inven_command('t',trash_ptr,'')) then X`09`09`09 draw_cave X`09`09`09 else X`09`09`09 prt_weight; X`09`09`09end; X`09`09117: use; `7Bu = use staff`7D X`09`09118: game_version; `7Bv = version `7D X`09`09119: begin `7Bw = wear `7D X`09`09`09 reset_flag := true; X`09`09`09 if (inven_command('w',trash_ptr,'')) then X`09`09`09 draw_cave X`09`09`09 else X`09`09`09 prt_weight; X`09`09`09end; X`09`09120: begin `7Bx = exchange `7D X`09`09`09 reset_flag := true; X`09`09`09 if (inven_command('x',trash_ptr,'')) then X`09`09`09 draw_cave; X`09`09`09end; X`09`09124:`09begin`09`09`09`09`09`7B`7C = wpn help `7D X`09`09`09 moria_help('Adventuring Weapons Weapon_List'); X`09`09`09 draw_cave; X`09`09`09 reset_flag := true; `7B Free move `7D X`09`09`09end; X`09`09otherwise if (wizard1) then X`09`09 begin X`09`09 reset_flag := true; `7B Wizard commands are free moves`7D X`09 case com_val of X`09`091 : with py.flags do`09`09`7B`5EA = Cure all`7D X`09`09`09 begin +-+-+-+-+-+-+-+- END OF PART 25 +-+-+-+-+-+-+-+-