-+-+-+-+-+-+-+-+ START OF PART 46 -+-+-+-+-+-+-+-+ X`09`09 begin X`09`09 cint := in_statp(cint); X`09`09 if (cint > py.stat.int) then X`09`09 py.stat.int := cint; X`09`09 msg_print('Aren''t you brilliant!'); X`09`09 prt_intelligence; X`09`09 ident := true; X`09`09 end; X`09 5 :`09begin X`09`09 msg_print('This potion tastes very dull.'); X`09`09 ident := lose_int; X`09`09end; X`09 6 :`09with py.stat do X`09`09 begin X`09`09 cint := py.stat.int; X`09`09 msg_print('You have have a warm feeling.'); X`09`09 prt_intelligence; X`09`09 ident := true; X`09`09 end; X`09 7 :`09with py.stat do X`09`09 begin X`09`09 cwis := in_statp(cwis); X`09`09 if (cwis > wis) then X`09`09 wis := cwis; X`09`09 msg_print('You suddenly have a profound thought!'); X`09`09 prt_wisdom; X`09`09 ident := true; X`09`09 end; X`09 8 :`09ident := lose_wis; X`09 9 :`09with py.stat do X`09`09 if (cwis < wis) then X`09`09 begin X`09`09 cwis := wis; X`09`09 msg_print('You feel your wisdom returning.'); X`09`09 prt_wisdom; X`09`09 ident := true; X`09`09 end; X`09 10 :`09with py.stat do X`09`09 begin X`09`09 cchr := in_statp(cchr); X`09`09 if (cchr > chr) then X`09`09 chr := cchr; X`09`09 msg_print('Gee, ain''t you cute!'); X`09`09 prt_charisma; X`09`09 ident := true; X`09`09 end; X`09 11 :`09ident := lose_chr; X`09 12 :`09with py.stat do X`09`09 if (cchr < chr) then X`09`09 begin X`09`09 cchr := chr; X`09`09 msg_print('You feel your looks returning.'); X`09`09 prt_charisma; X`09`09 ident := true; X`09`09 end; X`09 13 :`09ident := hp_player(damroll('2d7'),'a potion.'); X`09 14 :`09ident := hp_player(damroll('4d7'),'a potion.'); X`09 15 :`09ident := hp_player(damroll('6d7'),'a potion.'); X`09 16 :`09ident := hp_player(1000,'a potion.'); X`09 17 :`09with py.misc do X`09`09 begin X`09`09 py.stat.ccon := in_statp(py.stat.ccon); X`09`09 if (py.stat.ccon > py.stat.con) then X`09`09 py.stat.con := py.stat.ccon; X`09`09 mhp := mhp + 1; X`09`09 chp := chp + mhp; X`09`09 msg_print('You feel tingly for a moment.'); X`09`09 prt_mhp; X`09`09 prt_chp; X`09`09 prt_constitution; X`09`09 ident := true; X`09`09 end; X`09 18 :`09with py.misc do X`09`09 begin X`09`09 i5 := (exp div 2) + 10; X`09`09 if (i5 > 100000) then i5 := 100000; X`09`09 exp := exp + i5; X`09`09 msg_print('You feel more experienced.'); X`09`09 prt_experience; X`09`09 ident := true; X`09`09 end; X`09 19 :`09with py.flags do X`09`09 if (not (py.flags.free_act)) then X`09`09 begin X`09`09 msg_print('You fall asleep.'); X`09`09 py.flags.paralysis := py.flags.paralysis +`20 X`09`09`09`09`09`09`09`09randint(4) + 4; X`09`09 ident := true; X`09`09 end; X`09 20 :`09with py.flags do X`09`09 begin X`09`09 msg_print('You are covered by a veil of darkness.'); X`09`09 blind := blind + randint(100) + 100; X`09`09 ident := true; X`09`09 end; X`09 21 :`09with py.flags do X`09`09 begin X`09`09 msg_print('Hey! This is good stuff! * Hick! *'); X`09`09 confused := confused + randint(20) + 12; X`09`09 ident := true; X`09`09 end; X`09 22 :`09with py.flags do X`09`09 begin X`09`09 msg_print('You feel very sick.'); X`09`09 poisoned := poisoned + randint(15) + 10; X`09`09 ident := true; X`09`09 end; X`09 23 :`09begin X`09`09 py.flags.fast := py.flags.fast + randint(25) + 15; X`09`09 ident := true; X`09`09end; X`09 24 :`09begin X`09`09 py.flags.slow := py.flags.slow + randint(25) + 15; X`09`09 ident := true; X`09`09end; X`09 25 :`09ident := detect_monsters; X`09 26 :`09with py.stat do X`09`09 begin X`09`09 cdex := in_statp(cdex); X`09`09 if (cdex > dex) then X`09`09 dex := cdex; X`09`09 msg_print('You feel more limber!'); X`09`09 prt_dexterity; X`09`09 ident := true; X`09`09 end; X`09 27 :`09with py.stat do X`09`09 if (cdex < dex) then X`09`09 begin X`09`09 cdex := dex; X`09`09 msg_print('You feel less clumsy.'); X`09`09 prt_dexterity; X`09`09 ident := true; X`09`09 end; X`09 28 :`09with py.stat do X`09`09 if (ccon < con) then X`09`09 begin X`09`09 ccon := con; X`09`09 msg_print('You feel your health returning!'); X`09`09 prt_constitution; X`09`09 ident := true; X`09`09 end; X`09 29 :`09cure_blindness; X`09 30 :`09cure_confusion; X`09 31 :`09cure_poison; X`09 32 :`09with py.misc do X`09`09 with class`5Bpclass`5D do X`09`09 if (mspell) then X`09`09 begin X`09`09 ident := learn_spell(redraw); X`09`09`09if (redraw) then draw_cave; X`09`09 end X`09`09 else if (pspell) then X`09`09 ident := learn_prayer; X`09 33 :`09begin X`09`09 msg_print('You feel your memories fade...'); X`09`09 msg_print(''); X`09`09 i4 := trunc(py.misc.exp/5.0);`20 X`09`09 lose_exp(randint(i4)+i4); X`09`09 ident := true; X`09`09end; X`09 34 :`09with py.flags do X`09`09 begin X`09`09 poisoned := 0; X`09`09 if (food > 150) then food := 150; X`09`09 paralysis := 4; X`09`09 msg_print('The potion makes you vomit!'); X`09`09 ident := true; X`09`09 end; X`09 35 :`09begin X`09`09 py.flags.invuln := py.flags.invuln + randint(10) + 10; X`09`09 ident := true; X`09`09end; X`09 36 :`09begin X`09`09 py.flags.hero := py.flags.hero + randint(25) + 25; X`09`09 ident := true; X`09`09end; X`09 37 :`09begin X`09`09 py.flags.shero := py.flags.shero + randint(25) + 25; X`09`09 ident := true; X`09`09end; X`09 38 :`09ident := remove_fear; X`09 39 : ident := restore_level; X`09 40 :`09with py.flags do X`09`09 resist_heat := resist_heat + randint(10) + 10; X`09 41 :`09with py.flags do X`09`09 resist_cold := resist_cold + randint(10) + 10; X`09 42 :`09detect_inv2(randint(12)+12); X`09 43 :`09ident := slow_poison; X`09 44 : ident := cure_poison; X`09 45 :`09with 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 46 :`09with py.flags do X`09`09 begin X`09`09 tim_infra := tim_infra + 100 + randint(100); X`09`09 ident := true; X`09`09 msg_print('Your eyes begin to tingle.'); X`09`09 end; X`09 47 :`09; X`09 48 :`09; X`09 49 :`09; X`09 50 :`09; X`09 51 :`09; X`09 52 :`09; X`09 53 :`09; X`09 54 :`09; X`09 55 :`09; X`09 56 :`09; X`09 57 :`09; X`09 58 :`09; X`09 59 :`09; X`09 60 :`09; X`09 61 :`09; X`09 62 :`09; X`09 otherwise ; X`09end; X`09`7B End of Potions...`09`09`09`09`09`7D X`09`09`09end; X`09`09 if (ident) then X`09`09`09identify(inventory`5Bitem_val`5D); X`09`09 if (flags <> 0) then X`09`09`09begin X`09`09 with py.misc do X`09`09`09 exp := exp + round(level/lev); X`09`09 prt_experience; X`09`09`09end; X`09`09 add_food(p1); X`09`09 desc_remain(item_val); X`09`09 inven_destroy(item_val); 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 any potions.'); X`09 end X`09else X`09 msg_print('But you are not carrying anything.'); X end; $ CALL UNPACK [.SOURCE.INCLUDE]POTIONS.INC;1 709695024 $ create 'f' X`09`7B Pray like HELL...`09`09`09`09`09-RAK-`09`7D X`5Bpsect(misc2$code)`5D procedure pray; X var X`09`09i1,i2,item_val,dir`09`09: integer; X`09`09choice,chance`09`09`09: integer; X`09`09dumy,y_dumy,x_dumy`09`09: integer; X`09`09redraw`09`09`09`09: boolean; X begin X`09reset_flag := true; X`09if (py.flags.blind > 0) then X`09 msg_print('You can''t see to read your prayer!') X`09else if (no_light) then X`09 msg_print('You have no light to read by.') X`09else if (py.flags.confused > 0) then X`09 msg_print('You are too confused...') X`09else if (class`5Bpy.misc.pclass`5D.pspell) then X`09 if (inven_ctr > 0) then X`09 begin X`09 if (find_range(`5B91`5D,i1,i2)) then X`09 begin X`09`09 redraw := false; X`09`09 if (get_item(item_val,'Use which Holy Book?', X`09`09`09`09`09`09`09redraw,i1,i2)) then X`09`09 begin X`09`09 if (cast_spell('Recite which prayer?',item_val, X`09`09`09`09`09`09choice,chance,redraw)) then X`09`09`09with magic_spell`5Bpy.misc.pclass,choice`5D do X`09`09`09 begin X`09`09`09 reset_flag := false; X`09`09`09 if (randint(100) < chance) then X`09`09`09 msg_print('You lost your concentration!') X`09`09`09 else X`09`09`09 begin X`09`09`09`09y_dumy := char_row; X`09`09`09`09x_dumy := char_col; X`09`7B Prayers...`09`09`09`09`09`7D X`09case choice of X`09 1 :`09detect_evil; X`09 2 :`09hp_player(damroll('3d3'),'a prayer.'); X`09 3 :`09bless(randint(12)+12); X`09 4 :`09remove_fear; X`09 5 :`09light_area(char_row,char_col); X`09 6 :`09detect_trap; X`09 7 :`09detect_sdoor; X`09 8 :`09slow_poison; X`09 9 :`09if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X`09`09 confuse_monster(dir,char_row,char_col); X`09 10 :`09teleport(py.misc.lev*3); X`09 11 :`09hp_player(damroll('4d4'),'a prayer.'); X`09 12 :`09bless(randint(24)+24); X`09 13 :`09sleep_monsters1(char_row,char_col); X`09 14 :`09create_food; X`09 15 :`09for i1 := 1 to inven_max-1 do X`09`09 with inventory`5Bi1`5D do X`09`09 flags := uand(flags,%X'7FFFFFFF'); X`09 16 :`09with py.flags do X`09`09 begin X`09`09 resist_heat := resist_heat + randint(10) + 10; X`09`09 resist_cold := resist_cold + randint(10) + 10; X`09`09 end; X`09 17 :`09cure_poison; X`09 18 :`09if (get_dir('Which direction?',dir,dumy,y_dumy,x_dumy)) then X`09`09 fire_ball(6,dir,char_row,char_col, X`09`09`09`09damroll('3d6')+py.misc.lev,'Black Sphere'); X`09 19 :`09hp_player(damroll('8d4'),'a prayer.'); X`09 20 :`09detect_inv2(randint(24)+24); X`09 21 :`09protect_evil; X`09 22 :`09earthquake; X`09 23 :`09map_area; X`09 24 :`09hp_player(damroll('16d4'),'a prayer.'); X`09 25 :`09turn_undead; X`09 26 :`09bless(randint(48)+48); X`09 27 :`09dispell_creature(%X'0008',3*py.misc.lev); X`09 28 :`09hp_player(200,'a prayer.'); X`09 29 :`09dispell_creature(%X'0004',3*py.misc.lev); X`09 30 :`09warding_glyph; X`09 31 :`09begin X`09`09 dispell_creature(%X'0004',4*py.misc.lev); X`09`09 cure_confusion; X`09`09 remove_fear; X`09`09 cure_poison; X`09`09 cure_blindness; X`09`09 hp_player(1000,'a prayer.'); X`09`09end; X`09 otherwise ; X`09end; X`09`7B End of prayers...`09`09`09`09`7D X`09`09`09 if (not(reset_flag)) then X`09`09`09 with py.misc do X`09`09`09 begin X`09`09`09 exp := exp + sexp; X`09`09`09 prt_experience; X`09`09`09`09 sexp := 0; X`09`09`09 end X`09`09`09 end; X`09`09`09 with py.misc do X`09`09`09 if (not(reset_flag)) then X`09`09`09`09begin X`09`09`09`09 if (smana > cmana) then X`09`09`09`09 begin X`09`09`09`09 msg_print('You faint from fatigue!'); X`09`09`09`09 py.flags.paralysis :=`20 X`09`09`09`09`09randint(5*trunc(smana-cmana)); X`09`09`09`09 cmana := 0; X`09`09`09`09 if (randint(3) = 1) then X`09`09`09`09begin X`09`09`09`09 msg_print('You have damaged your health!'); X`09`09`09`09 py.stat.ccon := de_statp(py.stat.ccon); X`09`09`09`09 prt_constitution; X`09`09`09`09end; X`09`09`09`09 end X`09`09`09`09 else X`09`09`09`09 cmana := cmana - smana; X`09`09`09`09 prt_cmana; X`09`09`09 end X`09`09`09 end X`09`09 end X`09`09 else X`09`09 if (redraw) then draw_cave; X`09 end X`09 else X`09 msg_print('But you are not carrying any Holy Books!'); X`09 end X`09 else X`09 msg_print('But you are not carrying any Holy Books!') X`09else X`09 msg_print('Pray hard enough and your prayers may be answered.'); X end; $ CALL UNPACK [.SOURCE.INCLUDE]PRAYER.INC;1 1663471741 $ create 'f' X`09`7B This save package was brought to by`09`09`09-JWT- X`09 and -RAK- `7D X X X`09`7B Data Corruption means character is dead, or save file was -RAK- X`09 screwed with. Keep them guessing as to what is actually wrong.`7D X`5Bpsect(save$code)`5D procedure data_exception; X begin X`09clear(1,1); X`09prt('Data Corruption Error.',1,1); X`09prt('',2,1); X`09exit; X end; X X X`09`7B Uses XOR function to encode data`09`09`09-RAK-`09`7D X`5Bpsect(save$code)`5D procedure coder(var line : ntype); X var X`09`09i1 : integer; X`09`09i2,i3,i4 : unsigned; X begin X`09for i1 := 1 to length(line) do X`09 begin X`09 i2 := uint(ord(line`5Bi1`5D)); X`09 i3 := uint(randint(256)-1); X`09 i4 := uxor(i2,i3); X`09 line`5Bi1`5D := chr(i4); X`09 end; X end; X X X`09`7B Encrypts a line of text, complete with a data-check sum-RAK-`09`7D X`09`7B (original by JWT) `7D X`5Bpsect(save$code)`5D procedure encrypt(var line : ntype); X var X`09i1,i2 : integer; X`09temp : ntype; X X begin X`09i2 := 0; X`09for i1 := 1 to length(line) do X`09 i2 := i2 + ord(line`5Bi1`5D) + i1; X`09temp := line; X`09writev(line,i2:1,' ',temp); X`09coder(line); X end; X X X`09`7B Decrypts a line of text, complete with a data-check sum-RAK-`09`7D X`09`7B (original by JWT) `7D X`5Bpsect(save$code)`5D procedure decrypt(var line : ntype); X var X`09i1,i2,i3 : integer; X`09temp : ntype; X`09tmp : char; X X begin X`09i2 := 0; X`09coder(line); X`09temp := line; X`09readv(temp,i3,tmp,line); X`09for i1 := 1 to length(line) do X`09 i2 := i2 + ord(line`5Bi1`5D) + i1; X`09if (i2 <> i3) then data_exception; X end; X X X`09`7B Actual save procedure `09`09`09-RAK- & -JWT-`09`7D X`5Bpsect(save$code)`5D function save_char : boolean; X var X`09tot_monsters,tot_treasure : integer; X`09i1,i2,trys : integer; X`09xfloor : unsigned; X`09save_seed : unsigned; X`09fnam : vtype; X`09temp : packed array `5B1..70`5D of cha Vr; X`09out_rec,title1,title2 : ntype; X`09f1 : text; X`09f2 : file of key_type; +-+-+-+-+-+-+-+- END OF PART 46 +-+-+-+-+-+-+-+-