Ejemplo n.º 1
0
def lookout_start_dialogue(args):
    s = Script()
    s.add(Say(_a(args[0]), 'player'))
    s.add_action(Turn('s', 'main.lookout'))
    l = [_b(5), (_b(43) + _b(53 + random.randint(0, 1)))
         ] if scumm.gl.talked_to_lookout == 1 else [
             _b(5), _b(6), _b(7), _b(8), _b(9)
         ]
    s.add(Sayd(l, 'main.lookout'))
    return s
Ejemplo n.º 2
0
 def f(x, y, z):
     scr = s.script
     if 'activate' in s.line:
         for node in s.line['activate']:
             s.dialogue['lines'][node]['active'] = True
     if 'deactivate' in s.line:
         for node in s.line['deactivate']:
             s.dialogue['lines'][node]['active'] = False
     persist = s.line.get('persist', False)
     if not persist:
         s.line['active'] = False
     s1 = Script()
     iid = s1.add(enable_controls(False))
     print('Ok 222 ' + str(iid))
     example.get('dialogue').clearText()
     s.line["clicked"] = s.line.get("clicked", 0) + 1
     if isinstance(scr, str):
         fc: ScriptDesc = mopy.monkey.engine.get_script(scr)
         if not fc:
             print('mmh cannot find script: ' + scr)
             exit(1)
         #fc = getattr(mopy.monkey.engine.data.scripts, scr, None)
         args = s.line.get('args', [])
         print('Ok 223 ' + str(iid))
         dc = RunScript(fc.make(args))
         print('ok 234 = ' + str(iid))
         iid = s1.add_action(dc, after=iid)
     next = s.line.get('next')
     if next:
         s1.add_action(start_dialogue(s.dialogue_id, True, next), after=iid)
     else:
         # check if dialogue has a on_exit script
         on_exit = s.dialogue.get('on_exit')
         if on_exit:
             on_exit_script = getattr(mopy.monkey.engine.data.scripts,
                                      on_exit)()
             if on_exit_script:
                 s1.add(RunScript(on_exit_script), after=iid)
         else:
             pass
             #s.add_action(scumm.actions.ExitDialogue())
     example.play(s1)
Ejemplo n.º 3
0
def lookout_5(args):
    s = Script()
    s.add(Say(_a('squinky'), 'player'))
    if mopy.monkey.engine.data.dialogues['lookout']['lines'][4].get(
            'clicked', 0) == 0:
        s.add(Say(_a(41), 'main.lookout'))
    else:
        s.add(Say(_a(27), 'main.lookout'))
    return s
Ejemplo n.º 4
0
def lookout_7(args):
    s = Script()
    s.add(Say(_a('whoru'), 'player'))
    s.add(Say(_a(30, 31, 32, 33), 'main.lookout'))
    return s
Ejemplo n.º 5
0
def lookout_6(args):
    s = Script()
    s.add(Say(_a('overthisway'), 'player'))
    s.add(Turn('e', 'main.lookout'))
    s.add(Say(_a(15, 16), 'main.lookout'))
    return s
Ejemplo n.º 6
0
def lookout_8(args):
    s = Script()
    s.add(Say(_a('fortune'), 'player'))
    s.add(Say(_a(42), 'main.lookout'))
    return s
Ejemplo n.º 7
0
def lookout_9(args):
    s = Script()
    s.add(Say(_a(22), 'player'))
    s.add(Say(_a(23, 24, 25, 26), 'main.lookout'))
    return s
Ejemplo n.º 8
0
def lookout_4(args):
    s = Script()
    s.add(Say(_a('imguy', 17), 'player'))
    s.add(Say(_a(18, 19, 20, 21), 'main.lookout'))
    scumm.gl.talked_to_lookout = 1
    return s
Ejemplo n.º 9
0
def on_exit_lookout():
    s = Script()
    s.add(Turn('w', 'main.lookout'))
    s.add(al.exit_dialogue())
    return s
Ejemplo n.º 10
0
def lookout_11(args):
    s = Script()
    s.add(Say(_a('bat'), 'player'))
    s.add(Say(_a(39, 40), 'main.lookout'))
    return s
Ejemplo n.º 11
0
def lookout_10(args):
    s = Script()
    s.add(Say(_a('whyguvworried'), 'player'))
    s.add(Say(_a(35, 36, 37), 'main.lookout'))
    return s