| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
import adonthell |
| 18 |
from schedules.mapcharacters import schedule |
| 19 |
import random |
| 20 |
|
| 21 |
|
| 22 |
def _(message): return message |
| 23 |
|
| 24 |
class jelom (schedule.speak): |
| 25 |
|
| 26 |
def __init__ (self, mapcharacterinstance): |
| 27 |
self.myself = mapcharacterinstance |
| 28 |
|
| 29 |
|
| 30 |
self.speech = [_("Someone fetch me a drink!"), \ |
| 31 |
_("That'll teach them fancy Elves a lesson!"), \ |
| 32 |
_("Send them to the cursed island, I say!")] |
| 33 |
self.speech_delay = (30, 60) |
| 34 |
schedule.speak.__init__(self) |
| 35 |
|
| 36 |
self.myself.set_callback (self.goal_reached) |
| 37 |
|
| 38 |
def walk (self): |
| 39 |
if self.myself.posy () == 3: |
| 40 |
self.myself.set_goal (2, 6, adonthell.STAND_NORTH) |
| 41 |
else: |
| 42 |
self.myself.set_goal (2, 3, adonthell.STAND_SOUTH) |
| 43 |
|
| 44 |
def goal_reached (self): |
| 45 |
delay = "%it" % random.randrange (20, 65) |
| 46 |
self.myself.time_callback (delay, self.walk) |
| 47 |
|
| 48 |
def start_talking (self): |
| 49 |
self.myself.launch_action (adonthell.gamedata_player ()) |
| 50 |
adonthell.gamedata_get_character ("Erek Stonebreaker").pause () |
| 51 |
adonthell.gamedata_get_quest ("demo").set_val ("convince_jelom", 3) |