Example #1
0
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)
Example #2
0
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'))
Example #3
0
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)
Example #4
0
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)
Example #5
0
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)