objectdef BotController
{
    variable string target = ""

    method Initialize()
	{
		LGUI2:LoadPackageFile["${LavishScript.HomeDirectory}/scripts/mr/ui/test.json"]
    }

	method Shutdown()
	{
		LGUI2:UnloadPackageFile["${LavishScript.HomeDirectory}/scripts/mr/ui/test.json"]
	}

    method GetTarget()
    {
        echo "GetTarget"
        Event[OnGetTarget]:Execute
    }

    method OnClose()
    {
        echo "OnClose"
        Event[OnCloseButtonClicked]:Execute
        Script:End
    }
}


variable(global) BotController MRBotController

function main() 
{
    while 1
    {
        wait 5
    }
}