-- description: gives the option to leave the current level when collecting a stay in level type star\n\nMod by King -- name: Star Choose Exit NAME = "Mario" for i in pairs(gActiveMods) do if gActiveMods[i].relativePath == "64-king-the-memer" then NAME = "King" end end function mario_update(m) if m.playerIndex ~= 0 then return end local STAY_YES_NO = "Do you want to Save?\n//You Bet//Not Now" if get_dialog_id() == DIALOG_013 or get_dialog_id() == DIALOG_014 then if gNetworkPlayers[0].currCourseNum ~= COURSE_NONE then STAY_YES_NO = "Do you want to stay?\n//Sure////No Way" if get_dialog_box_state() == DIALOG_UNK1_AWAIT_DIALOG and get_dialog_response() == 2 then level_trigger_warp(m, WARP_OP_STAR_EXIT) end end end smlua_text_utils_dialog_replace(DIALOG_013, 1, 5, 30, 200, ( "You've collected 100\n".. "coins! "..NAME.." gains more\n".. "power from the castle.\n".. STAY_YES_NO)) smlua_text_utils_dialog_replace(DIALOG_014, 1, 4, 30, 200, ( "Wow! Another Power Star!\n".. NAME.." gains more courage\n".. "from the power of the\n".. "castle.\n".. STAY_YES_NO)) end hook_event(HOOK_MARIO_UPDATE, mario_update)