Attribute VB_Name = "Módulo1"
Function TranslateObject(ByVal objname As String) As String

    Select Case objname
        Case "bathtub"
            TranslateObject = "banheira"
        Case "toybox1"
            TranslateObject = "brinquedos"
        Case "toybox2"
            TranslateObject = "brinquedos2"
        Case "childbed"
            TranslateObject = "camacrianca"
        Case "parentsbed"
            TranslateObject = "camapai"
        Case "youngchildbed"
            TranslateObject = "camayoungchild"
        Case "walldrawing_bathroom"
            TranslateObject = "desenhobox"
        Case "walldrawing_kitchen1"
            TranslateObject = "desenhogeladeira"
        Case "walldrawing_kitchen2"
            TranslateObject = "desenhogeladeira"
        Case "walldrawing_kitchen3"
            TranslateObject = "desenhogeladeira"
        Case "walldrawing_livingroom"
            TranslateObject = "desenhosala"
        Case "walldrawing_bedroom"
            TranslateObject = "drawingsquare2"
        Case "walldrawing_hallway", "parentsroomdrawing"
            TranslateObject = "drawingsquare"
        Case "walldrawing_wardrobe"
            TranslateObject = "desenhoguardaroupa"
        Case "childwardrobe"
            TranslateObject = "guardaroupafilha"
        Case "parentswardrobe"
            TranslateObject = "guardaroupaspais"
        Case "wool1"
            TranslateObject = "novelo1"
        Case "wool2"
            TranslateObject = "novelo2"
        Case "wool3"
            TranslateObject = "novelo3"
        Case "bathroomsink"
            TranslateObject = "piabanheiro"
        Case "bathroomplant"
            TranslateObject = "plantabanheiro"
        Case "sofa"
            TranslateObject = "sofa"
        Case "stereo"
            TranslateObject = "stereo"
        Case "roomtv"
            TranslateObject = "tvquarto"
        Case "vase"
            TranslateObject = "vaso"
        Case "dinnertable"
            TranslateObject = "mesajantar1"
        Case "fighting1"
            TranslateObject = "fightup1"
        Case "fighting2"
            TranslateObject = "fightup2"
        Case "fighting3"
            TranslateObject = "fightup3"
        Case "hallwayvase1"
            TranslateObject = "vasocorredor"
        Case "hallwayvase2"
            TranslateObject = "vasocorredor2"
        Case "study"
            TranslateObject = "schoolagedsit"
        Case "outsidetable"
            TranslateObject = "mesafora1"
        Case Else
            TranslateObject = objname
    End Select
    
End Function

Function GetGoalType(ByVal goalname As String) As Integer
   
   GetGoalType = 0
   Select Case goalname
        Case "changediaper", _
            "disciplines", "disciplinesnoyelling", _
            "stopfight", "sendtobed", "pickuptoys"
            GetGoalType = 1
            
        Case "messes"
            GetGoalType = 3
        
Case "stopjumpingonbed", "stopdrawingonwall", "stopkidsfighting", _
             "stopsleeping", "stopeating", _
             "stopyellingoncel", "stopbasketball", _
             "stopswearwatchingtv", "stopdrinkingmilkbox", _
             "stopkickingcouch"
            GetGoalType = 2
        
        Case "makethechildbed", "organizesofa", "makethebed", "studytime", _
             "dothedishes", "setthetable", "makesdinner", "makesbarbecue", "settheoutsidetable"
            GetGoalType = 4
            
        Case "filldisciplinemeter"
            GetGoalType = 5
            
        Case Else
            GetGoalType = 1

   End Select
  
End Function

