Code:
Name: 'Questmaster Greet - 3',  VNum: [  138], RNum: [  138]
Trigger Intended Assignment: Mobiles
Trigger Type: Greet , Numeric Arg: 100, Arg list: None
Commands:
* By Rumble of The Builder Academy    builderacademy.net 9091 
* Part of a timed quest to kill a mob or find an object. Trigs 138-144. 
* A simple automated quest so only let players earn up to 50 questpoints.
if %actor.is_pc% && %actor.questpoints% < 50 
  wait 2 sec 
  * Check to see if they are not on a zone 1 quest. 
  if !%actor.varexists(on_quest_zone_1)% 
    say Welcome %actor.name%, are you interested in a simple quest? 
  else 
    *get the values from the player variable 
    extract day 1 %actor.on_quest_zone_1% 
    extract hour 2 %actor.on_quest_zone_1% 
    * Set  this value to the number of mud hours in a mud day 
    set HOURS_IN_DAY 24 
    * Compare the values to the current time 
    * (Your hours per day and days per year vary on each mud.) 
    * (You may also want to check for 'time.year') 
    eval current_ticks (%time.day%/%HOURS_IN_DAY%)+%time.hour% 
    eval start_ticks (%day%/%HOURS_IN_DAY%)+%hour% 
    *find out the time difference in ticks 
    eval ticks_passed %current_ticks%-%start_ticks% 
    *check if 10 ticks (~10 mins) have passed 
    if %ticks_passed% > 10 
      rdelete on_quest_zone_1 %actor.id% 
      say Welcome %actor.name%, are you interested in a simple quest? 
    else 
      say How is your quest going %actor.name%, do you have a quest token or the quest mobs head for me? 
    end 
  end 
end
 
Code:
Name: 'Questmaster Quest Assignment - 3',  VNum: [  139], RNum: [  139]
Trigger Intended Assignment: Mobiles
Trigger Type: Speech , Numeric Arg: 1, Arg list: *
Commands:
* By Rumble of The Builder Academy    builderacademy.net 9091 
* Part of a timed quest to kill a mob or find an object. Trigs 138-144. 
if %actor.varexists(on_quest_zone_1)% 
  *get the values from the player variable 
  extract day 1 %actor.on_quest_zone_1% 
  extract hour 2 %actor.on_quest_zone_1% 
  * Set  this value to the number of mud hours in a mud day 
  set HOURS_IN_DAY 24 
  * Compare the values to the current time 
  * (Your hours per day and days per year vary on each mud.) 
  * (You may also want to check for 'time.year') 
  eval current_ticks (%time.day%/%HOURS_IN_DAY%)+%time.hour% 
  eval start_ticks (%day%/%HOURS_IN_DAY%)+%hour% 
  *find out the time difference in ticks 
  eval ticks_passed %current_ticks%-%start_ticks% 
  *check if 10 ticks (~10 mins) have passed 
  if %ticks_passed% > 10 
    rdelete on_quest_zone_1 %actor.id% 
  else 
    halt 
  end 
end 
if %actor.questpoints% > 50 
  halt 
end 
* This loop goes through the entire string of words the actor says. .car is the
* word and .cdr is the remaining string. 
eval word %speech.car% 
eval rest %speech.cdr% 
while %word% 
  * Check to see if the word is yes or an abbreviation of yes. 
  if yes /= %word% 
    say Very well %actor.name%. Would you like to find an object or hunt a mobile? 
    halt 
  end 
  * Pick a room from 100 to 365. 
  eval loadroom 99 + %random.265%  
  if mobile /= %word% || hunt /= %word% 
    * Load the mob in the random room picked above. 
    %at% %loadroom% %load% m 15 
    say Go kill the quest mob and bring me its head %actor.name%. You only have 10 minutes! 
    * Load an object on the player that counts down from 10 minutes. 
    %load% obj 16 %actor% inv 
    %send% %actor% %self.name% gives you the quest timer. 
    %echoaround% %actor% %self.name% gives %actor.name% the quest timer. 
    set on_quest_zone_1 %time.day% %time.hour% 
    remote on_quest_zone_1 %actor.id% 
    halt 
  elseif object /= %word% || find /= %word% 
    say Go find the quest token and return it to me. You only have 10 minutes %actor.name%! 
    %load% o 15 
    %at% %loadroom% drop quest_token_zone_1 
    %load% obj 16 %actor% inv 
    %send% %actor% %self.name% gives you the quest timer. 
    %echoaround% %actor% %self.name% gives %actor.name% the quest timer. 
    set on_quest_zone_1 %time.day% %time.hour% 
    remote on_quest_zone_1 %actor.id% 
    halt 
  end 
  * End of the loop we need to take the next word in the string and save the 
  * remainder for the next pass. 
  eval word %rest.car% 
  eval rest %rest.cdr% 
