Open new window
Last update:

OasisOLC and Deaths Gate script reference

Examples

All of the examples on this page are made as mob receive triggers, to make testing easy.

%damage%

This test trigger will, if the mob it's attached to is given any object, except a dwarven shortsword (vnum 4101), make the mob slap the person giving the item, and hit the player for 10 hit points - without starting a fight.

Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
   if (%object.vnum% != 4101)
     say I don't want that crap!
     slap %actor.name%
     %damage% %actor% 10
     give %object.name% %actor.name%
   end

 

%door%

This test trigger will, if the mob it's attached to is given an object with the name (alias) 'bar gold', make the mob open an exit for the immortal board room, and 10 seconds later close it again. This can be made to check for existing values, so it doesn't remove a valid exit.

Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
   eval number %self.room%
   if (%object.name% == bar gold)
     say Thank you, %actor.name%
     %door% %number% north room 1204
     %door% %number% north description A large set of double doors.
     %door% %number% north flags a
     %door% %number% north name door doors
     say you may leave by going north - but hurry, the portal is hard to hold open.
     wait 10 s
     %door% %number% north purge
   end

%echo%

This trigger sends the message to all non-sleeping chars present. 

Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
   %echo% A hush goes through the gathered people as %actor.name% give %object.name% to %self.name%

%echoaround%

This trigger sends an extra message when giving objects to the mob.

Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
   %echoaround% %actor% %actor.name% hands %object.name% over.
   %send% %actor% You give %object.name% to %self.name%.

%force%

The example trigger sends a lower level player to his recall point, while asking nicely if higher mortals would leave the room..

Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
   say I don't want it!
   return 0
   wait 1
   say Leave me!
   if %actor.level% <= 10
       %force% %actor% recall
   else
     wait 3
     say Please..
   end

%load%

This example will, if the mobile is handed a 'knotted rope' (Note: this is the object alias) give back a 'saber' as a reward.

Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
*** Example by Gatia ***
   if (%object.name% == knotted rope)
   wait 1 sec
   say GOOD! I GOT IT!
   %load% obj 5708
   say here is your reward...
   wait 1 sec
   give saber %actor.name%
   end

%purge%

Remove victim from the game. May not be used on players.

Example missing - working on it

%send%

In the example below, %send% is used, as it often is, in conjuction with %echoaround% to send messages to the char, and another message to the rest of the room.

Trigger Intended Assignment: Mobiles
Trigger Type: Greet , Numeric Arg: 100, Arg list: None
Commands:
*** Example by Walter ***
   wait 2 sec
   %force% %actor% kill zombie
   wait 2 sec
   %force% %actor% Shout HELP, i am being attacked by a zombie.
   wait 5 sec
   say HAHAHA.. No one out smarts the undead.
   wait 2 sec
   %send% %actor% Your life seems to have been sucked away by the zombie.
   %echoaround% %actor% %actor.name% seems to have had his life sucked away by the zombie.
   wait 2 sec
   %send% %actor% You fight helplessly against the zombie.
   %echoaround% %actor% %actor.name% fights helplessly against the zombie.
   wait 10 sec
   %send% %actor% You feel your soul withering.
   %echoaround% %actor% You hear another soul die at heart.

%zoneecho%

Zoneecho echoes message to the zone.

Example missing - working on it

%teleport%

This trigger will teleport anyone saying 'help me' to room 1204.

Trigger Intended Assignment: Mobiles
Trigger Type: Speech , Numeric Arg: 1, Arg list: help me
Commands:
*** Example by Gatia ***
     if %speech%==help me
     wait 1 sec
     say okies, I shall help you!
     wait 2 sec
     em begins chanting...
     %teleport% %actor% 1204
     %force% %actor% look
   end

dg_cast

This allows the holder of a trigger to cast spells. Spells will work for rooms and objects, as well as mobiles.

Example missing - working on it

%asound%

The message is send to all rooms around the mob.

Example missing - working on it

mat

The mobile using mat will perform command in the room where target is found.

Example missing - working on it

mforget

Remove victim from this mobile's memory list. See mremember below.

Example missing - working on it

mgoto

Change this mobile's room number to that of target.

Example missing - working on it

mjunk

The object in the mob's inventory specified is removed from the game. 'Mjunk all' removes all of the objects in the mob's inventory. No message is sent by this command.

Example missing - working on it

mhunt

The mobile will begin to hunt for victim, and engage in combat upon finding them.

Example missing - working on it

mkill

The trigger below is pretty self explanatory. If the player doesn't get out within the 8 seconds of waiting time, he's dead meat.

Trigger Intended Assignment: Mobiles
Trigger Type: Greet-All , Numeric Arg: 100, Arg list: None
Commands:
*** Example by Gatia ***
   if (%actor.vnum% == -1)
     wait 2 sec
     say Welcome to my parlor said the spider to the fly!
     wait 2 sec
     say of course, that spider is a friend of mine!
     wait 2 sec
     cackle
     wait 2 sec
     mkill %actor%
   end

mremember

The victim is placed into this mobile's memory list. The next time the victim is seen by the mobile, the mobile will perform command if set, or execute the memory trigger if no command was provided. When the command is carried out or the script executed, the victim is forgotten.
NOTE: Any mob using the mremeber command MUST have a MEMORY trigger attached. It doesn't matter if the Memory trigger is never called (i.e. Narg 0).

Example missing - working on it

mtransform

This command causes the executing mob to transform into another mob, based on the vnum argument supplied. The hit points, max hit points, position, gold, and experience value will remain those of the original mob but all other statistics and descriptions will be those of the new mob. (The new mob can be made to have all of its normal statistics by using a negative vnum.) The transformation is permanent, tho additional transformations may be performed. No message regarding the transformation is sent to the room. The new mobile will have the same script as the originating mobile, rather than any script normally assigned to the new mobile, and no load trigger will be executed.

Example missing - working on it
© 2005 Thomas Arp (Welcor). All rights reserved.