Sub GenerateLevel()
Attribute GenerateLevel.VB_ProcData.VB_Invoke_Func = "L\n14"
    Application.ScreenUpdating = False
    
    Dim ListMaxSize As Integer
    Dim ListInitialOffset As Integer
    Dim ListLevelOffset As Integer
    Dim NumberOfLevels As Integer
    
    ListMaxSize = 23
    ListInitialOffset = 3
    ListLevelOffset = 1
    NumberOfLevels = 3
    
    Dim NewFile As String
    Dim CurrentLevelName As String
    Dim CurrentFamilyName As String
       
    CurrentLevelName = ActiveSheet.Name
    CurrentFamilyName = Mid(ActiveWorkbook.Name, 1, Len(ActiveWorkbook.Name) - 4)
    
    NewFile = ActiveWorkbook.Path & "\..\assets\levels_scripts\" & CurrentFamilyName & "\" & CurrentLevelName & ".lua"
    Open NewFile For Output As #1
    
    'File Header
    Print #1, "require( ""levels_scripts/tasksconstants.lua"" );"
    Print #1, ""
    Print #1, "local stopkidsjumpingonbed = 99;"
    Print #1, "local stopkidsdrawingonwall = 99;"
    Print #1, "local stopsleeping = 99;"
    Print #1, "local stopeating = 99;"
    Print #1, "local stopbasketball = 99;"
    Print #1, "local stopyellingoncel = 99;"
    Print #1, "local startsweeping = 60;"
    Print #1, "local startlawning = 60;"
    Print #1, "local startdusting = 60;"
    Print #1, "local startcutting = 60;"
    Print #1, "local startwatering = 60;"
    Print #1, "local stopkickingcouch = 99;"
    Print #1, "local stopswearwatchingtv = 99;"
    Print #1, "local stopdrinkingmilkbox = 99;"
    Print #1, "local startironing = 60;"
    Print #1, "local startvacuuming = 60;"
    Print #1, "local startsqueeging = 60;"
    Print #1, "local stopkidsfighting = 80;"
    Print #1, ""
    Print #1, "day ="
    Print #1, "{"
    
    'Goals
    Print #1, Chr(9) & "-- Goals"
    For goallevel = 1 To 3
    
        Select Case goallevel
            Case 1
                Print #1, Chr(9) & "goals_easy ="
                goaloffset = 0
            Case 2
                Print #1, Chr(9) & "goals_medium ="
                goaloffset = 24
            Case 3
                Print #1, Chr(9) & "goals_hard ="
                goaloffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For goal = 1 To 10
        
            'Dad
            If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value) > 0 Then
                goaltext = ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value
                
                If goaltext = "nap" Then
                    goaltext = "sendtobed"
                End If
                
                Print #1, Chr(9) & Chr(9) & """dad"","
                Print #1, Chr(9) & Chr(9) & """" & goaltext & ""","
                Print #1, Chr(9) & Chr(9) & GetGoalType(goaltext) & ","
                
                If ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopjumpingonbed" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopsleeping" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopeating" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopyellingoncel" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopbasketball" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopkickingcouch" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopswearwatchingtv" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopdrinkingmilkbox" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopkidsfighting" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopkidsdrawingonwall" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "filldisciplinemeter" Then
                                        
                   Select Case ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value
                        Case "stopjumpingonbed"
                            Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                        Case "stopsleeping"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "stopeating"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "stopyellingoncel"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "stopbasketball"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "stopswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "stopdrinkingmilkbox"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "stopkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "stopkidsfighting"
                            Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                        Case "stopkidsdrawingonwall"
                            Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                        Case "filldisciplinemeter"
                            Print #1, Chr(9) & Chr(9) & "100,"
                   End Select
                                        
                Else
                    If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 2).Value) > 0 Then
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 2).Value & ","
                    Else
                        Print #1, Chr(9) & Chr(9) & "1,"
                    End If
                End If
            End If
            
            
            'Mom
            If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value) > 0 Then
                goaltext = ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value
                
                If goaltext = "nap" Then
                    goaltext = "sendtobed"
                End If
                
                Print #1, Chr(9) & Chr(9) & """mom"","
                Print #1, Chr(9) & Chr(9) & """" & goaltext & ""","
                Print #1, Chr(9) & Chr(9) & GetGoalType(goaltext) & ","
                
                   If ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopjumpingonbed" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopsleeping" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopeating" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopyellingoncel" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopbasketball" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopkickingcouch" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopswearwatchingtv" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopdrinkingmilkbox" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopkidsfighting" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopkidsdrawingonwall" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "filldisciplinemeter" Then
                                        
                   Select Case ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value
                        Case "stopjumpingonbed"
                            Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                        Case "stopsleeping"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "stopeating"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "stopyellingoncel"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "stopbasketball"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "stopswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "stopdrinkingmilkbox"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "stopkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "stopkidsfighting"
                            Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                        Case "stopkidsdrawingonwall"
                            Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                        Case "filldisciplinemeter"
                            Print #1, Chr(9) & Chr(9) & "100,"
                   End Select
                                        
                Else
                    If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 4).Value) > 0 Then
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 4).Value & ","
                    Else
                        Print #1, Chr(9) & Chr(9) & "1,"
                    End If
                End If
            End If
            
            'Kids
            If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value) > 0 Then
                goaltext = ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value
                
                If goaltext = "nap" Then
                    goaltext = "sendtobed"
                End If
                
                Print #1, Chr(9) & Chr(9) & """kids"","
                Print #1, Chr(9) & Chr(9) & """" & goaltext & ""","
                Print #1, Chr(9) & Chr(9) & GetGoalType(goaltext) & ","
                
                If ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopjumpingonbed" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopsleeping" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopeating" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopyellingoncel" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopbasketball" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopkickingcouch" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopswearwatchingtv" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopdrinkingmilkbox" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopkidsfighting" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopkidsdrawingonwall" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "filldisciplinemeter" Then
                                        
                   Select Case ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value
                        Case "stopjumpingonbed"
                            Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                        Case "stopsleeping"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "stopeating"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "stopyellingoncel"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "stopbasketball"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "stopswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "stopdrinkingmilkbox"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "stopkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "stopkidsfighting"
                            Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                        Case "stopkidsdrawingonwall"
                            Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                        Case "filldisciplinemeter"
                            Print #1, Chr(9) & Chr(9) & "100,"
                   End Select
                                        
                Else
                    If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 6).Value) > 0 Then
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 6).Value & ","
                    Else
                        Print #1, Chr(9) & Chr(9) & "1,"
                    End If
                End If
            End If
            
        Next goal
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next goallevel
    
    
    'Extra Goals
    'Goals
    Print #1, Chr(9) & "-- Extra Goals"
    For goallevel = 1 To 3
    
        Select Case goallevel
            Case 1
                Print #1, Chr(9) & "extragoals_easy ="
                goaloffset = 11
            Case 2
                Print #1, Chr(9) & "extragoals_medium ="
                goaloffset = 35
            Case 3
                Print #1, Chr(9) & "extragoals_hard ="
                goaloffset = 59
        End Select
        
        Print #1, Chr(9) & "{"
        
        For goal = 1 To 10
        
            'Dad
            If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value) > 0 Then
                goaltext = ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value
                
                If goaltext = "nap" Then
                    goaltext = "sendtobed"
                End If
                
                Print #1, Chr(9) & Chr(9) & """dad"","
                Print #1, Chr(9) & Chr(9) & """" & goaltext & ""","
                Print #1, Chr(9) & Chr(9) & GetGoalType(goaltext) & ","
                
                If ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopjumpingonbed" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopsleeping" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopeating" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopyellingoncel" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopbasketball" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopkickingcouch" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopswearwatchingtv" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopdrinkingmilkbox" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopkidsfighting" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "stopkidsdrawingonwall" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value = "filldisciplinemeter" Then
                                        
                   Select Case ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 1).Value
                        Case "stopjumpingonbed"
                            Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                        Case "stopsleeping"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "stopeating"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "stopyellingoncel"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "stopbasketball"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "stopswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "stopdrinkingmilkbox"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "stopkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "stopkidsfighting"
                            Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                        Case "stopkidsdrawingonwall"
                            Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                        Case "filldisciplinemeter"
                            Print #1, Chr(9) & Chr(9) & "100,"
                   End Select
                                        
                Else
                    If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 2).Value) > 0 Then
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 2).Value & ","
                    Else
                        Print #1, Chr(9) & Chr(9) & "1,"
                    End If
                End If
            End If
            
            'Mom
            If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value) > 0 Then
                goaltext = ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value
                
                If goaltext = "nap" Then
                    goaltext = "sendtobed"
                End If
                
                Print #1, Chr(9) & Chr(9) & """mom"","
                Print #1, Chr(9) & Chr(9) & """" & goaltext & ""","
                Print #1, Chr(9) & Chr(9) & GetGoalType(goaltext) & ","
                
                   If ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopjumpingonbed" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopsleeping" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopeating" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopyellingoncel" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopbasketball" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopkickingcouch" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopswearwatchingtv" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopdrinkingmilkbox" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopkidsfighting" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "stopkidsdrawingonwall" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value = "filldisciplinemeter" Then
                                        
                   Select Case ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 3).Value
                        Case "stopjumpingonbed"
                            Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                        Case "stopsleeping"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "stopeating"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "stopyellingoncel"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "stopbasketball"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "stopswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "stopdrinkingmilkbox"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "stopkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "stopkidsfighting"
                            Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                        Case "stopkidsdrawingonwall"
                            Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                        Case "filldisciplinemeter"
                            Print #1, Chr(9) & Chr(9) & "100,"
                   End Select
                                        
                Else
                    If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 4).Value) > 0 Then
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 4).Value & ","
                    Else
                        Print #1, Chr(9) & Chr(9) & "1,"
                    End If
                End If
            End If
            
            'Kids
            If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value) > 0 Then
                goaltext = ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value
                
                If goaltext = "nap" Then
                    goaltext = "sendtobed"
                End If
                
                Print #1, Chr(9) & Chr(9) & """kids"","
                Print #1, Chr(9) & Chr(9) & """" & goaltext & ""","
                Print #1, Chr(9) & Chr(9) & GetGoalType(goaltext) & ","
                
                If ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopjumpingonbed" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopsleeping" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopeating" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopyellingoncel" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopbasketball" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopkickingcouch" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopswearwatchingtv" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopdrinkingmilkbox" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopkidsfighting" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "stopkidsdrawingonwall" Or _
                   ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value = "filldisciplinemeter" Then
                                        
                   Select Case ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 5).Value
                        Case "stopjumpingonbed"
                            Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                        Case "stopsleeping"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "stopeating"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "stopyellingoncel"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "stopbasketball"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "stopswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "stopdrinkingmilkbox"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "stopkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "stopkidsfighting"
                            Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                        Case "stopkidsdrawingonwall"
                            Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                        Case "filldisciplinemeter"
                            Print #1, Chr(9) & Chr(9) & "100,"
                   End Select
                                        
                Else
                    If Len(ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 6).Value) > 0 Then
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(goal + ListInitialOffset + goaloffset, 6).Value & ","
                    Else
                        Print #1, Chr(9) & Chr(9) & "1,"
                    End If
                End If
            End If
            
        Next goal
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next goallevel
    
    
    'Objects Initial States
    Print #1, ""
    Print #1, Chr(9) & "-- Scenario initial state"
    For initlevel = 1 To 3
        
         toyscounter = 0
         Select Case initlevel
            Case 1
                Print #1, Chr(9) & "objects_initial_states_easy ="
                initoffset = 0
            Case 2
                Print #1, Chr(9) & "objects_initial_states_medium ="
                initoffset = 24
            Case 3
                Print #1, Chr(9) & "objects_initial_states_hard ="
                initoffset = 48
        End Select
    
        
        Print #1, Chr(9) & "{"
        'TranslateObject(ByVal objname As String)
        For objinit = 1 To ListMaxSize
        
            If Len(ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value) > 0 And _
               Mid(TranslateObject(ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value), 1, 13) <> "drawingsquare" And _
               ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value <> "dinnertable" Then
                Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value) & ""","
                Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 9).Value & ""","
                
                If Mid(ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value, 1, 3) = "toy" And Mid(ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value, 1, 4) <> "toyb" And Mid(ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 9).Value, 1, 5) = "dirty" Then
                    toyscounter = toyscounter + 1
                End If
            Else
                If ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value = "dinnertable" Then
                    Print #1, Chr(9) & Chr(9) & """mesajantar4"","
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 9).Value & ""","
                End If
                
                If ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value = "walldrawing_bedroom" Then
                    Print #1, Chr(9) & Chr(9) & """desenhoquarto"","
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 9).Value & ""","
                End If
                
                If ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 8).Value = "parentsroomdrawing" Then
                    Print #1, Chr(9) & Chr(9) & """desenhocorredor"","
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(objinit + ListInitialOffset + initoffset, 9).Value & ""","
                End If
            End If
                       
        Next objinit
        
        Print #1, Chr(9) & "},"
        Print #1, ""
        
        Select Case initlevel
            Case 1
                Print #1, Chr(9) & "toys_on_the_floor_easy = " & toyscounter & ","
            Case 2
                Print #1, Chr(9) & "toys_on_the_floor_medium = " & toyscounter & ","
            Case 3
                Print #1, Chr(9) & "toys_on_the_floor_hard = " & toyscounter & ","
        End Select
        
        Print #1, ""
             
    Next initlevel
    
    'Toddler
    Dim timevar As Integer
    
    Print #1, Chr(9) & "-- jimmy"
    Print #1, Chr(9) & "toddler_initial_state = ""normal"","
    Print #1, Chr(9) & "toddler_initial_node = ""6"","
    Print #1, ""
    
    For toddlertaskslevel = 1 To 3
        
        Select Case toddlertaskslevel
            Case 1
                Print #1, Chr(9) & "toddler_tasks_easy ="
                toddlertasksoffset = 0
            Case 2
                Print #1, Chr(9) & "toddler_tasks_medium ="
                toddlertasksoffset = 24
            Case 3
                Print #1, Chr(9) & "toddler_tasks_hard ="
                toddlertasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For toddleraction = 1 To ListMaxSize
        
            If Len(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 11).Value) > 0 And ((Len(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value) > 0) Or (Len(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 13).Value) > 0)) Then
                'Action
                Select Case ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value
                    Case "familytime"
                        Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Case Else
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 11).Value & ","
                End Select
                
                actionstr = ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value
                'Discipline needed
                If Mid(actionstr, 1, Len("fighting")) = "fighting" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                End If
                
                'Timed?
                If ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 16).Value = "Yes" Then
                    Print #1, Chr(9) & Chr(9) & "timed,"
                    Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 17).Value & "000,"
                End If
                
                'Object/Node
                If Len(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value) > 0 Then
                    Select Case ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value
                        Case "familytime"
                            Print #1, Chr(9) & Chr(9) & """3"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value) & ""","
                        Case Else
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value) & ""","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value) & ""","
                        End Select
                Else 'Node 8 protection (mendonzas only)
                    If ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 13).Value = "8" Then
                        Print #1, Chr(9) & Chr(9) & """57"","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    Else
                        Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 13).Value & ""","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    End If
                End If
                
                'Probability
                If Len(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 14).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 14).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """10"","
                End If
                
                'Repeats
                If Len(ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 15).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 15).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """1"","
                End If
                
                'Linked To
                actionstr = ActiveSheet.Cells(toddleraction + ListInitialOffset + toddlertasksoffset, 12).Value
                
                If Mid(actionstr, 1, Len("diapersquare")) = "diapersquare" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "teleporttoobjectanddo,"
                    Print #1, Chr(9) & Chr(9) & """trocador"","
                    Print #1, Chr(9) & Chr(9) & """trocador"","
                End If
                
                If Mid(actionstr, 1, Len("asksleep")) = "asksleep" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "teleporttoobjectanddo,"
                    Print #1, Chr(9) & Chr(9) & """berco"","
                    Print #1, Chr(9) & Chr(9) & """berco"","
                End If
                
                If Mid(actionstr, 1, Len("dinnertable")) = "dinnertable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild1"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """118"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild2"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """124"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """schoolaged"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """119"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                 End If
                    
                If Mid(actionstr, 1, Len("outsidetable")) = "outsidetable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild1"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """131"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild2"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """130"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """schoolaged"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """132"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                End If
                
            End If
        
        Next toddleraction
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next toddlertaskslevel
    
    'Young Child 1
    Print #1, Chr(9) & "-- steve"
    Print #1, Chr(9) & "youngchild1_initial_state = ""normal"","
    Print #1, Chr(9) & "youngchild1_initial_node = ""29"","
    Print #1, ""
    
    For youngchild1taskslevel = 1 To 3
        
        Select Case youngchild1taskslevel
            Case 1
                Print #1, Chr(9) & "youngchild1_tasks_easy ="
                youngchild1tasksoffset = 0
            Case 2
                Print #1, Chr(9) & "youngchild1_tasks_medium ="
                youngchild1tasksoffset = 24
            Case 3
                Print #1, Chr(9) & "youngchild1_tasks_hard ="
                youngchild1tasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For youngchild1action = 1 To ListMaxSize
        
            If Len(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 19).Value) > 0 And ((Len(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value) > 0) Or (Len(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 21).Value) > 0)) Then
                'Action
                Select Case ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value
                    Case "familytime"
                        Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Case Else
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 19).Value & ","
                End Select
                
                actionstr = ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value
                'Discipline Needed
                If Mid(actionstr, 1, Len("jumpingsquare")) = "jumpingsquare" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                End If
                
                If Mid(actionstr, 1, Len("fighting")) = "fighting" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                End If
                
                If Mid(TranslateObject(actionstr), 1, Len("drawingsquare")) = "drawingsquare" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                End If
                
                                
                'Timed?
                If ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 24).Value = "Yes" Then
                    Print #1, Chr(9) & Chr(9) & "timed,"
                    Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 25).Value & "000,"
                End If
                
                'Object/Node
                If Len(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value) > 0 Then
                    Select Case ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value
                        Case "familytime"
                            Print #1, Chr(9) & Chr(9) & """41"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value) & ""","
                        Case Else
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value) & ""","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 20).Value) & ""","
                    End Select
                Else 'Node 8 protection (mendonzas only)
                    If ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 21).Value = "8" Then
                        Print #1, Chr(9) & Chr(9) & """57"","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    Else
                        Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 21).Value & ""","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    End If
                End If
                
               
                'Probability
                If Len(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 22).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 22).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """10"","
                End If
                
                'Repeats
                If Len(ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 23).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(youngchild1action + ListInitialOffset + youngchild1tasksoffset, 23).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """1"","
                End If
                
                'Linked To
               If Mid(actionstr, 1, Len("dinnertable")) = "dinnertable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """toddler"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """123"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild2"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """124"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """schoolaged"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """119"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                 End If
                    
                If Mid(actionstr, 1, Len("outsidetable")) = "outsidetable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """toddler"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """163"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild2"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """130"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """schoolaged"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """132"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                End If
                
            End If
        
        Next youngchild1action
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next youngchild1taskslevel
    
    
    'Young Child 2
    Print #1, Chr(9) & "-- judy"
    Print #1, Chr(9) & "youngchild2_initial_state = ""normal"","
    Print #1, Chr(9) & "youngchild2_initial_node = ""29"","
    Print #1, ""
    
    For youngchild2taskslevel = 1 To 3
        
        Select Case youngchild2taskslevel
            Case 1
                Print #1, Chr(9) & "youngchild2_tasks_easy ="
                youngchild2tasksoffset = 0
            Case 2
                Print #1, Chr(9) & "youngchild2_tasks_medium ="
                youngchild2tasksoffset = 24
            Case 3
                Print #1, Chr(9) & "youngchild2_tasks_hard ="
                youngchild2tasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For youngchild2action = 1 To ListMaxSize
        
            If Len(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 27).Value) > 0 And ((Len(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value) > 0) Or (Len(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 29).Value) > 0)) Then
                'Action
                Select Case ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value
                    Case "familytime"
                        Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Case Else
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 27).Value & ","
                End Select
                
                actionstr = ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value
                'Discipline Needed
                If Mid(actionstr, 1, Len("jumpingsquare")) = "jumpingsquare" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                End If
                
                If Mid(actionstr, 1, Len("fighting")) = "fighting" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                End If
                
                If Mid(TranslateObject(actionstr), 1, Len("drawingsquare")) = "drawingsquare" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                End If
                                
                'Timed?
                If ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 32).Value = "Yes" Then
                    Print #1, Chr(9) & Chr(9) & "timed,"
                    Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 33).Value & "000,"
                End If
                
                'Object/Node
                If Len(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value) > 0 Then
                    Select Case ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value
                        Case "familytime"
                            Print #1, Chr(9) & Chr(9) & """145"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value) & ""","
                        Case Else
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value) & ""","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 28).Value) & ""","
                    End Select
                Else 'Node 8 protection (mendonzas only)
                    If ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 29).Value = "8" Then
                        Print #1, Chr(9) & Chr(9) & """57"","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    Else
                        Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 29).Value & ""","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    End If
                End If
                

                
                'Probability
                If Len(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 30).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 30).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """10"","
                End If
                
                'Repeats
                If Len(ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 31).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(youngchild2action + ListInitialOffset + youngchild2tasksoffset, 31).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """1"","
                End If
                
                'Linked To
                If Mid(actionstr, 1, Len("dinnertable")) = "dinnertable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild1"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """118"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """toddler"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """123"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """schoolaged"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """119"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                 End If
                    
                If Mid(actionstr, 1, Len("outsidetable")) = "outsidetable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild1"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """131"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """toddler"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """163"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """schoolaged"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """132"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                End If
                
            End If
        
        Next youngchild2action
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next youngchild2taskslevel
    
    'School Aged
    Print #1, Chr(9) & "-- louise"
    Print #1, Chr(9) & "schoolaged_initial_state = ""normal"","
    Print #1, Chr(9) & "schoolaged_initial_node = ""3"","
    Print #1, ""
    
    For schoolagedtaskslevel = 1 To 3
        
        Select Case schoolagedtaskslevel
            Case 1
                Print #1, Chr(9) & "schoolaged_tasks_easy ="
                schoolagedtasksoffset = 0
            Case 2
                Print #1, Chr(9) & "schoolaged_tasks_medium ="
                schoolagedtasksoffset = 24
            Case 3
                Print #1, Chr(9) & "schoolaged_tasks_hard ="
                schoolagedtasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For schoolagedaction = 1 To ListMaxSize
        
            If Len(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 35).Value) > 0 And ((Len(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) > 0) Or (Len(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 37).Value) > 0)) Then
                'Action
                Select Case ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value
                    Case "fighting1", "fighting2", "fighting3", "familytime"
                        Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Case Else
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 35).Value & ","
                End Select
                
                actionstr = ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value
                'Discipline Needed
                If Mid(actionstr, 1, Len("jumpingsquare")) = "jumpingsquare" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsjumpingonbed,"
                End If
                
                If Mid(actionstr, 1, Len("fighting")) = "fighting" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsfighting,"
                End If
                
                If Mid(TranslateObject(actionstr), 1, Len("drawingsquare")) = "drawingsquare" Then
                    Print #1, Chr(9) & Chr(9) & "disciplineneeded,"
                    Print #1, Chr(9) & Chr(9) & "stopkidsdrawingonwall,"
                End If
                
                'Timed?
                If ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 40).Value = "Yes" Then
                    Print #1, Chr(9) & Chr(9) & "timed,"
                    Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 41).Value & "000,"
                End If
                
                'Object/Node
                If Len(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) > 0 Then
                    Select Case ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value
                        Case "fighting1"
                            Print #1, Chr(9) & Chr(9) & """154"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) & ""","
                        Case "fighting2"
                            Print #1, Chr(9) & Chr(9) & """111"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) & ""","
                        Case "fighting3"
                            Print #1, Chr(9) & Chr(9) & """149"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) & ""","
                        Case "familytime"
                            Print #1, Chr(9) & Chr(9) & """19"","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) & ""","
                        Case Else
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) & ""","
                            Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value) & ""","
                    End Select
                Else 'Node 8 protection (mendonzas only)
                    If ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 37).Value = "8" Then
                        Print #1, Chr(9) & Chr(9) & """57"","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    Else
                        Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 37).Value & ""","
                        Print #1, Chr(9) & Chr(9) & """idle"","
                    End If
                End If
                           
                'Probability
                If Len(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 38).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 38).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """10"","
                End If
                
                'Repeats
                If Len(ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 39).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 39).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """1"","
                End If
                
                'Linked To
                actionstr = ActiveSheet.Cells(schoolagedaction + ListInitialOffset + schoolagedtasksoffset, 36).Value
                
                If Mid(actionstr, 1, Len("dinnertable")) = "dinnertable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild1"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """118"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild2"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """124"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """toddler"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """123"","
                    Print #1, Chr(9) & Chr(9) & """mesajantar1"","
                 End If
                    
                If Mid(actionstr, 1, Len("outsidetable")) = "outsidetable" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild1"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """131"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """youngchild2"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """130"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                    
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "order,"
                    Print #1, Chr(9) & Chr(9) & """toddler"","
                    Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Print #1, Chr(9) & Chr(9) & """163"","
                    Print #1, Chr(9) & Chr(9) & """mesafora1"","
                End If
                
                If Mid(actionstr, 1, Len("schoolagedsit")) = "schoolagedsit" Or Mid(actionstr, 1, Len("study")) = "study" Then
                    Print #1, Chr(9) & Chr(9) & "linkedto,"
                    Print #1, Chr(9) & Chr(9) & "gotoobjectanddo,"
                    Print #1, Chr(9) & Chr(9) & """escrivaninha"","
                    Print #1, Chr(9) & Chr(9) & """escrivaninha"","
                End If
                
            End If
        
        Next schoolagedaction
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next schoolagedtaskslevel
    
    'Pet
    
    Print #1, Chr(9) & "-- pet"
    Print #1, Chr(9) & "pet_initial_state = ""normal"","
    Print #1, Chr(9) & "pet_initial_node = ""7"","
    Print #1, ""
    
    Select Case CurrentLevelName
        Case "day1-1", "day1-2", "day2-1", "day2-2"
            Print #1, Chr(9) & "pet_out = true,"
    End Select
    
    Print #1, ""
    
    For pettaskslevel = 1 To 3
        
        Select Case pettaskslevel
            Case 1
                Print #1, Chr(9) & "pet_tasks_easy ="
                pettasksoffset = 0
            Case 2
                Print #1, Chr(9) & "pet_tasks_medium ="
                pettasksoffset = 24
            Case 3
                Print #1, Chr(9) & "pet_tasks_hard ="
                pettasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For petaction = 1 To ListMaxSize
        
            If Len(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 43).Value) > 0 And ((Len(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value) > 0) Or (Len(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 45).Value) > 0)) Then
                'Action
                Select Case ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value
                    Case "parentsbed"
                        Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Case "youngchildbed"
                        Print #1, Chr(9) & Chr(9) & "gotonodeanddo,"
                    Case Else
                        Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 43).Value & ","
                End Select
                
                
                'Timed?
                If ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 48).Value = "Yes" Then
                    Print #1, Chr(9) & Chr(9) & "timed,"
                    Print #1, Chr(9) & Chr(9) & ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 49).Value & "000,"
                End If
                
                'Object/Node
                If Len(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value) > 0 Then
                Select Case ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value
                    Case "parentsbed"
                        Print #1, Chr(9) & Chr(9) & """36"","
                        Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value) & ""","
                    Case "youngchildbed"
                        Print #1, Chr(9) & Chr(9) & """185"","
                        Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value) & ""","
                    Case Else
                        Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value) & ""","
                        Print #1, Chr(9) & Chr(9) & """" & TranslateObject(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 44).Value) & ""","
                End Select
                Else
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 45).Value & ""","
                    Print #1, Chr(9) & Chr(9) & """idle"","
                End If
                
                'Probability
                If Len(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 46).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 46).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """10"","
                End If
                
                'Repeats
                If Len(ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 47).Value) Then
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(petaction + ListInitialOffset + pettasksoffset, 47).Value & ""","
                Else
                    Print #1, Chr(9) & Chr(9) & """1"","
                End If
                
            End If
        
        Next petaction
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next pettaskslevel
    
    
    
    'Dad
    Print #1, Chr(9) & "-- joshua"
    Print #1, Chr(9) & "dad_initial_state = ""normal"","
    Print #1, Chr(9) & "dad_initial_node = ""25"","
    Print #1, Chr(9) & "dad_idle_time = 3500,"
    Print #1, ""
    
    For dadidleslevel = 1 To 3
    
        Select Case dadidleslevel
            Case 1
                Print #1, Chr(9) & "dad_idle_tasks_easy ="
                dadtasksoffset = 0
            Case 2
                Print #1, Chr(9) & "dad_idle_tasks_medium ="
                dadtasksoffset = 24
            Case 3
                Print #1, Chr(9) & "dad_idle_tasks_hard ="
                dadtasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For dadidle = 1 To ListMaxSize
  
            Select Case ActiveSheet.Cells(dadidle + ListInitialOffset + dadtasksoffset, 51).Value
                Case "dadsleepingidle", "dadeatingonbedidle", _
                     "dadbasketballidle", "dadsweepingidle", _
                     "dadlawningidle", "daddustingidle", _
                     "dadswearwatchingtv", "dadfloorsqueegee", _
                     "dadvacuuming", "dadironing"
                    'action
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(dadidle + ListInitialOffset + dadtasksoffset, 51).Value & ""","
                    
                    'good or bad?
                    Select Case ActiveSheet.Cells(dadidle + ListInitialOffset + dadtasksoffset, 51).Value
                        Case "dadsleepingidle", "dadeatingonbedidle", _
                             "dadbasketballidle", "dadswearwatchingtv"
                             Print #1, Chr(9) & Chr(9) & """bad"","
                        Case Else
                             Print #1, Chr(9) & Chr(9) & """good"","
                    End Select
                    
                    'gotoando
                    Print #1, Chr(9) & Chr(9) & """gotoanddo"","
                    
                    'object
                    Select Case ActiveSheet.Cells(dadidle + ListInitialOffset + dadtasksoffset, 51).Value
                        Case "dadsleepingidle"
                            Print #1, Chr(9) & Chr(9) & """dadsleeping"","
                        Case "dadeatingonbedidle"
                            Print #1, Chr(9) & Chr(9) & """dadeatingchicken"","
                        Case "dadbasketballidle"
                            Print #1, Chr(9) & Chr(9) & """dadbasketball"","
                        Case "dadsweepingidle"
                            Print #1, Chr(9) & Chr(9) & """dadsweeping"","
                        Case "dadlawningidle"
                            Print #1, Chr(9) & Chr(9) & """dadlawning"","
                        Case "daddustingidle"
                            Print #1, Chr(9) & Chr(9) & """daddusting"","
                        Case "dadswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & """dadswearwatchingtv"","
                        Case "dadfloorsqueegee"
                            Print #1, Chr(9) & Chr(9) & """dadsqueegee"","
                        Case "dadvacuuming"
                            Print #1, Chr(9) & Chr(9) & """dadvacuuming"","
                        Case "dadironing"
                            Print #1, Chr(9) & Chr(9) & """dadironing"","
                    End Select
                    
                    'discipline
                    Select Case ActiveSheet.Cells(dadidle + ListInitialOffset + dadtasksoffset, 51).Value
                        Case "dadsleepingidle"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "dadeatingonbedidle"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "dadbasketballidle"
                            Print #1, Chr(9) & Chr(9) & "stopbasketball,"
                        Case "dadsweepingidle"
                            Print #1, Chr(9) & Chr(9) & "startsweeping,"
                        Case "dadlawningidle"
                            Print #1, Chr(9) & Chr(9) & "startlawning,"
                        Case "daddustingidle"
                            Print #1, Chr(9) & Chr(9) & "startdusting,"
                        Case "dadswearwatchingtv"
                            Print #1, Chr(9) & Chr(9) & "stopswearwatchingtv,"
                        Case "dadfloorsqueegee"
                            Print #1, Chr(9) & Chr(9) & "startsqueeging,"
                        Case "dadvacuuming"
                            Print #1, Chr(9) & Chr(9) & "startvacuuming,"
                        Case "dadironing"
                            Print #1, Chr(9) & Chr(9) & "startironing,"
                    End Select
                    
                    Print #1, ""
                Case Else
            End Select
        
        Next dadidle
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next dadidleslevel
    
    'Mom
    Print #1, Chr(9) & "-- cindy"
    Print #1, Chr(9) & "mom_initial_state = ""normal"","
    Print #1, Chr(9) & "mom_initial_node = ""45"","
    Print #1, Chr(9) & "mom_idle_time = 4200,"
    Print #1, ""
    
    For momidleslevel = 1 To 3
    
        Select Case momidleslevel
            Case 1
                Print #1, Chr(9) & "mom_idle_tasks_easy ="
                momtasksoffset = 0
            Case 2
                Print #1, Chr(9) & "mom_idle_tasks_medium ="
                momtasksoffset = 24
            Case 3
                Print #1, Chr(9) & "mom_idle_tasks_hard ="
                momtasksoffset = 48
        End Select
        
        Print #1, Chr(9) & "{"
        
        For momidle = 1 To ListMaxSize
        
            Select Case ActiveSheet.Cells(momidle + ListInitialOffset + momtasksoffset, 52).Value
                Case "momsleepingidle", "momeatingicecreamidle", _
                     "momyellingoncelidle", "momwateringidle", _
                     "momsweepingidle", "momcuttingidle", _
                     "momkickingcouch", "momdrinkingboxmilk", _
                     "momfloorsqueegee", "momvacuuming", _
                     "momironing"
            
                    'action
                    Print #1, Chr(9) & Chr(9) & """" & ActiveSheet.Cells(momidle + ListInitialOffset + momtasksoffset, 52).Value & ""","
                    
                    'good or bad?
                    Select Case ActiveSheet.Cells(momidle + ListInitialOffset + momtasksoffset, 52).Value
                        Case "momsleepingidle", "momeatingicecreamidle", _
                             "momyellingoncelidle", "momkickingcouch", _
                             "momdrinkingboxmilk"
                             Print #1, Chr(9) & Chr(9) & """bad"","
                        Case Else
                             Print #1, Chr(9) & Chr(9) & """good"","
                    End Select
                    
                    'gotoando
                    Print #1, Chr(9) & Chr(9) & """gotoanddo"","
                    
                    'object
                    Select Case ActiveSheet.Cells(momidle + ListInitialOffset + momtasksoffset, 52).Value
                        Case "momsleepingidle"
                            Print #1, Chr(9) & Chr(9) & """momsleeping"","
                        Case "momeatingicecreamidle"
                            Print #1, Chr(9) & Chr(9) & """momeatingicecream"","
                        Case "momyellingoncelidle"
                            Print #1, Chr(9) & Chr(9) & """momyellingoncel"","
                        Case "momsweepingidle"
                            Print #1, Chr(9) & Chr(9) & """momsweeping"","
                        Case "momwateringidle"
                            Print #1, Chr(9) & Chr(9) & """momwatering"","
                        Case "momcuttingidle"
                            Print #1, Chr(9) & Chr(9) & """momcutting"","
                        Case "momkickingcouch"
                            Print #1, Chr(9) & Chr(9) & """momkickingcouch"","
                        Case "momdrinkingboxmilk"
                            Print #1, Chr(9) & Chr(9) & """momdrinkingboxmilk"","
                        Case "momfloorsqueegee"
                            Print #1, Chr(9) & Chr(9) & """momsqueegee"","
                        Case "momvacuuming"
                            Print #1, Chr(9) & Chr(9) & """momvacuuming"","
                        Case "momironing"
                            Print #1, Chr(9) & Chr(9) & """momironing"","
                    End Select
                    
                    'discipline
                    Select Case ActiveSheet.Cells(momidle + ListInitialOffset + momtasksoffset, 52).Value
                        Case "momyellingoncelidle"
                            Print #1, Chr(9) & Chr(9) & "stopyellingoncel,"
                        Case "momcuttingidle"
                            Print #1, Chr(9) & Chr(9) & "startcutting,"
                        Case "momwateringidle"
                            Print #1, Chr(9) & Chr(9) & "startwatering,"
                        Case "momkickingcouch"
                            Print #1, Chr(9) & Chr(9) & "stopkickingcouch,"
                        Case "momdrinkingboxmilk"
                            Print #1, Chr(9) & Chr(9) & "stopdrinkingmilkbox,"
                        Case "momsleepingidle"
                            Print #1, Chr(9) & Chr(9) & "stopsleeping,"
                        Case "momeatingicecreamidle"
                            Print #1, Chr(9) & Chr(9) & "stopeating,"
                        Case "momsweepingidle"
                            Print #1, Chr(9) & Chr(9) & "startsweeping,"
                        Case "momironing"
                            Print #1, Chr(9) & Chr(9) & "startironing,"
                        Case "momvacuuming"
                            Print #1, Chr(9) & Chr(9) & "startvacuuming,"
                        Case "momfloorsqueegee"
                            Print #1, Chr(9) & Chr(9) & "startsqueeging,"
                    End Select
                    
                    Print #1, ""
                Case Else
            End Select
        
        Next momidle
        
        Print #1, Chr(9) & "},"
        Print #1, ""
    
    Next momidleslevel
    
    Print #1, Chr(9) & "perfect_time_easy = " & ActiveSheet.Cells(4, 57).Value & ","
    Print #1, Chr(9) & "perfect_time_medium = " & ActiveSheet.Cells(28, 57).Value & ","
    Print #1, Chr(9) & "perfect_time_hard = " & ActiveSheet.Cells(52, 57).Value & ","
    
    Print #1, Chr(9) & "good_time_easy = " & ActiveSheet.Cells(4, 58).Value & ","
    Print #1, Chr(9) & "good_time_medium = " & ActiveSheet.Cells(28, 58).Value & ","
    Print #1, Chr(9) & "good_time_hard = " & ActiveSheet.Cells(52, 58).Value & ","
    
    Print #1, Chr(9) & "feedback_positive_easy = " & ActiveSheet.Cells(4, 54).Value & ","
    Print #1, Chr(9) & "feedback_positive_medium = " & ActiveSheet.Cells(28, 54).Value & ","
    Print #1, Chr(9) & "feedback_positive_hard = " & ActiveSheet.Cells(52, 54).Value & ","
    
    Print #1, Chr(9) & "feedback_negative_easy = " & ActiveSheet.Cells(4, 55).Value & ","
    Print #1, Chr(9) & "feedback_negative_medium = " & ActiveSheet.Cells(28, 55).Value & ","
    Print #1, Chr(9) & "feedback_negative_hard = " & ActiveSheet.Cells(52, 55).Value & ","
    
    'File End
    Print #1, "}"
    
    Application.ScreenUpdating = True
    
    Close #1
    
End Sub










