Open new window
Last update:

OasisOLC and Deaths Gate script reference

Examples

%damage%

This script will first determine which body part that's been injured, how much d amage to do, and which messages to send. Then it will damage the char and send messages.

Trigger Intended Assignment: Rooms
Trigger Type: Enter , Numeric Arg: 100, Arg list: None
Commands:
      * Variable definitions 
   if (%direction% == up)
     set todir down
   else
     set todir up
   end
    
   eval temp %random.6%
       
   switch %temp%
     case 1
       set slip foot
       set hurt hit
       set part head
       eval damage %actor.hitp% / 2 
       break     
     case 2
       set slip hand
       set hurt strain
       set part arm
       eval damage %actor.hitp% / 3
       break
     case 3
       set slip hand
       set hurt hit
       set part knee
       eval damage %actor.hitp% / 4
       break
     case 4
       set slip foot
       set hurt hurt
       set part leg
       eval damage %actor.hitp% / 3
       break
     default
       set slip hand
       set hurt hit
       set part other hand
       eval damage %actor.hitp% / 8
       break
   done
   * the actual trap part :
   wait 1    
   %send% %actor% As you step %todir%, your %slip% slips and you %hurt% your %part%. OUCH!
   %echoaround% %actor% As %actor.name% steps %todir%, %actor.hisher% %slip% slips and %actor.heshe% %hurt%s %actor.hisher% %part%. It looks painful.
            
   %damage %actor% %damage%

 

%door%

This script will, if in the right room, and using the command 'pull tapestries' make a new exit to the east.
The exit is a closed, locked, and pickproof and pickproof door with the keyword 'vault'. It can be unlocked (only) by the key with vnum 4034 and leads to 4068.

Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: pull
Commands:
      if ("%arg%" == "tapestries")
   wsend %actor% You pull the tapestries down, and reveal a secret vault!
   wechoaround %actor% As %actor.name% pulls the tapestries down a secret vault is revealed.
   wdoor 4067 east flags abcd
   wdoor 4067 east key 4034
   wdoor 4067 east name vault
   wdoor 4067 east room 4068 
   else
   wsend %actor% Pull what ?!
   end

%echo%

This script just adds some atmosphere.

Trigger Intended Assignment: Rooms
Trigger Type: Global Random , Numeric Arg: 23, Arg list: None
Commands:
      %echo% A light breeze picks up, causing the leaves to rustle quietly.
   wait 200
   %echo% Nearby, a bird chirps its greetings to the world.
   wait 200
   %echo% A rabbit hops across the path, pursued by a wily red fox.

%echoaround%

This little script gives a good, solid idea of the kind of room the actor is teleported to in the last lines. Brrr..

Trigger Intended Assignment: Rooms
Trigger Type: Enter , Numeric Arg: 100, Arg list: None
Commands:
      wait 4 s
   %echo% Suddenly, a black trickle appears in the snowy white. Another trickle branches 
   %echo% off from it. The small streams divide, and each one expands. They form into 
   %echo% circles, and slowly fill the circles with blackened darkness. The great ocean 
   %echo% of darkness rages and storms, struggling against the white force. It slowly, 
   %echo% slowly expands, covering the pure force.
   wait 3 s
   %echo% Only a small circle of purity is left... the darkness rages around it, and 
   %echo% slowly covers it, completely this time.
   wait 3 s
   %echo% Done. There is no sign for the pure gleam which ruled this space before.
   wait 4 s
   %echoaround% %actor% The darkness trickles on %actor.name%'s leg, slowly covering it.
   %echoaround% %actor% It slowly expands upwards, towards %actor.hisher%'s face...
   %echoaround% %actor% %actor.name% Sends a dreadful scream into the air, as the darkness
   %echoaround% %actor% completely covers %actor.hisher%.
   wait 1 s
   %send% %actor% The darkness trickles on your leg, expanding, and heading towards your face!
   %send% %actor% The darkness slowly covers your face, choking you.
   wait 1 s
   %teleport% %actor% 17406
   %send% %actor% Suddenly, the darkness completely uncovers you, leaving you gaping for air.
   wait 1 s
   %force% %actor% look

%force%

This little (useless :P) script teleports the actor to another place, and makes him look, to see the description.

Trigger Intended Assignment: Rooms
Trigger Type: Enter , Numeric Arg: 100, Arg list: None
Commands:
   wait 1 s
   %echo% A powerful force drags you down.
   %teleport% %actor% 3001
   %force% %actor% look

%load%

In this case, load 3 instances of the mob with vnum 13542 (a marsh tentacle) which is aggressive towards good and neutral.

