| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
import adonthell |
| 17 |
import events |
| 18 |
|
| 19 |
def _(message): return message |
| 20 |
|
| 21 |
class to_storage(object): |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
def __init__ (self, eventinstance, smdest, xdest, ydest, destdir): |
| 29 |
self.smdest = smdest |
| 30 |
self.xdest = xdest |
| 31 |
self.ydest = ydest |
| 32 |
self.destdir = destdir |
| 33 |
|
| 34 |
def run (self, submap, x, y, dir, name): |
| 35 |
p = adonthell.gamedata_get_character (name) |
| 36 |
|
| 37 |
|
| 38 |
locked = adonthell.gamedata_get_quest ("demo").get_val("pantry_locked") |
| 39 |
if locked == 0 or locked == 1: |
| 40 |
adonthell.gamedata_get_quest ("demo").set_val("pantry_locked", 1) |
| 41 |
p.stand () |
| 42 |
p.go_east () |
| 43 |
p.speak (_("The door to the pantry is locked.")) |
| 44 |
else: |
| 45 |
events.switch_submap (p, self.smdest, self.xdest, self.ydest, self.destdir) |