Difference between revisions of "Spec timed teleport"

From The Final Challenge Wiki
Jump to navigation Jump to search
m (moved Spec timed action to Spec timed teleport: Making spec more specific to teleport)
(Revised spec)
Line 1: Line 1:
spec_timed_action is a [[Mob Extended Function]].  It causes the mob to perform a specific action periodically at a specified (MUD) time.
spec_timed_teleport is a [[Mob Extended Function]].  It causes the mob to teleport periodically at a specified (MUD) time.


Usage:
Usage:


N <mob vnum> spec_timed_action <action number> <two digit hour> <before action string vnum or -1> <after action string vnum or -1> -1
N <mob vnum> spec_timed_teleport <two digit hour> <chance> <before action string vnum or -1> <after action string vnum or -1> -1


{| class="wikitable"
{| class="wikitable"
Line 15: Line 15:
|Action Number
|Action Number
|Specifies the action to perform
|Specifies the action to perform
|-
|Hour 
| Two digit hour in 24-hour clock (e.g. 2pm = 14)
|-
|Chance
|Chance that the action will trigger. -1 or 0 indicates that the teleport will trigger every time at the given time.  Otherwise:
   {| class="wikitable"
   {| class="wikitable"
   |-
   |-
Line 21: Line 27:
   |-
   |-
   | 1
   | 1
   | Chance of Teleport
   | 1 in 2 chance
   |-
   |-
   | 2
   | 2
   | Unconditional Teleport
   | 1 in 4 chance
  |-
  | 3
  | 1 in 8 chance
  |-
  | 4
  | 1 in 16 chance
  |-
  | 5
  | 1 in 32 chance
  |-
  | 6
  | 1 in 64 chance
  |-
  | ''n''
  | 1 in 2<sup>''n'' chance</sup>
   |}
   |}
|-
|Hour 
| Two digit hour in 24-hour clock (e.g. 2pm = 14)
|-
|-
|Before Action Text
|Before Action Text
Line 38: Line 56:


Example:<BR><BR>
Example:<BR><BR>
'''N 1200 spec_timed_action 1 21 2788 -1 -1 * Spec assigned to mob vnum 1200'''. At hour 21 (9pm), perform action 1 (teleport).  Display string defined with vnum 2788.<BR><BR>
'''N 1200 spec_timed_teleport 21 3 2788 -1 -1 * Spec assigned to mob vnum 1200'''. At hour 21 (9pm), there's a 1 in 8 chance that the mob will be teleported.  Display string defined with vnum 2788 prior to teleport.<BR><BR>

Revision as of 11:24, 8 April 2012

spec_timed_teleport is a Mob Extended Function. It causes the mob to teleport periodically at a specified (MUD) time.

Usage:

N <mob vnum> spec_timed_teleport <two digit hour> <chance> <before action string vnum or -1> <after action string vnum or -1> -1

Field Description
Mob Vnum The vnum of the mob that this special function should be attached to
Action Number Specifies the action to perform
Hour Two digit hour in 24-hour clock (e.g. 2pm = 14)
Chance Chance that the action will trigger. -1 or 0 indicates that the teleport will trigger every time at the given time. Otherwise:
Value Description
1 1 in 2 chance
2 1 in 4 chance
3 1 in 8 chance
4 1 in 16 chance
5 1 in 32 chance
6 1 in 64 chance
n 1 in 2n chance
Before Action Text -1 is no message before the action is taken. Otherwise, description vnum specified in the #STRINGS section.
After Action Text -1 is no message after the action is taken. Otherwise, description vnum specified in the #STRINGS section.

Example:

N 1200 spec_timed_teleport 21 3 2788 -1 -1 * Spec assigned to mob vnum 1200. At hour 21 (9pm), there's a 1 in 8 chance that the mob will be teleported. Display string defined with vnum 2788 prior to teleport.