Trigger Intended Assignment: Rooms
Trigger Type: Enter , Numeric Arg: 100, Arg list: None
Commands:
      wait 1 s
   %echo% Tentacles reach out from the fog, trying to fight you!
   %load% mob 13542
   %load% mob 13542
   %load% mob 13542

%purge%

This script checks if there are any mobs in the room. If there is, they each have 50% chance of being destroyed.
Note, that the script is only run if players are in the zone and then only 5% of the time.

Trigger Intended Assignment: Rooms
Trigger Type: Random , Numeric Arg: 5, Arg list: None
Commands:
      eval target %self.people%
      while %target%
        eval tmp_target %target.next_in_room%
        if %target.vnum% != -1  && %random.2% != 1
          %echo% The gods destroy %target.name%
          purge %target%
        end
        eval target %tmp_target%
      done   
 

%send%

The trigger opens the door for dwarven players. The %send% is used - as it usually is - in conjunction with %echoaround% which sends a message to the others in the room.

Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: e
Commands:
      if (%cmd%==e || %cmd%==east%)
     if (%actor.race%==dwarf)
       %send% %actor% The door vanishes as if it was never there, and you step through.
       %echoaround% %actor% As %actor.name% steps through the doorway, the door disappears for an instant.
       %teleport% %actor% 4011
      %echoaround% %actor% %actor.name% has arrived.
       %force% %actor% look
       return 1
     else
       return 0
     end
   end

%zoneecho%

The above script constantly, and with no pauses send a message every 20th second, adding to the atmosphere (and annoyance :P) of the zone.

Trigger Intended Assignment: Rooms
Trigger Type: Global Random , Numeric Arg: 100, Arg list: None
Commands:
   eval line %random.6%
   switch %line%
     case 1
       wait 20 s
       %zoneecho% %self.vnum% A cold wind sweeps through from the north.
       break
     case 2
       wait 20 s
       %zoneecho% %self.vnum% Thunder rumbles in the distance.
       break
     case 3
       wait 20 s
       %zoneecho% %self.vnum% You hear a strange sound.
       break
     case 4
       wait 20 s
       %zoneecho% %self.vnum% You feel something brush against your foot.
       break
     case 5
       wait 20 s
       %zoneecho% %self.vnum% A cold wind sweeps through from the north.
       break
     default
       wait 20 s
       %zoneecho% %self.vnum% A chilly breeze from the north sends shivers through you.
     break
   done

%teleport%

Obviously, this script sends people to the room 9101 if they aren't carrying the 'tome'.

Trigger Intended Assignment: Rooms
Trigger Type: Enter , Numeric Arg: 100, Arg list: None
Commands:
   %send% %actor% As you fly over the chasm you feel a tingling sensation throughout your body.
   wait 1
   eval tome %actor.eq(hold)%
   if %tome.vnum% == 9112
     %send% %actor% Your %tome.shortdesc% vibrates and grows warm to the touch.
     %send% %actor% A very strong gust of wind blows, but you are unaffected.
     halt
   end
   %send% %actor% A huge gust of wind blows and you are swept away like a feather!
   %teleport% %actor% 9101
   %force% %actor% look

dg_cast

This script gives a reward/punishment depending on which items are dropped.

Trigger Intended Assignment: Rooms
Trigger Type: Drop , Numeric Arg: 100, Arg list: None
Commands:
   %send% %actor% As you drop the %object.shortdesc%, a loud humming starts to come from the walls.
   wait 1
   eval worth %object.cost% / 100
   switch %worth%
     case 0
       %send% %actor% Your offering was NOT sufficient.
       dg_cast 'magic missile' %actor%
       break
     case 1
       %send% %actor% Your offering was just sufficient.
       dg_cast 'cure light' %actor%
       dg_cast 'clot minor' %actor%
       %purge% %object%
       break
     case 2
       %send% %actor% Your offering was sufficient.
       dg_cast 'refresh' %actor%
       %purge% %object%
       break
     default
       %send% %actor% Your offering was as it must be.
       dg_cast 'invisibility' %actor%
       %purge% %object%
       break
   done

%asound%

Again, often used to create some atmosphere in a zone, this little script sends a message to the surrounding rooms every 20 seconds, as long as someone is in the zone.

Trigger Intended Assignment: Rooms
Trigger Type: Random , Numeric Arg: 100, Arg list: None
Commands:
   %asound% You hear a blood chilling howl from near by"
   wait 20 s

© 2005 Thomas Arp (Welcor). All rights reserved.