#3100 Mayor Gate Lock/Unlock~ 0 c 100 dg_script3100_mayorwake~ if %actor.vnum% != 3104 halt end if %arg% == open eval IsOpening 1 elseif %arg% == close eval IsOpening 0 else halt end eval Path wake W hello W S W W S good S W W S S W door N N N N N N N vandal N N door E E E E good E E E E door W W W W good S S good S S S view E E S S E hello E sleep while %Path.strlen% > 0 if !%self.fighting% eval Action %Path.car% eval Path %Path.cdr% switch %Action% case wake wake groan stand break case sleep sit sleep break case keycheck if %self.eq(17)% != 3112 remove all junk all %load% obj 3112 hold key end case hello say Hello, honey! smirk break case view say What a view! I must get something done about that dump! break case vandal say Vandals! Youngsters nowadays have no respect for anything! break case good say Good day, citizens! break case door if %IsOpening% unlock gate wait 1 open gate wait 1 s say I hereby declare the market open! else close gate wait 1 lock gate wait 1 s say I hereby declare Midgaard closed! end break default %Action% break done end wait 3 s done ~ #3101 Hometown Registration~ 0 c 100 reg~ if %cmd.mudcommand% != register return 0 halt end if !%arg% %send% %actor% Where?? return 1 halt end %send% %actor% Okay. return 1 wait 3 if %actor.coins% < 10000 'Sorry, %actor.name%, but you don't have enough cash. halt end eval TheHome 0 cap_str Name %arg% %echo% The Secretary shuffles through some paper. wait 3 s if %arg% == midgaard if %actor.home% == 1 eval TheHome -1 else eval TheHome 1 nop %actor.home(1)% end elseif %arg% == anapest if %actor.home% == 2 eval TheHome -1 else eval TheHome 2 nop %actor.home(2)% end end if %TheHome% == 0 'Sorry, %actor.name%, but I haven't heard of that city. halt end if %TheHome% == -1 'But your hometown is ALREADY %Name%, %actor.name%! halt end nop %actor.coins(-10000)% 'Okay, %actor.name%, your hometown is now %Name%. ~ #3102 Friendly Person~ 0 d 2 *~ if %speech% /= hello || %speech% /= hi || %speech% /= greet switch %random.3% case 1 eval resp Hello, there. break case 2 eval resp Hi. break case 3 if %time.hour% > 17 eval daypart evening elseif %time.hour% > 11 eval daypart afternoon else eval daypart morning end eval resp Good %daypart%. break done eval lastmatch hello elseif %speech% /= where || %speech% /= find || %speech% /= locat if %lastmatch% == hello if %speech% /= fountain || %speech% /= water eval resp It's right in the middle of Market Square. elseif %speech% /= rent || %speech% /= inn || %speech% /= bar eval resp You can find the Grunting Boar Inn directly east of the temple square. elseif %speech% /= ale || %speech% /= drink || %speech% /= mug eval resp A good mug of ale can be found at the Grunting Boar Inn directly east of the temple square. elseif %speech% /= food || %speech% == bread eval resp You might try the bakery, which is in the northwest corner of Market Square. else switch %random.3% case 1 eval resp Sorry, I've never heard of that. break case 2 eval resp Never heard of that place. break case 3 eval resp Don't ask me... break done end eval lastmatch where elseif %lastmatch% == where eval resp How about purchasing a map? eval lastmatch whereneg elseif %lastmatch% == whereneg eval resp Go away. eval lastmatch whereneg else eval resp Why should I tell you? eval lastmatch whereneg end else eval resp NOTHING end if %resp% != NOTHING wait %random.40% say %resp% global lastmatch end ~ #3103 FP Wander Clear~ 0 i 100 ~ eval lastmatch NOTHING global lastmatch ~ #3105 Torch Snuffing Duties (Crier)~ 0 q 7 ~ *********************** * wait until 07:00 *********************** * Snuff Torches if (%self.position% < 8) halt end emote stares at the rising sun. wait %random.3% s say Looks like I should blow out the torches in the hall. wait 2s shrug while %self.room% != 3000 if (%self.position% < 8) halt end pathto movedir 3000 %movedir% wait %random.3% s done dg_script3047_torchtransform off emote pours water over the lit torch. wait 2s while %self.room% != 3014 if (%self.position% < 8) halt end pathto movedir 3014 %movedir% wait %random.3% s done ~ #3106 Torch Lighting Duties (Crier)~ 0 q 18 ~ *********************** *wait until 18:00 *********************** * Light Torches if (%self.position% < 8) halt end wait %random.3% s say Wow it's getting dark. Good evening and goodbye, I have duties. wait 2s while %self.room% != 3000 if (%self.position% < 8) halt end pathto movedir 3000 %movedir% wait %random.3% s done dg_script3047_torchtransform on emote lights the torch. wait 2s say Much better! while %self.room% != 3014 if (%self.position% < 8) halt end pathto movedir 3014 %movedir% wait %random.3% s done ~ #3111 Cityworker~ 0 q 5 ~ *Starts at 05:00 wait %random.10%s wake wait 3s yawn say God! I'm tired. *********************** wait until 06:00 *********************** * Wake mayor stand say Lets wake him up. east wait 2s emote yells, 'WAKE UP!' wait 1s dg_script3100_mayorwake open west wait 2s sit workerdesk *********************** wait until 08:00 *********************** * Check Gates eval gateTo 3039+%random.2% while %self.room% != %gateTo% pathto movedir %gateTo% %movedir% wait %random.2%s done wait 2s wait %random.4%s emote looks around. wait 2s say Everything looks like it's being taken care of. wait until 09:00 say I have to go check out the other gate now. Have a good day. wait 2s if gateTo == 3040 eval gateTo 3041 else eval gateTo 3040 end while %self.room% != %gateTo% pathto movedir %gateTo% %movedir% wait %random.2%s done wait 2s wait %random.4%s emote looks around. wait 2s say OK! Well all is under control. *********************** wait until 10:00 *********************** * Clean Donation Rooms while %self.room% != 3063 pathto movedir 3063 %movedir% wait %random.2%s done north mjunk all wait 2s get all wait 2s put all pot wait 2s south wait 1s east wait 2s get all wait 2s put all pot wait 2s west wait 1s south wait 2s get all wait 2s put all pot mjunk all *********************** wait until 11:00 *********************** * Check On Jail while %self.room% != 3075 pathto movedir 3075 %movedir% wait %random.2%s done emote looks arround. wait 2s north wait 3s look crusty wait 2s emote looks into the cell. wait 1s get all mjunk all wait 1s say God this place creeps me out. wait 4s while %self.room% != 3137 pathto movedir 3137 %movedir% wait %random.2%s done sit workerdesk *********************** wait until 16:00 *********************** * Check Gates stand eval gateTo 3039+%random.2% while %self.room% != %gateTo% pathto movedir %gateTo% %movedir% wait %random.2%s done wait 2s wait %random.4%s emote looks around. wait 2s say Everything looks like it's being taken care of. wait until 17:00 say I have to go check out the other gate now. Good Evening. wait 2s if gateTo == 3040 eval gateTo 3041 else eval gateTo 3040 end while %self.room% != %gateTo% pathto movedir %gateTo% %movedir% wait %random.2%s done wait 2s wait %random.4%s emote looks around. wait 2s say OK! Well all is under control. ************* wait until 20:00 *********************** * Check Shops wait 3s wake stand set shops 3033 3056 3010 3058 3009 3011 3020 while %shops% while %self.room% != %shops.car% pathto movedir %shops.car% %movedir% wait %random.2%s done wait 3s emote checks the inventory list. wait 2s set shops %shops.cdr% done while %self.room% != 3014 pathto movedir 3014 %movedir% wait %random.2%s done *********************** wait until 22:30 *********************** * Check On Jail while %self.room% != 3075 pathto movedir 3075 %movedir% wait %random.2%s done emote looks arround. wait 2s north wait 3s look crusty wait 2s emote looks into the cell. wait 1s get all mjunk all wait 1s say God this place creeps me out. wait 4s while %self.room% != 3137 pathto movedir 3137 %movedir% wait %random.2%s done sit workerdesk say Working sucks. wait 1s rest wait 5s sleep *This script should then re-execute the next day at 5 am. ~ #3112 Secretary (wakes mayor)~ 0 q 6 ~ *********************** * wait until 06:00 *********************** * Wake mayor stand if (%self.position% < 8) halt end yawn wait 3s say God! I'm tired. wait 4s say Lets awaken the slave driver. wait 5s giggle wait 3s east wait 2s emote yells, 'WAKE UP!' wait 1s dg_script3100_mayorwake open west wait 2s sit desk ~ #3113 Check city Gates (lofthus)~ 0 q 8 ~ *********************** * wait until 08:00 *********************** * Check Gates eval gateTo 3039 + %random.2% while %self.room% != %gateTo% if (%self.position% < 8) halt end pathto movedir %gateTo% %movedir% wait %random.4% s done wait 4s emote looks around. wait 4s say All apeears to be in order. Good work men. wait 3s emote salutes the gate guards. wait 10s if %gateTo% == 3040 eval gateTo 3041 else eval gateTo 3040 end while %self.room% != %gateTo% if (%self.position% < 8) halt end pathto movedir %gateTo% %movedir% wait %random.4% s done wait 2s wait %random.4%s emote looks around. wait 2s say Keep up the good work men. wait 3s emote salutes the gate guards. wait 10s * Head to market square eval gateTo 3014 while %self.room% != %gateTo% if (%self.position% < 8) halt end pathto movedir %gateTo% %movedir% wait %random.4% s done ~ #3114 Check shops (loftus)~ 0 q 17 ~ *********************** * wait until 17:00 *********************** * Check Shops if (%self.position% < 8) halt end set shops 3033 3056 3010 3058 3009 3011 3020 while %shops% while %self.room% != %shops.car% if (%self.position% < 8) halt end pathto movedir %shops.car% %movedir% wait %random.4% s done wait 3s emote checks the inventory list. wait 2s set shops %shops.cdr% done while %self.room% != 3014 if (%self.position% < 8) halt end pathto movedir 3014 %movedir% wait %random.4% s done ~ #3160 Clan Key Teleport~ 1 c 3 ru~ * Teleports holder of object to room with same vnum as object if !(%arg% /= key || %arg% /= clan) return 0 halt end %echo% svnum %self.vnum% if %actor.position% < 5 %send% %actor% In your dreams, or what? return 1 halt end if %actor.fighting% || %actor.has_outlaw% %send% %actor% You rub %self.shortdesc% but nothing happens. %echoaround% %actor% %actor.name% rubs %self.shortdesc%. return 1 halt end %echoaround% %actor% %actor.name% rubs %self.shortdesc% and vanishes in a green glow. %send% %actor% You are briefly surrounded by a green light. %teleport% %actor% %self.vnum% %echoaround% %actor% %actor.name% appears, surrounded by green light. %force% %actor% l return 1 halt ~ #3161 Clan Key Dispenser~ 1 c 7 pre~ if !(%arg% /= clan || %arg% /= dispenser || %arg% /= button) return 0 halt end if !(%actor.vnum% == -1 && %actor.clan% > 0) %send% %actor% But you aren't in a clan! return 1 halt end * %echo% DEBUG: Clan: %actor.clan% Clan Rank: %actor.clanrank% Rank Count %actor.ranksinclan(1)% if !(%actor.clan% == 1 && %actor.clanrank% == %actor.ranksinclan(1)%) %send% %actor% You are not the leader of Clan Dementia. return 1 halt end %load% obj 3160 %echoaround% %actor% %actor.name% presses a button on %self.shortdesc%. %send% %actor% Okay. wait 1 s %echo% A clan key falls onto the ground. return 1 ~ #3163 Clan Key Dispenser (Culex)~ 1 c 7 pre~ if !(%arg% /= clan || %arg% /= dispenser || %arg% /= button) return 0 halt end if !(%actor.vnum% == -1 && %actor.clan% > 0) %send% %actor% But you aren't in a clan! return 1 halt end if !(%actor.clan% == 2 && %actor.clanrank% == %actor.ranksinclan(2)%) %send% %actor% You are not the leader of The Culex. return 1 halt end %load% obj 3163 %echoaround% %actor% %actor.name% presses a button on %self.shortdesc%. %send% %actor% Okay. wait 1 s %echo% A key falls onto the ground. return 1 ~ $~