def on_exit_storekeeper(): s = Script() s.add_action(scumm.actions.ExitDialogue()) # resume script unless storekeeper is away if vars.items['storekeeper']['room'] == 'store': s.add_action(actions.ResumeScript(s='_storekeeper')) example.play(s)
def cook_upset(cook, s): f = cook.flipx s.add_action(actions.SuspendScript(s='cook')) s.add_action(actions.Turn(tag='cook', dir='e')) s.add_action(actions.Say(lines=['$lines/32', '$lines/33'], tag='cook')) s.add_action(actions.Turn(tag='cook', dir='w')) s.add_action(actions.Animate(tag='cook', anim='walk_e', flipx=f)) s.add_action(actions.ResumeScript(s='cook'))
def pippolandia(): s = Script() s.add_action( scumm.actions.Say(tag='player', font='monkey', lines=a.make_lines(['$dialogues/storekeeper/11']))) s.add_action( scumm.actions.Say(tag='storekeeper', font='monkey', lines=a.make_lines(['$dialogues/storekeeper/12']))) s.add_action(scumm.actions.ExitDialogue()) s.add_action(actions.ResumeScript(s='_storekeeper')) example.play(s)
def cook_upset(aa, ba, open_door): # cook is in scummbar if open_door: s = a.Scripts.set_door('open')(aa, ba) else: s = a.Scripts.walk('scummbar_kitchen_door') rv = monkey.engine.read cook: example.Wrap1 = example.get('cook') if cook.valid and cook.x > 320: s.add_action(actions.SuspendScript(s='cook')) s.add_action(scumm.actions.Turn(tag='cook', dir='e')) s.add_action(scumm.actions.Say(lines=[rv('$lines/32'), rv('$lines/33')], tag='cook', font='monkey')) s.add_action(scumm.actions.Turn(tag='cook', dir='w')) s.add_action(actions.Animate(tag='cook', anim='walk_e')) s.add_action(actions.ResumeScript(s='cook')) example.play(s)
def on_entry_storekeeper(): s = Script() s.add_action(actions.SuspendScript(s='_storekeeper')) if ('sword' in vars.inventory) or ('shovel' in vars.inventory): s.add_action(scumm.actions.InitDialogue('storekeeper')) else: s.add_action( scumm.actions.Say(tag='player', font='monkey', lines=a.make_lines(['$dialogues/storekeeper/11' ]))) s.add_action( scumm.actions.Say(tag='storekeeper', font='monkey', lines=a.make_lines(['$dialogues/storekeeper/12' ]))) s.add_action(scumm.actions.ExitDialogue()) s.add_action(actions.ResumeScript(s='_storekeeper')) example.play(s)