evennia.contrib.tutorials.bodyfunctions.bodyfunctions

Script example

Griatch - 2012

Example script for testing. This adds a simple timer that has your character make observations and notices at irregular intervals.

To test, use

script me = tutorial_examples.bodyfunctions.BodyFunctions

The script will only send messages to the object it is stored on, so make sure to put it on yourself or you won’t see any messages!

class evennia.contrib.tutorials.bodyfunctions.bodyfunctions.BodyFunctions(*args, **kwargs)[source]

Bases: evennia.scripts.scripts.DefaultScript

This class defines the script itself

at_script_creation()[source]

Only called once, when script is first created.

at_repeat()[source]

This gets called every self.interval seconds. We make a random check here so as to only return 33% of the time.

send_random_message()[source]
exception DoesNotExist

Bases: evennia.scripts.scripts.DefaultScript.DoesNotExist

exception MultipleObjectsReturned

Bases: evennia.scripts.scripts.DefaultScript.MultipleObjectsReturned

path = 'evennia.contrib.tutorials.bodyfunctions.bodyfunctions.BodyFunctions'
typename = 'BodyFunctions'