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

    ' bouclier : % armure total / intel / agilité / force
    ' armure : donne vie (FAIT) / regen / intel / agilité / force
    ' casque : xp / intel / agilité / force
    ' bottes : % cc / intel / agilité / force
    ' arme : cc / intel / agilité / force / %dégats

    nomainwin
    ' secu test -----------
    on error goto [noSav]
    open "secu.txt" for input as #secu
    input #secu, pass$
    close #secu
    if pass$ = "1" then end
    pass$ = "1"
    open "secu.txt" for output as #secu
    print #secu, pass$
    close #secu
    '---------------------
  '  if fileExist(dir$,file$) = 1 then
    loaded = 1
    persoSELECT = 1
    gosub [input] : goto [saved]
    [noSav]
    ChoixPerso = 0 : noSAV = 1 : bruitage = 1
    dir$ = "" : file$ = "data.txt"
    dim caseITEM(100), rareITEM(100), typeITEM(100), lvlITEM(100), val1ITEM(100), caseITEMequip(100), rareITEMequip(100), typeITEMequip(100), nACTION(100), lvlITEMequip(100), VequipITEM(100)
    dim comp1(100), comp2(100), comp3(100), comp4(100), comp5(100), comp6(100), comp7(100), comp8(100), comp9(100), comp10(100)
    dim vieITEM(100), ccITEM(100), chanceccITEM(100), regenITEM(100), forceITEM(100), intITEM(100), agiITEM(100), xpITEM(100), reputationVillage(100)
    gosub [reinitialisation]
    pass$ = "1" : version = 1
    open "secu.txt" for output as #secu
    print #secu, pass$
    close #secu
    gosub [print]
    [saved]

    GameVersion = 1.29 : build = 8
    sprites$ = "sons sons2 tuto1 tuto2 tuto3 conquest conquest2 player world map main2 inventaireB selection button6 revente rare2 back2 button5 button4en button4fr screen1 help inventaire2 villeA villeB arena screen screen3 screen4 block item2a item2b item2c item2d item2e item2f item2g item2h item2i item3a item3b item3c item3d item3e item3f item3g item3h item3i item4a item4b item4c item4d item4e item4f item4g item4h item4i item5a item5b item5c item5d item5e item5f item5g item5h item5i back perso inventaire main ennemi1 ennemi2 ennemi3 ennemi4 ennemi5 ennemi6 ennemi7 ennemi8 ennemi9 ennemi10 ennemi11 ennemi12 ennemi13 ennemi14 ennemi15 ennemi16 ennemi17 ennemi18 ennemi19 ennemi20 ennemi21 ennemi22 ennemi23 atk soins"
    for s = 1 to 95
        loadbmp word$(sprites$,s), "data\"+word$(sprites$,s)+".bmp"
    next
    loadbmp "screenINI", "data\ville2.bmp"
    on error goto [start3]

    [start]
    selectionPERSO = 0
    WindowWidth=896 : WindowHeight=652 : UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    graphicbox #ini.main, 0, 0, WindowWidth-6, WindowHeight-28'WindowWidth, WindowHeight

    if version = 1 then bmpbutton #ini.b1, "data\button1fr.bmp", [start2], UL, 620,115 : bmpbutton #ini.b5, "data\button2fr.bmp", [web], UL, 620,155 : bmpbutton #ini.b4, "data\button3fr.bmp", [about], UL, 620,195
    if version = 2 then bmpbutton #ini.b1, "data\button1en.bmp", [start2], UL, 620,115 : bmpbutton #ini.b5, "data\button2en.bmp", [web], UL, 620,155 : bmpbutton #ini.b4, "data\button3fr.bmp", [about], UL, 620,195
    bmpbutton #ini.b2, "data\fr.bmp", [fr], UL, 20,10
    bmpbutton #ini.b3, "data\eng.bmp", [eng], UL, 50,10
    open "Arena" for window_nf as #ini
    [refreshSTART]
    #ini, "trapclose [start3]"
    print #ini.main, "when leftButtonDown [clickSTART]"
    #ini.main "down; fill white"
    #ini.main "drawbmp screenINI 0 0; background screenINI"
    #ini, "font ink_free 11"

    handle = hwnd(#ini)
    hTip=CreateTooltip(handle)
    if version = 1 then
        Call AddToolTip Hwnd(#ini.b1), hTip , "Lancement du jeu"
        Call AddToolTip Hwnd(#ini.b2), hTip , "Met le jeu en langue Française"
        Call AddToolTip Hwnd(#ini.b3), hTip , "Met le jeu en langue Anglaise"
        Call AddToolTip Hwnd(#ini.b4), hTip , "Permet de vérifier si une nouvelle mise à jour est disponible"
        Call AddToolTip Hwnd(#ini.b5), hTip , "Tous nos jeux disponibles sur notre site"
    end if
    if version = 2 then
        Call AddToolTip Hwnd(#ini.b1), hTip , "Launching the game"
        Call AddToolTip Hwnd(#ini.b2), hTip , "Put the game in French language"
        Call AddToolTip Hwnd(#ini.b3), hTip , "Put the game in English language"
        Call AddToolTip Hwnd(#ini.b4), hTip , "Allows you to check if a new update is available"
        Call AddToolTip Hwnd(#ini.b5), hTip , "All our games available on our website"
    end if
    if selectionPERSO = 0 then #ini.b1, "show" : #ini.b4, "show" : #ini.b5, "show"
    #ini.main "flush"
    wait
    [start2]
    if about = 1 then close #about : about = 0
    on error goto [error]
    if TypePerso >0 then
        if version = 1 then confirm "Voulez-vous charger votre ancienne sauvegarde ?";rep$
        if version = 2 then confirm "Do you want to load your old save ?";rep$
        if rep$ = "no" then ChoixPerso = 0 : persoSELECT = 1 : goto [start2b]
        close #ini : unloadbmp "screenINI" : goto [INI]
    end if
    [start2b]
    if ChoixPerso = 0 then
        selectionPERSO = 1
        #ini.b1, "hide"
        #ini.b4, "hide"
        #ini.b5, "hide"
        #ini.main "drawbmp selection 200 170" : #ini.main "drawbmp selection 200 170"
        print #ini.main, "font Courier_New 12; color black;backcolor ";227;" ";215;" ";201
        if version = 1 then print #ini.main, "place 270 195 ;\"; "Selectionnez votre personnage"
        if version = 2 then print #ini.main, "place 310 195 ;\"; "Select your character"
        print #ini.main, "font Courier_New 10; color black;backcolor ";227;" ";215;" ";201
        if version = 1 then print #ini.main, "place 375 355 ;\"; "Combattez !"
        if version = 2 then print #ini.main, "place 390 355 ;\"; "Fight !"
        if persoSELECT = 1 then print #ini.main, "size 2; color darkgreen" : print #ini.main, "line "; 287; " "; 326; " "; 347; " "; 326
        if persoSELECT = 2 then print #ini.main, "size 2; color darkgreen" : print #ini.main, "line "; 480; " "; 326; " "; 540; " "; 326
        wait
    end if
    wait

    [web] run "explorer.exe https://www.atomose.fr/la-bibliotheque" : wait


    [clickSTART]
    mX = MouseX : mY = MouseY
   ' notice mX ;" "; mY
    if selectionPERSO = 1 and mX>285 and mX<350 and mY>250 and mY<300 then persoSELECT = 1 : print #ini.main, "backcolor ";227;" ";215;" ";201;"; color ";227;" ";215;" ";201 : print #ini.main, "line "; 480; " "; 326; " "; 540; " "; 326 : #ini.main, "color darkgreen" : print #ini.main, "line "; 287; " "; 326; " "; 347; " "; 326
    if selectionPERSO = 1 and mX>475 and mX<540 and mY>250 and mY<300 then persoSELECT = 2 : print #ini.main, "backcolor ";227;" ";215;" ";201;"; color ";227;" ";215;" ";201 : print #ini.main, "line "; 287; " "; 326; " "; 347; " "; 326 : #ini.main, "color darkgreen" : print #ini.main, "line "; 480; " "; 326; " "; 540; " "; 326
    if selectionPERSO = 1 and mX>350 and mX<485 and mY>335 and mY<365 then
        on error goto [error]
        if persoSELECT = 0 then persoSELECT = 1
        if about = 1 then close #about : about = 0
        TypePerso = persoSELECT : close #ini : unloadbmp "screenINI" : gosub [reinitialisation] : goto [INI]
    end if
    if mX<200 or mX>630 or mY<170 or mY>390 then selectionPERSO = 0 : goto [refreshSTART]
    wait

    [fr]
    version = 1 : close #ini : goto [start]
    [fr2]
    version = 1 : close #ini : goto [INI]
    [eng]
    version = 2 : close #ini : goto [start]
    [eng2]
    version = 2 : close #ini : goto [INI]

    [start3]
    timer 0
    if about = 1 then close #about
    close #ini
    pass$ = "0"
    open "secu.txt" for output as #secu
    print #secu, pass$
    close #secu
    end

    [about]
    on error goto [w]
    WindowWidth=390 : WindowHeight=145
    UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    if about = 1 then close #about
    about = 1
    graphicbox #about.map, 2, 2, WindowWidth-10, WindowHeight-32
    open "" for window_nf as #about
    #about, "trapclose [about2]"
    #about.map, "cls;down;fill white"
    print #about.map, "font Courier_New 10; color black;backcolor white"
    if version = 1 then print #about.map, "place 20 30 ;\"; "Arena Ré-évolution ";GameVersion;".";build;"\Créé par Atomose Studio ® \Avec Liberty Basic 4.51 pro\\Verifiez les mises à jour sur atomose.fr"
    if version = 2 then print #about.map, "place 20 30 ;\"; "Arena Re-evolution ";GameVersion;".";build;"\Created by Atomose Studio ® \With Liberty Basic 4.51 pro\\Check upgrade on atomose.fr"
    #about, "font Courier_New 8"
    print #about.map, "color black"
    wait
    [about2]
    timer 0 : close #about : about = 0 : wait

    [INI]
    inventaire = 0 : marchands = 0 : forgeron = 0 : WindowWidth=896 : WindowHeight=652 : UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    graphicbox #ini.main, 0, 0, WindowWidth-6, WindowHeight-28 'WindowWidth, WindowHeight
    open "Arena ";build$ for window_nf as #ini
    #ini, "trapclose [quit]"
    [INITIAL]
    timer 0
    ChoixPerso = 1
    if talent1XP >= talent1XPtotal then talent1 = talent1 + 1 : atkPerso = atkPerso + 2 : talent1XPtotal = int(talent1XPtotal + (2.55*talent1XPtotal))
    if talent2XP >= talent2XPtotal then talent2 = talent2 + 1 : hpPerso = hpPerso + 5 : hpPersoTotal = hpPersoTotal + 5 : talent2XPtotal = int(talent2XPtotal + (1.75*talent2XPtotal))
    if talent3XP >= talent3XPtotal then talent3 = talent3 + 1 : armorPerso = armorPerso + 1 : talent3XPtotal = int(talent3XPtotal + (1.75*talent3XPtotal))
    if talent4XP >= talent4XPtotal then talent4 = talent4 + 1 : regenPerso = regenPerso + 0.25 : talent4XPtotal = int(talent4XPtotal + (1.75*talent4XPtotal))
    if talent5XP >= talent5XPtotal then talent5 = talent5 + 1 : talent5XPtotal = int(talent5XPtotal + (1.75*talent5XPtotal))
    if talent6XP >= talent6XPtotal then talent6 = talent6 + 1 : talent6XPtotal = int(talent6XPtotal + (1.75*talent6XPtotal))

    print #ini.main, "down; fill white"
    if village >0 then print #ini.main, "drawbmp villeA 0 0; background villeA"
    if ville >0 then print #ini.main, "drawbmp villeB 0 0; background villeB"
    if TypePerso = 1 then print #ini.main, "drawbmp inventaire 20 17"
    if TypePerso = 2 then print #ini.main, "drawbmp inventaireB 20 17"

    if bruitage = 0 then print #ini.main, "drawbmp sons2 855 8"
    if bruitage = 1 then print #ini.main, "drawbmp sons 855 8"

    if hpPerso<hpPersoTotal and worldOPEN = 0 then print #ini.main, "drawbmp soins 20 67"
    if hpPerso<hpPersoTotal and worldOPEN = 1 then print #ini.main, "drawbmp soins 70 67"
    if worldOPEN =1 then print #ini.main, "drawbmp map 20 67"
    print #ini.main, "drawbmp inventaire2 65 17"
    print #ini.main, "when leftButtonDown [click1]"
    lifePOURCENTAGE = int(xpPerso/(xpPersoTotal/100))
    print #ini.main, "font Courier_New 8; color black "';backcolor ";200;" ";193;" ";179

    ' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _TRANSPARENT As long,_  'flag for transparent background
        result As long          'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    if version = 1 then
        print #ini.main, "place 75 34 ;\"; "Niveau : "; lvlPerso; " [";lifePOURCENTAGE;"%]"
        print #ini.main, "place 75 49 ;\"; "Or : ";gold;"    "
    end if
    if version = 2 then
        print #ini.main, "place 75 34 ;\"; "Level : "; lvlPerso; " [";lifePOURCENTAGE;"%]"
        print #ini.main, "place 75 49 ;\"; "Gold : ";gold;"    "
    end if

    if tuto = 0 and version = 1 then
        print #ini.main, "drawbmp tuto1 210 210"
        print #ini.main, "color white; place 300 250 ;\"; "Bienvenue dans l'arène !"
        print #ini.main, "place 235 290 ;\"; "Vous trouverez tout les magasins nécessaires pour \acheter et améliorer vos équipements. Vous pouvez\équiper les nouveaux objets via votre inventaire en \cliquant sur l'icone de votre personnage en haut a \gauche de l'écran.\Deux arènes existent, la première a gauche vous \permet de vous entrainer contre des combattants \de votre niveau.\Faites toutefois attention car perdre un combat \contre un champion d'arène et vous perdrez également \les objets équipés  !\\Que le combat commence !!!"
        wait
    end if
    if tuto = 0 and version = 2 then
        print #ini.main, "drawbmp tuto1 210 210"
        print #ini.main, "color white; place 300 250 ;\"; "Welcome to the arena !"
        print #ini.main, "place 235 290 ;\"; "You will find all the necessary stores to buy and\improve your equipment. You can equip the new items \via your inventory by clickingimprove your \equipment. You can equip the new items via your \inventory by clicking on your character icon at \the top left of the screen. Two arenas exist, the \first on the left allows you to train against \fighters of your level. If you find it too simple, \you can fight against the champion of the arena and \if you beat him then you will automatically go to \the next level of the arena. Be careful anyway \because losing a fight will lose your equipment !\Let's the battle begin !!!"
        wait
    end if

    if activationtuto2 = 1 and worldOPEN = 0 and version = 1 then
        activationtuto2 = 0
        worldOPEN = 1
        print #ini.main, "drawbmp tuto2 210 210"
        print #ini.main, "color white; place 300 245 ;\"; "Je te félicite de m'avoir battue ! Cela \faisait un certains temps que personne ne \m'avait vaincue aussi vite. \Voici une carte du monde qui te permettra \de trouver de nouveaux adversaires ! "
        print #ini.main, "place 360 345 ;\"; "(vous recevez une carte du monde)"
        wait
    end if
    if activationtuto2 = 1 and worldOPEN = 0 and version = 2 then
        activationtuto2 = 0
        worldOPEN = 1
        print #ini.main, "drawbmp tuto2 210 210"
        print #ini.main, "color white; place 300 245 ;\"; "I congratulate you for beating me! It's \been a while since anyone defeated me so \quickly. Here is a world map that will \allow you to find new opponents!"
        print #ini.main, "place 360 345 ;\"; "(you receive a world map)"
        wait
    end if

    if village = 1 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 343 40 ;\"; "Village de Narah" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 363 40 ;\"; "Narah Village" : ville = 0
        if StatutVillage1$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 2 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 359 40 ;\"; "Village de Yir" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 379 40 ;\"; "Yir Village" : ville = 0
        if StatutVillage2$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 3 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Berro" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Berro Village" : ville = 0
        if StatutVillage3$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 4 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 360 40 ;\"; "Village de Var" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 380 40 ;\"; "Var Village" : ville = 0
        if StatutVillage4$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 5 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Feru" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Feru Village" : ville = 0
        if StatutVillage5$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 6 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 325 40 ;\"; "Village de Vellance" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Vellance Village" : ville = 0
        if StatutVillage6$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 7 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Ourval" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Ourval Village" : ville = 0
        if StatutVillage7$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 8 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 335 40 ;\"; "Village de Rhin" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Rhin Village" : ville = 0
        if StatutVillage8$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 9 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 352 40 ;\"; "Village de Arlo" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 372 40 ;\"; "Arlo Village" : ville = 0
        if StatutVillage9$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 10 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 352 40 ;\"; "Village de Verin" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 372 40 ;\"; "Verin Village" : ville = 0
        if StatutVillage10$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 11 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 352 40 ;\"; "Village de Ugiri" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 372 40 ;\"; "Ugiri Village" : ville = 0
        if StatutVillage11$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 12 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Borth" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Borth Village" : ville = 0
        if StatutVillage12$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 13 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Iri" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Iri Village" : ville = 0
        if StatutVillage13$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 14 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Oma" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Oma Village" : ville = 0
        if StatutVillage14$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 15 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Etan" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Etan Village" : ville = 0
        if StatutVillage15$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 16 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 335 40 ;\"; "Village de Pistos" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Pistos Village" : ville = 0
        if StatutVillage16$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 17 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Village d'As" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 395 40 ;\"; "As Village" : ville = 0
        if StatutVillage17$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 18 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Myr" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Myr Village" : ville = 0
        if StatutVillage18$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 19 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 300 40 ;\"; "Village des sables doux" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 310 40 ;\"; "Gentle sands Village" : ville = 0
        if StatutVillage19$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 20 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 360 40 ;\"; "Village d'Arth" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 380 40 ;\"; "Arth Village" : ville = 0
        if StatutVillage20$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 21 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 338 40 ;\"; "Village de Vivier" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 358 40 ;\"; "Vivier Village" : ville = 0
        if StatutVillage21$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 22 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 338 40 ;\"; "Village de Nisnor" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 358 40 ;\"; "Nisnor Village" : ville = 0
        if StatutVillage22$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 23 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 338 40 ;\"; "Village de Éterup" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 358 40 ;\"; "Eterup Village" : ville = 0
        if StatutVillage23$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 24 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Dard" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Dard Village" : ville = 0
        if StatutVillage24$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 25 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Zar" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Zar Village" : ville = 0
        if StatutVillage25$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 26 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Alara" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Alara Village" : ville = 0
        if StatutVillage26$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 27 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Mont" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Mont Village" : ville = 0
        if StatutVillage27$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 28 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 340 40 ;\"; "Village de Mouvir" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 360 40 ;\"; "Mouvir Village" : ville = 0
        if StatutVillage28$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 29 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 340 40 ;\"; "Village de Curose" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 360 40 ;\"; "Curose Village" : ville = 0
        if StatutVillage29$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 30 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 340 40 ;\"; "Village de Nalla" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 360 40 ;\"; "Nalla Village" : ville = 0
        if StatutVillage30$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 31 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Vico" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Vico Village" : ville = 0
        if StatutVillage31$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 32 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Marsh" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Marsh Village" : ville = 0
        if StatutVillage32$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 33 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Village de Sei" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Sei Village" : ville = 0
        if StatutVillage33$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 34 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 340 40 ;\"; "Village de Perto" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 360 40 ;\"; "Perto Village" : ville = 0
        if StatutVillage34$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 35 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Arva" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Arva Village" : ville = 0
        if StatutVillage35$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 36 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 335 40 ;\"; "Village de Avalgo" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Avalgo Village" : ville = 0
        if StatutVillage36$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 37 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Village de Iron" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Iron Village" : ville = 0
        if StatutVillage37$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 38 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 338 40 ;\"; "Village de Novari" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 358 40 ;\"; "Novari Village" : ville = 0
        if StatutVillage38$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 39 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 338 40 ;\"; "Village de Mavira" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 358 40 ;\"; "Mavira Village" : ville = 0
        if StatutVillage39$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 40 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 335 40 ;\"; "Village de Nacriva" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Nacriva Village" : ville = 0
        if StatutVillage40$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 41 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 325 40 ;\"; "Village de Termonia" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Termonia Village" : ville = 0
        if StatutVillage41$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 42 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Fury" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Fury Village" : ville = 0
        if StatutVillage42$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 43 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 335 40 ;\"; "Village de Taradia" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Taradia Village" : ville = 0
        if StatutVillage43$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 44 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 341 40 ;\"; "Village de Valar" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 361 40 ;\"; "Valar Village" : ville = 0
        if StatutVillage44$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 45 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 341 40 ;\"; "Village de Serein" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 361 40 ;\"; "Serein Village" : ville = 0
        if StatutVillage45$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 46 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 332 40 ;\"; "Village de Caronne" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 352 40 ;\"; "Caronne Village" : ville = 0
        if StatutVillage46$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 47 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Pora" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Pora Village" : ville = 0
        if StatutVillage47$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 48 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 325 40 ;\"; "Village de Murcelle" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Murcelle Village" : ville = 0
        if StatutVillage48$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 49 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 352 40 ;\"; "Village de Naro" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 372 40 ;\"; "Naro Village" : ville = 0
        if StatutVillage49$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 50 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Invin" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Invin Village" : ville = 0
        if StatutVillage50$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 51 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Valor" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Valor Village" : ville = 0
        if StatutVillage51$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 52 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 338 40 ;\"; "Village de Veritus" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 358 40 ;\"; "Veritus Village" : ville = 0
        if StatutVillage52$ = "arène non conquise" then gosub [makeLINE]
    end if
    if village = 53 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 345 40 ;\"; "Village de Herco" : ville = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Herco Village" : ville = 0
        if StatutVillage53$ = "arène non conquise" then gosub [makeLINE]
    end if

    if ville = 1 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Ville d'Arhos" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 385 40 ;\"; "Arhos City" : village = 0
        if StatutVille1$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 2 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Ville d'Aria" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 390 40 ;\"; "Aria City" : village = 0
        if StatutVille2$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 3 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Ville d'Andora" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Andora City" : village = 0
        if StatutVille3$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 4 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Ville de Jiren" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Jiren City" : village = 0
        if StatutVille4$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 5 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 352 40 ;\"; "Ville de Idia" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 382 40 ;\"; "Idia City" : village = 0
        if StatutVille5$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 6 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 355 40 ;\"; "Ville de Odafy" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 375 40 ;\"; "Odafy City" : village = 0
        if StatutVille6$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 7 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 365 40 ;\"; "Ville de Nor" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 385 40 ;\"; "Nor City" : village = 0
        if StatutVille7$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 8 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 350 40 ;\"; "Ville de Isilra" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 370 40 ;\"; "Isilra City" : village = 0
        if StatutVille8$ = "arène non conquise" then gosub [makeLINE]
    end if
    if ville = 9 then
        if version = 1 then print #ini.main, "font Courier_New 16 italic; place 335 40 ;\"; "Ligue des célèstes" : village = 0
        if version = 2 then print #ini.main, "font Courier_New 16 italic; place 325 40 ;\"; "League of Celestials" : village = 0
        if StatutLeague$ = "arène non conquise" then gosub [makeLINE]
    end if
    print #ini.main, "flush"
    wait

    [makeLINE]
    print #ini.main, "font Courier_New 8"
    if version = 1 then print #ini.main, "place 381 85 ;\"; "- Votre réputation - "
    if version = 2 then print #ini.main, "place 381 85 ;\"; "- Your reputation - "
    print #ini.main, "size 4; color black"
    print #ini.main, "line "; 355; " "; 70; " "; 555; " "; 70
    print #ini.main, "size 2; color white"
    print #ini.main, "line "; 355; " "; 70; " "; 555; " "; 70

    if village > 0 then
        if reputationVillage(village) <50 then print #ini.main, "size 2; color red"
        if reputationVillage(village) >=50 and reputationVillage(village) <100 then print #ini.main, "size 2; color green"
        if reputationVillage(village) =100 then print #ini.main, "size 2; color blue"
        print #ini.main, "line "; 355; " "; 70; " "; int(355+(reputationVillage(village)*2)); " "; 70
    end if
    if ville > 0 then
        if reputationVille(ville) <50 then print #ini.main, "size 2; color red"
        if reputationVille(ville) >=50 and reputationVille(ville) <100 then print #ini.main, "size 2; color darkgreen"
        if reputationVille(ville) =100 then print #ini.main, "size 2; color blue"
        print #ini.main, "line "; 355; " "; 70; " "; int(355+(reputationVille(ville)*2)); " "; 70
    end if
    return

    [click1]
    mX = MouseX : mY = MouseY
    'notice mX ;" "; mY
    if mX>20 and mX<60 and mY>65 and mY<105 and worldOPEN = 1 then goto [world]
    if mX>135 and mX<370 and mY>160 and mY<240 then close #ini : arenaRMK = 0 : BOSS = 0 : goto [arena]

    if mX>855 and mX<875 and mY>8 and mY<33 and bruitage = 0 then bruitage = 1 : print #ini.main, "drawbmp sons 855 8" : wait
    if mX>855 and mX<875 and mY>8 and mY<33 and bruitage = 1 then bruitage = 0 : print #ini.main, "drawbmp sons2 855 8" : wait

    if tuto = 1 and mX>530 and mX<830 and mY>155 and mY<255 then
        print #ini.main, "font Courier_New 8"
        if version = 1 then txtnotifier$ = "Vous avez déjà vaincu le champion de cette arène. Allez dans un village ou le champion n'a pas encore été vaincu."
        if version = 2 then txtnotifier$ = "You have already defeated the champion of this arena. Go to a village where the champion has not yet been defeated."
        if tuto = 1 and village = 1 and StatutVillage1$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 2 and StatutVillage2$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 3 and StatutVillage3$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 4 and StatutVillage4$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 5 and StatutVillage5$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 6 and StatutVillage6$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 7 and StatutVillage7$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 8 and StatutVillage8$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 9 and StatutVillage9$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 10 and StatutVillage10$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 11 and StatutVillage11$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 12 and StatutVillage12$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 13 and StatutVillage13$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 14 and StatutVillage14$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 15 and StatutVillage15$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 16 and StatutVillage16$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 17 and StatutVillage17$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 18 and StatutVillage18$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 19 and StatutVillage19$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 20 and StatutVillage20$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 21 and StatutVillage21$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 22 and StatutVillage22$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 23 and StatutVillage23$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 24 and StatutVillage24$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 25 and StatutVillage25$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 26 and StatutVillage26$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 27 and StatutVillage27$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 28 and StatutVillage28$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 29 and StatutVillage29$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 30 and StatutVillage30$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 31 and StatutVillage31$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 32 and StatutVillage32$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 33 and StatutVillage33$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 34 and StatutVillage34$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 35 and StatutVillage35$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 36 and StatutVillage36$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 37 and StatutVillage37$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 38 and StatutVillage38$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 39 and StatutVillage39$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 40 and StatutVillage40$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 41 and StatutVillage41$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 42 and StatutVillage42$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 43 and StatutVillage43$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 44 and StatutVillage44$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 45 and StatutVillage45$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 46 and StatutVillage46$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 47 and StatutVillage47$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 48 and StatutVillage48$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 49 and StatutVillage49$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 50 and StatutVillage50$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 51 and StatutVillage51$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 52 and StatutVillage52$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village = 53 and StatutVillage53$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 1 and StatutVille1$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 2 and StatutVille2$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 3 and StatutVille3$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 4 and StatutVille4$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 5 and StatutVille5$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 6 and StatutVille6$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 7 and StatutVille7$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and ville = 8 and StatutVille8$ = "arène conquise" then gosub [dejaCONQUIS] : wait
        if tuto = 1 and village > 0 and reputationVillage(village) < 100 and version = 1 then
            print #ini.main, "drawbmp tuto3 210 210"
            print #ini.main, "color white; place 300 245 ;\"; "Vous n'avez pas assez de réputation pour \défier le champion. Entrainez vous dans \l'arène de gauche !"
            wait
        end if
        if tuto = 1 and village > 0 and reputationVillage(village) < 100 and version = 2 then
            print #ini.main, "drawbmp tuto3 210 210"
            print #ini.main, "color white; place 300 245 ;\"; "You do not have enough reputation to \challenge the champion to a duel !\Fight more opponents in the left arena."
            wait
        end if
        if tuto = 1 and ville > 0 and reputationVille(ville) < 100 and version = 1 then
            print #ini.main, "drawbmp tuto3 210 210"
            print #ini.main, "color white; place 300 245 ;\"; "Vous n'avez pas assez de réputation pour \défier le champion. Entrainez vous dans \l'arène de gauche !"
            wait
        end if
        if tuto = 1 and ville > 0 and reputationVille(ville) < 100 and version = 2 then
            print #ini.main, "drawbmp tuto3 210 210"
            print #ini.main, "color white; place 300 245 ;\"; "You do not have enough reputation to \challenge the champion to a duel !\Fight more opponents in the left arena."
            wait
        end if
        close #ini : arenaRMK = 0 : BOSS = 1 : goto [arena]
    end if

    if hpPerso<hpPersoTotal and mX>70 and mX<110 and mY>65 and mY<105 and worldOPEN = 1 then goto [healing]
    if hpPerso<hpPersoTotal and mX>20 and mX<60 and mY>65 and mY<105 and worldOPEN = 0 then goto [healing]
    if mX<230 and mY>255 and mY<380 then goto [marchands]
    if mX>630 and mX<810 and mY>330 and mY<450 then goto [forgeron]
    if mX>20 and mX<60 and mY>15 and mY<55 then goto [inventaire]
    tuto = 1
    goto [INITIAL]

    [dejaCONQUIS]
    print #ini.main, "drawbmp tuto3 210 210"
    if version = 1 then print #ini.main, "color white; place 300 245 ;\"; "Vous avez déjà vaincu le champion de cette \arène. Allez dans un village ou celui-ci \n'a pas encore été vaincu."
    if version = 2 then print #ini.main, "color white; place 300 245 ;\"; "You have already defeated the champion of \this arena. Go to a village where the \champion has not yet been defeated."
    return

    [healing]
    healing = int((hpPersoTotal - hpPerso)/10)+1
    if version = 1 then soin$ = "Voulez-vous soigner vos bléssures pour ";healing;" d'or ?"
    if version = 2 then soin$ = "Would you heal your wounds for ";healing;" gold ?"
    confirm soin$;text$
    if text$ = "no" then wait
    if gold < healing and version = 1 then notice " " + chr$(13) +  "Pas assez d'or !" : wait
    if gold < healing and version = 2 then notice " " + chr$(13) +  "Not enough gold !" : wait
    if bruitage = 1 and TypePerso = 1 then playwave "data\heal1.wav", async
    if bruitage = 1 and TypePerso = 2 then playwave "data\heal2.wav", async
    gold = gold - healing
    hpPerso = hpPersoTotal
    goto [INITIAL]

    [world]
    print #ini.main, "down; fill white"
    print #ini.main, "drawbmp world 0 0; background world"
    if TypePerso = 1 then print #ini.main, "drawbmp inventaire 20 17"
    if TypePerso = 2 then print #ini.main, "drawbmp inventaireB 20 17"
    if hpPerso<hpPersoTotal then print #ini.main, "drawbmp soins 20 67"
    print #ini.main, "drawbmp inventaire2 65 17"
    lifePOURCENTAGE = int(xpPerso/(xpPersoTotal/100))
    print #ini.main, "when leftButtonDown [clickWorld1]"
    print #ini.main, "when rightButtonDown [clickWorld2]"

' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _TRANSPARENT As long,_  'flag for transparent background
        result As long          'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    print #ini.main, "font Courier_New 8; color black"
    if version = 1 then
        print #ini.main, "place 75 34 ;\"; "Niveau : "; lvlPerso; " [";lifePOURCENTAGE;"%]"
        print #ini.main, "place 75 49 ;\"; "Or : ";gold;"    "
        print #ini.main, "place 755 22 ;\"; "Votre position"
        print #ini.main, "place 755 38 ;\"; "Arène conquise"
        print #ini.main, "place 755 56 ;\"; "Arène occupée"
    end if
    if version = 2 then
        print #ini.main, "place 75 34 ;\"; "Level : "; lvlPerso; " [";lifePOURCENTAGE;"%]"
        print #ini.main, "place 75 49 ;\"; "Gold : ";gold;"    "
        print #ini.main, "place 755 22 ;\"; "Your position"
        print #ini.main, "place 755 38 ;\"; "Arena conquered"
        print #ini.main, "place 755 56 ;\"; "Busy Arena"
    end if
    print #ini.main, "place 740 90 ;\"; "Action      Info"

    if StatutVillage2$ = "arène conquise" then print #ini.main, "drawbmp conquest ";177;" ";332
    if StatutVillage3$ = "arène conquise" then print #ini.main, "drawbmp conquest ";91;" ";335
    if StatutVillage4$ = "arène conquise" then print #ini.main, "drawbmp conquest ";67;" ";380
    if StatutVillage5$ = "arène conquise" then print #ini.main, "drawbmp conquest ";284;" ";431
    if StatutVillage6$ = "arène conquise" then print #ini.main, "drawbmp conquest ";181;" ";359
    if StatutVillage7$ = "arène conquise" then print #ini.main, "drawbmp conquest ";232;" ";362
    if StatutVillage8$ = "arène conquise" then print #ini.main, "drawbmp conquest ";286;" ";368
    if StatutVillage9$ = "arène conquise" then print #ini.main, "drawbmp conquest ";235;" ";287
    if StatutVillage10$ = "arène conquise" then print #ini.main, "drawbmp conquest ";313;" ";272
    if StatutVillage11$ = "arène conquise" then print #ini.main, "drawbmp conquest ";337;" ";234
    if StatutVillage12$ = "arène conquise" then print #ini.main, "drawbmp conquest ";319;" ";330
    if StatutVillage13$ = "arène conquise" then print #ini.main, "drawbmp conquest ";431;" ";362
    if StatutVillage14$ = "arène conquise" then print #ini.main, "drawbmp conquest ";490;" ";347
    if StatutVillage15$ = "arène conquise" then print #ini.main, "drawbmp conquest ";379;" ";305
    if StatutVillage16$ = "arène conquise" then print #ini.main, "drawbmp conquest ";331;" ";305
    if StatutVillage17$ = "arène conquise" then print #ini.main, "drawbmp conquest ";454;" ";317
    if StatutVillage18$ = "arène conquise" then print #ini.main, "drawbmp conquest ";484;" ";293
    if StatutVillage19$ = "arène conquise" then print #ini.main, "drawbmp conquest ";439;" ";234
    if StatutVillage20$ = "arène conquise" then print #ini.main, "drawbmp conquest ";508;" ";245
    if StatutVillage21$ = "arène conquise" then print #ini.main, "drawbmp conquest ";511;" ";325
    if StatutVillage22$ = "arène conquise" then print #ini.main, "drawbmp conquest ";604;" ";296
    if StatutVillage23$ = "arène conquise" then print #ini.main, "drawbmp conquest ";562;" ";444
    if StatutVillage24$ = "arène conquise" then print #ini.main, "drawbmp conquest ";640;" ";308
    if StatutVillage25$ = "arène conquise" then print #ini.main, "drawbmp conquest ";670;" ";273
    if StatutVillage26$ = "arène conquise" then print #ini.main, "drawbmp conquest ";679;" ";350
    if StatutVillage27$ = "arène conquise" then print #ini.main, "drawbmp conquest ";727;" ";414
    if StatutVillage28$ = "arène conquise" then print #ini.main, "drawbmp conquest ";811;" ";393
    if StatutVille1$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";112;" ";292
    if StatutVille2$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";115;" ";393
    if StatutVille3$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";351;" ";356
    if StatutVille4$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";406;" ";264
    if StatutVille5$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";583;" ";339
    if StatutVille6$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";640;" ";441
    if StatutVille7$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";698;" ";304
    if StatutVille8$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";780;" ";347
    if StatutVille9$ = "arène conquise" then print #ini.main, "drawbmp conquest2 ";434;" ";130
    print #ini.main, "drawbmp player ";PersoX;" ";PersoY
    print #ini.main, "flush" : wait

    [clickWorld1]
    mX = MouseX : mY = MouseY
   ' notice mX ;" "; mY
    if mX>20 and mX<60 and mY>15 and mY<55 then WorldMAP = 1 : goto [inventaire]

    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _OPAQUE As long,_  'flag for transparent background
        result As long          'previous bkmode

    print #ini.main, "font Courier_New 8; backcolor ";0;" ";162;" ";232
    print #ini.main, "place 100 500 ;\"; "                                                              \                                                              \                                                              \                                                              \                                                              \                                                              "

    if hpPerso<hpPersoTotal and mX>20 and mX<60 and mY>65 and mY<105 then
        healing = int((hpPersoTotal - hpPerso)/10)+1
        if version = 1 then soin$ = "Voulez-vous soigner vos bléssures pour ";healing;" d'or ?"
        if version = 2 then soin$ = "Would you heal your wounds for ";healing;" gold ?"
        confirm soin$;text$
        if text$ = "no" then wait
        if gold < healing and version = 1 then notice " " + chr$(13) +  "Pas assez d'or !" : wait
        if gold < healing and version = 2 then notice " " + chr$(13) +  "Not enough gold !" : wait
        if bruitage = 1 then playwave "data\heal.wav", async
        gold = gold - healing
        hpPerso = hpPersoTotal
        goto [world]
    end if

    if mX>230 and mX<245 and mY>305 and mY<320 then PersoX = 233 : PersoY = 308 : village = 1 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>175 and mX<190 and mY>330 and mY<345 and StatutVillage1$ = "arène conquise" then PersoX = 178 : PersoY = 333 : village = 2 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>090 and mX<114 and mY>334 and mY<348 and StatutVillage2$ = "arène conquise" then PersoX = 092 : PersoY = 336 : village = 3 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>066 and mX<079 and mY>378 and mY<392 and StatutVillage3$ = "arène conquise" then PersoX = 068 : PersoY = 381 : village = 4 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>283 and mX<297 and mY>430 and mY<444 and StatutVillage4$ = "arène conquise" then PersoX = 285 : PersoY = 432 : village = 5 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>181 and mX<194 and mY>357 and mY<371 and StatutVillage2$ = "arène conquise" then PersoX = 182 : PersoY = 360 : village = 6 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>232 and mX<245 and mY>360 and mY<374 and StatutVillage6$ = "arène conquise" then PersoX = 233 : PersoY = 363 : village = 7 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>286 and mX<299 and mY>367 and mY<381 and StatutVillage7$ = "arène conquise" then PersoX = 287 : PersoY = 369 : village = 8 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>234 and mX<247 and mY>285 and mY<298 and StatutVillage2$ = "arène conquise" then PersoX = 236 : PersoY = 288 : village = 9 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>313 and mX<326 and mY>270 and mY<284 and StatutVillage9$ = "arène conquise" then PersoX = 314 : PersoY = 273 : village = 10 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>336 and mX<350 and mY>234 and mY<247 and StatutVillage10$ = "arène conquise" then PersoX = 338 : PersoY = 235 : village = 11 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>319 and mX<332 and mY>328 and mY<341 and StatutVillage9$ = "arène conquise" then PersoX = 320 : PersoY = 331 : village = 12 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>430 and mX<443 and mY>360 and mY<373 and StatutVillage12$ = "arène conquise" then PersoX = 432 : PersoY = 363 : village = 13 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>490 and mX<503 and mY>345 and mY<358 and StatutVillage13$ = "arène conquise" then PersoX = 491 : PersoY = 348 : village = 14 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>378 and mX<392 and mY>304 and mY<316 and StatutVillage12$ = "arène conquise" then PersoX = 380 : PersoY = 306 : village = 15 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>330 and mX<344 and mY>304 and mY<318 and StatutVillage15$ = "arène conquise" then PersoX = 332 : PersoY = 306 : village = 16 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>454 and mX<467 and mY>316 and mY<329 and StatutVillage15$ = "arène conquise" then PersoX = 455 : PersoY = 318 : village = 17 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>483 and mX<497 and mY>292 and mY<316 and StatutVillage15$ = "arène conquise" then PersoX = 485 : PersoY = 294 : village = 18 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>438 and mX<452 and mY>233 and mY<247 and StatutVillage15$ = "arène conquise" then PersoX = 440 : PersoY = 235 : village = 19 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>507 and mX<520 and mY>244 and mY<258 and StatutVillage15$ = "arène conquise" then PersoX = 509 : PersoY = 246 : village = 20 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>510 and mX<524 and mY>324 and mY<338 and StatutVillage20$ = "arène conquise" then PersoX = 512 : PersoY = 326 : village = 21 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>603 and mX<617 and mY>295 and mY<310 and StatutVillage20$ = "arène conquise" then PersoX = 605 : PersoY = 297 : village = 22 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>561 and mX<575 and mY>443 and mY<457 and StatutVillage22$ = "arène conquise" then PersoX = 563 : PersoY = 445 : village = 23 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>639 and mX<653 and mY>307 and mY<320 and StatutVillage22$ = "arène conquise" then PersoX = 641 : PersoY = 309 : village = 24 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>669 and mX<682 and mY>272 and mY<286 and StatutVillage24$ = "arène conquise" then PersoX = 671 : PersoY = 274 : village = 25 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>678 and mX<692 and mY>349 and mY<363 and StatutVillage24$ = "arène conquise" then PersoX = 680 : PersoY = 351 : village = 26 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>726 and mX<740 and mY>413 and mY<427 and StatutVillage26$ = "arène conquise" then PersoX = 728 : PersoY = 415 : village = 27 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    if mX>810 and mX<824 and mY>392 and mY<406 and StatutVillage27$ = "arène conquise" then PersoX = 812 : PersoY = 394 : village = 28 : ville = 0 : villageSELECT = village : villeSELECT = 0 : goto [INITIAL]
    ' villes & ligue
    if mX>111 and mX<134 and mY>291 and mY<311 and StatutVillage3$ = "arène conquise" then PersoX = 117 : PersoY = 297 : ville = 1 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>115 and mX<136 and mY>392 and mY<414 and StatutVillage4$ = "arène conquise" then PersoX = 121 : PersoY = 398 : ville = 2 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>350 and mX<375 and mY>355 and mY<375 and StatutVillage12$ = "arène conquise" then PersoX = 356 : PersoY = 361 : ville = 3 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>405 and mX<430 and mY>260 and mY<285 and StatutVillage15$ = "arène conquise" then PersoX = 411 : PersoY = 269 : ville = 4 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>580 and mX<605 and mY>335 and mY<360 and StatutVillage22$ = "arène conquise" then PersoX = 589 : PersoY = 344 : ville = 5 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>640 and mX<665 and mY>440 and mY<465 and StatutVillage23$ = "arène conquise" then PersoX = 646 : PersoY = 446 : ville = 6 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>695 and mX<720 and mY>300 and mY<325 and StatutVillage24$ = "arène conquise" then PersoX = 703 : PersoY = 309 : ville = 7 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>775 and mX<800 and mY>346 and mY<370 and StatutVillage28$ = "arène conquise" then PersoX = 786 : PersoY = 352 : ville = 8 : village = 0 : villeSELECT = ville : villageSELECT = 0 : goto [INITIAL]
    if mX>430 and mX<460 and mY>125 and mY<150 and StatutVillage19$ = "arène conquise" and StatutVille1$ = "arène conquise" and StatutVille2$ = "arène conquise" and StatutVille3$ = "arène conquise" and StatutVille4$ = "arène conquise" and StatutVille5$ = "arène conquise" and StatutVille6$ = "arène conquise" and StatutVille7$ = "arène conquise" and StatutVille8$ = "arène conquise" then PersoX = 439 : PersoY = 136 : ville = 9 : village = 0 : goto [INITIAL]

    if version = 1 then print #ini.main, "place 100 500 ;\"; "Vous ne pouvez vous rendre ici !" : timer 600, [refreshMAP] : wait
    if version = 2 then print #ini.main, "place 100 500 ;\"; "You can't get here!" : timer 600, [refreshMAP] : wait
    [refreshMAP]
    timer 0
    print #ini.main, "font Courier_New 8; backcolor ";0;" ";162;" ";232
    print #ini.main, "place 100 500 ;\"; "                                                              \                                                              \                                                              \                                                              \                                                              \                                                              "
    wait


    [clickWorld2]
    mX = MouseX : mY = MouseY
 '   notice mX ;" "; mY

    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _OPAQUE As long,_  'flag for transparent background
        result As long          'previous bkmode

    print #ini.main, "font Courier_New 8; backcolor ";0;" ";162;" ";232
    print #ini.main, "place 100 500 ;\"; "                                                              \                                                              \                                                              \                                                              \                                                              \                                                              "

    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _TRANSPARENT As long,_  'flag for transparent background
        result As long          'previous bkmode

    print #ini.main, "font Courier_New 8; color black"
    select case version
    case 1
    if mX>230 and mX<245 and mY>305 and mY<320 then village = 1 : print #ini.main, "place 100 500 ;\"; "Village de Narah (niv : 1 à 3)\\C'est un paisible village ou l'on retrouve l'un des \meilleurs formateur pour le combat en arêne : Baltor." : wait
    if mX>175 and mX<190 and mY>330 and mY<345 then village = 2 : print #ini.main, "place 100 500 ;\"; "Village de Yir (niv : 4 à 7)\\Yir possède un marché aux légumes formidable !\Pourtant personne n'en achète ..." : wait
    if mX>090 and mX<114 and mY>334 and mY<348 then village = 3 : print #ini.main, "place 100 500 ;\"; "Village de Berro (niv : 7 à 10)\\Un petit village minier.\Certains y mine fer et d'autres du bitcoin !" : wait
    if mX>066 and mX<079 and mY>378 and mY<392 then village = 4 : print #ini.main, "place 100 500 ;\"; "Village de Var (niv : 10 à 13)\\Les pierres de Var ont la particularité de briller en \pleine nuit, servant d'éclairage pour ses habitants.\Les plus belles pierres sont prisées par les bijoutiers \des grandes villes." : wait
    if mX>283 and mX<297 and mY>430 and mY<444 then village = 5 : print #ini.main, "place 100 500 ;\"; "Village de Feru (niv : 13 à 15)\\C'est un village entouré de forêts.Ils y font du bon\miel ... ainsi que du très bon ... miel." : wait
    if mX>181 and mX<194 and mY>357 and mY<371 then village = 6 : print #ini.main, "place 100 500 ;\"; "Village de Vellance (niv : 15 à 18)\\Proche de la mer et profitant d'un commerce avec la \ville d'Arhos plus au nord, l'air de Vellance est \très bonne pour le mal de dos." : wait
    if mX>232 and mX<245 and mY>360 and mY<374 then village = 7  : print #ini.main, "place 100 500 ;\"; "Village de Ourval (niv : 18 à 20)\\Village de pécheur, principale fournisseur de la ville \d'Aria. Certains disent que les habitants se baignent \nus les soir de pleine lune..." : wait
    if mX>286 and mX<299 and mY>367 and mY<381 then village = 8  : print #ini.main, "place 100 500 ;\"; "Village de Rhin (niv : 20 à 24)\\Içi ont à essayé de péché mais il n'y pas d'eau ...\Alors ont à essayé de miner mais il n'y a pas de cailloux !\Finalement ont à décidé de cultiver des champignons." : wait
    if mX>234 and mX<247 and mY>285 and mY<298 then village = 9  : print #ini.main, "place 100 500 ;\"; "Village d'Arlo (niv : 24 à 27)\\L'un des 3 villages habitant sur ces terres hantés. \Il a la particularité d'avoir des combattants ... morts !" : wait
    if mX>313 and mX<326 and mY>270 and mY<284 then village = 10 : print #ini.main, "place 100 500 ;\"; "Village de Verin (niv : 27 à 31)\\Pas de morts-vivants içi ! Enfin c'est ce qui est dit..." : wait
    if mX>336 and mX<350 and mY>234 and mY<247 then village = 11 : print #ini.main, "place 100 500 ;\"; "Village de Ugiri (niv : 31 à 36)\\Reconnu mondialement pour ses sorts d'exorciste, \il semblerait que ce village cache bien des secrets." : wait
    if mX>319 and mX<332 and mY>328 and mY<341 then village = 12 : print #ini.main, "place 100 500 ;\"; "Village de Borth (niv : 36 à 40)\\Un village de bucheron fortement apprécié par les \constructeurs de bateau. On y trouve aussi d'excellent \cookies !" : wait
    if mX>430 and mX<443 and mY>360 and mY<375 then village = 13 : print #ini.main, "place 100 500 ;\"; "Village d'Iri (niv : 40 à 44)\\Le trico, c'est important ! C'est pourquoi l'association\des manches courtes à ses locaux dans ce village.\Pourquoi ? aucune idée !" : wait
    if mX>490 and mX<503 and mY>345 and mY<358 then village = 14 : print #ini.main, "place 100 500 ;\"; "Village d'Oma (niv : 44 à 49)\\Village touristique, un musée permet d'entrevoir la\faune et la flore sauvage du continent. A visiter !" : wait
    if mX>378 and mX<392 and mY>304 and mY<318 then village = 15 : print #ini.main, "place 100 500 ;\"; "Village d'Etan (niv : 49 à 52)\\C'est un village assez isolé  ou se cache un certain \satoshi ..." : wait
    if mX>330 and mX<344 and mY>304 and mY<318 then village = 16 : print #ini.main, "place 100 500 ;\"; "Village de Pistos (niv : 52 à 55)\\Ce village à été batie a partir d'ossement de dragon.\C'est en tout cas ce que raconte un de ses légendes." : wait
    if mX>454 and mX<467 and mY>316 and mY<329 then village = 17 : print #ini.main, "place 100 500 ;\"; "Village d'As (niv : 55 à 59)\\Assez pittoresque mais il y fait bon vivre.\Le vin fermenté à la semelle de botte de crapeau est \sa spécialité." : wait
    if mX>483 and mX<497 and mY>292 and mY<316 then village = 18 : print #ini.main, "place 100 500 ;\"; "Village de Myr (niv : 59 à 65)\\Village marchand qui exporte de nombreuses\petites figurines de créatures métalliques." : wait
    if mX>438 and mX<452 and mY>233 and mY<248 then village = 19 : print #ini.main, "place 100 500 ;\"; "Village des Sables doux (niv : 65 à 68)\\On y vient surtout pour se reposer.\Le sable doux et chaux de ses plages ont des propriétés \uniques contre l'arthrose." : wait
    if mX>507 and mX<520 and mY>244 and mY<258 then village = 20 : print #ini.main, "place 100 500 ;\"; "Village d'Arth (niv : 69 à 73)\\Véritable lieux de transite entre l'ouest et \le reste du continent, ce village est aussi l'un des plus \peuplé et développé de la région !" : wait
    if mX>510 and mX<524 and mY>324 and mY<338 then village = 21 : print #ini.main, "place 100 500 ;\"; "Village du Vivier (niv : 73 à 77)\\Un village de chasseur spécialisé dans la charcuterie \et les habits rudimentaires  en peau de bête." : wait
    if mX>603 and mX<617 and mY>295 and mY<310 then village = 22 : print #ini.main, "place 100 500 ;\"; "Village de Nisnor (niv : 77 à 80)\\La spécialité de ce lieu c'est que personne ne porte de \chaussures ! " : wait
    if mX>561 and mX<575 and mY>443 and mY<457 then village = 23 : print #ini.main, "place 100 500 ;\"; "Village de Éterup (niv : 81 à 85)\\Des rumeurs racontent sur ce village isolé que\les familles ne se marient qu'entre elles ..." : wait
    if mX>639 and mX<653 and mY>307 and mY<320 then village = 24 : print #ini.main, "place 100 500 ;\"; "Village du Dard (niv : 85 à 89)\\Petit village traditionnel et bien entretenu.\Il est surtout fréquenté pour ses maisons close et \ses substances hallucinogènes." : wait
    if mX>669 and mX<682 and mY>272 and mY<286 then village = 25 : print #ini.main, "place 100 500 ;\"; "Village de Zar (niv : 90 à 96)\\Principal exportateur de carotte au fromage à la \bave d'escargot du continent. \Son exportation s'accroie d'année en année !" : wait
    if mX>678 and mX<698 and mY>349 and mY<363 then village = 26 : print #ini.main, "place 100 500 ;\"; "Village d'Alara (niv : 96 à 101)\\Fournisseur historique de la ville de Jiren dans\la création d'appareil de musculation pour\les forces armée de la région." : wait
    if mX>726 and mX<740 and mY>413 and mY<427 then village = 27 : print #ini.main, "place 100 500 ;\"; "Village du Mont (niv : 101 à 107)\\Juché sur le haut d'un colline, ce village paisible\vie principalement de la culture du blé et d'orge." : wait
    if mX>810 and mX<824 and mY>392 and mY<406 then village = 28 : print #ini.main, "place 100 500 ;\"; "Village de Mouvir (niv : 107 à 112)\\Seul 10 familles habitent ce village et aucunes\autres personnes n'est autorisé à s'y installer." : wait
    case 2
    if mX>230 and mX<245 and mY>305 and mY<320 then village = 1 : print #ini.main, "place 100 500 ;\"; "Narah Village (lvl : 1 à 3)\\It is a peaceful village where we find one of the best \trainers for arena fight : Baltor." : wait
    if mX>172 and mX<190 and mY>330 and mY<345 then village = 2 : print #ini.main, "place 100 500 ;\"; "Yir Village (lvl : 4 à 7)\\Yir has a wonderful vegetable market! Yet no one \buys them ..." : wait
    if mX>090 and mX<114 and mY>334 and mY<348 then village = 3 : print #ini.main, "place 100 500 ;\"; "Berro Village (lvl : 7 à 10)\\A small mining village. Some mine iron and others  \mine bitcoin !" : wait
    if mX>066 and mX<079 and mY>378 and mY<392 then village = 4 : print #ini.main, "place 100 500 ;\"; "Var Village (lvl : 10 à 13)\\The stones of Var have the particularity of shining in \the middle of the night, serving as lighting for its \inhabitants. The most beautiful stones are prized \by jewelers in large cities." : wait
    if mX>283 and mX<297 and mY>430 and mY<444 then village = 5 : print #ini.main, "place 100 500 ;\"; "Feru Village (lvl : 13 à 15)\\It's a village surrounded by forests. They make good honey \there... as well as very good... honey." : wait
    if mX>181 and mX<194 and mY>357 and mY<371 then village = 6 : print #ini.main, "place 100 500 ;\"; "Vellance Village (lvl : 15 à 18)\\Close to the sea and benefiting from trade with the town of \Arhos further north, the air of Vellance is very good for back \pain." : wait
    if mX>232 and mX<245 and mY>360 and mY<374 then village = 7  : print #ini.main, "place 100 500 ;\"; "Ourval Village (lvl : 18 à 20)\\Fishing village, main supplier to the city of Aria. Some say \that locals swim on full moon nights..." : wait
    if mX>286 and mX<299 and mY>367 and mY<381 then village = 8  : print #ini.main, "place 100 500 ;\"; "Rhin Village (lvl : 20 à 24)\\Here they tried to sin but there was no water...\Then they tried to mine but there were no stones!\Finally they decided to cultivate mushrooms." : wait
    if mX>234 and mX<247 and mY>285 and mY<298 then village = 9  : print #ini.main, "place 100 500 ;\"; "Arlo Village (lvl : 24 à 27)\\One of the 3 villages living on these haunted lands. \It has the particularity of having fighters... dead!" : wait
    if mX>313 and mX<326 and mY>270 and mY<284 then village = 10 : print #ini.main, "place 100 500 ;\"; "Verin Village (lvl : 27 à 31)\\No undead here! Well, that's what it says..." : wait
    if mX>336 and mX<350 and mY>234 and mY<247 then village = 11 : print #ini.main, "place 100 500 ;\"; "Ugiri Village (lvl : 31 à 36)\\Renowned worldwide for its exorcist spells, it seems \that this village hides many secrets." : wait
    if mX>319 and mX<332 and mY>328 and mY<341 then village = 12 : print #ini.main, "place 100 500 ;\"; "Borth Village (lvl : 36 à 40)\\A lumberjack village highly appreciated by boat builders. \There are also excellent cookies there!" : wait
    if mX>430 and mX<443 and mY>360 and mY<375 then village = 13 : print #ini.main, "place 100 500 ;\"; "Iri Village (lvl : 40 à 44)\\Knitting is important! This is why the short sleeves \association has its premises in this village. Why? no idea !" : wait
    if mX>490 and mX<503 and mY>345 and mY<358 then village = 14 : print #ini.main, "place 100 500 ;\"; "Oma Village (lvl : 44 à 49)\\Tourist village, a museum allows you to glimpse the wild \fauna and flora of the continent. To visit !" : wait
    if mX>378 and mX<392 and mY>304 and mY<318 then village = 15 : print #ini.main, "place 100 500 ;\"; "Etan Village (lvl : 49 à 52)\\It's a fairly isolated village where a certain \satoshi is hiding..." : wait
    if mX>330 and mX<344 and mY>304 and mY<318 then village = 16 : print #ini.main, "place 100 500 ;\"; "Pistos Village (lvl : 52 à 55)\\This village was built from dragon bones.\In any case, that's what one of its legends says." : wait
    if mX>454 and mX<467 and mY>316 and mY<329 then village = 17 : print #ini.main, "place 100 500 ;\"; "As Village (lvl : 55 à 59)\\Quite picturesque but it's a good place to live.\Wine fermented in toadstools is its specialty." : wait
    if mX>483 and mX<497 and mY>292 and mY<316 then village = 18 : print #ini.main, "place 100 500 ;\"; "Myr Village (lvl : 59 à 65)\\Merchant village that exports many small figurines \of metal creatures." : wait
    if mX>438 and mX<452 and mY>233 and mY<248 then village = 19 : print #ini.main, "place 100 500 ;\"; "Gentle sands Village (lvl : 65 à 68)\\People come here mainly to rest. The soft, lime sand of \its beaches have unique properties against osteoarthritis." : wait
    if mX>507 and mX<520 and mY>244 and mY<258 then village = 20 : print #ini.main, "place 100 500 ;\"; "Arth Village (lvl : 69 à 73)\\A real transit point between the west and the rest of the \continent, this village is also one of the most populated and \developed in the region!" : wait
    if mX>510 and mX<524 and mY>324 and mY<338 then village = 21 : print #ini.main, "place 100 500 ;\"; "Vivier Village (lvl : 73 à 77)\\A hunting village specializing in charcuterie and \rudimentary animal skin clothing." : wait
    if mX>603 and mX<617 and mY>295 and mY<310 then village = 22 : print #ini.main, "place 100 500 ;\"; "Nisnor Village (lvl : 77 à 80)\\The specialty of this place is that no one wears shoes! " : wait
    if mX>561 and mX<575 and mY>443 and mY<457 then village = 23 : print #ini.main, "place 100 500 ;\"; "Eterup Village (lvl : 81 à 85)\\Rumors tell of this isolated village that families \only marry among themselves..." : wait
    if mX>639 and mX<653 and mY>307 and mY<320 then village = 24 : print #ini.main, "place 100 500 ;\"; "Dard Village (lvl : 85 à 89)\\Small, traditional, well-maintained village. It is mainly \frequented for its brothels and hallucinogenic substances." : wait
    if mX>669 and mX<682 and mY>272 and mY<286 then village = 25 : print #ini.main, "place 100 500 ;\"; "Zar Village (lvl : 90 à 96)\\Main exporter of carrot with snail slime cheese on the \continent. Its export is increasing from year to year!" : wait
    if mX>678 and mX<698 and mY>349 and mY<363 then village = 26 : print #ini.main, "place 100 500 ;\"; "Alara Village (lvl : 96 à 101)\\Historical supplier to the city of Jiren in the creation \of weight training equipment for the region's armed forces." : wait
    if mX>726 and mX<740 and mY>413 and mY<427 then village = 27 : print #ini.main, "place 100 500 ;\"; "Mont Village (lvl : 101 à 107)\\Perched on the top of a hill, this peaceful village lives \mainly from the cultivation of wheat and barley." : wait
    if mX>810 and mX<824 and mY>392 and mY<406 then village = 28 : print #ini.main, "place 100 500 ;\"; "Mouvir Village (lvl : 107 à 112)\\Only 10 families live in this village and no other \people are allowed to settle there." : wait
    end select

    ' ville 1
    if version = 1 and mX>110 and mX<135 and mY>290 and mY<315 then ville = 1 : print #ini.main, "place 100 500 ;\"; "Ville d'Arhos (niv : 21 à 24)\\Une ancienne ville vivant de la pèche et du commerce \spécialisé dans la fabrique d'épée.\\Bonus : Débloque les coups critiques sur les armes" : wait
    if version = 2 and mX>110 and mX<135 and mY>290 and mY<315 then ville = 1 : print #ini.main, "place 100 500 ;\"; "City of Arhos (lvl : 21 à 24)\\An ancient city living from fishing and trade specializing \in sword making. \Bonus: Unlocks critical hits on weapons." : wait
    if version = 1 and mX>127 and mX<172 and mY>238 and mY<280 then print #ini.main, "place 100 500 ;\"; "Maître d'arène d'Arhos : Elric \\Mentor des combattants de la ville d'Arhos depuis \plus de 30 ans, il est reconnu dans le monde entier \pour sa technique secrète : Le coup critique !" : wait
    if version = 2 and mX>127 and mX<172 and mY>238 and mY<280 then print #ini.main, "place 100 500 ;\"; "Arena Master of Arhos : Elric \\Mentor of the fighters of the city of Arhos for more \than 30 years, he is recognized throughout the world \for his secret technique: The critical strike!" : wait
    ' ville 2
    if version = 1 and mX>110 and mX<135 and mY>390 and mY<415 then ville = 2 : print #ini.main, "place 100 500 ;\"; "Ville d'Aria (niv : 27 à 31)\\Ville excentrée qui est spécialisé dans la culture du \corps. Grâce à leur entrainement rigoureu, il renforce \considérament leur endurance physique.\Bonus : Débloque les pv bonus sur les équipements." : wait
    if version = 2 and mX>110 and mX<135 and mY>390 and mY<415 then ville = 2 : print #ini.main, "place 100 500 ;\"; "City of Aria (lvl : 27 à 31)\\Outlying city that specializes in body culture. Thanks \to their rigorous training, it significantly strengthens \their physical endurance. \Bonus: Unlocks bonus HP on equipment." : wait
    if version = 1 and mX>67 and mX<114 and mY>425 and mY<465 then print #ini.main, "place 100 500 ;\"; "Maître d'arène d'Aria : Valrak \\Il est reconnue pour être le plus grand combattant de \sa ville. Son entrainement lui a permis de booster ses \points de vie de façon considérable." : wait
    if version = 2 and mX>67 and mX<114 and mY>425 and mY<465 then print #ini.main, "place 100 500 ;\"; "Arena Master of Aria : Valrak \\He is known to be the greatest fighter in his city. His \training has gave him from boosting his life points \considerably." : wait
    ' ville 3
    if version = 1 and mX>350 and mX<375 and mY>355 and mY<375 then ville = 3 : print #ini.main, "place 100 500 ;\"; "Ville d'Andora (niv : 76 à 79)\\Une gigantesque ville arborant de nombreuses\tours avec des batiments faits de pierres blanches.\Elle possède une académie de mage très reconnue.\Bonus : Débloque le % de dégâts sur les équipements." : wait
    if version = 2 and mX>350 and mX<375 and mY>355 and mY<375 then ville = 3 : print #ini.main, "place 100 500 ;\"; "City of Andora (lvl : 76 à 79)\\A gigantic city with numerous towers with buildings made \of white stones. It has a very renowned mage academy.\Bonus: Unlocks the % damage on equipment." : wait
    if version = 1 and mX>332 and mX<378 and mY>395 and mY<435 then print #ini.main, "place 100 500 ;\"; "Maître d'arène d'Andora : Anastasia \\Elle est l'un des 2 plus puissants mages du continent.\Sous ses air doux et calme se cache une magie dévastatrice\pouvant tuer son adversaire ... en un seul coup." : wait
    if version = 2 and mX>332 and mX<378 and mY>395 and mY<435 then print #ini.main, "place 100 500 ;\"; "Arena Master of Andora : Anastasia \\She is one of the 2 most powerful mages on the continent. \Beneath her gentle and calm demeanor lies a devastating magic \that can kill her opponent... in a single blow." : wait
    ' ville 4
    if version = 1 and mX>405 and mX<430 and mY>260 and mY<285 then ville = 4 : print #ini.main, "place 100 500 ;\"; "Ville de Jiren (niv : 104 à 108)\\Une ville commercante qui envois des \marchandises au 4 coins du continent. Le vin est son \principale attout !\Bonus : Débloque les bonus d'intelligence sur les équipements" : wait
    if version = 2 and mX>405 and mX<430 and mY>260 and mY<285 then ville = 4 : print #ini.main, "place 100 500 ;\"; "City of Jiren (lvl : 104 à 108)\\A trading city which sends goods to the 4 corners of the \continent. Wine is its main asset!\Bonus: Unlocks intelligence bonuses on equipment" : wait
    if version = 1 and mX>375 and mX<412 and mY>210 and mY<250 then print #ini.main, "place 100 500 ;\"; "Maître d'arène de Jiren : Zulmane \\Il est reconnu comme l'un des plus grand\marchand du continent. Il a même réussi a vendre une \chèvre contre un château..." : wait
    if version = 2 and mX>375 and mX<412 and mY>210 and mY<250 then print #ini.main, "place 100 500 ;\"; "Arena Master of Jiren : Zulmane \\He is recognized as one of the largest merchants on the \continent. He even managed to sell a goat for a castle..." : wait
    ' ville 5
    if version = 1 and mX>580 and mX<605 and mY>335 and mY<360 then ville = 5 : print #ini.main, "place 100 500 ;\"; "Ville d'Idia (niv : 168 à 172)\\Une ville côtière utilisant ses sources d'eau chaude comme \principal revenu touristique. Ont dit que ces eaux \augmentent la force de ceux qui s'y baigne.\Bonus : Débloque les bonus de force sur les équipements." : wait
    if version = 2 and mX>580 and mX<605 and mY>335 and mY<360 then ville = 5 : print #ini.main, "place 100 500 ;\"; "City of Idia (lvl : 168 à 172)\\A coastal town using its hot springs as its main tourist \income. It is said that these waters increase the strength \of those who bathe in them. \Bonus: Unlocks strength bonuses on equipment." : wait
    if version = 1 and mX>533 and mX<578 and mY>365 and mY<410 then print #ini.main, "place 100 500 ;\"; "Maître d'arène d'Idia : Niamie \\Ont dit qu'elle se baigne dans les sources d'eau chaude \d'Idia depuis sa naissance, lui conférant une force énorme.\Elle aurait conquis l'arène à main nue." : wait
    if version = 2 and mX>533 and mX<578 and mY>365 and mY<410 then print #ini.main, "place 100 500 ;\"; "Arena Master of Idia : Niamie \\She is said to have bathed in Idia's hot springs since birth, \giving her enormous strength. She is said to have conquered \the arena with her bare hands." : wait
    ' ville 6
    if version = 1 and mX>640 and mX<665 and mY>435 and mY<460 then ville = 6 : print #ini.main, "place 100 500 ;\"; "Ville d'Odafy (niv : 202 à 205)\\Cette ville est très étendue. Elle est \batie sur un territoire mêlant petites falaise et forêt \dense.\Bonus : Débloque les bonus d'agilité sur les équipements." : wait
    if version = 2 and mX>640 and mX<665 and mY>435 and mY<460 then ville = 6 : print #ini.main, "place 100 500 ;\"; "City of Odafy (lvl : 202 à 205)\\This city is very large. It is built on a territory mixing \small cliffs and dense forest.\Bonus: Unlocks agility bonuses on equipment." : wait
    if version = 1 and mX>630 and mX<670 and mY>468 and mY<510 then print #ini.main, "place 100 500 ;\"; "Maître d'arène d'Odafy : Iris \\Véritable acrobate, Iris est spécialisé dans l'exploration \urbaine. Son agilité est aussi bonne dans sur le terrain \que sa technique à l'arc l'est en arène. " : wait
    if version = 2 and mX>630 and mX<670 and mY>468 and mY<510 then print #ini.main, "place 100 500 ;\"; "Arena Master of Odafy : Iris \\A true acrobat, Iris specializes in urban exploration. His \agility is as good in the field as his archery technique is \in the arena." : wait
    ' ville 7
    if version = 1 and mX>695 and mX<720 and mY>300 and mY<325 then ville = 7 : print #ini.main, "place 100 500 ;\"; "Ville de Nor (niv : 244 à 249)\\Une ville fortifiée donc la spécialité est la \fabrication d'équipement défensif. Il est dit que \qu'aucune armée n'a réussi a briser ses remparts.\Bonus : Débloque le % d'armure sur les équipements." : wait
    if version = 2 and mX>695 and mX<720 and mY>300 and mY<325 then ville = 7 : print #ini.main, "place 100 500 ;\"; "City of Nor (lvl : 244 à 249)\\A fortified city so the specialty is the manufacture of \defensive equipment. It is said that no army has succeeded \in breaking its ramparts. \Bonus: Unlocks the armor % on equipment." : wait
    if version = 1 and mX>700 and mX<745 and mY>245 and mY<290 then print #ini.main, "place 100 500 ;\"; "Maître d'arène de Nor : Uthor \\Il lui a fallu plus de 10 pour perfectionner son armure \et l'art de la défense. Il est réputé pour être \indestructible et ne craint personne." : wait
    if version = 2 and mX>700 and mX<745 and mY>245 and mY<290 then print #ini.main, "place 100 500 ;\"; "Arena Master of Nor : Uthor \\It took him over 10 years to perfect his armor\and the art of defense. He is known to be indestructible and \fears no one." : wait
    ' ville 8
    if version = 1 and mX>775 and mX<800 and mY>345 and mY<370 then ville = 7 : print #ini.main, "place 100 500 ;\"; "Ville d'Isilra (niv : 299 à 300)\\La ville d'Isilra possède la plus grande bibliothèque \du continent réunissant tous les récits écrits depuis \l'éveil de la civilisation.\Bonus : Débloque le % de coup critique." : wait
    if version = 1 and mX>795 and mX<840 and mY>300 and mY<340 then print #ini.main, "place 100 500 ;\"; "Maître d'arène d'Isilra : Zed \\Il est reconnu comme l'un des plus puissants mage vivant. \Ses capacités d'adaptation au combat ainsi que des dégâts \monstreux en feront l'adversaire le plus difficile à vaincre..." : wait
    if version = 2 and mX>775 and mX<800 and mY>345 and mY<370 then ville = 7 : print #ini.main, "place 100 500 ;\"; "Isilra City (lvl : 299 à 300)\\The city of Isilra has the largest library on the continent, \bringing together all the stories written since the awakening \of civilization. \Bonus: Unlocks the critical hit percentage." : wait
    if version = 2 and mX>795 and mX<840 and mY>300 and mY<340 then print #ini.main, "place 100 500 ;\"; "Arena Master of Isilra : Zed \\He is recognized as one of the most powerful mage alive. His \combat adaptation abilities as well as his monstrous damage \will make him the most difficult opponent to defeat..." : wait
    ' league
    if version = 1 and mX>430 and mX<455 and mY>130 and mY<155 then ville = 9 : print #ini.main, "place 100 500 ;\"; "Ligue des célèstes (niv : ???)\\Un lieu mystérieux qui saura vous mettre dans vos derniers \retranchements. Vous devez avoir vaincu les 8 arènes \continentales pour entrer içi !" : wait
    if version = 1 and mX>493 and mX<538 and mY>122 and mY<161 then print #ini.main, "place 100 500 ;\"; "Célestes de la league\\Ont ne les connait plus, ils étaient des légendes dans \leur dommaine et se sont réunis pour garder quelque chose \d'unique. Si vous arrivez à les battres, vous obtiendrez un \objet qui changera votre aventure à jamais..." : wait
    if version = 2 and mX>430 and mX<455 and mY>130 and mY<155 then ville = 9 : print #ini.main, "place 100 500 ;\"; "League of Celestials (niv : ???)\\A mysterious place that will put you to your limits. You must \have defeated all 8 continental arenas to enter here!" : wait
    if version = 2 and mX>493 and mX<538 and mY>122 and mY<161 then print #ini.main, "place 100 500 ;\"; "Celestials of the league\\We don't know them anymore, they were legends in their field \and came together to keep something unique. If you manage to \beat them, you will obtain an item that will change your \adventure forever..." : wait
    wait


    [achatITEM1]
    x =0
    if gold < int((35+(5*village))-talent6) and village >0 then
        print #ini.main, "font Courier_New 10 bold underscore; color green;backcolor ";161;" ";106;" ";76
        if version = 1 then print #ini.main, "place 555 340 ;\"; "Pas assez d'or !"
        if version = 2 then print #ini.main, "place 555 340 ;\"; "Not enough gold !"
        timer 650, [noGold1] : wait
        [noGold1]
        timer 0
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 340 ;\"; "                    "
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 445 ;\"; "                    "
        wait
    end if
    if gold < int((100*ville)-talent6) and ville >0 then
        print #ini.main, "font Courier_New 10 bold underscore; color green;backcolor ";161;" ";106;" ";76
        if version = 1 then print #ini.main, "place 555 340 ;\"; "Pas assez d'or !"
        if version = 2 then print #ini.main, "place 555 340 ;\"; "Not enough gold !"
        timer 650, [noGold1b] : wait
        [noGold1b]
        timer 0
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 340 ;\"; "                    "
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 445 ;\"; "                    "
        wait
    end if

    if bruitage = 1 then playwave "data\achat.wav", async
    chanceITEM = int(rnd(1)*10000 + 1)
    if chanceITEM <=8800 then rare = 1
    if chanceITEM >8800 and chanceITEM <=9850 then rare = 2
    if chanceITEM >9850 and chanceITEM <=9999 then rare = 3
    if chanceITEM > 9999 then rare = 4
    if caseITEM(1) = 0 then x = 1 : goto [endARMES]
    if caseITEM(2) = 0 then x = 2 : goto [endARMES]
    if caseITEM(3) = 0 then x = 3 : goto [endARMES]
    if caseITEM(4) = 0 then x = 4 : goto [endARMES]
    if caseITEM(5) = 0 then x = 5 : goto [endARMES]
    if caseITEM(6) = 0 then x = 6 : goto [endARMES]
    if caseITEM(7) = 0 then x = 7 : goto [endARMES]
    if caseITEM(8) = 0 then x = 8 : goto [endARMES]
    if caseITEM(9) = 0 then x = 9 : goto [endARMES]
    if caseITEM(10) = 0 then x = 10 : goto [endARMES]
    if caseITEM(11) = 0 then x = 11 : goto [endARMES]
    if caseITEM(12) = 0 then x = 12 : goto [endARMES]
    if caseITEM(13) = 0 then x = 13 : goto [endARMES]
    if caseITEM(14) = 0 then x = 14 : goto [endARMES]
    if caseITEM(15) = 0 then x = 15 : goto [endARMES]
    if caseITEM(16) = 0 then x = 16 : goto [endARMES]
    if caseITEM(17) = 0 then x = 17 : goto [endARMES]
    if caseITEM(18) = 0 then x = 18 : goto [endARMES]
    if version = 1 then notice " " + chr$(13) +  "Plus de place dans l'inventaire !" : wait
    if version = 2 then notice " " + chr$(13) +  "No more room in the inventory !" : wait
    [endARMES]
    if village >0 then gold = gold - int((35+(5*village))-talent6)
    if ville >0 then gold = gold - int((100*ville)-talent6)
    if gold <0 then gold = 0
    talent6XP = talent6XP + 1
    lvlITEM(x) = 1
    chanceITEM2 = int(rnd(1)*6 + 1)
    typeITEM(x) = chanceITEM2
    if rare = 1 and village >0 then rareITEM(x) = 1 : valor1 = int(rnd(1)*(1.85*village) + (1*lvlPerso))
    if rare = 2 and village >0 then rareITEM(x) = 2 : valor1 = int(rnd(1)*(3.2*village) + (2*lvlPerso))
    if rare = 3 and village >0 then rareITEM(x) = 3 : valor1 = int(rnd(1)*(5*village) + (4*lvlPerso))
    if rare = 4 and village >0 then rareITEM(x) = 4 : valor1 = int(rnd(1)*(10*village) + (10*lvlPerso))
    if rare = 1 and ville >0 then rareITEM(x) = 1 : valor1 = int(rnd(1)*(22*ville) + (1*lvlPerso))
    if rare = 2 and ville >0 then rareITEM(x) = 2 : valor1 = int(rnd(1)*(43*ville) + (2*lvlPerso))
    if rare = 3 and ville >0 then rareITEM(x) = 3 : valor1 = int(rnd(1)*(75*ville) + (4*lvlPerso))
    if rare = 4 and ville >0 then rareITEM(x) = 4 : valor1 = int(rnd(1)*(150*ville) + (10*lvlPerso))
    caseITEM(x) = 1
    val1ITEM(x) = valor1

    chanceBONUScapa = int(rnd(1)*10 + 1)
    if chanceBONUScapa = 1 then agiITEM(x) = int(rnd(1)*lvlPerso + 1)
    if chanceBONUScapa = 2 then forceITEM(x) = int(rnd(1)*lvlPerso + 1)
    if chanceBONUScapa = 3 then intITEM(x) = int(rnd(1)*lvlPerso + 1)

    gosub [loadITEM]
    print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
    if version = 1 then print #ini.main, "place 75 430 ;\"; "Votre or : ";gold; "      "
    if version = 2 then print #ini.main, "place 75 430 ;\"; "Your gold : ";gold; "      "

    wait

  '  dim vieITEM(100), ccITEM(100), chanceccITEM(100), regenITEM(100), forceITEM(100), intITEM(100), agiITEM(100), xpITEM(100)

    [achatITEM2]
    x= 0
    if gold < int((35+(5*village))-talent6) and village >0 then
        print #ini.main, "font Courier_New 10 bold underscore; color green;backcolor ";161;" ";106;" ";76
        if version = 1 then print #ini.main, "place 555 445 ;\"; "Pas assez d'or !"
        if version = 2 then print #ini.main, "place 555 445 ;\"; "Not enough gold !"
        timer 650, [noGold2] : wait
        [noGold2]
        timer 0
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 340 ;\"; "                    "
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 445 ;\"; "                    "
        wait
    end if
    if gold < int((100*ville)-talent6) and ville >0 then
        print #ini.main, "font Courier_New 10 bold underscore; color green;backcolor ";161;" ";106;" ";76
        if version = 1 then print #ini.main, "place 555 445 ;\"; "Pas assez d'or !"
        if version = 2 then print #ini.main, "place 555 445 ;\"; "Not enough gold !"
        timer 650, [noGold2b] : wait
        [noGold2b]
        timer 0
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 340 ;\"; "                    "
        print #ini.main, "font Courier_New 12 bold; color ";161;" ";106;" ";76;"; backcolor ";161;" ";106;" ";76 : print #ini.main, "place 555 445 ;\"; "                    "
        wait
    end if

    if bruitage = 1 then playwave "data\achat.wav", async
    chanceITEM = int(rnd(1)*10000 + 1)
    if chanceITEM <=8800 then rare = 1
    if chanceITEM >8800 and chanceITEM <=9850 then rare = 2
    if chanceITEM >9850 and chanceITEM <=9999 then rare = 3
    if chanceITEM > 9999 then rare = 4
    if caseITEM(1) = 0 then x = 1 : goto [endARMURES]
    if caseITEM(2) = 0 then x = 2 : goto [endARMURES]
    if caseITEM(3) = 0 then x = 3 : goto [endARMURES]
    if caseITEM(4) = 0 then x = 4 : goto [endARMURES]
    if caseITEM(5) = 0 then x = 5 : goto [endARMURES]
    if caseITEM(6) = 0 then x = 6 : goto [endARMURES]
    if caseITEM(7) = 0 then x = 7 : goto [endARMURES]
    if caseITEM(8) = 0 then x = 8 : goto [endARMURES]
    if caseITEM(9) = 0 then x = 9 : goto [endARMURES]
    if caseITEM(10) = 0 then x = 10 : goto [endARMURES]
    if caseITEM(11) = 0 then x = 11 : goto [endARMURES]
    if caseITEM(12) = 0 then x = 12 : goto [endARMURES]
    if caseITEM(13) = 0 then x = 13 : goto [endARMURES]
    if caseITEM(14) = 0 then x = 14 : goto [endARMURES]
    if caseITEM(15) = 0 then x = 15 : goto [endARMURES]
    if caseITEM(16) = 0 then x = 16 : goto [endARMURES]
    if caseITEM(17) = 0 then x = 17 : goto [endARMURES]
    if caseITEM(18) = 0 then x = 18 : goto [endARMURES]
    if version = 1 then notice " " + chr$(13) +  "Plus de place dans l'inventaire !" : wait
    if version = 2 then notice " " + chr$(13) +  "No more room in the inventory !" : wait
    [endARMURES]
    if village >0 then gold = gold - int((35+(5*village))-talent6)
    if ville >0 then gold = gold - int((100*ville)-talent6)
    if gold <0 then gold = 0
    talent6XP = talent6XP + 1
    lvlITEM(x) = 1
    if rare = 1 and village >0 then rareITEM(x) = 1 : valor1 = int(rnd(1)*(1.5*village) + (1*lvlPerso))
    if rare = 2 and village >0 then rareITEM(x) = 2 : valor1 = int(rnd(1)*(2.7*village) + (2*lvlPerso))
    if rare = 3 and village >0 then rareITEM(x) = 3 : valor1 = int(rnd(1)*(4.5*village) + (3*lvlPerso))
    if rare = 4 and village >0 then rareITEM(x) = 4 : valor1 = int(rnd(1)*(10*village) + (10*lvlPerso))
    if rare = 1 and ville >0 then rareITEM(x) = 1 : valor1 = int(rnd(1)*(14*ville) + (1*lvlPerso))
    if rare = 2 and ville >0 then rareITEM(x) = 2 : valor1 = int(rnd(1)*(29*ville) + (2*lvlPerso))
    if rare = 3 and ville >0 then rareITEM(x) = 3 : valor1 = int(rnd(1)*(50*ville) + (3*lvlPerso))
    if rare = 4 and ville >0 then rareITEM(x) = 4 : valor1 = int(rnd(1)*(130*ville) + (10*lvlPerso))
    chanceITEM2 = int(rnd(1)*3 + 7)
    caseITEM(x) = 1
    typeITEM(x) = chanceITEM2
    val1ITEM(x) = valor1
    vieITEM(x) = 0

    if typeITEM(x) = 7 and StatutVille2$ = "arène conquise" then
        chanceBONUSvie = int(rnd(1)*2 + 1)
        if chanceBONUSvie = 2 and village >0 then vieITEM(x) = int(rnd(1)*(5*village) + 1)
        if chanceBONUSvie = 2 and ville >0 then vieITEM(x) = int(rnd(1)*(150*ville) + 1)
    end if

    chanceBONUScapa = int(rnd(1)*10 + 1)
    if chanceBONUScapa = 1 then agiITEM(x) = int(rnd(1)*lvlPerso + 1)
    if chanceBONUScapa = 2 then forceITEM(x) = int(rnd(1)*lvlPerso + 1)
    if chanceBONUScapa = 3 then intITEM(x) = int(rnd(1)*lvlPerso + 1)

    gosub [loadITEM]
    print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
    if version = 1 then print #ini.main, "place 75 430 ;\"; "Votre or : ";gold; "      "
    if version = 2 then print #ini.main, "place 75 430 ;\"; "Your gold : ";gold; "      "
    wait


    [clickVENTE]
    mX = MouseX : mY = MouseY

    ' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _OPAQUE As long,_  'flag for transparent background
        result As long          'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    if inventaire = 1 then
        if mX>case1Ex and mX<case1Ex+43 and mY>case1Ey and mY<case1Ey+43 and caseITEMequip(1) = 1 then
            if caseITEM(1) = 0 then x = 1 : nameITEM1$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(2) = 0 then x = 2 : nameITEM2$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(3) = 0 then x = 3 : nameITEM3$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(4) = 0 then x = 4 : nameITEM4$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(5) = 0 then x = 5 : nameITEM5$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(6) = 0 then x = 6 : nameITEM6$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(7) = 0 then x = 7 : nameITEM7$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(8) = 0 then x = 8 : nameITEM8$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(9) = 0 then x = 9 : nameITEM9$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(10) = 0 then x = 10 : nameITEM10$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(11) = 0 then x = 11 : nameITEM11$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(12) = 0 then x = 12 : nameITEM12$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(13) = 0 then x = 13 : nameITEM13$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(14) = 0 then x = 14 : nameITEM14$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(15) = 0 then x = 15 : nameITEM15$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(16) = 0 then x = 16 : nameITEM16$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(17) = 0 then x = 17 : nameITEM17$ = nameITEMequip1$ : goto [endSCANinv1]
            if caseITEM(18) = 0 then x = 18 : nameITEM18$ = nameITEMequip1$ : goto [endSCANinv1]
            if version = 1 then notice " " + chr$(13) +  "Vous n'avez plus de place pour ranger l'équipement. Vous devez revendre un objet pour libérer de la place." : wait
            if version = 2 then notice " " + chr$(13) +  "You no longer have room to store the equipment. You must resell an item to free up space." : wait
            [endSCANinv1]
         '   notice VIEequipITEM(1)
            caseITEM(x) = caseITEMequip(1) : rareITEM(x) = rareITEMequip(1) : typeITEM(x) = typeITEMequip(1) : lvlITEM(x) = lvlITEMequip(1) : val1ITEM(x) = VequipITEM(1) : vieITEM(x) = VIEequipITEM(1)
            caseITEMequip(1) = 0 : rareITEMequip(1) = 0 : typeITEMequip(1) = 0 : nameITEMequip1$ = "" : lvlITEMequip(1) = 0 : bonusATK = bonusATK - VequipITEM(1) : VequipITEM(1) = 0 : hpPersoTotal = hpPersoTotal - VIEequipITEM(1) : VIEequipITEM(1) = 0
          '  if vieITEM(x) >0 then hpPersoTotal = hpPersoTotal - vieITEM(x)
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            goto [inventaireREFRESH]
        end if
        if mX>case2Ex and mX<case2Ex+43 and mY>case2Ey and mY<case2Ey+43 and caseITEMequip(2) = 1 then
            if caseITEM(1) = 0 then x = 1 : nameITEM1$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(2) = 0 then x = 2 : nameITEM2$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(3) = 0 then x = 3 : nameITEM3$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(4) = 0 then x = 4 : nameITEM4$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(5) = 0 then x = 5 : nameITEM5$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(6) = 0 then x = 6 : nameITEM6$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(7) = 0 then x = 7 : nameITEM7$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(8) = 0 then x = 8 : nameITEM8$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(9) = 0 then x = 9 : nameITEM9$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(10) = 0 then x = 10 : nameITEM10$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(11) = 0 then x = 11 : nameITEM11$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(12) = 0 then x = 12 : nameITEM12$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(13) = 0 then x = 13 : nameITEM13$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(14) = 0 then x = 14 : nameITEM14$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(15) = 0 then x = 15 : nameITEM15$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(16) = 0 then x = 16 : nameITEM16$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(17) = 0 then x = 17 : nameITEM17$ = nameITEMequip2$ : goto [endSCANinv2]
            if caseITEM(18) = 0 then x = 18 : nameITEM18$ = nameITEMequip2$ : goto [endSCANinv2]
            if version = 1 then notice " " + chr$(13) +  "Vous n'avez plus de place pour ranger l'équipement. Vous devez revendre un objet pour libérer de la place." : wait
            if version = 2 then notice " " + chr$(13) +  "You no longer have room to store the equipment. You must resell an item to free up space." : wait
            [endSCANinv2]
            caseITEM(x) = caseITEMequip(2) : rareITEM(x) = rareITEMequip(2) : typeITEM(x) = typeITEMequip(2) : lvlITEM(x) = lvlITEMequip(2) : val1ITEM(x) = VequipITEM(2) : vieITEM(x) = VIEequipITEM(2)
            caseITEMequip(2) = 0 : rareITEMequip(2) = 0 : typeITEMequip(2) = 0 : nameITEMequip2$ = "" : lvlITEMequip(2) = 0 : bonusDEF = bonusDEF - VequipITEM(2) : VequipITEM(2) = 0 : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : VIEequipITEM(2) = 0
         '   if vieITEM(x) >0 then hpPersoTotal = hpPersoTotal - vieITEM(x)
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            goto [inventaireREFRESH]
        end if
        if mX>case3Ex and mX<case3Ex+43 and mY>case3Ey and mY<case3Ey+43 and caseITEMequip(3) = 1 then
            if caseITEM(1) = 0 then x = 1 : nameITEM1$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(2) = 0 then x = 2 : nameITEM2$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(3) = 0 then x = 3 : nameITEM3$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(4) = 0 then x = 4 : nameITEM4$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(5) = 0 then x = 5 : nameITEM5$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(6) = 0 then x = 6 : nameITEM6$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(7) = 0 then x = 7 : nameITEM7$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(8) = 0 then x = 8 : nameITEM8$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(9) = 0 then x = 9 : nameITEM9$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(10) = 0 then x = 10 : nameITEM10$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(11) = 0 then x = 11 : nameITEM11$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(12) = 0 then x = 12 : nameITEM12$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(13) = 0 then x = 13 : nameITEM13$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(14) = 0 then x = 14 : nameITEM14$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(15) = 0 then x = 15 : nameITEM15$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(16) = 0 then x = 16 : nameITEM16$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(17) = 0 then x = 17 : nameITEM17$ = nameITEMequip3$ : goto [endSCANinv3]
            if caseITEM(18) = 0 then x = 18 : nameITEM18$ = nameITEMequip3$ : goto [endSCANinv3]
            if version = 1 then notice " " + chr$(13) +  "Vous n'avez plus de place pour ranger l'équipement. Vous devez revendre un objet pour libérer de la place." : wait
            if version = 2 then notice " " + chr$(13) +  "You no longer have room to store the equipment. You must resell an item to free up space." : wait
            [endSCANinv3]
            caseITEM(x) = caseITEMequip(3) : rareITEM(x) = rareITEMequip(3) : typeITEM(x) = typeITEMequip(3) : lvlITEM(x) = lvlITEMequip(3) : val1ITEM(x) = VequipITEM(3) : vieITEM(x) = VIEequipITEM(3)
            caseITEMequip(3) = 0 : rareITEMequip(3) = 0 : typeITEMequip(3) = 0 : nameITEMequip1$ = "" : lvlITEMequip(3) = 0 : bonusDEF = bonusDEF - VequipITEM(3) : VequipITEM(3) = 0 : hpPersoTotal = hpPersoTotal - VIEequipITEM(3) : VIEequipITEM(3) = 0
          '  if vieITEM(x) >0 then hpPersoTotal = hpPersoTotal - vieITEM(x)
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            goto [inventaireREFRESH]
        end if
        if mX>case4Ex and mX<case4Ex+43 and mY>case4Ey and mY<case4Ey+43 and caseITEMequip(4) = 1 then
            if caseITEM(1) = 0 then x = 1 : nameITEM1$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(2) = 0 then x = 2 : nameITEM2$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(3) = 0 then x = 3 : nameITEM3$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(4) = 0 then x = 4 : nameITEM4$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(5) = 0 then x = 5 : nameITEM5$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(6) = 0 then x = 6 : nameITEM6$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(7) = 0 then x = 7 : nameITEM7$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(8) = 0 then x = 8 : nameITEM8$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(9) = 0 then x = 9 : nameITEM9$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(10) = 0 then x = 10 : nameITEM10$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(11) = 0 then x = 11 : nameITEM11$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(12) = 0 then x = 12 : nameITEM12$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(13) = 0 then x = 13 : nameITEM13$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(14) = 0 then x = 14 : nameITEM14$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(15) = 0 then x = 15 : nameITEM15$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(16) = 0 then x = 16 : nameITEM16$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(17) = 0 then x = 17 : nameITEM17$ = nameITEMequip4$ : goto [endSCANinv4]
            if caseITEM(18) = 0 then x = 18 : nameITEM18$ = nameITEMequip4$ : goto [endSCANinv4]
            if version = 1 then notice " " + chr$(13) +  "Vous n'avez plus de place pour ranger l'équipement. Vous devez revendre un objet pour libérer de la place." : wait
            if version = 2 then notice " " + chr$(13) +  "You no longer have room to store the equipment. You must resell an item to free up space." : wait
            [endSCANinv4]
            caseITEM(x) = caseITEMequip(4) : rareITEM(x) = rareITEMequip(4) : typeITEM(x) = typeITEMequip(4) : lvlITEM(x) = lvlITEMequip(4) : val1ITEM(x) = VequipITEM(4) : vieITEM(x) = VIEequipITEM(4)
            caseITEMequip(4) = 0 : rareITEMequip(4) = 0 : typeITEMequip(4) = 0 : nameITEMequip4$ = "" : lvlITEMequip(4) = 0 : bonusDEF = bonusDEF - VequipITEM(4) : VequipITEM(4) = 0 : hpPersoTotal = hpPersoTotal - VIEequipITEM(4) : VIEequipITEM(4) = 0
           ' if vieITEM(x) >0 then hpPersoTotal = hpPersoTotal - vieITEM(x)
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            goto [inventaireREFRESH]
        end if
        if mX>case5Ex and mX<case5Ex+43 and mY>case5Ey and mY<case5Ey+43 and caseITEMequip(5) = 1 then
            if caseITEM(1) = 0 then x = 1 : nameITEM1$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(2) = 0 then x = 2 : nameITEM2$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(3) = 0 then x = 3 : nameITEM3$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(4) = 0 then x = 4 : nameITEM4$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(5) = 0 then x = 5 : nameITEM5$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(6) = 0 then x = 6 : nameITEM6$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(7) = 0 then x = 7 : nameITEM7$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(8) = 0 then x = 8 : nameITEM8$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(9) = 0 then x = 9 : nameITEM9$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(10) = 0 then x = 10 : nameITEM10$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(11) = 0 then x = 11 : nameITEM11$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(12) = 0 then x = 12 : nameITEM12$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(13) = 0 then x = 13 : nameITEM13$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(14) = 0 then x = 14 : nameITEM14$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(15) = 0 then x = 15 : nameITEM15$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(16) = 0 then x = 16 : nameITEM16$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(17) = 0 then x = 17 : nameITEM17$ = nameITEMequip5$ : goto [endSCANinv5]
            if caseITEM(18) = 0 then x = 18 : nameITEM18$ = nameITEMequip5$ : goto [endSCANinv5]
            if version = 1 then notice " " + chr$(13) +  "Vous n'avez plus de place pour ranger l'équipement. Vous devez revendre un objet pour libérer de la place." : wait
            if version = 2 then notice " " + chr$(13) +  "You no longer have room to store the equipment. You must resell an item to free up space." : wait
            [endSCANinv5]
            caseITEM(x) = caseITEMequip(5) : rareITEM(x) = rareITEMequip(5) : typeITEM(x) = typeITEMequip(5) : lvlITEM(x) = lvlITEMequip(5) : val1ITEM(x) = VequipITEM(5) : vieITEM(x) = VIEequipITEM(5)
            caseITEMequip(5) = 0 : rareITEMequip(5) = 0 : typeITEMequip(5) = 0 : nameITEMequip5$ = "" : lvlITEMequip(5) = 0 : bonusDEF = bonusDEF - VequipITEM(5) : VequipITEM(5) = 0 : hpPersoTotal = hpPersoTotal - VIEequipITEM(5) : VIEequipITEM(5) = 0
           ' if vieITEM(x) >0 then hpPersoTotal = hpPersoTotal - vieITEM(x)
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            goto [inventaireREFRESH]
        end if


        if mX>case1x and mX<case1x+43 and mY>case1y and mY<case1y+43 and caseITEM(1) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(1) >=1 and typeITEM(1) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(1) : rareITEMequip(1) = rareITEM(1) : typeITEMequip(1) = typeITEM(1) : nameITEMequip1$ = nameITEM1$ : lvlITEMequip(1) = lvlITEM(1) : VequipITEM(1) = val1ITEM(1) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(1) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(1) : rareITEMequip(5) = rareITEM(1) : typeITEMequip(5) = typeITEM(1) : nameITEMequip5$ = nameITEM1$ : lvlITEMequip(5) = lvlITEM(1) : VequipITEM(5) = val1ITEM(1) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(1) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(1) : rareITEMequip(2) = rareITEM(1) : typeITEMequip(2) = typeITEM(1) : nameITEMequip2$ = nameITEM1$ : lvlITEMequip(2) = lvlITEM(1) : VequipITEM(2) = val1ITEM(1) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(1) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(1) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(1) : rareITEMequip(4) = rareITEM(1) : typeITEMequip(4) = typeITEM(1) : nameITEMequip4$ = nameITEM1$ : lvlITEMequip(4) = lvlITEM(1) : VequipITEM(4) = val1ITEM(1) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(1) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(1) : rareITEMequip(3) = rareITEM(1) : typeITEMequip(3) = typeITEM(1) : nameITEMequip3$ = nameITEM1$ : lvlITEMequip(3) = lvlITEM(1) : VequipITEM(3) = val1ITEM(1) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(1) = SAVVVIEequipITEM
                caseITEM(1) = 1 : rareITEM(1) = SAVrareITEM : typeITEM(1) = SAVtypeITEMequip : nameITEM1$ = SAVnameITEMequip$ : lvlITEM(1) = SAVlvlITEMequip : val1ITEM(1) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(1) = 0 : rareITEM(1) = 0 : typeITEM(1) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case2x and mX<case2x+43 and mY>case2y and mY<case2y+43 and caseITEM(2) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(2) >=1 and typeITEM(2) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(2) : rareITEMequip(1) = rareITEM(2) : typeITEMequip(1) = typeITEM(2) : nameITEMequip1$ = nameITEM2$ : lvlITEMequip(1) = lvlITEM(2) : VequipITEM(1) = val1ITEM(2) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(2) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(2) : rareITEMequip(5) = rareITEM(2) : typeITEMequip(5) = typeITEM(2) : nameITEMequip5$ = nameITEM2$ : lvlITEMequip(5) = lvlITEM(2) : VequipITEM(5) = val1ITEM(2) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(2) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(2) : rareITEMequip(2) = rareITEM(2) : typeITEMequip(2) = typeITEM(2) : nameITEMequip2$ = nameITEM2$ : lvlITEMequip(2) = lvlITEM(2) : VequipITEM(2) = val1ITEM(2) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(2) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(2) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(2) : rareITEMequip(4) = rareITEM(2) : typeITEMequip(4) = typeITEM(2) : nameITEMequip4$ = nameITEM2$ : lvlITEMequip(4) = lvlITEM(2) : VequipITEM(4) = val1ITEM(2) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(2) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(2) : rareITEMequip(3) = rareITEM(2) : typeITEMequip(3) = typeITEM(2) : nameITEMequip3$ = nameITEM2$ : lvlITEMequip(3) = lvlITEM(2) : VequipITEM(3) = val1ITEM(2) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(2) = SAVVVIEequipITEM
                caseITEM(2) = 1 : rareITEM(2) = SAVrareITEM : typeITEM(2) = SAVtypeITEMequip : nameITEM2$ = SAVnameITEMequip$ : lvlITEM(2) = SAVlvlITEMequip : val1ITEM(2) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(2) = 0 : rareITEM(2) = 0 : typeITEM(2) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case3x and mX<case3x+43 and mY>case3y and mY<case3y+43 and caseITEM(3) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(3) >=1 and typeITEM(3) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(3) : rareITEMequip(1) = rareITEM(3) : typeITEMequip(1) = typeITEM(3) : nameITEMequip1$ = nameITEM3$ : lvlITEMequip(1) = lvlITEM(3) : VequipITEM(1) = val1ITEM(3) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(3) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(3) : rareITEMequip(5) = rareITEM(3) : typeITEMequip(5) = typeITEM(3) : nameITEMequip5$ = nameITEM3$ : lvlITEMequip(5) = lvlITEM(3) : VequipITEM(5) = val1ITEM(3) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(3) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(3) : rareITEMequip(2) = rareITEM(3) : typeITEMequip(2) = typeITEM(3) : nameITEMequip2$ = nameITEM3$ : lvlITEMequip(2) = lvlITEM(3) : VequipITEM(2) = val1ITEM(3) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(3) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(3) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(3) : rareITEMequip(4) = rareITEM(3) : typeITEMequip(4) = typeITEM(3) : nameITEMequip4$ = nameITEM3$ : lvlITEMequip(4) = lvlITEM(3) : VequipITEM(4) = val1ITEM(3) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(3) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(3) : rareITEMequip(3) = rareITEM(3) : typeITEMequip(3) = typeITEM(3) : nameITEMequip3$ = nameITEM3$ : lvlITEMequip(3) = lvlITEM(3) : VequipITEM(3) = val1ITEM(3) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(3) = SAVVVIEequipITEM
                caseITEM(3) = 1 : rareITEM(3) = SAVrareITEM : typeITEM(3) = SAVtypeITEMequip : nameITEM3$ = SAVnameITEMequip$ : lvlITEM(3) = SAVlvlITEMequip : val1ITEM(3) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(3) = 0 : rareITEM(3) = 0 : typeITEM(3) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case4x and mX<case4x+43 and mY>case4y and mY<case4y+43 and caseITEM(4) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(4) >=1 and typeITEM(4) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(4) : rareITEMequip(1) = rareITEM(4) : typeITEMequip(1) = typeITEM(4) : nameITEMequip1$ = nameITEM4$ : lvlITEMequip(1) = lvlITEM(4) : VequipITEM(1) = val1ITEM(4) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(4) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(4) : rareITEMequip(5) = rareITEM(4) : typeITEMequip(5) = typeITEM(4) : nameITEMequip5$ = nameITEM4$ : lvlITEMequip(5) = lvlITEM(4) : VequipITEM(5) = val1ITEM(4) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(4) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2)  : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(4) : rareITEMequip(2) = rareITEM(4) : typeITEMequip(2) = typeITEM(4) : nameITEMequip2$ = nameITEM4$ : lvlITEMequip(2) = lvlITEM(4) : VequipITEM(2) = val1ITEM(4) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(4) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(4) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(4) : rareITEMequip(4) = rareITEM(4) : typeITEMequip(4) = typeITEM(4) : nameITEMequip4$ = nameITEM4$ : lvlITEMequip(4) = lvlITEM(4) : VequipITEM(4) = val1ITEM(4) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(4) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(4) : rareITEMequip(3) = rareITEM(4) : typeITEMequip(3) = typeITEM(4) : nameITEMequip3$ = nameITEM4$ : lvlITEMequip(3) = lvlITEM(4) : VequipITEM(3) = val1ITEM(4) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(4) = SAVVVIEequipITEM
                caseITEM(4) = 1 : rareITEM(4) = SAVrareITEM : typeITEM(4) = SAVtypeITEMequip : nameITEM4$ = SAVnameITEMequip$ : lvlITEM(4) = SAVlvlITEMequip : val1ITEM(4) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(4) = 0 : rareITEM(4) = 0 : typeITEM(4) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case5x and mX<case5x+43 and mY>case5y and mY<case5y+43 and caseITEM(5) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(5) >=1 and typeITEM(5) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(5) : rareITEMequip(1) = rareITEM(5) : typeITEMequip(1) = typeITEM(5) : nameITEMequip1$ = nameITEM5$ : lvlITEMequip(1) = lvlITEM(5) : VequipITEM(1) = val1ITEM(5) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(5) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(5) : rareITEMequip(5) = rareITEM(5) : typeITEMequip(5) = typeITEM(5) : nameITEMequip5$ = nameITEM5$ : lvlITEMequip(5) = lvlITEM(5) : VequipITEM(5) = val1ITEM(5) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(5) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(5) : rareITEMequip(2) = rareITEM(5) : typeITEMequip(2) = typeITEM(5) : nameITEMequip2$ = nameITEM5$ : lvlITEMequip(2) = lvlITEM(5) : VequipITEM(2) = val1ITEM(5) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(5) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(5) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(5) : rareITEMequip(4) = rareITEM(5) : typeITEMequip(4) = typeITEM(5) : nameITEMequip4$ = nameITEM5$ : lvlITEMequip(4) = lvlITEM(5) : VequipITEM(4) = val1ITEM(5) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(5) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(5) : rareITEMequip(3) = rareITEM(5) : typeITEMequip(3) = typeITEM(5) : nameITEMequip3$ = nameITEM5$ : lvlITEMequip(3) = lvlITEM(5) : VequipITEM(3) = val1ITEM(5) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(5) = SAVVVIEequipITEM
                caseITEM(5) = 1 : rareITEM(5) = SAVrareITEM : typeITEM(5) = SAVtypeITEMequip : nameITEM5$ = SAVnameITEMequip$ : lvlITEM(5) = SAVlvlITEMequip : val1ITEM(5) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(5) = 0 : rareITEM(5) = 0 : typeITEM(5) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case6x and mX<case6x+43 and mY>case6y and mY<case6y+43 and caseITEM(6) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(6) >=1 and typeITEM(6) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(6) : rareITEMequip(1) = rareITEM(6) : typeITEMequip(1) = typeITEM(6) : nameITEMequip1$ = nameITEM6$ : lvlITEMequip(1) = lvlITEM(6) : VequipITEM(1) = val1ITEM(6) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(6) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(6) : rareITEMequip(5) = rareITEM(6) : typeITEMequip(5) = typeITEM(6) : nameITEMequip5$ = nameITEM6$ : lvlITEMequip(5) = lvlITEM(6) : VequipITEM(5) = val1ITEM(6) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(6) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(6) : rareITEMequip(2) = rareITEM(6) : typeITEMequip(2) = typeITEM(6) : nameITEMequip2$ = nameITEM6$ : lvlITEMequip(2) = lvlITEM(6) : VequipITEM(2) = val1ITEM(6) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(6) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(6) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(6) : rareITEMequip(4) = rareITEM(6) : typeITEMequip(4) = typeITEM(6) : nameITEMequip4$ = nameITEM6$ : lvlITEMequip(4) = lvlITEM(6) : VequipITEM(4) = val1ITEM(6) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(6) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(6) : rareITEMequip(3) = rareITEM(6) : typeITEMequip(3) = typeITEM(6) : nameITEMequip3$ = nameITEM6$ : lvlITEMequip(3) = lvlITEM(6) : VequipITEM(3) = val1ITEM(6) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(6) = SAVVVIEequipITEM
                caseITEM(6) = 1 : rareITEM(6) = SAVrareITEM : typeITEM(6) = SAVtypeITEMequip : nameITEM6$ = SAVnameITEMequip$ : lvlITEM(6) = SAVlvlITEMequip : val1ITEM(6) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(6) = 0 : rareITEM(6) = 0 : typeITEM(6) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case7x and mX<case7x+43 and mY>case7y and mY<case7y+43 and caseITEM(7) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(7) >=1 and typeITEM(7) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(7) : rareITEMequip(1) = rareITEM(7) : typeITEMequip(1) = typeITEM(7) : nameITEMequip1$ = nameITEM7$ : lvlITEMequip(1) = lvlITEM(7) : VequipITEM(1) = val1ITEM(7) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(7) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(7) : rareITEMequip(5) = rareITEM(7) : typeITEMequip(5) = typeITEM(7) : nameITEMequip5$ = nameITEM7$ : lvlITEMequip(5) = lvlITEM(7) : VequipITEM(5) = val1ITEM(7) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(7) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(7) : rareITEMequip(2) = rareITEM(7) : typeITEMequip(2) = typeITEM(7) : nameITEMequip2$ = nameITEM7$ : lvlITEMequip(2) = lvlITEM(7) : VequipITEM(2) = val1ITEM(7) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(7) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(7) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(7) : rareITEMequip(4) = rareITEM(7) : typeITEMequip(4) = typeITEM(7) : nameITEMequip4$ = nameITEM7$ : lvlITEMequip(4) = lvlITEM(7) : VequipITEM(4) = val1ITEM(7) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(7) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(7) : rareITEMequip(3) = rareITEM(7) : typeITEMequip(3) = typeITEM(7) : nameITEMequip3$ = nameITEM7$ : lvlITEMequip(3) = lvlITEM(7) : VequipITEM(3) = val1ITEM(7) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(7) = SAVVVIEequipITEM
                caseITEM(7) = 1 : rareITEM(7) = SAVrareITEM : typeITEM(7) = SAVtypeITEMequip : nameITEM7$ = SAVnameITEMequip$ : lvlITEM(7) = SAVlvlITEMequip : val1ITEM(7) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(7) = 0 : rareITEM(7) = 0 : typeITEM(7) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case8x and mX<case8x+43 and mY>case8y and mY<case8y+43 and caseITEM(8) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(8) >=1 and typeITEM(8) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(8) : rareITEMequip(1) = rareITEM(8) : typeITEMequip(1) = typeITEM(8) : nameITEMequip1$ = nameITEM8$ : lvlITEMequip(1) = lvlITEM(8) : VequipITEM(1) = val1ITEM(8) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(8) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(8) : rareITEMequip(5) = rareITEM(8) : typeITEMequip(5) = typeITEM(8) : nameITEMequip5$ = nameITEM8$ : lvlITEMequip(5) = lvlITEM(8) : VequipITEM(5) = val1ITEM(8) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(8) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(8) : rareITEMequip(2) = rareITEM(8) : typeITEMequip(2) = typeITEM(8) : nameITEMequip2$ = nameITEM8$ : lvlITEMequip(2) = lvlITEM(8) : VequipITEM(2) = val1ITEM(8) : bonusDEF = bonusDEF + VequipITEM(2)  : VIEequipITEM(2) = vieITEM(8) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(8) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(8) : rareITEMequip(4) = rareITEM(8) : typeITEMequip(4) = typeITEM(8) : nameITEMequip4$ = nameITEM8$ : lvlITEMequip(4) = lvlITEM(8) : VequipITEM(4) = val1ITEM(8) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(8) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(8) : rareITEMequip(3) = rareITEM(8) : typeITEMequip(3) = typeITEM(8) : nameITEMequip3$ = nameITEM8$ : lvlITEMequip(3) = lvlITEM(8) : VequipITEM(3) = val1ITEM(8) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(8) = SAVVVIEequipITEM
                caseITEM(8) = 1 : rareITEM(8) = SAVrareITEM : typeITEM(8) = SAVtypeITEMequip : nameITEM8$ = SAVnameITEMequip$ : lvlITEM(8) = SAVlvlITEMequip : val1ITEM(8) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(8) = 0 : rareITEM(8) = 0 : typeITEM(8) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case9x and mX<case9x+43 and mY>case9y and mY<case9y+43 and caseITEM(9) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(9) >=1 and typeITEM(9) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(9) : rareITEMequip(1) = rareITEM(9) : typeITEMequip(1) = typeITEM(9) : nameITEMequip1$ = nameITEM9$ : lvlITEMequip(1) = lvlITEM(9) : VequipITEM(1) = val1ITEM(9) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(9) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(9) : rareITEMequip(5) = rareITEM(9) : typeITEMequip(5) = typeITEM(9) : nameITEMequip5$ = nameITEM9$ : lvlITEMequip(5) = lvlITEM(9) : VequipITEM(5) = val1ITEM(9) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(9) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(9) : rareITEMequip(2) = rareITEM(9) : typeITEMequip(2) = typeITEM(9) : nameITEMequip2$ = nameITEM9$ : lvlITEMequip(2) = lvlITEM(9) : VequipITEM(2) = val1ITEM(9) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(9) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(9) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(9) : rareITEMequip(4) = rareITEM(9) : typeITEMequip(4) = typeITEM(9) : nameITEMequip4$ = nameITEM9$ : lvlITEMequip(4) = lvlITEM(9) : VequipITEM(4) = val1ITEM(9) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(9) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(9) : rareITEMequip(3) = rareITEM(9) : typeITEMequip(3) = typeITEM(9) : nameITEMequip3$ = nameITEM9$ : lvlITEMequip(3) = lvlITEM(9) : VequipITEM(3) = val1ITEM(9) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(9) = SAVVVIEequipITEM
                caseITEM(9) = 1 : rareITEM(9) = SAVrareITEM : typeITEM(9) = SAVtypeITEMequip : nameITEM9$ = SAVnameITEMequip$ : lvlITEM(9) = SAVlvlITEMequip : val1ITEM(9) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(9) = 0 : rareITEM(9) = 0 : typeITEM(9) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case10x and mX<case10x+43 and mY>case10y and mY<case10y+43 and caseITEM(10) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(10) >=1 and typeITEM(10) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(10) : rareITEMequip(1) = rareITEM(10) : typeITEMequip(1) = typeITEM(10) : nameITEMequip1$ = nameITEM10$ : lvlITEMequip(1) = lvlITEM(10) : VequipITEM(1) = val1ITEM(10) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(10) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(10) : rareITEMequip(5) = rareITEM(10) : typeITEMequip(5) = typeITEM(10) : nameITEMequip5$ = nameITEM10$ : lvlITEMequip(5) = lvlITEM(10) : VequipITEM(5) = val1ITEM(10) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(10) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(10) : rareITEMequip(2) = rareITEM(10) : typeITEMequip(2) = typeITEM(10) : nameITEMequip2$ = nameITEM10$ : lvlITEMequip(2) = lvlITEM(10) : VequipITEM(2) = val1ITEM(10) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(10) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(10) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(10) : rareITEMequip(4) = rareITEM(10) : typeITEMequip(4) = typeITEM(10) : nameITEMequip4$ = nameITEM10$ : lvlITEMequip(4) = lvlITEM(10) : VequipITEM(4) = val1ITEM(10) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(10) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(10) : rareITEMequip(3) = rareITEM(10) : typeITEMequip(3) = typeITEM(10) : nameITEMequip3$ = nameITEM10$ : lvlITEMequip(3) = lvlITEM(10) : VequipITEM(3) = val1ITEM(10) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(10) = SAVVVIEequipITEM
                caseITEM(10) = 1 : rareITEM(10) = SAVrareITEM : typeITEM(10) = SAVtypeITEMequip : nameITEM10$ = SAVnameITEMequip$ : lvlITEM(10) = SAVlvlITEMequip : val1ITEM(10) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(10) = 0 : rareITEM(10) = 0 : typeITEM(10) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case11x and mX<case11x+43 and mY>case11y and mY<case11y+43 and caseITEM(11) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(11) >=1 and typeITEM(11) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(11) : rareITEMequip(1) = rareITEM(11) : typeITEMequip(1) = typeITEM(11) : nameITEMequip1$ = nameITEM11$ : lvlITEMequip(1) = lvlITEM(11) : VequipITEM(1) = val1ITEM(11) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(11) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(11) : rareITEMequip(5) = rareITEM(11) : typeITEMequip(5) = typeITEM(11) : nameITEMequip5$ = nameITEM11$ : lvlITEMequip(5) = lvlITEM(11) : VequipITEM(5) = val1ITEM(11) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(11) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(11) : rareITEMequip(2) = rareITEM(11) : typeITEMequip(2) = typeITEM(11) : nameITEMequip2$ = nameITEM11$ : lvlITEMequip(2) = lvlITEM(11) : VequipITEM(2) = val1ITEM(11) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(11) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(11) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(11) : rareITEMequip(4) = rareITEM(11) : typeITEMequip(4) = typeITEM(11) : nameITEMequip4$ = nameITEM11$ : lvlITEMequip(4) = lvlITEM(11) : VequipITEM(4) = val1ITEM(11) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(11) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(11) : rareITEMequip(3) = rareITEM(11) : typeITEMequip(3) = typeITEM(11) : nameITEMequip3$ = nameITEM11$ : lvlITEMequip(3) = lvlITEM(11) : VequipITEM(3) = val1ITEM(11) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(11) = SAVVVIEequipITEM
                caseITEM(11) = 1 : rareITEM(11) = SAVrareITEM : typeITEM(11) = SAVtypeITEMequip : nameITEM11$ = SAVnameITEMequip$ : lvlITEM(11) = SAVlvlITEMequip : val1ITEM(11) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(11) = 0 : rareITEM(11) = 0 : typeITEM(11) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case12x and mX<case12x+43 and mY>case12y and mY<case12y+43 and caseITEM(12) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(12) >=1 and typeITEM(12) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(12) : rareITEMequip(1) = rareITEM(12) : typeITEMequip(1) = typeITEM(12) : nameITEMequip1$ = nameITEM12$ : lvlITEMequip(1) = lvlITEM(12) : VequipITEM(1) = val1ITEM(12) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(12) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(12) : rareITEMequip(5) = rareITEM(12) : typeITEMequip(5) = typeITEM(12) : nameITEMequip5$ = nameITEM12$ : lvlITEMequip(5) = lvlITEM(12) : VequipITEM(5) = val1ITEM(12) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(12) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(12) : rareITEMequip(2) = rareITEM(12) : typeITEMequip(2) = typeITEM(12) : nameITEMequip2$ = nameITEM12$ : lvlITEMequip(2) = lvlITEM(12) : VequipITEM(2) = val1ITEM(12) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(12) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(12) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(12) : rareITEMequip(4) = rareITEM(12) : typeITEMequip(4) = typeITEM(12) : nameITEMequip4$ = nameITEM12$ : lvlITEMequip(4) = lvlITEM(12) : VequipITEM(4) = val1ITEM(12) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(12) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(12) : rareITEMequip(3) = rareITEM(12) : typeITEMequip(3) = typeITEM(12) : nameITEMequip3$ = nameITEM12$ : lvlITEMequip(3) = lvlITEM(12) : VequipITEM(3) = val1ITEM(12) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(12) = SAVVVIEequipITEM
                caseITEM(12) = 1 : rareITEM(12) = SAVrareITEM : typeITEM(12) = SAVtypeITEMequip : nameITEM12$ = SAVnameITEMequip$ : lvlITEM(12) = SAVlvlITEMequip : val1ITEM(12) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(12) = 0 : rareITEM(12) = 0 : typeITEM(12) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case13x and mX<case13x+43 and mY>case13y and mY<case13y+43 and caseITEM(13) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(13) >=1 and typeITEM(13) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(13) : rareITEMequip(1) = rareITEM(13) : typeITEMequip(1) = typeITEM(13) : nameITEMequip1$ = nameITEM13$ : lvlITEMequip(1) = lvlITEM(13) : VequipITEM(1) = val1ITEM(13) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(13) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(13) : rareITEMequip(5) = rareITEM(13) : typeITEMequip(5) = typeITEM(13) : nameITEMequip5$ = nameITEM13$ : lvlITEMequip(5) = lvlITEM(13) : VequipITEM(5) = val1ITEM(13) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(13) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(13) : rareITEMequip(2) = rareITEM(13) : typeITEMequip(2) = typeITEM(13) : nameITEMequip2$ = nameITEM13$ : lvlITEMequip(2) = lvlITEM(13) : VequipITEM(2) = val1ITEM(13) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(13) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(13) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(13) : rareITEMequip(4) = rareITEM(13) : typeITEMequip(4) = typeITEM(13) : nameITEMequip4$ = nameITEM13$ : lvlITEMequip(4) = lvlITEM(13) : VequipITEM(4) = val1ITEM(13) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(13) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(13) : rareITEMequip(3) = rareITEM(13) : typeITEMequip(3) = typeITEM(13) : nameITEMequip3$ = nameITEM13$ : lvlITEMequip(3) = lvlITEM(13) : VequipITEM(3) = val1ITEM(13) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(13) = SAVVVIEequipITEM
                caseITEM(13) = 1 : rareITEM(13) = SAVrareITEM : typeITEM(13) = SAVtypeITEMequip : nameITEM13$ = SAVnameITEMequip$ : lvlITEM(13) = SAVlvlITEMequip : val1ITEM(13) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(13) = 0 : rareITEM(13) = 0 : typeITEM(13) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case14x and mX<case14x+43 and mY>case14y and mY<case14y+43 and caseITEM(14) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(14) >=1 and typeITEM(14) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(14) : rareITEMequip(1) = rareITEM(14) : typeITEMequip(1) = typeITEM(14) : nameITEMequip1$ = nameITEM14$ : lvlITEMequip(1) = lvlITEM(14) : VequipITEM(1) = val1ITEM(14) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(14) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(14) : rareITEMequip(5) = rareITEM(14) : typeITEMequip(5) = typeITEM(14) : nameITEMequip5$ = nameITEM14$ : lvlITEMequip(5) = lvlITEM(14) : VequipITEM(5) = val1ITEM(14) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(14) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(14) : rareITEMequip(2) = rareITEM(14) : typeITEMequip(2) = typeITEM(14) : nameITEMequip2$ = nameITEM14$ : lvlITEMequip(2) = lvlITEM(14) : VequipITEM(2) = val1ITEM(14) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(14) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(14) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(14) : rareITEMequip(4) = rareITEM(14) : typeITEMequip(4) = typeITEM(14) : nameITEMequip4$ = nameITEM14$ : lvlITEMequip(4) = lvlITEM(14) : VequipITEM(4) = val1ITEM(14) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(14) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(14) : rareITEMequip(3) = rareITEM(14) : typeITEMequip(3) = typeITEM(14) : nameITEMequip3$ = nameITEM14$ : lvlITEMequip(3) = lvlITEM(14) : VequipITEM(3) = val1ITEM(14) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(14) = SAVVVIEequipITEM
                caseITEM(14) = 1 : rareITEM(14) = SAVrareITEM : typeITEM(14) = SAVtypeITEMequip : nameITEM14$ = SAVnameITEMequip$ : lvlITEM(14) = SAVlvlITEMequip : val1ITEM(14) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(14) = 0 : rareITEM(14) = 0 : typeITEM(14) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case15x and mX<case15x+43 and mY>case15y and mY<case15y+43 and caseITEM(15) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(15) >=1 and typeITEM(15) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(15) : rareITEMequip(1) = rareITEM(15) : typeITEMequip(1) = typeITEM(15) : nameITEMequip1$ = nameITEM15$ : lvlITEMequip(1) = lvlITEM(15) : VequipITEM(1) = val1ITEM(15) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(15) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(15) : rareITEMequip(5) = rareITEM(15) : typeITEMequip(5) = typeITEM(15) : nameITEMequip5$ = nameITEM15$ : lvlITEMequip(5) = lvlITEM(15) : VequipITEM(5) = val1ITEM(15) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(15) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(15) : rareITEMequip(2) = rareITEM(15) : typeITEMequip(2) = typeITEM(15) : nameITEMequip2$ = nameITEM15$ : lvlITEMequip(2) = lvlITEM(15) : VequipITEM(2) = val1ITEM(15) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(15) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2)
            end if
            if typeITEM(15) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(15) : rareITEMequip(4) = rareITEM(15) : typeITEMequip(4) = typeITEM(15) : nameITEMequip4$ = nameITEM15$ : lvlITEMequip(4) = lvlITEM(15) : VequipITEM(4) = val1ITEM(15) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(15) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(15) : rareITEMequip(3) = rareITEM(15) : typeITEMequip(3) = typeITEM(15) : nameITEMequip3$ = nameITEM15$ : lvlITEMequip(3) = lvlITEM(15) : VequipITEM(3) = val1ITEM(15) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(15) = SAVVVIEequipITEM
                caseITEM(15) = 1 : rareITEM(15) = SAVrareITEM : typeITEM(15) = SAVtypeITEMequip : nameITEM15$ = SAVnameITEMequip$ : lvlITEM(15) = SAVlvlITEMequip : val1ITEM(15) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(15) = 0 : rareITEM(15) = 0 : typeITEM(15) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case16x and mX<case16x+43 and mY>case16y and mY<case16y+43 and caseITEM(16) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(16) >=1 and typeITEM(16) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(16) : rareITEMequip(1) = rareITEM(16) : typeITEMequip(1) = typeITEM(16) : nameITEMequip1$ = nameITEM16$ : lvlITEMequip(1) = lvlITEM(16) : VequipITEM(1) = val1ITEM(16) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(16) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(16) : rareITEMequip(5) = rareITEM(16) : typeITEMequip(5) = typeITEM(16) : nameITEMequip5$ = nameITEM16$ : lvlITEMequip(5) = lvlITEM(16) : VequipITEM(5) = val1ITEM(16) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(16) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(16) : rareITEMequip(2) = rareITEM(16) : typeITEMequip(2) = typeITEM(16) : nameITEMequip2$ = nameITEM16$ : lvlITEMequip(2) = lvlITEM(16) : VequipITEM(2) = val1ITEM(16) : bonusDEF = bonusDEF + VequipITEM(2)  : VIEequipITEM(2) = vieITEM(16) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(16) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(16) : rareITEMequip(4) = rareITEM(16) : typeITEMequip(4) = typeITEM(16) : nameITEMequip4$ = nameITEM16$ : lvlITEMequip(4) = lvlITEM(16) : VequipITEM(4) = val1ITEM(16) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(16) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(16) : rareITEMequip(3) = rareITEM(16) : typeITEMequip(3) = typeITEM(16) : nameITEMequip3$ = nameITEM16$ : lvlITEMequip(3) = lvlITEM(16) : VequipITEM(3) = val1ITEM(16) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(16) = SAVVVIEequipITEM
                caseITEM(16) = 1 : rareITEM(16) = SAVrareITEM : typeITEM(16) = SAVtypeITEMequip : nameITEM16$ = SAVnameITEMequip$ : lvlITEM(16) = SAVlvlITEMequip : val1ITEM(16) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(16) = 0 : rareITEM(16) = 0 : typeITEM(16) = 0 : goto [inventaireREFRESH]
         end if
         if mX>case17x and mX<case17x+43 and mY>case17y and mY<case17y+43 and caseITEM(17) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(17) >=1 and typeITEM(17) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(17) : rareITEMequip(1) = rareITEM(17) : typeITEMequip(1) = typeITEM(17) : nameITEMequip1$ = nameITEM17$ : lvlITEMequip(1) = lvlITEM(17) : VequipITEM(1) = val1ITEM(17) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(17) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(17) : rareITEMequip(5) = rareITEM(17) : typeITEMequip(5) = typeITEM(17) : nameITEMequip5$ = nameITEM17$ : lvlITEMequip(5) = lvlITEM(17) : VequipITEM(5) = val1ITEM(17) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(17) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(17) : rareITEMequip(2) = rareITEM(17) : typeITEMequip(2) = typeITEM(17) : nameITEMequip2$ = nameITEM17$ : lvlITEMequip(2) = lvlITEM(17) : VequipITEM(2) = val1ITEM(17) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(17) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(17) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(17) : rareITEMequip(4) = rareITEM(17) : typeITEMequip(4) = typeITEM(17) : nameITEMequip4$ = nameITEM17$ : lvlITEMequip(4) = lvlITEM(17) : VequipITEM(4) = val1ITEM(17) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(17) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(17) : rareITEMequip(3) = rareITEM(17) : typeITEMequip(3) = typeITEM(17) : nameITEMequip3$ = nameITEM17$ : lvlITEMequip(3) = lvlITEM(17) : VequipITEM(3) = val1ITEM(17) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(17) = SAVVVIEequipITEM
                caseITEM(17) = 1 : rareITEM(17) = SAVrareITEM : typeITEM(17) = SAVtypeITEMequip : nameITEM17$ = SAVnameITEMequip$ : lvlITEM(17) = SAVlvlITEMequip : val1ITEM(17) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(17) = 0 : rareITEM(17) = 0 : typeITEM(17) = 0 : goto [inventaireREFRESH]
         end if

         if mX>case18x and mX<case18x+43 and mY>case18y and mY<case18y+43 and caseITEM(18) = 1 then
            SAVVVIEequipITEM = 0
            if typeITEM(18) >=1 and typeITEM(18) <=5 then
                if caseITEMequip(1) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(1) : SAVtypeITEMequip = typeITEMequip(1) : SAVnameITEMequip$ = nameITEMequip1$ : SAVlvlITEMequip = lvlITEMequip(1) : SAVequipITEM = VequipITEM(1) : bonusATK = bonusATK - VequipITEM(1)
                caseITEMequip(1) = caseITEM(18) : rareITEMequip(1) = rareITEM(18) : typeITEMequip(1) = typeITEM(18) : nameITEMequip1$ = nameITEM18$ : lvlITEMequip(1) = lvlITEM(18) : VequipITEM(1) = val1ITEM(18) : bonusATK = bonusATK + VequipITEM(1)
            end if
            if typeITEM(18) = 6 then
                if caseITEMequip(5) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(5) : SAVtypeITEMequip = typeITEMequip(5) : SAVnameITEMequip$ = nameITEMequip5$ : SAVlvlITEMequip = lvlITEMequip(5) : SAVequipITEM = VequipITEM(5) : bonusDEF = bonusDEF - VequipITEM(5)
                caseITEMequip(5) = caseITEM(18) : rareITEMequip(5) = rareITEM(18) : typeITEMequip(5) = typeITEM(18) : nameITEMequip5$ = nameITEM18$ : lvlITEMequip(5) = lvlITEM(18) : VequipITEM(5) = val1ITEM(18) : bonusDEF = bonusDEF + VequipITEM(5)
            end if
            if typeITEM(18) = 7 then
                if caseITEMequip(2) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(2) : SAVtypeITEMequip = typeITEMequip(2) : SAVnameITEMequip$ = nameITEMequip2$ : SAVlvlITEMequip = lvlITEMequip(2) : SAVequipITEM = VequipITEM(2) : bonusDEF = bonusDEF - VequipITEM(2) : hpPersoTotal = hpPersoTotal - VIEequipITEM(2) : SAVVVIEequipITEM = VIEequipITEM(2)
                caseITEMequip(2) = caseITEM(18) : rareITEMequip(2) = rareITEM(18) : typeITEMequip(2) = typeITEM(18) : nameITEMequip2$ = nameITEM18$ : lvlITEMequip(2) = lvlITEM(18) : VequipITEM(2) = val1ITEM(18) : bonusDEF = bonusDEF + VequipITEM(2) : VIEequipITEM(2) = vieITEM(18) : hpPersoTotal = hpPersoTotal + VIEequipITEM(2)
            end if
            if typeITEM(18) = 8 then
                if caseITEMequip(4) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(4) : SAVtypeITEMequip = typeITEMequip(4) : SAVnameITEMequip$ = nameITEMequip4$ : SAVlvlITEMequip = lvlITEMequip(4) : SAVequipITEM = VequipITEM(4) : bonusDEF = bonusDEF - VequipITEM(4)
                caseITEMequip(4) = caseITEM(18) : rareITEMequip(4) = rareITEM(18) : typeITEMequip(4) = typeITEM(18) : nameITEMequip4$ = nameITEM18$ : lvlITEMequip(4) = lvlITEM(18) : VequipITEM(4) = val1ITEM(18) : bonusDEF = bonusDEF + VequipITEM(4)
            end if
            if typeITEM(18) = 9 then
                if caseITEMequip(3) >0 then SAV = 1 : SAVrareITEM = rareITEMequip(3) : SAVtypeITEMequip = typeITEMequip(3) : SAVnameITEMequip$ = nameITEMequip3$ : SAVlvlITEMequip = lvlITEMequip(3) : SAVequipITEM = VequipITEM(3) : bonusDEF = bonusDEF - VequipITEM(3)
                caseITEMequip(3) = caseITEM(18) : rareITEMequip(3) = rareITEM(18) : typeITEMequip(3) = typeITEM(18) : nameITEMequip3$ = nameITEM18$ : lvlITEMequip(3) = lvlITEM(18) : VequipITEM(3) = val1ITEM(18) : bonusDEF = bonusDEF + VequipITEM(3)
            end if
            if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal
            if SAV = 1 then
                vieITEM(18) = SAVVVIEequipITEM
                caseITEM(18) = 1 : rareITEM(18) = SAVrareITEM : typeITEM(18) = SAVtypeITEMequip : nameITEM18$ = SAVnameITEMequip$ : lvlITEM(18) = SAVlvlITEMequip : val1ITEM(18) = SAVequipITEM : SAV = 0
                goto [inventaireREFRESH]
            end if
            caseITEM(18) = 0 : rareITEM(18) = 0 : typeITEM(18) = 0 : goto [inventaireREFRESH]
         end if
    end if

    if marchands = 0 then wait
    if mX>case1x and mX<case1x+43 and mY>case1y and mY<case1y+43 and caseITEM(1) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(1) = 0 : rareITEM(1) = 0 : typeITEM(1) = 0
    end if
    if mX>case2x and mX<case2x+43 and mY>case2y and mY<case2y+43 and caseITEM(2) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(2) = 0 : rareITEM(2) = 0 : typeITEM(2) = 0
    end if
    if mX>case3x and mX<case3x+43 and mY>case3y and mY<case3y+43 and caseITEM(3) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(3) = 0 : rareITEM(3) = 0 : typeITEM(3) = 0
    end if
    if mX>case4x and mX<case4x+43 and mY>case4y and mY<case4y+43 and caseITEM(4) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(4) = 0 : rareITEM(4) = 0 : typeITEM(4) = 0
    end if
    if mX>case5x and mX<case5x+43 and mY>case5y and mY<case5y+43 and caseITEM(5) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(5) = 0 : rareITEM(5) = 0 : typeITEM(5) = 0
    end if
    if mX>case6x and mX<case6x+43 and mY>case6y and mY<case6y+43 and caseITEM(6) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(6) = 0 : rareITEM(6) = 0 : typeITEM(6) = 0
    end if
    if mX>case7x and mX<case7x+43 and mY>case7y and mY<case7y+43 and caseITEM(7) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(7) = 0 : rareITEM(7) = 0 : typeITEM(7) = 0
    end if
    if mX>case8x and mX<case8x+43 and mY>case8y and mY<case8y+43 and caseITEM(8) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(8) = 0 : rareITEM(8) = 0 : typeITEM(8) = 0
    end if
    if mX>case9x and mX<case9x+43 and mY>case9y and mY<case9y+43 and caseITEM(9) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(9) = 0 : rareITEM(9) = 0 : typeITEM(9) = 0
    end if
    if mX>case10x and mX<case10x+43 and mY>case10y and mY<case10y+43 and caseITEM(10) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(10) = 0 : rareITEM(10) = 0 : typeITEM(10) = 0
    end if
    if mX>case11x and mX<case11x+43 and mY>case11y and mY<case11y+43 and caseITEM(11) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(11) = 0 : rareITEM(11) = 0 : typeITEM(11) = 0
    end if
    if mX>case12x and mX<case12x+43 and mY>case12y and mY<case12y+43 and caseITEM(12) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(12) = 0 : rareITEM(12) = 0 : typeITEM(12) = 0
    end if
    if mX>case13x and mX<case13x+43 and mY>case13y and mY<case13y+43 and caseITEM(13) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(13) = 0 : rareITEM(13) = 0 : typeITEM(13) = 0
    end if
    if mX>case14x and mX<case14x+43 and mY>case14y and mY<case14y+43 and caseITEM(14) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(14) = 0 : rareITEM(14) = 0 : typeITEM(14) = 0
    end if
    if mX>case15x and mX<case15x+43 and mY>case15y and mY<case15y+43 and caseITEM(15) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(15) = 0 : rareITEM(15) = 0 : typeITEM(15) = 0
    end if
    if mX>case16x and mX<case16x+43 and mY>case16y and mY<case16y+43 and caseITEM(16) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(16) = 0 : rareITEM(16) = 0 : typeITEM(16) = 0
    end if
    if mX>case17x and mX<case17x+43 and mY>case17y and mY<case17y+43 and caseITEM(17) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(17) = 0 : rareITEM(17) = 0 : typeITEM(17) = 0
    end if
    if mX>case18x and mX<case18x+43 and mY>case18y and mY<case18y+43 and caseITEM(18) = 1 then
        if version = 1 then confirm "Voulez vous vendre cet objet pour 25 d'or ?";text$
        if version = 2 then confirm "Do you want to sell this item for 25 gold ?";text$
        if text$ = "no" then wait
        gold = gold + 25
        if bruitage = 1 then playwave "data\achat.wav", async
        caseITEM(18) = 0 : rareITEM(18) = 0 : typeITEM(18) = 0
    end if
    goto [marchands]

    [forge]

    if gold < prixUPGRADE then
        print #ini.main, "font Courier_New 12 underscore; color red;backcolor ";227;" ";215;" ";201
        if version = 1 then print #ini.main, "place 540 570 ;\"; "Pas assez d'or !"
        if version = 2 then print #ini.main, "place 535 570 ;\"; "Not enough gold !"
        timer 650, [noGold3] : wait
        [noGold3]
        timer 0 : print #ini.main, "font Courier_New 12 bold; color ";227;" ";215;" ";201;"; backcolor ";227;" ";215;" ";201 : print #ini.main, "place 534 570 ;\"; "                    "
        wait
    end if

    if valUPGRADED = 0 then wait
    gold = gold - prixUPGRADE
    talent5XP = talent5XP + 1
    if bruitage = 1 then playwave "data\forge.wav", async
    print #ini.main, "font Courier_New 9; color white;backcolor ";161;" ";106;" ";76

    select case caseUPGRADE
        case 1
            VequipITEM(1) = valUPGRADED : print #ini.main, "place 560 315 ;\"; VequipITEM(1)
            lvlITEMequip(1) = lvlITEMequip(1) + 1
                if version = 1 and lvlITEMequip(1) >=10 and rareITEMequip(1) = 1 then lvlITEMequip(1) = 1 : rareITEMequip(1) = 2 : bonusATK = bonusATK - 1 : gosub [loadITEM] : print #ini.main, "place 51 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (équipé)";"      "
                if version = 1 and lvlITEMequip(1) >=25 and rareITEMequip(1) = 2 then lvlITEMequip(1) = 1 : rareITEMequip(1) = 3 : bonusATK = bonusATK - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (équipé)";"      "
                if version = 1 and lvlITEMequip(1) >=50 and rareITEMequip(1) = 3 then lvlITEMequip(1) = 1 : rareITEMequip(1) = 4 : bonusATK = bonusATK - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (équipé)";"      "
                if version = 2 and lvlITEMequip(1) >=10 and rareITEMequip(1) = 1 then lvlITEMequip(1) = 1 : rareITEMequip(1) = 2 : bonusATK = bonusATK - 1 : gosub [loadITEM] : print #ini.main, "place 51 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (equipped)";"      "
                if version = 2 and lvlITEMequip(1) >=25 and rareITEMequip(1) = 2 then lvlITEMequip(1) = 1 : rareITEMequip(1) = 3 : bonusATK = bonusATK - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (equipped)";"      "
                if version = 2 and lvlITEMequip(1) >=50 and rareITEMequip(1) = 3 then lvlITEMequip(1) = 1 : rareITEMequip(1) = 4 : bonusATK = bonusATK - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (equipped)";"      "
            prixUPGRADE = int((VequipITEM(1)*0.87) * (lvlITEMequip(1)) * rareITEMequip(1))
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (équipé)";"      "
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (equipped)";"      "
            if rareITEMequip(1) = 1 then valUPGRADED = VequipITEM(1) + 1 : bonusATK = bonusATK + 1
            if rareITEMequip(1) = 2 then valUPGRADED = VequipITEM(1) + 2 : bonusATK = bonusATK + 2
            if rareITEMequip(1) = 3 then valUPGRADED = VequipITEM(1) + 5 : bonusATK = bonusATK + 5
            if rareITEMequip(1) = 4 then valUPGRADED = VequipITEM(1) + 10 : bonusATK = bonusATK + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(1));")"
            print #ini.main, "color white"
        case 2
            VequipITEM(2) = valUPGRADED : print #ini.main, "place 560 315 ;\"; VequipITEM(2)
            lvlITEMequip(2) = lvlITEMequip(2) + 1
                if version = 1 and lvlITEMequip(2) >=10 and rareITEMequip(2) = 1 then lvlITEMequip(2) = 1 : rareITEMequip(2) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (équipé)";"      "
                if version = 1 and lvlITEMequip(2) >=25 and rareITEMequip(2) = 2 then lvlITEMequip(2) = 1 : rareITEMequip(2) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (équipé)";"      "
                if version = 1 and lvlITEMequip(2) >=50 and rareITEMequip(2) = 3 then lvlITEMequip(2) = 1 : rareITEMequip(2) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (équipé)";"      "
                if version = 2 and lvlITEMequip(2) >=10 and rareITEMequip(2) = 1 then lvlITEMequip(2) = 1 : rareITEMequip(2) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (equipped)";"      "
                if version = 2 and lvlITEMequip(2) >=25 and rareITEMequip(2) = 2 then lvlITEMequip(2) = 1 : rareITEMequip(2) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (equipped)";"      "
                if version = 2 and lvlITEMequip(2) >=50 and rareITEMequip(2) = 3 then lvlITEMequip(2) = 1 : rareITEMequip(2) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (equipped)";"      "
            prixUPGRADE = int((VequipITEM(2)*0.87) * (lvlITEMequip(2)) * rareITEMequip(2))
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (équipé)";"      "
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (equipped)";"      "
            if rareITEMequip(2) = 1 then valUPGRADED = VequipITEM(2) + 1 : bonusDEF = bonusDEF + 1
            if rareITEMequip(2) = 2 then valUPGRADED = VequipITEM(2) + 2 : bonusDEF = bonusDEF + 2
            if rareITEMequip(2) = 3 then valUPGRADED = VequipITEM(2) + 5 : bonusDEF = bonusDEF + 5
            if rareITEMequip(2) = 4 then valUPGRADED = VequipITEM(2) + 10 : bonusDEF = bonusDEF + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(2));")"
            print #ini.main, "color white"
        case 3
            VequipITEM(3) = valUPGRADED : print #ini.main, "place 560 315 ;\"; VequipITEM(3)
            lvlITEMequip(3) = lvlITEMequip(3) + 1
                if version = 1 and lvlITEMequip(3) >=10 and rareITEMequip(3) = 1 then lvlITEMequip(3) = 1 : rareITEMequip(3) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (équipé)";"      "
                if version = 1 and lvlITEMequip(3) >=25 and rareITEMequip(3) = 2 then lvlITEMequip(3) = 1 : rareITEMequip(3) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (équipé)";"      "
                if version = 1 and lvlITEMequip(3) >=50 and rareITEMequip(3) = 3 then lvlITEMequip(3) = 1 : rareITEMequip(3) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (équipé)";"      "
                if version = 2 and lvlITEMequip(3) >=10 and rareITEMequip(3) = 1 then lvlITEMequip(3) = 1 : rareITEMequip(3) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (equipped)";"      "
                if version = 2 and lvlITEMequip(3) >=25 and rareITEMequip(3) = 2 then lvlITEMequip(3) = 1 : rareITEMequip(3) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (equipped)";"      "
                if version = 2 and lvlITEMequip(3) >=50 and rareITEMequip(3) = 3 then lvlITEMequip(3) = 1 : rareITEMequip(3) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (equipped)";"      "
            prixUPGRADE = int((VequipITEM(3)*0.87) * (lvlITEMequip(3)) * rareITEMequip(3))
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (équipé)";"      "
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (equipped)";"      "
            if rareITEMequip(3) = 1 then valUPGRADED = VequipITEM(3) + 1 : bonusDEF = bonusDEF + 1
            if rareITEMequip(3) = 2 then valUPGRADED = VequipITEM(3) + 2 : bonusDEF = bonusDEF + 2
            if rareITEMequip(3) = 3 then valUPGRADED = VequipITEM(3) + 5 : bonusDEF = bonusDEF + 5
            if rareITEMequip(3) = 4 then valUPGRADED = VequipITEM(3) + 10 : bonusDEF = bonusDEF + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(3));")"
            print #ini.main, "color white"
        case 4
            VequipITEM(4) = valUPGRADED : print #ini.main, "place 560 315 ;\"; VequipITEM(4)
            lvlITEMequip(4) = lvlITEMequip(4) + 1
                if version = 1 and lvlITEMequip(4) >=10 and rareITEMequip(4) = 1 then lvlITEMequip(4) = 1 : rareITEMequip(4) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (équipé)";"      "
                if version = 1 and lvlITEMequip(4) >=25 and rareITEMequip(4) = 2 then lvlITEMequip(4) = 1 : rareITEMequip(4) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (équipé)";"      "
                if version = 1 and lvlITEMequip(4) >=50 and rareITEMequip(4) = 3 then lvlITEMequip(4) = 1 : rareITEMequip(4) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (équipé)";"      "
                if version = 2 and lvlITEMequip(4) >=10 and rareITEMequip(4) = 1 then lvlITEMequip(4) = 1 : rareITEMequip(4) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (equipped)";"      "
                if version = 2 and lvlITEMequip(4) >=25 and rareITEMequip(4) = 2 then lvlITEMequip(4) = 1 : rareITEMequip(4) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (equipped)";"      "
                if version = 2 and lvlITEMequip(4) >=50 and rareITEMequip(4) = 3 then lvlITEMequip(4) = 1 : rareITEMequip(4) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (equipped)";"      "
            prixUPGRADE = int((VequipITEM(4)*0.87) * (lvlITEMequip(4)) * rareITEMequip(4))
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (équipé)";"      "
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (equipped)";"      "
            if rareITEMequip(4) = 1 then valUPGRADED = VequipITEM(4) + 1 : bonusDEF = bonusDEF + 1
            if rareITEMequip(4) = 2 then valUPGRADED = VequipITEM(4) + 2 : bonusDEF = bonusDEF + 2
            if rareITEMequip(4) = 3 then valUPGRADED = VequipITEM(4) + 5 : bonusDEF = bonusDEF + 5
            if rareITEMequip(4) = 4 then valUPGRADED = VequipITEM(4) + 10 : bonusDEF = bonusDEF + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(4));")"
            print #ini.main, "color white"
        case 5
            VequipITEM(5) = valUPGRADED : print #ini.main, "place 560 315 ;\"; VequipITEM(5)
            lvlITEMequip(5) = lvlITEMequip(5) + 1
                if version = 1 and lvlITEMequip(5) >=10 and rareITEMequip(5) = 1 then lvlITEMequip(5) = 1 : rareITEMequip(5) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (équipé)";"      "
                if version = 1 and lvlITEMequip(5) >=25 and rareITEMequip(5) = 2 then lvlITEMequip(5) = 1 : rareITEMequip(5) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (équipé)";"      "
                if version = 1 and lvlITEMequip(5) >=50 and rareITEMequip(5) = 3 then lvlITEMequip(5) = 1 : rareITEMequip(5) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (équipé)";"      "
                if version = 2 and lvlITEMequip(5) >=10 and rareITEMequip(5) = 1 then lvlITEMequip(5) = 1 : rareITEMequip(5) = 2 : bonusDEF = bonusDEF - 1 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (equipped)";"      "
                if version = 2 and lvlITEMequip(5) >=25 and rareITEMequip(5) = 2 then lvlITEMequip(5) = 1 : rareITEMequip(5) = 3 : bonusDEF = bonusDEF - 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (equipped)";"      "
                if version = 2 and lvlITEMequip(5) >=50 and rareITEMequip(5) = 3 then lvlITEMequip(5) = 1 : rareITEMequip(5) = 4 : bonusDEF = bonusDEF - 5 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (equipped)";"      "
            prixUPGRADE = int((VequipITEM(5)*0.87) * (lvlITEMequip(5)) * rareITEMequip(5))
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (équipé)";"      "
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (equipped)";"      "
            if rareITEMequip(5) = 1 then valUPGRADED = VequipITEM(5) + 1 : bonusDEF = bonusDEF + 1
            if rareITEMequip(5) = 2 then valUPGRADED = VequipITEM(5) + 2 : bonusDEF = bonusDEF + 2
            if rareITEMequip(5) = 3 then valUPGRADED = VequipITEM(5) + 5 : bonusDEF = bonusDEF + 5
            if rareITEMequip(5) = 4 then valUPGRADED = VequipITEM(5) + 10 : bonusDEF = bonusDEF + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(5));")"
            print #ini.main, "color white"
        case 6
            val1ITEM(1) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(1)
            lvlITEM(1) = lvlITEM(1) + 1
                if lvlITEM(1) >=10 and rareITEM(1) = 1 then lvlITEM(1) = 1 : rareITEM(1) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM1$;" ";lvlITEM(1);"      "
                if lvlITEM(1) >=25 and rareITEM(1) = 2 then lvlITEM(1) = 1 : rareITEM(1) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM1$;" ";lvlITEM(1);"      "
                if lvlITEM(1) >=50 and rareITEM(1) = 3 then lvlITEM(1) = 1 : rareITEM(1) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM1$;" ";lvlITEM(1);"      "
            prixUPGRADE = int((val1ITEM(1)*0.87) * (lvlITEM(1)) * rareITEM(1)) : print #ini.main, "place 510 270 ;\"; nameITEM1$;" ";lvlITEM(1);"      "
            if rareITEM(1) = 1 then valUPGRADED = val1ITEM(1) + 1
            if rareITEM(1) = 2 then valUPGRADED = val1ITEM(1) + 2
            if rareITEM(1) = 3 then valUPGRADED = val1ITEM(1) + 5
            if rareITEM(1) = 4 then valUPGRADED = val1ITEM(1) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(1));")"
            print #ini.main, "color white"
        case 7
            val1ITEM(2) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(2)
            lvlITEM(2) = lvlITEM(2) + 1
                if lvlITEM(2) >=10 and rareITEM(2) = 1 then lvlITEM(2) = 1 : rareITEM(2) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM2$;" ";lvlITEM(2);"      "
                if lvlITEM(2) >=25 and rareITEM(2) = 2 then lvlITEM(2) = 1 : rareITEM(2) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM2$;" ";lvlITEM(2);"      "
                if lvlITEM(2) >=50 and rareITEM(2) = 3 then lvlITEM(2) = 1 : rareITEM(2) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM2$;" ";lvlITEM(2);"      "
            prixUPGRADE = int((val1ITEM(2)*0.87) * (lvlITEM(2)) * rareITEM(2)) : print #ini.main, "place 510 270 ;\"; nameITEM2$;" ";lvlITEM(2);"      "
            if rareITEM(2) = 1 then valUPGRADED = val1ITEM(2) + 1
            if rareITEM(2) = 2 then valUPGRADED = val1ITEM(2) + 2
            if rareITEM(2) = 3 then valUPGRADED = val1ITEM(2) + 5
            if rareITEM(2) = 4 then valUPGRADED = val1ITEM(2) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(2));")"
            print #ini.main, "color white"
        case 8
            val1ITEM(3) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(3)
            lvlITEM(3) = lvlITEM(3) + 1
                if lvlITEM(3) >=10 and rareITEM(3) = 1 then lvlITEM(3) = 1 : rareITEM(3) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM3$;" ";lvlITEM(3);"      "
                if lvlITEM(3) >=25 and rareITEM(3) = 2 then lvlITEM(3) = 1 : rareITEM(3) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM3$;" ";lvlITEM(3);"      "
                if lvlITEM(3) >=50 and rareITEM(3) = 3 then lvlITEM(3) = 1 : rareITEM(3) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM3$;" ";lvlITEM(3);"      "
            prixUPGRADE = int((val1ITEM(3)*0.87) * (lvlITEM(3)) * rareITEM(3)) : print #ini.main, "place 510 270 ;\"; nameITEM3$;" ";lvlITEM(3);"      "
            if rareITEM(3) = 1 then valUPGRADED = val1ITEM(3) + 1
            if rareITEM(3) = 2 then valUPGRADED = val1ITEM(3) + 2
            if rareITEM(3) = 3 then valUPGRADED = val1ITEM(3) + 5
            if rareITEM(3) = 4 then valUPGRADED = val1ITEM(3) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(3));")"
            print #ini.main, "color white"
        case 9
            val1ITEM(4) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(4)
            lvlITEM(4) = lvlITEM(4) + 1
                if lvlITEM(4) >=10 and rareITEM(4) = 1 then lvlITEM(4) = 1 : rareITEM(4) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM4$;" ";lvlITEM(4);"      "
                if lvlITEM(4) >=25 and rareITEM(4) = 2 then lvlITEM(4) = 1 : rareITEM(4) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM4$;" ";lvlITEM(4);"      "
                if lvlITEM(4) >=50 and rareITEM(4) = 3 then lvlITEM(4) = 1 : rareITEM(4) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM4$;" ";lvlITEM(4);"      "
            prixUPGRADE = int((val1ITEM(4)*0.87) * (lvlITEM(4)) * rareITEM(4)) : print #ini.main, "place 510 270 ;\"; nameITEM4$;" ";lvlITEM(4);"      "
            if rareITEM(4) = 1 then valUPGRADED = val1ITEM(4) + 1
            if rareITEM(4) = 2 then valUPGRADED = val1ITEM(4) + 2
            if rareITEM(4) = 3 then valUPGRADED = val1ITEM(4) + 5
            if rareITEM(4) = 4 then valUPGRADED = val1ITEM(4) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(4));")"
            print #ini.main, "color white"
        case 10
            val1ITEM(5) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(5)
            lvlITEM(5) = lvlITEM(5) + 1
                if lvlITEM(5) >=10 and rareITEM(5) = 1 then lvlITEM(5) = 1 : rareITEM(5) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM5$;" ";lvlITEM(5);"      "
                if lvlITEM(5) >=25 and rareITEM(5) = 2 then lvlITEM(5) = 1 : rareITEM(5) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM5$;" ";lvlITEM(5);"      "
                if lvlITEM(5) >=50 and rareITEM(5) = 3 then lvlITEM(5) = 1 : rareITEM(5) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM5$;" ";lvlITEM(5);"      "
            prixUPGRADE = int((val1ITEM(5)*0.87) * (lvlITEM(5)) * rareITEM(5)) : print #ini.main, "place 510 270 ;\"; nameITEM4$;" ";lvlITEM(5);"      "
            if rareITEM(5) = 1 then valUPGRADED = val1ITEM(5) + 1
            if rareITEM(5) = 2 then valUPGRADED = val1ITEM(5) + 2
            if rareITEM(5) = 3 then valUPGRADED = val1ITEM(5) + 5
            if rareITEM(5) = 4 then valUPGRADED = val1ITEM(5) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(5));")"
            print #ini.main, "color white"
        case 11
            val1ITEM(6) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(6)
            lvlITEM(6) = lvlITEM(6) + 1
                if lvlITEM(6) >=10 and rareITEM(6) = 1 then lvlITEM(6) = 1 : rareITEM(6) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM6$;" ";lvlITEM(6);"      "
                if lvlITEM(6) >=25 and rareITEM(6) = 2 then lvlITEM(6) = 1 : rareITEM(6) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM6$;" ";lvlITEM(6);"      "
                if lvlITEM(6) >=50 and rareITEM(6) = 3 then lvlITEM(6) = 1 : rareITEM(6) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM6$;" ";lvlITEM(6);"      "
            prixUPGRADE = int((val1ITEM(6)*0.87) * (lvlITEM(6)) * rareITEM(6)) : print #ini.main, "place 510 270 ;\"; nameITEM6$;" ";lvlITEM(6);"      "
            if rareITEM(6) = 1 then valUPGRADED = val1ITEM(6) + 1
            if rareITEM(6) = 2 then valUPGRADED = val1ITEM(6) + 2
            if rareITEM(6) = 3 then valUPGRADED = val1ITEM(6) + 5
            if rareITEM(6) = 4 then valUPGRADED = val1ITEM(6) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(6));")"
            print #ini.main, "color white"
        case 12
            val1ITEM(7) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(7)
            lvlITEM(7) = lvlITEM(4) + 1
                if lvlITEM(7) >=10 and rareITEM(7) = 1 then lvlITEM(7) = 1 : rareITEM(7) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM7$;" ";lvlITEM(7);"      "
                if lvlITEM(7) >=25 and rareITEM(7) = 2 then lvlITEM(7) = 1 : rareITEM(7) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM7$;" ";lvlITEM(7);"      "
                if lvlITEM(7) >=50 and rareITEM(7) = 3 then lvlITEM(7) = 1 : rareITEM(7) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM7$;" ";lvlITEM(7);"      "
            prixUPGRADE = int((val1ITEM(7)*0.87) * (lvlITEM(7)) * rareITEM(7)) : print #ini.main, "place 510 270 ;\"; nameITEM7$;" ";lvlITEM(7);"      "
            if rareITEM(7) = 1 then valUPGRADED = val1ITEM(7) + 1
            if rareITEM(7) = 2 then valUPGRADED = val1ITEM(7) + 2
            if rareITEM(7) = 3 then valUPGRADED = val1ITEM(7) + 5
            if rareITEM(7) = 4 then valUPGRADED = val1ITEM(7) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(7));")"
            print #ini.main, "color white"
        case 13
            val1ITEM(8) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(8)
            lvlITEM(8) = lvlITEM(8) + 1
                if lvlITEM(8) >=10 and rareITEM(8) = 1 then lvlITEM(8) = 1 : rareITEM(8) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM8$;" ";lvlITEM(8);"      "
                if lvlITEM(8) >=25 and rareITEM(8) = 2 then lvlITEM(8) = 1 : rareITEM(8) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM8$;" ";lvlITEM(8);"      "
                if lvlITEM(8) >=50 and rareITEM(8) = 3 then lvlITEM(8) = 1 : rareITEM(8) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM8$;" ";lvlITEM(8);"      "
            prixUPGRADE = int((val1ITEM(8)*0.87) * (lvlITEM(8)) * rareITEM(8)) : print #ini.main, "place 510 270 ;\"; nameITEM8$;" ";lvlITEM(8);"      "
            if rareITEM(8) = 1 then valUPGRADED = val1ITEM(8) + 1
            if rareITEM(8) = 2 then valUPGRADED = val1ITEM(8) + 2
            if rareITEM(8) = 3 then valUPGRADED = val1ITEM(8) + 5
            if rareITEM(8) = 4 then valUPGRADED = val1ITEM(8) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(8));")"
            print #ini.main, "color white"
        case 14
            val1ITEM(9) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(9)
            lvlITEM(9) = lvlITEM(9) + 1
                if lvlITEM(9) >=10 and rareITEM(9) = 1 then lvlITEM(9) = 1 : rareITEM(9) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM9$;" ";lvlITEM(9);"      "
                if lvlITEM(9) >=25 and rareITEM(9) = 2 then lvlITEM(9) = 1 : rareITEM(9) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM9$;" ";lvlITEM(9);"      "
                if lvlITEM(9) >=50 and rareITEM(9) = 3 then lvlITEM(9) = 1 : rareITEM(9) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM9$;" ";lvlITEM(9);"      "
            prixUPGRADE = int((val1ITEM(9)*0.87) * (lvlITEM(9)) * rareITEM(9)) : print #ini.main, "place 510 270 ;\"; nameITEM9$;" ";lvlITEM(9);"      "
            if rareITEM(9) = 1 then valUPGRADED = val1ITEM(9) + 1
            if rareITEM(9) = 2 then valUPGRADED = val1ITEM(9) + 2
            if rareITEM(9) = 3 then valUPGRADED = val1ITEM(9) + 5
            if rareITEM(9) = 4 then valUPGRADED = val1ITEM(9) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(9));")"
            print #ini.main, "color white"
        case 15
            val1ITEM(10) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(10)
            lvlITEM(10) = lvlITEM(10) + 1
                if lvlITEM(10) >=10 and rareITEM(10) = 1 then lvlITEM(10) = 1 : rareITEM(10) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM10$;" ";lvlITEM(10);"      "
                if lvlITEM(10) >=25 and rareITEM(10) = 2 then lvlITEM(10) = 1 : rareITEM(10) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM10$;" ";lvlITEM(10);"      "
                if lvlITEM(10) >=50 and rareITEM(10) = 3 then lvlITEM(10) = 1 : rareITEM(10) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM10$;" ";lvlITEM(10);"      "
            prixUPGRADE = int((val1ITEM(10)*0.87) * (lvlITEM(10)) * rareITEM(10)) : print #ini.main, "place 510 270 ;\"; nameITEM10$;" ";lvlITEM(10);"      "
            if rareITEM(10) = 1 then valUPGRADED = val1ITEM(10) + 1
            if rareITEM(10) = 2 then valUPGRADED = val1ITEM(10) + 2
            if rareITEM(10) = 3 then valUPGRADED = val1ITEM(10) + 5
            if rareITEM(10) = 4 then valUPGRADED = val1ITEM(10) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(10));")"
            print #ini.main, "color white"
        case 16
            val1ITEM(11) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(11)
            lvlITEM(11) = lvlITEM(11) + 1
                if lvlITEM(11) >=10 and rareITEM(11) = 1 then lvlITEM(11) = 1 : rareITEM(11) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM11$;" ";lvlITEM(11);"      "
                if lvlITEM(11) >=25 and rareITEM(11) = 2 then lvlITEM(11) = 1 : rareITEM(11) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM11$;" ";lvlITEM(11);"      "
                if lvlITEM(11) >=50 and rareITEM(11) = 3 then lvlITEM(11) = 1 : rareITEM(11) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM11$;" ";lvlITEM(11);"      "
            prixUPGRADE = int((val1ITEM(11)*0.87) * (lvlITEM(11)) * rareITEM(11)) : print #ini.main, "place 510 270 ;\"; nameITEM11$;" ";lvlITEM(11);"      "
            if rareITEM(11) = 1 then valUPGRADED = val1ITEM(11) + 1
            if rareITEM(11) = 2 then valUPGRADED = val1ITEM(11) + 2
            if rareITEM(11) = 3 then valUPGRADED = val1ITEM(11) + 5
            if rareITEM(11) = 4 then valUPGRADED = val1ITEM(11) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(11));")"
            print #ini.main, "color white"
        case 17
            val1ITEM(12) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(12)
            lvlITEM(12) = lvlITEM(12) + 1
                if lvlITEM(12) >=10 and rareITEM(12) = 1 then lvlITEM(12) = 1 : rareITEM(12) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM12$;" ";lvlITEM(12);"      "
                if lvlITEM(12) >=25 and rareITEM(12) = 2 then lvlITEM(12) = 1 : rareITEM(12) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM12$;" ";lvlITEM(12);"      "
                if lvlITEM(12) >=50 and rareITEM(12) = 3 then lvlITEM(12) = 1 : rareITEM(12) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM12$;" ";lvlITEM(12);"      "
            prixUPGRADE = int((val1ITEM(12)*0.87) * (lvlITEM(12)) * rareITEM(12)) : print #ini.main, "place 510 270 ;\"; nameITEM12$;" ";lvlITEM(12);"      "
            if rareITEM(12) = 1 then valUPGRADED = val1ITEM(12) + 1
            if rareITEM(12) = 2 then valUPGRADED = val1ITEM(12) + 2
            if rareITEM(12) = 3 then valUPGRADED = val1ITEM(12) + 5
            if rareITEM(12) = 4 then valUPGRADED = val1ITEM(12) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(12));")"
            print #ini.main, "color white"
        case 18
            val1ITEM(13) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(13)
            lvlITEM(13) = lvlITEM(13) + 1
                if lvlITEM(13) >=10 and rareITEM(13) = 1 then lvlITEM(13) = 1 : rareITEM(13) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM13$;" ";lvlITEM(13);"      "
                if lvlITEM(13) >=25 and rareITEM(13) = 2 then lvlITEM(13) = 1 : rareITEM(13) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM13$;" ";lvlITEM(13);"      "
                if lvlITEM(13) >=50 and rareITEM(13) = 3 then lvlITEM(13) = 1 : rareITEM(13) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM13$;" ";lvlITEM(13);"      "
            prixUPGRADE = int((val1ITEM(13)*0.87) * (lvlITEM(13)) * rareITEM(13)) : print #ini.main, "place 510 270 ;\"; nameITEM13$;" ";lvlITEM(13);"      "
            if rareITEM(13) = 1 then valUPGRADED = val1ITEM(13) + 1
            if rareITEM(13) = 2 then valUPGRADED = val1ITEM(13) + 2
            if rareITEM(13) = 3 then valUPGRADED = val1ITEM(13) + 5
            if rareITEM(13) = 4 then valUPGRADED = val1ITEM(13) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(13));")"
            print #ini.main, "color white"
        case 19
            val1ITEM(14) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(14)
            lvlITEM(14) = lvlITEM(14) + 1
                if lvlITEM(14) >=10 and rareITEM(14) = 1 then lvlITEM(14) = 1 : rareITEM(14) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM14$;" ";lvlITEM(14);"      "
                if lvlITEM(14) >=25 and rareITEM(14) = 2 then lvlITEM(14) = 1 : rareITEM(14) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM14$;" ";lvlITEM(14);"      "
                if lvlITEM(14) >=50 and rareITEM(14) = 3 then lvlITEM(14) = 1 : rareITEM(14) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM14$;" ";lvlITEM(14);"      "
            prixUPGRADE = int((val1ITEM(14)*0.87) * (lvlITEM(14)) * rareITEM(14)) : print #ini.main, "place 510 270 ;\"; nameITEM14$;" ";lvlITEM(14);"      "
            if rareITEM(14) = 1 then valUPGRADED = val1ITEM(14) + 1
            if rareITEM(14) = 2 then valUPGRADED = val1ITEM(14) + 2
            if rareITEM(14) = 3 then valUPGRADED = val1ITEM(14) + 5
            if rareITEM(14) = 4 then valUPGRADED = val1ITEM(14) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(14));")"
            print #ini.main, "color white"
        case 20
            val1ITEM(15) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(15)
            lvlITEM(15) = lvlITEM(15) + 1
                if lvlITEM(15) >=10 and rareITEM(15) = 1 then lvlITEM(15) = 1 : rareITEM(15) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM15$;" ";lvlITEM(15);"      "
                if lvlITEM(15) >=25 and rareITEM(15) = 2 then lvlITEM(15) = 1 : rareITEM(15) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM15$;" ";lvlITEM(15);"      "
                if lvlITEM(15) >=50 and rareITEM(15) = 3 then lvlITEM(15) = 1 : rareITEM(15) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM15$;" ";lvlITEM(15);"      "
            prixUPGRADE = int((val1ITEM(15)*0.87) * (lvlITEM(15)) * rareITEM(15)) : print #ini.main, "place 510 270 ;\"; nameITEM15$;" ";lvlITEM(15);"      "
            if rareITEM(15) = 1 then valUPGRADED = val1ITEM(15) + 1
            if rareITEM(15) = 2 then valUPGRADED = val1ITEM(15) + 2
            if rareITEM(15) = 3 then valUPGRADED = val1ITEM(15) + 5
            if rareITEM(15) = 4 then valUPGRADED = val1ITEM(15) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(15));")"
            print #ini.main, "color white"
        case 21
            val1ITEM(16) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(16)
            lvlITEM(16) = lvlITEM(16) + 1
                if lvlITEM(16) >=10 and rareITEM(16) = 1 then lvlITEM(16) = 1 : rareITEM(16) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM16$;" ";lvlITEM(16);"      "
                if lvlITEM(16) >=25 and rareITEM(16) = 2 then lvlITEM(16) = 1 : rareITEM(16) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM16$;" ";lvlITEM(16);"      "
                if lvlITEM(16) >=50 and rareITEM(16) = 3 then lvlITEM(16) = 1 : rareITEM(16) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM16$;" ";lvlITEM(16);"      "
            prixUPGRADE = int((val1ITEM(16)*0.87) * (lvlITEM(16)) * rareITEM(16)) : print #ini.main, "place 510 270 ;\"; nameITEM16$;" ";lvlITEM(16);"      "
            if rareITEM(16) = 1 then valUPGRADED = val1ITEM(16) + 1
            if rareITEM(16) = 2 then valUPGRADED = val1ITEM(16) + 2
            if rareITEM(16) = 3 then valUPGRADED = val1ITEM(16) + 5
            if rareITEM(16) = 4 then valUPGRADED = val1ITEM(16) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(16));")"
            print #ini.main, "color white"
        case 22
            val1ITEM(17) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(17)
            lvlITEM(17) = lvlITEM(17) + 1
                if lvlITEM(17) >=10 and rareITEM(17) = 1 then lvlITEM(17) = 1 : rareITEM(17) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM17$;" ";lvlITEM(17);"      "
                if lvlITEM(17) >=25 and rareITEM(17) = 2 then lvlITEM(17) = 1 : rareITEM(17) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM17$;" ";lvlITEM(17);"      "
                if lvlITEM(17) >=50 and rareITEM(17) = 3 then lvlITEM(17) = 1 : rareITEM(17) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM17$;" ";lvlITEM(17);"      "
            prixUPGRADE = int((val1ITEM(17)*0.87) * (lvlITEM(17)) * rareITEM(17)) : print #ini.main, "place 510 270 ;\"; nameITEM17$;" ";lvlITEM(17);"      "
            if rareITEM(17) = 1 then valUPGRADED = val1ITEM(17) + 1
            if rareITEM(17) = 2 then valUPGRADED = val1ITEM(17) + 2
            if rareITEM(17) = 3 then valUPGRADED = val1ITEM(17) + 5
            if rareITEM(17) = 4 then valUPGRADED = val1ITEM(17) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(17));")"
            print #ini.main, "color white"
        case 23
            val1ITEM(18) = valUPGRADED : print #ini.main, "place 560 315 ;\"; val1ITEM(18)
            lvlITEM(18) = lvlITEM(18) + 1
                if lvlITEM(18) >=10 and rareITEM(18) = 1 then lvlITEM(18) = 1 : rareITEM(18) = 2 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM18$;" ";lvlITEM(18);"      "
                if lvlITEM(18) >=25 and rareITEM(18) = 2 then lvlITEM(18) = 1 : rareITEM(18) = 3 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM18$;" ";lvlITEM(18);"      "
                if lvlITEM(18) >=50 and rareITEM(18) = 3 then lvlITEM(18) = 1 : rareITEM(18) = 4 : gosub [loadITEM] : print #ini.main, "place 510 270 ;\"; nameITEM18$;" ";lvlITEM(18);"      "
            prixUPGRADE = int((val1ITEM(18)*0.87) * (lvlITEM(18)) * rareITEM(18)) : print #ini.main, "place 510 270 ;\"; nameITEM18$;" ";lvlITEM(18);"      "
            if rareITEM(18) = 1 then valUPGRADED = val1ITEM(18) + 1
            if rareITEM(18) = 2 then valUPGRADED = val1ITEM(18) + 2
            if rareITEM(18) = 3 then valUPGRADED = val1ITEM(18) + 5
            if rareITEM(18) = 4 then valUPGRADED = val1ITEM(18) + 10
            prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(18));")"
            print #ini.main, "color white"
    end select

    print #ini.main, "font Courier_New 9; color white;backcolor ";161;" ";106;" ";76
    print #ini.main, "place 510 420 ;\"; prixUPGRADE; "       "
    print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
    if version = 1 then print #ini.main, "place 75 430 ;\"; "Votre or : ";gold; "      "
    if version = 2 then print #ini.main, "place 75 430 ;\"; "Your gold : ";gold; "      "
    wait

    [click2]
    mX = MouseX : mY = MouseY
 '  notice mX ;" "; mY

    if inventaire = 1 then
     '   notice mX ;" "; mY
        if version = 1 then
            if mX>650 and mX<665 and mY>248 and mY<260 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Caractéristique : Force\Augmente les dégâts infligés ainsi que \la santé du personnage." : wait
            if mX>650 and mX<665 and mY>268 and mY<280 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Caractéristique : Agilité\Augmente la défense du personnage ainsi \que son % d'esquive." : wait
            if mX>650 and mX<665 and mY>288 and mY<300 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Caractéristique : Intelligence\Augmente les chances et la puissance des \coups critiques." : wait
            if mX>650 and mX<665 and mY>308 and mY<320 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Caractéristique : Résistance\Diminue les dégâts reçus par les \adversaires." : wait
            if mX>433 and mX<450 and mY>365 and mY<380 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Puissance de frappe\Augmente définitivement de ";talent1*2;" vos points\d'attaque. (+2/ niveau)" : wait
            if mX>433 and mX<450 and mY>400 and mY<415 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Santé\Augmente définitivement de ";talent2*5;" votre \santé. (+5/ niveau)" : wait
            if mX>433 and mX<450 and mY>435 and mY<450 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Résistance\Augmente définitivement de ";talent3;" vos points \de défense. (+1/ niveau)" : wait
            if mX>433 and mX<450 and mY>470 and mY<485 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Régénération\Augmente définitivement de ";talent4*0.25;" votre \régénération. (+0.25/ niveau)" : wait
            if mX>433 and mX<450 and mY>505 and mY<520 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Forgeron\Diminue définitivement le prix \d'amélioration de vos objets chez le \forgeron de ";talent5*5;" pièces d'or. (-5/ niveau)" : wait
            if mX>433 and mX<450 and mY>540 and mY<555 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Collectionneur\Diminue définitivement le prix d'achat \de vos objets chez le marchand de ";talent6;" \pièces d'or. (-1/ niveau)" : wait
        end if
        if version = 2 then
            if mX>650 and mX<665 and mY>248 and mY<260 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Characteristic : Strength\Increases damage dealt and character \health." : wait
            if mX>650 and mX<665 and mY>268 and mY<280 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Characteristic : Agility\Increases the character's defense as \well as their dodge percentage." : wait
            if mX>650 and mX<665 and mY>288 and mY<300 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Characteristic : Intelligence\Increases the chance and power of \critical hits." : wait
            if mX>650 and mX<665 and mY>308 and mY<320 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Characteristic : Resistance\Decreases damage received by opponents." : wait
            if mX>433 and mX<450 and mY>365 and mY<380 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Punch Power\Permanently increases your attack points \by ";talent1*2;". (+2/ level)" : wait
            if mX>433 and mX<450 and mY>400 and mY<415 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Health\Permanently increases your health by ";talent2*5;". \(+5/ level)" : wait
            if mX>433 and mX<450 and mY>435 and mY<450 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Resistance\Permanently increases your defense \points by ";talent3;". (+1/ level)" : wait
            if mX>433 and mX<450 and mY>470 and mY<485 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Regeneration\Permanently increases your regeneration \by ";talent4*0.25;". (+0.25/ level)" : wait
            if mX>433 and mX<450 and mY>505 and mY<520 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Blacksmith\Permanently decreases the cost of \upgrading your items at the blacksmith \by ";talent5*5;" gold coins. (-5/ level)" : wait
            if mX>433 and mX<450 and mY>540 and mY<555 then print #ini.main, "drawbmp tuto3 170 240" : print #ini.main, "color white; place 260 275 ;\"; "Talent : Collector\Permanently decreases the purchase price \of your items from the merchant by ";talent6;" \gold coins. (-1/ level)" : wait
        end if
    end if

    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
       gDC As ulong,_     'handle of graphicbox
       _OPAQUE As long,_  'flag for opaque background
       result As long     'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    if marchands = 1 and mX>520 and mX<720 and mY>250 and mY<300 then goto [achatITEM1]
    if marchands = 1 and mX>520 and mX<720 and mY>360 and mY<410 then goto [achatITEM2]


    if marchands = 1 and mX>482 and mX<542 and mY>532 and mY<570 then
        if version = 1 then confirm "Voulez-vous revendre tous vos objets ''Communs'' de votre inventaire ?";confirmation$
        if version = 2 then confirm "Do you want to resell all your ''Common'' items from your inventory ?";confirmation$
        if confirmation$ = "no" then wait
        for rev = 1 to 18
            if caseITEM(rev) >0 and rareITEM(rev) = 1 then gold = gold + 25 : caseITEM(rev) = 0 : rareITEM(rev) = 0 : typeITEM(rev) = 0 : vieITEM(rev) = 0
        next rev
        if bruitage = 1 then playwave "data\achat.wav", async
    end if
    if marchands = 1 and mX>552 and mX<612 and mY>532 and mY<570 then
        if version = 1 then confirm "Voulez-vous revendre tous vos objets ''Peu communs'' de votre inventaire ?";confirmation$
        if version = 2 then confirm "Do you want to resell all your ''Uncommon'' items from your inventory ?";confirmation$
        if confirmation$ = "no" then wait
        for rev = 1 to 18
            if caseITEM(rev) >0 and rareITEM(rev) = 2 then gold = gold + 25 : caseITEM(rev) = 0 : rareITEM(rev) = 0 : typeITEM(rev) = 0 : vieITEM(rev) = 0
        next rev
        if bruitage = 1 then playwave "data\achat.wav", async
    end if
    if marchands = 1 and mX>622 and mX<682 and mY>532 and mY<570 then
        if version = 1 then confirm "Voulez-vous revendre tous vos objets ''Rares'' de votre inventaire ?";confirmation$
        if version = 2 then confirm "Do you want to resell all your ''Rares'' items from your inventory ?";confirmation$
        if confirmation$ = "no" then wait
        for rev = 1 to 18
            if caseITEM(rev) >0 and rareITEM(rev) = 3 then gold = gold + 25 : caseITEM(rev) = 0 : rareITEM(rev) = 0 : typeITEM(rev) = 0 : vieITEM(rev) = 0
        next rev
        if bruitage = 1 then playwave "data\achat.wav", async
    end if
    if marchands = 1 and mX>692 and mX<752 and mY>532 and mY<570 then
        if version = 1 then confirm "Voulez-vous revendre tous vos objets ''Légendaires'' de votre inventaire ?";confirmation$
        if version = 2 then confirm "Do you want to resell all your ''Legendaries'' items from your inventory ?";confirmation$
        if confirmation$ = "no" then wait
        for rev = 1 to 18
            if caseITEM(rev) >0 and rareITEM(rev) = 4 then gold = gold + 25 : caseITEM(rev) = 0 : rareITEM(rev) = 0 : typeITEM(rev) = 0 : vieITEM(rev) = 0
        next rev
        if bruitage = 1 then playwave "data\achat.wav", async
    end if

    if forgeron = 1 then
        if mX>530 and mX<700 and mY>490 and mY<540 then goto [forge]
        prixUPGRADE = 0 : valUPGRADED = 0
        print #ini.main, "font Cascadia_Code 10; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 505 270 ;\"; "                                   "
        print #ini.main, "place 550 315 ;\"; "                           "
        print #ini.main, "place 510 422 ;\"; "                          "
        print #ini.main, "font Courier_New 9"

        if mX>case1Ex and mX<case1Ex+43 and mY>case1Ey and mY<case1Ey+43 and caseITEMequip(1) = 1 then
            caseUPGRADE = 1
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (équipé)"
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip1$;" ";lvlITEMequip(1);" (equipped)"
            print #ini.main, "place 560 315 ;\"; VequipITEM(1)
                prixUPGRADE = int((VequipITEM(1)*0.87) * (lvlITEMequip(1)) * rareITEMequip(1))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEMequip(1) = 1 then valUPGRADED = VequipITEM(1) + 1
                if rareITEMequip(1) = 2 then valUPGRADED = VequipITEM(1) + 2
                if rareITEMequip(1) = 3 then valUPGRADED = VequipITEM(1) + 5
                if rareITEMequip(1) = 4 then valUPGRADED = VequipITEM(1) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(1));")"
            print #ini.main, "color white"
        end if
        if mX>case2Ex and mX<case2Ex+43 and mY>case2Ey and mY<case2Ey+43 and caseITEMequip(2) = 1 then
            caseUPGRADE = 2
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (équipé)"
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip2$;" ";lvlITEMequip(2);" (equipped)"
            print #ini.main, "place 560 315 ;\"; VequipITEM(2)
                prixUPGRADE = int((VequipITEM(2)*0.87) * (lvlITEMequip(2)) * rareITEMequip(2))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEMequip(2) = 1 then valUPGRADED = VequipITEM(2) + 1
                if rareITEMequip(2) = 2 then valUPGRADED = VequipITEM(2) + 2
                if rareITEMequip(2) = 3 then valUPGRADED = VequipITEM(2) + 5
                if rareITEMequip(2) = 4 then valUPGRADED = VequipITEM(2) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(2));")"
            print #ini.main, "color white"
        end if
        if mX>case3Ex and mX<case3Ex+43 and mY>case3Ey and mY<case3Ey+43 and caseITEMequip(3) = 1 then
            caseUPGRADE = 3
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (équipé)"
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip3$;" ";lvlITEMequip(3);" (equipped)"
         '   print #ini.main, "place 465 285 ;\"; lvlITEMequip(3)
            print #ini.main, "place 560 315 ;\"; VequipITEM(3)
                prixUPGRADE = int((VequipITEM(3)*0.87) * (lvlITEMequip(3)) * rareITEMequip(3))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEMequip(3) = 1 then valUPGRADED = VequipITEM(3) + 1
                if rareITEMequip(3) = 2 then valUPGRADED = VequipITEM(3) + 2
                if rareITEMequip(3) = 3 then valUPGRADED = VequipITEM(3) + 5
                if rareITEMequip(3) = 4 then valUPGRADED = VequipITEM(3) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(3));")"
            print #ini.main, "color white"
        end if
        if mX>case4Ex and mX<case4Ex+43 and mY>case4Ey and mY<case4Ey+43 and caseITEMequip(4) = 1 then
            caseUPGRADE = 4
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (équipé)"
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip4$;" ";lvlITEMequip(4);" (equipped)"
          '  print #ini.main, "place 465 285 ;\"; lvlITEMequip(4)
            print #ini.main, "place 560 315 ;\"; VequipITEM(4)
                prixUPGRADE = int((VequipITEM(4)*0.87) * (lvlITEMequip(4)) * rareITEMequip(4))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEMequip(4) = 1 then valUPGRADED = VequipITEM(4) + 1
                if rareITEMequip(4) = 2 then valUPGRADED = VequipITEM(4) + 2
                if rareITEMequip(4) = 3 then valUPGRADED = VequipITEM(4) + 5
                if rareITEMequip(4) = 4 then valUPGRADED = VequipITEM(4) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(4));")"
            print #ini.main, "color white"
        end if
        if mX>case5Ex and mX<case5Ex+43 and mY>case5Ey and mY<case5Ey+43 and caseITEMequip(5) = 1 then
            caseUPGRADE = 5
            if version = 1 then print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (équipé)"
            if version = 2 then print #ini.main, "place 510 270 ;\"; nameITEMequip5$;" ";lvlITEMequip(5);" (equipped)"
        '    print #ini.main, "place 465 285 ;\"; lvlITEMequip(5)
            print #ini.main, "place 560 315 ;\"; VequipITEM(5)
                prixUPGRADE = int((VequipITEM(5)*0.87) * (lvlITEMequip(5)) * rareITEMequip(5))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEMequip(5) = 1 then valUPGRADED = VequipITEM(5) + 1
                if rareITEMequip(5) = 2 then valUPGRADED = VequipITEM(5) + 2
                if rareITEMequip(5) = 3 then valUPGRADED = VequipITEM(5) + 5
                if rareITEMequip(5) = 4 then valUPGRADED = VequipITEM(5) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-VequipITEM(5));")"
            print #ini.main, "color white"
        end if

        if mX>case1x and mX<case1x+43 and mY>case1y and mY<case1y+43 and caseITEM(1) = 1 then
            caseUPGRADE = 6
            print #ini.main, "place 510 270 ;\"; nameITEM1$; " ";lvlITEM(1);"   "
            print #ini.main, "place 560 315 ;\"; val1ITEM(1)
                prixUPGRADE = int((val1ITEM(1)*0.87) * (lvlITEM(1)) * rareITEM(1))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(1) = 1 then valUPGRADED = val1ITEM(1) + 1
                if rareITEM(1) = 2 then valUPGRADED = val1ITEM(1) + 2
                if rareITEM(1) = 3 then valUPGRADED = val1ITEM(1) + 5
                if rareITEM(1) = 4 then valUPGRADED = val1ITEM(1) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(1));")"
            print #ini.main, "color white"
        end if
        if mX>case2x and mX<case2x+43 and mY>case2y and mY<case2y+43 and caseITEM(2) = 1 then
            caseUPGRADE = 7
            print #ini.main, "place 510 270 ;\"; nameITEM2$; " ";lvlITEM(2);"   "
            print #ini.main, "place 560 315 ;\"; val1ITEM(2)
                prixUPGRADE = int((val1ITEM(2)*0.87) * (lvlITEM(2)) * rareITEM(2))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(2) = 1 then valUPGRADED = val1ITEM(2) + 1
                if rareITEM(2) = 2 then valUPGRADED = val1ITEM(2) + 2
                if rareITEM(2) = 3 then valUPGRADED = val1ITEM(2) + 5
                if rareITEM(2) = 4 then valUPGRADED = val1ITEM(2) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(2));")"
            print #ini.main, "color white"
        end if
        if mX>case3x and mX<case3x+43 and mY>case3y and mY<case3y+43 and caseITEM(3) = 1 then
            caseUPGRADE = 8
            print #ini.main, "place 510 270 ;\"; nameITEM3$; " ";lvlITEM(3);"   "
       '     print #ini.main, "place 465 285 ;\"; lvlITEM(3)
            print #ini.main, "place 560 315 ;\"; val1ITEM(3)
                prixUPGRADE = int((val1ITEM(3)*0.87) * (lvlITEM(3)) * rareITEM(3))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(3) = 1 then valUPGRADED = val1ITEM(3) + 1
                if rareITEM(3) = 2 then valUPGRADED = val1ITEM(3) + 2
                if rareITEM(3) = 3 then valUPGRADED = val1ITEM(3) + 5
                if rareITEM(3) = 4 then valUPGRADED = val1ITEM(3) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(3));")"
            print #ini.main, "color white"
        end if
        if mX>case4x and mX<case4x+43 and mY>case4y and mY<case4y+43 and caseITEM(4) = 1 then
            caseUPGRADE = 9
            print #ini.main, "place 510 270 ;\"; nameITEM4$; " ";lvlITEM(4);"   "
         '   print #ini.main, "place 465 285 ;\"; lvlITEM(4)
            print #ini.main, "place 560 315 ;\"; val1ITEM(4)
                prixUPGRADE = int((val1ITEM(4)*0.87) * (lvlITEM(4)) * rareITEM(4))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(4) = 1 then valUPGRADED = val1ITEM(4) + 1
                if rareITEM(4) = 2 then valUPGRADED = val1ITEM(4) + 2
                if rareITEM(4) = 3 then valUPGRADED = val1ITEM(4) + 5
                if rareITEM(4) = 4 then valUPGRADED = val1ITEM(4) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(4));")"
            print #ini.main, "color white"
        end if
        if mX>case5x and mX<case5x+43 and mY>case5y and mY<case5y+43 and caseITEM(5) = 1 then
            caseUPGRADE = 10
            print #ini.main, "place 510 270 ;\"; nameITEM5$; " ";lvlITEM(5);"   "
       '     print #ini.main, "place 465 285 ;\"; lvlITEM(5)
            print #ini.main, "place 560 315 ;\"; val1ITEM(5)
                prixUPGRADE = int((val1ITEM(5)*0.87) * (lvlITEM(5)) * rareITEM(5))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(5) = 1 then valUPGRADED = val1ITEM(5) + 1
                if rareITEM(5) = 2 then valUPGRADED = val1ITEM(5) + 2
                if rareITEM(5) = 3 then valUPGRADED = val1ITEM(5) + 5
                if rareITEM(5) = 4 then valUPGRADED = val1ITEM(5) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(5));")"
            print #ini.main, "color white"
        end if
        if mX>case6x and mX<case6x+43 and mY>case6y and mY<case6y+43 and caseITEM(6) = 1 then
            caseUPGRADE = 11
            print #ini.main, "place 510 270 ;\"; nameITEM6$; " ";lvlITEM(6);"   "
        '    print #ini.main, "place 465 285 ;\"; lvlITEM(6)
            print #ini.main, "place 560 315 ;\"; val1ITEM(6)
                prixUPGRADE = int((val1ITEM(6)*0.87) * (lvlITEM(6)) * rareITEM(6))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(6) = 1 then valUPGRADED = val1ITEM(6) + 1
                if rareITEM(6) = 2 then valUPGRADED = val1ITEM(6) + 2
                if rareITEM(6) = 3 then valUPGRADED = val1ITEM(6) + 5
                if rareITEM(6) = 4 then valUPGRADED = val1ITEM(6) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(6));")"
            print #ini.main, "color white"
        end if
        if mX>case7x and mX<case7x+43 and mY>case7y and mY<case7y+43 and caseITEM(7) = 1 then
            caseUPGRADE = 12
            print #ini.main, "place 510 270 ;\"; nameITEM7$; " ";lvlITEM(7);"   "
        '    print #ini.main, "place 465 285 ;\"; lvlITEM(7)
            print #ini.main, "place 560 315 ;\"; val1ITEM(7)
                prixUPGRADE = int((val1ITEM(7)*0.87) * (lvlITEM(7)) * rareITEM(7))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(7) = 1 then valUPGRADED = val1ITEM(7) + 1
                if rareITEM(7) = 2 then valUPGRADED = val1ITEM(7) + 2
                if rareITEM(7) = 3 then valUPGRADED = val1ITEM(7) + 5
                if rareITEM(7) = 4 then valUPGRADED = val1ITEM(7) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(7));")"
            print #ini.main, "color white"
        end if
        if mX>case8x and mX<case8x+43 and mY>case8y and mY<case8y+43 and caseITEM(8) = 1 then
            caseUPGRADE = 13
            print #ini.main, "place 510 270 ;\"; nameITEM8$; " ";lvlITEM(8);"   "
       '     print #ini.main, "place 465 285 ;\"; lvlITEM(8)
            print #ini.main, "place 560 315 ;\"; val1ITEM(8)
                prixUPGRADE = int((val1ITEM(8)*0.87) * (lvlITEM(8)) * rareITEM(8))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(8) = 1 then valUPGRADED = val1ITEM(8) + 1
                if rareITEM(8) = 2 then valUPGRADED = val1ITEM(8) + 2
                if rareITEM(8) = 3 then valUPGRADED = val1ITEM(8) + 5
                if rareITEM(8) = 4 then valUPGRADED = val1ITEM(8) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(8));")"
            print #ini.main, "color white"
        end if
        if mX>case9x and mX<case9x+43 and mY>case9y and mY<case9y+43 and caseITEM(9) = 1 then
            caseUPGRADE = 14
            print #ini.main, "place 510 270 ;\"; nameITEM9$; " ";lvlITEM(9);"   "
        '    print #ini.main, "place 465 285 ;\"; lvlITEM(9)
            print #ini.main, "place 560 315 ;\"; val1ITEM(9)
                prixUPGRADE = int((val1ITEM(9)*0.87) * (lvlITEM(9)) * rareITEM(9))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(9) = 1 then valUPGRADED = val1ITEM(9) + 1
                if rareITEM(9) = 2 then valUPGRADED = val1ITEM(9) + 2
                if rareITEM(9) = 3 then valUPGRADED = val1ITEM(9) + 5
                if rareITEM(9) = 4 then valUPGRADED = val1ITEM(9) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(9));")"
            print #ini.main, "color white"
        end if
        if mX>case10x and mX<case10x+43 and mY>case10y and mY<case10y+43 and caseITEM(10) = 1 then
            caseUPGRADE = 15
            print #ini.main, "place 510 270 ;\"; nameITEM10$; " ";lvlITEM(10);"   "
      '      print #ini.main, "place 465 285 ;\"; lvlITEM(10)
            print #ini.main, "place 560 315 ;\"; val1ITEM(10)
                prixUPGRADE = int((val1ITEM(10)*0.87) * (lvlITEM(10)) * rareITEM(10))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(10) = 1 then valUPGRADED = val1ITEM(10) + 1
                if rareITEM(10) = 2 then valUPGRADED = val1ITEM(10) + 2
                if rareITEM(10) = 3 then valUPGRADED = val1ITEM(10) + 5
                if rareITEM(10) = 4 then valUPGRADED = val1ITEM(10) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(10));")"
            print #ini.main, "color white"
        end if
        if mX>case11x and mX<case11x+43 and mY>case11y and mY<case11y+43 and caseITEM(11) = 1 then
            caseUPGRADE = 16
            print #ini.main, "place 510 270 ;\"; nameITEM11$; " ";lvlITEM(11);"   "
         '   print #ini.main, "place 465 285 ;\"; lvlITEM(11)
            print #ini.main, "place 560 315 ;\"; val1ITEM(11)
                prixUPGRADE = int((val1ITEM(11)*0.87) * (lvlITEM(11)) * rareITEM(11))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(11) = 1 then valUPGRADED = val1ITEM(11) + 1
                if rareITEM(11) = 2 then valUPGRADED = val1ITEM(11) + 2
                if rareITEM(11) = 3 then valUPGRADED = val1ITEM(11) + 5
                if rareITEM(11) = 4 then valUPGRADED = val1ITEM(11) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(11));")"
            print #ini.main, "color white"
        end if
        if mX>case12x and mX<case12x+43 and mY>case12y and mY<case12y+43 and caseITEM(12) = 1 then
            caseUPGRADE = 17
            print #ini.main, "place 510 270 ;\"; nameITEM12$; " ";lvlITEM(12);"   "
       '     print #ini.main, "place 465 285 ;\"; lvlITEM(12)
            print #ini.main, "place 560 315 ;\"; val1ITEM(12)
                prixUPGRADE = int((val1ITEM(12)*0.87) * (lvlITEM(12)) * rareITEM(12))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(12) = 1 then valUPGRADED = val1ITEM(12) + 1
                if rareITEM(12) = 2 then valUPGRADED = val1ITEM(12) + 2
                if rareITEM(12) = 3 then valUPGRADED = val1ITEM(12) + 5
                if rareITEM(12) = 4 then valUPGRADED = val1ITEM(12) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(12));")"
            print #ini.main, "color white"
        end if
        if mX>case13x and mX<case13x+43 and mY>case13y and mY<case13y+43 and caseITEM(13) = 1 then
            caseUPGRADE = 18
            print #ini.main, "place 510 270 ;\"; nameITEM13$; " ";lvlITEM(13);"   "
         '   print #ini.main, "place 465 285 ;\"; lvlITEM(13)
            print #ini.main, "place 560 315 ;\"; val1ITEM(13)
                prixUPGRADE = int((val1ITEM(13)*0.87) * (lvlITEM(13)) * rareITEM(13))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(13) = 1 then valUPGRADED = val1ITEM(13) + 1
                if rareITEM(13) = 2 then valUPGRADED = val1ITEM(13) + 2
                if rareITEM(13) = 3 then valUPGRADED = val1ITEM(13) + 5
                if rareITEM(13) = 4 then valUPGRADED = val1ITEM(13) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(13));")"
            print #ini.main, "color white"
        end if
        if mX>case14x and mX<case14x+43 and mY>case14y and mY<case14y+43 and caseITEM(14) = 1 then
            caseUPGRADE = 19
            print #ini.main, "place 510 270 ;\"; nameITEM14$; " ";lvlITEM(14);"   "
          '  print #ini.main, "place 465 285 ;\"; lvlITEM(14)
            print #ini.main, "place 560 315 ;\"; val1ITEM(14)
                prixUPGRADE = int((val1ITEM(14)*0.87) * (lvlITEM(14)) * rareITEM(14))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(14) = 1 then valUPGRADED = val1ITEM(14) + 1
                if rareITEM(14) = 2 then valUPGRADED = val1ITEM(14) + 2
                if rareITEM(14) = 3 then valUPGRADED = val1ITEM(14) + 5
                if rareITEM(14) = 4 then valUPGRADED = val1ITEM(14) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(14));")"
            print #ini.main, "color white"
        end if
        if mX>case15x and mX<case15x+43 and mY>case15y and mY<case15y+43 and caseITEM(15) = 1 then
            caseUPGRADE = 20
            print #ini.main, "place 510 270 ;\"; nameITEM15$; " ";lvlITEM(15);"   "
       '     print #ini.main, "place 465 285 ;\"; lvlITEM(15)
            print #ini.main, "place 560 315 ;\"; val1ITEM(15)
                prixUPGRADE = int((val1ITEM(15)*0.87) * (lvlITEM(15)) * rareITEM(15))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(15) = 1 then valUPGRADED = val1ITEM(15) + 1
                if rareITEM(15) = 2 then valUPGRADED = val1ITEM(15) + 2
                if rareITEM(15) = 3 then valUPGRADED = val1ITEM(15) + 5
                if rareITEM(15) = 4 then valUPGRADED = val1ITEM(15) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(15));")"
            print #ini.main, "color white"
        end if
        if mX>case16x and mX<case16x+43 and mY>case16y and mY<case16y+43 and caseITEM(16) = 1 then
            caseUPGRADE = 21
            print #ini.main, "place 510 270 ;\"; nameITEM16$; " ";lvlITEM(16);"   "
         '   print #ini.main, "place 465 285 ;\"; lvlITEM(16)
            print #ini.main, "place 560 315 ;\"; val1ITEM(16)
                prixUPGRADE = int((val1ITEM(16)*0.87) * (lvlITEM(16)) * rareITEM(16))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(16) = 1 then valUPGRADED = val1ITEM(16) + 1
                if rareITEM(16) = 2 then valUPGRADED = val1ITEM(16) + 2
                if rareITEM(16) = 3 then valUPGRADED = val1ITEM(16) + 5
                if rareITEM(16) = 4 then valUPGRADED = val1ITEM(16) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(16));")"
            print #ini.main, "color white"
        end if
        if mX>case17x and mX<case17x+43 and mY>case17y and mY<case17y+43 and caseITEM(17) = 1 then
            caseUPGRADE = 22
            print #ini.main, "place 510 270 ;\"; nameITEM17$; " ";lvlITEM(17);"   "
         '   print #ini.main, "place 465 285 ;\"; lvlITEM(17)
            print #ini.main, "place 560 315 ;\"; val1ITEM(17)
                prixUPGRADE = int((val1ITEM(17)*0.87) * (lvlITEM(17)) * rareITEM(17))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(17) = 1 then valUPGRADED = val1ITEM(17) + 1
                if rareITEM(17) = 2 then valUPGRADED = val1ITEM(17) + 2
                if rareITEM(17) = 3 then valUPGRADED = val1ITEM(17) + 5
                if rareITEM(17) = 4 then valUPGRADED = val1ITEM(17) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(17));")"
            print #ini.main, "color white"
        end if
        if mX>case18x and mX<case18x+43 and mY>case18y and mY<case18y+43 and caseITEM(18) = 1 then
            caseUPGRADE = 23
            print #ini.main, "place 510 270 ;\"; nameITEM18$; " ";lvlITEM(18);"   "
         '   print #ini.main, "place 465 285 ;\"; lvlITEM(18)
            print #ini.main, "place 560 315 ;\"; val1ITEM(18)
                prixUPGRADE = int((val1ITEM(18)*0.87) * (lvlITEM(18)) * rareITEM(18))
                prixUPGRADE = int(prixUPGRADE-(talent5*5)) : if prixUPGRADE <=0 then prixUPGRADE = 1
            print #ini.main, "place 510 420 ;\"; prixUPGRADE
                if rareITEM(18) = 1 then valUPGRADED = val1ITEM(18) + 1
                if rareITEM(18) = 2 then valUPGRADED = val1ITEM(18) + 2
                if rareITEM(18) = 3 then valUPGRADED = val1ITEM(18) + 5
                if rareITEM(18) = 4 then valUPGRADED = val1ITEM(18) + 10
            print #ini.main, "color green; place 580 315 ;\"; valUPGRADED ;"(+";int(valUPGRADED-val1ITEM(18));")"
            print #ini.main, "color white"
        end if
    end if

        if version = 1 then txte1$ = "Dommages : " : txte2$ = "Armure : "
        if version = 2 then txte1$ = "Damages : " : txte2$ = "Armor : "

    if inventaire = 1 or marchands = 1 then
        if mX>case1Ex and mX<case1Ex+43 and mY>case1Ey and mY<case1Ey+43 and caseITEMequip(1) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEMequip(1) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(1) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(1) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(1) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEMequip1$
            print #ini.main, "font Courier_New 8 bold; color green;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEMequip(1); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEMequip(1); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if typeITEMequip(1) <= 5 then print #ini.main, "place 310 327 ;\"; txte1$;VequipITEM(1)
            if typeITEMequip(1) > 5 then print #ini.main, "place 310 327 ;\"; txte2$;VequipITEM(1)
            if version = 1 and CCequipITEM(1) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";CCequipITEM(1);" Dégâts critique"
            if version = 2 and CCequipITEM(1) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";CCequipITEM(1);" Critical damage"
            wait
        end if
        if mX>case2Ex and mX<case2Ex+43 and mY>case2Ey and mY<case2Ey+43 and caseITEMequip(2) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEMequip(2) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(2) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(2) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(2) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEMequip2$
            print #ini.main, "font Courier_New 8 bold; color green;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEMequip(2); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEMequip(2); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if typeITEMequip(2) <= 5 then print #ini.main, "place 310 327 ;\"; txte1$;VequipITEM(2)
            if typeITEMequip(2) > 5 then print #ini.main, "place 310 327 ;\"; txte2$;VequipITEM(2)
            if version = 1 and VIEequipITEM(2) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(2);" pv"
            if version = 2 and VIEequipITEM(2) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(2);" hp"
            wait
        end if
        if mX>case3Ex and mX<case3Ex+43 and mY>case3Ey and mY<case3Ey+43 and caseITEMequip(3) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEMequip(3) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(3) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(3) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(3) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEMequip3$
            print #ini.main, "font Courier_New 8 bold; color green;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEMequip(3); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEMequip(3); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if typeITEMequip(3) <= 5 then print #ini.main, "place 310 327 ;\"; txte1$;VequipITEM(3)
            if typeITEMequip(3) > 5 then print #ini.main, "place 310 327 ;\"; txte2$;VequipITEM(3)
            if version = 1 and VIEequipITEM(3) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(3);" pv"
            if version = 2 and VIEequipITEM(3) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(3);" hp"
            wait
        end if
        if mX>case4Ex and mX<case4Ex+43 and mY>case4Ey and mY<case4Ey+43 and caseITEMequip(4) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEMequip(4) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(4) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(4) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(4) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEMequip4$
            print #ini.main, "font Courier_New 8 bold; color green;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEMequip(4); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEMequip(4); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if typeITEMequip(4) <= 5 then print #ini.main, "place 310 327 ;\"; txte1$;VequipITEM(4)
            if typeITEMequip(4) > 5 then print #ini.main, "place 310 327 ;\"; txte2$;VequipITEM(4)
            if version = 1 and VIEequipITEM(4) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(4);" pv"
            if version = 2 and VIEequipITEM(4) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(4);" hp"
            wait
        end if
        if mX>case5Ex and mX<case5Ex+43 and mY>case5Ey and mY<case5Ey+43 and caseITEMequip(5) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEMequip(5) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(5) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(5) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEMequip(5) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEMequip5$
            print #ini.main, "font Courier_New 8 bold; color green;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEMequip(5); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEMequip(5); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if typeITEMequip(5) <= 5 then print #ini.main, "place 310 327 ;\"; txte1$;VequipITEM(5)
            if typeITEMequip(5) > 5 then print #ini.main, "place 310 327 ;\"; txte2$;VequipITEM(5)
            if version = 1 and VIEequipITEM(5) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(5);" pv"
            if version = 2 and VIEequipITEM(5) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus : \+ ";VIEequipITEM(5);" hp"
            wait
        end if

          ' typeITEM(6) = 1 then nameITEM6$ = epee4$ 
          ' typeITEM(6) = 2 then nameITEM6$ = arc4$ 
          ' typeITEM(6) = 3 then nameITEM6$ = lance4$
          ' typeITEM(6) = 4 then nameITEM6$ = hache4$ 
          ' typeITEM(6) = 5 then nameITEM6$ = marteau4$ 
          ' typeITEM(6) = 6 then nameITEM6$ = bouclier4$ 
          ' typeITEM(6) = 7 then nameITEM6$ = armure4$ 
          ' typeITEM(6) = 8 then nameITEM6$ = chausses4$ 
          ' typeITEM(6) = 9 then nameITEM6$ = casque4$ 

          'VequipITEM(1) : arme
          'VequipITEM(2) : armure
          'VequipITEM(3) : casque
          'VequipITEM(4) : botes
          'VequipITEM(5) : bouclier

        if mX>case1x and mX<case1x+43 and mY>case1y and mY<case1y+43 and caseITEM(1) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(1) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(1) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(1) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(1) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM1$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(1); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(1); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(1) <= 5 and val1ITEM(1) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(1); " (- ";int(VequipITEM(1)-val1ITEM(1));")"
                if typeITEM(1) <= 5 and val1ITEM(1) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(1); " (+ ";int(val1ITEM(1)-VequipITEM(1));")"
                if typeITEM(1) = 6 and val1ITEM(1) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(1); " (- ";int(VequipITEM(5)-val1ITEM(1));")"
                if typeITEM(1) = 6 and val1ITEM(1) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(1); " (+ ";int(val1ITEM(1)-VequipITEM(5));")"
                if typeITEM(1) = 7 and val1ITEM(1) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(1); " (- ";int(VequipITEM(2)-val1ITEM(1));")"
                if typeITEM(1) = 7 and val1ITEM(1) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(1); " (+ ";int(val1ITEM(1)-VequipITEM(2));")"
                if typeITEM(1) = 8 and val1ITEM(1) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(1); " (- ";int(VequipITEM(4)-val1ITEM(1));")"
                if typeITEM(1) = 8 and val1ITEM(1) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(1); " (+ ";int(val1ITEM(1)-VequipITEM(4));")"
                if typeITEM(1) = 9 and val1ITEM(1) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(1); " (- ";int(VequipITEM(3)-val1ITEM(1));")"
                if typeITEM(1) = 9 and val1ITEM(1) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(1); " (+ ";int(val1ITEM(1)-VequipITEM(3));")"
            if version = 1 and vieITEM(1) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(1);" pv"
            if version = 2 and vieITEM(1) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(1);" hp"
            wait
        end if
        if mX>case2x and mX<case2x+43 and mY>case2y and mY<case2y+43 and caseITEM(2) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(2) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(2) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(2) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(2) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM2$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(2); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(2); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(2) <= 5 and val1ITEM(2) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(2); " (- ";int(VequipITEM(1)-val1ITEM(2));")"
                if typeITEM(2) <= 5 and val1ITEM(2) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(2); " (+ ";int(val1ITEM(2)-VequipITEM(1));")"
                if typeITEM(2) = 6 and val1ITEM(2) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(2); " (- ";int(VequipITEM(5)-val1ITEM(2));")"
                if typeITEM(2) = 6 and val1ITEM(2) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(2); " (+ ";int(val1ITEM(2)-VequipITEM(5));")"
                if typeITEM(2) = 7 and val1ITEM(2) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(2); " (- ";int(VequipITEM(2)-val1ITEM(2));")"
                if typeITEM(2) = 7 and val1ITEM(2) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(2); " (+ ";int(val1ITEM(2)-VequipITEM(2));")"
                if typeITEM(2) = 8 and val1ITEM(2) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(2); " (- ";int(VequipITEM(4)-val1ITEM(2));")"
                if typeITEM(2) = 8 and val1ITEM(2) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(2); " (+ ";int(val1ITEM(2)-VequipITEM(4));")"
                if typeITEM(2) = 9 and val1ITEM(2) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(2); " (- ";int(VequipITEM(3)-val1ITEM(2));")"
                if typeITEM(2) = 9 and val1ITEM(2) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(2); " (+ ";int(val1ITEM(2)-VequipITEM(3));")"
            if version = 1 and vieITEM(2) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(2);" pv"
            if version = 2 and vieITEM(2) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(2);" hp"
            wait
        end if
        if mX>case3x and mX<case3x+43 and mY>case3y and mY<case3y+43 and caseITEM(3) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(3) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(3) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(3) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(3) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM3$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(3); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(3); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(3) <= 5 and val1ITEM(3) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(3); " (- ";int(VequipITEM(1)-val1ITEM(3));")"
                if typeITEM(3) <= 5 and val1ITEM(3) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(3); " (+ ";int(val1ITEM(3)-VequipITEM(1));")"
                if typeITEM(3) = 6 and val1ITEM(3) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(3); " (- ";int(VequipITEM(5)-val1ITEM(3));")"
                if typeITEM(3) = 6 and val1ITEM(3) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(3); " (+ ";int(val1ITEM(3)-VequipITEM(5));")"
                if typeITEM(3) = 7 and val1ITEM(3) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(3); " (- ";int(VequipITEM(2)-val1ITEM(3));")"
                if typeITEM(3) = 7 and val1ITEM(3) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(3); " (+ ";int(val1ITEM(3)-VequipITEM(2));")"
                if typeITEM(3) = 8 and val1ITEM(3) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(3); " (- ";int(VequipITEM(4)-val1ITEM(3));")"
                if typeITEM(3) = 8 and val1ITEM(3) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(3); " (+ ";int(val1ITEM(3)-VequipITEM(4));")"
                if typeITEM(3) = 9 and val1ITEM(3) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(3); " (- ";int(VequipITEM(3)-val1ITEM(3));")"
                if typeITEM(3) = 9 and val1ITEM(3) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(3); " (+ ";int(val1ITEM(3)-VequipITEM(3));")"
            if version = 1 and vieITEM(3) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(3);" pv"
            if version = 2 and vieITEM(3) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(3);" hp"
            wait
        end if
        if mX>case4x and mX<case4x+43 and mY>case4y and mY<case4y+43 and caseITEM(4) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(4) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(4) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(4) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(4) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM4$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(4); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(4); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(4) <= 5 and val1ITEM(4) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(4); " (- ";int(VequipITEM(1)-val1ITEM(4));")"
                if typeITEM(4) <= 5 and val1ITEM(4) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(4); " (+ ";int(val1ITEM(4)-VequipITEM(1));")"
                if typeITEM(4) = 6 and val1ITEM(4) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(4); " (- ";int(VequipITEM(5)-val1ITEM(4));")"
                if typeITEM(4) = 6 and val1ITEM(4) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(4); " (+ ";int(val1ITEM(4)-VequipITEM(5));")"
                if typeITEM(4) = 7 and val1ITEM(4) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(4); " (- ";int(VequipITEM(2)-val1ITEM(4));")"
                if typeITEM(4) = 7 and val1ITEM(4) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(4); " (+ ";int(val1ITEM(4)-VequipITEM(2));")"
                if typeITEM(4) = 8 and val1ITEM(4) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(4); " (- ";int(VequipITEM(4)-val1ITEM(4));")"
                if typeITEM(4) = 8 and val1ITEM(4) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(4); " (+ ";int(val1ITEM(4)-VequipITEM(4));")"
                if typeITEM(4) = 9 and val1ITEM(4) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(4); " (- ";int(VequipITEM(3)-val1ITEM(4));")"
                if typeITEM(4) = 9 and val1ITEM(4) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(4); " (+ ";int(val1ITEM(4)-VequipITEM(3));")"
            if version = 1 and vieITEM(4) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(4);" pv"
            if version = 2 and vieITEM(4) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(4);" hp"
            wait
        end if
        if mX>case5x and mX<case5x+43 and mY>case5y and mY<case5y+43 and caseITEM(5) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(5) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(5) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(5) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(5) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM5$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(5); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(5); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(5) <= 5 and val1ITEM(5) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(5); " (- ";int(VequipITEM(1)-val1ITEM(5));")"
                if typeITEM(5) <= 5 and val1ITEM(5) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(5); " (+ ";int(val1ITEM(5)-VequipITEM(1));")"
                if typeITEM(5) = 6 and val1ITEM(5) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(5); " (- ";int(VequipITEM(5)-val1ITEM(5));")"
                if typeITEM(5) = 6 and val1ITEM(5) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(5); " (+ ";int(val1ITEM(5)-VequipITEM(5));")"
                if typeITEM(5) = 7 and val1ITEM(5) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(5); " (- ";int(VequipITEM(2)-val1ITEM(5));")"
                if typeITEM(5) = 7 and val1ITEM(5) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(5); " (+ ";int(val1ITEM(5)-VequipITEM(2));")"
                if typeITEM(5) = 8 and val1ITEM(5) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(5); " (- ";int(VequipITEM(4)-val1ITEM(5));")"
                if typeITEM(5) = 8 and val1ITEM(5) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(5); " (+ ";int(val1ITEM(5)-VequipITEM(4));")"
                if typeITEM(5) = 9 and val1ITEM(5) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(5); " (- ";int(VequipITEM(3)-val1ITEM(5));")"
                if typeITEM(5) = 9 and val1ITEM(5) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(5); " (+ ";int(val1ITEM(5)-VequipITEM(3));")"
            if version = 1 and vieITEM(5) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(5);" pv"
            if version = 2 and vieITEM(5) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(5);" hp"
            wait
        end if
        if mX>case6x and mX<case6x+43 and mY>case6y and mY<case6y+43 and caseITEM(6) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(6) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(6) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(6) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(6) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM6$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(6); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(6); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(6) <= 5 and val1ITEM(6) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(6); " (- ";int(VequipITEM(1)-val1ITEM(6));")"
                if typeITEM(6) <= 5 and val1ITEM(6) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(6); " (+ ";int(val1ITEM(6)-VequipITEM(1));")"
                if typeITEM(6) = 6 and val1ITEM(6) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(6); " (- ";int(VequipITEM(5)-val1ITEM(6));")"
                if typeITEM(6) = 6 and val1ITEM(6) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(6); " (+ ";int(val1ITEM(6)-VequipITEM(5));")"
                if typeITEM(6) = 7 and val1ITEM(6) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(6); " (- ";int(VequipITEM(2)-val1ITEM(6));")"
                if typeITEM(6) = 7 and val1ITEM(6) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(6); " (+ ";int(val1ITEM(6)-VequipITEM(2));")"
                if typeITEM(6) = 8 and val1ITEM(6) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(6); " (- ";int(VequipITEM(4)-val1ITEM(6));")"
                if typeITEM(6) = 8 and val1ITEM(6) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(6); " (+ ";int(val1ITEM(6)-VequipITEM(4));")"
                if typeITEM(6) = 9 and val1ITEM(6) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(6); " (- ";int(VequipITEM(3)-val1ITEM(6));")"
                if typeITEM(6) = 9 and val1ITEM(6) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(6); " (+ ";int(val1ITEM(6)-VequipITEM(3));")"
            if version = 1 and vieITEM(6) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(6);" pv"
            if version = 2 and vieITEM(6) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(6);" hp"
            wait
        end if
        if mX>case7x and mX<case7x+43 and mY>case7y and mY<case7y+43 and caseITEM(7) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(7) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(7) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(7) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(7) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM7$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(7); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(7); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(7) <= 5 and val1ITEM(7) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(7); " (- ";int(VequipITEM(1)-val1ITEM(7));")"
                if typeITEM(7) <= 5 and val1ITEM(7) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(7); " (+ ";int(val1ITEM(7)-VequipITEM(1));")"
                if typeITEM(7) = 6 and val1ITEM(7) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(7); " (- ";int(VequipITEM(5)-val1ITEM(7));")"
                if typeITEM(7) = 6 and val1ITEM(7) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(7); " (+ ";int(val1ITEM(7)-VequipITEM(5));")"
                if typeITEM(7) = 7 and val1ITEM(7) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(7); " (- ";int(VequipITEM(2)-val1ITEM(7));")"
                if typeITEM(7) = 7 and val1ITEM(7) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(7); " (+ ";int(val1ITEM(7)-VequipITEM(2));")"
                if typeITEM(7) = 8 and val1ITEM(7) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(7); " (- ";int(VequipITEM(4)-val1ITEM(7));")"
                if typeITEM(7) = 8 and val1ITEM(7) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(7); " (+ ";int(val1ITEM(7)-VequipITEM(4));")"
                if typeITEM(7) = 9 and val1ITEM(7) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(7); " (- ";int(VequipITEM(3)-val1ITEM(7));")"
                if typeITEM(7) = 9 and val1ITEM(7) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(7); " (+ ";int(val1ITEM(7)-VequipITEM(3));")"
            if version = 1 and vieITEM(7) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(7);" pv"
            if version = 2 and vieITEM(7) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(7);" hp"
            wait
        end if
        if mX>case8x and mX<case8x+43 and mY>case8y and mY<case8y+43 and caseITEM(8) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(8) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(8) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(8) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(8) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM8$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(8); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(8); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(8) <= 5 and val1ITEM(8) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(8); " (- ";int(VequipITEM(1)-val1ITEM(8));")"
                if typeITEM(8) <= 5 and val1ITEM(8) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(8); " (+ ";int(val1ITEM(8)-VequipITEM(1));")"
                if typeITEM(8) = 6 and val1ITEM(8) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(8); " (- ";int(VequipITEM(5)-val1ITEM(8));")"
                if typeITEM(8) = 6 and val1ITEM(8) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(8); " (+ ";int(val1ITEM(8)-VequipITEM(5));")"
                if typeITEM(8) = 7 and val1ITEM(8) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(8); " (- ";int(VequipITEM(2)-val1ITEM(8));")"
                if typeITEM(8) = 7 and val1ITEM(8) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(8); " (+ ";int(val1ITEM(8)-VequipITEM(2));")"
                if typeITEM(8) = 8 and val1ITEM(8) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(8); " (- ";int(VequipITEM(4)-val1ITEM(8));")"
                if typeITEM(8) = 8 and val1ITEM(8) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(8); " (+ ";int(val1ITEM(8)-VequipITEM(4));")"
                if typeITEM(8) = 9 and val1ITEM(8) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(8); " (- ";int(VequipITEM(3)-val1ITEM(8));")"
                if typeITEM(8) = 9 and val1ITEM(8) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(8); " (+ ";int(val1ITEM(8)-VequipITEM(3));")"
            if version = 1 and vieITEM(8) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(8);" pv"
            if version = 2 and vieITEM(8) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(8);" hp"
            wait
        end if
        if mX>case9x and mX<case9x+43 and mY>case9y and mY<case9y+43 and caseITEM(9) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(9) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(9) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(9) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(9) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM9$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(9); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(9); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(9) <= 5 and val1ITEM(9) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(9); " (- ";int(VequipITEM(1)-val1ITEM(9));")"
                if typeITEM(9) <= 5 and val1ITEM(9) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(9); " (+ ";int(val1ITEM(9)-VequipITEM(1));")"
                if typeITEM(9) = 6 and val1ITEM(9) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(9); " (- ";int(VequipITEM(5)-val1ITEM(9));")"
                if typeITEM(9) = 6 and val1ITEM(9) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(9); " (+ ";int(val1ITEM(9)-VequipITEM(5));")"
                if typeITEM(9) = 7 and val1ITEM(9) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(9); " (- ";int(VequipITEM(2)-val1ITEM(9));")"
                if typeITEM(9) = 7 and val1ITEM(9) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(9); " (+ ";int(val1ITEM(9)-VequipITEM(2));")"
                if typeITEM(9) = 8 and val1ITEM(9) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(9); " (- ";int(VequipITEM(4)-val1ITEM(9));")"
                if typeITEM(9) = 8 and val1ITEM(9) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(9); " (+ ";int(val1ITEM(9)-VequipITEM(4));")"
                if typeITEM(9) = 9 and val1ITEM(9) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(9); " (- ";int(VequipITEM(3)-val1ITEM(9));")"
                if typeITEM(9) = 9 and val1ITEM(9) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(9); " (+ ";int(val1ITEM(9)-VequipITEM(3));")"
            if version = 1 and vieITEM(9) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(9);" pv"
            if version = 2 and vieITEM(9) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(9);" hp"
            wait
        end if
        if mX>case10x and mX<case10x+43 and mY>case10y and mY<case10y+43 and caseITEM(10) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(10) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(10) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(10) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(10) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM10$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(10); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(10); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(10) <= 5 and val1ITEM(10) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(10); " (- ";int(VequipITEM(1)-val1ITEM(10));")"
                if typeITEM(10) <= 5 and val1ITEM(10) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(10); " (+ ";int(val1ITEM(10)-VequipITEM(1));")"
                if typeITEM(10) = 6 and val1ITEM(10) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(10); " (- ";int(VequipITEM(5)-val1ITEM(10));")"
                if typeITEM(10) = 6 and val1ITEM(10) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(10); " (+ ";int(val1ITEM(10)-VequipITEM(5));")"
                if typeITEM(10) = 7 and val1ITEM(10) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(10); " (- ";int(VequipITEM(2)-val1ITEM(10));")"
                if typeITEM(10) = 7 and val1ITEM(10) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(10); " (+ ";int(val1ITEM(10)-VequipITEM(2));")"
                if typeITEM(10) = 8 and val1ITEM(10) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(10); " (- ";int(VequipITEM(4)-val1ITEM(10));")"
                if typeITEM(10) = 8 and val1ITEM(10) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(10); " (+ ";int(val1ITEM(10)-VequipITEM(4));")"
                if typeITEM(10) = 9 and val1ITEM(10) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(10); " (- ";int(VequipITEM(3)-val1ITEM(10));")"
                if typeITEM(10) = 9 and val1ITEM(10) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(10); " (+ ";int(val1ITEM(10)-VequipITEM(3));")"
            if version = 1 and vieITEM(10) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(10);" pv"
            if version = 2 and vieITEM(10) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(10);" hp"
            wait
        end if
        if mX>case11x and mX<case11x+43 and mY>case11y and mY<case11y+43 and caseITEM(11) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(11) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(11) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(11) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(11) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM11$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(11); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(11); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(11) <= 5 and val1ITEM(11) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(11); " (- ";int(VequipITEM(1)-val1ITEM(11));")"
                if typeITEM(11) <= 5 and val1ITEM(11) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(11); " (+ ";int(val1ITEM(11)-VequipITEM(1));")"
                if typeITEM(11) = 6 and val1ITEM(11) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(11); " (- ";int(VequipITEM(5)-val1ITEM(11));")"
                if typeITEM(11) = 6 and val1ITEM(11) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(11); " (+ ";int(val1ITEM(11)-VequipITEM(5));")"
                if typeITEM(11) = 7 and val1ITEM(11) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(11); " (- ";int(VequipITEM(2)-val1ITEM(11));")"
                if typeITEM(11) = 7 and val1ITEM(11) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(11); " (+ ";int(val1ITEM(11)-VequipITEM(2));")"
                if typeITEM(11) = 8 and val1ITEM(11) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(11); " (- ";int(VequipITEM(4)-val1ITEM(11));")"
                if typeITEM(11) = 8 and val1ITEM(11) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(11); " (+ ";int(val1ITEM(11)-VequipITEM(4));")"
                if typeITEM(11) = 9 and val1ITEM(11) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(11); " (- ";int(VequipITEM(3)-val1ITEM(11));")"
                if typeITEM(11) = 9 and val1ITEM(11) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(11); " (+ ";int(val1ITEM(11)-VequipITEM(3));")"
            if version = 1 and vieITEM(11) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(11);" pv"
            if version = 2 and vieITEM(11) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(11);" hp"
            wait
        end if
        if mX>case12x and mX<case12x+43 and mY>case12y and mY<case12y+43 and caseITEM(12) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(12) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(12) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(12) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(12) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM12$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(12); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(12); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(12) <= 5 and val1ITEM(12) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(12); " (- ";int(VequipITEM(1)-val1ITEM(12));")"
                if typeITEM(12) <= 5 and val1ITEM(12) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(12); " (+ ";int(val1ITEM(12)-VequipITEM(1));")"
                if typeITEM(12) = 6 and val1ITEM(12) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(12); " (- ";int(VequipITEM(5)-val1ITEM(12));")"
                if typeITEM(12) = 6 and val1ITEM(12) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(12); " (+ ";int(val1ITEM(12)-VequipITEM(5));")"
                if typeITEM(12) = 7 and val1ITEM(12) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(12); " (- ";int(VequipITEM(2)-val1ITEM(12));")"
                if typeITEM(12) = 7 and val1ITEM(12) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(12); " (+ ";int(val1ITEM(12)-VequipITEM(2));")"
                if typeITEM(12) = 8 and val1ITEM(12) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(12); " (- ";int(VequipITEM(4)-val1ITEM(12));")"
                if typeITEM(12) = 8 and val1ITEM(12) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(12); " (+ ";int(val1ITEM(12)-VequipITEM(4));")"
                if typeITEM(12) = 9 and val1ITEM(12) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(12); " (- ";int(VequipITEM(3)-val1ITEM(12));")"
                if typeITEM(12) = 9 and val1ITEM(12) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(12); " (+ ";int(val1ITEM(12)-VequipITEM(3));")"
            if version = 1 and vieITEM(12) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(12);" pv"
            if version = 2 and vieITEM(12) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(12);" hp"
            wait
        end if
        if mX>case13x and mX<case13x+43 and mY>case13y and mY<case13y+43 and caseITEM(13) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(13) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(13) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(13) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(13) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM13$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(13); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(13); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(13) <= 5 and val1ITEM(13) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(13); " (- ";int(VequipITEM(1)-val1ITEM(13));")"
                if typeITEM(13) <= 5 and val1ITEM(13) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(13); " (+ ";int(val1ITEM(13)-VequipITEM(1));")"
                if typeITEM(13) = 6 and val1ITEM(13) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(13); " (- ";int(VequipITEM(5)-val1ITEM(13));")"
                if typeITEM(13) = 6 and val1ITEM(13) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(13); " (+ ";int(val1ITEM(13)-VequipITEM(5));")"
                if typeITEM(13) = 7 and val1ITEM(13) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(13); " (- ";int(VequipITEM(2)-val1ITEM(13));")"
                if typeITEM(13) = 7 and val1ITEM(13) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(13); " (+ ";int(val1ITEM(13)-VequipITEM(2));")"
                if typeITEM(13) = 8 and val1ITEM(13) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(13); " (- ";int(VequipITEM(4)-val1ITEM(13));")"
                if typeITEM(13) = 8 and val1ITEM(13) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(13); " (+ ";int(val1ITEM(13)-VequipITEM(4));")"
                if typeITEM(13) = 9 and val1ITEM(13) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(13); " (- ";int(VequipITEM(3)-val1ITEM(13));")"
                if typeITEM(13) = 9 and val1ITEM(13) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(13); " (+ ";int(val1ITEM(13)-VequipITEM(3));")"
            if version = 1 and vieITEM(13) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(13);" pv"
            if version = 2 and vieITEM(13) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(13);" hp"
            wait
        end if
        if mX>case14x and mX<case14x+43 and mY>case14y and mY<case14y+43 and caseITEM(14) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(14) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(14) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(14) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(14) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM14$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(14); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(14); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(14) <= 5 and val1ITEM(14) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(14); " (- ";int(VequipITEM(1)-val1ITEM(14));")"
                if typeITEM(14) <= 5 and val1ITEM(14) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(14); " (+ ";int(val1ITEM(14)-VequipITEM(1));")"
                if typeITEM(14) = 6 and val1ITEM(14) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(14); " (- ";int(VequipITEM(5)-val1ITEM(14));")"
                if typeITEM(14) = 6 and val1ITEM(14) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(14); " (+ ";int(val1ITEM(14)-VequipITEM(5));")"
                if typeITEM(14) = 7 and val1ITEM(14) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(14); " (- ";int(VequipITEM(2)-val1ITEM(14));")"
                if typeITEM(14) = 7 and val1ITEM(14) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(14); " (+ ";int(val1ITEM(14)-VequipITEM(2));")"
                if typeITEM(14) = 8 and val1ITEM(14) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(14); " (- ";int(VequipITEM(4)-val1ITEM(14));")"
                if typeITEM(14) = 8 and val1ITEM(14) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(14); " (+ ";int(val1ITEM(14)-VequipITEM(4));")"
                if typeITEM(14) = 9 and val1ITEM(14) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(14); " (- ";int(VequipITEM(3)-val1ITEM(14));")"
                if typeITEM(14) = 9 and val1ITEM(14) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(14); " (+ ";int(val1ITEM(14)-VequipITEM(3));")"
            if version = 1 and vieITEM(14) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(14);" pv"
            if version = 2 and vieITEM(14) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(14);" hp"
            wait
        end if
        if mX>case15x and mX<case15x+43 and mY>case15y and mY<case15y+43 and caseITEM(15) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(15) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(15) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(15) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(15) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM15$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(15); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(15); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(15) <= 5 and val1ITEM(15) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(15); " (- ";int(VequipITEM(1)-val1ITEM(15));")"
                if typeITEM(15) <= 5 and val1ITEM(15) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(15); " (+ ";int(val1ITEM(15)-VequipITEM(1));")"
                if typeITEM(15) = 6 and val1ITEM(15) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(15); " (- ";int(VequipITEM(5)-val1ITEM(15));")"
                if typeITEM(15) = 6 and val1ITEM(15) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(15); " (+ ";int(val1ITEM(15)-VequipITEM(5));")"
                if typeITEM(15) = 7 and val1ITEM(15) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(15); " (- ";int(VequipITEM(2)-val1ITEM(15));")"
                if typeITEM(15) = 7 and val1ITEM(15) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(15); " (+ ";int(val1ITEM(15)-VequipITEM(2));")"
                if typeITEM(15) = 8 and val1ITEM(15) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(15); " (- ";int(VequipITEM(4)-val1ITEM(15));")"
                if typeITEM(15) = 8 and val1ITEM(15) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(15); " (+ ";int(val1ITEM(15)-VequipITEM(4));")"
                if typeITEM(15) = 9 and val1ITEM(15) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(15); " (- ";int(VequipITEM(3)-val1ITEM(15));")"
                if typeITEM(15) = 9 and val1ITEM(15) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(15); " (+ ";int(val1ITEM(15)-VequipITEM(3));")"
            if version = 1 and vieITEM(15) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(15);" pv"
            if version = 2 and vieITEM(15) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(15);" hp"
            wait
        end if
        if mX>case16x and mX<case16x+43 and mY>case16y and mY<case16y+43 and caseITEM(16) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(16) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(16) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(16) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(16) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM16$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(16); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(16); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(16) <= 5 and val1ITEM(16) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(16); " (- ";int(VequipITEM(1)-val1ITEM(16));")"
                if typeITEM(16) <= 5 and val1ITEM(16) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(16); " (+ ";int(val1ITEM(16)-VequipITEM(1));")"
                if typeITEM(16) = 6 and val1ITEM(16) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(16); " (- ";int(VequipITEM(5)-val1ITEM(16));")"
                if typeITEM(16) = 6 and val1ITEM(16) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(16); " (+ ";int(val1ITEM(16)-VequipITEM(5));")"
                if typeITEM(16) = 7 and val1ITEM(16) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(16); " (- ";int(VequipITEM(2)-val1ITEM(16));")"
                if typeITEM(16) = 7 and val1ITEM(16) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(16); " (+ ";int(val1ITEM(16)-VequipITEM(2));")"
                if typeITEM(16) = 8 and val1ITEM(16) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(16); " (- ";int(VequipITEM(4)-val1ITEM(16));")"
                if typeITEM(16) = 8 and val1ITEM(16) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(16); " (+ ";int(val1ITEM(16)-VequipITEM(4));")"
                if typeITEM(16) = 9 and val1ITEM(16) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(16); " (- ";int(VequipITEM(3)-val1ITEM(16));")"
                if typeITEM(16) = 9 and val1ITEM(16) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(16); " (+ ";int(val1ITEM(16)-VequipITEM(3));")"
            if version = 1 and vieITEM(16) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(16);" pv"
            if version = 2 and vieITEM(16) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(16);" hp"
            wait
        end if
        if mX>case17x and mX<case17x+43 and mY>case17y and mY<case17y+43 and caseITEM(17) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(17) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(17) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(17) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(17) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM17$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(17); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(17); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(17) <= 5 and val1ITEM(17) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(17); " (- ";int(VequipITEM(1)-val1ITEM(17));")"
                if typeITEM(17) <= 5 and val1ITEM(17) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(17); " (+ ";int(val1ITEM(17)-VequipITEM(1));")"
                if typeITEM(17) = 6 and val1ITEM(17) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(17); " (- ";int(VequipITEM(5)-val1ITEM(17));")"
                if typeITEM(17) = 6 and val1ITEM(17) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(17); " (+ ";int(val1ITEM(17)-VequipITEM(5));")"
                if typeITEM(17) = 7 and val1ITEM(17) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(17); " (- ";int(VequipITEM(2)-val1ITEM(17));")"
                if typeITEM(17) = 7 and val1ITEM(17) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(17); " (+ ";int(val1ITEM(17)-VequipITEM(2));")"
                if typeITEM(17) = 8 and val1ITEM(17) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(17); " (- ";int(VequipITEM(4)-val1ITEM(17));")"
                if typeITEM(17) = 8 and val1ITEM(17) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(17); " (+ ";int(val1ITEM(17)-VequipITEM(4));")"
                if typeITEM(17) = 9 and val1ITEM(17) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(17); " (- ";int(VequipITEM(3)-val1ITEM(17));")"
                if typeITEM(17) = 9 and val1ITEM(17) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(17); " (+ ";int(val1ITEM(17)-VequipITEM(3));")"
            if version = 1 and vieITEM(17) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(17);" pv"
            if version = 2 and vieITEM(17) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(17);" hp"
            wait
        end if
        if mX>case18x and mX<case18x+43 and mY>case18y and mY<case18y+43 and caseITEM(18) = 1 then
            print #ini.main, "drawbmp rare2 290 250"
            if rareITEM(18) = 1 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";255;" ";255;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(18) = 2 then print #ini.main, "font Courier_New 8 bold; color ";0;" ";162;" ";232;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(18) = 3 then print #ini.main, "font Courier_New 8 bold; color ";63;" ";72;" ";204;" ;backcolor ";52;" ";47;" ";39
            if rareITEM(18) = 4 then print #ini.main, "font Courier_New 8 bold; color ";255;" ";201;" ";14;" ;backcolor ";52;" ";47;" ";39
            print #ini.main, "place 310 280 ;\"; nameITEM18$
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
            if version = 1 then print #ini.main, "place 310 295 ;\"; "Niveau ";lvlITEM(18); "  "
            if version = 2 then print #ini.main, "place 310 295 ;\"; "Level ";lvlITEM(18); "  "
            print #ini.main, "font Courier_New 8 bold; color lightgray;backcolor ";52;" ";47;" ";39
                if typeITEM(18) <= 5 and val1ITEM(18) <= VequipITEM(1) then print #ini.main, "color red; place 310 327 ;\"; txte1$;val1ITEM(18); " (- ";int(VequipITEM(1)-val1ITEM(18));")"
                if typeITEM(18) <= 5 and val1ITEM(18) > VequipITEM(1) then print #ini.main, "color green; place 310 327 ;\"; txte1$;val1ITEM(18); " (+ ";int(val1ITEM(18)-VequipITEM(1));")"
                if typeITEM(18) = 6 and val1ITEM(18) <= VequipITEM(5) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(18); " (- ";int(VequipITEM(5)-val1ITEM(18));")"
                if typeITEM(18) = 6 and val1ITEM(18) > VequipITEM(5) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(18); " (+ ";int(val1ITEM(18)-VequipITEM(5));")"
                if typeITEM(18) = 7 and val1ITEM(18) <= VequipITEM(2) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(18); " (- ";int(VequipITEM(2)-val1ITEM(18));")"
                if typeITEM(18) = 7 and val1ITEM(18) > VequipITEM(2) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(18); " (+ ";int(val1ITEM(18)-VequipITEM(2));")"
                if typeITEM(18) = 8 and val1ITEM(18) <= VequipITEM(4) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(18); " (- ";int(VequipITEM(4)-val1ITEM(18));")"
                if typeITEM(18) = 8 and val1ITEM(18) > VequipITEM(4) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(18); " (+ ";int(val1ITEM(18)-VequipITEM(4));")"
                if typeITEM(18) = 9 and val1ITEM(18) <= VequipITEM(3) then print #ini.main, "color red; place 310 327 ;\"; txte2$;val1ITEM(18); " (- ";int(VequipITEM(3)-val1ITEM(18));")"
                if typeITEM(18) = 9 and val1ITEM(18) > VequipITEM(3) then print #ini.main, "color green; place 310 327 ;\"; txte2$;val1ITEM(18); " (+ ";int(val1ITEM(18)-VequipITEM(3));")"
            if version = 1 and vieITEM(18) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(18);" pv"
            if version = 2 and vieITEM(18) >0 then print #ini.main, "color lightgray; place 310 375 ;\"; "Bonus \+ ";vieITEM(18);" hp"
            wait
        end if
        if inventaire = 1 and (mX<35 or mX>150 or mY<30 or mY>75) then goto [inventaireREFRESH]
        if marchands = 1 and (mX<35 or mX>150 or mY<30 or mY>75) then goto [marchandsREFRESH]
    end if

    if WorldMAP = 1 then WorldMAP = 0 : #ini.main "removesprite back" : goto [world]

    if inventaire = 2 and mX<110 and mY<60 then goto [inventaire]
    if inventaire < 2 and mX>35 and mX<150 and mY>30 and mY<75 then #ini.main "removesprite back" : goto [INITIAL]
    wait


    [inventaire]
    inventaire = 1 : forgeron = 0 : marchands = 0
    case1Ex = 127 : case1Ey = 219 'arme1
    case2Ex = 183 : case2Ey = 189 ' armure
    case3Ex = 183 : case3Ey = 133 'casque
    case4Ex = 183 : case4Ey = 317 'bottes
    case5Ex = 238 : case5Ey = 219 'bouclier

    case1x = 76 : case1y = 448
    case2x = 119 : case2y = 448
    case3x = 162 : case3y = 448
    case4x = 205 : case4y = 448
    case5x = 248 : case5y = 448
    case6x = 291 : case6y = 448
    case7x = 76 : case7y = 491
    case8x = 119 : case8y = 491
    case9x = 162 : case9y = 491
    case10x = 205 : case10y = 491
    case11x = 248 : case11y = 491
    case12x = 291 : case12y = 491
    case13x = 76 : case13y = 534
    case14x = 119 : case14y = 534
    case15x = 162 : case15y = 534
    case16x = 205 : case16y = 534
    case17x = 248 : case17y = 534
    case18x = 291 : case18y = 534

    print #ini.main, "down; fill white"
    [inventaireREFRESH]

    print #ini.main, "drawbmp screen 0 0; background screen"
    if version = 1 then #ini.main "addsprite back back; spriteXY back 35 30; spritevisible back on"
    if version = 2 then #ini.main "addsprite back back2; spriteXY back 35 30; spritevisible back on"
    #ini.main "drawsprites"

' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _OPAQUE As long,_  'flag for transparent background
        result As long          'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    if TypePerso = 1 then print #ini.main, "drawbmp inventaire 460 180"
    if TypePerso = 2 then print #ini.main, "drawbmp inventaireB 460 180"
    print #ini.main, "drawbmp button5 510 40"
    print #ini.main, "drawbmp help 650 247"
    print #ini.main, "drawbmp help 650 267"
    print #ini.main, "drawbmp help 650 287"
    print #ini.main, "drawbmp help 650 307"

    print #ini.main, "when leftButtonDown [click2]"
    print #ini.main, "when rightButtonDown [clickVENTE]"
    lifePOURCENTAGE = int(xpPerso/(xpPersoTotal/100))
    [inventaire2]
    if version = 1 then
        print #ini.main, "font Courier_New 16 bold; color white;backcolor ";182;" ";111;" ";42
        print #ini.main, "place 550 85 ;\"; "INVENTAIRE"
        print #ini.main, "font Courier_New 9; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 75 430 ;\"; "Votre or : ";int(gold)
        print #ini.main, "place 515 190 ;\"; "Classe : "; classe$
        print #ini.main, "place 515 205 ;\"; "Niveau : "; int(lvlPerso)
        print #ini.main, "place 515 220 ;\"; "Expérience : ";int(lifePOURCENTAGE);" %"
        print #ini.main, "place 460 260 ;\"; "Santé : ";int(hpPerso);" / ";int(hpPersoTotal)
        print #ini.main, "place 460 275 ;\"; "Régénération : ";int(regenPerso)
        print #ini.main, "place 460 305 ;\"; "Armure : ";int(armorPerso);" + ";int(bonusDEF);"    "
        print #ini.main, "place 460 320 ;\"; "Attaque : ";int(atkPerso);" + ";int(bonusATK);"    "
        print #ini.main, "place 680 260 ;\"; "Force : ";int(force)
        print #ini.main, "place 680 280 ;\"; "Agilité : ";int(agil)
        print #ini.main, "place 680 300 ;\"; "Intelligence : ";int(intel)
        print #ini.main, "place 680 320 ;\"; "Résistance : ";int(resistance)
    end if
    if version = 2 then
        print #ini.main, "font Courier_New 16 bold; color white;backcolor ";182;" ";111;" ";42
        print #ini.main, "place 555 85 ;\"; "INVENTORY"
        print #ini.main, "font Courier_New 9; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 75 430 ;\"; "Your gold : ";int(gold)
        print #ini.main, "place 515 190 ;\"; "Class : "; classe$
        print #ini.main, "place 515 205 ;\"; "Level : "; int(lvlPerso)
        print #ini.main, "place 515 220 ;\"; "Experience : ";int(lifePOURCENTAGE);" %"
        print #ini.main, "place 460 260 ;\"; "Health : ";int(hpPerso);" / ";int(hpPersoTotal)
        print #ini.main, "place 460 275 ;\"; "Regeneration : ";int(regenPerso)
        print #ini.main, "place 460 305 ;\"; "Armor : ";int(armorPerso);" + ";int(bonusDEF);"    "
        print #ini.main, "place 460 320 ;\"; "Attack : ";int(atkPerso);" + ";int(bonusATK);"    "
        print #ini.main, "place 680 260 ;\"; "Strengh : ";int(force)
        print #ini.main, "place 680 280 ;\"; "Agility : ";int(agil)
        print #ini.main, "place 680 300 ;\"; "Intelligence : ";int(intel)
        print #ini.main, "place 680 320 ;\"; "Resistance : ";int(resistance)
    end if
    print #ini.main, "drawbmp perso 90 130"
    print #ini.main, "drawbmp screen3 40 440"

    print #ini.main, "drawbmp help 435 367"
    print #ini.main, "drawbmp help 435 402"
    print #ini.main, "drawbmp help 435 437"
    print #ini.main, "drawbmp help 435 472"
    print #ini.main, "drawbmp help 435 507"
    print #ini.main, "drawbmp help 435 542"

    print #ini.main, "size 3"
    print #ini.main, "line "; 460; " "; 390; " "; 760; " "; 390
    print #ini.main, "line "; 460; " "; 425; " "; 760; " "; 425
    print #ini.main, "line "; 460; " "; 460; " "; 760; " "; 460
    print #ini.main, "line "; 460; " "; 495; " "; 760; " "; 495
    print #ini.main, "line "; 460; " "; 530; " "; 760; " "; 530
    print #ini.main, "line "; 460; " "; 565; " "; 760; " "; 565

    print #ini.main, "size 1; color white"
    print #ini.main, "line "; 459; " "; 390; " "; 759; " "; 390
    print #ini.main, "line "; 459; " "; 425; " "; 759; " "; 425
    print #ini.main, "line "; 459; " "; 460; " "; 759; " "; 460
    print #ini.main, "line "; 459; " "; 495; " "; 759; " "; 495
    print #ini.main, "line "; 459; " "; 530; " "; 759; " "; 530
    print #ini.main, "line "; 459; " "; 565; " "; 759; " "; 565

    print #ini.main, "size 1; color blue"
    val1 = talent1XPtotal/100 : val2 = int(talent1XP/val1)+1
    print #ini.main, "line "; 460; " "; 390; " "; int(460+(val2*3)); " "; 390
    val1 = talent2XPtotal/100 : val2 = int(talent2XP/val1)+1
    print #ini.main, "line "; 460; " "; 425; " "; int(460+(val2*3)); " "; 425
    val1 = talent3XPtotal/100 : val2 = int(talent3XP/val1)+1
    print #ini.main, "line "; 460; " "; 460; " "; int(460+(val2*3)); " "; 460
    val1 = talent4XPtotal/100 : val2 = int(talent4XP/val1)+1
    print #ini.main, "line "; 460; " "; 495; " "; int(460+(val2*3)); " "; 495
    val1 = talent5XPtotal/100 : val2 = int(talent5XP/val1)+1
    print #ini.main, "line "; 460; " "; 530; " "; int(460+(val2*3)); " "; 530
    val1 = talent6XPtotal/100 : val2 = int(talent6XP/val1)+1
    print #ini.main, "line "; 460; " "; 565; " "; int(460+(val2*3)); " "; 565

' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _TRANSPARENT As long,_  'flag for transparent background
        result As long          'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    print #ini.main, "font Courier_New 8; color black"
    if version = 1 then
        print #ini.main, "place 460 380 ;\"; "Puissance de frappe niveau ";talent1;" (";talent1XP;"/";talent1XPtotal;")"
        print #ini.main, "place 460 415 ;\"; "Santé niveau ";talent2;" (";talent2XP;"/";talent2XPtotal;")"
        print #ini.main, "place 460 450 ;\"; "Résistance au coups niveau ";talent3;" (";talent3XP;"/";talent3XPtotal;")"
        print #ini.main, "place 460 485 ;\"; "Régénération de la vie niveau ";talent4;" (";talent4XP;"/";talent4XPtotal;")"
        print #ini.main, "place 460 520 ;\"; "Forgeron niveau ";talent5;" (";talent5XP;"/";talent5XPtotal;")"
        print #ini.main, "place 460 555 ;\"; "Collectionneur niveau ";talent6;" (";talent6XP;"/";talent6XPtotal;")"
    end if
    if version = 2 then
        print #ini.main, "place 460 380 ;\"; "Hit power level ";talent1;" (";talent1XP;"/";talent1XPtotal;")"
        print #ini.main, "place 460 415 ;\"; "health level ";talent2;" (";talent2XP;"/";talent2XPtotal;")"
        print #ini.main, "place 460 450 ;\"; "Hit resistance level ";talent3;" (";talent3XP;"/";talent3XPtotal;")"
        print #ini.main, "place 460 485 ;\"; "Regeneration of life level ";talent4;" (";talent4XP;"/";talent4XPtotal;")"
        print #ini.main, "place 460 520 ;\"; "Black-smith level ";talent5;" (";talent5XP;"/";talent5XPtotal;")"
        print #ini.main, "place 460 555 ;\"; "Collector levelg ";talent6;" (";talent6XP;"/";talent6XPtotal;")"
    end if
    gosub [loadITEM]
    print #ini.main, "flush" : wait


    [forgeron]
    forgeron = 1 : inventaire = 0 : marchands = 0
    case1Ex = 127 : case1Ey = 219 'arme1
    case2Ex = 183 : case2Ey = 189 ' armure
    case3Ex = 183 : case3Ey = 133 'casque
    case4Ex = 183 : case4Ey = 317 'bottes
    case5Ex = 238 : case5Ey = 219 'bouclier

    case1x = 76 : case1y = 448
    case2x = 119 : case2y = 448
    case3x = 162 : case3y = 448
    case4x = 205 : case4y = 448
    case5x = 248 : case5y = 448
    case6x = 291 : case6y = 448
    case7x = 76 : case7y = 491
    case8x = 119 : case8y = 491
    case9x = 162 : case9y = 491
    case10x = 205 : case10y = 491
    case11x = 248 : case11y = 491
    case12x = 291 : case12y = 491
    case13x = 76 : case13y = 534
    case14x = 119 : case14y = 534
    case15x = 162 : case15y = 534
    case16x = 205 : case16y = 534
    case17x = 248 : case17y = 534
    case18x = 291 : case18y = 534

    ' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
   ' CallDLL #gdi32, "SetBkMode",_
   '     gDC As ulong,_          'handle of graphicbox
   '     _TRANSPARENT As long,_  'flag for transparent background
   '     result As long          'previous bkmode
    CallDLL #gdi32, "SetBkMode",_
       gDC As ulong,_     'handle of graphicbox
       _OPAQUE As long,_  'flag for opaque background
       result As long     'previous bkmode

    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    print #ini.main, "down; fill white"
    print #ini.main, "drawbmp screen 0 0; background screen"
    if version = 1 then #ini.main "addsprite back back; spriteXY back 35 30; spritevisible back on"
    if version = 2 then #ini.main "addsprite back back2; spriteXY back 35 30; spritevisible back on"
    #ini.main "drawsprites"


    print #ini.main, "drawbmp button5 510 40"
    print #ini.main, "drawbmp button6 35 30"
    print #ini.main, "drawbmp perso 90 130"
    print #ini.main, "drawbmp screen3 40 440"
    print #ini.main, "drawbmp screen1 430 240"

    if version = 1 then print #ini.main, "drawbmp button4fr 525 446"
    if version = 2 then print #ini.main, "drawbmp button4en 525 446"

    print #ini.main, "when leftButtonDown [click2]"
    print #ini.main, "font Courier_New 16 bold; color white ;backcolor ";182;" ";111;" ";42
    if version = 1 then
        print #ini.main, "place 560 85 ;\"; "FORGERON"
        print #ini.main, "font Courier_New 14 bold; color white ;backcolor ";182;" ";111;" ";42
        print #ini.main, "place 57 59 ;\"; "SORTIR"
        print #ini.main, "font Courier_New 8 italic; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 465 180 ;\"; "''Avoir une belle épée c'est bien. Avoir \une belle épée améliorée, c'est mieux !''"

        print #ini.main, "font Courier_New 9; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 450 270 ;\"; "Objet : \\\Valeur objet :"
        print #ini.main, "place 450 420 ;\"; "Coût :"

        print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 75 430 ;\"; "Votre or : ";gold; "      "
    end if
    if version = 2 then
        print #ini.main, "place 543 85 ;\"; "BLACK-SMITH"
        print #ini.main, "font Courier_New 14 bold; color white ;backcolor ";182;" ";111;" ";42
        print #ini.main, "place 70 59 ;\"; "EXIT"
        print #ini.main, "font Courier_New 8 italic; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 480 180 ;\"; "''Having a nice sword is good. Having \ a nice upgraded sword is better !''"

        print #ini.main, "font Courier_New 9; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 450 270 ;\"; "Item : \\\Curent value :"
        print #ini.main, "place 450 420 ;\"; "Cost :"

        print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 75 430 ;\"; "Your gold : ";gold; "      "
    end if
    gosub [loadITEM]
    print #ini.main, "flush" : wait

    [marchands]
    marchands = 1 : inventaire = 0 : forgeron = 0
    case1Ex = 127 : case1Ey = 219 'arme1
    case2Ex = 183 : case2Ey = 189 ' armure
    case3Ex = 183 : case3Ey = 133 'casque
    case4Ex = 183 : case4Ey = 317 'bottes
    case5Ex = 238 : case5Ey = 219 'bouclier

    case1x = 76 : case1y = 448
    case2x = 119 : case2y = 448
    case3x = 162 : case3y = 448
    case4x = 205 : case4y = 448
    case5x = 248 : case5y = 448
    case6x = 291 : case6y = 448
    case7x = 76 : case7y = 491
    case8x = 119 : case8y = 491
    case9x = 162 : case9y = 491
    case10x = 205 : case10y = 491
    case11x = 248 : case11y = 491
    case12x = 291 : case12y = 491
    case13x = 76 : case13y = 534
    case14x = 119 : case14y = 534
    case15x = 162 : case15y = 534
    case16x = 205 : case16y = 534
    case17x = 248 : case17y = 534
    case18x = 291 : case18y = 534

    ' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
   ' CallDLL #gdi32, "SetBkMode",_
   '     gDC As ulong,_          'handle of graphicbox
   '     _TRANSPARENT As long,_  'flag for transparent background
   '     result As long          'previous bkmode
    CallDLL #gdi32, "SetBkMode",_
       gDC As ulong,_     'handle of graphicbox
       _OPAQUE As long,_  'flag for opaque background
       result As long     'previous bkmode

    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long


    print #ini.main, "down; fill white"

    [marchandsREFRESH]
    print #ini.main, "drawbmp screen 0 0; background screen"
    if version = 1 then #ini.main "addsprite back back; spriteXY back 35 30; spritevisible back on"
    if version = 2 then #ini.main "addsprite back back2; spriteXY back 35 30; spritevisible back on"
    #ini.main "drawsprites"

    print #ini.main, "drawbmp screen4 460 195"
    print #ini.main, "drawbmp button5 510 40"
  '  print #ini.main, "drawbmp button6 35 30"
    print #ini.main, "drawbmp perso 90 130"
    print #ini.main, "drawbmp screen3 40 440"
    print #ini.main, "drawbmp revente 460 468"
    print #ini.main, "when leftButtonDown [click2]"
    print #ini.main, "when rightButtonDown [clickVENTE]"
    print #ini.main, "font Courier_New 16 bold; color white ;backcolor ";182;" ";111;" ";42
    if version = 1 then
        print #ini.main, "place 556 85 ;\"; "MARCHANDS"
        print #ini.main, "font Courier_New 14 bold; color white ;backcolor ";182;" ";111;" ";42
        print #ini.main, "place 57 59 ;\"; "SORTIR"
        print #ini.main, "font Courier_New 8 italic; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 460 150 ;\"; "''Acheter un bon équipement est important \si on ne veut pas finir dans un cerceuil !''"
        print #ini.main, "font Cascadia_Code 8; color black;backcolor ";214;" ";183;" ";164
        print #ini.main, "font Courier_New 10; color black;backcolor white"
        if village >0 then print #ini.main, "place 570 380 ;\"; "ACHETER\pour ";int(35+(5*village))-talent6;" d'or"
        if village >0 then print #ini.main, "place 570 270 ;\"; "ACHETER\pour ";int(35+(5*village))-talent6;" d'or"
        if ville >0 then print #ini.main, "place 570 380 ;\"; "ACHETER\pour ";int(100*ville)-talent6;" d'or"
        if ville >0 then print #ini.main, "place 570 270 ;\"; "ACHETER\pour ";int(100*ville)-talent6;" d'or"
        print #ini.main, "font Courier_New 7 italic; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 560 320 ;\"; "''bras gauche - droit''"
        print #ini.main, "place 560 428 ;\"; "''tête - torse - pieds''"
        print #ini.main, "font Courier_New 9 italic; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 510 525 ;\"; "''Je rachète aussi par lot !''"
        print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 75 430 ;\"; "Votre or : ";gold; "      "
    end if
    if version = 2 then
        print #ini.main, "place 576 85 ;\"; "TRADER"
        print #ini.main, "font Courier_New 14 bold; color white ;backcolor ";182;" ";111;" ";42
        print #ini.main, "place 70 59 ;\"; "EXIT"
        print #ini.main, "font Courier_New 8 italic; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 465 150 ;\"; "''Buying good equipment is important if \you don't want to end up in a coffin...''"
        print #ini.main, "font Cascadia_Code 8; color black;backcolor ";214;" ";183;" ";164
        print #ini.main, "font Courier_New 10; color black;backcolor white"
        if village >0 then print #ini.main, "place 570 380 ;\"; "BUY\for ";int(35+(5*village))-talent6;" gold"
        if village >0 then print #ini.main, "place 570 270 ;\"; "BUY\for ";int(35+(5*village))-talent6;" gold"
        if ville >0 then print #ini.main, "place 570 380 ;\"; "BUY\for ";int(100*ville)-talent6;" gold"
        if ville >0 then print #ini.main, "place 570 270 ;\"; "BUY\for ";int(100*ville)-talent6;" gold"
        print #ini.main, "font Courier_New 7 italic; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 560 320 ;\"; "''left arm - right arm''"
        print #ini.main, "place 560 428 ;\"; "''head - torso - feet''"
        print #ini.main, "font Courier_New 9 italic; color white;backcolor ";161;" ";106;" ";76
        print #ini.main, "place 515 525 ;\"; "''I also buy back in lot !''"
        print #ini.main, "font Courier_New 8; color black;backcolor ";227;" ";215;" ";201
        print #ini.main, "place 75 430 ;\"; "Your gold : ";gold; "      "
    end if
    gosub [loadITEM]
    print #ini.main, "flush" : wait

    [arena]
    WindowWidth=896 : WindowHeight=652
    UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    graphicbox #ini.main, 0, 0, WindowWidth-6, WindowHeight-28
    open "Arena " for window_nf as #ini
    #ini, "trapclose [quit]"
    print #ini.main, "down; fill white"
    print #ini.main, "drawbmp arena 0 0; background arena"
    if version = 1 then #ini.main "addsprite back back; spriteXY back 30 535; spritevisible back on"
    if version = 2 then #ini.main "addsprite back2 back2; spriteXY back2 30 535; spritevisible back2 on"
    if TypePerso = 1 then #ini.main "addsprite main main; spriteXY main 300 370; spritevisible main on"
    if TypePerso = 2 then #ini.main "addsprite main main2; spriteXY main 340 370; spritevisible main on"

        if BOSS = 0 then
            if village >0 then
                Ennemi = int(rnd(1)*3 + 1)
                if Ennemi = 1 then #ini.main "addsprite ennemi13 ennemi13; spriteXY ennemi13 380 200; spritevisible ennemi13 on"
                if Ennemi = 2 then #ini.main "addsprite ennemi14 ennemi14; spriteXY ennemi14 380 200; spritevisible ennemi14 on"
                if Ennemi = 3 then #ini.main "addsprite ennemi15 ennemi15; spriteXY ennemi15 380 200; spritevisible ennemi15 on"
            end if
            if ville >0 then
                Ennemi = int(rnd(1)*5 + 1)
                if Ennemi = 1 then #ini.main "addsprite ennemi16 ennemi16; spriteXY ennemi16 380 200; spritevisible ennemi16 on"
                if Ennemi = 2 then #ini.main "addsprite ennemi20 ennemi20; spriteXY ennemi20 380 200; spritevisible ennemi20 on"
                if Ennemi = 3 then #ini.main "addsprite ennemi21 ennemi21; spriteXY ennemi21 380 200; spritevisible ennemi21 on"
                if Ennemi = 4 then #ini.main "addsprite ennemi22 ennemi22; spriteXY ennemi22 380 200; spritevisible ennemi22 on"
                if Ennemi = 5 then #ini.main "addsprite ennemi23 ennemi23; spriteXY ennemi23 380 200; spritevisible ennemi23 on"
            end if

            if village = 1 then ennemiLVL = int(rnd(1)*3 + 1) : if lvlPerso = 1 then ennemiLVL = 1
            if village = 2 then ennemiLVL = int(rnd(1)*3 + 4)
            if village = 3 then ennemiLVL = int(rnd(1)*3 + 7)
            if village = 4 then ennemiLVL = int(rnd(1)*3 + 10)
            if village = 5 then ennemiLVL = int(rnd(1)*2 + 13)
            if village = 6 then ennemiLVL = int(rnd(1)*3 + 15)
            if village = 7 then ennemiLVL = int(rnd(1)*2 + 18)
            if village = 8 then ennemiLVL = int(rnd(1)*4 + 20)
            if village = 9 then ennemiLVL = int(rnd(1)*3 + 24)
            if village = 10 then ennemiLVL = int(rnd(1)*4 + 27)
            if village = 11 then ennemiLVL = int(rnd(1)*5 + 31)
            if village = 12 then ennemiLVL = int(rnd(1)*4 + 36)
            if village = 13 then ennemiLVL = int(rnd(1)*4 + 40)
            if village = 14 then ennemiLVL = int(rnd(1)*5 + 44)
            if village = 15 then ennemiLVL = int(rnd(1)*3 + 49)
            if village = 16 then ennemiLVL = int(rnd(1)*3 + 52)
            if village = 17 then ennemiLVL = int(rnd(1)*4 + 55)
            if village = 18 then ennemiLVL = int(rnd(1)*6 + 59)
            if village = 19 then ennemiLVL = int(rnd(1)*3 + 65)
            if village = 20 then ennemiLVL = int(rnd(1)*4 + 69)
            if village = 21 then ennemiLVL = int(rnd(1)*4 + 73)
            if village = 22 then ennemiLVL = int(rnd(1)*3 + 77)
            if village = 23 then ennemiLVL = int(rnd(1)*4 + 81)
            if village = 24 then ennemiLVL = int(rnd(1)*4 + 85)
            if village = 25 then ennemiLVL = int(rnd(1)*6 + 90)
            if village = 26 then ennemiLVL = int(rnd(1)*5 + 96)
            if village = 27 then ennemiLVL = int(rnd(1)*6 + 101)
            if village = 28 then ennemiLVL = int(rnd(1)*5 + 107)
            if village = 29 then ennemiLVL = int(rnd(1)*3 + 112)
            if village = 30 then ennemiLVL = int(rnd(1)*4 + 116)
            if village = 31 then ennemiLVL = int(rnd(1)*9 + 121)
            if village = 32 then ennemiLVL = int(rnd(1)*5 + 131)
            if village = 33 then ennemiLVL = int(rnd(1)*4 + 136)
            if village = 34 then ennemiLVL = int(rnd(1)*7 + 141)
            if village = 35 then ennemiLVL = int(rnd(1)*7 + 148)
            if village = 36 then ennemiLVL = int(rnd(1)*5 + 155)
            if village = 37 then ennemiLVL = int(rnd(1)*6 + 161)
            if village = 38 then ennemiLVL = int(rnd(1)*7 + 168)
            if village = 39 then ennemiLVL = int(rnd(1)*10 + 175)
            if village = 40 then ennemiLVL = int(rnd(1)*7 + 185)
            if village = 41 then ennemiLVL = int(rnd(1)*8 + 192)
            if village = 42 then ennemiLVL = int(rnd(1)*9 + 201)
            if village = 43 then ennemiLVL = int(rnd(1)*7 + 211)
            if village = 44 then ennemiLVL = int(rnd(1)*6 + 219)
            if village = 45 then ennemiLVL = int(rnd(1)*8 + 226)
            if village = 46 then ennemiLVL = int(rnd(1)*6 + 234)
            if village = 47 then ennemiLVL = int(rnd(1)*10 + 240)
            if village = 48 then ennemiLVL = int(rnd(1)*9 + 250)
            if village = 49 then ennemiLVL = int(rnd(1)*5 + 260)
            if village = 50 then ennemiLVL = int(rnd(1)*6 + 266)
            if village = 51 then ennemiLVL = int(rnd(1)*7 + 273)
            if village = 52 then ennemiLVL = int(rnd(1)*9 + 281)
            if village = 53 then ennemiLVL = int(rnd(1)*9 + 291)

            if village > 0 then
                ennemiPV = int(10*ennemiLVL+5*village) : ennemiPVt = ennemiPV
                atkE = int(8.85*ennemiLVL+village) : defE = int(2.65*ennemiLVL+2*village)
                XPennemi = int(2.4*ennemiLVL*village) : goldE = int(0.75*ennemiLVL*village)
            end if

            if ville > 0 then
                if ville = 1 then ennemiLVL = int(rnd(1)*3 + 21)
                if ville = 2 then ennemiLVL = int(rnd(1)*4 + 27)
                if ville = 3 then ennemiLVL = int(rnd(1)*3 + 76)
                if ville = 4 then ennemiLVL = int(rnd(1)*4 + 104)
                if ville = 5 then ennemiLVL = int(rnd(1)*4 + 168)
                if ville = 6 then ennemiLVL = int(rnd(1)*3 + 202)
                if ville = 7 then ennemiLVL = int(rnd(1)*5 + 244)
                if ville = 8 then ennemiLVL = int(rnd(1)*1 + 299)
                if ville = 9 then ennemiLVL = int(rnd(1)*1 + 499)
                ennemiPV = int(22*ennemiLVL) : ennemiPVt = ennemiPV
                atkE = int(14.5*ennemiLVL)
                defE = int(5.8*ennemiLVL)
                XPennemi = int(7*ennemiLVL*ville)
                goldE = int(1.9*ennemiLVL*ville)
            end if

            if ennemiLVL < lvlPerso then GainReputation = 5
            if (ennemiLVL = lvlPerso or (ennemiLVL >= lvlPerso+1 and ennemiLVL <= lvlPerso+3)) then GainReputation = 10
            if ennemiLVL > lvlPerso+3 then GainReputation = 20
        end if

        if BOSS = 1 then
            if village > 0 then
                select case village
                    case 1
                        ennemiLVL = 5
                    case 2
                        ennemiLVL = 8
                    case 3
                        ennemiLVL = 11
                    case 4
                        ennemiLVL = 14
                    case 5
                        ennemiLVL = 16
                    case 6
                        ennemiLVL = 18
                    case 7
                        ennemiLVL = 20
                    case 8
                        ennemiLVL = 25
                    case 9
                        ennemiLVL = 28
                    case 10
                        ennemiLVL = 32
                    case 11
                        ennemiLVL = 38
                    case 12
                        ennemiLVL = 40
                    case 13
                        ennemiLVL = 45
                    case 14
                        ennemiLVL = 50
                    case 15
                        ennemiLVL = 53
                    case 16
                        ennemiLVL = 55
                    case 17
                        ennemiLVL = 60
                    case 18
                        ennemiLVL = 65
                    case 19
                        ennemiLVL = 68
                    case 20
                        ennemiLVL = 73
                    case 21
                        ennemiLVL = 78
                    case 22
                        ennemiLVL = 80
                    case 23
                        ennemiLVL = 85
                    case 24
                        ennemiLVL = 90
                    case 25
                        ennemiLVL = 97
                    case 26
                        ennemiLVL = 102
                    case 27
                        ennemiLVL = 108
                    case 28
                        ennemiLVL = 112
                    case 29
                        ennemiLVL = 115
                    case 30
                        ennemiLVL = 120
                    case 31
                        ennemiLVL = 130
                    case 32
                        ennemiLVL = 136
                    case 33
                        ennemiLVL = 140
                    case 34
                        ennemiLVL = 148
                    case 35
                        ennemiLVL = 155
                    case 36
                        ennemiLVL = 160
                    case 37
                        ennemiLVL = 167
                    case 38
                        ennemiLVL = 175
                    case 39
                        ennemiLVL = 185
                    case 40
                        ennemiLVL = 192
                    case 41
                        ennemiLVL = 200
                    case 42
                        ennemiLVL = 210
                    case 43
                        ennemiLVL = 218
                    case 44
                        ennemiLVL = 225
                    case 45
                        ennemiLVL = 234
                    case 46
                        ennemiLVL = 240
                    case 47
                        ennemiLVL = 250
                    case 48
                        ennemiLVL = 260
                    case 49
                        ennemiLVL = 265
                    case 50
                        ennemiLVL = 272
                    case 51
                        ennemiLVL = 280
                    case 52
                        ennemiLVL = 290
                    case 53
                        ennemiLVL = 300
                end select

                Ennemi = int(rnd(1)*2 + 1)
                if Ennemi = 1 then #ini.main "addsprite ennemi18 ennemi18; spriteXY ennemi18 380 200; spritevisible ennemi18 on"
                if Ennemi = 2 then #ini.main "addsprite ennemi19 ennemi19; spriteXY ennemi19 380 200; spritevisible ennemi19 on"
                ennemiPV = int(10*ennemiLVL+40*village) : ennemiPVt = ennemiPV
                atkE = int(6.5*ennemiLVL+15*village) : defE = int(1.75*ennemiLVL+8*village)
                XPennemi = int(5.5*ennemiLVL*village) : goldE =  int(4.5*ennemiLVL)
            end if
            if ville = 1 then
                #ini.main "addsprite ennemi12 ennemi12; spriteXY ennemi12 380 200; spritevisible ennemi12 on"
                ennemiLVL = 25 : ennemiPV = 940 : ennemiPVt = ennemiPV
                atkE = 420 : defE = 50
                XPennemi = 1500 : goldE =  2000
            end if
            if ville = 2 then
                #ini.main "addsprite ennemi7 ennemi7; spriteXY ennemi7 380 200; spritevisible ennemi7 on"
                ennemiLVL = 35 : ennemiPV = 2800 : ennemiPVt = ennemiPV
                atkE = 600 : defE = 120
                XPennemi = 5000 : goldE =  3500
            end if
            if ville = 3 then
                #ini.main "addsprite ennemi4 ennemi4; spriteXY ennemi4 380 200; spritevisible ennemi4 on"
                ennemiLVL = 80 : ennemiPV = 8600 : ennemiPVt = ennemiPV
                atkE = 2500 : defE = 400
                XPennemi = 8000 : goldE =  8000
            end if
            if ville = 4 then
                #ini.main "addsprite ennemi9 ennemi9; spriteXY ennemi9 380 200; spritevisible ennemi9 on"
                ennemiLVL = 110 : ennemiPV = 14500 : ennemiPVt = ennemiPV
                atkE = 3000 : defE = 550
                XPennemi = 9000 : goldE =  11000
            end if
            if ville = 5 then
                #ini.main "addsprite ennemi2 ennemi2; spriteXY ennemi2 380 200; spritevisible ennemi2 on"
                ennemiLVL = 180 : ennemiPV = 15000 : ennemiPVt = ennemiPV
                atkE = 4500 : defE = 850
                XPennemi = 14000 : goldE =  15000
            end if
            if ville = 6 then
                #ini.main "addsprite ennemi1 ennemi1; spriteXY ennemi1 380 200; spritevisible ennemi1 on"
                ennemiLVL = 220 : ennemiPV = 16000 : ennemiPVt = ennemiPV
                atkE = 5000 : defE = 900
                XPennemi = 18000 : goldE =  20000
            end if
            if ville = 7 then
                #ini.main "addsprite ennemi11 ennemi11; spriteXY ennemi11 380 200; spritevisible ennemi11 on"
                ennemiLVL = 250 : ennemiPV = 18000 : ennemiPVt = ennemiPV
                atkE = 6000 : defE = 1500
                XPennemi = 25000 : goldE =  24000
            end if
            if ville = 8 then
                #ini.main "addsprite ennemi8 ennemi8; spriteXY ennemi8 380 200; spritevisible ennemi8 on"
                ennemiLVL = 300 : ennemiPV = 22000 : ennemiPVt = ennemiPV
                atkE = 8500 : defE = 1200
                XPennemi = 35000 : goldE =  30000
            end if
            if ville = 9 then
                #ini.main "addsprite ennemi8 ennemi8; spriteXY ennemi8 380 200; spritevisible ennemi8 on"
                ennemiLVL = 1000 : ennemiPV = 350000 : ennemiPVt = ennemiPV
                atkE = 50000 : defE = 20000
                XPennemi = 500000 : goldE =  500000
            end if
        end if

    #ini.main "drawsprites"
    print #ini.main, "when leftButtonDown [clickARENA]"
    print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103

    ' supprime le backcolor pour texte transparent
    hGBox = hwnd(#ini.main)
    CallDLL #user32, "GetDC",_
        hGBox As ulong,_  'handle of graphicbox
        gDC As ulong      'device context
    CallDLL #gdi32, "SetBkMode",_
        gDC As ulong,_          'handle of graphicbox
        _TRANSPARENT As long,_  'flag for transparent background
        result As long          'previous bkmode
    CallDLL#user32,"ReleaseDC",_
        hGBox As ulong,_    'graphicbox handle
        gDC As ulong,_      'device context
        result As long

    if version = 1 then
        print #ini.main, "place 230 300 ;\"; "Niveau ";ennemiLVL;"\Santé : ";ennemiPV;"/";ennemiPVt;"    "';atkE;"\";defE
        print #ini.main, "place 510 520 ;\"; "Niveau ";lvlPerso;"\Santé : ";hpPerso;"/";hpPersoTotal;"   "
        if BOSS = 0 then print #ini.main, "font Courier_New 10; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 400 152 ;\"; "ARENE"
        if BOSS = 1 then print #ini.main, "font Courier_New 10 bold; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 388 152 ;\"; "CHAMPION"
    end if
    if version = 2 then
        print #ini.main, "place 230 300 ;\"; "Level ";ennemiLVL;"\Health : ";ennemiPV;"/";ennemiPVt;"   "
        print #ini.main, "place 510 520 ;\"; "Level ";lvlPerso;"\Health : ";hpPerso;"/";hpPersoTotal;"   "
        if BOSS = 0 then print #ini.main, "font Courier_New 10; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 400 152 ;\"; "ARENA"
        if BOSS = 1 then print #ini.main, "font Courier_New 10 bold; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 388 152 ;\"; "CHAMPION"
    end if
    print #ini.main, "flush" : wait


    [w]
    wait
    [clickARENA]
    mX = MouseX : mY = MouseY
 '  notice mX ;" "; mY
    if mX>30 and mX<140 and mY>535 and mY<580 then close #ini : Ennemi = 0 : goto [INI]
    if mX>370 and mX<470 and mY>180 and mY<310 then goto [attaque]
    wait

    [levelUP]
    lvlPerso = lvlPerso + 1
    xpPersoTotal = xpPersoTotal + 15 + (25*lvlPerso)
    hpPersoTotal = hpPersoTotal + int(rnd(1)*(lvlPerso*5)+5) : hpPerso = hpPersoTotal
    regenPerso = regenPerso + 0.2
    armorPerso = armorPerso + int(rnd(1)*(lvlPerso)+1)
    atkPerso = atkPerso + int(rnd(1)*(lvlPerso)+3)
    force = force + 3
    agil = agil + 1
    intel = intel + 1
    if xpPerso >= xpPersoTotal then goto [levelUP]
    xpPerso = 0
    return

    [attaque]
    dammage = int(rnd(1)*(atkPerso+bonusATK)+1)
    dmg = int(rnd(1)*(atkPerso+bonusATK)- defE)
    talent1XP = talent1XP + 1
    if dmg <0 then dmg = 0
    ennemiPV = ennemiPV - dmg + 1

    if BOSS = 0 then XPennemi = XPennemi + 1 : goldE = goldE + 1

    if ennemiPV > ennemiPVt then ennemiPV = ennemiPVt
    if dmg > 0 then #ini.main "addsprite atk1 atk; spriteXY atk1 400 210; spritevisible atk1 on"
    if dmg = 0 then #ini.main "addsprite atk1 block; spriteXY atk1 397 220; spritevisible atk1 on"

    if ennemiPV <=0 then
        #ini.main "drawsprites"
        print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103
        if version = 1 and BOSS = 0 then print #ini.main, "place 300 335 ;\"; "VICTOIRE ! + ";goldE;" d'or et ";XPennemi;" d'xp !"
        if version = 2 and BOSS = 0 then print #ini.main, "place 300 335 ;\"; "VICTORY ! + ";goldE;" gold and ";XPennemi;" xp !"
        if version = 1 and BOSS = 1 then print #ini.main, "place 285 335 ;\"; "Félicitation vous avez conquis l'arène !"
        if version = 2 and BOSS = 1 then print #ini.main, "place 240 335 ;\"; "Congratulations, you have conquered the arena !"
        print #ini.main, "flush"
        call Sleep 1000
        Ennemi = 0
        if village > 0 then reputationVillage(village) = reputationVillage(village) + GainReputation
        if village > 0 and reputationVillage(village) > 100 then reputationVillage(village) = 100
        if ville > 0 then reputationVille(ville) = reputationVille(ville) + GainReputation
        if ville > 0 and reputationVille(ville) > 100 then reputationVille(ville) = 100

        xpPerso = xpPerso + XPennemi
        gold = gold + goldE

        if BOSS = 1 then
            if village = 1 then activationtuto2 = 1 : StatutVillage1$ = "arène conquise"
            if village = 2 then StatutVillage2$ = "arène conquise"
            if village = 3 then StatutVillage3$ = "arène conquise"
            if village = 4 then StatutVillage4$ = "arène conquise"
            if village = 5 then StatutVillage5$ = "arène conquise"
            if village = 6 then StatutVillage6$ = "arène conquise"
            if village = 7 then StatutVillage7$ = "arène conquise"
            if village = 8 then StatutVillage8$ = "arène conquise"
            if village = 9 then StatutVillage9$ = "arène conquise"
            if village = 10 then StatutVillage10$ = "arène conquise"
            if village = 11 then StatutVillage11$ = "arène conquise"
            if village = 12 then StatutVillage12$ = "arène conquise"
            if village = 13 then StatutVillage13$ = "arène conquise"
            if village = 14 then StatutVillage14$ = "arène conquise"
            if village = 15 then StatutVillage15$ = "arène conquise"
            if village = 16 then StatutVillage16$ = "arène conquise"
            if village = 17 then StatutVillage17$ = "arène conquise"
            if village = 18 then StatutVillage18$ = "arène conquise"
            if village = 19 then StatutVillage19$ = "arène conquise"
            if village = 20 then StatutVillage20$ = "arène conquise"
            if village = 21 then StatutVillage21$ = "arène conquise"
            if village = 22 then StatutVillage22$ = "arène conquise"
            if village = 23 then StatutVillage23$ = "arène conquise"
            if village = 24 then StatutVillage24$ = "arène conquise"
            if village = 25 then StatutVillage25$ = "arène conquise"
            if village = 26 then StatutVillage26$ = "arène conquise"
            if village = 27 then StatutVillage27$ = "arène conquise"
            if village = 28 then StatutVillage28$ = "arène conquise"
            if village = 29 then StatutVillage29$ = "arène conquise"
            if village = 30 then StatutVillage30$ = "arène conquise"
            if village = 31 then StatutVillage31$ = "arène conquise"
            if village = 32 then StatutVillage32$ = "arène conquise"
            if village = 33 then StatutVillage33$ = "arène conquise"
            if village = 34 then StatutVillage34$ = "arène conquise"
            if village = 35 then StatutVillage35$ = "arène conquise"
            if village = 36 then StatutVillage36$ = "arène conquise"
            if village = 37 then StatutVillage37$ = "arène conquise"
            if village = 38 then StatutVillage38$ = "arène conquise"
            if village = 39 then StatutVillage39$ = "arène conquise"
            if village = 40 then StatutVillage40$ = "arène conquise"
            if village = 41 then StatutVillage41$ = "arène conquise"
            if village = 42 then StatutVillage42$ = "arène conquise"
            if village = 43 then StatutVillage43$ = "arène conquise"
            if village = 44 then StatutVillage44$ = "arène conquise"
            if village = 45 then StatutVillage45$ = "arène conquise"
            if village = 46 then StatutVillage46$ = "arène conquise"
            if village = 47 then StatutVillage47$ = "arène conquise"
            if village = 48 then StatutVillage48$ = "arène conquise"
            if village = 49 then StatutVillage49$ = "arène conquise"
            if village = 50 then StatutVillage50$ = "arène conquise"
            if village = 51 then StatutVillage51$ = "arène conquise"
            if village = 52 then StatutVillage52$ = "arène conquise"
            if village = 53 then StatutVillage53$ = "arène conquise"
            if ville = 1 then StatutVille1$ = "arène conquise"
            if ville = 2 then StatutVille2$ = "arène conquise"
            if ville = 3 then StatutVille3$ = "arène conquise"
            if ville = 4 then StatutVille4$ = "arène conquise"
            if ville = 5 then StatutVille5$ = "arène conquise"
            if ville = 6 then StatutVille6$ = "arène conquise"
            if ville = 7 then StatutVille7$ = "arène conquise"
            if ville = 8 then StatutVille8$ = "arène conquise"
            if ville = 9 then StatutLeague$ = "arène conquise" : notice "Félicitation, vous avez fini le tutoriel!"
            charisme = charisme + 1
            BOSS = 0
            reputationVillage(village) =0
            reputationVille(ville) =0
        end if

        [rmkXP]
        if xpPerso >= xpPersoTotal then gosub [levelUP] : goto [rmkXP]
        close #ini : goto [INI]
    end if

    damageE = int(rnd(1)*atkE+(atkE/3))
    dmgE = int(rnd(1)*damageE-(armorPerso+bonusDEF))
    if dmgE <0 then dmgE = 0
    hpPerso = int(hpPerso - dmgE)
    if dmgE > 0 then #ini.main "addsprite atk2 atk; spriteXY atk2 390 440; spritevisible atk2 on"
    if dmgE = 0 then #ini.main "addsprite atk2 block; spriteXY atk2 390 450; spritevisible atk2 on" : talent3XP = talent3XP + 1
    print #ini.main, "drawsprites"

    if version = 1 then
        if BOSS = 0 then print #ini.main, "font Courier_New 10; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 400 152 ;\"; "ARENE"
        if BOSS = 1 then print #ini.main, "font Courier_New 10 bold; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 388 152 ;\"; "CHAMPION"
        print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103
        print #ini.main, "place 230 300 ;\"; "Niveau ";ennemiLVL;"\Santé : ";ennemiPV;"/";ennemiPVt;"   "
        print #ini.main, "place 510 520 ;\"; "Niveau ";lvlPerso;"\Santé : ";hpPerso;"/";hpPersoTotal;"   "
    end if
    if version = 2 then
        if BOSS = 0 then print #ini.main, "font Courier_New 10; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 400 152 ;\"; "ARENA"
        if BOSS = 1 then print #ini.main, "font Courier_New 10 bold; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 388 152 ;\"; "CHAMPION"
        print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103
        print #ini.main, "place 230 300 ;\"; "Level ";ennemiLVL;"\Health : ";ennemiPV;"/";ennemiPVt;"   "
        print #ini.main, "place 510 520 ;\"; "Level ";lvlPerso;"\Health : ";hpPerso;"/";hpPersoTotal;"   "
    end if

    print #ini.main, "flush"
    call Sleep 100
    #ini.main "removesprite atk1; removesprite atk2"
    #ini.main "drawsprites"

    if version = 1 then
        if BOSS = 0 then print #ini.main, "font Courier_New 10; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 400 152 ;\"; "ARENE"
        if BOSS = 1 then print #ini.main, "font Courier_New 10 bold; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 388 152 ;\"; "CHAMPION"
    end if
    if version = 2 then
        if BOSS = 0 then print #ini.main, "font Courier_New 10; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 400 152 ;\"; "ARENA"
        if BOSS = 1 then print #ini.main, "font Courier_New 10 bold; color black;backcolor ";153;" ";217;" ";234 : print #ini.main, "place 388 152 ;\"; "CHAMPION"
    end if

    if hpPerso <= 0 then
        print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103
        if version = 1 and BOSS = 1 then print #ini.main, "place 90 335 ;\"; "DÉFAITE ! Vous perdez la totalité de votre réputation ainsi que votre équipement !"
        if version = 2 and BOSS = 1 then print #ini.main, "place 170 335 ;\"; "DEFEAT ! You lose your entire reputation and all your equipment!"

        if version = 1 and BOSS = 0 then print #ini.main, "place 200 335 ;\"; "DÉFAITE ! Vous perdez la totalité de votre réputation !"
        if version = 2 and BOSS = 0 then print #ini.main, "place 250 335 ;\"; "DEFEAT ! You lose your entire reputation !"
        print #ini.main, "flush"

        if BOSS = 1 then
            lvlARENA = 1
            bonusATK = 0
            bonusDEF = 0
            bonusPV = 0
            caseITEMequip(1) = 0
            caseITEMequip(2) = 0
            caseITEMequip(3) = 0
            caseITEMequip(4) = 0
            caseITEMequip(5) = 0
            rareITEMequip(1) = 0
            rareITEMequip(2) = 0
            rareITEMequip(3) = 0
            rareITEMequip(4) = 0
            rareITEMequip(5) = 0
            typeITEMequip(1) = 0
            typeITEMequip(2) = 0
            typeITEMequip(3) = 0
            typeITEMequip(4) = 0
            typeITEMequip(5) = 0
            lvlITEMequip(1) = 0
            lvlITEMequip(2) = 0
            lvlITEMequip(3) = 0
            lvlITEMequip(4) = 0
            lvlITEMequip(5) = 0
            VequipITEM(1) = 0
            VequipITEM(2) = 0
            VequipITEM(3) = 0
            VequipITEM(4) = 0
            VequipITEM(5) = 0
            VIEequipITEM(1) = 0
            VIEequipITEM(2) = 0
            VIEequipITEM(3) = 0
            VIEequipITEM(4) = 0
            VIEequipITEM(5) = 0
            nameITEMequip1$ = ""
            nameITEMequip2$ = ""
            nameITEMequip3$ = ""
            nameITEMequip4$ = ""
            nameITEMequip5$ = ""
            hpPersoTotal = hpPersoTotal - VIEequipITEM(1)
            hpPersoTotal = hpPersoTotal - VIEequipITEM(2)
            hpPersoTotal = hpPersoTotal - VIEequipITEM(3)
            hpPersoTotal = hpPersoTotal - VIEequipITEM(4)
            hpPersoTotal = hpPersoTotal - VIEequipITEM(5)
        end if
        hpPerso = hpPersoTotal
        Ennemi = 0
        BOSSremember = 0
        BOSS = 0
        reputationVillage(village) = 0
        reputationVille(ville) =0
        call Sleep 2500
        close #ini : goto [INI]
    end if

    hpPerso = int(hpPerso + regenPerso) : talent4XP = talent4XP + 1
    if hpPerso > hpPersoTotal then hpPerso = hpPersoTotal : talent2XP = talent2XP + 1

    if version = 1 then
        print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103
        print #ini.main, "place 230 300 ;\"; "Niveau ";ennemiLVL;"\Santé : ";ennemiPV;"/";ennemiPVt;"   "
        print #ini.main, "place 510 520 ;\"; "Niveau ";lvlPerso;"\Santé : ";hpPerso;"/";hpPersoTotal;"   "
    end if
    if version = 2 then
        print #ini.main, "font Courier_New 10; color black;backcolor ";223;" ";138;" ";103
        print #ini.main, "place 230 300 ;\"; "Level ";ennemiLVL;"\Health : ";ennemiPV;"/";ennemiPVt;"   "
        print #ini.main, "place 510 520 ;\"; "Level ";lvlPerso;"\Health : ";hpPerso;"/";hpPersoTotal;"   "
    end if
    wait

    [quit]
    pass$ = "0"
    if about = 1 then close #about

    open "secu.txt" for output as #secu
    print #secu, pass$
    close #secu
    gosub [print]
    close #ini : end

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

    [loadITEM]

    if version = 1 then
        epee1$     = "Épée commune"     : epee2$     = "Épée peu commune"     : epee3$     = "Épée rare"     : epee4$     = "Épée légendaire"
        arc1$      = "Arc commun"       : arc2$      = "Arc peu commun"       : arc3$      = "Arc rare"      : arc4$      = "Arc légendaire"
        lance1$    = "Lance commune"    : lance2$    = "Lance peu commune"    : lance3$    = "Lance rare"    : lance4$    = "Lance légendaire"
        hache1$    = "Hache commune"    : hache2$    = "Hache peu commune"    : hache3$    = "Hache rare"    : hache4$    = "Hache légendaire"
        marteau1$  = "Marteau commun"   : marteau2$  = "Marteau peu commun"   : marteau3$  = "Marteau rare"  : marteau4$  = "Marteau légendaire"
        bouclier1$ = "Bouclier commun"  : bouclier2$ = "Bouclier peu commun"  : bouclier3$ = "Bouclier rare" : bouclier4$ = "Bouclier légendaire"
        armure1$   = "Armure commune"   : armure2$   = "Armure peu commune"   : armure3$   = "Armure rare"   : armure4$   = "Armure légendaire"
        chausses1$ = "Chausses commune" : chausses2$ = "Chausses peu commune" : chausses3$ = "Chausses rare" : chausses4$ = "Chausses légendaire"
        casque1$   = "Casque commun"    : casque2$   = "Casque peu commun"    : casque3$   = "Casque rare"   : casque4$   = "Casque légendaire"
    end if
    if version = 2 then
        epee1$     = "Common Sword"  : epee2$     = "Unusual Sword"  : epee3$     = "Rare Sword"  : epee4$     = "Legendary Sword"
        arc1$      = "Common Bow"    : arc2$      = "Unusual Bow"    : arc3$      = "Rare Bow"    : arc4$      = "Legendary Bow"
        lance1$    = "Common Spear"  : lance2$    = "Unusual Spear"  : lance3$    = "Rare Spear"  : lance4$    = "Legendary Spear"
        hache1$    = "Common Axe"    : hache2$    = "Unusual Axe"    : hache3$    = "Rare Axe"    : hache4$    = "Legendary Axe"
        marteau1$  = "Common Hammer" : marteau2$  = "Unusual Hammer" : marteau3$  = "Rare Hammer" : marteau4$  = "Legendary Hammer"
        bouclier1$ = "Common Shield" : bouclier2$ = "Unusual Shield" : bouclier3$ = "Rare Shield" : bouclier4$ = "Legendary Shield"
        armure1$   = "Common Armor"  : armure2$   = "Unusual Armor"  : armure3$   = "Rare Armor"  : armure4$   = "Legendary Armor"
        chausses1$ = "Common Boots"  : chausses2$ = "Unusual Boots"  : chausses3$ = "Rare Boots"  : chausses4$ = "Legendary Boots"
        casque1$   = "Common Helmet" : casque2$   = "Unusual Helmet" : casque3$   = "Rare Helmet" : casque4$   = "Legendary Helmet"
    end if

    if caseITEMequip(1) > 0 then
        if rareITEMequip(1) = 1 then
            if typeITEMequip(1) = 1 then nameITEMequip1$ = epee1$ : print #ini.main, "drawbmp item2a ";case1Ex;" ";case1Ey : nACTIONplayer = 2
            if typeITEMequip(1) = 2 then nameITEMequip1$ = arc1$ : print #ini.main, "drawbmp item2b ";case1Ex;" ";case1Ey : nACTIONplayer = 2
            if typeITEMequip(1) = 3 then nameITEMequip1$ = lance1$ : print #ini.main, "drawbmp item2d ";case1Ex;" ";case1Ey : nACTIONplayer = 1
            if typeITEMequip(1) = 4 then nameITEMequip1$ = hache1$ : print #ini.main, "drawbmp item2c ";case1Ex;" ";case1Ey : nACTIONplayer = 1
            if typeITEMequip(1) = 5 then nameITEMequip1$ = marteau1$ : print #ini.main, "drawbmp item2e ";case1Ex;" ";case1Ey : nACTIONplayer = 1
        end if
        if rareITEMequip(1) = 2 then
            if typeITEMequip(1) = 1 then nameITEMequip1$ = epee2$ : print #ini.main, "drawbmp item3a ";case1Ex;" ";case1Ey : nACTIONplayer = 2
            if typeITEMequip(1) = 2 then nameITEMequip1$ = arc2$ : print #ini.main, "drawbmp item3b ";case1Ex;" ";case1Ey : nACTIONplayer = 3
            if typeITEMequip(1) = 3 then nameITEMequip1$ = lance2$ : print #ini.main, "drawbmp item3d ";case1Ex;" ";case1Ey : nACTIONplayer = 2
            if typeITEMequip(1) = 4 then nameITEMequip1$ = hache2$ : print #ini.main, "drawbmp item3c ";case1Ex;" ";case1Ey : nACTIONplayer = 1
            if typeITEMequip(1) = 5 then nameITEMequip1$ = marteau2$ : print #ini.main, "drawbmp item3e ";case1Ex;" ";case1Ey : nACTIONplayer = 1
        end if
        if rareITEMequip(1) = 3 then
            if typeITEMequip(1) = 1 then nameITEMequip1$ = epee3$ : print #ini.main, "drawbmp item4a ";case1Ex;" ";case1Ey : nACTIONplayer = 3
            if typeITEMequip(1) = 2 then nameITEMequip1$ = arc3$ : print #ini.main, "drawbmp item4b ";case1Ex;" ";case1Ey : nACTIONplayer = 4
            if typeITEMequip(1) = 3 then nameITEMequip1$ = lance3$ : print #ini.main, "drawbmp item4d ";case1Ex;" ";case1Ey : nACTIONplayer = 3
            if typeITEMequip(1) = 4 then nameITEMequip1$ = hache3$ : print #ini.main, "drawbmp item4c ";case1Ex;" ";case1Ey : nACTIONplayer = 2
            if typeITEMequip(1) = 5 then nameITEMequip1$ = marteau3$ : print #ini.main, "drawbmp item4e ";case1Ex;" ";case1Ey : nACTIONplayer = 1
        end if
        if rareITEMequip(1) = 4 then
            if typeITEMequip(1) = 1 then nameITEMequip1$ = epee4$ : print #ini.main, "drawbmp item5a ";case1Ex;" ";case1Ey : nACTIONplayer = 5
            if typeITEMequip(1) = 2 then nameITEMequip1$ = arc4$ : print #ini.main, "drawbmp item5b ";case1Ex;" ";case1Ey : nACTIONplayer = 5
            if typeITEMequip(1) = 3 then nameITEMequip1$ = lance4$ : print #ini.main, "drawbmp item5d ";case1Ex;" ";case1Ey : nACTIONplayer = 5
            if typeITEMequip(1) = 4 then nameITEMequip1$ = hache4$ : print #ini.main, "drawbmp item5c ";case1Ex;" ";case1Ey : nACTIONplayer = 3
            if typeITEMequip(1) = 5 then nameITEMequip1$ = marteau4$ : print #ini.main, "drawbmp item5e ";case1Ex;" ";case1Ey : nACTIONplayer = 3
        end if
    end if

    if caseITEMequip(2) > 0 then
        if rareITEMequip(2) = 1 then
            if typeITEMequip(2) = 7 then nameITEMequip2$ = armure1$ : print #ini.main, "drawbmp item2g ";case2Ex;" ";case2Ey
        end if
        if rareITEMequip(2) = 2 then
            if typeITEMequip(2) = 7 then nameITEMequip2$ = armure2$ : print #ini.main, "drawbmp item3g ";case2Ex;" ";case2Ey
        end if
        if rareITEMequip(2) = 3 then
            if typeITEMequip(2) = 7 then nameITEMequip2$ = armure3$ : print #ini.main, "drawbmp item4g ";case2Ex;" ";case2Ey
        end if
        if rareITEMequip(2) = 4 then
            if typeITEMequip(2) = 7 then nameITEMequip2$ = armure4$ : print #ini.main, "drawbmp item5g ";case2Ex;" ";case2Ey
        end if
    end if

    if caseITEMequip(3) > 0 then
        if rareITEMequip(3) = 1 then
            if typeITEMequip(3) = 9 then nameITEMequip3$ = casque1$ : print #ini.main, "drawbmp item2i ";case3Ex;" ";case3Ey
        end if
        if rareITEMequip(3) = 2 then
            if typeITEMequip(3) = 9 then nameITEMequip3$ = casque2$ : print #ini.main, "drawbmp item3i ";case3Ex;" ";case3Ey
        end if
        if rareITEMequip(3) = 3 then
            if typeITEMequip(3) = 9 then nameITEMequip3$ = casque3$ : print #ini.main, "drawbmp item4i ";case3Ex;" ";case3Ey
        end if
        if rareITEMequip(3) = 4 then
            if typeITEMequip(3) = 9 then nameITEMequip3$ = casque4$ : print #ini.main, "drawbmp item5i ";case3Ex;" ";case3Ey
        end if
    end if

    if caseITEMequip(4) > 0 then
        if rareITEMequip(4) = 1 then
            if typeITEMequip(4) = 8 then nameITEMequip4$ = chausses1$ : print #ini.main, "drawbmp item2h ";case4Ex;" ";case4Ey
        end if
        if rareITEMequip(4) = 2 then
            if typeITEMequip(4) = 8 then nameITEMequip4$ = chausses2$ : print #ini.main, "drawbmp item3h ";case4Ex;" ";case4Ey
        end if
        if rareITEMequip(4) = 3 then
            if typeITEMequip(4) = 8 then nameITEMequip4$ = chausses3$ : print #ini.main, "drawbmp item4h ";case4Ex;" ";case4Ey
        end if
        if rareITEMequip(4) = 4 then
            if typeITEMequip(4) = 8 then nameITEMequip4$ = chausses4$ : print #ini.main, "drawbmp item5h ";case4Ex;" ";case4Ey
        end if
    end if

    if caseITEMequip(5) > 0 then
        if rareITEMequip(5) = 1 then
            if typeITEMequip(5) = 6 then nameITEMequip5$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case5Ex;" ";case5Ey
        end if
        if rareITEMequip(5) = 2 then
            if typeITEMequip(5) = 6 then nameITEMequip5$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case5Ex;" ";case5Ey
        end if
        if rareITEMequip(5) = 3 then
            if typeITEMequip(5) = 6 then nameITEMequip5$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case5Ex;" ";case5Ey
        end if
        if rareITEMequip(5) = 4 then
            if typeITEMequip(5) = 6 then nameITEMequip5$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case5Ex;" ";case5Ey
        end if
    end if


    if caseITEM(1) > 0 then
        if rareITEM(1) = 1 then
            if typeITEM(1) = 1 then nameITEM1$ = epee1$ : print #ini.main, "drawbmp item2a ";case1x;" ";case1y
            if typeITEM(1) = 2 then nameITEM1$ = arc1$ : print #ini.main, "drawbmp item2b ";case1x;" ";case1y
            if typeITEM(1) = 3 then nameITEM1$ = lance1$ : print #ini.main, "drawbmp item2d ";case1x;" ";case1y
            if typeITEM(1) = 4 then nameITEM1$ = hache1$ : print #ini.main, "drawbmp item2c ";case1x;" ";case1y
            if typeITEM(1) = 5 then nameITEM1$ = marteau1$ : print #ini.main, "drawbmp item2e ";case1x;" ";case1y
            if typeITEM(1) = 6 then nameITEM1$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case1x;" ";case1y
            if typeITEM(1) = 7 then nameITEM1$ = armure1$ : print #ini.main, "drawbmp item2g ";case1x;" ";case1y
            if typeITEM(1) = 8 then nameITEM1$ = chausses1$ : print #ini.main, "drawbmp item2h ";case1x;" ";case1y
            if typeITEM(1) = 9 then nameITEM1$ = casque1$ : print #ini.main, "drawbmp item2i ";case1x;" ";case1y
        end if
        if rareITEM(1) = 2 then
            if typeITEM(1) = 1 then nameITEM1$ = epee2$ : print #ini.main, "drawbmp item3a ";case1x;" ";case1y
            if typeITEM(1) = 2 then nameITEM1$ = arc2$ : print #ini.main, "drawbmp item3b ";case1x;" ";case1y
            if typeITEM(1) = 3 then nameITEM1$ = lance2$ : print #ini.main, "drawbmp item3d ";case1x;" ";case1y
            if typeITEM(1) = 4 then nameITEM1$ = hache2$ : print #ini.main, "drawbmp item3c ";case1x;" ";case1y
            if typeITEM(1) = 5 then nameITEM1$ = marteau2$ : print #ini.main, "drawbmp item3e ";case1x;" ";case1y
            if typeITEM(1) = 6 then nameITEM1$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case1x;" ";case1y
            if typeITEM(1) = 7 then nameITEM1$ = armure2$ : print #ini.main, "drawbmp item3g ";case1x;" ";case1y
            if typeITEM(1) = 8 then nameITEM1$ = chausses2$ : print #ini.main, "drawbmp item3h ";case1x;" ";case1y
            if typeITEM(1) = 9 then nameITEM1$ = casque2$ : print #ini.main, "drawbmp item3i ";case1x;" ";case1y
        end if
        if rareITEM(1) = 3 then
            if typeITEM(1) = 1 then nameITEM1$ = epee3$ : print #ini.main, "drawbmp item4a ";case1x;" ";case1y
            if typeITEM(1) = 2 then nameITEM1$ = arc3$ : print #ini.main, "drawbmp item4b ";case1x;" ";case1y
            if typeITEM(1) = 3 then nameITEM1$ = lance3$ : print #ini.main, "drawbmp item4d ";case1x;" ";case1y
            if typeITEM(1) = 4 then nameITEM1$ = hache3$ : print #ini.main, "drawbmp item4c ";case1x;" ";case1y
            if typeITEM(1) = 5 then nameITEM1$ = marteau3$ : print #ini.main, "drawbmp item4e ";case1x;" ";case1y
            if typeITEM(1) = 6 then nameITEM1$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case1x;" ";case1y
            if typeITEM(1) = 7 then nameITEM1$ = armure3$ : print #ini.main, "drawbmp item4g ";case1x;" ";case1y
            if typeITEM(1) = 8 then nameITEM1$ = chausses3$ : print #ini.main, "drawbmp item4h ";case1x;" ";case1y
            if typeITEM(1) = 9 then nameITEM1$ = casque3$ : print #ini.main, "drawbmp item4i ";case1x;" ";case1y
        end if
        if rareITEM(1) = 4 then
            if typeITEM(1) = 1 then nameITEM1$ = epee4$ : print #ini.main, "drawbmp item5a ";case1x;" ";case1y
            if typeITEM(1) = 2 then nameITEM1$ = arc4$ : print #ini.main, "drawbmp item5b ";case1x;" ";case1y
            if typeITEM(1) = 3 then nameITEM1$ = lance4$ : print #ini.main, "drawbmp item5d ";case1x;" ";case1y
            if typeITEM(1) = 4 then nameITEM1$ = hache4$ : print #ini.main, "drawbmp item5c ";case1x;" ";case1y
            if typeITEM(1) = 5 then nameITEM1$ = marteau4$ : print #ini.main, "drawbmp item5e ";case1x;" ";case1y
            if typeITEM(1) = 6 then nameITEM1$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case1x;" ";case1y
            if typeITEM(1) = 7 then nameITEM1$ = armure4$ : print #ini.main, "drawbmp item5g ";case1x;" ";case1y
            if typeITEM(1) = 8 then nameITEM1$ = chausses4$ : print #ini.main, "drawbmp item5h ";case1x;" ";case1y
            if typeITEM(1) = 9 then nameITEM1$ = casque4$ : print #ini.main, "drawbmp item5i ";case1x;" ";case1y
        end if
    end if
    if caseITEM(2) > 0 then
        if rareITEM(2) = 1 then
            if typeITEM(2) = 1 then nameITEM2$ = epee1$ : print #ini.main, "drawbmp item2a ";case2x;" ";case2y
            if typeITEM(2) = 2 then nameITEM2$ = arc1$ : print #ini.main, "drawbmp item2b ";case2x;" ";case2y
            if typeITEM(2) = 3 then nameITEM2$ = lance1$ : print #ini.main, "drawbmp item2d ";case2x;" ";case2y
            if typeITEM(2) = 4 then nameITEM2$ = hache1$ : print #ini.main, "drawbmp item2c ";case2x;" ";case2y
            if typeITEM(2) = 5 then nameITEM2$ = marteau1$ : print #ini.main, "drawbmp item2e ";case2x;" ";case2y
            if typeITEM(2) = 6 then nameITEM2$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case2x;" ";case2y
            if typeITEM(2) = 7 then nameITEM2$ = armure1$ : print #ini.main, "drawbmp item2g ";case2x;" ";case2y
            if typeITEM(2) = 8 then nameITEM2$ = chausses1$ : print #ini.main, "drawbmp item2h ";case2x;" ";case2y
            if typeITEM(2) = 9 then nameITEM2$ = casque1$ : print #ini.main, "drawbmp item2i ";case2x;" ";case2y
        end if
        if rareITEM(2) = 2 then
            if typeITEM(2) = 1 then nameITEM2$ = epee2$ : print #ini.main, "drawbmp item3a ";case2x;" ";case2y
            if typeITEM(2) = 2 then nameITEM2$ = arc2$ : print #ini.main, "drawbmp item3b ";case2x;" ";case2y
            if typeITEM(2) = 3 then nameITEM2$ = lance2$ : print #ini.main, "drawbmp item3d ";case2x;" ";case2y
            if typeITEM(2) = 4 then nameITEM2$ = hache2$ : print #ini.main, "drawbmp item3c ";case2x;" ";case2y
            if typeITEM(2) = 5 then nameITEM2$ = marteau2$ : print #ini.main, "drawbmp item3e ";case2x;" ";case2y
            if typeITEM(2) = 6 then nameITEM2$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case2x;" ";case2y
            if typeITEM(2) = 7 then nameITEM2$ = armure2$ : print #ini.main, "drawbmp item3g ";case2x;" ";case2y
            if typeITEM(2) = 8 then nameITEM2$ = chausses2$ : print #ini.main, "drawbmp item3h ";case2x;" ";case2y
            if typeITEM(2) = 9 then nameITEM2$ = casque2$ : print #ini.main, "drawbmp item3i ";case2x;" ";case2y
        end if
        if rareITEM(2) = 3 then
            if typeITEM(2) = 1 then nameITEM2$ = epee3$ : print #ini.main, "drawbmp item4a ";case2x;" ";case2y
            if typeITEM(2) = 2 then nameITEM2$ = arc3$ : print #ini.main, "drawbmp item4b ";case2x;" ";case2y
            if typeITEM(2) = 3 then nameITEM2$ = lance3$ : print #ini.main, "drawbmp item4d ";case2x;" ";case2y
            if typeITEM(2) = 4 then nameITEM2$ = hache3$ : print #ini.main, "drawbmp item4c ";case2x;" ";case2y
            if typeITEM(2) = 5 then nameITEM2$ = marteau3$ : print #ini.main, "drawbmp item4e ";case2x;" ";case2y
            if typeITEM(2) = 6 then nameITEM2$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case2x;" ";case2y
            if typeITEM(2) = 7 then nameITEM2$ = armure3$ : print #ini.main, "drawbmp item4g ";case2x;" ";case2y
            if typeITEM(2) = 8 then nameITEM2$ = chausses3$ : print #ini.main, "drawbmp item4h ";case2x;" ";case2y
            if typeITEM(2) = 9 then nameITEM2$ = casque3$ : print #ini.main, "drawbmp item4i ";case2x;" ";case2y
        end if
        if rareITEM(2) = 4 then
            if typeITEM(2) = 1 then nameITEM2$ = epee4$ : print #ini.main, "drawbmp item5a ";case2x;" ";case2y
            if typeITEM(2) = 2 then nameITEM2$ = arc4$ : print #ini.main, "drawbmp item5b ";case2x;" ";case2y
            if typeITEM(2) = 3 then nameITEM2$ = lance4$ : print #ini.main, "drawbmp item5d ";case2x;" ";case2y
            if typeITEM(2) = 4 then nameITEM2$ = hache4$ : print #ini.main, "drawbmp item5c ";case2x;" ";case2y
            if typeITEM(2) = 5 then nameITEM2$ = marteau4$ : print #ini.main, "drawbmp item5e ";case2x;" ";case2y
            if typeITEM(2) = 6 then nameITEM2$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case2x;" ";case2y
            if typeITEM(2) = 7 then nameITEM2$ = armure4$ : print #ini.main, "drawbmp item5g ";case2x;" ";case2y
            if typeITEM(2) = 8 then nameITEM2$ = chausses4$ : print #ini.main, "drawbmp item5h ";case2x;" ";case2y
            if typeITEM(2) = 9 then nameITEM2$ = casque4$ : print #ini.main, "drawbmp item5i ";case2x;" ";case2y
        end if
    end if
    if caseITEM(3) > 0 then
        if rareITEM(3) = 1 then
            if typeITEM(3) = 1 then nameITEM3$ = epee1$ : print #ini.main, "drawbmp item2a ";case3x;" ";case3y
            if typeITEM(3) = 2 then nameITEM3$ = arc1$ : print #ini.main, "drawbmp item2b ";case3x;" ";case3y
            if typeITEM(3) = 3 then nameITEM3$ = lance1$ : print #ini.main, "drawbmp item2d ";case3x;" ";case3y
            if typeITEM(3) = 4 then nameITEM3$ = hache1$ : print #ini.main, "drawbmp item2c ";case3x;" ";case3y
            if typeITEM(3) = 5 then nameITEM3$ = marteau1$ : print #ini.main, "drawbmp item2e ";case3x;" ";case3y
            if typeITEM(3) = 6 then nameITEM3$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case3x;" ";case3y
            if typeITEM(3) = 7 then nameITEM3$ = armure1$ : print #ini.main, "drawbmp item2g ";case3x;" ";case3y
            if typeITEM(3) = 8 then nameITEM3$ = chausses1$ : print #ini.main, "drawbmp item2h ";case3x;" ";case3y
            if typeITEM(3) = 9 then nameITEM3$ = casque1$ : print #ini.main, "drawbmp item2i ";case3x;" ";case3y
        end if
        if rareITEM(3) = 2 then
            if typeITEM(3) = 1 then nameITEM3$ = epee2$ : print #ini.main, "drawbmp item3a ";case3x;" ";case3y
            if typeITEM(3) = 2 then nameITEM3$ = arc2$ : print #ini.main, "drawbmp item3b ";case3x;" ";case3y
            if typeITEM(3) = 3 then nameITEM3$ = lance2$ : print #ini.main, "drawbmp item3d ";case3x;" ";case3y
            if typeITEM(3) = 4 then nameITEM3$ = hache2$ : print #ini.main, "drawbmp item3c ";case3x;" ";case3y
            if typeITEM(3) = 5 then nameITEM3$ = marteau2$ : print #ini.main, "drawbmp item3e ";case3x;" ";case3y
            if typeITEM(3) = 6 then nameITEM3$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case3x;" ";case3y
            if typeITEM(3) = 7 then nameITEM3$ = armure2$ : print #ini.main, "drawbmp item3g ";case3x;" ";case3y
            if typeITEM(3) = 8 then nameITEM3$ = chausses2$ : print #ini.main, "drawbmp item3h ";case3x;" ";case3y
            if typeITEM(3) = 9 then nameITEM3$ = casque2$ : print #ini.main, "drawbmp item3i ";case3x;" ";case3y
        end if
        if rareITEM(3) = 3 then
            if typeITEM(3) = 1 then nameITEM3$ = epee3$ : print #ini.main, "drawbmp item4a ";case3x;" ";case3y
            if typeITEM(3) = 2 then nameITEM3$ = arc3$ : print #ini.main, "drawbmp item4b ";case3x;" ";case3y
            if typeITEM(3) = 3 then nameITEM3$ = lance3$ : print #ini.main, "drawbmp item4d ";case3x;" ";case3y
            if typeITEM(3) = 4 then nameITEM3$ = hache3$ : print #ini.main, "drawbmp item4c ";case3x;" ";case3y
            if typeITEM(3) = 5 then nameITEM3$ = marteau3$ : print #ini.main, "drawbmp item4e ";case3x;" ";case3y
            if typeITEM(3) = 6 then nameITEM3$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case3x;" ";case3y
            if typeITEM(3) = 7 then nameITEM3$ = armure3$ : print #ini.main, "drawbmp item4g ";case3x;" ";case3y
            if typeITEM(3) = 8 then nameITEM3$ = chausses3$ : print #ini.main, "drawbmp item4h ";case3x;" ";case3y
            if typeITEM(3) = 9 then nameITEM3$ = casque3$ : print #ini.main, "drawbmp item4i ";case3x;" ";case3y
        end if
        if rareITEM(3) = 4 then
            if typeITEM(3) = 1 then nameITEM3$ = epee4$ : print #ini.main, "drawbmp item5a ";case3x;" ";case3y
            if typeITEM(3) = 2 then nameITEM3$ = arc4$ : print #ini.main, "drawbmp item5b ";case3x;" ";case3y
            if typeITEM(3) = 3 then nameITEM3$ = lance4$ : print #ini.main, "drawbmp item5d ";case3x;" ";case3y
            if typeITEM(3) = 4 then nameITEM3$ = hache4$ : print #ini.main, "drawbmp item5c ";case3x;" ";case3y
            if typeITEM(3) = 5 then nameITEM3$ = marteau4$ : print #ini.main, "drawbmp item5e ";case3x;" ";case3y
            if typeITEM(3) = 6 then nameITEM3$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case3x;" ";case3y
            if typeITEM(3) = 7 then nameITEM3$ = armure4$ : print #ini.main, "drawbmp item5g ";case3x;" ";case3y
            if typeITEM(3) = 8 then nameITEM3$ = chausses4$ : print #ini.main, "drawbmp item5h ";case3x;" ";case3y
            if typeITEM(3) = 9 then nameITEM3$ = casque4$ : print #ini.main, "drawbmp item5i ";case3x;" ";case3y
        end if
    end if
    if caseITEM(4) > 0 then
        if rareITEM(4) = 1 then
            if typeITEM(4) = 1 then nameITEM4$ = epee1$ : print #ini.main, "drawbmp item2a ";case4x;" ";case4y
            if typeITEM(4) = 2 then nameITEM4$ = arc1$ : print #ini.main, "drawbmp item2b ";case4x;" ";case4y
            if typeITEM(4) = 3 then nameITEM4$ = lance1$ : print #ini.main, "drawbmp item2d ";case4x;" ";case4y
            if typeITEM(4) = 4 then nameITEM4$ = hache1$ : print #ini.main, "drawbmp item2c ";case4x;" ";case4y
            if typeITEM(4) = 5 then nameITEM4$ = marteau1$ : print #ini.main, "drawbmp item2e ";case4x;" ";case4y
            if typeITEM(4) = 6 then nameITEM4$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case4x;" ";case4y
            if typeITEM(4) = 7 then nameITEM4$ = armure1$ : print #ini.main, "drawbmp item2g ";case4x;" ";case4y
            if typeITEM(4) = 8 then nameITEM4$ = chausses1$ : print #ini.main, "drawbmp item2h ";case4x;" ";case4y
            if typeITEM(4) = 9 then nameITEM4$ = casque1$ : print #ini.main, "drawbmp item2i ";case4x;" ";case4y
        end if
        if rareITEM(4) = 2 then
            if typeITEM(4) = 1 then nameITEM4$ = epee2$ : print #ini.main, "drawbmp item3a ";case4x;" ";case4y
            if typeITEM(4) = 2 then nameITEM4$ = arc2$ : print #ini.main, "drawbmp item3b ";case4x;" ";case4y
            if typeITEM(4) = 3 then nameITEM4$ = lance2$ : print #ini.main, "drawbmp item3d ";case4x;" ";case4y
            if typeITEM(4) = 4 then nameITEM4$ = hache2$ : print #ini.main, "drawbmp item3c ";case4x;" ";case4y
            if typeITEM(4) = 5 then nameITEM4$ = marteau2$ : print #ini.main, "drawbmp item3e ";case4x;" ";case4y
            if typeITEM(4) = 6 then nameITEM4$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case4x;" ";case4y
            if typeITEM(4) = 7 then nameITEM4$ = armure2$ : print #ini.main, "drawbmp item3g ";case4x;" ";case4y
            if typeITEM(4) = 8 then nameITEM4$ = chausses2$ : print #ini.main, "drawbmp item3h ";case4x;" ";case4y
            if typeITEM(4) = 9 then nameITEM4$ = casque2$ : print #ini.main, "drawbmp item3i ";case4x;" ";case4y
        end if
        if rareITEM(4) = 3 then
            if typeITEM(4) = 1 then nameITEM4$ = epee3$ : print #ini.main, "drawbmp item4a ";case4x;" ";case4y
            if typeITEM(4) = 2 then nameITEM4$ = arc3$ : print #ini.main, "drawbmp item4b ";case4x;" ";case4y
            if typeITEM(4) = 3 then nameITEM4$ = lance3$ : print #ini.main, "drawbmp item4d ";case4x;" ";case4y
            if typeITEM(4) = 4 then nameITEM4$ = hache3$ : print #ini.main, "drawbmp item4c ";case4x;" ";case4y
            if typeITEM(4) = 5 then nameITEM4$ = marteau3$ : print #ini.main, "drawbmp item4e ";case4x;" ";case4y
            if typeITEM(4) = 6 then nameITEM4$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case4x;" ";case4y
            if typeITEM(4) = 7 then nameITEM4$ = armure3$ : print #ini.main, "drawbmp item4g ";case4x;" ";case4y
            if typeITEM(4) = 8 then nameITEM4$ = chausses3$ : print #ini.main, "drawbmp item4h ";case4x;" ";case4y
            if typeITEM(4) = 9 then nameITEM4$ = casque3$ : print #ini.main, "drawbmp item4i ";case4x;" ";case4y
        end if
        if rareITEM(4) = 4 then
            if typeITEM(4) = 1 then nameITEM4$ = epee4$ : print #ini.main, "drawbmp item5a ";case4x;" ";case4y
            if typeITEM(4) = 2 then nameITEM4$ = arc4$ : print #ini.main, "drawbmp item5b ";case4x;" ";case4y
            if typeITEM(4) = 3 then nameITEM4$ = lance4$ : print #ini.main, "drawbmp item5d ";case4x;" ";case4y
            if typeITEM(4) = 4 then nameITEM4$ = hache4$ : print #ini.main, "drawbmp item5c ";case4x;" ";case4y
            if typeITEM(4) = 5 then nameITEM4$ = marteau4$ : print #ini.main, "drawbmp item5e ";case4x;" ";case4y
            if typeITEM(4) = 6 then nameITEM4$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case4x;" ";case4y
            if typeITEM(4) = 7 then nameITEM4$ = armure4$ : print #ini.main, "drawbmp item5g ";case4x;" ";case4y
            if typeITEM(4) = 8 then nameITEM4$ = chausses4$ : print #ini.main, "drawbmp item5h ";case4x;" ";case4y
            if typeITEM(4) = 9 then nameITEM4$ = casque4$ : print #ini.main, "drawbmp item5i ";case4x;" ";case4y
        end if
    end if
    if caseITEM(5) > 0 then
        if rareITEM(5) = 1 then
            if typeITEM(5) = 1 then nameITEM5$ = epee1$ : print #ini.main, "drawbmp item2a ";case5x;" ";case5y
            if typeITEM(5) = 2 then nameITEM5$ = arc1$ : print #ini.main, "drawbmp item2b ";case5x;" ";case5y
            if typeITEM(5) = 3 then nameITEM5$ = lance1$ : print #ini.main, "drawbmp item2d ";case5x;" ";case5y
            if typeITEM(5) = 4 then nameITEM5$ = hache1$ : print #ini.main, "drawbmp item2c ";case5x;" ";case5y
            if typeITEM(5) = 5 then nameITEM5$ = marteau1$ : print #ini.main, "drawbmp item2e ";case5x;" ";case5y
            if typeITEM(5) = 6 then nameITEM5$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case5x;" ";case5y
            if typeITEM(5) = 7 then nameITEM5$ = armure1$ : print #ini.main, "drawbmp item2g ";case5x;" ";case5y
            if typeITEM(5) = 8 then nameITEM5$ = chausses1$ : print #ini.main, "drawbmp item2h ";case5x;" ";case5y
            if typeITEM(5) = 9 then nameITEM5$ = casque1$ : print #ini.main, "drawbmp item2i ";case5x;" ";case5y
        end if
        if rareITEM(5) = 2 then
            if typeITEM(5) = 1 then nameITEM5$ = epee2$ : print #ini.main, "drawbmp item3a ";case5x;" ";case5y
            if typeITEM(5) = 2 then nameITEM5$ = arc2$ : print #ini.main, "drawbmp item3b ";case5x;" ";case5y
            if typeITEM(5) = 3 then nameITEM5$ = lance2$ : print #ini.main, "drawbmp item3d ";case5x;" ";case5y
            if typeITEM(5) = 4 then nameITEM5$ = hache2$ : print #ini.main, "drawbmp item3c ";case5x;" ";case5y
            if typeITEM(5) = 5 then nameITEM5$ = marteau2$ : print #ini.main, "drawbmp item3e ";case5x;" ";case5y
            if typeITEM(5) = 6 then nameITEM5$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case5x;" ";case5y
            if typeITEM(5) = 7 then nameITEM5$ = armure2$ : print #ini.main, "drawbmp item3g ";case5x;" ";case5y
            if typeITEM(5) = 8 then nameITEM5$ = chausses2$ : print #ini.main, "drawbmp item3h ";case5x;" ";case5y
            if typeITEM(5) = 9 then nameITEM5$ = casque2$ : print #ini.main, "drawbmp item3i ";case5x;" ";case5y
        end if
        if rareITEM(5) = 3 then
            if typeITEM(5) = 1 then nameITEM5$ = epee3$ : print #ini.main, "drawbmp item4a ";case5x;" ";case5y
            if typeITEM(5) = 2 then nameITEM5$ = arc3$ : print #ini.main, "drawbmp item4b ";case5x;" ";case5y
            if typeITEM(5) = 3 then nameITEM5$ = lance3$ : print #ini.main, "drawbmp item4d ";case5x;" ";case5y
            if typeITEM(5) = 4 then nameITEM5$ = hache3$ : print #ini.main, "drawbmp item4c ";case5x;" ";case5y
            if typeITEM(5) = 5 then nameITEM5$ = marteau3$ : print #ini.main, "drawbmp item4e ";case5x;" ";case5y
            if typeITEM(5) = 6 then nameITEM5$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case5x;" ";case5y
            if typeITEM(5) = 7 then nameITEM5$ = armure3$ : print #ini.main, "drawbmp item4g ";case5x;" ";case5y
            if typeITEM(5) = 8 then nameITEM5$ = chausses3$ : print #ini.main, "drawbmp item4h ";case5x;" ";case5y
            if typeITEM(5) = 9 then nameITEM5$ = casque3$ : print #ini.main, "drawbmp item4i ";case5x;" ";case5y
        end if
        if rareITEM(5) = 4 then
            if typeITEM(5) = 1 then nameITEM5$ = epee4$ : print #ini.main, "drawbmp item5a ";case5x;" ";case5y
            if typeITEM(5) = 2 then nameITEM5$ = arc4$ : print #ini.main, "drawbmp item5b ";case5x;" ";case5y
            if typeITEM(5) = 3 then nameITEM5$ = lance4$ : print #ini.main, "drawbmp item5d ";case5x;" ";case5y
            if typeITEM(5) = 4 then nameITEM5$ = hache4$ : print #ini.main, "drawbmp item5c ";case5x;" ";case5y
            if typeITEM(5) = 5 then nameITEM5$ = marteau4$ : print #ini.main, "drawbmp item5e ";case5x;" ";case5y
            if typeITEM(5) = 6 then nameITEM5$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case5x;" ";case5y
            if typeITEM(5) = 7 then nameITEM5$ = armure4$ : print #ini.main, "drawbmp item5g ";case5x;" ";case5y
            if typeITEM(5) = 8 then nameITEM5$ = chausses4$ : print #ini.main, "drawbmp item5h ";case5x;" ";case5y
            if typeITEM(5) = 9 then nameITEM5$ = casque4$ : print #ini.main, "drawbmp item5i ";case5x;" ";case5y
        end if
    end if
    if caseITEM(6) > 0 then
        if rareITEM(6) = 1 then
            if typeITEM(6) = 1 then nameITEM6$ = epee1$ : print #ini.main, "drawbmp item2a ";case6x;" ";case6y
            if typeITEM(6) = 2 then nameITEM6$ = arc1$ : print #ini.main, "drawbmp item2b ";case6x;" ";case6y
            if typeITEM(6) = 3 then nameITEM6$ = lance1$ : print #ini.main, "drawbmp item2d ";case6x;" ";case6y
            if typeITEM(6) = 4 then nameITEM6$ = hache1$ : print #ini.main, "drawbmp item2c ";case6x;" ";case6y
            if typeITEM(6) = 5 then nameITEM6$ = marteau1$ : print #ini.main, "drawbmp item2e ";case6x;" ";case6y
            if typeITEM(6) = 6 then nameITEM6$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case6x;" ";case6y
            if typeITEM(6) = 7 then nameITEM6$ = armure1$ : print #ini.main, "drawbmp item2g ";case6x;" ";case6y
            if typeITEM(6) = 8 then nameITEM6$ = chausses1$ : print #ini.main, "drawbmp item2h ";case6x;" ";case6y
            if typeITEM(6) = 9 then nameITEM6$ = casque1$ : print #ini.main, "drawbmp item2i ";case6x;" ";case6y
        end if
        if rareITEM(6) = 2 then
            if typeITEM(6) = 1 then nameITEM6$ = epee2$ : print #ini.main, "drawbmp item3a ";case6x;" ";case6y
            if typeITEM(6) = 2 then nameITEM6$ = arc2$ : print #ini.main, "drawbmp item3b ";case6x;" ";case6y
            if typeITEM(6) = 3 then nameITEM6$ = lance2$ : print #ini.main, "drawbmp item3d ";case6x;" ";case6y
            if typeITEM(6) = 4 then nameITEM6$ = hache2$ : print #ini.main, "drawbmp item3c ";case6x;" ";case6y
            if typeITEM(6) = 5 then nameITEM6$ = marteau2$ : print #ini.main, "drawbmp item3e ";case6x;" ";case6y
            if typeITEM(6) = 6 then nameITEM6$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case6x;" ";case6y
            if typeITEM(6) = 7 then nameITEM6$ = armure2$ : print #ini.main, "drawbmp item3g ";case6x;" ";case6y
            if typeITEM(6) = 8 then nameITEM6$ = chausses2$ : print #ini.main, "drawbmp item3h ";case6x;" ";case6y
            if typeITEM(6) = 9 then nameITEM6$ = casque2$ : print #ini.main, "drawbmp item3i ";case6x;" ";case6y
        end if
        if rareITEM(6) = 3 then
            if typeITEM(6) = 1 then nameITEM6$ = epee3$ : print #ini.main, "drawbmp item4a ";case6x;" ";case6y
            if typeITEM(6) = 2 then nameITEM6$ = arc3$ : print #ini.main, "drawbmp item4b ";case6x;" ";case6y
            if typeITEM(6) = 3 then nameITEM6$ = lance3$ : print #ini.main, "drawbmp item4d ";case6x;" ";case6y
            if typeITEM(6) = 4 then nameITEM6$ = hache3$ : print #ini.main, "drawbmp item4c ";case6x;" ";case6y
            if typeITEM(6) = 5 then nameITEM6$ = marteau3$ : print #ini.main, "drawbmp item4e ";case6x;" ";case6y
            if typeITEM(6) = 6 then nameITEM6$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case6x;" ";case6y
            if typeITEM(6) = 7 then nameITEM6$ = armure3$ : print #ini.main, "drawbmp item4g ";case6x;" ";case6y
            if typeITEM(6) = 8 then nameITEM6$ = chausses3$ : print #ini.main, "drawbmp item4h ";case6x;" ";case6y
            if typeITEM(6) = 9 then nameITEM6$ = casque3$ : print #ini.main, "drawbmp item4i ";case6x;" ";case6y
        end if
        if rareITEM(6) = 4 then
            if typeITEM(6) = 1 then nameITEM6$ = epee4$ : print #ini.main, "drawbmp item5a ";case6x;" ";case6y
            if typeITEM(6) = 2 then nameITEM6$ = arc4$ : print #ini.main, "drawbmp item5b ";case6x;" ";case6y
            if typeITEM(6) = 3 then nameITEM6$ = lance4$ : print #ini.main, "drawbmp item5d ";case6x;" ";case6y
            if typeITEM(6) = 4 then nameITEM6$ = hache4$ : print #ini.main, "drawbmp item5c ";case6x;" ";case6y
            if typeITEM(6) = 5 then nameITEM6$ = marteau4$ : print #ini.main, "drawbmp item5e ";case6x;" ";case6y
            if typeITEM(6) = 6 then nameITEM6$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case6x;" ";case6y
            if typeITEM(6) = 7 then nameITEM6$ = armure4$ : print #ini.main, "drawbmp item5g ";case6x;" ";case6y
            if typeITEM(6) = 8 then nameITEM6$ = chausses4$ : print #ini.main, "drawbmp item5h ";case6x;" ";case6y
            if typeITEM(6) = 9 then nameITEM6$ = casque4$ : print #ini.main, "drawbmp item5i ";case6x;" ";case6y
        end if
    end if
    if caseITEM(7) > 0 then
        if rareITEM(7) = 1 then
            if typeITEM(7) = 1 then nameITEM7$ = epee1$ : print #ini.main, "drawbmp item2a ";case7x;" ";case7y
            if typeITEM(7) = 2 then nameITEM7$ = arc1$ : print #ini.main, "drawbmp item2b ";case7x;" ";case7y
            if typeITEM(7) = 3 then nameITEM7$ = lance1$ : print #ini.main, "drawbmp item2d ";case7x;" ";case7y
            if typeITEM(7) = 4 then nameITEM7$ = hache1$ : print #ini.main, "drawbmp item2c ";case7x;" ";case7y
            if typeITEM(7) = 5 then nameITEM7$ = marteau1$ : print #ini.main, "drawbmp item2e ";case7x;" ";case7y
            if typeITEM(7) = 6 then nameITEM7$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case7x;" ";case7y
            if typeITEM(7) = 7 then nameITEM7$ = armure1$ : print #ini.main, "drawbmp item2g ";case7x;" ";case7y
            if typeITEM(7) = 8 then nameITEM7$ = chausses1$ : print #ini.main, "drawbmp item2h ";case7x;" ";case7y
            if typeITEM(7) = 9 then nameITEM7$ = casque1$ : print #ini.main, "drawbmp item2i ";case7x;" ";case7y
        end if
        if rareITEM(7) = 2 then
            if typeITEM(7) = 1 then nameITEM7$ = epee2$ : print #ini.main, "drawbmp item3a ";case7x;" ";case7y
            if typeITEM(7) = 2 then nameITEM7$ = arc2$ : print #ini.main, "drawbmp item3b ";case7x;" ";case7y
            if typeITEM(7) = 3 then nameITEM7$ = lance2$ : print #ini.main, "drawbmp item3d ";case7x;" ";case7y
            if typeITEM(7) = 4 then nameITEM7$ = hache2$ : print #ini.main, "drawbmp item3c ";case7x;" ";case7y
            if typeITEM(7) = 5 then nameITEM7$ = marteau2$ : print #ini.main, "drawbmp item3e ";case7x;" ";case7y
            if typeITEM(7) = 6 then nameITEM7$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case7x;" ";case7y
            if typeITEM(7) = 7 then nameITEM7$ = armure2$ : print #ini.main, "drawbmp item3g ";case7x;" ";case7y
            if typeITEM(7) = 8 then nameITEM7$ = chausses2$ : print #ini.main, "drawbmp item3h ";case7x;" ";case7y
            if typeITEM(7) = 9 then nameITEM7$ = casque2$ : print #ini.main, "drawbmp item3i ";case7x;" ";case7y
        end if
        if rareITEM(7) = 3 then
            if typeITEM(7) = 1 then nameITEM7$ = epee3$ : print #ini.main, "drawbmp item4a ";case7x;" ";case7y
            if typeITEM(7) = 2 then nameITEM7$ = arc3$ : print #ini.main, "drawbmp item4b ";case7x;" ";case7y
            if typeITEM(7) = 3 then nameITEM7$ = lance3$ : print #ini.main, "drawbmp item4d ";case7x;" ";case7y
            if typeITEM(7) = 4 then nameITEM7$ = hache3$ : print #ini.main, "drawbmp item4c ";case7x;" ";case7y
            if typeITEM(7) = 5 then nameITEM7$ = marteau3$ : print #ini.main, "drawbmp item4e ";case7x;" ";case7y
            if typeITEM(7) = 6 then nameITEM7$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case7x;" ";case7y
            if typeITEM(7) = 7 then nameITEM7$ = armure3$ : print #ini.main, "drawbmp item4g ";case7x;" ";case7y
            if typeITEM(7) = 8 then nameITEM7$ = chausses3$ : print #ini.main, "drawbmp item4h ";case7x;" ";case7y
            if typeITEM(7) = 9 then nameITEM7$ = casque3$ : print #ini.main, "drawbmp item4i ";case7x;" ";case7y
        end if
        if rareITEM(7) = 4 then
            if typeITEM(7) = 1 then nameITEM7$ = epee4$ : print #ini.main, "drawbmp item5a ";case7x;" ";case7y
            if typeITEM(7) = 2 then nameITEM7$ = arc4$ : print #ini.main, "drawbmp item5b ";case7x;" ";case7y
            if typeITEM(7) = 3 then nameITEM7$ = lance4$ : print #ini.main, "drawbmp item5d ";case7x;" ";case7y
            if typeITEM(7) = 4 then nameITEM7$ = hache4$ : print #ini.main, "drawbmp item5c ";case7x;" ";case7y
            if typeITEM(7) = 5 then nameITEM7$ = marteau4$ : print #ini.main, "drawbmp item5e ";case7x;" ";case7y
            if typeITEM(7) = 6 then nameITEM7$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case7x;" ";case7y
            if typeITEM(7) = 7 then nameITEM7$ = armure4$ : print #ini.main, "drawbmp item5g ";case7x;" ";case7y
            if typeITEM(7) = 8 then nameITEM7$ = chausses4$ : print #ini.main, "drawbmp item5h ";case7x;" ";case7y
            if typeITEM(7) = 9 then nameITEM7$ = casque4$ : print #ini.main, "drawbmp item5i ";case7x;" ";case7y
        end if
    end if
    if caseITEM(8) > 0 then
        if rareITEM(8) = 1 then
            if typeITEM(8) = 1 then nameITEM8$ = epee1$ : print #ini.main, "drawbmp item2a ";case8x;" ";case8y
            if typeITEM(8) = 2 then nameITEM8$ = arc1$ : print #ini.main, "drawbmp item2b ";case8x;" ";case8y
            if typeITEM(8) = 3 then nameITEM8$ = lance1$ : print #ini.main, "drawbmp item2d ";case8x;" ";case8y
            if typeITEM(8) = 4 then nameITEM8$ = hache1$ : print #ini.main, "drawbmp item2c ";case8x;" ";case8y
            if typeITEM(8) = 5 then nameITEM8$ = marteau1$ : print #ini.main, "drawbmp item2e ";case8x;" ";case8y
            if typeITEM(8) = 6 then nameITEM8$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case8x;" ";case8y
            if typeITEM(8) = 7 then nameITEM8$ = armure1$ : print #ini.main, "drawbmp item2g ";case8x;" ";case8y
            if typeITEM(8) = 8 then nameITEM8$ = chausses1$ : print #ini.main, "drawbmp item2h ";case8x;" ";case8y
            if typeITEM(8) = 9 then nameITEM8$ = casque1$ : print #ini.main, "drawbmp item2i ";case8x;" ";case8y
        end if
        if rareITEM(8) = 2 then
            if typeITEM(8) = 1 then nameITEM8$ = epee2$ : print #ini.main, "drawbmp item3a ";case8x;" ";case8y
            if typeITEM(8) = 2 then nameITEM8$ = arc2$ : print #ini.main, "drawbmp item3b ";case8x;" ";case8y
            if typeITEM(8) = 3 then nameITEM8$ = lance2$ : print #ini.main, "drawbmp item3d ";case8x;" ";case8y
            if typeITEM(8) = 4 then nameITEM8$ = hache2$ : print #ini.main, "drawbmp item3c ";case8x;" ";case8y
            if typeITEM(8) = 5 then nameITEM8$ = marteau2$ : print #ini.main, "drawbmp item3e ";case8x;" ";case8y
            if typeITEM(8) = 6 then nameITEM8$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case8x;" ";case8y
            if typeITEM(8) = 7 then nameITEM8$ = armure2$ : print #ini.main, "drawbmp item3g ";case8x;" ";case8y
            if typeITEM(8) = 8 then nameITEM8$ = chausses2$ : print #ini.main, "drawbmp item3h ";case8x;" ";case8y
            if typeITEM(8) = 9 then nameITEM8$ = casque2$ : print #ini.main, "drawbmp item3i ";case8x;" ";case8y
        end if
        if rareITEM(8) = 3 then
            if typeITEM(8) = 1 then nameITEM8$ = epee3$ : print #ini.main, "drawbmp item4a ";case8x;" ";case8y
            if typeITEM(8) = 2 then nameITEM8$ = arc3$ : print #ini.main, "drawbmp item4b ";case8x;" ";case8y
            if typeITEM(8) = 3 then nameITEM8$ = lance3$ : print #ini.main, "drawbmp item4d ";case8x;" ";case8y
            if typeITEM(8) = 4 then nameITEM8$ = hache3$ : print #ini.main, "drawbmp item4c ";case8x;" ";case8y
            if typeITEM(8) = 5 then nameITEM8$ = marteau3$ : print #ini.main, "drawbmp item4e ";case8x;" ";case8y
            if typeITEM(8) = 6 then nameITEM8$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case8x;" ";case8y
            if typeITEM(8) = 7 then nameITEM8$ = armure3$ : print #ini.main, "drawbmp item4g ";case8x;" ";case8y
            if typeITEM(8) = 8 then nameITEM8$ = chausses3$ : print #ini.main, "drawbmp item4h ";case8x;" ";case8y
            if typeITEM(8) = 9 then nameITEM8$ = casque3$ : print #ini.main, "drawbmp item4i ";case8x;" ";case8y
        end if
        if rareITEM(8) = 4 then
            if typeITEM(8) = 1 then nameITEM8$ = epee4$ : print #ini.main, "drawbmp item5a ";case8x;" ";case8y
            if typeITEM(8) = 2 then nameITEM8$ = arc4$ : print #ini.main, "drawbmp item5b ";case8x;" ";case8y
            if typeITEM(8) = 3 then nameITEM8$ = lance4$ : print #ini.main, "drawbmp item5d ";case8x;" ";case8y
            if typeITEM(8) = 4 then nameITEM8$ = hache4$ : print #ini.main, "drawbmp item5c ";case8x;" ";case8y
            if typeITEM(8) = 5 then nameITEM8$ = marteau4$ : print #ini.main, "drawbmp item5e ";case8x;" ";case8y
            if typeITEM(8) = 6 then nameITEM8$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case8x;" ";case8y
            if typeITEM(8) = 7 then nameITEM8$ = armure4$ : print #ini.main, "drawbmp item5g ";case8x;" ";case8y
            if typeITEM(8) = 8 then nameITEM8$ = chausses4$ : print #ini.main, "drawbmp item5h ";case8x;" ";case8y
            if typeITEM(8) = 9 then nameITEM8$ = casque4$ : print #ini.main, "drawbmp item5i ";case8x;" ";case8y
        end if
    end if
    if caseITEM(9) > 0 then
        if rareITEM(9) = 1 then
            if typeITEM(9) = 1 then nameITEM9$ = epee1$ : print #ini.main, "drawbmp item2a ";case9x;" ";case9y
            if typeITEM(9) = 2 then nameITEM9$ = arc1$ : print #ini.main, "drawbmp item2b ";case9x;" ";case9y
            if typeITEM(9) = 3 then nameITEM9$ = lance1$ : print #ini.main, "drawbmp item2d ";case9x;" ";case9y
            if typeITEM(9) = 4 then nameITEM9$ = hache1$ : print #ini.main, "drawbmp item2c ";case9x;" ";case9y
            if typeITEM(9) = 5 then nameITEM9$ = marteau1$ : print #ini.main, "drawbmp item2e ";case9x;" ";case9y
            if typeITEM(9) = 6 then nameITEM9$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case9x;" ";case9y
            if typeITEM(9) = 7 then nameITEM9$ = armure1$ : print #ini.main, "drawbmp item2g ";case9x;" ";case9y
            if typeITEM(9) = 8 then nameITEM9$ = chausses1$ : print #ini.main, "drawbmp item2h ";case9x;" ";case9y
            if typeITEM(9) = 9 then nameITEM9$ = casque1$ : print #ini.main, "drawbmp item2i ";case9x;" ";case9y
        end if
        if rareITEM(9) = 2 then
            if typeITEM(9) = 1 then nameITEM9$ = epee2$ : print #ini.main, "drawbmp item3a ";case9x;" ";case9y
            if typeITEM(9) = 2 then nameITEM9$ = arc2$ : print #ini.main, "drawbmp item3b ";case9x;" ";case9y
            if typeITEM(9) = 3 then nameITEM9$ = lance2$ : print #ini.main, "drawbmp item3d ";case9x;" ";case9y
            if typeITEM(9) = 4 then nameITEM9$ = hache2$ : print #ini.main, "drawbmp item3c ";case9x;" ";case9y
            if typeITEM(9) = 5 then nameITEM9$ = marteau2$ : print #ini.main, "drawbmp item3e ";case9x;" ";case9y
            if typeITEM(9) = 6 then nameITEM9$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case9x;" ";case9y
            if typeITEM(9) = 7 then nameITEM9$ = armure2$ : print #ini.main, "drawbmp item3g ";case9x;" ";case9y
            if typeITEM(9) = 8 then nameITEM9$ = chausses2$ : print #ini.main, "drawbmp item3h ";case9x;" ";case9y
            if typeITEM(9) = 9 then nameITEM9$ = casque2$ : print #ini.main, "drawbmp item3i ";case9x;" ";case9y
        end if
        if rareITEM(9) = 3 then
            if typeITEM(9) = 1 then nameITEM9$ = epee3$ : print #ini.main, "drawbmp item4a ";case9x;" ";case9y
            if typeITEM(9) = 2 then nameITEM9$ = arc3$ : print #ini.main, "drawbmp item4b ";case9x;" ";case9y
            if typeITEM(9) = 3 then nameITEM9$ = lance3$ : print #ini.main, "drawbmp item4d ";case9x;" ";case9y
            if typeITEM(9) = 4 then nameITEM9$ = hache3$ : print #ini.main, "drawbmp item4c ";case9x;" ";case9y
            if typeITEM(9) = 5 then nameITEM9$ = marteau3$ : print #ini.main, "drawbmp item4e ";case9x;" ";case9y
            if typeITEM(9) = 6 then nameITEM9$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case9x;" ";case9y
            if typeITEM(9) = 7 then nameITEM9$ = armure3$ : print #ini.main, "drawbmp item4g ";case9x;" ";case9y
            if typeITEM(9) = 8 then nameITEM9$ = chausses3$ : print #ini.main, "drawbmp item4h ";case9x;" ";case9y
            if typeITEM(9) = 9 then nameITEM9$ = casque3$ : print #ini.main, "drawbmp item4i ";case9x;" ";case9y
        end if
        if rareITEM(9) = 4 then
            if typeITEM(9) = 1 then nameITEM9$ = epee4$ : print #ini.main, "drawbmp item5a ";case9x;" ";case9y
            if typeITEM(9) = 2 then nameITEM9$ = arc4$ : print #ini.main, "drawbmp item5b ";case9x;" ";case9y
            if typeITEM(9) = 3 then nameITEM9$ = lance4$ : print #ini.main, "drawbmp item5d ";case9x;" ";case9y
            if typeITEM(9) = 4 then nameITEM9$ = hache4$ : print #ini.main, "drawbmp item5c ";case9x;" ";case9y
            if typeITEM(9) = 5 then nameITEM9$ = marteau4$ : print #ini.main, "drawbmp item5e ";case9x;" ";case9y
            if typeITEM(9) = 6 then nameITEM9$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case9x;" ";case9y
            if typeITEM(9) = 7 then nameITEM9$ = armure4$ : print #ini.main, "drawbmp item5g ";case9x;" ";case9y
            if typeITEM(9) = 8 then nameITEM9$ = chausses4$ : print #ini.main, "drawbmp item5h ";case9x;" ";case9y
            if typeITEM(9) = 9 then nameITEM9$ = casque4$ : print #ini.main, "drawbmp item5i ";case9x;" ";case9y
        end if
    end if
    if caseITEM(10) > 0 then
        if rareITEM(10) = 1 then
            if typeITEM(10) = 1 then nameITEM10$ = epee1$ : print #ini.main, "drawbmp item2a ";case10x;" ";case10y
            if typeITEM(10) = 2 then nameITEM10$ = arc1$ : print #ini.main, "drawbmp item2b ";case10x;" ";case10y
            if typeITEM(10) = 3 then nameITEM10$ = lance1$ : print #ini.main, "drawbmp item2d ";case10x;" ";case10y
            if typeITEM(10) = 4 then nameITEM10$ = hache1$ : print #ini.main, "drawbmp item2c ";case10x;" ";case10y
            if typeITEM(10) = 5 then nameITEM10$ = marteau1$ : print #ini.main, "drawbmp item2e ";case10x;" ";case10y
            if typeITEM(10) = 6 then nameITEM10$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case10x;" ";case10y
            if typeITEM(10) = 7 then nameITEM10$ = armure1$ : print #ini.main, "drawbmp item2g ";case10x;" ";case10y
            if typeITEM(10) = 8 then nameITEM10$ = chausses1$ : print #ini.main, "drawbmp item2h ";case10x;" ";case10y
            if typeITEM(10) = 9 then nameITEM10$ = casque1$ : print #ini.main, "drawbmp item2i ";case10x;" ";case10y
        end if
        if rareITEM(10) = 2 then
            if typeITEM(10) = 1 then nameITEM10$ = epee2$ : print #ini.main, "drawbmp item3a ";case10x;" ";case10y
            if typeITEM(10) = 2 then nameITEM10$ = arc2$ : print #ini.main, "drawbmp item3b ";case10x;" ";case10y
            if typeITEM(10) = 3 then nameITEM10$ = lance2$ : print #ini.main, "drawbmp item3d ";case10x;" ";case10y
            if typeITEM(10) = 4 then nameITEM10$ = hache2$ : print #ini.main, "drawbmp item3c ";case10x;" ";case10y
            if typeITEM(10) = 5 then nameITEM10$ = marteau2$ : print #ini.main, "drawbmp item3e ";case10x;" ";case10y
            if typeITEM(10) = 6 then nameITEM10$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case10x;" ";case10y
            if typeITEM(10) = 7 then nameITEM10$ = armure2$ : print #ini.main, "drawbmp item3g ";case10x;" ";case10y
            if typeITEM(10) = 8 then nameITEM10$ = chausses2$ : print #ini.main, "drawbmp item3h ";case10x;" ";case10y
            if typeITEM(10) = 9 then nameITEM10$ = casque2$ : print #ini.main, "drawbmp item3i ";case10x;" ";case10y
        end if
        if rareITEM(10) = 3 then
            if typeITEM(10) = 1 then nameITEM10$ = epee3$ : print #ini.main, "drawbmp item4a ";case10x;" ";case10y
            if typeITEM(10) = 2 then nameITEM10$ = arc3$ : print #ini.main, "drawbmp item4b ";case10x;" ";case10y
            if typeITEM(10) = 3 then nameITEM10$ = lance3$ : print #ini.main, "drawbmp item4d ";case10x;" ";case10y
            if typeITEM(10) = 4 then nameITEM10$ = hache3$ : print #ini.main, "drawbmp item4c ";case10x;" ";case10y
            if typeITEM(10) = 5 then nameITEM10$ = marteau3$ : print #ini.main, "drawbmp item4e ";case10x;" ";case10y
            if typeITEM(10) = 6 then nameITEM10$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case10x;" ";case10y
            if typeITEM(10) = 7 then nameITEM10$ = armure3$ : print #ini.main, "drawbmp item4g ";case10x;" ";case10y
            if typeITEM(10) = 8 then nameITEM10$ = chausses3$ : print #ini.main, "drawbmp item4h ";case10x;" ";case10y
            if typeITEM(10) = 9 then nameITEM10$ = casque3$ : print #ini.main, "drawbmp item4i ";case10x;" ";case10y
        end if
        if rareITEM(10) = 4 then
            if typeITEM(10) = 1 then nameITEM10$ = epee4$ : print #ini.main, "drawbmp item5a ";case10x;" ";case10y
            if typeITEM(10) = 2 then nameITEM10$ = arc4$ : print #ini.main, "drawbmp item5b ";case10x;" ";case10y
            if typeITEM(10) = 3 then nameITEM10$ = lance4$ : print #ini.main, "drawbmp item5d ";case10x;" ";case10y
            if typeITEM(10) = 4 then nameITEM10$ = hache4$ : print #ini.main, "drawbmp item5c ";case10x;" ";case10y
            if typeITEM(10) = 5 then nameITEM10$ = marteau4$ : print #ini.main, "drawbmp item5e ";case10x;" ";case10y
            if typeITEM(10) = 6 then nameITEM10$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case10x;" ";case10y
            if typeITEM(10) = 7 then nameITEM10$ = armure4$ : print #ini.main, "drawbmp item5g ";case10x;" ";case10y
            if typeITEM(10) = 8 then nameITEM10$ = chausses4$ : print #ini.main, "drawbmp item5h ";case10x;" ";case10y
            if typeITEM(10) = 9 then nameITEM10$ = casque4$ : print #ini.main, "drawbmp item5i ";case10x;" ";case10y
        end if
    end if
    if caseITEM(11) > 0 then
        if rareITEM(11) = 1 then
            if typeITEM(11) = 1 then nameITEM11$ = epee1$ : print #ini.main, "drawbmp item2a ";case11x;" ";case11y
            if typeITEM(11) = 2 then nameITEM11$ = arc1$ : print #ini.main, "drawbmp item2b ";case11x;" ";case11y
            if typeITEM(11) = 3 then nameITEM11$ = lance1$ : print #ini.main, "drawbmp item2d ";case11x;" ";case11y
            if typeITEM(11) = 4 then nameITEM11$ = hache1$ : print #ini.main, "drawbmp item2c ";case11x;" ";case11y
            if typeITEM(11) = 5 then nameITEM11$ = marteau1$ : print #ini.main, "drawbmp item2e ";case11x;" ";case11y
            if typeITEM(11) = 6 then nameITEM11$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case11x;" ";case11y
            if typeITEM(11) = 7 then nameITEM11$ = armure1$ : print #ini.main, "drawbmp item2g ";case11x;" ";case11y
            if typeITEM(11) = 8 then nameITEM11$ = chausses1$ : print #ini.main, "drawbmp item2h ";case11x;" ";case11y
            if typeITEM(11) = 9 then nameITEM11$ = casque1$ : print #ini.main, "drawbmp item2i ";case11x;" ";case11y
        end if
        if rareITEM(11) = 2 then
            if typeITEM(11) = 1 then nameITEM11$ = epee2$ : print #ini.main, "drawbmp item3a ";case11x;" ";case11y
            if typeITEM(11) = 2 then nameITEM11$ = arc2$ : print #ini.main, "drawbmp item3b ";case11x;" ";case11y
            if typeITEM(11) = 3 then nameITEM11$ = lance2$ : print #ini.main, "drawbmp item3d ";case11x;" ";case11y
            if typeITEM(11) = 4 then nameITEM11$ = hache2$ : print #ini.main, "drawbmp item3c ";case11x;" ";case11y
            if typeITEM(11) = 5 then nameITEM11$ = marteau2$ : print #ini.main, "drawbmp item3e ";case11x;" ";case11y
            if typeITEM(11) = 6 then nameITEM11$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case11x;" ";case11y
            if typeITEM(11) = 7 then nameITEM11$ = armure2$ : print #ini.main, "drawbmp item3g ";case11x;" ";case11y
            if typeITEM(11) = 8 then nameITEM11$ = chausses2$ : print #ini.main, "drawbmp item3h ";case11x;" ";case11y
            if typeITEM(11) = 9 then nameITEM11$ = casque2$ : print #ini.main, "drawbmp item3i ";case11x;" ";case11y
        end if
        if rareITEM(11) = 3 then
            if typeITEM(11) = 1 then nameITEM11$ = epee3$ : print #ini.main, "drawbmp item4a ";case11x;" ";case11y
            if typeITEM(11) = 2 then nameITEM11$ = arc3$ : print #ini.main, "drawbmp item4b ";case11x;" ";case11y
            if typeITEM(11) = 3 then nameITEM11$ = lance3$ : print #ini.main, "drawbmp item4d ";case11x;" ";case11y
            if typeITEM(11) = 4 then nameITEM11$ = hache3$ : print #ini.main, "drawbmp item4c ";case11x;" ";case11y
            if typeITEM(11) = 5 then nameITEM11$ = marteau3$ : print #ini.main, "drawbmp item4e ";case11x;" ";case11y
            if typeITEM(11) = 6 then nameITEM11$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case11x;" ";case11y
            if typeITEM(11) = 7 then nameITEM11$ = armure3$ : print #ini.main, "drawbmp item4g ";case11x;" ";case11y
            if typeITEM(11) = 8 then nameITEM11$ = chausses3$ : print #ini.main, "drawbmp item4h ";case11x;" ";case11y
            if typeITEM(11) = 9 then nameITEM11$ = casque3$ : print #ini.main, "drawbmp item4i ";case11x;" ";case11y
        end if
        if rareITEM(11) = 4 then
            if typeITEM(11) = 1 then nameITEM11$ = epee4$ : print #ini.main, "drawbmp item5a ";case11x;" ";case11y
            if typeITEM(11) = 2 then nameITEM11$ = arc4$ : print #ini.main, "drawbmp item5b ";case11x;" ";case11y
            if typeITEM(11) = 3 then nameITEM11$ = lance4$ : print #ini.main, "drawbmp item5d ";case11x;" ";case11y
            if typeITEM(11) = 4 then nameITEM11$ = hache4$ : print #ini.main, "drawbmp item5c ";case11x;" ";case11y
            if typeITEM(11) = 5 then nameITEM11$ = marteau4$ : print #ini.main, "drawbmp item5e ";case11x;" ";case11y
            if typeITEM(11) = 6 then nameITEM11$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case11x;" ";case11y
            if typeITEM(11) = 7 then nameITEM11$ = armure4$ : print #ini.main, "drawbmp item5g ";case11x;" ";case11y
            if typeITEM(11) = 8 then nameITEM11$ = chausses4$ : print #ini.main, "drawbmp item5h ";case11x;" ";case11y
            if typeITEM(11) = 9 then nameITEM11$ = casque4$ : print #ini.main, "drawbmp item5i ";case11x;" ";case11y
        end if
    end if
    if caseITEM(12) > 0 then
        if rareITEM(12) = 1 then
            if typeITEM(12) = 1 then nameITEM12$ = epee1$ : print #ini.main, "drawbmp item2a ";case12x;" ";case12y
            if typeITEM(12) = 2 then nameITEM12$ = arc1$ : print #ini.main, "drawbmp item2b ";case12x;" ";case12y
            if typeITEM(12) = 3 then nameITEM12$ = lance1$ : print #ini.main, "drawbmp item2d ";case12x;" ";case12y
            if typeITEM(12) = 4 then nameITEM12$ = hache1$ : print #ini.main, "drawbmp item2c ";case12x;" ";case12y
            if typeITEM(12) = 5 then nameITEM12$ = marteau1$ : print #ini.main, "drawbmp item2e ";case12x;" ";case12y
            if typeITEM(12) = 6 then nameITEM12$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case12x;" ";case12y
            if typeITEM(12) = 7 then nameITEM12$ = armure1$ : print #ini.main, "drawbmp item2g ";case12x;" ";case12y
            if typeITEM(12) = 8 then nameITEM12$ = chausses1$ : print #ini.main, "drawbmp item2h ";case12x;" ";case12y
            if typeITEM(12) = 9 then nameITEM12$ = casque1$ : print #ini.main, "drawbmp item2i ";case12x;" ";case12y
        end if
        if rareITEM(12) = 2 then
            if typeITEM(12) = 1 then nameITEM12$ = epee2$ : print #ini.main, "drawbmp item3a ";case12x;" ";case12y
            if typeITEM(12) = 2 then nameITEM12$ = arc2$ : print #ini.main, "drawbmp item3b ";case12x;" ";case12y
            if typeITEM(12) = 3 then nameITEM12$ = lance2$ : print #ini.main, "drawbmp item3d ";case12x;" ";case12y
            if typeITEM(12) = 4 then nameITEM12$ = hache2$ : print #ini.main, "drawbmp item3c ";case12x;" ";case12y
            if typeITEM(12) = 5 then nameITEM12$ = marteau2$ : print #ini.main, "drawbmp item3e ";case12x;" ";case12y
            if typeITEM(12) = 6 then nameITEM12$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case12x;" ";case12y
            if typeITEM(12) = 7 then nameITEM12$ = armure2$ : print #ini.main, "drawbmp item3g ";case12x;" ";case12y
            if typeITEM(12) = 8 then nameITEM12$ = chausses2$ : print #ini.main, "drawbmp item3h ";case12x;" ";case12y
            if typeITEM(12) = 9 then nameITEM12$ = casque2$ : print #ini.main, "drawbmp item3i ";case12x;" ";case12y
        end if
        if rareITEM(12) = 3 then
            if typeITEM(12) = 1 then nameITEM12$ = epee3$ : print #ini.main, "drawbmp item4a ";case12x;" ";case12y
            if typeITEM(12) = 2 then nameITEM12$ = arc3$ : print #ini.main, "drawbmp item4b ";case12x;" ";case12y
            if typeITEM(12) = 3 then nameITEM12$ = lance3$ : print #ini.main, "drawbmp item4d ";case12x;" ";case12y
            if typeITEM(12) = 4 then nameITEM12$ = hache3$ : print #ini.main, "drawbmp item4c ";case12x;" ";case12y
            if typeITEM(12) = 5 then nameITEM12$ = marteau3$ : print #ini.main, "drawbmp item4e ";case12x;" ";case12y
            if typeITEM(12) = 6 then nameITEM12$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case12x;" ";case12y
            if typeITEM(12) = 7 then nameITEM12$ = armure3$ : print #ini.main, "drawbmp item4g ";case12x;" ";case12y
            if typeITEM(12) = 8 then nameITEM12$ = chausses3$ : print #ini.main, "drawbmp item4h ";case12x;" ";case12y
            if typeITEM(12) = 9 then nameITEM12$ = casque3$ : print #ini.main, "drawbmp item4i ";case12x;" ";case12y
        end if
        if rareITEM(12) = 4 then
            if typeITEM(12) = 1 then nameITEM12$ = epee4$ : print #ini.main, "drawbmp item5a ";case12x;" ";case12y
            if typeITEM(12) = 2 then nameITEM12$ = arc4$ : print #ini.main, "drawbmp item5b ";case12x;" ";case12y
            if typeITEM(12) = 3 then nameITEM12$ = lance4$ : print #ini.main, "drawbmp item5d ";case12x;" ";case12y
            if typeITEM(12) = 4 then nameITEM12$ = hache4$ : print #ini.main, "drawbmp item5c ";case12x;" ";case12y
            if typeITEM(12) = 5 then nameITEM12$ = marteau4$ : print #ini.main, "drawbmp item5e ";case12x;" ";case12y
            if typeITEM(12) = 6 then nameITEM12$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case12x;" ";case12y
            if typeITEM(12) = 7 then nameITEM12$ = armure4$ : print #ini.main, "drawbmp item5g ";case12x;" ";case12y
            if typeITEM(12) = 8 then nameITEM12$ = chausses4$ : print #ini.main, "drawbmp item5h ";case12x;" ";case12y
            if typeITEM(12) = 9 then nameITEM12$ = casque4$ : print #ini.main, "drawbmp item5i ";case12x;" ";case12y
        end if
    end if
    if caseITEM(13) > 0 then
        if rareITEM(13) = 1 then
            if typeITEM(13) = 1 then nameITEM13$ = epee1$ : print #ini.main, "drawbmp item2a ";case13x;" ";case13y
            if typeITEM(13) = 2 then nameITEM13$ = arc1$ : print #ini.main, "drawbmp item2b ";case13x;" ";case13y
            if typeITEM(13) = 3 then nameITEM13$ = lance1$ : print #ini.main, "drawbmp item2d ";case13x;" ";case13y
            if typeITEM(13) = 4 then nameITEM13$ = hache1$ : print #ini.main, "drawbmp item2c ";case13x;" ";case13y
            if typeITEM(13) = 5 then nameITEM13$ = marteau1$ : print #ini.main, "drawbmp item2e ";case13x;" ";case13y
            if typeITEM(13) = 6 then nameITEM13$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case13x;" ";case13y
            if typeITEM(13) = 7 then nameITEM13$ = armure1$ : print #ini.main, "drawbmp item2g ";case13x;" ";case13y
            if typeITEM(13) = 8 then nameITEM13$ = chausses1$ : print #ini.main, "drawbmp item2h ";case13x;" ";case13y
            if typeITEM(13) = 9 then nameITEM13$ = casque1$ : print #ini.main, "drawbmp item2i ";case13x;" ";case13y
        end if
        if rareITEM(13) = 2 then
            if typeITEM(13) = 1 then nameITEM13$ = epee2$ : print #ini.main, "drawbmp item3a ";case13x;" ";case13y
            if typeITEM(13) = 2 then nameITEM13$ = arc2$ : print #ini.main, "drawbmp item3b ";case13x;" ";case13y
            if typeITEM(13) = 3 then nameITEM13$ = lance2$ : print #ini.main, "drawbmp item3d ";case13x;" ";case13y
            if typeITEM(13) = 4 then nameITEM13$ = hache2$ : print #ini.main, "drawbmp item3c ";case13x;" ";case13y
            if typeITEM(13) = 5 then nameITEM13$ = marteau2$ : print #ini.main, "drawbmp item3e ";case13x;" ";case13y
            if typeITEM(13) = 6 then nameITEM13$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case13x;" ";case13y
            if typeITEM(13) = 7 then nameITEM13$ = armure2$ : print #ini.main, "drawbmp item3g ";case13x;" ";case13y
            if typeITEM(13) = 8 then nameITEM13$ = chausses2$ : print #ini.main, "drawbmp item3h ";case13x;" ";case13y
            if typeITEM(13) = 9 then nameITEM13$ = casque2$ : print #ini.main, "drawbmp item3i ";case13x;" ";case13y
        end if
        if rareITEM(13) = 3 then
            if typeITEM(13) = 1 then nameITEM13$ = epee3$ : print #ini.main, "drawbmp item4a ";case13x;" ";case13y
            if typeITEM(13) = 2 then nameITEM13$ = arc3$ : print #ini.main, "drawbmp item4b ";case13x;" ";case13y
            if typeITEM(13) = 3 then nameITEM13$ = lance3$ : print #ini.main, "drawbmp item4d ";case13x;" ";case13y
            if typeITEM(13) = 4 then nameITEM13$ = hache3$ : print #ini.main, "drawbmp item4c ";case13x;" ";case13y
            if typeITEM(13) = 5 then nameITEM13$ = marteau3$ : print #ini.main, "drawbmp item4e ";case13x;" ";case13y
            if typeITEM(13) = 6 then nameITEM13$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case13x;" ";case13y
            if typeITEM(13) = 7 then nameITEM13$ = armure3$ : print #ini.main, "drawbmp item4g ";case13x;" ";case13y
            if typeITEM(13) = 8 then nameITEM13$ = chausses3$ : print #ini.main, "drawbmp item4h ";case13x;" ";case13y
            if typeITEM(13) = 9 then nameITEM13$ = casque3$ : print #ini.main, "drawbmp item4i ";case13x;" ";case13y
        end if
        if rareITEM(13) = 4 then
            if typeITEM(13) = 1 then nameITEM13$ = epee4$ : print #ini.main, "drawbmp item5a ";case13x;" ";case13y
            if typeITEM(13) = 2 then nameITEM13$ = arc4$ : print #ini.main, "drawbmp item5b ";case13x;" ";case13y
            if typeITEM(13) = 3 then nameITEM13$ = lance4$ : print #ini.main, "drawbmp item5d ";case13x;" ";case13y
            if typeITEM(13) = 4 then nameITEM13$ = hache4$ : print #ini.main, "drawbmp item5c ";case13x;" ";case13y
            if typeITEM(13) = 5 then nameITEM13$ = marteau4$ : print #ini.main, "drawbmp item5e ";case13x;" ";case13y
            if typeITEM(13) = 6 then nameITEM13$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case13x;" ";case13y
            if typeITEM(13) = 7 then nameITEM13$ = armure4$ : print #ini.main, "drawbmp item5g ";case13x;" ";case13y
            if typeITEM(13) = 8 then nameITEM13$ = chausses4$ : print #ini.main, "drawbmp item5h ";case13x;" ";case13y
            if typeITEM(13) = 9 then nameITEM13$ = casque4$ : print #ini.main, "drawbmp item5i ";case13x;" ";case13y
        end if
    end if
    if caseITEM(14) > 0 then
        if rareITEM(14) = 1 then
            if typeITEM(14) = 1 then nameITEM14$ = epee1$ : print #ini.main, "drawbmp item2a ";case14x;" ";case14y
            if typeITEM(14) = 2 then nameITEM14$ = arc1$ : print #ini.main, "drawbmp item2b ";case14x;" ";case14y
            if typeITEM(14) = 3 then nameITEM14$ = lance1$ : print #ini.main, "drawbmp item2d ";case14x;" ";case14y
            if typeITEM(14) = 4 then nameITEM14$ = hache1$ : print #ini.main, "drawbmp item2c ";case14x;" ";case14y
            if typeITEM(14) = 5 then nameITEM14$ = marteau1$ : print #ini.main, "drawbmp item2e ";case14x;" ";case14y
            if typeITEM(14) = 6 then nameITEM14$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case14x;" ";case14y
            if typeITEM(14) = 7 then nameITEM14$ = armure1$ : print #ini.main, "drawbmp item2g ";case14x;" ";case14y
            if typeITEM(14) = 8 then nameITEM14$ = chausses1$ : print #ini.main, "drawbmp item2h ";case14x;" ";case14y
            if typeITEM(14) = 9 then nameITEM14$ = casque1$ : print #ini.main, "drawbmp item2i ";case14x;" ";case14y
        end if
        if rareITEM(14) = 2 then
            if typeITEM(14) = 1 then nameITEM14$ = epee2$ : print #ini.main, "drawbmp item3a ";case14x;" ";case14y
            if typeITEM(14) = 2 then nameITEM14$ = arc2$ : print #ini.main, "drawbmp item3b ";case14x;" ";case14y
            if typeITEM(14) = 3 then nameITEM14$ = lance2$ : print #ini.main, "drawbmp item3d ";case14x;" ";case14y
            if typeITEM(14) = 4 then nameITEM14$ = hache2$ : print #ini.main, "drawbmp item3c ";case14x;" ";case14y
            if typeITEM(14) = 5 then nameITEM14$ = marteau2$ : print #ini.main, "drawbmp item3e ";case14x;" ";case14y
            if typeITEM(14) = 6 then nameITEM14$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case14x;" ";case14y
            if typeITEM(14) = 7 then nameITEM14$ = armure2$ : print #ini.main, "drawbmp item3g ";case14x;" ";case14y
            if typeITEM(14) = 8 then nameITEM14$ = chausses2$ : print #ini.main, "drawbmp item3h ";case14x;" ";case14y
            if typeITEM(14) = 9 then nameITEM14$ = casque2$ : print #ini.main, "drawbmp item3i ";case14x;" ";case14y
        end if
        if rareITEM(14) = 3 then
            if typeITEM(14) = 1 then nameITEM14$ = epee3$ : print #ini.main, "drawbmp item4a ";case14x;" ";case14y
            if typeITEM(14) = 2 then nameITEM14$ = arc3$ : print #ini.main, "drawbmp item4b ";case14x;" ";case14y
            if typeITEM(14) = 3 then nameITEM14$ = lance3$ : print #ini.main, "drawbmp item4d ";case14x;" ";case14y
            if typeITEM(14) = 4 then nameITEM14$ = hache3$ : print #ini.main, "drawbmp item4c ";case14x;" ";case14y
            if typeITEM(14) = 5 then nameITEM14$ = marteau3$ : print #ini.main, "drawbmp item4e ";case14x;" ";case14y
            if typeITEM(14) = 6 then nameITEM14$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case14x;" ";case14y
            if typeITEM(14) = 7 then nameITEM14$ = armure3$ : print #ini.main, "drawbmp item4g ";case14x;" ";case14y
            if typeITEM(14) = 8 then nameITEM14$ = chausses3$ : print #ini.main, "drawbmp item4h ";case14x;" ";case14y
            if typeITEM(14) = 9 then nameITEM14$ = casque3$ : print #ini.main, "drawbmp item4i ";case14x;" ";case14y
        end if
        if rareITEM(14) = 4 then
            if typeITEM(14) = 1 then nameITEM14$ = epee4$ : print #ini.main, "drawbmp item5a ";case14x;" ";case14y
            if typeITEM(14) = 2 then nameITEM14$ = arc4$ : print #ini.main, "drawbmp item5b ";case14x;" ";case14y
            if typeITEM(14) = 3 then nameITEM14$ = lance4$ : print #ini.main, "drawbmp item5d ";case14x;" ";case14y
            if typeITEM(14) = 4 then nameITEM14$ = hache4$ : print #ini.main, "drawbmp item5c ";case14x;" ";case14y
            if typeITEM(14) = 5 then nameITEM14$ = marteau4$ : print #ini.main, "drawbmp item5e ";case14x;" ";case14y
            if typeITEM(14) = 6 then nameITEM14$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case14x;" ";case14y
            if typeITEM(14) = 7 then nameITEM14$ = armure4$ : print #ini.main, "drawbmp item5g ";case14x;" ";case14y
            if typeITEM(14) = 8 then nameITEM14$ = chausses4$ : print #ini.main, "drawbmp item5h ";case14x;" ";case14y
            if typeITEM(14) = 9 then nameITEM14$ = casque4$ : print #ini.main, "drawbmp item5i ";case14x;" ";case14y
        end if
    end if
    if caseITEM(15) > 0 then
        if rareITEM(15) = 1 then
            if typeITEM(15) = 1 then nameITEM15$ = epee1$ : print #ini.main, "drawbmp item2a ";case15x;" ";case15y
            if typeITEM(15) = 2 then nameITEM15$ = arc1$ : print #ini.main, "drawbmp item2b ";case15x;" ";case15y
            if typeITEM(15) = 3 then nameITEM15$ = lance1$ : print #ini.main, "drawbmp item2d ";case15x;" ";case15y
            if typeITEM(15) = 4 then nameITEM15$ = hache1$ : print #ini.main, "drawbmp item2c ";case15x;" ";case15y
            if typeITEM(15) = 5 then nameITEM15$ = marteau1$ : print #ini.main, "drawbmp item2e ";case15x;" ";case15y
            if typeITEM(15) = 6 then nameITEM15$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case15x;" ";case15y
            if typeITEM(15) = 7 then nameITEM15$ = armure1$ : print #ini.main, "drawbmp item2g ";case15x;" ";case15y
            if typeITEM(15) = 8 then nameITEM15$ = chausses1$ : print #ini.main, "drawbmp item2h ";case15x;" ";case15y
            if typeITEM(15) = 9 then nameITEM15$ = casque1$ : print #ini.main, "drawbmp item2i ";case15x;" ";case15y
        end if
        if rareITEM(15) = 2 then
            if typeITEM(15) = 1 then nameITEM15$ = epee2$ : print #ini.main, "drawbmp item3a ";case15x;" ";case15y
            if typeITEM(15) = 2 then nameITEM15$ = arc2$ : print #ini.main, "drawbmp item3b ";case15x;" ";case15y
            if typeITEM(15) = 3 then nameITEM15$ = lance2$ : print #ini.main, "drawbmp item3d ";case15x;" ";case15y
            if typeITEM(15) = 4 then nameITEM15$ = hache2$ : print #ini.main, "drawbmp item3c ";case15x;" ";case15y
            if typeITEM(15) = 5 then nameITEM15$ = marteau2$ : print #ini.main, "drawbmp item3e ";case15x;" ";case15y
            if typeITEM(15) = 6 then nameITEM15$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case15x;" ";case15y
            if typeITEM(15) = 7 then nameITEM15$ = armure2$ : print #ini.main, "drawbmp item3g ";case15x;" ";case15y
            if typeITEM(15) = 8 then nameITEM15$ = chausses2$ : print #ini.main, "drawbmp item3h ";case15x;" ";case15y
            if typeITEM(15) = 9 then nameITEM15$ = casque2$ : print #ini.main, "drawbmp item3i ";case15x;" ";case15y
        end if
        if rareITEM(15) = 3 then
            if typeITEM(15) = 1 then nameITEM15$ = epee3$ : print #ini.main, "drawbmp item4a ";case15x;" ";case15y
            if typeITEM(15) = 2 then nameITEM15$ = arc3$ : print #ini.main, "drawbmp item4b ";case15x;" ";case15y
            if typeITEM(15) = 3 then nameITEM15$ = lance3$ : print #ini.main, "drawbmp item4d ";case15x;" ";case15y
            if typeITEM(15) = 4 then nameITEM15$ = hache3$ : print #ini.main, "drawbmp item4c ";case15x;" ";case15y
            if typeITEM(15) = 5 then nameITEM15$ = marteau3$ : print #ini.main, "drawbmp item4e ";case15x;" ";case15y
            if typeITEM(15) = 6 then nameITEM15$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case15x;" ";case15y
            if typeITEM(15) = 7 then nameITEM15$ = armure3$ : print #ini.main, "drawbmp item4g ";case15x;" ";case15y
            if typeITEM(15) = 8 then nameITEM15$ = chausses3$ : print #ini.main, "drawbmp item4h ";case15x;" ";case15y
            if typeITEM(15) = 9 then nameITEM15$ = casque3$ : print #ini.main, "drawbmp item4i ";case15x;" ";case15y
        end if
        if rareITEM(15) = 4 then
            if typeITEM(15) = 1 then nameITEM15$ = epee4$ : print #ini.main, "drawbmp item5a ";case15x;" ";case15y
            if typeITEM(15) = 2 then nameITEM15$ = arc4$ : print #ini.main, "drawbmp item5b ";case15x;" ";case15y
            if typeITEM(15) = 3 then nameITEM15$ = lance4$ : print #ini.main, "drawbmp item5d ";case15x;" ";case15y
            if typeITEM(15) = 4 then nameITEM15$ = hache4$ : print #ini.main, "drawbmp item5c ";case15x;" ";case15y
            if typeITEM(15) = 5 then nameITEM15$ = marteau4$ : print #ini.main, "drawbmp item5e ";case15x;" ";case15y
            if typeITEM(15) = 6 then nameITEM15$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case15x;" ";case15y
            if typeITEM(15) = 7 then nameITEM15$ = armure4$ : print #ini.main, "drawbmp item5g ";case15x;" ";case15y
            if typeITEM(15) = 8 then nameITEM15$ = chausses4$ : print #ini.main, "drawbmp item5h ";case15x;" ";case15y
            if typeITEM(15) = 9 then nameITEM15$ = casque4$ : print #ini.main, "drawbmp item5i ";case15x;" ";case15y
        end if
    end if
    if caseITEM(16) > 0 then
        if rareITEM(16) = 1 then
            if typeITEM(16) = 1 then nameITEM16$ = epee1$ : print #ini.main, "drawbmp item2a ";case16x;" ";case16y
            if typeITEM(16) = 2 then nameITEM16$ = arc1$ : print #ini.main, "drawbmp item2b ";case16x;" ";case16y
            if typeITEM(16) = 3 then nameITEM16$ = lance1$ : print #ini.main, "drawbmp item2d ";case16x;" ";case16y
            if typeITEM(16) = 4 then nameITEM16$ = hache1$ : print #ini.main, "drawbmp item2c ";case16x;" ";case16y
            if typeITEM(16) = 5 then nameITEM16$ = marteau1$ : print #ini.main, "drawbmp item2e ";case16x;" ";case16y
            if typeITEM(16) = 6 then nameITEM16$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case16x;" ";case16y
            if typeITEM(16) = 7 then nameITEM16$ = armure1$ : print #ini.main, "drawbmp item2g ";case16x;" ";case16y
            if typeITEM(16) = 8 then nameITEM16$ = chausses1$ : print #ini.main, "drawbmp item2h ";case16x;" ";case16y
            if typeITEM(16) = 9 then nameITEM16$ = casque1$ : print #ini.main, "drawbmp item2i ";case16x;" ";case16y
        end if
        if rareITEM(16) = 2 then
            if typeITEM(16) = 1 then nameITEM16$ = epee2$ : print #ini.main, "drawbmp item3a ";case16x;" ";case16y
            if typeITEM(16) = 2 then nameITEM16$ = arc2$ : print #ini.main, "drawbmp item3b ";case16x;" ";case16y
            if typeITEM(16) = 3 then nameITEM16$ = lance2$ : print #ini.main, "drawbmp item3d ";case16x;" ";case16y
            if typeITEM(16) = 4 then nameITEM16$ = hache2$ : print #ini.main, "drawbmp item3c ";case16x;" ";case16y
            if typeITEM(16) = 5 then nameITEM16$ = marteau2$ : print #ini.main, "drawbmp item3e ";case16x;" ";case16y
            if typeITEM(16) = 6 then nameITEM16$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case16x;" ";case16y
            if typeITEM(16) = 7 then nameITEM16$ = armure2$ : print #ini.main, "drawbmp item3g ";case16x;" ";case16y
            if typeITEM(16) = 8 then nameITEM16$ = chausses2$ : print #ini.main, "drawbmp item3h ";case16x;" ";case16y
            if typeITEM(16) = 9 then nameITEM16$ = casque2$ : print #ini.main, "drawbmp item3i ";case16x;" ";case16y
        end if
        if rareITEM(16) = 3 then
            if typeITEM(16) = 1 then nameITEM16$ = epee3$ : print #ini.main, "drawbmp item4a ";case16x;" ";case16y
            if typeITEM(16) = 2 then nameITEM16$ = arc3$ : print #ini.main, "drawbmp item4b ";case16x;" ";case16y
            if typeITEM(16) = 3 then nameITEM16$ = lance3$ : print #ini.main, "drawbmp item4d ";case16x;" ";case16y
            if typeITEM(16) = 4 then nameITEM16$ = hache3$ : print #ini.main, "drawbmp item4c ";case16x;" ";case16y
            if typeITEM(16) = 5 then nameITEM16$ = marteau3$ : print #ini.main, "drawbmp item4e ";case16x;" ";case16y
            if typeITEM(16) = 6 then nameITEM16$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case16x;" ";case16y
            if typeITEM(16) = 7 then nameITEM16$ = armure3$ : print #ini.main, "drawbmp item4g ";case16x;" ";case16y
            if typeITEM(16) = 8 then nameITEM16$ = chausses3$ : print #ini.main, "drawbmp item4h ";case16x;" ";case16y
            if typeITEM(16) = 9 then nameITEM16$ = casque3$ : print #ini.main, "drawbmp item4i ";case16x;" ";case16y
        end if
        if rareITEM(16) = 4 then
            if typeITEM(16) = 1 then nameITEM16$ = epee4$ : print #ini.main, "drawbmp item5a ";case16x;" ";case16y
            if typeITEM(16) = 2 then nameITEM16$ = arc4$ : print #ini.main, "drawbmp item5b ";case16x;" ";case16y
            if typeITEM(16) = 3 then nameITEM16$ = lance4$ : print #ini.main, "drawbmp item5d ";case16x;" ";case16y
            if typeITEM(16) = 4 then nameITEM16$ = hache4$ : print #ini.main, "drawbmp item5c ";case16x;" ";case16y
            if typeITEM(16) = 5 then nameITEM16$ = marteau4$ : print #ini.main, "drawbmp item5e ";case16x;" ";case16y
            if typeITEM(16) = 6 then nameITEM16$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case16x;" ";case16y
            if typeITEM(16) = 7 then nameITEM16$ = armure4$ : print #ini.main, "drawbmp item5g ";case16x;" ";case16y
            if typeITEM(16) = 8 then nameITEM16$ = chausses4$ : print #ini.main, "drawbmp item5h ";case16x;" ";case16y
            if typeITEM(16) = 9 then nameITEM16$ = casque4$ : print #ini.main, "drawbmp item5i ";case16x;" ";case16y
        end if
    end if
    if caseITEM(17) > 0 then
        if rareITEM(17) = 1 then
            if typeITEM(17) = 1 then nameITEM17$ = epee1$ : print #ini.main, "drawbmp item2a ";case17x;" ";case17y
            if typeITEM(17) = 2 then nameITEM17$ = arc1$ : print #ini.main, "drawbmp item2b ";case17x;" ";case17y
            if typeITEM(17) = 3 then nameITEM17$ = lance1$ : print #ini.main, "drawbmp item2d ";case17x;" ";case17y
            if typeITEM(17) = 4 then nameITEM17$ = hache1$ : print #ini.main, "drawbmp item2c ";case17x;" ";case17y
            if typeITEM(17) = 5 then nameITEM17$ = marteau1$ : print #ini.main, "drawbmp item2e ";case17x;" ";case17y
            if typeITEM(17) = 6 then nameITEM17$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case17x;" ";case17y
            if typeITEM(17) = 7 then nameITEM17$ = armure1$ : print #ini.main, "drawbmp item2g ";case17x;" ";case17y
            if typeITEM(17) = 8 then nameITEM17$ = chausses1$ : print #ini.main, "drawbmp item2h ";case17x;" ";case17y
            if typeITEM(17) = 9 then nameITEM17$ = casque1$ : print #ini.main, "drawbmp item2i ";case17x;" ";case17y
        end if
        if rareITEM(17) = 2 then
            if typeITEM(17) = 1 then nameITEM17$ = epee2$ : print #ini.main, "drawbmp item3a ";case17x;" ";case17y
            if typeITEM(17) = 2 then nameITEM17$ = arc2$ : print #ini.main, "drawbmp item3b ";case17x;" ";case17y
            if typeITEM(17) = 3 then nameITEM17$ = lance2$ : print #ini.main, "drawbmp item3d ";case17x;" ";case17y
            if typeITEM(17) = 4 then nameITEM17$ = hache2$ : print #ini.main, "drawbmp item3c ";case17x;" ";case17y
            if typeITEM(17) = 5 then nameITEM17$ = marteau2$ : print #ini.main, "drawbmp item3e ";case17x;" ";case17y
            if typeITEM(17) = 6 then nameITEM17$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case17x;" ";case17y
            if typeITEM(17) = 7 then nameITEM17$ = armure2$ : print #ini.main, "drawbmp item3g ";case17x;" ";case17y
            if typeITEM(17) = 8 then nameITEM17$ = chausses2$ : print #ini.main, "drawbmp item3h ";case17x;" ";case17y
            if typeITEM(17) = 9 then nameITEM17$ = casque2$ : print #ini.main, "drawbmp item3i ";case17x;" ";case17y
        end if
        if rareITEM(17) = 3 then
            if typeITEM(17) = 1 then nameITEM17$ = epee3$ : print #ini.main, "drawbmp item4a ";case17x;" ";case17y
            if typeITEM(17) = 2 then nameITEM17$ = arc3$ : print #ini.main, "drawbmp item4b ";case17x;" ";case17y
            if typeITEM(17) = 3 then nameITEM17$ = lance3$ : print #ini.main, "drawbmp item4d ";case17x;" ";case17y
            if typeITEM(17) = 4 then nameITEM17$ = hache3$ : print #ini.main, "drawbmp item4c ";case17x;" ";case17y
            if typeITEM(17) = 5 then nameITEM17$ = marteau3$ : print #ini.main, "drawbmp item4e ";case17x;" ";case17y
            if typeITEM(17) = 6 then nameITEM17$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case17x;" ";case17y
            if typeITEM(17) = 7 then nameITEM17$ = armure3$ : print #ini.main, "drawbmp item4g ";case17x;" ";case17y
            if typeITEM(17) = 8 then nameITEM17$ = chausses3$ : print #ini.main, "drawbmp item4h ";case17x;" ";case17y
            if typeITEM(17) = 9 then nameITEM17$ = casque3$ : print #ini.main, "drawbmp item4i ";case17x;" ";case17y
        end if
        if rareITEM(17) = 4 then
            if typeITEM(17) = 1 then nameITEM17$ = epee4$ : print #ini.main, "drawbmp item5a ";case17x;" ";case17y
            if typeITEM(17) = 2 then nameITEM17$ = arc4$ : print #ini.main, "drawbmp item5b ";case17x;" ";case17y
            if typeITEM(17) = 3 then nameITEM17$ = lance4$ : print #ini.main, "drawbmp item5d ";case17x;" ";case17y
            if typeITEM(17) = 4 then nameITEM17$ = hache4$ : print #ini.main, "drawbmp item5c ";case17x;" ";case17y
            if typeITEM(17) = 5 then nameITEM17$ = marteau4$ : print #ini.main, "drawbmp item5e ";case17x;" ";case17y
            if typeITEM(17) = 6 then nameITEM17$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case17x;" ";case17y
            if typeITEM(17) = 7 then nameITEM17$ = armure4$ : print #ini.main, "drawbmp item5g ";case17x;" ";case17y
            if typeITEM(17) = 8 then nameITEM17$ = chausses4$ : print #ini.main, "drawbmp item5h ";case17x;" ";case17y
            if typeITEM(17) = 9 then nameITEM17$ = casque4$ : print #ini.main, "drawbmp item5i ";case17x;" ";case17y
        end if
    end if
    if caseITEM(18) > 0 then
        if rareITEM(18) = 1 then
            if typeITEM(18) = 1 then nameITEM18$ = epee1$ : print #ini.main, "drawbmp item2a ";case18x;" ";case18y
            if typeITEM(18) = 2 then nameITEM18$ = arc1$ : print #ini.main, "drawbmp item2b ";case18x;" ";case18y
            if typeITEM(18) = 3 then nameITEM18$ = lance1$ : print #ini.main, "drawbmp item2d ";case18x;" ";case18y
            if typeITEM(18) = 4 then nameITEM18$ = hache1$ : print #ini.main, "drawbmp item2c ";case18x;" ";case18y
            if typeITEM(18) = 5 then nameITEM18$ = marteau1$ : print #ini.main, "drawbmp item2e ";case18x;" ";case18y
            if typeITEM(18) = 6 then nameITEM18$ = bouclier1$ : print #ini.main, "drawbmp item2f ";case18x;" ";case18y
            if typeITEM(18) = 7 then nameITEM18$ = armure1$ : print #ini.main, "drawbmp item2g ";case18x;" ";case18y
            if typeITEM(18) = 8 then nameITEM18$ = chausses1$ : print #ini.main, "drawbmp item2h ";case18x;" ";case18y
            if typeITEM(18) = 9 then nameITEM18$ = casque1$ : print #ini.main, "drawbmp item2i ";case18x;" ";case18y
        end if
        if rareITEM(18) = 2 then
            if typeITEM(18) = 1 then nameITEM18$ = epee2$ : print #ini.main, "drawbmp item3a ";case18x;" ";case18y
            if typeITEM(18) = 2 then nameITEM18$ = arc2$ : print #ini.main, "drawbmp item3b ";case18x;" ";case18y
            if typeITEM(18) = 3 then nameITEM18$ = lance2$ : print #ini.main, "drawbmp item3d ";case18x;" ";case18y
            if typeITEM(18) = 4 then nameITEM18$ = hache2$ : print #ini.main, "drawbmp item3c ";case18x;" ";case18y
            if typeITEM(18) = 5 then nameITEM18$ = marteau2$ : print #ini.main, "drawbmp item3e ";case18x;" ";case18y
            if typeITEM(18) = 6 then nameITEM18$ = bouclier2$ : print #ini.main, "drawbmp item3f ";case18x;" ";case18y
            if typeITEM(18) = 7 then nameITEM18$ = armure2$ : print #ini.main, "drawbmp item3g ";case18x;" ";case18y
            if typeITEM(18) = 8 then nameITEM18$ = chausses2$ : print #ini.main, "drawbmp item3h ";case18x;" ";case18y
            if typeITEM(18) = 9 then nameITEM18$ = casque2$ : print #ini.main, "drawbmp item3i ";case18x;" ";case18y
        end if
        if rareITEM(18) = 3 then
            if typeITEM(18) = 1 then nameITEM18$ = epee3$ : print #ini.main, "drawbmp item4a ";case18x;" ";case18y
            if typeITEM(18) = 2 then nameITEM18$ = arc3$ : print #ini.main, "drawbmp item4b ";case18x;" ";case18y
            if typeITEM(18) = 3 then nameITEM18$ = lance3$ : print #ini.main, "drawbmp item4d ";case18x;" ";case18y
            if typeITEM(18) = 4 then nameITEM18$ = hache3$ : print #ini.main, "drawbmp item4c ";case18x;" ";case18y
            if typeITEM(18) = 5 then nameITEM18$ = marteau3$ : print #ini.main, "drawbmp item4e ";case18x;" ";case18y
            if typeITEM(18) = 6 then nameITEM18$ = bouclier3$ : print #ini.main, "drawbmp item4f ";case18x;" ";case18y
            if typeITEM(18) = 7 then nameITEM18$ = armure3$ : print #ini.main, "drawbmp item4g ";case18x;" ";case18y
            if typeITEM(18) = 8 then nameITEM18$ = chausses3$ : print #ini.main, "drawbmp item4h ";case18x;" ";case18y
            if typeITEM(18) = 9 then nameITEM18$ = casque3$ : print #ini.main, "drawbmp item4i ";case18x;" ";case18y
        end if
        if rareITEM(18) = 4 then
            if typeITEM(18) = 1 then nameITEM18$ = epee4$ : print #ini.main, "drawbmp item5a ";case18x;" ";case18y
            if typeITEM(18) = 2 then nameITEM18$ = arc4$ : print #ini.main, "drawbmp item5b ";case18x;" ";case18y
            if typeITEM(18) = 3 then nameITEM18$ = lance4$ : print #ini.main, "drawbmp item5d ";case18x;" ";case18y
            if typeITEM(18) = 4 then nameITEM18$ = hache4$ : print #ini.main, "drawbmp item5c ";case18x;" ";case18y
            if typeITEM(18) = 5 then nameITEM18$ = marteau4$ : print #ini.main, "drawbmp item5e ";case18x;" ";case18y
            if typeITEM(18) = 6 then nameITEM18$ = bouclier4$ : print #ini.main, "drawbmp item5f ";case18x;" ";case18y
            if typeITEM(18) = 7 then nameITEM18$ = armure4$ : print #ini.main, "drawbmp item5g ";case18x;" ";case18y
            if typeITEM(18) = 8 then nameITEM18$ = chausses4$ : print #ini.main, "drawbmp item5h ";case18x;" ";case18y
            if typeITEM(18) = 9 then nameITEM18$ = casque4$ : print #ini.main, "drawbmp item5i ";case18x;" ";case18y
        end if
    end if
    return

    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

    sub AddToolTip cHndl, hWnd, Text$ 
        TOOLINFO.uId.struct = cHndl
        TOOLINFO.lpszText.struct = Text$
        CallDLL #user32, "SendMessageA",hWnd As long,1028 As long, _
        0 As long,TOOLINFO as ptr,ret As long
    end sub

    Function CreateTooltip(hMain)
        Struct TOOLINFO, _
        cbSize As long, _
        uFlags As long, _
        hwnd As long, _
        uId As long, _
        rectLeft As long, _
        rectTop As long, _
        rectRight As long, _
        rectBottom As long, _
        hinst As long, _
        lpszText As ptr
        CallDLL #comctl32,"InitCommonControlsEx", _
        ret As void
        TOOLINFO.cbSize.struct = Len(TOOLINFO.struct)
        TOOLINFO.uFlags.struct = flags Or 17 'TTF_IDISHWND Or TTF_SUBCLASS
        TOOLINFO.hwnd.struct = hMain
        CallDLL #user32,"CreateWindowExA",_
        0 As long, _
        "tooltips_class32" As ptr, _
        0 As long, style As long, _
        _CW_USEDEFAULT As long, _
        _CW_USEDEFAULT As long, _
        _CW_USEDEFAULT As long, _
        _CW_USEDEFAULT As long, _
        hMain As long, _
        0 As long, _
        0 as long, _
        0 As long, _
        CreateTooltip As Long
    end function


    [reinitialisation]

    for reini = 1 to 18
        caseITEM(reini) = 0 : rareITEM(reini) = 0 : typeITEM(reini) = 0 : lvlITEM(reini) = 0 : val1ITEM(reini) = 0 : vieITEM(reini) = 0
        ccITEM(reini) = 0 : chanceccITEM(reini) = 0 : regenITEM(reini) = 0 : forceITEM(reini) = 0 : intITEM(reini) = 0 : agiITEM(reini) = 0 : xpITEM(reini) = 0
    next reini

    caseITEMequip(1) = 0 : rareITEMequip(1) = 0 : typeITEMequip(1) = 0 : nameITEMequip1$ = "" : lvlITEMequip(1) = 0 : VequipITEM(1) = 0 : VIEequipITEM(1) = 0
    caseITEMequip(2) = 0 : rareITEMequip(2) = 0 : typeITEMequip(2) = 0 : nameITEMequip2$ = "" : lvlITEMequip(2) = 0 : VequipITEM(2) = 0 : VIEequipITEM(2) = 0
    caseITEMequip(3) = 0 : rareITEMequip(3) = 0 : typeITEMequip(3) = 0 : nameITEMequip3$ = "" : lvlITEMequip(3) = 0 : VequipITEM(3) = 0 : VIEequipITEM(3) = 0
    caseITEMequip(4) = 0 : rareITEMequip(4) = 0 : typeITEMequip(4) = 0 : nameITEMequip4$ = "" : lvlITEMequip(4) = 0 : VequipITEM(4) = 0 : VIEequipITEM(4) = 0
    caseITEMequip(5) = 0 : rareITEMequip(5) = 0 : typeITEMequip(5) = 0 : nameITEMequip5$ = "" : lvlITEMequip(5) = 0 : VequipITEM(5) = 0 : VIEequipITEM(5) = 0

    caseITEMequip(1) = 1 : rareITEMequip(1) = 1 : typeITEMequip(1) = 1 : nameITEMequip1$ = nameITEM1$ : lvlITEMequip(1) = 1 : VequipITEM(1) = 2 : bonusATK = 2
    caseITEMequip(2) = 1 : rareITEMequip(2) = 1 : typeITEMequip(2) = 7 : nameITEMequip2$ = nameITEM2$ : lvlITEMequip(2) = 1 : VequipITEM(2) = 1 : bonusDEF = 1

    reputationVillage(1) = 0 : reputationVillage(2) = 0 : reputationVillage(3) = 0 : reputationVillage(4) = 0 : reputationVillage(5) = 0 : reputationVillage(6) = 0
    reputationVillage(7) = 0 : reputationVillage(8) = 0 : reputationVillage(9) = 0 : reputationVillage(10) = 0 : reputationVillage(11) = 0 : reputationVillage(12) = 0
    reputationVillage(13) = 0 : reputationVillage(14) = 0 : reputationVillage(15) = 0 : reputationVillage(16) = 0 : reputationVillage(17) = 0 : reputationVillage(18) = 0
    reputationVillage(19) = 0 : reputationVillage(20) = 0 : reputationVillage(21) = 0 : reputationVillage(22) = 0 : reputationVillage(23) = 0 : reputationVillage(24) = 0
    reputationVillage(25) = 0 : reputationVillage(26) = 0 : reputationVillage(27) = 0 : reputationVillage(28) = 0 : reputationVillage(29) = 0 : reputationVillage(30) = 0
    reputationVillage(31) = 0 : reputationVillage(32) = 0 : reputationVillage(33) = 0 : reputationVillage(34) = 0 : reputationVillage(35) = 0 : reputationVillage(36) = 0
    reputationVillage(37) = 0 : reputationVillage(38) = 0 : reputationVillage(39) = 0 : reputationVillage(40) = 0 : reputationVillage(41) = 0 : reputationVillage(42) = 0
    reputationVillage(43) = 0 : reputationVillage(44) = 0 : reputationVillage(45) = 0 : reputationVillage(46) = 0 : reputationVillage(47) = 0 : reputationVillage(48) = 0
    reputationVillage(49) = 0 : reputationVillage(50) = 0 : reputationVillage(51) = 0 : reputationVillage(52) = 0 : reputationVillage(53) = 0

    reputationVille(1) = 0 : reputationVille(2) = 0 : reputationVille(3) = 0 : reputationVille(4) = 0 : reputationVille(5) = 0
    reputationVille(6) = 0 : reputationVille(7) = 0 : reputationVille(8) = 0

    talent1 = 0 : talent2 = 0 : talent3 = 0 : talent4 = 0 : talent5 = 0 : talent6 = 0
    village = 1 : ville = 0
    villageSELECT = 1 : villeSELECT = 0

    talent1XP = 1 : talent1XPtotal = 100 : talent2XP = 1 : talent2XPtotal = 50
    talent3XP = 1 : talent3XPtotal = 200 : talent4XP = 1 : talent4XPtotal = 150
    talent5XP = 1 : talent5XPtotal = 50 : talent6XP = 1 : talent6XPtotal = 50
    talent7XP = 1 : talent7XPtotal = 50

    lvlPerso = 1 : xpPerso = 0 : xpPersoTotal = 10 : gold = 100 : lvlARENA = 1 : NitemINVENT = 2 : bonusPV = 0
    hpPerso = 19 : hpPersoTotal = hpPerso : armorPerso = 3 : atkPerso = 14 : force = 7 : agil = 1 : intel = 2 : resistance = 1 : regenPerso = 1 : classe$ = "Tank"
    PersoX = 233 : PersoY = 308 : village = 1 : worldOPEN = 0

    CompteurVillage1 = 7 : CompteurVillage2 = 7 : CompteurVillage3 = 7 : CompteurVillage4 = 7 : CompteurVillage5 = 7 : CompteurVillage6 = 7 : CompteurVillage7 = 7 : CompteurVillage8 = 7
    CompteurVillage9 = 7 : CompteurVillage10 = 7 : CompteurVillage11 = 7 : CompteurVillage12 = 7 : CompteurVillage13 = 7 : CompteurVillage14 = 7 : CompteurVillage15 = 7 : CompteurVillage16 = 7
    CompteurVillage17 = 7 : CompteurVillage18 = 7 : CompteurVillage19 = 7 : CompteurVillage20 = 7 : CompteurVillage21 = 7 : CompteurVillage22 = 7 : CompteurVillage23 = 7 : CompteurVillage24 = 7
    CompteurVillage25 = 7 : CompteurVillage26 = 7 : CompteurVillage27 = 7 : CompteurVillage28 = 7 : CompteurVillage29 = 7 : CompteurVillage30 = 7 : CompteurVillage31 = 7 : CompteurVillage32 = 7
    CompteurVillage33 = 7 : CompteurVillage34 = 7 : CompteurVillage35 = 7 : CompteurVillage36 = 7 : CompteurVillage37 = 7 : CompteurVillage38 = 7 : CompteurVillage39 = 7 : CompteurVillage40 = 7
    CompteurVillage41 = 7 : CompteurVillage42 = 7 : CompteurVillage43 = 7 : CompteurVillage44 = 7 : CompteurVillage45 = 7 : CompteurVillage46 = 7 : CompteurVillage47 = 7 : CompteurVillage48 = 7
    CompteurVillage49 = 7 : CompteurVillage50 = 7 : CompteurVillage51 = 7 : CompteurVillage52 = 7 : CompteurVillage53 = 7

    CompteurVille1 = 20 : CompteurVille2 = 20 : CompteurVille3 = 20 : CompteurVille4 = 20 : CompteurVille5 = 20 : CompteurVille6 = 20 : CompteurVille7 = 20 : CompteurVille8 = 20 : CompteurVille9 = 10

    StatutVillage1$ = "arène non conquise"
    StatutVillage2$ = "arène non conquise"
    StatutVillage3$ = "arène non conquise"
    StatutVillage4$ = "arène non conquise"
    StatutVillage5$ = "arène non conquise"
    StatutVillage6$ = "arène non conquise"
    StatutVillage7$ = "arène non conquise"
    StatutVillage8$ = "arène non conquise"
    StatutVillage9$ = "arène non conquise"
    StatutVillage10$ = "arène non conquise"
    StatutVillage11$ = "arène non conquise"
    StatutVillage12$ = "arène non conquise"
    StatutVillage13$ = "arène non conquise"
    StatutVillage14$ = "arène non conquise"
    StatutVillage15$ = "arène non conquise"
    StatutVillage16$ = "arène non conquise"
    StatutVillage17$ = "arène non conquise"
    StatutVillage18$ = "arène non conquise"
    StatutVillage19$ = "arène non conquise"
    StatutVillage20$ = "arène non conquise"
    StatutVillage21$ = "arène non conquise"
    StatutVillage22$ = "arène non conquise"
    StatutVillage23$ = "arène non conquise"
    StatutVillage24$ = "arène non conquise"
    StatutVillage25$ = "arène non conquise"
    StatutVillage26$ = "arène non conquise"
    StatutVillage27$ = "arène non conquise"
    StatutVillage28$ = "arène non conquise"
    StatutVillage29$ = "arène non conquise"
    StatutVillage30$ = "arène non conquise"
    StatutVillage31$ = "arène non conquise"
    StatutVillage32$ = "arène non conquise"
    StatutVillage33$ = "arène non conquise"
    StatutVillage34$ = "arène non conquise"
    StatutVillage35$ = "arène non conquise"
    StatutVillage36$ = "arène non conquise"
    StatutVillage37$ = "arène non conquise"
    StatutVillage38$ = "arène non conquise"
    StatutVillage39$ = "arène non conquise"
    StatutVillage40$ = "arène non conquise"
    StatutVillage41$ = "arène non conquise"
    StatutVillage42$ = "arène non conquise"
    StatutVillage43$ = "arène non conquise"
    StatutVillage44$ = "arène non conquise"
    StatutVillage45$ = "arène non conquise"
    StatutVillage46$ = "arène non conquise"
    StatutVillage47$ = "arène non conquise"
    StatutVillage48$ = "arène non conquise"
    StatutVillage49$ = "arène non conquise"
    StatutVillage50$ = "arène non conquise"
    StatutVillage51$ = "arène non conquise"
    StatutVillage52$ = "arène non conquise"
    StatutVillage53$ = "arène non conquise"
    StatutVille1$ = "arène non conquise"
    StatutVille2$ = "arène non conquise"
    StatutVille3$ = "arène non conquise"
    StatutVille4$ = "arène non conquise"
    StatutVille5$ = "arène non conquise"
    StatutVille6$ = "arène non conquise"
    StatutVille7$ = "arène non conquise"
    StatutVille8$ = "arène non conquise"
    StatutLeague$ = "arène non conquise"

    return

    [print]
    village = villageSELECT
    ville = villeSELECT
    open "data.txt" for output as #secu
    print #secu, TypePerso
    print #secu, ChoixPerso
    print #secu, version
    print #secu, lvlPerso
    print #secu, xpPerso
    print #secu, xpPersoTotal
    print #secu, gold
    print #secu, hpPerso
    print #secu, hpPersoTotal
    print #secu, lvlARENA
    print #secu, armorPerso
    print #secu, atkPerso
    print #secu, force
    print #secu, agil
    print #secu, intel
    print #secu, resistance
    print #secu, regenPerso
    print #secu, NitemINVENT
    print #secu, bonusATK
    print #secu, bonusDEF
    print #secu, bonusPV
    print #secu, caseITEMequip(1)
    print #secu, caseITEMequip(2)
    print #secu, caseITEMequip(3)
    print #secu, caseITEMequip(4)
    print #secu, caseITEMequip(5)
    print #secu, rareITEMequip(1)
    print #secu, rareITEMequip(2)
    print #secu, rareITEMequip(3)
    print #secu, rareITEMequip(4)
    print #secu, rareITEMequip(5)
    print #secu, typeITEMequip(1)
    print #secu, typeITEMequip(2)
    print #secu, typeITEMequip(3)
    print #secu, typeITEMequip(4)
    print #secu, typeITEMequip(5)
    print #secu, lvlITEMequip(1)
    print #secu, lvlITEMequip(2)
    print #secu, lvlITEMequip(3)
    print #secu, lvlITEMequip(4)
    print #secu, lvlITEMequip(5)
    print #secu, VequipITEM(1)
    print #secu, VequipITEM(2)
    print #secu, VequipITEM(3)
    print #secu, VequipITEM(4)
    print #secu, VequipITEM(5)
    print #secu, nameITEMequip1$
    print #secu, nameITEMequip2$
    print #secu, nameITEMequip3$
    print #secu, nameITEMequip4$
    print #secu, nameITEMequip5$
    print #secu, caseITEM(1)
    print #secu, caseITEM(2)
    print #secu, caseITEM(3)
    print #secu, caseITEM(4)
    print #secu, caseITEM(5)
    print #secu, caseITEM(6)
    print #secu, caseITEM(7)
    print #secu, caseITEM(8)
    print #secu, caseITEM(9)
    print #secu, caseITEM(10)
    print #secu, caseITEM(11)
    print #secu, caseITEM(12)
    print #secu, caseITEM(13)
    print #secu, caseITEM(14)
    print #secu, caseITEM(15)
    print #secu, caseITEM(16)
    print #secu, caseITEM(17)
    print #secu, caseITEM(18)
    print #secu, rareITEM(1)
    print #secu, rareITEM(2)
    print #secu, rareITEM(3)
    print #secu, rareITEM(4)
    print #secu, rareITEM(5)
    print #secu, rareITEM(6)
    print #secu, rareITEM(7)
    print #secu, rareITEM(8)
    print #secu, rareITEM(9)
    print #secu, rareITEM(10)
    print #secu, rareITEM(11)
    print #secu, rareITEM(12)
    print #secu, rareITEM(13)
    print #secu, rareITEM(14)
    print #secu, rareITEM(15)
    print #secu, rareITEM(16)
    print #secu, rareITEM(17)
    print #secu, rareITEM(18)
    print #secu, typeITEM(1)
    print #secu, typeITEM(2)
    print #secu, typeITEM(3)
    print #secu, typeITEM(4)
    print #secu, typeITEM(5)
    print #secu, typeITEM(6)
    print #secu, typeITEM(7)
    print #secu, typeITEM(8)
    print #secu, typeITEM(9)
    print #secu, typeITEM(10)
    print #secu, typeITEM(11)
    print #secu, typeITEM(12)
    print #secu, typeITEM(13)
    print #secu, typeITEM(14)
    print #secu, typeITEM(15)
    print #secu, typeITEM(16)
    print #secu, typeITEM(17)
    print #secu, typeITEM(18)
    print #secu, lvlITEM(1)
    print #secu, lvlITEM(2)
    print #secu, lvlITEM(3)
    print #secu, lvlITEM(4)
    print #secu, lvlITEM(5)
    print #secu, lvlITEM(6)
    print #secu, lvlITEM(7)
    print #secu, lvlITEM(8)
    print #secu, lvlITEM(9)
    print #secu, lvlITEM(10)
    print #secu, lvlITEM(11)
    print #secu, lvlITEM(12)
    print #secu, lvlITEM(13)
    print #secu, lvlITEM(14)
    print #secu, lvlITEM(15)
    print #secu, lvlITEM(16)
    print #secu, lvlITEM(17)
    print #secu, lvlITEM(18)
    print #secu, val1ITEM(1)
    print #secu, val1ITEM(2)
    print #secu, val1ITEM(3)
    print #secu, val1ITEM(4)
    print #secu, val1ITEM(5)
    print #secu, val1ITEM(6)
    print #secu, val1ITEM(7)
    print #secu, val1ITEM(8)
    print #secu, val1ITEM(9)
    print #secu, val1ITEM(10)
    print #secu, val1ITEM(11)
    print #secu, val1ITEM(12)
    print #secu, val1ITEM(13)
    print #secu, val1ITEM(14)
    print #secu, val1ITEM(15)
    print #secu, val1ITEM(16)
    print #secu, val1ITEM(17)
    print #secu, val1ITEM(18)
    print #secu, vieITEM(1)
    print #secu, vieITEM(2)
    print #secu, vieITEM(3)
    print #secu, vieITEM(4)
    print #secu, vieITEM(5)
    print #secu, vieITEM(6)
    print #secu, vieITEM(7)
    print #secu, vieITEM(8)
    print #secu, vieITEM(9)
    print #secu, vieITEM(10)
    print #secu, vieITEM(11)
    print #secu, vieITEM(12)
    print #secu, vieITEM(13)
    print #secu, vieITEM(14)
    print #secu, vieITEM(15)
    print #secu, vieITEM(16)
    print #secu, vieITEM(17)
    print #secu, vieITEM(18)
    print #secu, VIEequipITEM(1)
    print #secu, VIEequipITEM(2)
    print #secu, VIEequipITEM(3)
    print #secu, VIEequipITEM(4)
    print #secu, VIEequipITEM(5)
    print #secu, nameITEM1$
    print #secu, nameITEM2$
    print #secu, nameITEM3$
    print #secu, nameITEM4$
    print #secu, nameITEM5$
    print #secu, nameITEM6$
    print #secu, nameITEM7$
    print #secu, nameITEM8$
    print #secu, nameITEM9$
    print #secu, nameITEM10$
    print #secu, nameITEM11$
    print #secu, nameITEM12$
    print #secu, nameITEM13$
    print #secu, nameITEM14$
    print #secu, nameITEM15$
    print #secu, nameITEM16$
    print #secu, nameITEM17$
    print #secu, nameITEM18$
    print #secu, talent1XP
    print #secu, talent2XP
    print #secu, talent3XP
    print #secu, talent4XP
    print #secu, talent5XP
    print #secu, talent6XP
    print #secu, talent7XP
    print #secu, talent1XPtotal
    print #secu, talent2XPtotal
    print #secu, talent3XPtotal
    print #secu, talent4XPtotal
    print #secu, talent5XPtotal
    print #secu, talent6XPtotal
    print #secu, talent7XPtotal
    print #secu, talent1
    print #secu, talent2
    print #secu, talent3
    print #secu, talent4
    print #secu, talent5
    print #secu, talent6
    print #secu, talent7
    print #secu, tuto
    print #secu, classe$
    print #secu, reputation
    print #secu, StatutVillage1$ 
    print #secu, StatutVillage2$ 
    print #secu, StatutVillage3$ 
    print #secu, StatutVillage4$ 
    print #secu, StatutVillage5$ 
    print #secu, StatutVillage6$ 
    print #secu, StatutVillage7$ 
    print #secu, StatutVillage8$ 
    print #secu, StatutVillage9$ 
    print #secu, StatutVillage10$ 
    print #secu, StatutVillage11$ 
    print #secu, StatutVillage12$ 
    print #secu, StatutVillage13$ 
    print #secu, StatutVillage14$ 
    print #secu, StatutVillage15$ 
    print #secu, StatutVillage16$ 
    print #secu, StatutVillage17$ 
    print #secu, StatutVillage18$ 
    print #secu, StatutVillage19$ 
    print #secu, StatutVillage20$ 
    print #secu, StatutVillage21$ 
    print #secu, StatutVillage22$ 
    print #secu, StatutVillage23$ 
    print #secu, StatutVillage24$ 
    print #secu, StatutVillage25$ 
    print #secu, StatutVillage26$ 
    print #secu, StatutVillage27$ 
    print #secu, StatutVillage28$ 
    print #secu, StatutVillage29$ 
    print #secu, StatutVillage30$ 
    print #secu, StatutVillage31$ 
    print #secu, StatutVillage32$ 
    print #secu, StatutVillage33$ 
    print #secu, StatutVillage34$ 
    print #secu, StatutVillage35$ 
    print #secu, StatutVillage36$ 
    print #secu, StatutVillage37$ 
    print #secu, StatutVillage38$ 
    print #secu, StatutVillage39$ 
    print #secu, StatutVillage40$ 
    print #secu, StatutVillage41$ 
    print #secu, StatutVillage42$ 
    print #secu, StatutVillage43$ 
    print #secu, StatutVillage44$ 
    print #secu, StatutVillage45$ 
    print #secu, StatutVillage46$ 
    print #secu, StatutVillage47$ 
    print #secu, StatutVillage48$ 
    print #secu, StatutVillage49$ 
    print #secu, StatutVillage50$ 
    print #secu, StatutVillage51$ 
    print #secu, StatutVillage52$
    print #secu, StatutVillage53$
    print #secu, StatutVille1$ 
    print #secu, StatutVille2$ 
    print #secu, StatutVille3$ 
    print #secu, StatutVille4$ 
    print #secu, StatutVille5$ 
    print #secu, StatutVille6$ 
    print #secu, StatutVille7$ 
    print #secu, StatutVille8$
    print #secu, StatutVille9$ 
    print #secu, StatutLeague$
    print #secu, village
    print #secu, ville
    print #secu, CompteurVillage1
    print #secu, CompteurVillage2
    print #secu, CompteurVillage3
    print #secu, CompteurVillage4
    print #secu, CompteurVillage5
    print #secu, CompteurVillage6
    print #secu, CompteurVillage7
    print #secu, CompteurVillage8
    print #secu, CompteurVillage9
    print #secu, CompteurVillage10
    print #secu, CompteurVillage11
    print #secu, CompteurVillage12
    print #secu, CompteurVillage13
    print #secu, CompteurVillage14
    print #secu, CompteurVillage15
    print #secu, CompteurVillage16
    print #secu, CompteurVillage17
    print #secu, CompteurVillage18
    print #secu, CompteurVillage19
    print #secu, CompteurVillage20
    print #secu, CompteurVillage21
    print #secu, CompteurVillage22
    print #secu, CompteurVillage23
    print #secu, CompteurVillage24
    print #secu, CompteurVillage25
    print #secu, CompteurVillage26
    print #secu, CompteurVillage27
    print #secu, CompteurVillage28
    print #secu, CompteurVillage29
    print #secu, CompteurVillage30
    print #secu, CompteurVillage31
    print #secu, CompteurVillage32
    print #secu, CompteurVillage33
    print #secu, CompteurVillage34
    print #secu, CompteurVillage35
    print #secu, CompteurVillage36
    print #secu, CompteurVillage37
    print #secu, CompteurVillage38
    print #secu, CompteurVillage39
    print #secu, CompteurVillage40
    print #secu, CompteurVillage41
    print #secu, CompteurVillage42
    print #secu, CompteurVillage43
    print #secu, CompteurVillage44
    print #secu, CompteurVillage45
    print #secu, CompteurVillage46
    print #secu, CompteurVillage47
    print #secu, CompteurVillage48
    print #secu, CompteurVillage49
    print #secu, CompteurVillage50
    print #secu, CompteurVillage51
    print #secu, CompteurVillage52
    print #secu, CompteurVillage53
    print #secu, CompteurVille1
    print #secu, CompteurVille2
    print #secu, CompteurVille3
    print #secu, CompteurVille4
    print #secu, CompteurVille5
    print #secu, CompteurVille6
    print #secu, CompteurVille7
    print #secu, CompteurVille8
    print #secu, CompteurVille9
    print #secu, worldOPEN
    print #secu, PersoX
    print #secu, PersoY
    print #secu, reputationVillage(1)
    print #secu, reputationVillage(2)
    print #secu, reputationVillage(3)
    print #secu, reputationVillage(4)
    print #secu, reputationVillage(5)
    print #secu, reputationVillage(6)
    print #secu, reputationVillage(7)
    print #secu, reputationVillage(8)
    print #secu, reputationVillage(9)
    print #secu, reputationVillage(10)
    print #secu, reputationVillage(11)
    print #secu, reputationVillage(12)
    print #secu, reputationVillage(13)
    print #secu, reputationVillage(14)
    print #secu, reputationVillage(15)
    print #secu, reputationVillage(16)
    print #secu, reputationVillage(17)
    print #secu, reputationVillage(18)
    print #secu, reputationVillage(19)
    print #secu, reputationVillage(20)
    print #secu, reputationVillage(21)
    print #secu, reputationVillage(22)
    print #secu, reputationVillage(23)
    print #secu, reputationVillage(24)
    print #secu, reputationVillage(25)
    print #secu, reputationVillage(26)
    print #secu, reputationVillage(27)
    print #secu, reputationVillage(28)
    print #secu, reputationVillage(29)
    print #secu, reputationVillage(30)
    print #secu, reputationVillage(31)
    print #secu, reputationVillage(32)
    print #secu, reputationVillage(33)
    print #secu, reputationVillage(34)
    print #secu, reputationVillage(35)
    print #secu, reputationVillage(36)
    print #secu, reputationVillage(37)
    print #secu, reputationVillage(38)
    print #secu, reputationVillage(39)
    print #secu, reputationVillage(40)
    print #secu, reputationVillage(41)
    print #secu, reputationVillage(42)
    print #secu, reputationVillage(43)
    print #secu, reputationVillage(44)
    print #secu, reputationVillage(45)
    print #secu, reputationVillage(46)
    print #secu, reputationVillage(47)
    print #secu, reputationVillage(48)
    print #secu, reputationVillage(49)
    print #secu, reputationVillage(50)
    print #secu, reputationVillage(51)
    print #secu, reputationVillage(52)
    print #secu, reputationVillage(53)
    print #secu, reputationVille(1)
    print #secu, reputationVille(2)
    print #secu, reputationVille(3)
    print #secu, reputationVille(4)
    print #secu, reputationVille(5)
    print #secu, reputationVille(6)
    print #secu, reputationVille(7)
    print #secu, reputationVille(8)
    print #secu, villageSELECT
    print #secu, villeSELECT
    print #secu, bruitage
    close #secu
    return


    [input]
    open "data.txt" for input as #secu
    input #secu, TypePerso
    input #secu, ChoixPerso
    input #secu, version
    input #secu, lvlPerso
    input #secu, xpPerso
    input #secu, xpPersoTotal
    input #secu, gold
    input #secu, hpPerso
    input #secu, hpPersoTotal
    input #secu, lvlARENA
    input #secu, armorPerso
    input #secu, atkPerso
    input #secu, force
    input #secu, agil
    input #secu, intel
    input #secu, resistance
    input #secu, regenPerso
    input #secu, NitemINVENT
    input #secu, bonusATK
    input #secu, bonusDEF
    input #secu, bonusPV
    input #secu, caseITEMequip(1)
    input #secu, caseITEMequip(2)
    input #secu, caseITEMequip(3)
    input #secu, caseITEMequip(4)
    input #secu, caseITEMequip(5)
    input #secu, rareITEMequip(1)
    input #secu, rareITEMequip(2)
    input #secu, rareITEMequip(3)
    input #secu, rareITEMequip(4)
    input #secu, rareITEMequip(5)
    input #secu, typeITEMequip(1)
    input #secu, typeITEMequip(2)
    input #secu, typeITEMequip(3)
    input #secu, typeITEMequip(4)
    input #secu, typeITEMequip(5)
    input #secu, lvlITEMequip(1)
    input #secu, lvlITEMequip(2)
    input #secu, lvlITEMequip(3)
    input #secu, lvlITEMequip(4)
    input #secu, lvlITEMequip(5)
    input #secu, VequipITEM(1)
    input #secu, VequipITEM(2)
    input #secu, VequipITEM(3)
    input #secu, VequipITEM(4)
    input #secu, VequipITEM(5)
    input #secu, nameITEMequip1$
    input #secu, nameITEMequip2$
    input #secu, nameITEMequip3$
    input #secu, nameITEMequip4$
    input #secu, nameITEMequip5$
    input #secu, caseITEM(1)
    input #secu, caseITEM(2)
    input #secu, caseITEM(3)
    input #secu, caseITEM(4)
    input #secu, caseITEM(5)
    input #secu, caseITEM(6)
    input #secu, caseITEM(7)
    input #secu, caseITEM(8)
    input #secu, caseITEM(9)
    input #secu, caseITEM(10)
    input #secu, caseITEM(11)
    input #secu, caseITEM(12)
    input #secu, caseITEM(13)
    input #secu, caseITEM(14)
    input #secu, caseITEM(15)
    input #secu, caseITEM(16)
    input #secu, caseITEM(17)
    input #secu, caseITEM(18)
    input #secu, rareITEM(1)
    input #secu, rareITEM(2)
    input #secu, rareITEM(3)
    input #secu, rareITEM(4)
    input #secu, rareITEM(5)
    input #secu, rareITEM(6)
    input #secu, rareITEM(7)
    input #secu, rareITEM(8)
    input #secu, rareITEM(9)
    input #secu, rareITEM(10)
    input #secu, rareITEM(11)
    input #secu, rareITEM(12)
    input #secu, rareITEM(13)
    input #secu, rareITEM(14)
    input #secu, rareITEM(15)
    input #secu, rareITEM(16)
    input #secu, rareITEM(17)
    input #secu, rareITEM(18)
    input #secu, typeITEM(1)
    input #secu, typeITEM(2)
    input #secu, typeITEM(3)
    input #secu, typeITEM(4)
    input #secu, typeITEM(5)
    input #secu, typeITEM(6)
    input #secu, typeITEM(7)
    input #secu, typeITEM(8)
    input #secu, typeITEM(9)
    input #secu, typeITEM(10)
    input #secu, typeITEM(11)
    input #secu, typeITEM(12)
    input #secu, typeITEM(13)
    input #secu, typeITEM(14)
    input #secu, typeITEM(15)
    input #secu, typeITEM(16)
    input #secu, typeITEM(17)
    input #secu, typeITEM(18)
    input #secu, lvlITEM(1)
    input #secu, lvlITEM(2)
    input #secu, lvlITEM(3)
    input #secu, lvlITEM(4)
    input #secu, lvlITEM(5)
    input #secu, lvlITEM(6)
    input #secu, lvlITEM(7)
    input #secu, lvlITEM(8)
    input #secu, lvlITEM(9)
    input #secu, lvlITEM(10)
    input #secu, lvlITEM(11)
    input #secu, lvlITEM(12)
    input #secu, lvlITEM(13)
    input #secu, lvlITEM(14)
    input #secu, lvlITEM(15)
    input #secu, lvlITEM(16)
    input #secu, lvlITEM(17)
    input #secu, lvlITEM(18)
    input #secu, val1ITEM(1)
    input #secu, val1ITEM(2)
    input #secu, val1ITEM(3)
    input #secu, val1ITEM(4)
    input #secu, val1ITEM(5)
    input #secu, val1ITEM(6)
    input #secu, val1ITEM(7)
    input #secu, val1ITEM(8)
    input #secu, val1ITEM(9)
    input #secu, val1ITEM(10)
    input #secu, val1ITEM(11)
    input #secu, val1ITEM(12)
    input #secu, val1ITEM(13)
    input #secu, val1ITEM(14)
    input #secu, val1ITEM(15)
    input #secu, val1ITEM(16)
    input #secu, val1ITEM(17)
    input #secu, val1ITEM(18)
    input #secu, vieITEM(1)
    input #secu, vieITEM(2)
    input #secu, vieITEM(3)
    input #secu, vieITEM(4)
    input #secu, vieITEM(5)
    input #secu, vieITEM(6)
    input #secu, vieITEM(7)
    input #secu, vieITEM(8)
    input #secu, vieITEM(9)
    input #secu, vieITEM(10)
    input #secu, vieITEM(11)
    input #secu, vieITEM(12)
    input #secu, vieITEM(13)
    input #secu, vieITEM(14)
    input #secu, vieITEM(15)
    input #secu, vieITEM(16)
    input #secu, vieITEM(17)
    input #secu, vieITEM(18)
    input #secu, VIEequipITEM(1)
    input #secu, VIEequipITEM(2)
    input #secu, VIEequipITEM(3)
    input #secu, VIEequipITEM(4)
    input #secu, VIEequipITEM(5)
    input #secu, nameITEM1$
    input #secu, nameITEM2$
    input #secu, nameITEM3$
    input #secu, nameITEM4$
    input #secu, nameITEM5$
    input #secu, nameITEM6$
    input #secu, nameITEM7$
    input #secu, nameITEM8$
    input #secu, nameITEM9$
    input #secu, nameITEM10$
    input #secu, nameITEM11$
    input #secu, nameITEM12$
    input #secu, nameITEM13$
    input #secu, nameITEM14$
    input #secu, nameITEM15$
    input #secu, nameITEM16$
    input #secu, nameITEM17$
    input #secu, nameITEM18$
    input #secu, talent1XP
    input #secu, talent2XP
    input #secu, talent3XP
    input #secu, talent4XP
    input #secu, talent5XP
    input #secu, talent6XP
    input #secu, talent7XP
    input #secu, talent1XPtotal
    input #secu, talent2XPtotal
    input #secu, talent3XPtotal
    input #secu, talent4XPtotal
    input #secu, talent5XPtotal
    input #secu, talent6XPtotal
    input #secu, talent7XPtotal
    input #secu, talent1
    input #secu, talent2
    input #secu, talent3
    input #secu, talent4
    input #secu, talent5
    input #secu, talent6
    input #secu, talent7
    input #secu, tuto
    input #secu, classe$
    input #secu, reputation
    input #secu, StatutVillage1$ 
    input #secu, StatutVillage2$ 
    input #secu, StatutVillage3$ 
    input #secu, StatutVillage4$ 
    input #secu, StatutVillage5$ 
    input #secu, StatutVillage6$ 
    input #secu, StatutVillage7$ 
    input #secu, StatutVillage8$ 
    input #secu, StatutVillage9$ 
    input #secu, StatutVillage10$ 
    input #secu, StatutVillage11$ 
    input #secu, StatutVillage12$ 
    input #secu, StatutVillage13$ 
    input #secu, StatutVillage14$ 
    input #secu, StatutVillage15$ 
    input #secu, StatutVillage16$ 
    input #secu, StatutVillage17$ 
    input #secu, StatutVillage18$ 
    input #secu, StatutVillage19$ 
    input #secu, StatutVillage20$ 
    input #secu, StatutVillage21$ 
    input #secu, StatutVillage22$ 
    input #secu, StatutVillage23$ 
    input #secu, StatutVillage24$ 
    input #secu, StatutVillage25$ 
    input #secu, StatutVillage26$ 
    input #secu, StatutVillage27$ 
    input #secu, StatutVillage28$ 
    input #secu, StatutVillage29$ 
    input #secu, StatutVillage30$ 
    input #secu, StatutVillage31$ 
    input #secu, StatutVillage32$ 
    input #secu, StatutVillage33$ 
    input #secu, StatutVillage34$ 
    input #secu, StatutVillage35$ 
    input #secu, StatutVillage36$ 
    input #secu, StatutVillage37$ 
    input #secu, StatutVillage38$ 
    input #secu, StatutVillage39$ 
    input #secu, StatutVillage40$ 
    input #secu, StatutVillage41$ 
    input #secu, StatutVillage42$ 
    input #secu, StatutVillage43$ 
    input #secu, StatutVillage44$ 
    input #secu, StatutVillage45$ 
    input #secu, StatutVillage46$ 
    input #secu, StatutVillage47$ 
    input #secu, StatutVillage48$ 
    input #secu, StatutVillage49$ 
    input #secu, StatutVillage50$ 
    input #secu, StatutVillage51$ 
    input #secu, StatutVillage52$ 
    input #secu, StatutVillage53$
    input #secu, StatutVille1$ 
    input #secu, StatutVille2$ 
    input #secu, StatutVille3$ 
    input #secu, StatutVille4$ 
    input #secu, StatutVille5$ 
    input #secu, StatutVille6$ 
    input #secu, StatutVille7$ 
    input #secu, StatutVille8$ 
    input #secu, StatutVille9$ 
    input #secu, StatutLeague$
    input #secu, village
    input #secu, ville
    input #secu, CompteurVillage1
    input #secu, CompteurVillage2
    input #secu, CompteurVillage3
    input #secu, CompteurVillage4
    input #secu, CompteurVillage5
    input #secu, CompteurVillage6
    input #secu, CompteurVillage7
    input #secu, CompteurVillage8
    input #secu, CompteurVillage9
    input #secu, CompteurVillage10
    input #secu, CompteurVillage11
    input #secu, CompteurVillage12
    input #secu, CompteurVillage13
    input #secu, CompteurVillage14
    input #secu, CompteurVillage15
    input #secu, CompteurVillage16
    input #secu, CompteurVillage17
    input #secu, CompteurVillage18
    input #secu, CompteurVillage19
    input #secu, CompteurVillage20
    input #secu, CompteurVillage21
    input #secu, CompteurVillage22
    input #secu, CompteurVillage23
    input #secu, CompteurVillage24
    input #secu, CompteurVillage25
    input #secu, CompteurVillage26
    input #secu, CompteurVillage27
    input #secu, CompteurVillage28
    input #secu, CompteurVillage29
    input #secu, CompteurVillage30
    input #secu, CompteurVillage31
    input #secu, CompteurVillage32
    input #secu, CompteurVillage33
    input #secu, CompteurVillage34
    input #secu, CompteurVillage35
    input #secu, CompteurVillage36
    input #secu, CompteurVillage37
    input #secu, CompteurVillage38
    input #secu, CompteurVillage39
    input #secu, CompteurVillage40
    input #secu, CompteurVillage41
    input #secu, CompteurVillage42
    input #secu, CompteurVillage43
    input #secu, CompteurVillage44
    input #secu, CompteurVillage45
    input #secu, CompteurVillage46
    input #secu, CompteurVillage47
    input #secu, CompteurVillage48
    input #secu, CompteurVillage49
    input #secu, CompteurVillage50
    input #secu, CompteurVillage51
    input #secu, CompteurVillage52
    input #secu, CompteurVillage53
    input #secu, CompteurVille1
    input #secu, CompteurVille2
    input #secu, CompteurVille3
    input #secu, CompteurVille4
    input #secu, CompteurVille5
    input #secu, CompteurVille6
    input #secu, CompteurVille7
    input #secu, CompteurVille8
    input #secu, CompteurVille9
    input #secu, worldOPEN
    input #secu, PersoX
    input #secu, PersoY
    input #secu, reputationVillage(1)
    input #secu, reputationVillage(2)
    input #secu, reputationVillage(3)
    input #secu, reputationVillage(4)
    input #secu, reputationVillage(5)
    input #secu, reputationVillage(6)
    input #secu, reputationVillage(7)
    input #secu, reputationVillage(8)
    input #secu, reputationVillage(9)
    input #secu, reputationVillage(10)
    input #secu, reputationVillage(11)
    input #secu, reputationVillage(12)
    input #secu, reputationVillage(13)
    input #secu, reputationVillage(14)
    input #secu, reputationVillage(15)
    input #secu, reputationVillage(16)
    input #secu, reputationVillage(17)
    input #secu, reputationVillage(18)
    input #secu, reputationVillage(19)
    input #secu, reputationVillage(20)
    input #secu, reputationVillage(21)
    input #secu, reputationVillage(22)
    input #secu, reputationVillage(23)
    input #secu, reputationVillage(24)
    input #secu, reputationVillage(25)
    input #secu, reputationVillage(26)
    input #secu, reputationVillage(27)
    input #secu, reputationVillage(28)
    input #secu, reputationVillage(29)
    input #secu, reputationVillage(30)
    input #secu, reputationVillage(31)
    input #secu, reputationVillage(32)
    input #secu, reputationVillage(33)
    input #secu, reputationVillage(34)
    input #secu, reputationVillage(35)
    input #secu, reputationVillage(36)
    input #secu, reputationVillage(37)
    input #secu, reputationVillage(38)
    input #secu, reputationVillage(39)
    input #secu, reputationVillage(40)
    input #secu, reputationVillage(41)
    input #secu, reputationVillage(42)
    input #secu, reputationVillage(43)
    input #secu, reputationVillage(44)
    input #secu, reputationVillage(45)
    input #secu, reputationVillage(46)
    input #secu, reputationVillage(47)
    input #secu, reputationVillage(48)
    input #secu, reputationVillage(49)
    input #secu, reputationVillage(50)
    input #secu, reputationVillage(51)
    input #secu, reputationVillage(52)
    input #secu, reputationVillage(53)
    input #secu, reputationVille(1)
    input #secu, reputationVille(2)
    input #secu, reputationVille(3)
    input #secu, reputationVille(4)
    input #secu, reputationVille(5)
    input #secu, reputationVille(6)
    input #secu, reputationVille(7)
    input #secu, reputationVille(8)
    input #secu, villageSELECT
    input #secu, villeSELECT
    input #secu, bruitage
    close #secu
    return



