-+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+ Xe_ack:if sendlog = 0 then person`5Bplr`5Bnow`5D.log`5D.here := true; X Xe_attack: Xbegin X decompress(p2,i,j,moron); X if (p1 = plr`5Bnow`5D.log) and not pl`5Bnow`5D.sts`5Bps_dead`5D.on and in_ Vrange(x,y,p4) then X`09get_attack(sendlog,x,y,i,j,p3,s) X else if (p1 = plr`5Bnow`5D.log) and not pl`5Bnow`5D.sts`5Bps_dead`5D.on th Ven X`09act_out(plr`5Bnow`5D.log,e_msg,pl`5Bnow`5D.where.x,pl`5Bnow`5D.where.y,0, X`09sendlog,,,name`5Bna_player`5D.id`5Bplr`5Bnow`5D.log`5D+' out of range.') X else if (p1 = plr`5Bnow`5D.log) then X`09act_out(plr`5Bnow`5D.log,e_msg,pl`5Bnow`5D.where.x,pl`5Bnow`5D.where.y,0, X`09sendlog,,,name`5Bna_player`5D.id`5Bplr`5Bnow`5D.log`5D+' is already dead. V'); Xend; X Xe_assign:`7Bx,y,first in,to room`7D Xbegin X if unmask(p1,m_first_in) then readnames; X if (sendlog = 0) and (p2 = pl`5Bnow`5D.where.r) then X begin `7Bassign to room`7D X`7BOnce the room's process is here, we can start sending to it. If done Xearlier, we'll send to ourselves and get all confused. We can assume the Xroom process is in this room, otherwise it wouldn't send to us`7D X assign_channel(s,person`5Bplr`5Bnow`5D.log`5D.channel); X person`5Bplr`5Bnow`5D.log`5D.here := true; X act_out(plr`5Bnow`5D.log,e_booga,pl`5Bnow`5D.where.x,pl`5Bnow`5D.where.y V, X`09pl`5Bnow`5D.attrib_ex`5Bst_base`5D,pl`5Bnow`5D.attrib`5Bat_size`5D,, X`09do_mask(not pl`5Bnow`5D.sts`5Bps_dead`5D.on,m_alive,human,m_human), X`09name`5Bna_player`5D.id`5Bplr`5Bnow`5D.log`5D,,,person`5Bplr`5Bnow`5D.log` V5D.channel); X end X else if sendlog <> 0 then X begin X person`5Bsendlog`5D.here := false; X`7BA person is considered here upon getting `5De_walkin. The room's process V is X considered here upon e_assign`7D X indx`5Bi_ingame`5D.on`5Bsendlog`5D := true; X wl(name`5Bna_player`5D.id`5Bsendlog`5D+' now roams the land.'); X if window_name = 'Who list' then add_x(name`5Bna_player`5D.id`5Bsendlog` V5D); X assign_channel(s,person`5Bsendlog`5D.channel); X end; Xend; X Xe_booga:`7Bx,y,feet,head,0,mask`7D Xbegin X remember(sendlog,x,y,p1,p2,p4); X if not unmask(p4,m_invisible) then X begin X plot_special(x,y); X plot_player(sendlog,x,y,p1,p2); X end; Xend; X Xe_bump: Xif (x = pl`5Bnow`5D.where.x) and (y = pl`5Bnow`5D.where.y) and not pl`5Bnow` V5D.sts`5Bps_dead`5D.on Xthen get_bump(sendlog,p1,p2,sendname,s); X Xe_can_spawn:if not spawned_out then X`09act_out(plr`5Bnow`5D.log,e_can_spawn_ack,,,,,,,,,,person`5Bsendlog`5D.cha Vnnel); X Xe_can_spawn_ack:if other_lognum = 0 then other_lognum := sendlog; X Xe_challenge: Xwl('I '+sendname+' do hereby challenge '+name`5Bna_player`5D.id`5Bp1`5D+'!') V; X Xe_deassign:remove_player(sendlog); X Xe_refuse: Xwl('I, '+sendname+', am currently engaged in battle!'); X Xe_reborn: Xbegin X person`5Bsendlog`5D.alive := true; X if in_range(x,y,p1) then wl(name`5Bna_player`5D.id`5Bsendlog`5D+' has been V reborn.'); X fix_scenery(x,y); Xend; X Xe_died:`7Bkillerlog,theirexp,p1=theirpoints,p2=kills,p3=killed`7D Xbegin X person`5Bsendlog`5D.alive := false; X if x <> plr`5Bnow`5D.log then wl(sendname+' has been slain by '+name`5Bna_ Vplayer`5D.id`5Bx`5D+'!') X else X begin X wl('You have slain '+sendname+'!'); X if y > 10 then n := trunc((ln(y) + p1)*p2/p3) X else n := trunc(p1*p2/p3); X change_stat_ex(st_experience,pl`5Bnow`5D.attrib_ex`5Bst_experience`5D+n) V; X if not indx`5Bi_npc`5D.on`5Bsendlog`5D then X change_stat_ex(st_kills,pl`5Bnow`5D.attrib_ex`5Bst_kills`5D + 1); X change_stat(at_points,pl`5Bnow`5D.attrib_max`5Bat_points`5D + n,true); X change_stat(at_points,pl`5Bnow`5D.attrib`5Bat_points`5D + n); X save_player; X end; Xend; X Xe_disappear: Xif person`5Bsendlog`5D.here then Xbegin X plot_special(person`5Bsendlog`5D.loc.x,person`5Bsendlog`5D.loc.y); X unplot_player(sendlog); X if on_screen(person`5Bsendlog`5D.loc.x,person`5Bsendlog`5D.loc.y) then X wl(sendname+' has disappeared!'); Xend; X Xe_drop: Xbegin X fg.object`5Bp2`5D.object.num := p1; X fg.object`5Bp2`5D.loc.x := x; X fg.object`5Bp2`5D.loc.y := y; X map_objects(p1); X if in_range(x,y,p3) then X wl(sendname+' drop a '+s+' to the ground.') X else if in_range(x,y,p3*2) then X wl('You hear a thud in the distance.'); X fix_scenery(x,y); Xend; X Xe_get: Xbegin X forget_foreground_object(p1); X if in_range(x,y,20) then X wl(sendname+' picks up '+s); X fix_scenery(x,y); Xend; X Xe_halt: Xif p1 = plr`5Bnow`5D.log then Xbegin X wl(sendname+' directs a bolt of black light at you!'); X halt; Xend; X Xe_kill:if x = plr`5Bnow`5D.log then do_die(sendlog); X Xe_listen: Xact_out(plr`5Bnow`5D.log,e_noise,pl`5Bnow`5D.where.x,pl`5Bnow`5D.where.y, Xpl`5Bnow`5D.attrib`5Bat_noise`5D,sendlog,,,plr`5Bnow`5D.sound); X Xe_noise: Xif p2 = plr`5Bnow`5D.log then Xif in_range(x,y,p1+pl`5Bnow`5D.attrib`5Bat_perception`5D) then Xwl(soundfrom(x,y)+': '+s); X Xe_move:`7Bx,y,base,size,p3,mask`7D Xif person`5Bsendlog`5D.here then Xbegin X unplot_player(sendlog); X plot_player(sendlog,x,y,p1,p2); X if (x = pl`5Bnow`5D.where.x) and (y = pl`5Bnow`5D.where.y) and not pl`5Bno Vw`5D.sts`5Bps_dead`5D.on then X bump_me(sendname); Xend; X Xe_msg: Xif (p2 = 0) or (p2 = plr`5Bnow`5D.log) then Xbegin X if (p1 = 0) then wl(s) X else if in_range(x,y,p1) then wl(s); Xend; X Xe_open:toggle_door(x,y,p1); X Xe_ping:if (x = plr`5Bnow`5D.log) or (x = 0) then X`09act_out(plr`5Bnow`5D.log,e_pong,,,,,,,,,,y); X Xe_place: Xbegin X with fg.object`5Bp1`5D do X begin X loc.x := x; X loc.y := y; X object.num := p2; X icon := s`5B1`5D; X decompress(p3,base,altitude,moron); X decompress(p4,object.condition,rendition,moron); X end; X map_objects(p1); X fix_scenery(x,y); X if (pl`5Bnow`5D.where.x = x) and (pl`5Bnow`5D.where.y = y) then wl('Ouch!' V); Xend; X X`7Be_process:if p1 = plr`5Bnow`5D.log then setup_room_process;`7D X Xe_status:if p1 = plr`5Bnow`5D.log then Xbegin X writev(s,sendname,':',stat`5Bp2`5D,' ',p3:0,' of ',p4:0,'.'); X wl(s); Xend; X Xe_req_status:if p1 = plr`5Bnow`5D.log then Xact_out(plr`5Bnow`5D.log,e_status,,,sendlog,p2,pl`5Bnow`5D.attrib`5Bp2`5D, Xpl`5Bnow`5D.attrib_max`5Bp2`5D); X Xe_remotepoof: Xif (p1 = pl`5Bnow`5D.where.r) then Xbegin X if person`5Bp2`5D.here then X begin X g_plot(g_circle,person`5Bp2`5D.loc.x,person`5Bp2`5D.loc.y,0,3,0,20,' ',b Vold+reverse); X g_plot(g_circle,person`5Bp2`5D.loc.x,person`5Bp2`5D.loc.y,0,3,0,20,chr(0 V)); X end; X X if p2 = plr`5Bnow`5D.log then X if checkprivs(4) then X begin X writev(s,'You have been requested by ',name`5Bna_player`5D.id`5Bsendlog` V5D, X ' at the ',name`5Bna_room`5D.id`5Bp1`5D,' ',x:0,',',y:0,'.'); X wl(s); X plr`5Bnow`5D.dest.mission := p1; X plr`5Bnow`5D.dest.x := x; X plr`5Bnow`5D.dest.y := y; X end X else X begin X a_loc.x := x; X a_loc.y := y; X a_loc.r := p1; X poof_prime(a_loc); X end; Xend; X Xe_pong:person`5Bsendlog`5D.here := true; X Xe_quit:halt; X Xe_spawn:setup_room_process(p1); X Xe_spell: Xif person`5Bsendlog`5D.here then handle_spell(act); X Xe_walkin:`7Bx,y,base,size,room,mask`7D Xbegin X if pl`5Bnow`5D.where.r = p3 then X begin X name`5Bna_player`5D.id`5Bsendlog`5D := s; X remember(sendlog,x,y,p1,p2,p4); X indx`5Bi_ingame`5D.on`5Bsendlog`5D := true; X if not unmask(p4,m_invisible) then X begin X plot_special(x,y); X plot_player(sendlog,x,y,p1,p2); X end; X if not indx`5Bi_npc`5D.on`5Bsendlog`5D then X act_out(plr`5Bnow`5D.log,e_booga,pl`5Bnow`5D.where.x,pl`5Bnow`5D.where.y V, X`09pl`5Bnow`5D.attrib_ex`5Bst_base`5D,pl`5Bnow`5D.attrib`5Bat_size`5D,, X`09do_mask(not pl`5Bnow`5D.sts`5Bps_dead`5D.on,m_alive,human,m_human, X`09pl`5Bnow`5D.sts`5Bps_invisible`5D.on,m_invisible), X`09name`5Bna_player`5D.id`5Bplr`5Bnow`5D.log`5D,,,person`5Bsendlog`5D.channe Vl); X end; Xend; X Xe_turn_on:turn_on_fg(x,false); Xe_turn_off:turn_off_fg(x,false); Xe_toggle:toggle_fg(x,false); X Xe_walkout: Xif person`5Bsendlog`5D.here then Xbegin X if s <> '' then X wl(name`5Bna_player`5D.id`5Bsendlog`5D+' has entered '+s+'.'); X plot_special(person`5Bsendlog`5D.loc.x,person`5Bsendlog`5D.loc.y); X unplot_player(sendlog); X person`5Bsendlog`5D.here := false; Xend; X Xe_throw: Xbegin X g_plot(g_blip,person`5Bsendlog`5D.loc.x,person`5Bsendlog`5D.loc.y,x,y,0,10 V,s`5B1`5D,p1); X fix_scenery(x,y); X if (pl`5Bnow`5D.where.x = x) and (pl`5Bnow`5D.where.y = y) then wl('Ouch!' V); Xend; X X otherwise wl('Someone logged a bad act.'); X end; Xend; X Xend. $ CALL UNPACK SRACT.PAS;1 1614034597 $ create 'f' Xadd_class('Merchant',1, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`090,0, X`7Bwind`7D`09`090,0, X`7Bfire`7D`09`090,0, X`7Bcold`7D`09`090,0, X`7Belectric`7D`090,0, X`7Bmagic`7D`09`090,0, X`7Bholy`7D`09`090,0, X`7Bself`7D`09`090,0, X`7Bweapon`7D`090,0, X`7Bmissile`7D`090,0, X`7Bpoints`7D`091, X`7Bhealth`7D`0940, X`7Bmana`7D`09`090, X`7Bwealth`7D`090, X`7Bdelay_m`7D`0928, X`7Bsize`7D`09`090, X`7Bheal_speed`7D`0920, X`7Bmana_speed`7D`0930, X`7Bnoise`7D`09`093, X`7Bperception`7D`090, X`7Bspell force`7D`090, X`7Bspell wind`7D`090, X`7Bspell fire`7D`090, X`7Bspell cold`7D`090, X`7Bspell electric`7D0, X`7Bspell magic`7D`090, X`7Bspell holy`7D`090, X`7Bspell self`7D`090, X`7Bspell weapon`7D`0940, X`7Bspell missile`7D`0930 X); X Xadd_class('Fighter',2, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`0920,20, X`7Bwind`7D`09`090,0, X`7Bfire`7D`09`0910,10, X`7Bcold`7D`09`090,0, X`7Belectric`7D`090,0, X`7Bmagic`7D`09`090,0, X`7Bholy`7D`09`090,0, X`7Bself`7D`09`090,0, X`7Bweapon`7D`0940,30, X`7Bmissile`7D`0930,20, X`7Bpoints`7D`0910, X`7Bhealth`7D`09160, X`7Bmana`7D`09`090, X`7Bwealth`7D`095, X`7Bdelay_m`7D`0910, X`7Bsize`7D`09`091, X`7Bheal_speed`7D `0960, X`7Bmana_speed`7D`09180, X`7Bnoise`7D`09`095, X`7Bperception`7D`095, X`7Bspell force`7D`0910, X`7Bspell wind`7D`090, X`7Bspell fire`7D`090, X`7Bspell cold`7D`090, X`7Bspell electric`7D0, X`7Bspell magic`7D`090, X`7Bspell holy`7D`090, X`7Bspell self`7D`090, X`7Bspell weapon`7D`0980, X`7Bspell missile`7D`0960 X); X Xadd_class('Mage',3, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`090,0, X`7Bwind`7D`09`090,0, X`7Bfire`7D`09`0930,30, X`7Bcold`7D`09`090,0, X`7Belectric`7D`0925,25, X`7Bmagic`7D`09`0960,40, X`7Bholy`7D`09`090,0, X`7Bself`7D`09`0910,60, X`7Bweapon`7D`090,0, X`7Bmissile`7D`090,0, X`7Bpoints`7D`097, X`7Bhealth`7D`0975, X`7Bmana`7D`09`0980, X`7Bwealth`7D`097, X`7Bdelay_m`7D`0920, X`7Bsize`7D`09`090, X`7Bheal_speed`7D`09140, X`7Bmana_speed`7D`0930, X`7Bnoise`7D`09`090, X`7Bperception`7D`090, X`7Bspell force`7D`0925, X`7Bspell wind`7D`0935, X`7Bspell fire`7D`0950, X`7Bspell cold`7D`0935, X`7Bspell electric`7D40, X`7Bspell magic`7D`0970, X`7Bspell holy`7D`0925, X`7Bspell self`7D`0930, X`7Bspell weapon`7D`0930, X`7Bspell missile`7D`0920 X); X Xadd_class('Cleric',4, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`090,0, X`7Bwind`7D`09`090,0, X`7Bfire`7D`09`090,0, X`7Bcold`7D`09`0920,20, X`7Belectric`7D`090,0, X`7Bmagic`7D`09`090,0, X`7Bholy`7D`09`0970,70, X`7Bself`7D`09`0950,50, X`7Bweapon`7D`090,0, X`7Bmissile`7D`090,0, X`7Bpoints`7D`099, X`7Bhealth`7D`0985, X`7Bmana`7D`09`0940, X`7Bwealth`7D`093, X`7Bdelay_m`7D`0920, X`7Bsize`7D`09`090, X`7Bheal_speed`7D`0990, X`7Bmana_speed`7D`0955, X`7Bnoise`7D`09`090, X`7Bperception`7D`090, X`7Bspell force`7D`095, X`7Bspell wind`7D`0945, X`7Bspell fire`7D`0920, X`7Bspell cold`7D`0925, X`7Bspell electric`7D10, X`7Bspell magic`7D`0915, X`7Bspell holy`7D`0985, X`7Bspell self`7D`090, X`7Bspell weapon`7D`0975, X`7Bspell missile`7D 15 X); X Xadd_class('Thief',5, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`0920,20, X`7Bwind`7D`09`0930,30, X`7Bfire`7D`09`0940,40, X`7Bcold`7D`09`0930,30, X`7Belectric`7D`0930,30, X`7Bmagic`7D`09`0950,50, X`7Bholy`7D`09`0920,20, X`7Bself`7D`09`0950,80, X`7Bweapon`7D`0920,20, X`7Bmissile`7D`0920,20, X`7Bpoints`7D`0910, X`7Bhealth`7D`09105, X`7Bmana`7D`09`095, X`7Bwealth`7D`0912, X`7Bdelay_m`7D`090, X`7Bsize`7D`09`090, X`7Bheal_speed`7D`0930, X`7Bmana_speed`7D`0980, X`7Bnoise`7D`09`09-5, X`7Bperception`7D`0910, X`7Bspell force`7D`090, X`7Bspell wind`7D`0910, X`7Bspell fire`7D`0910, X`7Bspell cold`7D`090, X`7Bspell electric`7D0, X`7Bspell magic`7D`0920, X`7Bspell holy`7D`090, X`7Bspell self`7D`090, X`7Bspell weapon`7D`0970, X`7Bspell missile`7D`0980 X); X Xadd_class('Archer',6, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`0910,10, X`7Bwind`7D`09`0925,20, X`7Bfire`7D`09`090,0, X`7Bcold`7D`09`090,0, X`7Belectric`7D`090,0, X`7Bmagic`7D`09`090,0, X`7Bholy`7D`09`090,0, X`7Bself`7D`09`090,0, X`7Bweapon`7D`0915,15, X`7Bmissile`7D`0940,40, X`7Bpoints`7D`095, X`7Bhealth`7D`0980, X`7Bmana`7D`09`098, X`7Bwealth`7D`092, X`7Bdelay_m`7D`0922, X`7Bsize`7D`09`090, X`7Bheal_speed`7D`09120, X`7Bmana_speed`7D`09100, X`7Bnoise`7D`09`090, X`7Bperception`7D`095, X`7Bspell force`7D`090, X`7Bspell wind`7D`0910, X`7Bspell fire`7D`090, X`7Bspell cold`7D`090, X`7Bspell electric`7D0, X`7Bspell magic`7D`090, X`7Bspell holy`7D`090, X`7Bspell self`7D`090, X`7Bspell weapon`7D`0950, X`7Bspell missile`7D`09100 X); X Xadd_class('Slayer',7, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`0920,40, X`7Bwind`7D`09`0920,40, X`7Bfire`7D`09`0920,40, X`7Bcold`7D`09`0920,40, X`7Belectric`7D`0920,40, X`7Bmagic`7D`09`0920,40, X`7Bholy`7D`09`0920,40, X`7Bself`7D`09`0920,40, X`7Bweapon`7D`090,0, X`7Bmissile`7D`090,0, X`7Bpoints`7D`09120, X`7Bhealth`7D`09300, X`7Bmana`7D`09`09100, X`7Bwealth`7D`097, X`7Bdelay_m`7D`095, X`7Bsize`7D`09`091, X`7Bheal_speed`7D`0920, X`7Bmana_speed`7D`0910, X`7Bnoise`7D`09`090, X`7Bperception`7D`0920, X`7Bspell force`7D`0970, X`7Bspell wind`7D`0910, X`7Bspell fire`7D`0970, X`7Bspell cold`7D`0970, X`7Bspell electric`7D70, X`7Bspell magic`7D`0970, X`7Bspell holy`7D`0970, X`7Bspell self`7D`09100, X`7Bspell weapon`7D`09100, X`7Bspell missile`7D`09100 X); X Xadd_class('Wizard',8, X`7BArmor element`09chance,magnitude`7D X`7Bforce`7D`09`0920,40, X`7Bwind`7D`09`0920,40, X`7Bfire`7D`09`0920,40, X`7Bcold`7D`09`0920,40, X`7Belectric`7D`0920,40, X`7Bmagic`7D`09`0920,40, X`7Bholy`7D`09`0920,40, X`7Bself`7D`09`0920,40, X`7Bweapon`7D`090,0, +-+-+-+-+-+-+-+- END OF PART 4 +-+-+-+-+-+-+-+-