Working on cleaning some strange behavior when trying to submitting faulty typeclasses to script system. Also fixing bugs here and there.

This commit is contained in:
Griatch 2011-07-03 21:01:06 +00:00
parent dae375d1c4
commit 6cb2b8b745
12 changed files with 301 additions and 141 deletions

View file

@ -23,15 +23,17 @@ class BodyFunctions(Script):
self.key = "bodyfunction"
self.desc = "Adds various timed events to a character."
self.interval = 20 # seconds
#self.repeats = 5 # repeat only a certain number of times
self.start_delay = True # wait self.interval until first call
self.persistent = False
self.persistent = False
def at_repeat(self):
"""
This gets called every self.interval seconds. We make
a random check here so as to only return 30% of the time.
a random check here so as to only return 33% of the time.
"""
if random.random() > 0.66:
#)
if random.random() < 0.33:
# no message this time
return
rand = random.random()