Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typeclasses.scripts import Script
- from typeclasses.objects import Object
- import evennia
- class MobScript(Script):
- def at_script_creation(self):
- self.interval = 30 # every 30 seconds
- def at_repeat(self):
- self.obj.teapot()
- class Mob(Object):
- def at_object_creation(self):
- ai = evennia.create_script(key='Mob_AI', typeclass='codes.test.MobScript', obj=self)
- def teapot(self):
- self.location.msg_contents(self.name + ' sings, \'I\'m a little teapot short and stout.\'')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement