

    '***********************************************************
    '   Official website : www.atomose.fr                      '
    '   LibertyBasic 4.51 pro licence                          '
    '   Survival © (all copyrights reserved)                   '
    '   By Alexandre Lomuto (Atomose Studio) - 2026            '
    '***********************************************************

    nomainwin

'------------------------      CHARGEMENT DES VARIABLES DU JEU ( CARTE ET UNITEES )      ------------------------------------------------------------------------------------------------------

    [ini]
    dir$ = "" : file$ = "data.txt"
    if fileExist(dir$,file$) = 0 then gosub [print] : goto [start]
    gosub [input]
    if pass$ = "1" then end
    pass$ = "1"
    if save = 1 then goto [loaded]

    [start]
    perso1x = 19 : perso1y = 12  : valIniX = 9 : valIniY = 6 : vie = 50 : FINALtimer = 2 : timerNUM = 0
    global creepsMAX, vie, creepsMAXold, noMOOVE
    creepsMAX = 50 : vie = 50 : creepsMAXold = 0 : noMOOVE = 0

    [loaded]
    pers$="perso1"
    sprites$ = "cache creepA perso1 perso1b perso1c perso1d perso2 perso2b perso2c perso2d perso3 perso3b perso3c perso3d perso4 perso4b perso4c perso4d mur terre mur2 mur3 mur4 mur5 mur6 mur7 mur8 mur9"
    for s = 1 to 28
        loadbmp word$(sprites$,s), "data\"+word$(sprites$,s)+".bmp"
    next

    dim p(x,y) : global dy,dx
    WindowWidth = 302 : WindowHeight = 602 : UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    x= 40 : y= 25

    graphicbox #main.map, 0, 0, WindowWidth, WindowHeight
    open "Survival" for window_popup as #main
    #main.map, "down; fill black; color black; backcolor black"

    [map]
    redim p(x,y)
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,08,02,02,02,02,02,02,02,02,02,02,02,02,02,02,02,02,02,02,10,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,09,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,11,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    data 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
    restore [map]

    for b=0 to y-1
        for a=0 to x-1
            read valeur : p(a,b)= valeur
        next a
    next b

'------------------------      CHARGEMENTS DE TEXTURES DU JEU  ------------------------------------------------------------------------------------------------------


    WindowWidth = 1267 : WindowHeight = 743 : UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    graphicbox #main2.map, 2, 2, WindowWidth-5, WindowHeight-4
    open "Survival" for window_popup as #main2
    #main2.map, "setfocus; down; fill black; font ink_free 30; color yellow; backcolor black"
    #main2.map, "place 330 400 ;\"; "Chargement des données du monde ..."

    num1 = 0
    for i = 0 to 7
        for j = 0 to 4
            num1 = 0
            for y=0 to 4
                for x= 0 to 4
                    num1 = num1 +1
                    sprName$="spr";num1
                    select case p(x+i*5,y+j*5)
                    case 0
                        print #main.map,"addsprite ";sprName$;" terre"
                    case 2
                        print #main.map,"addsprite ";sprName$;" mur2"
                    case 4
                        print #main.map,"addsprite ";sprName$;" mur3"
                    case 3
                        print #main.map,"addsprite ";sprName$;" mur"
                    case 6
                        print #main.map,"addsprite ";sprName$;" mur5"
                    case 7
                        print #main.map,"addsprite ";sprName$;" mur4"
                    case 8
                        print #main.map,"addsprite ";sprName$;" mur6"
                    case 9
                        print #main.map,"addsprite ";sprName$;" mur9"
                    case 10
                        print #main.map,"addsprite ";sprName$;" mur7"
                    case 11 '
                        print #main.map,"addsprite ";sprName$;" mur8"
                    end select
                    #main.map,"spritexy ";sprName$;" ";(x)*60;" ";300+(y)*60
                next
            next

            #main.map "drawsprites"
            #main.map "place 0 0; boxfilled 300 300 "
            bmp$="bg";right$(str$(100+i), 2);right$(str$(100+j), 2)
            #main.map "getbmp ";bmp$;" 0 0 300 600"

            for k = 1 to num1
                sprName$="spr";k
                print #main.map,"removesprite ";sprName$
            next
        next
    next

    valIniXold = valIniX : valIniYold = valIniY : valX = 0 : valY = 0 : num1 = 0
    close #main : close #main2

    WindowWidth = 1267 : WindowHeight = 743 : UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)

    stylebits #main.map, 0, _WS_BORDER, 0, 0
    stylebits #main.map2, 0, _WS_BORDER, 0, 0

    graphicbox #main.map, 3, 30, WindowWidth-6, WindowHeight-33
    graphicbox #main.map2, 3, 3, WindowWidth-6, 27
    open "Survival" for window_popup as #main
    #main, "trapclose [close]"
    #main.map, "setfocus; down; fill ";20;" ";20;" ";20
    #main.map2, "down; fill ";20;" ";20;" ";20
    #main.map2, "font ink_free 12; color white"
    #main.map, "when leftButtonDown [endLEVEL]"


'------------------------      CHARGEMENT DES PERSONNAGES  ------------------------------------------------------------------------------------------------------

    'print #main.map,"spriteimage perso3 perso3"
    print #main.map,"addsprite perso3 perso3 perso3 perso3 perso3 perso3 perso3 perso3 perso3 perso3 perso3b perso3b perso3b perso3b perso3b perso3b perso3b perso3b perso3b perso3c perso3c perso3c perso3c perso3c perso3c perso3c perso3c perso3c perso3d perso3d perso3d perso3d perso3d perso3d perso3d perso3d perso3d"
    print #main.map,"addsprite perso2 perso2 perso2 perso2 perso2 perso2 perso2 perso2 perso2 perso2 perso2b perso2b perso2b perso2b perso2b perso2b perso2b perso2b perso2b perso2c perso2c perso2c perso2c perso2c perso2c perso2c perso2c perso2c perso2d perso2d perso2d perso2d perso2d perso2d perso2d perso2d perso2d"
    print #main.map,"addsprite perso4 perso4 perso4 perso4 perso4 perso4 perso4 perso4 perso4 perso4 perso4b perso4b perso4b perso4b perso4b perso4b perso4b perso4b perso4b perso4c perso4c perso4c perso4c perso4c perso4c perso4c perso4c perso4c perso4d perso4d perso4d perso4d perso4d perso4d perso4d perso4d perso4d"
    print #main.map,"addsprite perso1 perso1 perso1 perso1 perso1 perso1 perso1 perso1 perso1 perso1 perso1b perso1b perso1b perso1b perso1b perso1b perso1b perso1b perso1b perso1c perso1c perso1c perso1c perso1c perso1c perso1c perso1c perso1c perso1d perso1d perso1d perso1d perso1d perso1d perso1d perso1d perso1d"

    global creeps, perso1x, perso1y, valIniX, valIniY, creepsMAX, timerNUM2, scale
    creeps = 100
    dim creepPosX(creeps)
    dim creepPosY(creeps)

    for c = 1 to creepsMAX
        print #main.map,"addsprite creepA";c;" creepA"
        RNDzones = int(rnd(1)*4+1)
        if RNDzones = 1 then creepPosX(c) = (rnd(1)*2+10) : creepPosY(c) = (rnd(1)*12+7)
        if RNDzones = 2 then creepPosX(c) = (rnd(1)*2+27) : creepPosY(c) = (rnd(1)*12+7)
        if RNDzones = 3 then creepPosX(c) = (rnd(1)*19+10) : creepPosY(c) = (rnd(1)*1+6.5)
        if RNDzones = 4 then creepPosX(c) = (rnd(1)*19+10) : creepPosY(c) = (rnd(1)*1+17.5)
    next c

    print #main.map, "addsprite cache cache; spritexy cache 0 0"

