4Dimensions Forum
June 19, 2013, 09:38:33 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: This forum is very active and we are here to help.
Click here to get back to the main website: http://4dimensions.org
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Dig script  (Read 8449 times)
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 619


View Profile
« 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

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!