| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
import adonthell |
| 19 |
from schedules.mapcharacters import schedule |
| 20 |
import random |
| 21 |
|
| 22 |
def _(message): return message |
| 23 |
|
| 24 |
class tristan (schedule.speak): |
| 25 |
|
| 26 |
def __init__ (self, mapcharacterinstance): |
| 27 |
self.myself = mapcharacterinstance |
| 28 |
|
| 29 |
|
| 30 |
self.speech = [_("Don't they know that I am losing money by the hour!?"), \ |
| 31 |
_("What a fuss about a few worthless gems!"), \ |
| 32 |
_("Ye gods! It cannot be that hard to find the thief!")] |
| 33 |
self.speech_delay = (20, 55) |
| 34 |
schedule.speak.__init__(self) |
| 35 |
|
| 36 |
self.walk_delay = "75t" |
| 37 |
self.myself.set_callback (self.goal_reached) |
| 38 |
|
| 39 |
def walk (self): |
| 40 |
|
| 41 |
if self.myself.submap () == 1 and \ |
| 42 |
adonthell.gamedata_get_quest ("demo").get_val ("intro_on") == 0: |
| 43 |
self.myself.set_goal (13, 8, adonthell.STAND_SOUTH) |
| 44 |
self.walk_delay = "%it" % random.randint (60, 90) |
| 45 |
|
| 46 |
|
| 47 |
else: |
| 48 |
self.myself.set_goal (18, 13, adonthell.STAND_NORTH) |
| 49 |
self.walk_delay = "%it" % random.randint (45, 90) |
| 50 |
|
| 51 |
def goal_reached (self): |
| 52 |
|
| 53 |
if self.myself.submap () == 1 and self.myself.posx () == 13: |
| 54 |
self.myself.set_goal (4, 6, adonthell.STAND_WEST) |
| 55 |
|
| 56 |
elif self.myself.submap () == 0 and self.myself.posx () == 18: |
| 57 |
self.myself.set_goal (12, 18, adonthell.STAND_WEST) |
| 58 |
|
| 59 |
else: |
| 60 |
self.myself.time_callback (self.walk_delay, self.walk) |