'------------------------      BOUCLE PRINCIPALE DU JEU      ------------------------------------------------------------------------------------------------------

    [endLEVEL]
    #main.map2, "discard"
    if int(60-(timerNUM/62)) >= 0 and int(FINALtimer - timerNUM2) > -1 then #main.map2, "backcolor ";20;" ";20;" ";20;"; color green ;font ink_free 14 bold; place 500 25;\"; "Survive   ";int(FINALtimer - timerNUM2) ; " : "; int(60-(timerNUM/62));"   "
    #main.map2, "backcolor ";20;" ";20;" ";20;"; color red; place 680 25;\"; "life : "; vie; "    "

    bgList$ = ""
    for i = 0 to 7
        for j = 0 to 4
            realX=(i*5-valIniX)*60 : realY=(j*5-valIniY)*60
            if realX >= 0-298 and realX < WindowWidth-7 and realY >= 0-298 and realY < WindowHeight-6 then
                bmp$="bg";right$(str$(1000+i), 2);right$(str$(1000+j), 2)
                #main.map,"addsprite ";bmp$; " ";bmp$;"; spritexy ";bmp$; " " ;realX;" ";realY
                bgList$ = bgList$+" "+bmp$
            end if
        next
    next

    dy = 0 : dx = 0 : scale = 0.05
    call readJStick 1

    if dx = 2 and timerNUM >10 then
        confirm "Voulez vous quitter le jeu ?";quit$
        if quit$ = "yes" then  pass$ = "0" : save = 1 : gosub [print] : timer 0 : close #main : end
        dx = 0
    end if

    if secuPAUSE = 1 then #main.map2, "place 410 25;\"; "                                                                                  "
    secuPAUSE = 0
    if dx = 3 and timerNUM >10 then
        secuPAUSE = secuPAUSE + 1
        if secuPAUSE = 1 then #main.map2, "place 410 25;\"; "GAME PAUSED  (click on the map for stop pause)       " : wait
    end if

    scaleC = scale
    if (dy<> 0 and dx = 0) or (dx<> 0 and dy = 0) then Position$ = ""
    if dy = -1 and dx = 1 then scaleC = scale-0.01 : Position$ = "haut droit"
    if dy = -1 and dx = -1 then scaleC = scale-0.01 : Position$ = "haut gauche"
    if dy = 1 and dx = 1 then scaleC = scale-0.01 : Position$ = "bas droit"
    if dy = 1 and dx = -1 then scaleC = scale-0.01 : Position$ = "bas gauche"
    valIniX = valIniX+(1*dx)*scaleC : perso1x = perso1x +(1*dx)*scaleC : valIniY = valIniY+(1*dy)*scaleC : perso1y = perso1y +(1*dy)*scaleC

    select case p(INT(perso1x+0.5),INT(perso1y+0.55))
    case 0
        select case dx
            case 1
                if Position$ = "" then pers$="perso3"
            case -1
                if Position$ = "" then pers$="perso2"
        end select
        select case dy
            case 1
                if Position$ = "" then pers$="perso1"
            case -1
                if Position$ = "" then pers$="perso4"
        end select
    case else
        select case dx
            case 1
                valIniX = valIniX -1*scale : perso1x = perso1x -1*scale : pers$="perso3"
            case -1
                valIniX = valIniX +1*scale : perso1x = perso1x +1*scale : pers$="perso2"
        end select
        select case dy
            case 1
                valIniY = valIniY -1*scale : perso1y = perso1y -1*scale : pers$="perso1"
            case -1
                valIniY = valIniY +1*scale : perso1y = perso1y +1*scale : pers$="perso4"
        end select
    end select

    '--------------- SPRITES GESTION ----------------
    for thisCreep = 1 to creepsMAX
        DistanceSprite = 10 + int(noMOOVE/100)
        dist = sqr(abs(perso1x-creepPosX(thisCreep))*abs(perso1x-creepPosX(thisCreep)) + abs(perso1y-creepPosY(thisCreep))*abs(perso1y-creepPosY(thisCreep)))
        if dist <= DistanceSprite then
            if int((creepPosX(thisCreep)-valIniX)*60) < int((perso1x-valIniX)*60) then creepPosX(thisCreep) = creepPosX(thisCreep) + 0.030
            if int((creepPosX(thisCreep)-valIniX)*60) > int((perso1x-valIniX)*60)+20 then creepPosX(thisCreep) = creepPosX(thisCreep) - 0.030
            if int((creepPosY(thisCreep)-valIniY)*60) < int((perso1y-valIniY)*60) then creepPosY(thisCreep) = creepPosY(thisCreep) + 0.024
            if int((creepPosY(thisCreep)-valIniY)*60) > int((perso1y-valIniY)*60)+20 then creepPosY(thisCreep) = creepPosY(thisCreep) - 0.024
            gosub [directionSPRITES]
            '--re-creation-sprite-----
            if (int((creepPosX(thisCreep)-valIniX)*60) > int((perso1x-valIniX)*60)-10 and int((creepPosX(thisCreep)-valIniX)*60) < int((perso1x-valIniX)*60)+40) AND (int((creepPosY(thisCreep)-valIniY)*60) > int((perso1y-valIniY)*60)-30 and int((creepPosY(thisCreep)-valIniY)*60) < int((perso1y-valIniY)*60)+20) then
                vie = vie - 1 : if vie <= 0 then notice " " + chr$(13) +  "GAME OVER ... let's try again !" : vie = 50 : timerNUM2 = 0 : timerNUM = 0
                RNDzones = int(rnd(1)*4+1)
                select case RNDzones
                    case 1
                        creepPosX(thisCreep) = (rnd(1)*2+10) : creepPosY(thisCreep) = (rnd(1)*12+7)
                    case 2
                        creepPosX(thisCreep) = (rnd(1)*2+27) : creepPosY(thisCreep) = (rnd(1)*12+7)
                    case 3
                        creepPosX(thisCreep) = (rnd(1)*19+10) : creepPosY(thisCreep) = (rnd(1)*1+6.5)
                    case 4
                        creepPosX(thisCreep) = (rnd(1)*19+10) : creepPosY(thisCreep) = (rnd(1)*1+17.5)
                end select
            end if
        end if
        if dist > DistanceSprite then
            choix = int(rnd(1)*4+1)
            if choix = 1 and creepPosX(thisCreep)<28 then creepPosX(thisCreep) = creepPosX(thisCreep) + 0.10
            if choix = 2 and creepPosX(thisCreep)>11 then creepPosX(thisCreep) = creepPosX(thisCreep) - 0.10
            if choix = 3 and creepPosY(thisCreep)<18 then creepPosY(thisCreep) = creepPosY(thisCreep) + 0.10
            if choix = 4 and creepPosY(thisCreep)>7  then creepPosY(thisCreep) = creepPosY(thisCreep) - 0.10
        end if
        gosub [directionSPRITES]
        #main.map,"spritexy creepA";thisCreep;" ";int(((creepPosX(thisCreep)-valIniX)*60)+10);" ";int(((creepPosY(thisCreep)-valIniY)*60)+10);"; spritetofront creepA";thisCreep
           '---------------
    next
    '----------------------------------------------

    print #main.map, "SpriteVisible cache on; spritetofront cache"
    print #main.map, "spritexy ";pers$;" ";int((WindowWidth/2)-30);" ";int((WindowHeight/2)-30);"; SpriteVisible ";pers$;" on; spritetofront ";pers$ 
    if dx<>0 or dy<>0 then #main.map, "cyclesprite ";pers$;" 1 once"
    #main.map "drawsprites"

    call removeSprites bgList$
    print #main.map, "SpriteVisible ";pers$;" off"
    timerNUM = timerNUM + 1 : timerNUM3 = timerNUM3 + 1
    if timerNUM3 >=62 and vie<100 then timerNUM3 = 0 : vie = vie + 1
    if timerNUM >=3720 then
        timerNUM = 1 : timerNUM2 = timerNUM2 + 1
        creepsMAXold = creepsMAX : creepsMAX = creepsMAX + 50 : if creepsMAX > creeps then creepsMAX = creeps
        for c = (creepsMAXold+1) to creepsMAX
            print #main.map,"addsprite creepA";c;" creepA"
            RNDzones = int(rnd(1)*4+1)
            select case RNDzones
                case 1
                    creepPosX(c) = (rnd(1)*2+10) : creepPosY(c) = (rnd(1)*12+7)
                case 2
                    creepPosX(c) = (rnd(1)*2+27) : creepPosY(c) = (rnd(1)*12+7)
                case 3
                    creepPosX(c) = (rnd(1)*19+10) : creepPosY(c) = (rnd(1)*1+6.5)
                case 4
                    creepPosX(c) = (rnd(1)*19+10) : creepPosY(c) = (rnd(1)*1+17.5)
            end select
        next
    end if
    noMOOVE = noMOOVE +1
    #main.map, "discard"
    call Sleep 1 : goto [endLEVEL]

    [close]
    timer 0 : close #main : end

    [directionSPRITES]
    direction = int(rnd(1)*4+1) : jump = rnd(1)*0.04+0.02
    select case direction
        case 1
            if creepPosX(thisCreep)<28 then creepPosX(thisCreep) = creepPosX(thisCreep) + jump
        case 2
            if creepPosX(thisCreep)>11 then creepPosX(thisCreep) = creepPosX(thisCreep) - jump
        case 3
            if creepPosY(thisCreep)<18 then creepPosY(thisCreep) = creepPosY(thisCreep) + jump
        case 4
            if creepPosY(thisCreep)>7  then creepPosY(thisCreep) = creepPosY(thisCreep) - jump
    end select
    return