done
 
Code:
Name: 'Quest Timer - 16',  VNum: [  140], RNum: [  140]
Trigger Intended Assignment: Objects
Trigger Type: Command , Numeric Arg: 7, Arg list: l
Commands:
* By Rumble of The Builder Academy    tbamud.com 9091
* Part of a timed quest to kill a mob or find an object. Trigs 138-144.
* Let a player see how much time they have left.
if %cmd.mudcommand% == look && timer /= %arg%
  %send% %actor% You have %self.timer% minutes remaining.
  * Let the look timer command still go through so they look at it.
  return 0
else
  return 0
end
 
Code:
Name: 'Quest 10 min Purge - 15, 16, 17',  VNum: [  141], RNum: [  141]
Trigger Intended Assignment: Objects
Trigger Type: Timer , Numeric Arg: 100, Arg list: None
Commands:
* By Rumble of The Builder Academy    tbamud.com 9091
* Part of a timed quest to kill a mob or find an object. Trigs 138-144.
* Attached to quest objects 15-17. Purges itself 10 minutes after loading if 
* player does not finish the quest.
* Make sure timer is being carried by a player.
if %self.carried_by%
  set actor %self.carried_by%
  if %actor.is_pc%
    %send% %actor% Your quest time has run out. Try again.
    * Delete the on quest variable so they can try again.
    rdelete on_quest_zone_1 %actor.id%   
  end
end
* Purge the timer.
%purge% %self%
 
Code:
Name: 'Quest Timer Random - 16',  VNum: [  142], RNum: [  142]
Trigger Intended Assignment: Objects
Trigger Type: Random , Numeric Arg: 10, Arg list: None
Commands:
* By Rumble of The Builder Academy    tbamud.com 9091
* Part of a timed quest to kill a mob or find an object. Trigs 138-144.
* If timer is being carried by a player, warn them every 2 minutes.
if %self.carried_by%
  set actor %self.carried_by%
  if %actor.is_pc%
    %send% %actor% You have %self.timer% minutes remaining.
  end
end
 
Code:
Name: 'Questmaster Receive - 3',  VNum: [  143], RNum: [  143]
Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
* By Rumble of The Builder Academy    tbamud.com 9091
* Part of a timed quest to kill a mob or find an object. Trigs 138-144.
* Check if they are on the quest.
if !%actor.varexists(on_quest_zone_1)%
  say You are not even on a quest %actor.name%.
  * Stop the trig and prevent the item from being given to the mob.
  halt
end
*
wait 1 sec
* If they had the head or the token.
if %object.vnum% == 15 || %object.vnum% == 17
  rdelete on_quest_zone_1 %actor.id%   
  say Well done, %actor.name%.
  * Give them 50 gold and experience. Delete the on quest variable and purge.
  nop %actor.exp(50)%
  nop %actor.gold(50)%
  %purge% %object%
  * Reward them with 1 questpoint. Cheap I know but these quests are not hard.
  nop %actor.questpoints(1)%
  say you have earned 50 gold, 50 xp, 1 questpoint %actor.name%.
else
  say I don't want that!
  * Don't accept the object to prevent overloading the mob with junk.
  return 0.
end
 
Code:
Name: 'Quest Mob Loads Head - 15',  VNum: [  144], RNum: [  144]
Trigger Intended Assignment: Mobiles
Trigger Type: Load , Numeric Arg: 100, Arg list: None
Commands:
* By Rumble of The Builder Academy    tbamud.com 9091
* Part of a timed quest to kill a mob or find an object. Trigs 138-144.
* This is a load instead of a death trig because I want the head to purge 10 
* minutes after loading.
%load% obj 17
 
If this was helpful please 
    vote
 or leave a 
    review 
for TBA.