Author Topic: Dig script  (Read 12982 times)

0 Members and 1 Guest are viewing this topic.

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Dig script
« on: January 14, 2009, 03:31:32 am »
In response to a question from Iwku, here is a script that will result in 7 different outcomes, if a player types the command 'dig' in the room. 3 of the options is failure, the rest let the actor find different kinds of objects.

Name: 'room 23160 dig',  VNum: [23105], RNum: [ 4923]
Trigger Intended Assignment: Rooms
Trigger Type: Command, Numeric Arg: 5, Arg list: dig
Commands:
wait 1
 eval number %random.7%
 switch %number%
 case 1
  wait 2 s
  %send% %actor% You dig and dig, but uncover nothing.
  break
 case 2
  wait 2 s
  %send% %actor% The sides of your hole keep collapsing, burying everything even deeper.
  break
 case 3
  wait 2 s
  %send% %actor% This is rather boring. Go look under some stones instead!
  break
 case 4
  if !%shardA%
   wait 2 s
   %send% %actor% You have found a shard! Yay!
   %load% obj 23172 %actor%
   set shardA 1
   global shardA
  else
   %send% %actor% This place seems to be empty.
  endif
  break 
 case 5
  if !%shardB%
  wait 2 s
  %send% %actor% You have found a shard! Yay!
  %load% obj 23176 %actor%
   set shardB 1
   global shardB
  else
   %send% %actor% Is this really worth the effort?
  endif
  break
 case 6
  if !%shardC%
  wait 2 s
  %send% %actor% You have found a piece of broken pottery! Big deal...
  %load% obj 23154 %actor%
   set shardC 1
   global shardC
  else
   %send% %actor% This is really dull work. Go look in some crevices instead!.
  endif
  break
 case 7
  if !%shardD%
  wait 2 s
  %send% %actor% You have found a piece of broken pottery! Big deal...
  %load% obj 23180 %actor%
   set shardD 1
   global shardD
  else
   %send% %actor% Archeaology can be very boring. Go look in some holes instead.
  endif
  break
 done