'------------------------      FONCTIONS      ------------------------------------------------------------------------------------------------------

    function GetAsyncKeyState(key)
        calldll #user32, "GetAsyncKeyState",key as long,GetAsyncKeyState as long
        if GetAsyncKeyState<>0 then GetAsyncKeyState=1
    end function

    sub readJStick n
        if GetAsyncKeyState(_VK_ESCAPE) then dx = 2
        if GetAsyncKeyState(_VK_SPACE) then dx = 3
        if GetAsyncKeyState(asc("Z")) or GetAsyncKeyState(_VK_UP)     then dy = -1 : noMOOVE = 0
        if GetAsyncKeyState(asc("W")) or GetAsyncKeyState(_VK_UP)     then dy = -1 : noMOOVE = 0
        if GetAsyncKeyState(asc("S")) or GetAsyncKeyState(_VK_DOWN)   then dy =  1 : noMOOVE = 0
        if GetAsyncKeyState(asc("Q")) or GetAsyncKeyState(_VK_LEFT)   then dx = -1 : noMOOVE = 0
        if GetAsyncKeyState(asc("A")) or GetAsyncKeyState(_VK_LEFT)   then dx = -1 : noMOOVE = 0
        if GetAsyncKeyState(asc("D")) or GetAsyncKeyState(_VK_RIGHT)  then dx =  1 : noMOOVE = 0
    end sub

    sub removeSprites list$
    while 1
        i=i+1
        spr$=word$(list$, i)
        if spr$ = "" then exit while
        print #main.map,"removesprite ";spr$
    wend
    end sub

    Sub Sleep ms
        CallDLL #kernel32, "Sleep",_
        ms as long,_
        ret as void
    End Sub

    function fileExist(dir$,file$)
        dim info$(10, 10)
        files dir$,file$, info$(
        if val(info$(0, 0)) > 0 then
            fileExist = 1
        else
            fileExist = 0
        end if
    end function


'------------------------      SYSTEME DE SAUVEGARDE ET CHARGEMENT DES DONNEES DU JEU      ------------------------------------------------------------------------------------------------------

    [print]
    open "data.txt" for output as #secu
    print #secu, pass$
    print #secu, save
    print #secu, perso1x
    print #secu, perso1y
    print #secu, valIniX
    print #secu, valIniY
    print #secu, vie
    print #secu, creeps
    print #secu, creepsMAX
    print #secu, timerNUM2
    print #secu, FINALtimer
    print #secu, timerNUM
    close #secu
    return

    [input]
    open "data.txt" for input as #secu
    input #secu, pass$
    input #secu, save
    input #secu, perso1x
    input #secu, perso1y
    input #secu, valIniX
    input #secu, valIniY
    input #secu, vie
    input #secu, creeps
    input #secu, creepsMAX
    input #secu, timerNUM2
    input #secu, FINALtimer
    input #secu, timerNUM
    close #secu
    return



