diff --git a/join-gui2.lua b/join-gui2.lua index 820a42a66f9..f9236d50abe 100644 --- a/join-gui2.lua +++ b/join-gui2.lua @@ -97,7 +97,7 @@ local function plugin() context.chat({message = "done first join"}) - repeat + while not (info.name == "Dialog" or info.name == "Multiplayer Wait") do if context.join then context.join({}) else @@ -106,11 +106,11 @@ local function plugin() events, context, info = coroutine.yield() idle_text("in " .. info.name .. " waiting for leader select dialog") - until info.name == "Dialog" or info.name == "Multiplayer Wait" + end if info.name == "Dialog" then log("got a leader select dialog...") - context.set_result({result = 0}) + context.skip_dialog({}) events, context, info = coroutine.yield() repeat @@ -129,6 +129,11 @@ local function plugin() log("got to a game context...") + repeat + events, context, info = coroutine.yield() + idle_text("in " .. info.name .. " waiting for the last scenario") + until info.scenario_name ~= nil and info.scenario_name().scenario_name == "Multiplayer Unit Test test2" + repeat events, context, info = coroutine.yield() idle_text("in " .. info.name .. " waiting for not game")