'********************************************************************
'Official website : atomose.fr                  *
'Creat with : LibertyBasic 4.51 pro licence                         *
'             By Alexandre Lomuto                                   *
'********************************************************************


    Version$ = "5.88.17" : MusicSELECT = 0
    WindowWidth = 1310 : WindowHeight = 830
    BackgroundColor$ = "white" : ForegroundColor$ = "black"
    UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)

    nomainwin

    graphicbox #main.map, 0, 0, WindowWidth, WindowHeight
    open "" for dialog_nf as #main
    #main.map "fill white"
    #main, "trapclose [quit]"
    #main.map , "down"
    #main.map, "font Times New Roman 20; color black;backcolor white"
    #main.map, "place 430 140 ;\"; "Une création de UnLiMiTeD Corporation"
    #main.map, "place 560 550 ;\"; "Production 2018"
    #main.map, "font Times New Roman 12; color black"
    #main.map, "place 220 330 ;\"; "Tous les produits, audio et images présents dans ce jeu sont la propriété de leur marque respective.Ce jeu est gratuit et n'a donc aucun but commercial.\Pour toutes réclamations concernant les droits d'auteurs d'images vous appartenant, merci de contacter le concepteur du jeu via l'adresse mail donnée.\Pour rappel, chaque images est utilisé sans but lucratif, ces images seront remplacées par des images propriétaires au fur et à mesure des Mise A Jour."

    DATAmax = 191
    DATAmin = 1
    loadbmp "Qp", "data\Qp.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin;" / ";DATAmax;"     "
    loadbmp "valrak", "data\ennemis\valrak.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     "
    loadbmp "sav1", "data\sav1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "camp", "data\camp1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "camp2", "data\camp2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "sav2", "data\sav2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "dialQUEST", "data\dialQUEST.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "hautF", "data\hautFAITS.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "over", "data\OVER.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "indic1", "data\indic1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "lvlUP", "data\lvlUP.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gardien", "data\ennemis\gardien.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "barreQ", "data\barreQ.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "select", "data\select.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "drap1", "data\drapo1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "drap2", "data\drapo2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "fenetre1", "data\fenetre1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "aide", "data\aide.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "clear", "data\CLEAR.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "main0", "data\main0.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapHEALER", "data\healer.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapFORGERON", "data\forgeron.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mainINV", "data\inventaire.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "back", "data\add2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "dialog", "data\dialog.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "p1", "data\lifePOTION.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "p2", "data\lifePOTION2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "p3", "data\lifePOTION3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "p4", "data\lifePOTION4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "p5", "data\lifePOTION5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnj1", "data\pnj1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnj2", "data\pnj2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnj3", "data\pnj3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnj4", "data\pnj4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "indicQ1", "data\QUEST1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "indicQ2", "data\QUEST2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniTANKfemme", "data\miniTANKfemme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniGUERRIERfemme", "data\miniGUERRIERfemme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniARCHERfemme", "data\miniARCHERfemme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniARTISANfemme", "data\miniARTISANfemme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniSOIGNEURfemme", "data\miniSOIGNEURfemme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniSOIGNEURhomme", "data\miniSOIGNEURhomme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniGUERRIERhomme", "data\miniGUERRIERhomme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniARTISANhomme", "data\miniARTISANhomme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniTANKhomme", "data\miniTANKhomme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "miniARCHERhomme", "data\miniARCHERhomme.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapMARCHAND", "data\marchand1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapMARCHAND2", "data\marchand2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "maro", "data\marchand3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "main", "data\choix.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "add", "data\add3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "competence", "data\add.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "add2", "data\add4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mainCASTLE", "data\main1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapbutton", "data\mapBUTTON.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "menubutton", "data\menuBUTTON.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapbutton2", "data\mapBUTTON2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "barre", "data\barre.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "perso", "data\persoBUTTON.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "barre2", "data\barre.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boum", "data\boum.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boum2", "data\boum2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "fuir", "data\fuir.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "guard1", "data\ennemis\garde1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "guard2", "data\ennemis\garde2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss1", "data\ennemis\boss1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss2", "data\ennemis\boss2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss3", "data\ennemis\boss3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss4", "data\ennemis\boss4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss5", "data\ennemis\boss5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss6", "data\ennemis\boss6.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss7", "data\ennemis\boss7.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss8", "data\ennemis\boss8.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "tankHOMME", "data\tank1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "tankFEMME", "data\tank2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "archerHOMME", "data\archer1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "archerFEMME", "data\archer2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "guerrierHOMME", "data\guerrier1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "guerrierFEMME", "data\guerrier2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mageHOMME", "data\mage1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mageFEMME", "data\mage2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "artisanHOMME", "data\artisan1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "artisanFEMME", "data\artisan2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "donjon1", "data\donjon1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "donjon2", "data\donjon2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "foret1", "data\foret1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "sanglier1", "data\ennemis\sanglier1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "sanglier2", "data\ennemis\sanglier2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "araigner1", "data\ennemis\araigner1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "araigner2", "data\ennemis\araigner2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "araigner3", "data\ennemis\araigner3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "araigner4", "data\ennemis\araigner4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "araigner5", "data\ennemis\araigner5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gobelin1", "data\ennemis\gobelin1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gobelin2", "data\ennemis\gobelin2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gobelin3", "data\ennemis\gobelin3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gobelin4", "data\ennemis\gobelin4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gobelin5", "data\ennemis\gobelin5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "gobelin6", "data\ennemis\gobelin6.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "plante1", "data\ennemis\plante1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "ud1", "data\ennemis\garde1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "ud2", "data\ennemis\garde2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "phenix1", "data\ennemis\phenix1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "centaur1", "data\ennemis\centaur1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "golem1", "data\ennemis\golem1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "golem2", "data\ennemis\golem2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "map", "data\map1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "son1", "data\sonOn.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "city1", "data\CITY1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "tele", "data\teleporteur.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "lib", "data\library.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pendentif1", "data\pendentif1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "taverne", "data\taverne.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "player1", "data\ennemis\player1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "player2", "data\ennemis\player2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "player3", "data\ennemis\player3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "player4", "data\ennemis\player4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "RedDragon1", "data\ennemis\RedDragon1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "HF", "data\HF.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss9", "data\ennemis\boss9.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss10", "data\ennemis\boss10.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "guard4", "data\ennemis\garde4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss11", "data\ennemis\boss11.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "boss12", "data\ennemis\boss12.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "mapMARCHAND4", "data\marchand4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnjX1", "data\pnjX1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnjY1", "data\pnjY1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "1a", "data\items\armures\1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "1w", "data\items\armes\1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "2w", "data\items\armes\2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "3w", "data\items\armes\3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "4w", "data\items\armes\4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "5w", "data\items\armes\5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "6w", "data\items\armes\6.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "7w", "data\items\armes\7.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "8w", "data\items\armes\8.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "9w", "data\items\armes\9.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "10w", "data\items\armes\10.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "11w", "data\items\armes\11.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "12w", "data\items\armes\12.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "13w", "data\items\armes\13.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "14w", "data\items\armes\14.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "2a", "data\items\armures\2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "3a", "data\items\armures\3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "4a", "data\items\armures\4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "5a", "data\items\armures\5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "6a", "data\items\armures\6.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "7a", "data\items\armures\7.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "8a", "data\items\armures\8.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "9a", "data\items\armures\9.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "10a", "data\items\armures\10.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "11a", "data\items\armures\11.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "12a", "data\items\armures\12.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "13a", "data\items\armures\13.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "15w", "data\items\armes\15.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "pnjY2", "data\pnjY2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s1", "data\skill\1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s2", "data\skill\2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s3", "data\skill\3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s4", "data\skill\4.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s5", "data\skill\5.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s6", "data\skill\6.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s7", "data\skill\7.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s8", "data\skill\8.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s9", "data\skill\9.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s10", "data\skill\10.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s11", "data\skill\11.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s12", "data\skill\12.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s13", "data\skill\13.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s14", "data\skill\14.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s15", "data\skill\15.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s16", "data\skill\16.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s17", "data\skill\17.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s18", "data\skill\18.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s0", "data\skill\0.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "cadreSKILL", "data\cadreSKILL.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "r1", "data\items\gemmes\r1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "r2", "data\items\gemmes\r2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "r3", "data\items\gemmes\r3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "b1", "data\items\gemmes\b1.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "b2", "data\items\gemmes\b2.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "b3", "data\items\gemmes\b3.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s19", "data\skill\19.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s20", "data\skill\20.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s21", "data\skill\21.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s22", "data\skill\22.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s23", "data\skill\23.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    loadbmp "s24", "data\skill\24.bmp" : #main.map, "place 535 640 ;\"; "Chargement des ressources : ";DATAmin+1;" / ";DATAmax;"     " :  DATAmin = DATAmin + 1
    gosub [loading2]
    GOTO [ini]
    wait

[ini]
timer 0
close #main

[start]
gosub [data]
nombreACHATitem = 0 :nombreACHATitemtota = 0 : nombreUPitem = 0 : nombreQUEST = 0 : nombreUPitemtota = 0 : nombreQUESTtota = 0 : nombreUPsac = 0 : nombreUTILparch = 0
nombreDROPpotion = 0 : nombreUTILmedail = 0 : speakTOpnj = 0 : nombreUPsactota = 0 : nombreUTILparchtota = 0 : nombreDROPpotiontota = 0 : nombreUTILmedailtota = 0 : speakTOpnjtota = 0
LvlDONJON = 1 : lvlDONJONtota = 3 : secu1PALLIER = 0 : secu2PALLIER = 0 : SECUmusic = 1 : RACE$ = "GUERRIER" : sexe = 1 : PStota = 5 : PPtota = 5 : NumberFLOORmonster = 0 : BOSS = 0
lvlPASSIVE1 = 0 : lvlPASSIVE2 = 0 : lvlPASSIVE3 = 0 : lvlPASSIVE4 = 0 : lvlPASSIVE5 = 0 : lvlPASSIVE6 = 0
lvlPASSIVE7 = 0 : lvlPASSIVE8 = 0 : lvlPASSIVE9 = 0 : lvlPASSIVE10 = 0 : lvlPASSIVE11 = 0 : lvlPASSIVE12 = 0
lvlPASSIVE13 = 0 : lvlPASSIVE14 = 0 : lvlPASSIVE15 = 0 : lvlPASSIVE16 = 0 : lvlPASSIVE17 = 0 : lvlPASSIVE18 = 0
lvlPASSIVE19 = 0 : lvlPASSIVE20 = 0 : lvlPASSIVE21 = 0 : lvlPASSIVE22 = 0 : lvlPASSIVE23 = 0 : lvlPASSIVE24 = 0
BONUSatk = 0 : BONUSdef = 0  : TYPEatkEQUIP$ = "" : TYPEdefEQUIP$ = "" : lvlITEM1 = 0 : lvlITEM2 = 0
BONUSgold = 0 : BONUSxp = 0 : moneyTOTA = 0 : add1 = 0 : add2 = 0 : WindowWidth = 1310 : WindowHeight = 830
PARCHEMIN1 = 0 : PARCHEMIN2 = 0 : PARCHEMIN3 = 0 : PARCHEMIN4 = 0 : PARCHEMIN5 = 0 : PARCHEMIN6 = 0 : PARCHEMIN7 = 1
PotionLittleHP = 3 : PotionMediumHP = 0 : PotionBigHP = 0 : PotionBig2HP = 0 : PotionBig3HP = 0 : nombreUPitem = 0 : nombreUPsac = 0
PotionLittleHPmax = 0 : PotionMediumHPmax = 0 : PotionBigHPmax = 0 : PotionBig2HPmax = 0 : PotionBig3HPmax = 0
noGAME = 1 : nameTAPER$ = "" : mdpTAPER$ = "" : TYPEatkEQUIP$ = "" : TYPEdefEQUIP$ = ""
load = 0 : PoS = 0 : PoP = 0 : r = 1 : b = 19 : v = 10 : login = 1 : ACTIVATIONvalrak = 0 : ACTIVATIONcampSANGI  = 0
packQ1 = 1 : packQ2 = 2 : packQ3 = 2 : packQ4 = 2 : packQ5 = 2 : OKupSTUFF$ = ""
OPENdialogQ = 0 : OKarm$ = "" : OKarm2$ = "" : OKupSac$ = "" : OkachatPop$ = "" : nombreACHATpop = 0
NombreKILLsangi = 0 : VALRAKlife = 0 : nombrePLANTtuer = 0 : nombreSQUEtuer = 0 : nombreGOBtuer = 0 : nombreARAtuer = 0
Qtaverne = 0 : nombreOEUFphenix = 0 : phenixKILLED = 0 : RoisDEScentaures = 0 : DonjonMaudit = 0 : LvlDONJONmaudit = 0
recompenseQ1 = 0 : recompenseQ2 = 0 : recompenseQ3 = 0 : recompenseQ4 = 0 : recompenseQ5 = 0 : recompenseQ6 = 0
recompenseQ1a = 0 : recompenseQ2a = 0 : recompenseQ3a = 0 : recompenseQ4a = 0 : recompenseQ5a = 0 : recompenseQ6a = 0
recompenseQ1b = 0 : recompenseQ2b = 0 : recompenseQ3b = 0 : recompenseQ4b = 0 : recompenseQ5b = 0 : recompenseQ6b = 0
recompenseQ1c = 0 : recompenseQ2c = 0 : recompenseQ3c = 0 : recompenseQ4c = 0 : recompenseQ5c = 0 : recompenseQ6c = 0
recompenseQ1d = 0 : recompenseQ2d = 0 : recompenseQ3d = 0 : recompenseQ4d = 0 : recompenseQ5d = 0 : recompenseQ6d = 0
Q1pack1 = 1 : Q2pack1 = 1 : Q3pack1 = 1 : Q4pack1 = 1 : Q5pack1 = 1 : Q6pack1 = 1
Q1pack2 = 1 : Q2pack2 = 1 : Q3pack2 = 1 : Q4pack2 = 1 : Q5pack2 = 1 : Q6pack2 = 1
Q1pack3 = 1 : Q2pack3 = 1 : Q3pack3 = 1 : Q4pack3 = 1 : Q5pack3 = 1 : Q6pack3 = 1
Q1pack4 = 1 : Q2pack4 = 1 : Q3pack4 = 1 : Q4pack4 = 1 : Q5pack4 = 1 : Q6pack4 = 1
Q1pack5 = 1 : Q2pack5 = 1 : Q3pack5 = 1 : Q4pack5 = 1 : Q5pack5 = 1 : Q6pack5 = 1
case1TYPE = 0 : case2TYPE = 0 : case3TYPE = 0 : case4TYPE = 0 : case5TYPE = 0  : case6TYPE = 0
case7TYPE = 0 : case8TYPE = 0 : case9TYPE = 0 : case10TYPE = 0 : case11TYPE = 0  : case12TYPE = 0
case1TYPE$ = "" : case2TYPE$ = "" : case3TYPE$ = "" : case4TYPE$ = "" : case5TYPE$ = "" : case6TYPE$ = ""
case7TYPE$ = "" : case8TYPE$ = "" : case9TYPE$ = "" : case10TYPE$ = "" : case11TYPE$ = "" : case12TYPE$ = ""
caseITEM1 = 0 : caseITEM3 = 0 : caseITEM5 = 0 : caseITEM7 = 0 : caseITEM9 = 0 : caseITEM11 = 0 : ItemPLACE = 12
caseITEM2 = 0 : caseITEM4 = 0 : caseITEM6 = 0 : caseITEM8 = 0 : caseITEM10 = 0 : caseITEM12 = 0
MEDAILLE1$ = "";NombreEnnemiKILL;" / 100" : MEDAILLE2$ = "";NombrePlayerKILL;" / 5" : MEDAILLE3$ = "";NombreBossKILL;" / 1"
MEDAILLE4$ = "";goldTOTAL;" / 5000" : MEDAILLE5$ = "";nombreACHATitem;" / 5" : MEDAILLE6$ = "";nombreUPitem;" / 10"
MEDAILLE7$ = "";nombreQUEST;" / 2" : MEDAILLE8$ = "";nombreUPsac;" / 10" : MEDAILLE9$ = "";nombreUTILparch;" / 2"
MEDAILLE10$ = "";nombreDROPpotion;" / 10" : MEDAILLE11$ = "";nombreUTILmedail;" / 2" : MEDAILLE12$ = "";speakTOpnj;" / 50"
FragmentJAUNE1 = 0 : FragmentJAUNE2 = 0 : FragmentJAUNE3 = 0 : AIDEpnj = 0 : AIDEpnj2 = 0 : noCLICK = 0
FragmentBLEU1 = 0 : FragmentBLEU2 = 0 : FragmentBLEU3 = 0 : compteurTIME = 0 : secuTIME = 0
MAX1 = 10 : lvlMAX1 = 1 : MAX2 = 5 : lvlMAX2 = 1 : nMax2 = 0 : nMax1 = 3 : POPplayers = 10000 : POPplayersPK = 0 : NombrePlayerKILL = 0 : NombreEnnemiKILL = 0 : NombreBossKILL = 0
BackgroundColor$ = "white" : ForegroundColor$ = "black" : UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
MEDAILLE1 = 0 : MEDAILLE2 = 0 : MEDAILLE3 = 0 : MEDAILLE4 = 0 : MEDAILLE5 = 0 : MEDAILLE6 = 0 : MEDAILLE7 = 0 : MEDAILLE8 = 0 : MEDAILLE9 = 0 : MEDAILLE10 = 0 : MEDAILLE11 = 0 : MEDAILLE12 = 0
bouclier = int(20+(9*lvlPASSIVE20*lvlPASSIVE20)) : compteurCLICK = 0
Langue$(0) = "Français / French"
Langue$(1) = "Anglais / English"
music$(0) = "On"
music$(1) = "Off"

graphicbox #main.map, 0, 0, WindowWidth, WindowHeight
textbox #main.login, 1089, 247, 190, 20
textbox #main.mdp, 1089, 304, 190, 20
bmpbutton #main.son1, "data\sonOn.bmp", [iniMUSIC], UL, 20,20
bmpbutton #main.drap1, "data\drapo1.bmp", [version1], UL, 60,20
bmpbutton #main.drap2, "data\drapo2.bmp", [version2], UL, 100,20
open "" for dialog_nf as #main
#main, "trapclose [quit]"
#main.map "fill white"
#main.map , "down"

[valOR]
valOR = int(rnd(1)*1+1)
'if valOR = valORold then goto [valOR]
'valORold = valOR
if valOR = 1 then
    print #main.map, "drawbmp main0 0 0"
    print #main.map, "background main0"
end if
if valOR = 2 then
    print #main.map, "drawbmp main01 0 0"
    print #main.map, "background main01"
end if
if valOR = 3 then
    print #main.map, "drawbmp main02 0 0"
    print #main.map, "background main02"
end if
if valOR = 4 then
    print #main.map, "drawbmp main03 0 0"
    print #main.map, "background main03"
end if

print #main, "font Times Times New Roman 10"
print #main.map, "font Times Times New Roman 10;color white;backcolor white"
#main.map, "when leftButtonDown [SimpleClick0]"
if version = 1 then
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 239 ;\"; "Nom de l'utilisateur :"
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 297 ;\"; "Mot de passe :"
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 340 ;\"; "( Il est normal que le mot de passe"
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 355 ;\"; "soit invisible ! )"
end if
if version = 2 then
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 239 ;\"; "Account :"
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 297 ;\"; "Password :"
    print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1087 340 ;\"; "( Its normal if the password is hide )"
end if
print #main.map, "font Times Times New Roman 7;backcolor white;color black"
print #main.map, "place 1160 787 ;\"; "Version ";Version$
print #main.map, "font Times Times New Roman 11;backcolor white;color black"
print #main.map, "place 1134 659 ;\"; "CONNEXION"
if version = 1 then print #main.map, "place 1142 697 ;\"; "NOUVEAU"
if version = 2 then print #main.map, "place 1160 697 ;\"; "NEW"
#main.map, "flush"
timer 100, [letter]
wait

    [SimpleClick0]
    compteurCLICK = compteurCLICK + 1
    timer 0
    mX = MouseX
    mY = MouseY
    'notice mX;" / ";mY
        if mX>1115 and mX<1245 and mY>770 and mY<790 then run "explorer.exe https://www.atomose.fr"
    print #main.map, "font Times New Roman 10; color green; backcolor ";r;" ";v;" ";b
    'print #main.map, "place 1100 550 ;\"; "                                                             \                                                             \                                                   "
    print #main.map, "place 1070 550 ;\"; "                                                                       \                                                           \                                                               \                                                               "
    if mX>1110 and mX<1250 and mY>635 and mY<670 goto [confirm]
    if mX>1110 and mX<1250 and mY>675 and mY<710 goto [creatAC]
    timer 100, [letter]
    Wait

[letter]
print #main.mdp, "!contents? mdpTAPER$"
if mdpTAPER$ <> "" and dataCENTERmdp$ <> "" then dataCENTERmdp2$ = dataCENTERmdp$
if mdpTAPER$ <> "" then dataCENTERmdp$ = mdpTAPER$
if mdpTAPER$ <> "" then dataCENTERmdp2$ = dataCENTERmdp2$+dataCENTERmdp$
print #main.mdp, ""
dataCENTERmdp$ = ""
mdpTAPER$ = ""
wait

[confirm]
'notice  dataCENTERmdp2$
on error goto [noConfirm]
print #main.login, "!contents? nameTAPER$"
print #main.mdp, "!contents? mdpTAPER$"
mdpTAPER$ = dataCENTERmdp2$
dataCENTERmdp2$ = ""
open "data\id\login";nameTAPER$;".sao" for input as #save
input #save, name$
input #save, mdp$
CLOSE #save
if name$ = nameTAPER$ and mdp$ = mdpTAPER$ then goto [confirm2]
[noConfirm]
dataCENTERmdp2$ = ""
if version = 1 then print #main.map, "place 1100 550 ;\"; "Identifiants incorrectes ou \       compte non créé !";"                                                                                                 "
if version = 2 then print #main.map, "place 1100 550 ;\"; "Incorrect password or account \                not created !";"                                                                                          "
timer 100, [letter]
wait
[confirm2]
on error goto [GameStart]
open "data\id\Save";name$;".sao" for input as #save
input #save, name$
input #save, mdp$
CLOSE #save
if name$ = nameTAPER$ and mdp$ = mdpTAPER$ then goto [load]
goto [GameStart]

[creatAC]
on error goto [creatAC2]
print #main.login, "!contents? nameTAPER$"
print #main.mdp, "!contents? mdpTAPER$"
mdpTAPER$ = dataCENTERmdp2$
open "data\id\login";nameTAPER$;".sao" for input as #save
input #save, name$
input #save, mdp$
CLOSE #save
[creatAC2]
'print #main.map, "place 1070 550 ;\"; "                                                                      \                                                       \                                                    "

if name$ = nameTAPER$ and name$ <> "" and mdp$ = mdpTAPER$ and mdp$ <> "" then
    if version = 1 then print #main.map, "place 1125 550 ;\"; "Compte déjà existant";"                                                              \                                                                             "
    if version = 2 then print #main.map, "place 1125 550;\"; "Account already created!";"                                                                   "
    timer 100, [letter]
    wait
end if
if nameTAPER$ = "" or mdpTAPER$ = "" then
    if version = 1 then print #main.map, "place 1087 550 ;\"; "Création de compte :\1) Mettre votre identifiant \2) Mettre votre mot de passe\3) Appuyez sur 'VALIDER' !";"                     "
    if version = 2 then print #main.map, "place 1087 550 ;\"; "How to creat account :\1) Put account name \2) Put your password\3) Push 'NEW' !";"                     "
    print #main.map, "font Times Times New Roman 11;backcolor white;color black"
    print #main.map, "place 1134 697 ;\"; "   VALIDER    "
    nameTAPER$ = "" : mdpTAPER$ = "" : dataCENTERmdp2$ = ""
    dataCENTERmdp2$ = ""
    print #main.login, ""
    print #main.mdp, ""
    timer 100, [letter]
    wait
end if
open "data\id\login";nameTAPER$;".sao" for output as #save
print #save, nameTAPER$
print #save, mdpTAPER$
print #save, MusicSELECT
CLOSE #save
    if version = 1 then print #main.map, "place 1100 550 ;\"; "Compte créé ! Vous pouvez \maintenant vous connecter.";"                                                              "
    if version = 2 then print #main.map, "place 1100 550;\"; "Account creat! You can \now log in.";"                                                                   "
wait

[w]
wait

[iniMUSIC]
if MusicSELECT = 1 then
    MusicSELECT = 0
    gosub [stopMusic2]
    wait
end if
if MusicSELECT = 0 then
    MusicSELECT = 1
    gosub [startMusic]
    wait
end if
wait

[version1]
version = 1
langue$ = "Français"
close #main
goto [start]
[version2]
version = 2
langue$ = "English"
close #main
goto [start]


[SimpleClick1]
 r = 215 : b = 215 : v = 215
print #main.map, "backcolor white;color black"
print #main.map, "font Times New Roman 13"
print #main.map, "place 180 100 ;\"; "ID - ";nameTAPER$
print #main.map, "backcolor ";r;" ";v;" ";b

if version = 1 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points de vie :"
print #main.map, "place 350 550 ;\"; "Armure :"
print #main.map, "place 250 550 ;\"; "Attaque :"
print #main.map, "place 300 585 ;\"; "Agilité :"
print #main.map, "place 300 600 ;\"; "Force :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Argent de départ :"
print #main.map, "place 275 670 ;\"; "Spécialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 93 "
print #main.map, "place 410 550 ;\"; " 4 "
print #main.map, "place 310 550 ;\"; "40"
print #main.map, "place 350 585 ;\"; " 8"
print #main.map, "place 345 600 ;\"; "12"
print #main.map, "place 355 615 ;\"; "6"
print #main.map, "place 375 650 ;\"; "200"
print #main.map, "place 365 670 ;\"; "Force"
end if
if version= 2 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points of life :"
print #main.map, "place 350 550 ;\"; "Armore :"
print #main.map, "place 250 550 ;\"; "Damages :"
print #main.map, "place 300 585 ;\"; "Agility :"
print #main.map, "place 300 600 ;\"; "Strength :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Starting money :"
print #main.map, "place 275 670 ;\"; "Specialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 93 "
print #main.map, "place 410 550 ;\"; " 4 "
print #main.map, "place 310 550 ;\"; "40"
print #main.map, "place 350 585 ;\"; " 8"
print #main.map, "place 345 600 ;\"; "12"
print #main.map, "place 355 615 ;\"; "6"
print #main.map, "place 375 650 ;\"; "200"
print #main.map, "place 365 670 ;\"; "Strength"
end if
campagne = 1
if version = 1 then RACE$ = "GUERRIER"
if version = 2 then RACE$ = "WARRIOR"
print #main.map, "drawbmp add 1050 240"
if sexe = 1 then print #main.map, "drawbmp add2 670 303"
if sexe = 1 then print #main.map, "drawbmp miniGUERRIERhomme 260 160"
if sexe = 2 then print #main.map, "drawbmp miniGUERRIERfemme 275 160"
wait
[SimpleClick2]
 r = 215 : b = 215 : v = 215
print #main.map, "backcolor white"
print #main.map, "font Times New Roman 13"
print #main.map, "place 180 100 ;\"; "ID - ";nameTAPER$
print #main.map, "backcolor ";r;" ";v;" ";b

if version = 1 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points de vie :"
print #main.map, "place 350 550 ;\"; "Armure :"
print #main.map, "place 250 550 ;\"; "Attaque :"
print #main.map, "place 300 585 ;\"; "Agilité :"
print #main.map, "place 300 600 ;\"; "Force :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Argent de départ :"
print #main.map, "place 275 670 ;\"; "Spécialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 60 "
print #main.map, "place 410 550 ;\"; " 4 "
print #main.map, "place 310 550 ;\"; "64"
print #main.map, "place 350 585 ;\"; " 15"
print #main.map, "place 345 600 ;\"; "7"
print #main.map, "place 355 615 ;\"; "10"
print #main.map, "place 375 650 ;\"; "300"
print #main.map, "place 365 670 ;\"; "Agilité"
end if
if version= 2 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points of life :"
print #main.map, "place 350 550 ;\"; "Armore :"
print #main.map, "place 250 550 ;\"; "Damages :"
print #main.map, "place 300 585 ;\"; "Agility :"
print #main.map, "place 300 600 ;\"; "Strength :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Starting money :"
print #main.map, "place 275 670 ;\"; "Specialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 60 "
print #main.map, "place 410 550 ;\"; " 4 "
print #main.map, "place 310 550 ;\"; "64"
print #main.map, "place 350 585 ;\"; " 15"
print #main.map, "place 345 600 ;\"; "7"
print #main.map, "place 355 615 ;\"; "10"
print #main.map, "place 375 650 ;\"; "300"
print #main.map, "place 365 670 ;\"; "Agility"
end if
campagne = 2 : RACE$ = "ARCHER"
if sexe = 1 then print #main.map, "drawbmp miniARCHERhomme 285 150"
if sexe = 2 then print #main.map, "drawbmp miniARCHERfemme 290 150"
wait
[SimpleClick3]
 r = 215 : b = 215 : v = 215
print #main.map, "backcolor white"
print #main.map, "font Times New Roman 13"
print #main.map, "place 180 100 ;\"; "ID - ";nameTAPER$
print #main.map, "backcolor ";r;" ";v;" ";b

if version = 1 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points de vie :"
print #main.map, "place 350 550 ;\"; "Armure :"
print #main.map, "place 250 550 ;\"; "Attaque :"
print #main.map, "place 300 585 ;\"; "Agilité :"
print #main.map, "place 300 600 ;\"; "Force :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Argent de départ :"
print #main.map, "place 275 670 ;\"; "Spécialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 166 "
print #main.map, "place 410 550 ;\"; " 5 "
print #main.map, "place 310 550 ;\"; "42"
print #main.map, "place 350 585 ;\"; " 7"
print #main.map, "place 345 600 ;\"; "19"
print #main.map, "place 355 615 ;\"; "1"
print #main.map, "place 375 650 ;\"; "200"
print #main.map, "place 365 670 ;\"; "Force"
end if
if version= 2 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points of life :"
print #main.map, "place 350 550 ;\"; "Armore :"
print #main.map, "place 250 550 ;\"; "Damages :"
print #main.map, "place 300 585 ;\"; "Agility :"
print #main.map, "place 300 600 ;\"; "Strength :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Starting money :"
print #main.map, "place 275 670 ;\"; "Specialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 166 "
print #main.map, "place 410 550 ;\"; " 5 "
print #main.map, "place 310 550 ;\"; "42"
print #main.map, "place 350 585 ;\"; " 7"
print #main.map, "place 345 600 ;\"; "19"
print #main.map, "place 355 615 ;\"; "1"
print #main.map, "place 375 650 ;\"; "200"
print #main.map, "place 365 670 ;\"; "Strength"
end if
campagne = 3
RACE$ = "TANK"
if sexe = 1 then print #main.map, "drawbmp miniTANKhomme 250 150"
if sexe = 2 then print #main.map, "drawbmp miniTANKfemme 290 150"
wait
[SimpleClick4]
 r = 215 : b = 215 : v = 215
print #main.map, "backcolor white"
print #main.map, "font Times New Roman 13"
print #main.map, "place 180 100 ;\"; "ID - ";nameTAPER$
print #main.map, "backcolor ";r;" ";v;" ";b

if version = 1 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points de vie :"
print #main.map, "place 350 550 ;\"; "Armure :"
print #main.map, "place 250 550 ;\"; "Attaque :"
print #main.map, "place 300 585 ;\"; "Agilité :"
print #main.map, "place 300 600 ;\"; "Force :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Argent de départ :"
print #main.map, "place 275 670 ;\"; "Spécialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 52 "
print #main.map, "place 410 550 ;\"; " 4 "
print #main.map, "place 310 550 ;\"; "25"
print #main.map, "place 350 585 ;\"; " 6"
print #main.map, "place 345 600 ;\"; "5"
print #main.map, "place 355 615 ;\"; "11"
print #main.map, "place 375 650 ;\"; "600"
print #main.map, "place 365 670 ;\"; "Science"
end if
if version= 2 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points of life :"
print #main.map, "place 350 550 ;\"; "Armore :"
print #main.map, "place 250 550 ;\"; "Damages :"
print #main.map, "place 300 585 ;\"; "Agility :"
print #main.map, "place 300 600 ;\"; "Strength :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Starting money :"
print #main.map, "place 275 670 ;\"; "Specialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 52 "
print #main.map, "place 410 550 ;\"; " 4 "
print #main.map, "place 310 550 ;\"; "25"
print #main.map, "place 350 585 ;\"; " 6"
print #main.map, "place 345 600 ;\"; "5"
print #main.map, "place 355 615 ;\"; "11"
print #main.map, "place 375 650 ;\"; "600"
print #main.map, "place 365 670 ;\"; "Science"
end if
campagne = 4
RACE$ = "ARTISAN"
if sexe = 1 then print #main.map, "drawbmp miniARTISANhomme 275 150"
if sexe = 2 then print #main.map, "drawbmp miniARTISANfemme 300 150"
wait
[SimpleClick5]
 r = 215 : b = 215 : v = 215
print #main.map, "backcolor white"
print #main.map, "font Times New Roman 13"
print #main.map, "place 180 100 ;\"; "ID - ";nameTAPER$
print #main.map, "backcolor ";r;" ";v;" ";b

if version = 1 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points de vie :"
print #main.map, "place 350 550 ;\"; "Armure :"
print #main.map, "place 250 550 ;\"; "Attaque :"
print #main.map, "place 300 585 ;\"; "Agilité :"
print #main.map, "place 300 600 ;\"; "Force :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Argent de départ :"
print #main.map, "place 275 670 ;\"; "Spécialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 50 "
print #main.map, "place 410 550 ;\"; " 2 "
print #main.map, "place 310 550 ;\"; "37"
print #main.map, "place 350 585 ;\"; " 5"
print #main.map, "place 345 600 ;\"; "5"
print #main.map, "place 355 615 ;\"; "16"
print #main.map, "place 375 650 ;\"; "400"
print #main.map, "place 365 670 ;\"; "Science"
end if
if version= 2 then
print #main.map, "font Times New Roman 9 bold; color black"
print #main.map, "place 290 520 ;\"; "Points of life :"
print #main.map, "place 350 550 ;\"; "Armore :"
print #main.map, "place 250 550 ;\"; "Damages :"
print #main.map, "place 300 585 ;\"; "Agility :"
print #main.map, "place 300 600 ;\"; "Strength :"
print #main.map, "place 300 615 ;\"; "Science :"
print #main.map, "place 275 650 ;\"; "Starting money :"
print #main.map, "place 275 670 ;\"; "Specialisation :"
print #main.map, "font Times New Roman 9; color black"
print #main.map, "place 370 520 ;\"; " 50 "
print #main.map, "place 410 550 ;\"; " 2 "
print #main.map, "place 310 550 ;\"; "25"
print #main.map, "place 350 585 ;\"; " 37"
print #main.map, "place 345 600 ;\"; "5"
print #main.map, "place 355 615 ;\"; "16"
print #main.map, "place 375 650 ;\"; "400"
print #main.map, "place 365 670 ;\"; "Science"
end if
campagne = 5
if version = 2 then RACE$ = "HEALER"
if version = 1 then RACE$ = "SOIGNEUR"

if sexe = 1 then print #main.map, "drawbmp miniSOIGNEURhomme 255 150"
if sexe = 2 then print #main.map, "drawbmp miniSOIGNEURfemme 300 150"
wait

[GameStart]
timer 0
gosub [FLOOR]
close #main
sexe = 1 : AIDEpnj = 1 : AIDEpnj2 = 1 : AIDEpnj3 = 1
if version = 1 then sexe$ = "Homme"
if version = 2 then sexe$ = "Man"
returnAction = 1 : campagne = 0 : systemSAV = 1
lvlPASSIVE1 = 0 : lvlPASSIVE2 = 0 : lvlPASSIVE3 = 0 : lvlPASSIVE4 = 0 : lvlPASSIVE5 = 0 : lvlPASSIVE6 = 0
BONUSatk = 0 : TYPEatk$ = "" : BONUSdef = 0 : TYPEdef$ = "" : achatatkITEM = 0 : achatdefITEM = 0
WindowWidth = 1300 : WindowHeight = 800 : r = 100 : b = 100 : v = 100
UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
graphicbox #main.map, 1, 1, WindowWidth-7, WindowHeight-30
open " " for dialog_nf as #main
#main, "trapclose [quit]"
#main.map , "down;fill black"
print #main.map, "drawbmp main 0 0"
print #main.map, "background main"
print #main.map, "drawbmp sav1 600 410"
print #main.map, "drawbmp sav2 600 445"
print #main.map, "color black;backcolor white;font Times New Roman 13"
print #main.map, "place 180 100 ;\"; "ID - ";nameTAPER$
print #main.map, "font Times New Roman 11;color white"
if version = 2 then
print #main.map, "backcolor ";r;" ";v;" ";b
print #main.map, "place 700 317 ;\"; "MAN"
print #main.map, "place 702 358 ;\"; "WOMAN"
print #main.map, "backcolor white;color black"
print #main.map, "place 925 255 ;\"; "WARRIOR"
print #main.map, "place 925 295 ;\"; "ARCHER"
print #main.map, "place 925 335 ;\"; "TANK"
print #main.map, "place 925 375 ;\"; "ARTISAN"
print #main.map, "place 925 415 ;\"; "HEALER"
end if
if version = 1 then
print #main.map, "backcolor ";r;" ";v;" ";b
print #main.map, "place 700 317 ;\"; "HOMME"
print #main.map, "place 702 358 ;\"; "FEMME"
print #main.map, "backcolor white;color black"
print #main.map, "place 925 255 ;\"; "GUERRIER"
print #main.map, "place 925 295 ;\"; "ARCHER"
print #main.map, "place 925 335 ;\"; "TANK"
print #main.map, "place 925 375 ;\"; "ARTISAN"
print #main.map, "place 925 415 ;\"; "SOIGNEUR"
print #main.map, "font Times New Roman 8;color white;backcolor black"
print #main.map, "place 640 418 ;\"; "Sauvegarde effacée si vous mourrez. \(difficile)"
print #main.map, "place 640 453 ;\"; "Vous reprenez à votre dernière\sauvegarde. (conseillé)"
print #main.map, "drawbmp add 565 412"
end if
#main.map, "setfocus; when leftButtonDown [SimpleClickRACE]"
returnAction = 0 : campagne = 6
gosub [SimpleClick1]

print #main.map, "drawbmp add 1050 240"
print #main.map, "flush"
wait

[SimpleClickRACE]
mX = MouseX
mY = MouseY

compteurCLICK = compteurCLICK + 1
'notice mX; " / "; mY

    if mX>590 and mX<780 and mY>415 and mY<480 then
    print #main.map, "font Times New Roman 20;color black;backcolor black"
    print #main.map, "place 560 415 ;\"; "     \     \     \     "
        if systemSAV = 1 then
           systemSAV = 0
           print #main.map, "drawbmp add 565 448"
           wait
        end if
        if systemSAV = 0 then
           systemSAV = 1
           print #main.map, "drawbmp add 565 412"
           wait
        end if
    end if


    print #main.map, "font Times New Roman 12"
    r = 100 : b = 100 : v = 100
    print #main.map, "backcolor ";r;" ";v;" ";b
    if mX>655 and mX<800 and mY>290 and mY<330 then
        sexe = 1
        if version = 1 then sexe$ = "Homme"
        if version = 2 then sexe$ = "Man"
        print #main.map, "place 660 358 ;\"; "         "
        print #main.map, "drawbmp add2 670 303"
        print #main.map, "drawbmp clear 160 120"
        if campagne= 1 then print #main.map, "drawbmp miniGUERRIERhomme 260 160"
        if campagne= 3 then print #main.map, "drawbmp miniTANKhomme 250 150"
        if campagne= 2 then print #main.map, "drawbmp miniARCHERhomme 285 150"
        if campagne= 4 then print #main.map, "drawbmp miniARTISANhomme 275 150"
        if campagne= 5 then print #main.map, "drawbmp miniSOIGNEURhomme 255 150"
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then [SimpleClick1]
        if RACE$ = "ARCHER" then [SimpleClick2]
        if RACE$ = "TANK" then [SimpleClick3]
        if RACE$ = "ARTISAN" then [SimpleClick4]
        if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" then [SimpleClick5]
        wait
    end if
    if mX>655 and mX<800 and mY>330 and mY<370 then
        sexe = 2
        if version = 1 then sexe$ = "Femme"
        if version = 2 then sexe$ = "Woman"
        print #main.map, "place 660 318 ;\"; "         "
        print #main.map, "drawbmp add2 670 343"
        print #main.map, "drawbmp clear 160 120"
        if campagne= 1 then print #main.map, "drawbmp miniGUERRIERfemme 275 160"
        if campagne= 3 then print #main.map, "drawbmp miniTANKfemme 290 150"
        if campagne= 2 then print #main.map, "drawbmp miniARCHERfemme 290 150"
        if campagne= 4 then print #main.map, "drawbmp miniARTISANfemme 300 150"
        if campagne= 5 then print #main.map, "drawbmp miniSOIGNEURfemme 300 150"
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then [SimpleClick1]
        if RACE$ = "ARCHER" then [SimpleClick2]
        if RACE$ = "TANK" then [SimpleClick3]
        if RACE$ = "ARTISAN" then [SimpleClick4]
        if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" then [SimpleClick5]
        wait
    end if

    if mX>870 and mX<935 and mY>480 and mY<540 then goto [ini]
    if mX>960 and mX<1025 and mY>480 and mY<540 then goto [RACE]

    if mX>870 and mX<1025 and mY>230 and mY<265 then
        print #main.map, "color black; size 40"
        print #main.map, "line "; 1050; " "; 100; " "; 1050; " "; 500
        print #main.map, "drawbmp clear 160 120"
        print #main.map, "drawbmp add 1050 240"
        gosub [SimpleClick1]
    end if
    if mX>870 and mX<1025 and mY>270 and mY<310 then
        print #main.map, "color black; size 40"
        print #main.map, "line "; 1050; " "; 100; " "; 1050; " "; 500
        print #main.map, "drawbmp clear 160 120"
        print #main.map, "drawbmp add 1050 280"
        gosub [SimpleClick2]
    end if
    if mX>870 and mX<1025 and mY>315 and mY<350 then
        print #main.map, "color black; size 40"
        print #main.map, "line "; 1050; " "; 100; " "; 1050; " "; 500
        print #main.map, "drawbmp clear 160 120"
        print #main.map, "drawbmp add 1050 320"
        gosub [SimpleClick3]
    end if
    if mX>870 and mX<1025 and mY>354 and mY<390 then
        print #main.map, "color black; size 40"
        print #main.map, "line "; 1050; " "; 100; " "; 1050; " "; 500
        print #main.map, "drawbmp clear 160 120"
        print #main.map, "drawbmp add 1050 360"
        gosub [SimpleClick4]
    end if
    if mX>870 and mX<1025 and mY>395 and mY<430 then
        print #main.map, "color black; size 40"
        print #main.map, "line "; 1050; " "; 100; " "; 1050; " "; 500
        print #main.map, "drawbmp clear 160 120"
        print #main.map, "drawbmp add 1050 400"
        gosub [SimpleClick5]
    end if
    wait


[RACE]
if sexe = 0 or sexe$ = "" then
    if version = 1 then notice " " + chr$(13) + "Choisisez le sexe de votre personnage"
    if version = 2 then notice " " + chr$(13) + "Choose the sex of your character"
    wait
end if

    mois$ = "Janvier Février Mars Avril Mai Juin Juillet Aout Septembre Octobre Novembre Décembre"
    today$ = date$("mm/dd/yyyy")
    j = date$(today$)
    jsem$ = word$("lundi Mardi Mercredi Jeudi Vendredi Samedi Dimanche",int((j/7-int(j/7))*10)+1)
    date$ = jsem$+" "+mid$(today$,4,2)+" "+word$(mois$, val(today$))+" "+right$(today$,4)

aDate$= date$

Select case campagne
case 1
    goto [GameHUMAN]
case 2
    goto [GameELVE]
case 3
    goto [GameORCS]
case 4
    goto [GameDWARF]
case 5
    goto [GameNECRO]
case 6
    goto [randomGAME]
end select
wait
[randomGAME]
val = int(rnd(1)*5)+1
if val < 1 then goto [randomGAME]
campagne = val
gosub [data]
goto [RACE]

[GameHUMAN]
if version = 1 then
    capacity$ = "Force"
    RACE$ = "GUERRIER"
end if
if version = 2 then
    capacity$ = "Strength"
    RACE$ = "WARRIOR"
end if
gosub [data]
goto [GameStartMAIN2]

[GameELVE]
campagne = 2
if version = 1 then
    capacity$ = "Agilité"
    RACE$ = "ARCHER"
end if
if version = 2 then
    capacity$ = "Agility"
    RACE$ = "ARCHER"
end if
gosub [data]
goto [GameStartMAIN2]

[GameORCS]
campagne = 3
if version = 1 then
    capacity$ = "Strength"
    RACE$ = "TANK"
end if
if version = 2 then
    capacity$ = "Force"
    RACE$ = "TANK"
end if
gosub [data]
goto [GameStartMAIN2]

[GameDWARF]
campagne = 4
if version = 1 then
    capacity$ = "Science"
    RACE$ = "ARTISAN"
end if
if version = 2 then
    capacity$ = "Science"
    RACE$ = "ARTISAN"
end if
gosub [data]
goto [GameStartMAIN2]

[GameNECRO]
campagne = 5
if version = 1 then
    capacity$ = "Science"
    RACE$ = "SOIGNEUR"
end if
if version = 2 then
    capacity$ = "Science"
    RACE$ = "HEALER"
end if
gosub [data]
goto [GameStartMAIN2]

[versionINGAME]
if version = 1 then
    version = 2
    goto [GameStartMAINsecu2]
end if
if version = 2 then
    version = 1
    goto [GameStartMAINsecu2]
end if

[SimpleClickG1]
    mX = MouseX
    mY = MouseY

compteurCLICK = compteurCLICK + 1
'notice mX; "/";mY

    if mX>400 and mX<465 and mY>65 and mY<125 then goto [save]
    if mX>40 and mX<105 and mY>65 and mY<125 then goto [confirmationC]
    if mX>310 and mX<375 and mY>65 and mY<125 then goto [MusicSELECT]
    if mX>220 and mX<285 and mY>65 and mY<125 then goto [versionINGAME]
    if mX>130 and mX<195 and mY>65 and mY<125 then goto [GameStartMAINsecu]
    if mX>400 and mX<900 and mY>250 and mY<600 then goto [city]
    'if mX>1210 and mX<1260 and mY>115 and mY<160 then goto [Updown]
    'if mX>1100 and mX<1180 and mY>100 and mY<180 then goto [Character]
   ' if mX>1100 and mX<1180 and mY>200 and mY<280 then
   '     action = 0
   '     noCLICK = 1
  '  '    if AIDEpnj2 = 0 then noCLICK = 5
  '    goto [Arena0]
  '  end if
    goto [refreshMAP1]
wait

[Updown]
if UPdown = 1 then close #UPdown
UPdown = 1 : WindowWidth = 163 : WindowHeight = 177
UpperLeftX=int((DisplayWidth-WindowWidth)/1.07) : UpperLeftY=int((DisplayHeight-WindowHeight)/2.5)
graphicbox #UPdown.map, 0, 0, WindowWidth+5, WindowHeight+5
open " " for window_popup as #UPdown
#UPdown, "trapclose [quitUPdown]"
#UPdown.map , "down;fill white"
#UPdown.map, "when leftButtonDown [SimpleClickUpDown]"
print #UPdown.map, "drawbmp tele 0 0"
print #UPdown.map, "backcolor black"
print #UPdown.map, "font Times New Roman 8; color white"
if version = 1 then print #UPdown.map, "place 56 15 ;\"; "Palier ";LvlDONJON
if version = 2 then print #UPdown.map, "place 56 15 ;\"; "Floor";LvlDONJON
print #UPdown.map, "font Times New Roman 6; color black;backcolor white"
print #UPdown.map, "place 10 31 ;\"; "1" : #UPdown.map, "place 26 31 ;\"; "2": #UPdown.map, "place 41 31 ;\"; "3": #UPdown.map, "place 56 31 ;\"; "4": #UPdown.map, "place 71 31 ;\"; "5": #UPdown.map, "place 86 31 ;\"; "6": #UPdown.map, "place 101 31 ;\"; "7": #UPdown.map, "place 116 31 ;\"; "8": #UPdown.map, "place 131 31 ;\"; "9": #UPdown.map, "place 144 31 ;\"; "10"
print #UPdown.map, "place 10 46 ;\"; "11" : #UPdown.map, "place 25 46 ;\"; "12": #UPdown.map, "place 40 46 ;\"; "13": #UPdown.map, "place 55 46 ;\"; "14": #UPdown.map, "place 70 46 ;\"; "15": #UPdown.map, "place 85 46 ;\"; "16": #UPdown.map, "place 100 46 ;\"; "17": #UPdown.map, "place 115 46 ;\"; "18": #UPdown.map, "place 130 46 ;\"; "19": #UPdown.map, "place 145 46 ;\"; "20"
print #UPdown.map, "place 10 61 ;\"; "21" : #UPdown.map, "place 25 61 ;\"; "22": #UPdown.map, "place 40 61 ;\"; "23": #UPdown.map, "place 55 61 ;\"; "24": #UPdown.map, "place 70 61 ;\"; "25": #UPdown.map, "place 85 61 ;\"; "26": #UPdown.map, "place 100 61 ;\"; "27": #UPdown.map, "place 115 61 ;\"; "28": #UPdown.map, "place 130 61 ;\"; "29": #UPdown.map, "place 145 61 ;\"; "30"
print #UPdown.map, "place 10 76 ;\"; "31" : #UPdown.map, "place 25 76 ;\"; "32": #UPdown.map, "place 40 76 ;\"; "33": #UPdown.map, "place 55 76 ;\"; "34": #UPdown.map, "place 70 76 ;\"; "35": #UPdown.map, "place 85 76 ;\"; "36": #UPdown.map, "place 100 76 ;\"; "37": #UPdown.map, "place 115 76 ;\"; "38": #UPdown.map, "place 130 76 ;\"; "39": #UPdown.map, "place 145 76 ;\"; "40"
print #UPdown.map, "place 10 91 ;\"; "41" : #UPdown.map, "place 25 91 ;\"; "42": #UPdown.map, "place 40 91 ;\"; "43": #UPdown.map, "place 55 91 ;\"; "44": #UPdown.map, "place 70 91 ;\"; "45": #UPdown.map, "place 85 91 ;\"; "46": #UPdown.map, "place 100 91 ;\"; "47": #UPdown.map, "place 115 91 ;\"; "48": #UPdown.map, "place 130 91 ;\"; "49": #UPdown.map, "place 145 91 ;\"; "50"
print #UPdown.map, "place 10 106 ;\"; "51" : #UPdown.map, "place 25 106 ;\"; "52": #UPdown.map, "place 40 106 ;\"; "53": #UPdown.map, "place 55 106 ;\"; "54": #UPdown.map, "place 70 106 ;\"; "55": #UPdown.map, "place 85 106 ;\"; "56": #UPdown.map, "place 100 106 ;\"; "57": #UPdown.map, "place 115 106 ;\"; "58": #UPdown.map, "place 130 106 ;\"; "59": #UPdown.map, "place 145 106 ;\"; "60"
print #UPdown.map, "place 10 121 ;\"; "61" : #UPdown.map, "place 25 121 ;\"; "62": #UPdown.map, "place 40 121 ;\"; "63": #UPdown.map, "place 55 121 ;\"; "64": #UPdown.map, "place 70 121 ;\"; "65": #UPdown.map, "place 85 121 ;\"; "66": #UPdown.map, "place 100 121 ;\"; "67": #UPdown.map, "place 115 121 ;\"; "68": #UPdown.map, "place 130 121 ;\"; "69": #UPdown.map, "place 145 121 ;\"; "70"
print #UPdown.map, "place 10 136 ;\"; "71" : #UPdown.map, "place 25 136 ;\"; "72": #UPdown.map, "place 40 136 ;\"; "73": #UPdown.map, "place 55 136 ;\"; "74": #UPdown.map, "place 70 136 ;\"; "75": #UPdown.map, "place 85 136 ;\"; "76": #UPdown.map, "place 100 136 ;\"; "77": #UPdown.map, "place 115 136 ;\"; "78": #UPdown.map, "place 130 136 ;\"; "79": #UPdown.map, "place 145 136 ;\"; "80"
print #UPdown.map, "place 10 151 ;\"; "81" : #UPdown.map, "place 25 151 ;\"; "82": #UPdown.map, "place 40 151 ;\"; "83": #UPdown.map, "place 55 151 ;\"; "84": #UPdown.map, "place 70 151 ;\"; "85": #UPdown.map, "place 85 151 ;\"; "86": #UPdown.map, "place 100 151 ;\"; "87": #UPdown.map, "place 115 151 ;\"; "88": #UPdown.map, "place 130 151 ;\"; "89": #UPdown.map, "place 145 151 ;\"; "90"
print #UPdown.map, "place 10 166 ;\"; "91" : #UPdown.map, "place 25 166 ;\"; "92": #UPdown.map, "place 40 166 ;\"; "93": #UPdown.map, "place 55 166 ;\"; "94": #UPdown.map, "place 70 166 ;\"; "95": #UPdown.map, "place 85 166 ;\"; "96": #UPdown.map, "place 100 166 ;\"; "97": #UPdown.map, "place 115 166 ;\"; "98": #UPdown.map, "place 130 166 ;\"; "99": #UPdown.map, "place 142.5 166 ;\"; "100"
wait

[SimpleClickUpDown]
mX = MouseX
mY = MouseY

compteurCLICK = compteurCLICK + 1
'notice mX;"/";mY

    if mX>7 and mX<19 and mY>20 and mY<32 then teleportationLvlDONJON = 1
    if mX>22 and mX<34 and mY>20 and mY<32 then teleportationLvlDONJON = 2
    if mX>37 and mX<49 and mY>20 and mY<32 then teleportationLvlDONJON = 3
    if mX>52 and mX<64 and mY>20 and mY<32 then teleportationLvlDONJON = 4
    if mX>67 and mX<79 and mY>20 and mY<32 then teleportationLvlDONJON = 5
    if mX>82 and mX<94 and mY>20 and mY<32 then teleportationLvlDONJON = 6
    if mX>97 and mX<109 and mY>20 and mY<32 then teleportationLvlDONJON = 7
    if mX>112 and mX<124 and mY>20 and mY<32 then teleportationLvlDONJON = 8
    if mX>127 and mX<139 and mY>20 and mY<32 then teleportationLvlDONJON = 9
    if mX>142 and mX<154 and mY>20 and mY<32 then teleportationLvlDONJON = 10

    if mX>7 and mX<19 and mY>37 and mY<48 then teleportationLvlDONJON = 11
    if mX>22 and mX<34 and mY>37 and mY<48 then teleportationLvlDONJON = 12
    if mX>37 and mX<49 and mY>37 and mY<48 then teleportationLvlDONJON = 13
    if mX>52 and mX<64 and mY>37 and mY<48 then teleportationLvlDONJON = 14
    if mX>67 and mX<79 and mY>37 and mY<48 then teleportationLvlDONJON = 15
    if mX>82 and mX<94 and mY>37 and mY<48 then teleportationLvlDONJON = 16
    if mX>97 and mX<109 and mY>37 and mY<48 then teleportationLvlDONJON = 17
    if mX>112 and mX<124 and mY>37 and mY<48 then teleportationLvlDONJON = 18
    if mX>127 and mX<139 and mY>37 and mY<48 then teleportationLvlDONJON = 19
    if mX>142 and mX<154 and mY>37 and mY<48 then teleportationLvlDONJON = 20

    if mX>7 and mX<19 and mY>52 and mY<63 then teleportationLvlDONJON = 21
    if mX>22 and mX<34 and mY>52 and mY<63 then teleportationLvlDONJON = 22
    if mX>37 and mX<49 and mY>52 and mY<63 then teleportationLvlDONJON = 23
    if mX>52 and mX<64 and mY>52 and mY<63 then teleportationLvlDONJON = 24
    if mX>67 and mX<79 and mY>52 and mY<63 then teleportationLvlDONJON = 25
    if mX>82 and mX<94 and mY>52 and mY<63 then teleportationLvlDONJON = 26
    if mX>97 and mX<109 and mY>52 and mY<63 then teleportationLvlDONJON = 27
    if mX>112 and mX<124 and mY>52 and mY<63 then teleportationLvlDONJON = 28
    if mX>127 and mX<139 and mY>52 and mY<63 then teleportationLvlDONJON = 29
    if mX>142 and mX<154 and mY>52 and mY<63 then teleportationLvlDONJON = 30

    if mX>7 and mX<19 and mY>67 and mY<78 then teleportationLvlDONJON = 31
    if mX>22 and mX<34 and mY>67 and mY<78 then teleportationLvlDONJON = 32
    if mX>37 and mX<49 and mY>67 and mY<78 then teleportationLvlDONJON = 33
    if mX>52 and mX<64 and mY>67 and mY<78 then teleportationLvlDONJON = 34
    if mX>67 and mX<79 and mY>67 and mY<78 then teleportationLvlDONJON = 35
    if mX>82 and mX<94 and mY>67 and mY<78 then teleportationLvlDONJON = 36
    if mX>97 and mX<109 and mY>67 and mY<78 then teleportationLvlDONJON = 37
    if mX>112 and mX<124 and mY>67 and mY<78 then teleportationLvlDONJON = 38
    if mX>127 and mX<139 and mY>67 and mY<78 then teleportationLvlDONJON = 39
    if mX>142 and mX<154 and mY>67 and mY<78 then teleportationLvlDONJON = 40

    if mX>7 and mX<19 and mY>81 and mY<92 then teleportationLvlDONJON = 41
    if mX>22 and mX<34 and mY>81 and mY<92 then teleportationLvlDONJON = 42
    if mX>37 and mX<49 and mY>81 and mY<92 then teleportationLvlDONJON = 43
    if mX>52 and mX<64 and mY>81 and mY<92 then teleportationLvlDONJON = 44
    if mX>67 and mX<79 and mY>81 and mY<92 then teleportationLvlDONJON = 45
    if mX>82 and mX<94 and mY>81 and mY<92 then teleportationLvlDONJON = 46
    if mX>97 and mX<109 and mY>81 and mY<92 then teleportationLvlDONJON = 47
    if mX>112 and mX<124 and mY>81 and mY<92 then teleportationLvlDONJON = 48
    if mX>127 and mX<139 and mY>81 and mY<92 then teleportationLvlDONJON = 49
    if mX>142 and mX<154 and mY>81 and mY<92 then teleportationLvlDONJON = 50

    if mX>7 and mX<19 and mY>96 and mY<107 then teleportationLvlDONJON = 51
    if mX>22 and mX<34 and mY>96 and mY<107 then teleportationLvlDONJON = 52
    if mX>37 and mX<49 and mY>96 and mY<107 then teleportationLvlDONJON = 53
    if mX>52 and mX<64 and mY>96 and mY<107 then teleportationLvlDONJON = 54
    if mX>67 and mX<79 and mY>96 and mY<107 then teleportationLvlDONJON = 55
    if mX>82 and mX<94 and mY>96 and mY<107 then teleportationLvlDONJON = 56
    if mX>97 and mX<109 and mY>96 and mY<107 then teleportationLvlDONJON = 57
    if mX>112 and mX<124 and mY>96 and mY<107 then teleportationLvlDONJON = 58
    if mX>127 and mX<139 and mY>96 and mY<107 then teleportationLvlDONJON = 59
    if mX>142 and mX<154 and mY>96 and mY<107 then teleportationLvlDONJON = 60

    if mX>7 and mX<19 and mY>111 and mY<122 then teleportationLvlDONJON = 61
    if mX>22 and mX<34 and mY>111 and mY<122 then teleportationLvlDONJON = 62
    if mX>37 and mX<49 and mY>111 and mY<122 then teleportationLvlDONJON = 63
    if mX>52 and mX<64 and mY>111 and mY<122 then teleportationLvlDONJON = 64
    if mX>67 and mX<79 and mY>111 and mY<122 then teleportationLvlDONJON = 65
    if mX>82 and mX<94 and mY>111 and mY<122 then teleportationLvlDONJON = 66
    if mX>97 and mX<109 and mY>111 and mY<122 then teleportationLvlDONJON = 67
    if mX>112 and mX<124 and mY>111 and mY<122 then teleportationLvlDONJON = 68
    if mX>127 and mX<139 and mY>111 and mY<122 then teleportationLvlDONJON = 69
    if mX>142 and mX<154 and mY>111 and mY<122 then teleportationLvlDONJON = 70

    if mX>7 and mX<19 and mY>125 and mY<137 then teleportationLvlDONJON = 71
    if mX>22 and mX<34 and mY>125 and mY<137 then teleportationLvlDONJON = 72
    if mX>37 and mX<49 and mY>125 and mY<137 then teleportationLvlDONJON = 73
    if mX>52 and mX<64 and mY>125 and mY<137 then teleportationLvlDONJON = 74
    if mX>67 and mX<79 and mY>125 and mY<137 then teleportationLvlDONJON = 75
    if mX>82 and mX<94 and mY>125 and mY<137 then teleportationLvlDONJON = 76
    if mX>97 and mX<109 and mY>125 and mY<137 then teleportationLvlDONJON = 77
    if mX>112 and mX<124 and mY>125 and mY<137 then teleportationLvlDONJON = 78
    if mX>127 and mX<139 and mY>125 and mY<137 then teleportationLvlDONJON = 79
    if mX>142 and mX<154 and mY>125 and mY<137 then teleportationLvlDONJON = 80

    if mX>7 and mX<19 and mY>140 and mY<152 then teleportationLvlDONJON = 81
    if mX>22 and mX<34 and mY>140 and mY<152 then teleportationLvlDONJON = 82
    if mX>37 and mX<49 and mY>140 and mY<152 then teleportationLvlDONJON = 83
    if mX>52 and mX<64 and mY>140 and mY<152 then teleportationLvlDONJON = 84
    if mX>67 and mX<79 and mY>140 and mY<152 then teleportationLvlDONJON = 85
    if mX>82 and mX<94 and mY>140 and mY<152 then teleportationLvlDONJON = 86
    if mX>97 and mX<109 and mY>140 and mY<152 then teleportationLvlDONJON = 87
    if mX>112 and mX<124 and mY>140 and mY<152 then teleportationLvlDONJON = 88
    if mX>127 and mX<139 and mY>140 and mY<152 then teleportationLvlDONJON = 89
    if mX>142 and mX<154 and mY>140 and mY<152 then teleportationLvlDONJON = 90

    if mX>7 and mX<19 and mY>156 and mY<168 then teleportationLvlDONJON = 91
    if mX>22 and mX<34 and mY>156 and mY<168 then teleportationLvlDONJON = 92
    if mX>37 and mX<49 and mY>156 and mY<168 then teleportationLvlDONJON = 93
    if mX>52 and mX<64 and mY>156 and mY<168 then teleportationLvlDONJON = 94
    if mX>67 and mX<79 and mY>156 and mY<168 then teleportationLvlDONJON = 95
    if mX>82 and mX<94 and mY>156 and mY<168 then teleportationLvlDONJON = 96
    if mX>97 and mX<109 and mY>156 and mY<168 then teleportationLvlDONJON = 97
    if mX>112 and mX<124 and mY>156 and mY<168 then teleportationLvlDONJON = 98
    if mX>127 and mX<139 and mY>156 and mY<168 then teleportationLvlDONJON = 99
    if mX>142 and mX<154 and mY>156 and mY<168 then teleportationLvlDONJON = 100

        if lvlDONJONtota/3 < teleportationLvlDONJON then wait
        if teleportationLvlDONJON = 0 then LvlDONJON = int(lvlDONJONtota/3)
        UPdown = 0
        if lvlDONJONtota/3 >= teleportationLvlDONJON then LvlDONJON = teleportationLvlDONJON
        if LvlDONJON > int(lvlDONJONtota/3) then LvlDONJON = int(lvlDONJONtota/3)
        if LvlDONJON = 0 then LvlDONJON = int(lvlDONJONtota/3)
        close #UPdown
        secu2PALLIER = 0
        if Inmap = 1 then
            noCLICK = 1
            if AIDEpnj2 = 0 then noCLICK = 5
            goto [Arena0]
        end if
       ' if city = 0 then goto [GameStartMAIN2]
        if city = 1 then goto [city]

wait

[quitUPdown]
UPdown = 0
close #UPdown
wait

[SimpleClickAIDE]
mX = MouseX
mY = MouseY
compteurCLICK = compteurCLICK + 1
'notice mX; "/";mY
if city = 0 then if mX>570 and mX<720 and mY>697 and mY<736 then goto [GameStartMAINsecu2]
if city = 1 then if mX>570 and mX<720 and mY>697 and mY<736 then goto [city]
wait

[GameStartMAINsecu]
timer 0
[GameStartMAIN]
#main.map, "cls"
WindowWidth = 1300 : WindowHeight = 800
UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
#main.map, "when leftButtonDown [SimpleClickAIDE]"
#main.map , "down;fill black"
print #main.map, "drawbmp aide 0 0"
print #main.map, "background aide"
print #main.map, "font Times New Roman 9; color black;backcolor white"

if version = 1 then
    print #main.map, "place 574 720 ;\"; "PARTIR A L'AVENTURE !"
    print #main.map, "place 110 315 ;\"; "LA VILLE :"
    print #main.map, "place 110 340 ;\"; "Armures & Armes : Ces magasins permettent d'acheter vos équipements.\En progressant dans vos niveaux, de nouveaux objets plus puissants \seront disponibles. \\Le forgeron : Ce batiment permet d'améliorer votre équipement pour facilité \votre progression.\\La soigneuse : Elle peut vous soigner et vends des potions pour les combats.\Vous pouvez aussi y acheter des medaillons d'immortalité.\\La librairie : Vous pouvez y acheter des parchemins et augmenter vos \compétences contre de l'or.\\La maroquinerie : Permet d'améliorer vos sac pour porter d'avantage de \potions ou de parchemins.\\La Taverne : Pour y passer du bon temps..."
    print #main.map, "place 520 315 ;\"; "LA CARTE ET LE DONJON :"
    print #main.map, "place 520 340 ;\"; "La carte :\Elle permet de s'entrainer au combat. On y trouve des monstres \plus faibles que dans le donjon ce qui est idéal pour gagner facilement \des niveaux et avoir des fonds suffisant pour avoir un bon équipement.\Les monstres et leurs niveaux changent en fonction du pallier. \Il est possible de rencontrer d'autres joueurs mais ils veulent \généralement vous tuer. Ils sont souvent bien plus fort que les \monstres normaux...\\Le donjon :\Il est l'endroit le plus difficile. Vous devez battre 10 gardes et le chef \de cette garde avant d'atteindre le Boss du pallier. Une fois celui-ci \battu, vous pourrez monter au pallier suppérieur."
    print #main.map, "place 920 315 ;\"; "INVENTAIRE ET COMPETENCES :"
    print #main.map, "place 955 340 ;\"; "Ce bouton vous permet d'accéder aux caractéristiques \détaillés de votre personnage.\Vous y trouverez à gauche, vos statistiques, au centre \des informations relative à votre aventure et à droite \des sous menus pour gérer vos compétences et voir \votre équipement.\\\Ceci réprésente vos compétences. Vous pouvez\ les améliorer lorsque vous montez de niveau. Chaque \compétence vous rajoute passivement des bonus pour \vos combats.\\Ce bouton représente les caractéristiques principales\que vous pouvez augmenter sur votre personnage (force\agilité,science).\Vous gagnez plusieurs points distribuables par niveaux."
    print #main.map, "place 280 80 ;\"; "Bienvenue dans SAOA Version ";Version$;"\Vous commencez l'aventure au premier niveau de l'immence donjon que vous voyez ci-dessous. Chacun de ses niveaux est si vaste qu'il y contient une ville et des terres qui lui sont \propres. Dans chaques villes vous trouverez de nombreux marchands vous proposants différents items et équipements pour vous aider dans votre aventure. Il existe deux entrées \pour le donjon principal. Une sur la vue principale et l'autre sur la carte du niveau. \\Attention a ne pas vous lancer directement dans le donjon ! \(astuce : Le donjon centrale est un lieu dangereux ! N'y allez pas dès le début ! Gagnez des niveaux et équipez vous lourdement ! Entrainez vous sur la carte.)\\Gagnez vos niveaux sur les vastes terres de chaques niveaux mais attention à votre santé car ... si vous mourrez une fois... votre sauvegarde sera détruite ! \Ne faite pas d'actes irréfléchis.\\Vous terminerez le jeu une fois le Boss du 100ème niveau vaincu ! Bonne chance !"
end if

if version = 2 then
    print #main.map, "place 580 720 ;\"; "GO TO ADVENTURE !"
    print #main.map, "place 110 315 ;\"; "CITY :"
    print #main.map, "place 110 340 ;\"; "Armures & Armes : Ces magasins permettent d'acheter vos équipements.\En progressant dans vos niveaux, de nouveaux objets plus puissants \seront disponibles. \\Le forgeron : Ce batiment permet d'améliorer votre équipement pour facilité \votre progression.\\La soigneuse : Elle peut vous soigner et vends des potions pour les combats.\Vous pouvez aussi y acheter des medaillons d'immortalité.\\La librairie : Vous pouvez y acheter des parchemins et augmenter vos \compétences contre de l'or.\\La maroquinerie : Permet d'améliorer vos sac pour porter d'avantage de \potions ou de parchemins.\\La Taverne : Pour y passer du bon temps..."
    print #main.map, "place 520 315 ;\"; "MAP & DONJON :"
    print #main.map, "place 520 340 ;\"; "La carte :\Elle permet de s'entrainer au combat. On y trouve des monstres \plus faibles que dans le donjon ce qui est idéal pour gagner facilement \des niveaux et avoir des fonds suffisant pour avoir un bon équipement.\Les monstres et leurs niveaux changent en fonction du pallier. \Il est possible de rencontrer d'autres joueurs mais ils veulent \généralement vous tuer. Ils sont souvent bien plus fort que les \monstres normaux...\\Le donjon :\Il est l'endroit le plus difficile. Vous devez battre 10 gardes et le chef \de cette garde avant d'atteindre le Boss du pallier. Une fois celui-ci \battu, vous pourrez monter au pallier suppérieur."
    print #main.map, "place 920 315 ;\"; "INVENTORY & SKILLS :"
    print #main.map, "place 955 340 ;\"; "Ce bouton vous permet d'accéder aux caractéristiques \détaillés de votre personnage.\Vous y trouverez à gauche, vos statistiques, au centre \des informations relative à votre aventure et à droite \des sous menus pour gérer vos compétences et voir \votre équipement.\\\Ceci réprésente vos compétences. Vous pouvez\ les améliorer lorsque vous montez de niveau. Chaque \compétence vous rajoute passivement des bonus pour \vos combats.\\Ce bouton représente les caractéristiques principales\que vous pouvez augmenter sur votre personnage (force\agilité,science).\Vous gagnez plusieurs points distribuables par niveaux."
    print #main.map, "place 280 80 ;\"; "Bienvenue dans SAOA Version ";Version$;"\Vous commencez l'aventure au premier niveau de l'immence donjon que vous voyez ci-dessous. Chacun de ses niveaux est si vaste qu'il y contient une ville et des terres qui lui sont \propres. Dans chaques villes vous trouverez de nombreux marchands vous proposants différents items et équipements pour vous aider dans votre aventure. Il existe deux entrées \pour le donjon principal. Une sur la vue principale et l'autre sur la carte du niveau. \\Attention a ne pas vous lancer directement dans le donjon ! \(astuce : Le donjon centrale est un lieu dangereux ! N'y allez pas dès le début ! Gagnez des niveaux et équipez vous lourdement ! Entrainez vous sur la carte.)\\Gagnez vos niveaux sur les vastes terres de chaques niveaux mais attention à votre santé car ... si vous mourrez une fois... votre sauvegarde sera détruite ! \Ne faite pas d'actes irréfléchis.\\Vous terminerez le jeu une fois le Boss du 100ème niveau vaincu ! Bonne chance !"
end if
print #main.map, "flush"
wait

[SimpleClickVILLE]
mX = MouseX
mY = MouseY


compteurCLICK = compteurCLICK + 1
    if mX>765 and mX<885 and mY>180 and mY<210 and OPENdialogQ = 1 and recompenseQ1 = 1 then
       ' notice " " + chr$(13) +  "Récompense : 250 pièces d'or"
        money = money + 250
        recompenseQ1 = 2
        OPENdialogQ = 0
        'goto [SimpleClickVILLE]
        'goto [city]
        goto [pack1refresh]
    end if
    if mX>765 and mX<885 and mY>220 and mY<250 and OPENdialogQ = 1 and recompenseQ2 = 1 then
        'notice "récompense recu : 150 pièces d'or"
        money = money + 150
        recompenseQ2 = 2
        OPENdialogQ = 0
        'goto [city]
        goto [pack1refresh]
    end if
    if mX>765 and mX<885 and mY>260 and mY<290 and OPENdialogQ = 1 and recompenseQ3 = 1 then
     '   notice " " + chr$(13) +  "Récompense : 400 pièces d'or"
        money = money + 400
        recompenseQ3 = 2
        OPENdialogQ = 0
        'goto [city]
        goto [pack1refresh]
    end if
    if mX>765 and mX<885 and mY>300 and mY<330 and OPENdialogQ = 1 and recompenseQ4 = 1 then
       ' notice " " + chr$(13) +  "Récompense : 400 pièces d'or"
        money = money + 1000
        recompenseQ4 = 2
        OPENdialogQ = 0
       ' goto [city]
        goto [pack1refresh]
    end if
    if mX>765 and mX<885 and mY>340 and mY<370 and OPENdialogQ = 1 and recompenseQ5 = 1 then
       ' notice " " + chr$(13) +  "Récompense : 1000 pièces d'or"
        money = money + 2000
        recompenseQ5 = 2
        OPENdialogQ = 0
       ' goto [city]
        goto [pack1refresh]
    end if
    if mX>765 and mX<885 and mY>350 and mY<410 and OPENdialogQ = 1 and recompenseQ6 = 1 then
        'notice " " + chr$(13) +  "Récompense : 2000 pièces d'or"
        money = money + 3500
        recompenseQ6 = 2
        OPENdialogQ = 0
        'goto [city]
        goto [pack1refresh]
    end if


    if mX>380 and mX<460 and mY>25 and mY<100 and packQ1 = 1 then
    [pack1refresh]
        OPENdialogQ = 1
        if TYPEatkEQUIP$ <> "" then OKarm$ = "OK"
        if TYPEdefEQUIP$ <> "" then OKarm2$ = "OK"
        if TYPEatkEQUIP$ = "" then OKarm$ = " non achetée "
        if TYPEdefEQUIP$ = "" then OKarm2$ = " non achetée "
        if recompenseQ1 = 2 then finish1$ = "  -   Quête terminée "
        if recompenseQ1 <2 then finish1$ = ""
        #main.map, "drawbmp dialQUEST 320 150"
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ1 = 2 then print #main.map, "place 760 205 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        if version = 1 then print #main.map, "place 350 193 ;\"; "1 - ACHETER UNE ARME ET UNE ARMURE CHEZ LES MARCHANDS";finish1$
        if version = 2 then print #main.map, "place 350 193 ;\"; "1 - BUY A WEAPON AND A ARMOR ON THE MARCHAND";finish1$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ1 < 2 then print #main.map, "place 350 208 ;\"; "Arme : ";OKarm$;"    |     Armure : ";OKarm2$
        if OKarm$ = "OK" and OKarm2$ = "OK" then
            if recompenseQ1 = 2 then goto [Q2pack1]
            recompenseQ1 = 1
            Q1pack1 = 2
            if recompenseQ1 = 1  then print #main.map, "place 805 200 ;\"; "250 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKarm$ <> "OK" or OKarm2$ <> "OK" then print #main.map, "place 760 205 ;\"; "               "

        [Q2pack1]
        if nombreUPsac >= 1 then OKupSac$ = "OK"
        if nombreACHATpop >= 5 then OkachatPop$ = "OK"
        if nombreUPsac = 0 then OKupSac$ = " - "
        if nombreACHATpop = 0 then OkachatPop$ = " - "
        if recompenseQ2 = 2 then finish2$ = "  -   Quête terminée "
        if recompenseQ2 <2 then finish2$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ2 = 2 then print #main.map, "place 760 248 ;\";"               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        if version = 1 then print #main.map, "place 350 233 ;\"; "2 - AMELIORER VOTRE SAC ET ACHETER 5 POTIONS";finish2$
        if version = 2 then print #main.map, "place 350 233 ;\"; "2 - UPGRADE YOUR BAC ONE TIME AND BUY 5 POTIONS";finish2$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ2 < 2 then print #main.map, "place 350 248 ;\"; "Amélioration sac : ";nombreUPsac;" / 1      |     Achat potions : ";nombreACHATpop;" / 5"
        if OKupSac$ = "OK" and OkachatPop$ = "OK" then
            if recompenseQ2 = 2 then goto [Q3pack1]
            recompenseQ2 = 1
            Q2pack1 = 2
            if recompenseQ2 = 1 then print #main.map, "place 805 240 ;\"; "150 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupSac$ <> "OK" or OkachatPop$ <> "OK" then print #main.map, "place 760 248 ;\"; "               "

        [Q3pack1]
        if nombreUPitem >= 2 then OKupSTUFF$ = "OK"
        if nombreUPitem = 0 then OKupSTUFF$ = " - "
        if recompenseQ3 = 2 then finish3$ = "  -   Quête terminée "
        if recompenseQ3 <2 then finish3$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ3 = 2 then print #main.map, "place 760 288 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        if version = 1 then print #main.map, "place 350 275 ;\"; "3 - AMELIORER VOTRE EQUIPEMENT CHEZ LE FORGERON";finish3$
        if version = 2 then print #main.map, "place 350 275 ;\"; "3 - UPGRADE YOUR STUFF TWO TIMES";finish3$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ3 < 2 then print #main.map, "place 350 290 ;\"; "Amélioration de votre équipement : ";nombreUPitem;" / 2 "
        if OKupSTUFF$ = "OK" then
            if recompenseQ3 = 2 then goto [Q4pack1]
            recompenseQ3 = 1
            Q3pack1 = 2
            if recompenseQ3 = 1 then print #main.map, "place 805 282 ;\"; "400 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupSTUFF$ <> "OK" then print #main.map, "place 760 288 ;\"; "               "

        [Q4pack1]
        if NombreEnnemiKILL >= 30 then OKupM$ = "OK"
        if NombreEnnemiKILL = 0 then OKupM$ = " - "
        if lvl >= 8 then OKupLVL$ = "OK"
        if lvl < 8 then OKupLVL$ = " - "
        if recompenseQ4 = 2 then finish4$ = "  -   Quête terminée "
        if recompenseQ4 <2 then finish4$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ4 = 2 then print #main.map, "place 760 329 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        if version = 1 then print #main.map, "place 350 317 ;\"; "4 - TUER 30 MONSTRES SUR LA CARTE ET MONTER NIVEAU 8";finish4$
        if version = 2 then print #main.map, "place 350 317 ;\"; "4 - KILL 30 MONSTERS ON THE MAP AND UP TO LEVEL 8";finish4$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ4 < 2 then print #main.map, "place 350 332 ;\"; "Monstres tués : ";NombreEnnemiKILL;" / 30     |    Niveau : ";lvl;" / 8 "
        if OKupM$ = "OK" and OKupLVL$ = "OK" then
            if recompenseQ4 = 2 then goto [Q5pack1]
            recompenseQ4 = 1
            Q4pack1 = 2
            if recompenseQ4 = 1 then print #main.map, "place 805 322 ;\"; "1000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupM$ <> "OK" or OKupLVL$ <> "OK" then print #main.map, "place 760 329 ;\"; "               "

        [Q5pack1]
        if NombrePlayerKILL >= 1 then OKupP$ = "OK"
        if NombrePlayerKILL = 0 then OKupP$ = " non "
        if lvl >= 15 then OKupLVL2$ = "OK"
        if lvl < 15 then OKupLVL2$ = " - "
        if recompenseQ5 = 2 then finish5$ = "  -   Quête terminée "
        if recompenseQ5 <2 then finish5$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ5 = 2 then print #main.map, "place 760 371 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        if version = 1 then print #main.map, "place 350 359 ;\"; "5 - TUER 1 JOUEUR (TUEUR) SUR LA CARTE ET MONTER NIVEAU 15";finish5$
        if version = 2 then print #main.map, "place 350 359 ;\"; "5 - KILL A PLAYER (PK) ON THE MAP AND UP TO LEVEL 15";finish5$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ5 < 2 then print #main.map, "place 350 374 ;\"; "Joueur tué : ";OKupP$;"    |     Niveau : ";lvl;" / 15"
        if OKupP$ = "OK" and OKupLVL2$ = "OK" then
            if recompenseQ5 = 2 then goto [Q6pack1]
            recompenseQ5 = 1
            Q5pack1 = 2
            if recompenseQ5 = 1 then print #main.map, "place 800 362 ;\"; "2000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupP$ <> "OK" or OKupLVL2$ <> "OK" then print #main.map, "place 760 371 ;\"; "               "

        [Q6pack1]
        if LvlDONJON >= 2 then OKupF$ = "OK"
        if LvlDONJON = 1 then OKupF$ = " non "
        if lvl >= 20 then OKupLVL3$ = "OK"
        if lvl < 20 then OKupLVL3$ = " - "
        if recompenseQ6 = 2 then finish6$ = "  -   Quête terminée "
        if recompenseQ6 <2 then finish6$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ6 = 2 then print #main.map, "place 760 411 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        if version = 1 then print #main.map, "place 350 401 ;\"; "6 - MONTER PALLIER 2 ET MONTER NIVEAU 20";finish6$
        if version = 2 then print #main.map, "place 350 401 ;\"; "6 - UP TO THE FLOOR 2 AND UP TO LEVEL 20";finish6$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ6 < 2 then print #main.map, "place 350 416 ;\"; "Pallier 2 : ";OKupF$;"    |     Niveau : ";lvl;" / 20"
        if OKupF$ = "OK" and OKupLVL3$ = "OK" then
            if recompenseQ6 = 2 then goto [ENDpack1]
            recompenseQ6 = 1
            Q6pack1 = 2
            if recompenseQ6 = 1 then print #main.map, "place 800 404 ;\"; "3500 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupF$ <> "OK" or OKupLVL3$ <> "OK" then print #main.map, "place 760 411 ;\";"               "
        [ENDpack1]
        wait
    end if


    if mX>765 and mX<885 and mY>180 and mY<210 and OPENdialogQ = 1 and recompenseQ1a = 1 then
        'notice " " + chr$(13) +  "Récompense : 4500 pièces d'or"
        money = money + 4500
        recompenseQ1a = 2
        OPENdialogQ = 0
        goto [pack2refresh]
    end if
    if mX>765 and mX<885 and mY>220 and mY<250 and OPENdialogQ = 1 and recompenseQ2a = 1 then
       ' notice "récompense recu : 3000 pièces d'or"
        money = money + 3000
        recompenseQ2a = 2
        OPENdialogQ = 0
        goto [pack2refresh]
    end if
    if mX>765 and mX<885 and mY>260 and mY<290 and OPENdialogQ = 1 and recompenseQ3a = 1 then
       ' notice " " + chr$(13) +  "Récompense : 5000 pièces d'or"
        money = money + 5000
        recompenseQ3a = 2
        OPENdialogQ = 0
        goto [pack2refresh]
    end if
    if mX>765 and mX<885 and mY>300 and mY<330 and OPENdialogQ = 1 and recompenseQ4a = 1 then
      '  notice " " + chr$(13) +  "Récompense : 7500 pièces d'or"
        money = money + 7500
        recompenseQ4a = 2
        OPENdialogQ = 0
        goto [pack2refresh]
    end if
    if mX>765 and mX<885 and mY>340 and mY<370 and OPENdialogQ = 1 and recompenseQ5a = 1 then
       ' notice " " + chr$(13) +  "Récompense : 10000 pièces d'or"
        money = money + 27000
        recompenseQ5a = 2
        OPENdialogQ = 0
        goto [pack2refresh]
    end if
    if mX>765 and mX<885 and mY>350 and mY<410 and OPENdialogQ = 1 and recompenseQ6a = 1 then
      '  notice " " + chr$(13) +  "Récompense : 14000 pièces d'or"
        money = money + 14000
        recompenseQ6a = 2
        OPENdialogQ = 0
        goto [pack2refresh]
    end if

    if mX>480 and mX<560 and mY>25 and mY<100 and packQ2 = 2 then notice " " + chr$(13) +  "Vous devez finir l'acte précédent pour débloquer celui-ci."
    if mX>480 and mX<560 and mY>25 and mY<100 and packQ2 = 1 then
        [pack2refresh]
        OPENdialogQ = 1
        if Qtaverne >= 1 then OKtavQ$ = "OK"
        if Qtaverne < 1 then OKtavQ$ = "non faite"
        if recompenseQ1a = 2 then finish1a$ = "  -   Quête terminée "
        if recompenseQ1a <2 then finish1a$ = ""
        #main.map, "drawbmp dialQUEST 320 150"
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ1a = 2 then print #main.map, "place 760 205 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 193 ;\"; "1 - FINIR UNE QUÊTE DANS LA TAVERNE ";finish1a$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ1a < 2 then print #main.map, "place 350 208 ;\"; "Quête de la taverne terminée : ";Qtaverne
        if OKtavQ$ = "OK" then
            if recompenseQ1a = 2 then goto [Q2pack2]
            recompenseQ1a = 1
            Q1pack2 = 2
            if recompenseQ1a = 1  then print #main.map, "place 800 200 ;\"; "4500 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKtavQ$ <> "OK" then print #main.map, "place 760 205 ;\"; "               "

        [Q2pack2]
        if nombreGOBtuer >= 15 then OKgob$ = "OK"
        if nombreARAtuer >= 15 then Okara$ = "OK"
        if nombreGOBtuer < 10 then OKgob$ = " - "
        if nombreARAtuer < 10 then Okara$ = " - "
        if recompenseQ2a = 2 then finish2a$ = "  -   Quête terminée "
        if recompenseQ2a <2 then finish2a$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ2a = 2 then print #main.map, "place 760 248 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 233 ;\"; "2 - TUER DES GOBELINS ET DES ARAIGNEES GEANTES ";finish2a$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ2a < 2 then print #main.map, "place 350 248 ;\"; "Gobelins tués : ";nombreGOBtuer;" / 15      |     Araignées géantes tuées : ";nombreARAtuer;" / 10"
        if OKgob$ = "OK" and Okara$ = "OK" then
            if recompenseQ2a = 2 then goto [Q3pack2]
            recompenseQ2a = 1
            Q2pack2 = 2
            if recompenseQ2a = 1 then print #main.map, "place 800 240 ;\"; "3000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if Okara$ <> "OK" or OKgob$ <> "OK" then print #main.map, "place 760 248 ;\"; "               "

        [Q3pack2]
        if nombrePLANTtuer >= 40 then OKplant$ = "OK"
        if nombreSQUEtuer >= 40 then Oksque$ = "OK"
        if nombrePLANTtuer < 40 then OKplant$ = " - "
        if nombreSQUEtuer < 40 then Oksque$ = " - "
        if recompenseQ3a = 2 then finish3a$ = "  -   Quête terminée "
        if recompenseQ3a <2 then finish3a$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ3a = 2 then print #main.map, "place 760 288 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 275 ;\"; "3 - TUER DES PLANTES CARNIVORES ET DES SQUELETTES ";finish3a$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ3a < 2 then print #main.map, "place 350 290 ;\"; "Plante carnivores tués : ";nombrePLANTtuer;" / 40      |     Squelettes tuées : ";nombreSQUEtuer;" / 40"
        if OKplant$ = "OK" and Oksque$ = "OK" then
            if recompenseQ3a = 2 then goto [Q4pack2]
            recompenseQ3a = 1
            Q3pack2 = 2
            if recompenseQ3a = 1 then print #main.map, "place 800 282 ;\"; "5000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if Oksque$ <> "OK" or OKplant$ <> "OK" then print #main.map, "place 760 288 ;\"; "               "

        [Q4pack2]
        if BONUSdef >= 500 then OKdef$ = "OK"
        if BONUSdef < 500 then OKdef$ = " - "
        if BONUSatk >= 800 then OKatk$ = "OK"
        if BONUSatk < 800 then OKatk$ = " - "
        if recompenseQ4a = 2 then finish4a$ = "  -   Quête terminée"
        if recompenseQ4a <2 then finish4a$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ4a = 2 then print #main.map, "place 760 329 ;\"; "              "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 317 ;\"; "4 - AVOIR UNE ARME >800 DEGÂTS ET UNE ARMURE >500 DE DEFENSE";finish4a$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ4a < 2 then print #main.map, "place 350 332 ;\"; "Votre arme : ";BONUSatk;" / 800     |    Votre armure : ";BONUSdef;" / 500 "
        if OKdef$ = "OK" and OKatk$ = "OK" then
            if recompenseQ4a = 2 then goto [Q5pack2]
            recompenseQ4a = 1
            Q4pack2 = 2
            if recompenseQ4a = 1 then print #main.map, "place 800 322 ;\"; "7500 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKdef$ <> "OK" or OKatk$ <> "OK" then print #main.map, "place 760 329 ;\"; "             "

        [Q5pack2]
        if VALRAKlife = 1 then OKvalrak$ = " Tué"
        if VALRAKlife = 0 then OKvalrak$ = " En vie "
        if recompenseQ5a = 2 then finish5a$ = "  -   Quête terminée "
        if recompenseQ5a <2 then finish5a$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ5a = 2 then print #main.map, "place 760 371 ;\"; "              "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 359 ;\"; "5 - TUER VALRAK SUR L'ÎLE DE LA CARTE";finish5a$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ5a < 2 then print #main.map, "place 350 374 ;\"; "Traque de Valrak : ";OKvalrak$
        if OKvalrak$ = " Tué" then
            if recompenseQ5a = 2 then goto [Q6pack2]
            recompenseQ5a = 1
            Q5pack2 = 2
            if recompenseQ5a = 1 then print #main.map, "place 795 362 ;\"; "27000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKvalrak$ <> " Tué" then print #main.map, "place 760 371 ;\";"              "

        [Q6pack2]
        if NombreKILLsangi >= 9 then OKsangi$ = "Décimée"
        if NombreKILLsangi < 9 then OKsangi$ = "Encore en place"
        if recompenseQ6a = 2 then finish6a$ = "  -   Quête terminée "
        if recompenseQ6a <2 then finish6a$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ6a = 2 then print #main.map, "place 760 411 ;\"; "               "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 401 ;\"; "6 - TUER TOUS LES MEMBRES DE LA GUILDE SANGUINAIRE";finish6a$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ6a < 2 then print #main.map, "place 350 416 ;\"; "Membres de la guilde sanguinaire tués : "; NombreKILLsangi ;" / 9"
        if OKsangi$ = "Décimée" then
            if recompenseQ6a = 2 then goto [ENDpack2]
            recompenseQ6a = 1
            Q6pack2 = 2
            if recompenseQ6a = 1 then print #main.map, "place 795 404 ;\"; "14 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKsangi$ <> "Décimée" then print #main.map, "place 760 411 ;\"; "               "
        [ENDpack2]
        wait
    end if


    if mX>765 and mX<885 and mY>180 and mY<210 and OPENdialogQ = 1 and recompenseQ1b = 1 then
       ' notice " " + chr$(13) +  "Récompense : 10000 pièces d'or"
        money = money + 20000
        recompenseQ1b = 2
        OPENdialogQ = 0
        goto [pack3refresh]
    end if
    if mX>765 and mX<885 and mY>220 and mY<250 and OPENdialogQ = 1 and recompenseQ2b = 1 then
       ' notice "récompense recu : 30000 pièces d'or"
        money = money + 30000
        recompenseQ2b = 2
        OPENdialogQ = 0
        goto [pack3refresh]
    end if
    if mX>765 and mX<885 and mY>260 and mY<290 and OPENdialogQ = 1 and recompenseQ3b = 1 then
       ' notice " " + chr$(13) +  "Récompense : 25000 pièces d'or"
        money = money + 25000
        recompenseQ3b = 2
        OPENdialogQ = 0
        goto [pack3refresh]
    end if
    if mX>765 and mX<885 and mY>300 and mY<330 and OPENdialogQ = 1 and recompenseQ4b = 1 then
       ' notice " " + chr$(13) +  "Récompense : 50000 pièces d'or"
        money = money + 50000
        recompenseQ4b = 2
        OPENdialogQ = 0
        goto [pack3refresh]
    end if
    if mX>765 and mX<885 and mY>340 and mY<370 and OPENdialogQ = 1 and recompenseQ5b = 1 then
      '  notice " " + chr$(13) +  "Récompense : 35000 pièces d'or"
        money = money + 35000
        recompenseQ5b = 2
        OPENdialogQ = 0
        goto [pack3refresh]
    end if
    if mX>765 and mX<885 and mY>350 and mY<410 and OPENdialogQ = 1 and recompenseQ6b = 1 then
       ' notice " " + chr$(13) +  "Récompense : 20000 pièces d'or"
        money = money + 20000
        recompenseQ6b = 2
        OPENdialogQ = 0
        goto [pack3refresh]
    end if

    if mX>580 and mX<660 and mY>25 and mY<100 and packQ3 = 2 then notice " " + chr$(13) +  "Vous devez finir l'acte précédent pour débloquer celui-ci."
    if mX>580 and mX<660 and mY>25 and mY<100 and packQ3 = 1 then
        [pack3refresh]
        OPENdialogQ = 1
        if lvl >= 80 then OKupLVL4$ = "OK"
        if lvl < 80 then OKupLVL4$ = " - "
        if recompenseQ1b = 2 then finish1b$ = "  -   Quête terminée "
        if recompenseQ1b <2 then finish1b$ = ""
        #main.map, "drawbmp dialQUEST 320 150"
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ1b = 2 then print #main.map, "place 740 205 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 193 ;\"; "1 - ATTEINDRE LE NIVEAU 80 ";finish1b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ1b < 2 then print #main.map, "place 350 208 ;\"; "Niveau : ";lvl;" / 80"
        if OKupLVL4$ = "OK" then
            if recompenseQ1b = 2 then goto [Q2pack3]
            recompenseQ1b = 1
            Q1pack3 = 2
            if recompenseQ1b = 1  then print #main.map, "place 795 200 ;\"; "20 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupLVL4$ <> "OK" then print #main.map, "place 740 205 ;\"; "                 "

        [Q2pack3]
        if nombreOEUFphenix >= 10 then OKoeufPH$ = "OK"
        if phenixKILLED >= 30 then OKphenix$ = "OK"
        if nombreOEUFphenix < 10 then OKoeufPH$ = " En cours "
        if phenixKILLED < 30 then OKphenix$ = " En cours "
        if recompenseQ2b = 2 then finish2b$ = "  -   Quête terminée "
        if recompenseQ2b <2 then finish2b$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ2b = 2 then print #main.map, "place 740 248 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 233 ;\"; "2 - RECOLTER 10 OEUFS DE PHENIX ET TUER 30 PHENIX";finish2b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ2b < 2 then print #main.map, "place 350 248 ;\"; "Oeufs de phénix récupérés : ";nombreOEUFphenix;" / 10      |     Phénix tués : ";phenixKILLED;" / 30  "
        if OKoeufPH$ = "OK" and OKphenix$ = "OK" then
            if recompenseQ2b = 2 then goto [Q3pack3]
            recompenseQ2b = 1
            Q2pack3 = 2
            if recompenseQ2b = 1 then print #main.map, "place 795 240 ;\"; "30 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKphenix$ <> "OK" or OKoeufPH$ <> "OK" then print #main.map, "place 740 248 ;\"; "                 "

        [Q3pack3]
        if RoisDEScentaures = 1 then OKroiCENT$ = "Tué"
        if RoisDEScentaures = 0 then OKroiCENT$ = " En vie "
        if recompenseQ3b = 2 then finish3b$ = "  -   Quête terminée "
        if recompenseQ3b = 0 then finish3b$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ3b = 2 then print #main.map, "place 740 288 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 275 ;\"; "3 - TROUVER ET TUER LE ROI DES CENTAURES ";finish3b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ3b = 0 then print #main.map, "place 350 290 ;\"; "Rois des centaures : ";OKroiCENT$
        if OKroiCENT$ = "Tué" then
            if recompenseQ3b = 2 then goto [Q4pack3]
            recompenseQ3b = 1
            Q3pack3 = 2
            if recompenseQ3b = 1 then print #main.map, "place 795 282 ;\"; "25 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKroiCENT$ <> "Tué" then print #main.map, "place 740 288 ;\"; "                 "

        [Q4pack3]
        if MAX1 >= 30 then OKpotionsSAC$ = "OK"
        if MAX1 < 30 then OKpotionsSAC$ = " En cours "
        if MAX2 >= 30 then OKparcheminsSAC$ = "OK"
        if MAX2 < 30 then OKparcheminsSAC$ = " En cours "
        if recompenseQ4b = 2 then finish4b$ = "  -   Quête terminée "
        if recompenseQ4b <2 then finish4b$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ4b = 2 then print #main.map, "place 740 329 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 317 ;\"; "4 - AMELIORER SAC POTION A 30 ET SAC PARCHEMINS A 30";finish4b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ4b < 2 then print #main.map, "place 350 332 ;\"; "Partie Potions : ";MAX1;" / 30     |    Partie Parchemins : ";MAX2;" / 30"
        if OKpotionsSAC$ = "OK" and OKparcheminsSAC$ = "OK" then
            if recompenseQ4b = 2 then goto [Q5pack3]
            recompenseQ4b = 1
            Q4pack3 = 2
            if recompenseQ4b = 1 then print #main.map, "place 795 322 ;\"; "50 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKpotionsSAC$ <> "OK" or OKparcheminsSAC$ <> "OK" then print #main.map, "place 740 329 ;\"; "                 "

        [Q5pack3]
        if LvlDONJON >= 11 then OKpallier11$ = "Tué"
        if LvlDONJON < 11 then OKpallier11$ = "En vie"
        if recompenseQ5b = 2 then finish5b$ = "  -   Quête terminée "
        if recompenseQ5b <2 then finish5b$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ5b = 2 then print #main.map, "place 740 371 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 359 ;\"; "5 - BATTRE LE BOSS DU PALIER 10";finish5b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ5b < 2 then print #main.map, "place 350 374 ;\"; "Boss palier 10 : ";OKpallier11$
        if OKpallier11$ = "Tué" then
            if recompenseQ5b = 2 then goto [Q6pack3]
            recompenseQ5b = 1
            Q5pack3 = 2
            if recompenseQ5b = 1 then print #main.map, "place 795 362 ;\"; "35 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKpallier11$ <> "Tué" then print #main.map, "place 740 371 ;\"; "                 "

        [Q6pack3]
        if DonjonMaudit > 0 then OKdonjon2$ = "Trouvé"
        if DonjonMaudit = 0 then OKdonjon2$ = "Inconnu"
        if LvlDONJONmaudit > 12 then OKbossDonjonM$ = "Tué"
        if LvlDONJONmaudit <= 12 then OKbossDonjonM$ = "En vie"
        if recompenseQ6b = 2 then finish6b$ = "  -   Quête terminée "
        if recompenseQ6b <2 then finish6b$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ6b = 2 then print #main.map, "place 740 411 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 401 ;\"; "6 - TROUVER ET FINIR LE DONJON MAUDIT SUR LA CARTE";finish6b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ6b < 2 then print #main.map, "place 350 416 ;\"; "Emplacement du donjon maudit: "; OKdonjon2$ ;"     |      Boss du donjon maudit : ";OKbossDonjonM$
        if OKdonjon2$ = "Trouvé" and OKbossDonjonM$ = "Tué" then
            if recompenseQ6b = 2 then goto [ENDpack3]
            recompenseQ6b = 1
            DonjonMaudit = 2
            Q6pack3 = 2
            if recompenseQ6b = 1 then print #main.map, "place 795 404 ;\"; "20 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKdonjon2$ <> "Trouvé" or OKbossDonjonM$ <> "Tué" then print #main.map, "place 740 411 ;\"; "                 "
        [ENDpack3]
        wait
    end if


    if mX>765 and mX<885 and mY>180 and mY<210 and OPENdialogQ = 1 and recompenseQ1c = 1 then
        'notice " " + chr$(13) +  "Récompense : 4500 pièces d'or"
        money = money + 1500000
        recompenseQ1c = 2
        OPENdialogQ = 0
        goto [pack4refresh]
    end if
    if mX>765 and mX<885 and mY>220 and mY<250 and OPENdialogQ = 1 and recompenseQ2c = 1 then
       ' notice "récompense recu : 30000 pièces d'or"
        money = money + 100000
        recompenseQ2c = 2
        OPENdialogQ = 0
        goto [pack4refresh]
    end if
    if mX>765 and mX<885 and mY>260 and mY<290 and OPENdialogQ = 1 and recompenseQ3c = 1 then
       ' notice " " + chr$(13) +  "Récompense : 25000 pièces d'or"
        money = money + 1000000
        recompenseQ3c = 2
        OPENdialogQ = 0
        goto [pack4refresh]
    end if
    if mX>765 and mX<885 and mY>300 and mY<330 and OPENdialogQ = 1 and recompenseQ4c = 1 then
       ' notice " " + chr$(13) +  "Récompense : 50000 pièces d'or"
        money = money + 2000000
        recompenseQ4c = 2
        OPENdialogQ = 0
        goto [pack4refresh]
    end if
    if mX>765 and mX<885 and mY>340 and mY<370 and OPENdialogQ = 1 and recompenseQ5c = 1 then
      '  notice " " + chr$(13) +  "Récompense : 35000 pièces d'or"
        money = money + 200000
        recompenseQ5c = 2
        OPENdialogQ = 0
        goto [pack4refresh]
    end if
    if mX>765 and mX<885 and mY>350 and mY<410 and OPENdialogQ = 1 and recompenseQ6c = 1 then
       ' notice " " + chr$(13) +  "Récompense : 20000 pièces d'or"
        money = money + 2000000
        recompenseQ6c = 2
        OPENdialogQ = 0
        goto [pack4refresh]
    end if

    if mX>680 and mX<760 and mY>25 and mY<100 and packQ4 = 2 then notice " " + chr$(13) +  "Vous devez finir l'acte précédent pour débloquer celui-ci."
    if mX>680 and mX<760 and mY>25 and mY<100 and packQ4 = 1 then
        [pack4refresh]
        OPENdialogQ = 1
        if lvl >= 200 then OKupLVL5$ = "OK"
        if lvl < 200 then OKupLVL5$ = " - "
        if recompenseQ1c = 2 then finish1b$ = "  -   Quête terminée "
        if recompenseQ1c <2 then finish1b$ = ""
        #main.map, "drawbmp dialQUEST 320 150"
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ1c = 2 then print #main.map, "place 740 205 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 193 ;\"; "1 - ATTEINDRE LE NIVEAU 200 ";finish1b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ1c < 2 then print #main.map, "place 350 208 ;\"; "Niveau : ";lvl;" / 200"
        if OKupLVL5$ = "OK" then
            if recompenseQ1c = 2 then goto [Q2pack4]
            recompenseQ1c = 1
            Q1pack4 = 2
            if recompenseQ1c = 1  then print #main.map, "place 795 200 ;\"; "1500 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKupLVL5$ <> "OK" then print #main.map, "place 740 205 ;\"; "                 "

        [Q2pack4]
        if NombreParcheminMASTER > 0 then OKparcho$ = "OUI"
        if NombreParcheminMASTER = 0 then OKparcho$ = "NON"
        if recompenseQ2c = 2 then finish2c$ = "  -   Quête terminée "
        if recompenseQ2c <2 then finish2c$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ2c = 2 then print #main.map, "place 740 248 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 233 ;\"; "2 - AMELIORER UN PARCHEMIN AU NIVEAU MAITRE ";finish2c$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ2c < 2 then print #main.map, "place 350 248 ;\"; "Parchemin amélioré : ";OKparcho$
        if OKparcho$ = "OK" then
            if recompenseQ2c = 2 then goto [Q3pack3]
            recompenseQ2c = 1
            Q2pack4 = 2
            if recompenseQ2c = 1 then print #main.map, "place 795 240 ;\"; "100 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKparcho$ <> "OK" then print #main.map, "place 740 248 ;\"; "                 "

        [Q3pack4]
        if NombreEnnemiKILL >= 2000 then OKkiller$ = "OK"
        if NombreEnnemiKILL < 2000 then OKkiller$ = "En cours"
        if recompenseQ3c = 2 then finish3c$ = "  -   Quête terminée "
        if recompenseQ3c = 0 then finish3c$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ3c = 2 then print #main.map, "place 740 288 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 275 ;\"; "3 - TUER 2000 MONSTRES ";finish3c$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ3c = 0 then print #main.map, "place 350 290 ;\"; "Tuer 2000 monstres : ";NombreEnnemiKILL;" / 2000"
        if OKkiller$ = "OK" then
            if recompenseQ3c = 2 then goto [Q4pack4]
            recompenseQ3c = 1
            Q3pack4 = 2
            if recompenseQ3c = 1 then print #main.map, "place 795 282 ;\"; "1 000 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKkiller$ <> "OK" then print #main.map, "place 740 288 ;\"; "                 "

        [Q4pack4]
        if LvlDONJON >= 31 then OKpallier31$ = "Tué"
        if LvlDONJON < 31 then OKpallier31$ = " En vie "
        if recompenseQ4c = 2 then finish4c$ = "  -   Quête terminée "
        if recompenseQ4c < 2 then finish4c$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ4c = 2 then print #main.map, "place 740 329 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 317 ;\"; "4 - BATTRE LE BOSS DU PALIER 30";finish4c$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ4c < 2 then print #main.map, "place 350 332 ;\"; "BOSS PALIER 30 :";OKpallier31$
        if OKpallier31$ = "Tué" then
            if recompenseQ4c = 2 then goto [Q5pack4]
            recompenseQ4c = 1
            Q4pack4 = 2
            if recompenseQ4c = 1 then print #main.map, "place 795 322 ;\"; "2 000 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKpallier31$ <> "Tué" then print #main.map, "place 740 329 ;\"; "                 "

        [Q5pack4]
        if ULDYRfound = 1 then OKuldyr1$ = "Trouvé"
        if ULDYRfound = 0 then OKuldyr1$ = "Inconnue"
        if ULDYRfree = 1 then OKuldyr2$ = "Libéré"
        if ULDYRfree = 0 then OKuldyr2$ = "Prisonnier"
        if recompenseQ5c = 2 then finish5c$ = "  -   Quête terminée "
        if recompenseQ5c < 2 then finish5c$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ5c = 2 then print #main.map, "place 740 371 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 359 ;\"; "4 - TROUVER ET LIBERER ULDYR ";finish5c$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ4c < 2 then print #main.map, "place 350 374 ;\"; "Localisation : ";OKuldyr1$;"   |   Liberté : ";OKuldyr2$
        if OKuldyr1$ = "Trouvé" and OKuldyr2$ = "Libéré" then
            if recompenseQ5c = 2 then goto [Q6pack4]
            recompenseQ5c = 1
            Q5pack4 = 2
            if recompenseQ5c = 1 then print #main.map, "place 795 362 ;\"; "200 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKuldyr1$ <> "Trouvé" OR OKuldyr2$ <> "Libéré" then print #main.map, "place 740 371 ;\"; "                 "

        [Q6pack4]
        if VISARAHfound = 1 then OKvisarah1$ = "Trouvée"
        if VISARAHfound = 0 then OKvisarah1$ = "Inconnue"
        if VISARAHfree = 1 then OKvisarah2$ = "Tuée"
        if VISARAHfree = 0 then OKvisarah2$ = "Vivante"
        if recompenseQ6c = 2 then finish6c$ = "  -   Quête terminée "
        if recompenseQ6c <2 then finish6c$ = ""
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if recompenseQ6c = 2 then print #main.map, "place 740 411 ;\"; "                 "
        print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
        print #main.map, "place 350 401 ;\"; "6 - TROUVER ET TUER VISARAH LA PECHERESSE";finish6b$
        print #main.map, "backcolor white;font Times New Roman 9; color black"
        if recompenseQ6c < 2 then print #main.map, "place 350 416 ;\"; "Localisation : ";OKvisarah1$;"   |   Statut : ";OKvisarah2$
        if OKvisarah1$ = "Trouvée" and OKvisarah2$ = "Tuée" then
            if recompenseQ6c = 2 then goto [ENDpack4]
            recompenseQ6c = 1
            Q6pack4 = 2
            if recompenseQ6c = 1 then print #main.map, "place 795 404 ;\"; "2 000 000 d'or"
        end if
        print #main.map, "backcolor white;font Times New Roman 30; color black"
        if OKvisarah1$ <> "Trouvée" and OKvisarah2$ <> "Tuée" then print #main.map, "place 740 411 ;\"; "                 "
        [ENDpack4]
        wait
    end if

    if UPdown = 1 then
        close #UPdown
        UPdown = 0
    end if

    if mX>780 and mX<860 and mY>25 and mY<100 and packQ5 = 2 then notice " " + chr$(13) +  "Vous devez finir l'acte précédent pour débloquer celui-ci."
    if mX>780 and mX<860 and mY>25 and mY<100 and packQ5 = 1 then
        OPENdialogQ = 1
        #main.map, "drawbmp dialQUEST 320 150"
        wait
    end if

    INDEXmatriceBOUTIQ = 0 : INDEXmatriceBOUTIQmax = 0
    if mX>320 and mX<920 and mY>150 and mY<450 and OPENdialogQ = 1 then wait
    if OPENdialogQ = 1 then OPENdialogQ = 0

'notice mX;"/";mY


    if noCLICK > 3 and mX>1210 and mX<1260 and mY>115 and mY<160 then goto [Updown]
    if noCLICK > 3 and mX>711 and mX<791 and mY>411 and mY<438 then goto [healer]
    if noCLICK > 3 and mX>670 and mX<750 and mY>337 and mY<364 then goto [Weapon]
    if noCLICK > 3 and mX>586 and mX<665 and mY>354 and mY<382 then goto [Armory]
    if noCLICK > 3 and mX>1100 and mX<1185 and mY>110 and mY<185 then goto [Character]
    if noCLICK > 3 and mX>45 and mX<125 and mY>24 and mY<54 then goto [GameStartMAIN2]
    if noCLICK > 3 and mX>955 and mX<1040 and mY>495 and mY<520 then goto [taverne]
    if noCLICK > 3 and mX>175 and mX<280 and mY>475 and mY<505 then goto [maro]
    if noCLICK > 3 and mX>946 and mX<1026 and mY>368 and mY<395 then goto [library]
    if noCLICK > 3 and mX>1135 and mX<1215 and mY>420 and mY<450 then goto [library3]
    if noCLICK > 3 and mX>462 and mX<542 and mY>385 and mY<411 then goto [forgeron]
    if noCLICK > 3 and mX>138 and mX<163 and mY>25 and mY<50 then goto [GameStartMAINsecu]
    if noCLICK > 3 and mX>256 and mX<335 and mY>668 and mY<695 then
       action = 0
       noCLICK = 1
       if AIDEpnj2 = 0 then noCLICK = 5
       goto [Arena0]
    end if
    if AIDEpnj = 1 then noCLICK = noCLICK + 1
    if AIDEpnj = 1 then goto [city]
    if noCLICK >3 then goto [refreshMAP2]
    if OPENdialogQ = 0 then goto [city]
wait


[city]
city = 1 : secuINV = 0 : login = 0 :Inmap = 0
#main.map, "cls"
#main.map, "when leftButtonDown [SimpleClickVILLE]"
#main.map, "down;fill black"

if AIDEpnj = 0 then noCLICK = 5
if AIDEpnj = 0 and noCLICK >= 5 then
    #main.map, "drawbmp city1 0 0"
    #main.map, "background city1"
end if

if sexe = 1 then info1$ = "aventurier" : info2$ = "nouveau"
if sexe = 2 then info1$ = "aventurière" : info2$ = "nouvelle"

if AIDEpnj = 1 and noCLICK < 1 then
    print #main.map, "drawbmp pnjX1 0 0"
    print #main.map, "font Times New Roman 15 italic; color black;backcolor white"
    print #main.map, "place 480 220 ;\"; "'' Bien le bonjour jeune ";info1$;" !\\Je vois que tu es ";info2$;" n'est-ce pas ?\Tu trouveras sur le haut de l'écran, un chemin \de quête que je te conseil fortement de suivre !\ Tu dois te demander quel est le but non ? \C'est assez simple...\\Nous sommes tous enfermés dans ce monde virtuel !''\\\(Appuyez pour continuer) "
    print #main.map, "flush"
    wait
end if

if AIDEpnj = 1 and noCLICK = 1 then
    print #main.map, "drawbmp pnjX1 0 0"
    print #main.map, "font Times New Roman 15 italic; color black;backcolor white"
    print #main.map, "place 480 220 ;\"; "''Ne me demande pas pourquoi mais c'est un fait...\Le seul moyen pour nous de sortir de là c'est\de terminer le jeu.\Ne t'inquiète pas, nous sommes 10 000 dans la \même situation. Ne perds pas espoir, on sait qu'il \y a 100 niveaux à grimper. On va tous se donner à \fond et on réussira à s'en sortir!\Equipe toi et va sur la carte tu y trouveras l'entrée \du donjon et tu pourras t'y entrainer. '' \\\(Appuyez pour continuer)"
    print #main.map, "flush"
    noCLICK = 2
    wait
end if

if AIDEpnj = 1 and noCLICK = 3 then
   '#main.map, "drawbmp city1 0 0"
    'notice "ok"
    print #main.map, "drawbmp pnjX1 0 0"
    print #main.map, "font Times New Roman 15 italic; color black;backcolor white"
    print #main.map, "place 480 220 ;\"; "''Attention de ne pas oublier ce dernier point : \L'icone (personnage info.) que tu vois en haut à droite \de l'écran te donnera beaucoup de renseignements et te \permettra de choisir tes compétences de combats !\\N'oubli pas de les augmenter entre chaque niveau ! \Ca t'aidera beaucoup ! \\Bonne chance à toi jeune ";info1$;" !'' \\\(Appuyez pour continuer)"
    print #main.map, "flush"
    AIDEpnj = 0
    wait
end if


#main.map,"spritexy barre 1000 24"
#main.map,"spritexy perso 1100 100"
#main.map,"SpriteVisible perso on"
#main.map,"SpriteVisible mapbutton off"
#main.map,"spritexy mapbutton2 1215 120"
#main.map,"SpriteVisible mapbutton2 on"

#main.map,"SpriteVisible menubutton1 off"
#main.map,"SpriteVisible menubutton2 off"
#main.map,"SpriteVisible menubutton3 off"
#main.map,"SpriteVisible menubutton4 off"
#main.map,"SpriteVisible menubutton5 off"
#main.map,"SpriteVisible barre on"

if ACTIVATIONvalrak = 1 then #main.map,"SpriteVisible Qp off"
ACTIVATIONvalrak = 0
if ACTIVATIONcampSANGI = 1 then #main.map,"SpriteVisible camp off"
ACTIVATIONcampSANGI = 0
if ACTIVATIONcamp2 = 1 then #main.map,"SpriteVisible camp2 off"
ACTIVATIONcamp2 = 0
[refreshMAP2]
#main.map "SetFocus; DrawSprites"

print #main.map, "backcolor white;font Times New Roman 9; color black"
#main.map, "drawbmp barreQ 440 63"
QpackQ1 = 0 : QpackQ2 = 0 : QpackQ3 = 0 : QpackQ4 = 0 : QpackQ5 = 0

if packQ1 = 1 then #main.map, "drawbmp indicQ1 380 25"
if packQ1 = 2 then #main.map, "drawbmp indicQ2 380 25"
if Q1pack1 = 2 then QpackQ1 = QpackQ1 + 1
if Q2pack1 = 2 then QpackQ1 = QpackQ1 + 1
if Q3pack1 = 2 then QpackQ1 = QpackQ1 + 1
if Q4pack1 = 2 then QpackQ1 = QpackQ1 + 1
if Q5pack1 = 2 then QpackQ1 = QpackQ1 + 1
if Q6pack1 = 2 then QpackQ1 = QpackQ1 + 1
if packQ1 = 1 then
    print #main.map, "place 399 48 ;\"; "ACTE I"
    print #main.map, "place 393 70 ;\"; "~ Quêtes ~"
    print #main.map, "place 406 88 ;\"; QpackQ1;" / ";" 6"
end if

if QpackQ1 = 6 then packQ2 = 1
if packQ2 = 1 then #main.map, "drawbmp indicQ1 480 25"
if packQ2 = 2 then #main.map, "drawbmp indicQ2 480 25"
if Q1pack2 = 2 then QpackQ2 = QpackQ2 + 1
if Q2pack2 = 2 then QpackQ2 = QpackQ2 + 1
if Q3pack2 = 2 then QpackQ2 = QpackQ2 + 1
if Q4pack2 = 2 then QpackQ2 = QpackQ2 + 1
if Q5pack2 = 2 then QpackQ2 = QpackQ2 + 1
if Q6pack2 = 2 then QpackQ2 = QpackQ2 + 1
if packQ2 = 1 then
    print #main.map, "place 496 48 ;\"; "ACTE II"
    print #main.map, "place 492 70 ;\"; "~ Quêtes ~"
    print #main.map, "place 505 88 ;\"; QpackQ2;" / ";" 6"
end if

if QpackQ2 = 6 then packQ3 = 1
if packQ3 = 1 then #main.map, "drawbmp indicQ1 580 25"
if packQ3 = 2 then #main.map, "drawbmp indicQ2 580 25"
if Q1pack3 = 2 then QpackQ3 = QpackQ3 + 1
if Q2pack3 = 2 then QpackQ3 = QpackQ3 + 1
if Q3pack3 = 2 then QpackQ3 = QpackQ3 + 1
if Q4pack3 = 2 then QpackQ3 = QpackQ3 + 1
if Q5pack3 = 2 then QpackQ3 = QpackQ3 + 1
if Q6pack3 = 2 then QpackQ3 = QpackQ3 + 1
if packQ3 = 1 then
    print #main.map, "place 594 48 ;\"; "ACTE III"
    print #main.map, "place 592 70 ;\"; "~ Quêtes ~"
    print #main.map, "place 605 88 ;\"; QpackQ3;" / ";" 6"
end if

if QpackQ3 = 6 then packQ4 = 1
if packQ4 = 1 then #main.map, "drawbmp indicQ1 680 25"
if packQ4 = 2 then #main.map, "drawbmp indicQ2 680 25"
if Q1pack4 = 2 then QpackQ4 = QpackQ4 + 1
if Q2pack4 = 2 then QpackQ4 = QpackQ4 + 1
if Q3pack4 = 2 then QpackQ4 = QpackQ4 + 1
if Q4pack4 = 2 then QpackQ4 = QpackQ4 + 1
if Q5pack4 = 2 then QpackQ4 = QpackQ4 + 1
if Q6pack4 = 2 then QpackQ4 = QpackQ4 + 1
if packQ4 = 1 then
    print #main.map, "place 694 48 ;\"; "ACTE IV"
    print #main.map, "place 692 70 ;\"; "~ Quêtes ~"
    print #main.map, "place 705 88 ;\"; QpackQ4;" / ";" 6"
end if

if QpackQ4 = 6 then packQ5 = 1
if packQ5 = 1 then #main.map, "drawbmp indicQ1 780 25"
if packQ5 = 2 then #main.map, "drawbmp indicQ2 780 25"
if Q1pack5 = 2 then QpackQ5 = QpackQ5 + 1
if Q2pack5 = 2 then QpackQ5 = QpackQ5 + 1
if Q3pack5 = 2 then QpackQ5 = QpackQ5 + 1
if Q4pack5 = 2 then QpackQ5 = QpackQ5 + 1
if Q5pack5 = 2 then QpackQ5 = QpackQ5 + 1
if Q6pack5 = 2 then QpackQ5 = QpackQ5 + 1
if packQ5 = 1 then
    print #main.map, "place 798 48 ;\"; "ACTE V"
    print #main.map, "place 792 70 ;\"; "~ Quêtes ~"
    print #main.map, "place 805 88 ;\"; QpackQ5;" / ";" 6"
end if

if PoP > 0 or PoS> 0 then #main.map, "drawbmp indic1 1160 120"


if version = 1 then
    print #main.map, "backcolor white;font Times New Roman 9; color black"
    print #main.map, "place 719 431 ;\"; "SOIGNEUSE"
    print #main.map, "place 689 357 ;\"; "ARMES"
    print #main.map, "place 597 373 ;\"; "ARMURES"
    print #main.map, "place 276 688 ;\"; "CARTE"
    print #main.map, "place 470 405 ;\"; "FORGERON"
    print #main.map, "place 971 512 ;\"; "TAVERNE"
    print #main.map, "place 181 496 ;\"; "MAROQUINERIE"
    print #main.map, "place 968 387 ;\"; "MAGE"
    print #main.map, "place 1147 442 ;\"; "LIBRAIRIE"
    print #main.map, "place 66 43 ;\"; "MENU"
end if

if version = 2 then
    print #main.map, "backcolor white;font Times New Roman 9; color black"
    print #main.map, "place 726 431 ;\"; "HEALER"
    print #main.map, "place 682 357 ;\"; "WEAPONS"
    print #main.map, "place 597 373 ;\"; "ARMORS"
    print #main.map, "place 280 688 ;\"; "MAP"
    print #main.map, "place 971 512 ;\"; "TAVERNE"
    print #main.map, "place 470 405 ;\"; "FORGERON"
    print #main.map, "place 968 387 ;\"; "MAGE"
    print #main.map, "place 1140 442 ;\"; "BOOKSTORE"
    print #main.map, "place 181 496 ;\"; "MAROQUINERIE"
    print #main.map, "place 66 43 ;\"; "MENU"
end if

r = 136 : v = 136 : b = 136
print #main.map, "font Times New Roman 8; color white;backcolor ";r;" ";v;" ";b
if version = 1 then print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1030 36 ;\"; name$; " - ";RACE$;" - Palier ";LvlDONJON
if version = 2 then print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1030 36 ;\"; name$; " - ";RACE$;" - Floor ";LvlDONJON
print #main.map, "backcolor white; color black"
print #main.map, "place 1120 160 ;\"; "Personnage"
print #main.map, "place 1137 171 ;\"; "info."

gosub [HPbarre]
gosub [DATAlife]
gosub [restorBarreHp]

'AIDEpnj = 0
print #main.map, "font Times New Roman 9"
print #main.map, "flush"

'notice noCLICK


wait

[GameStartMAINsecu2]
timer 0
[GameStartMAIN2]

if securityMULTItime = 0 then
    open "data\id\time.sao" for input as #save
    input #save, xTIMER
    CLOSE #save
    compteurTIME = compteurTIME + xTIMER : secuTIME = 1
    xTIMER = compteurTIME
    open "data\id\time.sao" for output as #save
    print #save, xTIMER
    print #save, secuTIME
    CLOSE #save
    run "Timer.exe"
end if
securityMULTItime = 1


noGAME = 0 : arena = 0 : donjon = 0 : city = 0 : camp = 1 : Inmap = 0 : secuINV = 0
WindowWidth = 1300 : WindowHeight = 800
UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/2)
if NumberFLOORmonster <= 0 then BOSS = 1
if load = 1 then graphicbox #main.map, 0, 0, WindowWidth, WindowHeight
if load = 1 then open "Sword Art Offline : Ascension [Build ";Version$;"]"for window_nf as #main
if load = 1 then #main, "trapclose [quit]"
load = 0
#main.map , "down; fill white"
#main.map, "when leftButtonDown [SimpleClickG1]"
print #main.map, "drawbmp mainCASTLE 0 0"
print #main.map, "background mainCASTLE"

'#main.map,"addsprite barre barre"
'#main.map,"spritexy barre 1000 24"
#main.map,"addsprite barre barre"
#main.map,"addsprite perso perso"
#main.map,"addsprite barre barre"
#main.map,"addsprite mapbutton mapbutton"
#main.map,"addsprite menubutton1 menubutton"
#main.map,"spritexy menubutton1 40 65"
#main.map,"addsprite menubutton2 menubutton"
#main.map,"spritexy menubutton2 130 65"
#main.map,"addsprite menubutton3 menubutton"
#main.map,"spritexy menubutton3 220 65"
#main.map,"addsprite menubutton4 menubutton"
#main.map,"spritexy menubutton4 310 65"
#main.map,"addsprite menubutton5 menubutton"
#main.map,"spritexy menubutton5 400 65"
#main.map,"spritexy mapbutton 1100 200"
#main.map,"addsprite mapbutton2 mapbutton2"
#main.map,"spritexy mapbutton2 1215 120"
'#main.map,"addsprite perso perso"
'#main.map,"spritexy perso 1100 100"
'#main.map,"SpriteVisible perso on"
'#main.map,"SpriteVisible mapbutton on"
'#main.map,"SpriteVisible mapbutton2 on"
'#main.map,"SpriteVisible barre on"
#main.map,"SpriteVisible menubutton1 on"
#main.map,"SpriteVisible menubutton2 on"
#main.map,"SpriteVisible menubutton3 on"
#main.map,"SpriteVisible menubutton4 on"
#main.map,"SpriteVisible menubutton5 on"

#main.map,"SpriteVisible barre off"
#main.map,"SpriteVisible perso off"
#main.map,"SpriteVisible mapbutton off"
#main.map,"SpriteVisible mapbutton2 off"

if ACTIVATIONvalrak = 1 then #main.map,"SpriteVisible Qp off"
ACTIVATIONvalrak = 0
if ACTIVATIONcampSANGI = 1 then #main.map,"SpriteVisible camp off"
ACTIVATIONcampSANGI = 0
if ACTIVATIONcamp2 = 1 then #main.map,"SpriteVisible camp2 off"
ACTIVATIONcamp2 = 0


[refreshMAP1]
#main.map "SetFocus; DrawSprites"
'if PoP > 0 or PoS> 0 then #main.map, "drawbmp indic1 1160 120"

gosub [HPbarre]
gosub [DATAlife]
gosub [restorBarreHp]

'r = 136 : v = 136 : b = 136
'print #main.map, "font Times New Roman 8; color white;backcolor ";r;" ";v;" ";b
'if version = 1 then print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1030 36 ;\"; name$; " - ";RACE$;" - Palier ";LvlDONJON
'if version = 2 then print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1030 36 ;\"; name$; " - ";RACE$;" - Floor ";LvlDONJON
'r = 24 : v = 134 : b = 56
'print #main.map, "size 1 ; color black;backcolor ";r;" ";v;" ";b
if version = 1 then
   ' print #main.map, "place 1125 265 ;\"; "CARTE"
   ' print #main.map, "backcolor white"
   ' print #main.map, "place 1120 160 ;\"; "Personnage"
   ' print #main.map, "place 1137 171 ;\"; "info."
end if
if version = 2 then
   ' print #main.map, "place 1130 265 ;\"; "MAP"
   ' print #main.map, "backcolor white"
   ' print #main.map, "place 1120 160 ;\"; "Character's"
   ' print #main.map, "place 1137 171 ;\"; "info."
end if

r = 12 : b = 102 : v = 49
print #main.map, "font Times New Roman 8; color white;backcolor ";r;" ";v;" ";b
print #main.map, "place 50 30 ;\"; "Population joueurs : ";POPplayers-NombrePlayerKILL ';"   |   P.K déclarés : ";POPplayersPK;"  (Victimes : ";POPplayersDEAD;")    |   Guildes : ";POPguildes;"  "
r = 18 : b = 138 : v = 66
print #main.map, "font Times New Roman 12;backcolor ";r;" ";v;" ";b
if version = 1 then
print #main.map, "place 415 100 ;\"; "Sauvegarder"
print #main.map, "place 55 100 ;\"; "Identifiants"
print #main.map, "place 235 100 ;\"; "Langue"
print #main.map, "place 325 100 ;\"; "Musique"
print #main.map, "place 145 100 ;\"; " (!) Aide"
end if
if version = 2 then
print #main.map, "place 415 100 ;\"; "Save data"
print #main.map, "place 55 100 ;\"; "Log in"
print #main.map, "place 235 100 ;\"; "Language"
print #main.map, "place 325 100 ;\"; "Music"
print #main.map, "place 145 100 ;\"; " (!) Help"
end if
print #main.map, "flush"
if login = 1 then goto [city]
wait

[regePassiv]
print #main.map, "backcolor black; color white;font Times New Roman 9"
if version = 1 then print #main.map, "place 910 210 ;\"; "Points de compétences disponibles :  "; PoS;"       "
if version = 2 then print #main.map, "place 910 210 ;\"; "Points of skills available :  "; PoS;"        "
wait
[passive1]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 1
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s1 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 590 285 ;\"; "Amélioration de la santé "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de vie de votre personnage \de ";int(20+(7*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez atteind. Plus \ce niveau sera élevé et plus les points de vie augmentés seront grands.\\Bonus de la capacité : +";int((20+(7*LvlDONJON))*lvlPASSIVE1);" PV"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE1
wait
[passive1b]
lvlPASSIVE1 = lvlPASSIVE1 + 1
PoS = PoS - 1
pv = pv + int(20+(7*LvlDONJON))
pvTOTAL = pvTOTAL + int(20+(7*LvlDONJON))
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de vie de votre personnage \de ";int(20+(7*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez atteind. Plus \ce niveau sera élevé et plus les points de vie augmentés seront grands.\\Bonus de la capacité : +";int((20+(7*LvlDONJON))*lvlPASSIVE1);" PV"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE1
goto [regePassiv]

[passive2]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 2
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s2 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 590 285 ;\"; "Amélioration de l'attaque "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de d'attaque de votre \personnage de ";int(5+(1*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteind. Plus ce niveau sera élevé et plus les points d'attaque augmentés seront grands.\\Bonus de la capacité : +";int((5+(1*LvlDONJON))*lvlPASSIVE2);" Dégâts"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE2
wait
[passive2b]
lvlPASSIVE2 = lvlPASSIVE2 + 1
PoS = PoS - 1
atk = atk + int(5+(1*LvlDONJON))
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de d'attaque de votre \personnage de ";int(5+(1*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteind. Plus ce niveau sera élevé et plus les points d'attaque augmentés seront grands.\\Bonus de la capacité : +";int((5+(1*LvlDONJON))*lvlPASSIVE2);" Dégâts"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE2
print #main.map, "font Times New Roman 9; color black;backcolor ";r;" ";v;" ";b
if version = 1 then print #main.map, "place 245 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk;"   "
if version = 2 then print #main.map, "place 245 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk;"   "
goto [regePassiv]

[passive3]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 3
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s3 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 585 285 ;\"; "Amélioration de la défense "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de défense de votre \personnage de ";int(5+(1*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteind. Plus ce niveau sera élevé et plus les points de défense augmentés seront grands.\\Bonus de la capacité : +";int((5+(1*LvlDONJON))*lvlPASSIVE3);" de défense"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE3
wait
[passive3b]
lvlPASSIVE3 = lvlPASSIVE3 + 1
PoS = PoS - 1
def = def + int(5+(1*LvlDONJON))
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de défense de votre \personnage de ";int(5+(1*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteind. Plus ce niveau sera élevé et plus les points de défense augmentés seront grands.\\Bonus de la capacité : +";int((5+(1*LvlDONJON))*lvlPASSIVE3);" de défense"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE3
print #main.map, "font Times New Roman 9; color black;backcolor ";r;" ";v;" ";b
if version = 2 then print #main.map, "place 265 615 ;\"; "Armor : "; def; " + "; BONUSdef;"        "
if version = 1 then print #main.map, "place 265 615 ;\"; "Armure : "; def; " + "; BONUSdef;"        "
goto [regePassiv]

[passive4]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 4
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s4 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 590 285 ;\"; "Amélioration de la science "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de science de votre \personnage de ";int(4+(1*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteind. Plus ce niveau sera élevé et plus les points de science augmentés seront grands.\\Bonus de la capacité : +";int((4+(1*LvlDONJON))*lvlPASSIVE4);" de science"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE4
wait
[passive4b]
lvlPASSIVE4 = lvlPASSIVE4 + 1
PoS = PoS - 1
pm = pm + int(4+(1*LvlDONJON))
pmTOTAL = pmTOTAL + int(4+(1*LvlDONJON))
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points de science de votre \personnage de ";int(4+(1*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteind. Plus ce niveau sera élevé et plus les points de science augmentés seront grands.\\Bonus de la capacité : +";int((4+(1*LvlDONJON))*lvlPASSIVE4);" de science"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE4
print #main.map, "font Times New Roman 9; color black;backcolor ";r;" ";v;" ";b
if version = 1 then print #main.map, "place 255 575 ;\"; "Points de Science : "; pm; "   "
if version = 2 then print #main.map, "place 255 575 ;\"; "Points of Science : "; pm; "   "
goto [regePassiv]

[passive5]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 5
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s5 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 515 285 ;\"; "Amélioration de l'expérience gagné en combat "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points d'expérience gagné de votre \personnage de ";int(14+(2*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteint. Plus ce niveau sera élevé et plus les points gagnés seront grands.\\Bonus de la capacité : +";int((14+(2*LvlDONJON))*lvlPASSIVE5);" d'expérience par combat"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE5
wait
[passive5b]
lvlPASSIVE5 = lvlPASSIVE5 + 1
PoS = PoS - 1
BONUSxp = BONUSxp + int(14+(2*LvlDONJON))
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement les points d'expérience gagné de votre \personnage de ";int(14+(2*LvlDONJON));". Ce bonus augmente en fonction du palier maximum que vous avez \atteint. Plus ce niveau sera élevé et plus les points gagnés seront grands.\\Bonus de la capacité : +";int((14+(2*LvlDONJON))*lvlPASSIVE5);" d'expérience par combat"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE5
goto [regePassiv]

[passive6]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 6
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s6 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 550 285 ;\"; "Amélioration de l'or gagné en combat "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement l'or gagné par votre personnage\de ";int(4+LvlDONJON);". Ce bonus augmente en fonction du palier maximum que vous avez atteind. \Plus ce niveau sera élevé et plus l'or gagnés seront grands.\\Bonus de la capacité : + ";int((4+LvlDONJON)*lvlPASSIVE6);" d'or par combat"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE6
wait
[passive6b]
lvlPASSIVE6 = lvlPASSIVE6 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement l'or gagné par votre personnage\de ";int(4+LvlDONJON);". Ce bonus augmente en fonction du palier maximum que vous avez atteind. \Plus ce niveau sera élevé et plus l'or gagnés seront grands.\\Bonus de la capacité : + ";int((4+LvlDONJON)*lvlPASSIVE6);" d'or par combat"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE6
goto [regePassiv]

[passive7]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 7
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s7 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 585 285 ;\"; "Amélioration du Vol-vie "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement le vol-vie de votre personnage de 5.\\Bonus de la capacité : + ";int(lvlPASSIVE7*5);" Pv regagnés par tour de combat"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE7
wait
[passive7b]
lvlPASSIVE7 = lvlPASSIVE7 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement le vol-vie de votre personnage de 5.\\Bonus de la capacité : + ";int(lvlPASSIVE7*5);" Pv regagnés par tour de combat"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE7
goto [regePassiv]

[passive8]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 8
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s8 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 585 285 ;\"; "Amélioration de la force "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement la force gagné par niveau de 1.\\Bonus de la capacité : + ";lvlPASSIVE8;" force par niveau"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE8
wait
[passive8b]
lvlPASSIVE8 = lvlPASSIVE8 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement la force gagné par niveau de 1.\\Bonus de la capacité : + ";lvlPASSIVE8;" force par niveau"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE8
goto [regePassiv]

[passive9]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 9
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s9 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 585 285 ;\"; "Amélioration de l'agilité "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement l'agilité gagné par niveau de 1.\\Bonus de la capacité : + ";lvlPASSIVE9;" agilité par niveau"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE9
wait
[passive9b]
lvlPASSIVE9 = lvlPASSIVE9 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement l'agilité gagné par niveau de 1.\\Bonus de la capacité : + ";lvlPASSIVE9;" agilité par niveau"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE9
goto [regePassiv]

[passive10]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 10
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s10 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 585 285 ;\"; "Amélioration de la science "
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement la science gagné par niveau de 1.\\Bonus de la capacité : + ";lvlPASSIVE10;" science par niveau"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE10
wait
[passive10b]
lvlPASSIVE10 = lvlPASSIVE10 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente définitivement la science gagné par niveau de 1.\\Bonus de la capacité : + ";lvlPASSIVE10;" science par niveau"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE10
goto [regePassiv]

[passive11]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 11
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s11 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 570 285 ;\"; "Réduction des dégâts des tueurs"
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue les dégâts reçus par les tueurs sur la carte de 20.\\Bonus de la capacité : - ";int(20*lvlPASSIVE11);" dégâts reçu par les joueurs "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE11
wait
[passive11b]
lvlPASSIVE11 = lvlPASSIVE11 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue les dégâts reçus par les tueurs sur la carte de 20.\\Bonus de la capacité : - ";int(20*lvlPASSIVE11);" dégâts reçu par les joueurs "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE11
goto [regePassiv]

[passive12]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 12
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s12 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 570 285 ;\"; "Réduction des dégâts des boss"
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue les dégâts reçus par les boss dans le donjon de 20.\\Bonus de la capacité : - ";int(20*lvlPASSIVE12);" dégâts reçu par les Boss"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE12
wait
[passive12b]
lvlPASSIVE12 = lvlPASSIVE12 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue les dégâts reçus par les boss dans le donjon de 20.\\Bonus de la capacité : - ";int(20*lvlPASSIVE12);" dégâts reçu par les Boss"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE12
goto [regePassiv]

[passive13]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 13
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s13 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 635 285 ;\"; "Résurection"
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous permet de revivre si vous n'êtes pas mort pendant\un certains temps. Tuer des monstres vous permet de recharger cette capacité. Plus \vous augmentez cette capacité et plus haut sera la vie rendue.\\Bonus de la capacité : 100 Monstres à tuer (compteur actuel : ";compteurPASSIVE13;")\Vie rendu : ";int(1+100*lvlPASSIVE13);" PV après résurection"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE13
wait
[passive13b]
lvlPASSIVE13 = lvlPASSIVE13 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous permet de revivre si vous n'êtes pas mort pendant\un certains temps. Tuer des monstres vous permet de recharger cette capacité. Plus \vous augmentez cette capacité et plus haut sera la vie rendue.\\Bonus de la capacité : 100 Monstres à tuer\Vie rendu : ";int(1+100*lvlPASSIVE13);" PV après résurection"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE13
goto [regePassiv]

[passive14]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 14
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s14 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 570 285 ;\"; "Amélioration des équipements"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE14 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous augmente le niveau d'amélioration de votre équipement.\Si un objet est de niveau 5, un niveau de cette capacité ajoutera 1 niveau par\amélioration de façon définitive.\\Bonus de la capacité : niveau d'amélioration d'équipement ajouté de 1"
if lvlPASSIVE14 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous augmente le niveau d'amélioration de votre équipement.\Si un objet est de niveau 5, un niveau de cette capacité ajoutera 1 niveau par\amélioration de façon définitive.\\Bonus de la capacité : niveau d'amélioration d'équipement ajouté de ";lvlPASSIVE14
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE14
wait
[passive14b]
lvlPASSIVE14 = lvlPASSIVE14 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous augmente le niveau d'amélioration de votre équipement.\Si un objet est de niveau 5, un niveau de cette capacité ajoutera 1 niveau par\amélioration de façon définitive.\\Bonus de la capacité : niveau d'amélioration d'équipement ajouté de ";lvlPASSIVE14;"   "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE14
goto [regePassiv]

[passive15]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 15
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s15 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 555 285 ;\"; "Diminution coût d'améliorations"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE15 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue le coût des amélioraitons de vos équipements.\Cette compétence augmentera en fonction du niveau de son amélioration.\\Bonus de la capacité : diminution du cout d'amélioration de 5 d'or"
if lvlPASSIVE15 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue le coût des amélioraitons de vos équipements.\Cette compétence augmentera en fonction du niveau de son amélioration.\\Bonus de la capacité : diminution du cout d'amélioration de ";(lvlPASSIVE15*(5*lvlPASSIVE15));" d'or"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE15
wait
[passive15b]
lvlPASSIVE15 = lvlPASSIVE15 + 1
'reducUP = reducUP + int(lvlPASSIVE15*(5*lvlPASSIVE15))
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité diminue le coût des amélioraitons de vos équipements.\Cette compétence augmentera en fonction du niveau de son amélioration.\\Bonus de la capacité : diminution du cout d'amélioration ";(lvlPASSIVE15*(5*lvlPASSIVE15));" d'or";"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE15
goto [regePassiv]

[passive16]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 16
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s16 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 585 285 ;\"; "Boost des potions de vie"
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente l'éfficacité de vos potions en combat. Cette \compétence augmentera en fonction du niveau de son amélioration.\\Bonus de la capacité : augmentation de la vie regagné par potions ";int(11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1));" pv"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE16
wait
[passive16b]
lvlPASSIVE16 = lvlPASSIVE16 + 1
'popoUPpv = popoUPpv + int(11*lvlPASSIVE16*lvlPASSIVE16)
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente l'éfficacité de vos potions en combat. Cette \compétence augmentera en fonction du niveau de son amélioration.\\Bonus de la capacité : augmentation de la vie regagné par potions ";int(11*lvlPASSIVE16*lvlPASSIVE16);" pv";"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE16
goto [regePassiv]

[passive17]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 17
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s17 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 615 285 ;\"; "Chef de guilde"
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente le nombre de compagnons que vous pouvez accueillir \dans votre guilde. Il faut 10 niveaux pour ajouter 1 compagnon.\\Bonus de la capacité : nombre maximal de compagnon dans votre guilde ";int(lvlPASSIVE17/10);"\Il vous faut encore ";int(10-lvlPASSIVE17);" pour augmenter la taille de votre guilde de 1 place."
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE17
wait
[passive17b]
lvlPASSIVE17 = lvlPASSIVE17 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente le nombre de compagnons que vous pouvez accueillir \dans votre guilde. Il faut 10 niveaux pour ajouter 1 compagnon.\\Bonus de la capacité : nombre maximal de compagnon dans votre guilde ";int(lvlPASSIVE17/10);"\Il vous faut encore ";int(10-lvlPASSIVE17);" pour augmenter la taille de votre guilde de 1 place.     "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE17
goto [regePassiv]


[passive18]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 18
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s18 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 610 285 ;\"; "Honneur et force"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE18 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente les caractéristique de vos compagnons (pv, atk, def). \\Points de vie + 8\Attaque + 4\Défense + 2"
if lvlPASSIVE18 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente les caractéristique de vos compagnons (pv, atk, def). \\Points de vie + ";int(8*lvlPASSIVE18);"\Attaque + ";int(4*lvlPASSIVE18);"\Défense + ";int(2*lvlPASSIVE18)
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE18
wait
[passive18b]
lvlPASSIVE18 = lvlPASSIVE18 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente les caractéristique de vos compagnons (pv, atk, def). \\Points de vie + ";int(8*lvlPASSIVE18);"\Attaque + ";int(4*lvlPASSIVE18);"\Défense + ";int(2*lvlPASSIVE18);"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE18
goto [regePassiv]

[passive19]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 19
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s19 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 610 285 ;\"; "Rage du berseker"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE19 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente vos dégâts fortement mais réduit tout autant \votre défense.\\Bonus d'attaque + 10 % \Malus en défense - 10 %"
if lvlPASSIVE19 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente vos dégâts fortement mais réduit tout autant \votre défense.\\Bonus d'attaque + ";int(8+(2*lvlPASSIVE19));" % \Malus en défense - ";int(8+(2*lvlPASSIVE19));" %"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE19
wait
[passive19b]
lvlPASSIVE19 = lvlPASSIVE19 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité augmente vos dégâts fortement mais réduit tout autant \votre défense.\\Bonus d'attaque + ";int(8+(2*lvlPASSIVE19));" % \Malus en défense - ";int(8+(2*lvlPASSIVE19));" %";"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE19
goto [regePassiv]

[passive20]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 20
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s20 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 610 285 ;\"; "Barrière spirituelle"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE20 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère à votre personnage une barrière spirituelle qui bloque \les dégâts. Une fois cette barrière détruite, elle est régénéré en gagnant des niveaux\ou en allant se faire soigner chez la guérisseuse.\\Dégâts absorbés : 29"
if lvlPASSIVE20 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère à votre personnage une barrière spirituelle qui bloque \les dégâts. Une fois cette barrière détruite, elle est régénéré en gagnant des niveaux\ou en allant se faire soigner chez la guérisseuse.\\Dégâts absorbés : ";int(20+(9*lvlPASSIVE20*lvlPASSIVE20))
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE20
wait
[passive20b]
lvlPASSIVE20 = lvlPASSIVE20 + 1
bouclier = int(20+(9*lvlPASSIVE20*lvlPASSIVE20))
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère à votre personnage une barrière spirituelle qui bloque \les dégâts. Une fois cette barrière détruite, elle est régénéré en gagnant des niveaux\ou en allant se faire soigner chez la guérisseuse.\\Dégâts absorbés : ";int(20+(9*lvlPASSIVE20*lvlPASSIVE20));"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE20
goto [regePassiv]

[passive21]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 21
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s21 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 630 285 ;\"; "Conquérant"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE21 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère un bonus contre les autres guildes. Ce bonus \s'applique à tous les joueurs de votre guilde.\\dégâts et défense renforcé : 1 %"
if lvlPASSIVE21 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère un bonus contre les autres guildes. Ce bonus \s'applique à tous les joueurs de votre guilde.\\dégâts et défense renforcé : ";int(1*lvlPASSIVE21);" %"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE21
wait
[passive21b]
lvlPASSIVE21 = lvlPASSIVE21 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère un bonus contre les autres guildes. Ce bonus \s'applique à tous les joueurs de votre guilde.\\dégâts et défense renforcé : ";int(1*lvlPASSIVE21);" %";"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE21
goto [regePassiv]

[passive22]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 22
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s22 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 610 285 ;\"; "Impôt de guerre"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE22 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous donne une somme d'or plus importante pour chaque joueur \(de guilde ou non) tuer. Ce bonus augmente en fonction du palier.\\Taxe prélevé : 550 d'or"
if lvlPASSIVE22 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous donne une somme d'or plus importante pour chaque joueur \(de guilde ou non) tuer. Ce bonus augmente en fonction du palier.\\Taxe prélevé : ";int(400+150*lvlPASSIVE22*LvlDONJON); " d'or"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE22
wait
[passive22b]
lvlPASSIVE22 = lvlPASSIVE22 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité vous donne une somme d'or plus importante pour chaque joueur \(de guilde ou non) tuer. Ce bonus augmente en fonction du palier.\\Taxe prélevé : ";int(400+150*lvlPASSIVE22*LvlDONJON); " d'or";"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE22
goto [regePassiv]

[passive23]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 23
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s23 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 620 285 ;\"; "Coup critique"
print #main.map, "font Times New Roman 10;backcolor white; color black"
if lvlPASSIVE23 = 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère à votre personnage la possibilité de multiplier les dégâts \de votre coup.\\Chance de critique : 5 % \Multiplicateur : x2"
if lvlPASSIVE23 > 0 then print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère à votre personnage la possibilité de multiplier les dégâts \de votre coup.\\Chance de critique : ";4.9+0.1*lvlPASSIVE23;" %";"\Multiplicateur : x";1.8+0.2*lvlPASSIVE23
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE23
wait
[passive23b]
lvlPASSIVE23 = lvlPASSIVE23 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère à votre personnage la possibilité de multiplier les dégâts \de votre coup.\\Chance de critique : ";4.9+0.1*lvlPASSIVE23;" %";"\Multiplicateur : x";1.8+0.2*lvlPASSIVE23;"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE23
goto [regePassiv]

[passive24]
gosub [refreshINVENTskill]
TakeCareSKILL = 1
numberSKILL = 24
print #main.map, "drawbmp cadreSKILL 405 235"
print #main.map, "drawbmp s24 430 255"
print #main.map, "font Times New Roman 16;backcolor white; color black"
print #main.map, "place 655 285 ;\"; "Mineur"
print #main.map, "place 617 490 ;\"; "AMELIORER"
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère un bonus pour trouver les différents fragments sur la carte.\Ce bonus s'applique au fragment de feu et de mana de stade 1.\Au dessus du niveau 100, cette capacité s'applique aussi au stade 2.\Au dessus du niveau 500, cette capacité s'applique aussi au stade 3.\\Augmentation des chance de trouver un fragment stade 1 : + ";int(1+0.5*lvlPASSIVE24);" %"
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE24
wait
[passive24b]
lvlPASSIVE24 = lvlPASSIVE24 + 1
PoS = PoS - 1
print #main.map, "font Times New Roman 10;backcolor white; color black"
print #main.map, "place 430 345 ;\"; "Descriptif : Cette capacité confère un bonus pour trouver les différents fragments sur la carte.\Ce bonus s'applique au fragment de feu et de mana de stade 1.\Au dessus du niveau 100, cette capacité s'applique aussi au stade 2.\Au dessus du niveau 500, cette capacité s'applique aussi au stade 3.\\Augmentation des chance de trouver un fragment stade 1 : + ";int(1+0.5*lvlPASSIVE24);" %";"        "
print #main.map, "place 660 305 ;\"; "Niveau : ";lvlPASSIVE22
goto [regePassiv]



[Character]
#main.map , "cls"
#main.map , "backcolor white"
#main.map , "when leftButtonDown [SimpleClickINVENTAIRE]"
#main.map , "down"

print #main.map, "drawbmp mainINV 0 0"
print #main.map, "background mainINV"
print #main.map, "drawbmp select 650 335"

if sexe = 1 then
    if campagne$= "Warrior" then print #main.map, "drawbmp miniGUERRIERhomme 220 150"
    if campagne$= "Tank" then print #main.map, "drawbmp miniTANKhomme 200 150"
    if campagne$= "Archer" then print #main.map, "drawbmp miniARCHERhomme 245 165"
    if campagne$= "Artisan" then print #main.map, "drawbmp miniARTISANhomme 230 150"
    if campagne$= "HEALER" then print #main.map, "drawbmp miniSOIGNEURhomme 215 155"
end if
if sexe = 2 then
    if campagne$= "Warrior" then print #main.map, "drawbmp miniGUERRIERfemme 225 150"
    if campagne$= "Tank" then print #main.map, "drawbmp miniTANKfemme 230 150"
    if campagne$= "Archer" then print #main.map, "drawbmp miniARCHERfemme 235 150"
    if campagne$= "Artisan" then print #main.map, "drawbmp miniARTISANfemme 245 150"
    if campagne$= "HEALER" then print #main.map, "drawbmp miniSOIGNEURfemme 245 150"
end if

r = 100 : v =100 : b = 100
print #main.map, "font Times New Roman 10; color black;backcolor ";r;" ";v;" ";b


if version = 1 then
    print #main.map, "place 740 270 ;\"; "STATISTIQUES"
    print #main.map, "place 740 315 ;\"; "OBJETS"
    print #main.map, "place 740 355 ;\"; "COMPETENCES"
    print #main.map, "place 740 395 ;\"; "EQUIPEMENT"
    print #main.map, "place 740 435 ;\"; "HAUTS FAITS"

    print #main.map, "font Times New Roman 9; color black;backcolor white"
    print #main.map, "place 170 190 ;\"; "Palier : "; lvlDONJONtota/3
    r = 215: v =215 : b = 215
    print #main.map, "backcolor ";r;" ";v;" ";b
    print #main.map, "place 150 520 ;\"; "Niveau : ";lvl
    if xpTOTAL < 99999 then xpTOTAL$ = "";str$(xpTOTAL)
    if xpTOTAL > 99999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000));" k"
    if xpTOTAL > 99999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000));" m"
    if xpTOTAL > 99999999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000000));" M"
    if xp < 99999 then xp$ = "";str$(xp)
    if xp > 99999 then xp$ = "";str$(int(xp/1000));" k"
    if xp > 99999999 then xp$ = "";str$(int(xp/1000000));" m"
    if xp > 99999999999 then xp$ = "";str$(int(xp/1000000000));" M"
    'print #main.map, "font Times New Roman 7; color black"
    print #main.map, "place 150 535 ;\"; "Expérience : "; xp$; " / "; xpTOTAL$
    print #main.map, "font Times New Roman 9; color black"

    print #main.map, "place 150 560 ;\"; "Points de vie : "; pv; " / ";pvTOTAL
    print #main.map, "place 150 575 ;\"; "Points de Science : "; pm
    print #main.map, "place 150 615 ;\"; "Armure : "; def; " + "; BONUSdef
    print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
    print #main.map, "place 185 660 ;\"; "Agilité : "
    print #main.map, "place 185 675 ;\"; "Force : "
    print #main.map, "place 185 690 ;\"; "Science : "
    print #main.map, "font Times New Roman 9; color black"
    if PoP > 0 then print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  ";PoP
    print #main.map, "place 250 660 ;\"; Agility
    print #main.map, "place 250 675 ;\"; Strength
    print #main.map, "place 250 690 ;\"; intelligence
    print #main.map, "backcolor black; color white"
    if PoS > 0 then print #main.map, "place 910 210 ;\"; "Points de compétences disponibles :  "; PoS
end if

if version = 2 then
    print #main.map, "place 740 270 ;\"; "STATISTICS"
    print #main.map, "place 740 312 ;\"; "ITEMS"
    print #main.map, "place 740 355 ;\"; "SKILLS"
    print #main.map, "place 740 395 ;\"; "EQUIPMENT"
    print #main.map, "place 740 435 ;\"; "HAUTS FAITS"

    print #main.map, "font Times New Roman 9; color black;backcolor white"
    print #main.map, "place 170 190 ;\"; "Floor : "; lvlDONJONtota/3
    r = 215: v =215 : b = 215
    print #main.map, "backcolor ";r;" ";v;" ";b
    print #main.map, "place 150 520 ;\"; "Level : ";lvl
    if xpTOTAL < 99999 then xpTOTAL$ = "";str$(xpTOTAL)
    if xpTOTAL > 99999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000));" k"
    if xpTOTAL > 99999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000));" m"
    if xpTOTAL > 99999999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000000));" M"
    if xp < 99999 then xp$ = "";str$(xp)
    if xp > 99999 then xp$ = "";str$(int(xp/1000));" k"
    if xp > 99999999 then xp$ = "";str$(int(xp/1000000));" m"
    if xp > 99999999999 then xp$ = "";str$(int(xp/1000000000));" M"
    print #main.map, "place 150 535 ;\"; "Experience : "; xp$; " / "; xpTOTAL$
    print #main.map, "place 150 560 ;\"; "Points of Life : "; pv; " / ";pvTOTAL
    print #main.map, "place 150 575 ;\"; "Points of Science : "; pm
    print #main.map, "place 150 615 ;\"; "Armor : "; def; " + "; BONUSdef
    print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    print #main.map, "place 185 660 ;\"; "Agility : "
    print #main.map, "place 185 675 ;\"; "Strength : "
    print #main.map, "place 185 690 ;\"; "Science : "
    print #main.map, "font Times New Roman 9; color black"
    if PoP > 0 then print #main.map, "place 150 635 ;\"; "Points of capacities  :  "; PoP
    print #main.map, "place 250 660 ;\"; Agility
    print #main.map, "place 250 675 ;\"; Strength
    print #main.map, "place 250 690 ;\"; intelligence
    print #main.map, "backcolor black; color white"
    if PoS > 0 then print #main.map, "place 910 210 ;\"; "Points of skills available :  "; PoS
end if

print #main.map, "backcolor white;color black;font Times New Roman 10"

if capacity$ = "Strength" and version = 1 then capacity$ = "Force"
if capacity$ = "Force" and version = 2 then capacity$ = "Strength"
if capacity$ = "Agility" and version = 1 then capacity$ = "Agilité"
if capacity$ = "Agilité" and version = 2 then capacity$ = "Agility"

        if systemSAV = 1 then print #main.map, "drawbmp sav1 180 200"
        if systemSAV = 0 then print #main.map, "drawbmp sav2 180 200"

print #main.map, "place 150 107 ;\"; name$;" : "; RACE$ ; " [ ";capacity$;" ]"
print #main.map, "color black;font Times New Roman 8"


    if TYPEatkEQUIP$ <> "" then
        gosub [pictureARME0]
        print #main.map, "drawbmp ";namePICTUREarme$;" 390 230"
        print #main.map, "place 395 298 ;\";"+ "; BONUSatk; " [ ";lvlITEM1;" ]"
    end if
    if TYPEdefEQUIP$ <> "" then
        gosub [pictureARMURE0]
        print #main.map, "drawbmp ";namePICTUREarmure$;" 390 320"
        print #main.map, "place 395 388 ;\"; "+ ";BONUSdef; " [ ";lvlITEM2;" ]"
    end if


#main.map, "flush"
if secuINV = 0 then goto [invINI]
wait

[noticeAGI]
if version = 1 then notice " " + chr$(13) + "Astuce : L'agilité augmente les points de défense du personnage. (augmente seulement l'attaque pour les archers) "
if version = 2 then notice " " + chr$(13) + "Trick : Agility up the character's armor. (up also damages for archers) "
wait
[noticeINT]
if version = 1 then notice " " + chr$(13) + "Astuce : La Science donne plus d'exp en combat et améliore vos l'efficassité de vos potions. (augmente aussi l'attaque pour les mages et les marchands) "
if version = 2 then notice " " + chr$(13) + "Trick : Science give more exp into battle and upgrade your potion's power. (up also damages for mages and marchands) "
wait
[noticeSTR]
if version = 1 then notice " " + chr$(13) + "Astuce : La force augmente les points de santé du personnage. (augmente aussi l'attaque pour les guerriers et les tanks) "
if version = 2 then notice " " + chr$(13) + "Trick : The strength up the character's life points. (up also damages for warriors and tanks) "
wait

[SimpleClickINVENTAIRE]
    mX = MouseX
    mY = MouseY
compteurCLICK = compteurCLICK + 1
'notice mX;"/";mY
    timer 0

    if mX>1020 and mX<1080 and mY>600 and mY<660 then
        SECUmusic = 0 : TakeCareSKILL = 0
        if Inmap = 1 then goto [Arena0]
        if city = 0 then goto [GameStartMAINsecu2]
        goto [city]
    end if

    if CLICKinv = 4 then
        if mX>900 and mX<915 and mY>230 and mY<245 then notice " " + chr$(13) +  "Nombre total de monstres tués par vous depuis le début du jeu."
        if mX>900 and mX<915 and mY>250 and mY<265 then notice " " + chr$(13) +  "Nombre total de joueur tués par vous depuis le début du jeu."
        if mX>900 and mX<915 and mY>270 and mY<285 then notice " " + chr$(13) +  "Nombre total de boss de palier que vous avez tués depuis le début du jeu."
        if mX>900 and mX<915 and mY>290 and mY<305 then notice " " + chr$(13) +  "Nombre total d'or que vous avez récolté depuis le début du jeu."
        if mX>900 and mX<915 and mY>310 and mY<325 then notice " " + chr$(13) +  "Nombre d'objets acheté depuis le debut du jeu."
        if mX>900 and mX<915 and mY>330 and mY<345 then notice " " + chr$(13) +  "Nombre d'amélioration de vos équipements depuis le début du jeu."
        if mX>900 and mX<915 and mY>350 and mY<365 then notice " " + chr$(13) +  "Nombre de quête mener a leur terme depuis le début du jeu."
        if mX>900 and mX<915 and mY>370 and mY<385 then notice " " + chr$(13) +  "Nombre de fois que vous améliorez votre sac a potion ou parchemin depuis le début du jeu."
        if mX>900 and mX<915 and mY>390 and mY<405 then notice " " + chr$(13) +  "Nombre de fois ou vous avez améliorez des capacitées."
        if mX>900 and mX<915 and mY>410 and mY<425 then notice " " + chr$(13) +  "Nombre de fragments et de potions récoltés depuis le début du jeu."
        if mX>900 and mX<915 and mY>430 and mY<445 then notice " " + chr$(13) +  "Nombre de fois ou vous avez échapé a la mort depuis le début du jeu."
        if mX>900 and mX<915 and mY>450 and mY<465 then notice " " + chr$(13) +  "Nombre de fois ou vous avez parlez avec un PNJ dans la taverne depuis le début du jeu."
    end if

    if TakeCareSKILL = 1 then
    if PoS>0 and numberSKILL = 1 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive1b]
    if PoS>0 and numberSKILL = 2 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive2b]
    if PoS>0 and numberSKILL = 3 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive3b]
    if PoS>0 and numberSKILL = 4 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive4b]
    if PoS>0 and numberSKILL = 5 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive5b]
    if PoS>0 and numberSKILL = 6 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive6b]
    if PoS>0 and numberSKILL = 7 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive7b]
    if PoS>0 and numberSKILL = 8 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive8b]
    if PoS>0 and numberSKILL = 9 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive9b]
    if PoS>0 and numberSKILL = 10 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive10b]
    if PoS>0 and numberSKILL = 11 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive11b]
    if PoS>0 and numberSKILL = 12 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive12b]
    if PoS>0 and numberSKILL = 13 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive13b]
    if PoS>0 and numberSKILL = 14 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive14b]
    if PoS>0 and numberSKILL = 15 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive15b]
    if PoS>0 and numberSKILL = 16 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive16b]
    if PoS>0 and numberSKILL = 17 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive17b]
    if PoS>0 and numberSKILL = 18 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive18b]
    if PoS>0 and numberSKILL = 19 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive19b]
    if PoS>0 and numberSKILL = 20 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive20b]
    if PoS>0 and numberSKILL = 21 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive21b]
    if PoS>0 and numberSKILL = 22 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive22b]
    if PoS>0 and numberSKILL = 23 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive23b]
    if PoS>0 and numberSKILL = 24 and mX>600 and mX<750 and mY>460 and mY<500 then goto [passive24b]
    if mX<405 or mX>940 or mY<235 or mY>535 then
        TakeCareSKILL = 0
        secuINV = 0
        goto [Character]
    end if
    wait
    end if

    print #main.map, "font Times New Roman 9; color black"
    if mX>160 and mX<176 and mY>650 and mY<665 then goto [noticeAGI]
    if mX>160 and mX<176 and mY>665 and mY<680 then goto [noticeSTR]
    if mX>160 and mX<176 and mY>680 and mY<695 then goto [noticeINT]

    if mX>415 and mX<430 and mY>650 and mY<665 then goto [PoPagi]
    if mX>415 and mX<430 and mY>665 and mY<680 then goto [PoPstr]
    if mX>415 and mX<430 and mY>680 and mY<695 then goto [PoPint]

    if mX>440 and mX<460 and mY>640 and mY<660 then goto [PoPagi2]
    if mX>440 and mX<460 and mY>660 and mY<680 then goto [PoPstr2]
    if mX>440 and mX<460 and mY>680 and mY<700 then goto [PoPint2]

    print #main.map, "size 22 ; color black"
    print #main.map, "line "; 660; " "; 200; " "; 660; " "; 500
    if mX>690 and mX<840 and mY>245 and mY<280 then CLICKinv = 0
    if mX>690 and mX<840 and mY>285 and mY<325 then CLICKinv = 1
    if mX>690 and mX<840 and mY>330 and mY<365 then CLICKinv = 2
    if mX>690 and mX<840 and mY>370 and mY<410 then CLICKinv = 3
    if mX>690 and mX<840 and mY>415 and mY<450 then CLICKinv = 4

    goto [invINI2]

    [invINI]
    CLICKinv = 2
    [invINI2]
    secuINV = 1
    if CLICKinv = 0 then
    gosub [refreshINVENT]

    money$ = ""
    money2$ = str$(money)
    if money > 99999 then
        money$ = "k"
        money2$ = str$(int(money/1000))
    end if
    if money > 9999999 then
        money$ = "m"
        money2$ = str$(int(money/1000000))
    end if
    if money > 9999999999 then
        money$ = "M"
        money2$ = str$(int(money/1000000000))
    end if

    Tmoney$ = ""
    Tmoney2$ = str$(goldTOTAL)
    if goldTOTAL > 99999 then
        Tmoney$ = "k"
        Tmoney2$ = str$(int(goldTOTAL/1000))
    end if
    if goldTOTAL > 9999999 then
        Tmoney$ = "m"
        Tmoney2$ = str$(int(goldTOTAL/1000000))
    end if
    if goldTOTAL > 9999999999 then
        Tmoney$ = "M"
        Tmoney2$ = str$(int(goldTOTAL/1000000000))
    end if

    print #main.map, "drawbmp select 650 250"
    [timerR1I]
    open "data\id\time.sao" for input as #save
    input #save, xTIMER
    CLOSE #save
    compteurTIME = xTIMER
    print #main.map, "font Times New Roman 9;backcolor white; color black"
    if version = 1 then
    print #main.map, "place 920 250 ;\"; "Début de l'aventure : ";aDate$ ';"  (";time$;")"
    print #main.map, "place 920 265 ;\"; "Temps de jeu : ";int(compteurTIME/60);" minutes"
    print #main.map, "place 920 280 ;\"; "Nombre de click souris : ";int(compteurCLICK)
    print #main.map, "place 920 305 ;\"; "Monstres tués :  "; NombreEnnemiKILL
    print #main.map, "place 920 320 ;\"; "Boss tués :  "; NombreBossKILL
    print #main.map, "place 920 335 ;\"; "Joueurs tués :  "; NombrePlayerKILL
    print #main.map, "place 920 360 ;\"; "Total d'or récupéré : "; Tmoney2$; " "; Tmoney$
    print #main.map, "place 920 375 ;\"; "Or disponible : "; money2$;" ";money$
    end if
    if version = 2 then
    print #main.map, "place 920 250 ;\"; "Starting day of adventure : ";aDate$;"  (";time$;")"
    print #main.map, "place 920 265 ;\"; "Time played : ";int(compteurTIME/60);" minutes"
    print #main.map, "place 920 280 ;\"; "Nombre of mouse click : ";int(compteurCLICK)
    print #main.map, "place 920 290 ;\"; "Monsters killed :  "; NombreEnnemiKILL
    print #main.map, "place 920 305 ;\"; "Boss killed :  "; NombreBossKILL
    print #main.map, "place 920 320 ;\"; "Players killed :  "; NombrePlayerKILL
    print #main.map, "place 920 345 ;\"; "Total gold taked : "; Tmoney2$; " "; Tmoney$
    print #main.map, "place 920 360 ;\"; "Available gold : "; money2$;" ";money$
    end if
    timer 1000, [timerR1I]
    wait
    end if

    timer 0
    if CLICKinv = 1 then
    gosub [refreshINVENT]
    if PotionLittleHP>0 then
        print #main.map, "drawbmp p1 915 235"
        if version = 1 then print #main.map, "place 945 250 ;\"; "Petite : ";PotionLittleHP
        if version = 2 then print #main.map, "place 945 250 ;\"; "Little : ";PotionLittleHP
    end if

    if PotionMediumHP>0 and PotionLittleHP <= 0 then
        print #main.map, "drawbmp p2 915 235"
        if version = 1 then print #main.map, "place 945 250 ;\"; "Moyenne : ";PotionMediumHP
        if version = 2 then print #main.map, "place 945 250 ;\"; "Medium : ";PotionMediumHP
    end if
        if PotionMediumHP>0 and PotionLittleHP > 0 then
            print #main.map, "drawbmp p2 915 275"
            if version = 1 then print #main.map, "place 945 290 ;\"; "Moyenne : ";PotionMediumHP
            if version = 2 then print #main.map, "place 945 290 ;\"; "Medium : ";PotionMediumHP
        end if

    if PotionBigHP>0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 then
        print #main.map, "drawbmp p3 915 235"
        if version = 1 then print #main.map, "place 945 250 ;\"; "Grande : ";PotionBigHP
        if version = 2 then print #main.map, "place 945 250 ;\"; "Large : ";PotionBigHP
    end if
        if PotionBigHP>0 and PotionMediumHP <= 0 and PotionLittleHP > 0 then
            print #main.map, "drawbmp p3 915 275"
            if version = 1 then print #main.map, "place 945 290 ;\"; "Grande : ";PotionBigHP
            if version = 2 then print #main.map, "place 945 290 ;\"; "Large : ";PotionBigHP
        end if
        if PotionBigHP>0 and PotionMediumHP > 0 and PotionLittleHP <= 0 then
            print #main.map, "drawbmp p3 915 275"
            if version = 1 then print #main.map, "place 945 290 ;\"; "Grande : ";PotionBigHP
            if version = 2 then print #main.map, "place 945 290 ;\"; "Large : ";PotionBigHP
        end if
            if PotionBigHP>0 and PotionMediumHP > 0 and PotionLittleHP > 0 then
                print #main.map, "drawbmp p3 915 314"
                if version = 1 then print #main.map, "place 945 332 ;\"; "Grande : ";PotionBigHP
                if version = 2 then print #main.map, "place 945 332 ;\"; "Large : ";PotionBigHP
            end if

    if PotionBig2HP>0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 and PotionBigHP <=0 then
        print #main.map, "drawbmp p4 915 235"
        if version = 1 then print #main.map, "place 945 250 ;\"; "Géante : ";PotionBig2HP
        if version = 2 then print #main.map, "place 945 250 ;\"; "Giante : ";PotionBig2HP
    end if
        if PotionBig2HP>0 and PotionLittleHP > 0 and PotionMediumHP <= 0 and PotionBigHP <=0 then
            print #main.map, "drawbmp p4 915 275"
            if version = 1 then print #main.map, "place 945 290 ;\"; "Géante : ";PotionBig2HP
            if version = 2 then print #main.map, "place 945 290 ;\"; "Giante : ";PotionBig2HP
        end if
        if PotionBig2HP>0 and PotionLittleHP <= 0 and PotionMediumHP > 0 and PotionBigHP <=0 then
            print #main.map, "drawbmp p4 915 275"
            if version = 1 then print #main.map, "place 945 290 ;\"; "Géante : ";PotionBig2HP
            if version = 2 then print #main.map, "place 945 290 ;\"; "Giante : ";PotionBig2HP
        end if
        if PotionBig2HP>0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 and PotionBigHP > 0 then
            print #main.map, "drawbmp p4 915 275"
            if version = 1 then print #main.map, "place 945 290 ;\"; "Géante : ";PotionBig2HP
            if version = 2 then print #main.map, "place 945 290 ;\"; "Giante : ";PotionBig2HP
        end if
            if PotionBig2HP>0 and PotionLittleHP <= 0 and PotionMediumHP > 0 and PotionBigHP > 0 then
                print #main.map, "drawbmp p4 915 314"
                if version = 1 then print #main.map, "place 945 332 ;\"; "Géante : ";PotionBig2HP
                if version = 2 then print #main.map, "place 945 332 ;\"; "Giante : ";PotionBig2HP
            end if
            if PotionBig2HP>0 and PotionLittleHP > 0 and PotionMediumHP > 0 and PotionBigHP <= 0 then
                print #main.map, "drawbmp p4 915 314"
                if version = 1 then print #main.map, "place 945 332 ;\"; "Géante : ";PotionBig2HP
                if version = 2 then print #main.map, "place 945 332 ;\"; "Giante : ";PotionBig2HP
            end if
            if PotionBig2HP>0 and PotionLittleHP > 0 and PotionMediumHP <= 0 and PotionBigHP > 0 then
                print #main.map, "drawbmp p4 915 314"
                if version = 1 then print #main.map, "place 945 332 ;\"; "Géante : ";PotionBig2HP
                if version = 2 then print #main.map, "place 945 332 ;\"; "Giante : ";PotionBig2HP
            end if
                if PotionBig2HP>0 and PotionLittleHP > 0 and PotionMediumHP > 0 and PotionBigHP > 0 then
                    print #main.map, "drawbmp p4 915 356"
                    if version = 1 then print #main.map, "place 945 375 ;\"; "Géante : ";PotionBig2HP
                    if version = 2 then print #main.map, "place 945 375 ;\"; "Giante : ";PotionBig2HP
                end if

    if PotionBig3HP>0 and PotionBig2HP <= 0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 and PotionBigHP <= 0 then
        print #main.map, "drawbmp p5 915 235"
        print #main.map, "place 945 250 ;\"; "Max : ";PotionBig3HP
    end if
        if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP <= 0 and PotionBigHP <= 0 and PotionBig2HP <= 0 then
            print #main.map, "drawbmp p5 915 275"
            print #main.map, "place 945 290 ;\"; "Max : ";PotionBig3HP
        end if
        if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP > 0 and PotionBigHP <= 0 and PotionBig2HP <= 0 then
            print #main.map, "drawbmp p5 915 275"
            print #main.map, "place 945 290 ;\"; "Max : ";PotionBig3HP
        end if
        if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 and PotionBigHP > 0 and PotionBig2HP <= 0 then
            print #main.map, "drawbmp p5 915 275"
            print #main.map, "place 945 290 ;\"; "Max : ";PotionBig3HP
        end if
        if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 and PotionBigHP <= 0 and PotionBig2HP > 0 then
            print #main.map, "drawbmp p5 915 275"
            print #main.map, "place 945 290 ;\"; "Max : ";PotionBig3HP
        end if
            if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP > 0 and PotionBigHP <= 0 and PotionBig2HP <= 0 then
                print #main.map, "drawbmp p5 915 314"
                print #main.map, "place 945 332 ;\"; "Max : ";PotionBig3HP
            end if
            if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP <= 0 and PotionBigHP > 0 and PotionBig2HP <= 0 then
                print #main.map, "drawbmp p5 915 314"
                print #main.map, "place 945 332 ;\"; "Max : ";PotionBig3HP
            end if
            if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP <= 0 and PotionBigHP <= 0 and PotionBig2HP > 0 then
                print #main.map, "drawbmp p5 915 314"
                print #main.map, "place 945 332 ;\"; "Max : ";PotionBig3HP
            end if
            if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP > 0 and PotionBigHP > 0 and PotionBig2HP <= 0 then
                print #main.map, "drawbmp p5 915 314"
                print #main.map, "place 945 332 ;\"; "Max : ";PotionBig3HP
            end if
            if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP > 0 and PotionBigHP <= 0 and PotionBig2HP > 0 then
                print #main.map, "drawbmp p5 915 314"
                print #main.map, "place 945 332 ;\"; "Max : ";PotionBig3HP
            end if
            if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP <= 0 and PotionBigHP > 0 and PotionBig2HP > 0 then
                print #main.map, "drawbmp p5 915 314"
                print #main.map, "place 945 332 ;\"; "Max : ";PotionBig3HP
            end if
                if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP > 0 and PotionBigHP > 0 and PotionBig2HP <= 0 then
                    print #main.map, "drawbmp p5 915 356"
                    print #main.map, "place 945 375 ;\"; "Max : ";PotionBig3HP
                end if
                if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP > 0 and PotionBigHP <= 0 and PotionBig2HP > 0 then
                    print #main.map, "drawbmp p5 915 356"
                    print #main.map, "place 945 375 ;\"; "Max : ";PotionBig3HP
                end if
                if PotionBig3HP>0 and PotionLittleHP > 0 and PotionMediumHP <= 0 and PotionBigHP > 0 and PotionBig2HP > 0 then
                    print #main.map, "drawbmp p5 915 356"
                    print #main.map, "place 945 375 ;\"; "Max : ";PotionBig3HP
                end if
                if PotionBig3HP>0 and PotionLittleHP <= 0 and PotionMediumHP > 0 and PotionBigHP > 0 and PotionBig2HP > 0 then
                    print #main.map, "drawbmp p5 915 356"
                    print #main.map, "place 945 375 ;\"; "Max : ";PotionBig3HP
                end if
                    if PotionBig3HP>0 and PotionBig2HP>0 and PotionLittleHP > 0 and PotionMediumHP > 0 and PotionBigHP > 0 then
                        print #main.map, "drawbmp p5 915 397"
                        print #main.map, "place 945 415 ;\"; "Max : ";PotionBig3HP
                    end if
    end if

    if CLICKinv = 4 then
    gosub [refreshINVENT]
    print #main.map, "drawbmp hautF 900 230"
    print #main.map, "drawbmp hautF 900 250"
    print #main.map, "drawbmp hautF 900 270"
    print #main.map, "drawbmp hautF 900 290"
    print #main.map, "drawbmp hautF 900 310"
    print #main.map, "drawbmp hautF 900 330"
    print #main.map, "drawbmp hautF 900 350"
    print #main.map, "drawbmp hautF 900 370"
    print #main.map, "drawbmp hautF 900 390"
    print #main.map, "drawbmp hautF 900 410"
    print #main.map, "drawbmp hautF 900 430"
    print #main.map, "drawbmp hautF 900 450"

    print #main.map, "drawbmp hautF 1070 230"
    print #main.map, "drawbmp hautF 1070 250"
    print #main.map, "drawbmp hautF 1070 270"
    print #main.map, "drawbmp hautF 1070 290"
    print #main.map, "drawbmp hautF 1070 310"
    print #main.map, "drawbmp hautF 1070 330"
    print #main.map, "drawbmp hautF 1070 350"
    print #main.map, "drawbmp hautF 1070 370"
    print #main.map, "drawbmp hautF 1070 390"
    print #main.map, "drawbmp hautF 1070 410"
    print #main.map, "drawbmp hautF 1070 430"
    print #main.map, "drawbmp hautF 1070 450"

    print #main.map, "place 920 240 ;\"; "Exécuteur de monstres - ";MEDAILLE1
    print #main.map, "place 920 260 ;\"; "Tueur de joueurs - ";MEDAILLE2
    print #main.map, "place 920 280 ;\"; "Tueur de Boss - ";MEDAILLE3
    print #main.map, "place 920 300 ;\"; "Ruée ver l'or - ";MEDAILLE4
    print #main.map, "place 920 320 ;\"; "Collectionneur - ";MEDAILLE5
    print #main.map, "place 920 340 ;\"; "Perfectioniste - ";MEDAILLE6
    print #main.map, "place 920 360 ;\"; "Aventurier - ";MEDAILLE7
    print #main.map, "place 920 380 ;\"; "Taneur - ";MEDAILLE8
    print #main.map, "place 920 400 ;\"; "Magicien - ";MEDAILLE9
    print #main.map, "place 920 420 ;\"; "Collecteur - ";MEDAILLE10
    print #main.map, "place 920 440 ;\"; "Immortel - ";MEDAILLE11
    print #main.map, "place 920 460 ;\"; "Compteur d'histoire - ";MEDAILLE12
    end if

    if CLICKinv = 3 then
    gosub [refreshINVENT]
  '  if TYPEdefEQUIP$ <> "" and CLICKinv = 3 then print #main.map, "place 920 293 ;\"; TYPEdefEQUIP$; " [ ";lvlITEM2;" ]"
  '  if version = 1 and TYPEdefEQUIP$ <> "" then print #main.map, "place 920 308 ;\"; " + ";BONUSdef;" D'armure "
  '  if version = 2 and TYPEdefEQUIP$ <> "" then print #main.map, "place 920 308 ;\"; " + ";BONUSdef;" Armor "
  '  if TYPEatkEQUIP$ <> "" then print #main.map, "place 920 250 ;\"; TYPEatkEQUIP$; " [ ";lvlITEM1;" ]"
  '  if version = 1 and TYPEatkEQUIP$ <> "" then print #main.map, "place 920 265 ;\"; " + ";BONUSatk;" de dégâts"
  '  if version = 2 and TYPEatkEQUIP$ <> "" then print #main.map, "place 920 265 ;\"; " + ";BONUSatk;" Damages"


' scan des objets défensifs

    if caseITEM1 = 1 then
        if case1TYPE = 1 then
            caseTYPE$ = case1TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 897 228" 'emplacement 1
        end if
        if case1TYPE = 2 then
            caseTYPE$ = case1TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 897 228" 'emplacement 1
        end if
    end if
    if caseITEM2 = 1 then
        if case2TYPE = 1 then
            caseTYPE$ = case2TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 989 228" 'emplacement 2
        end if
        if case2TYPE = 2 then
            caseTYPE$ = case2TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 989 228" 'emplacement 2
        end if
    end if
    if caseITEM3 = 1 then
        if case3TYPE = 1 then
            caseTYPE$ = case3TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 1081 228" 'emplacement 3
        end if
        if case3TYPE = 2 then
            caseTYPE$ = case3TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 1081 228" 'emplacement 3
        end if
    end if
    if caseITEM4 = 1 then
        if case4TYPE = 1 then
            caseTYPE$ = case4TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 1175 228" 'emplacement 4
        end if
        if case4TYPE = 2 then
            caseTYPE$ = case4TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 1175 228" 'emplacement 4
        end if
    end if
    if caseITEM5 = 1 then
        if case5TYPE = 1 then
            caseTYPE$ = case5TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 897 312" 'emplacement 5
        end if
        if case5TYPE = 2 then
            caseTYPE$ = case5TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 897 312" 'emplacement 5
        end if
    end if
    if caseITEM6 = 1 then
        if case6TYPE = 1 then
            caseTYPE$ = case6TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 989 312" 'emplacement 6
        end if
        if case6TYPE = 2 then
            caseTYPE$ = case6TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 989 312" 'emplacement 6
        end if
    end if
    if caseITEM7 = 1 then
        if case7TYPE = 1 then
            caseTYPE$ = case7TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 1081 312" 'emplacement 7
        end if
        if case7TYPE = 2 then
            caseTYPE$ = case7TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 1081 312" 'emplacement 7
        end if
    end if
    if caseITEM8 = 1 then
        if case8TYPE = 1 then
            caseTYPE$ = case8TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 1175 312" 'emplacement 8
        end if
        if case8TYPE = 2 then
            caseTYPE$ = case8TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 1175 312" 'emplacement 8
        end if
    end if
    if caseITEM9 = 1 then
        if case9TYPE = 1 then
            caseTYPE$ = case9TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 897 394" 'emplacement 9
        end if
        if case9TYPE = 2 then
            caseTYPE$ = case9TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 897 394" 'emplacement 9
        end if
    end if
    if caseITEM10 = 1 then
        if case10TYPE = 1 then
            caseTYPE$ = case10TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 989 394" 'emplacement 10
        end if
        if case10TYPE = 2 then
            caseTYPE$ = case10TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 989 394" 'emplacement 10
        end if
    end if
    if caseITEM11 = 1 then
        if case11TYPE = 1 then
            caseTYPE$ = case11TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 1081 394" 'emplacement 11
        end if
        if case11TYPE = 2 then
            caseTYPE$ = case11TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 1081 394" 'emplacement 11
        end if
    end if
    if caseITEM12 = 1 then
        if case12TYPE = 1 then
            caseTYPE$ = case12TYPE$
            gosub [pictureARMURE3]
            print #main.map, "drawbmp ";namePICTUREarmure$;" 1175 394" 'emplacement 11
        end if
        if case12TYPE = 2 then
            caseTYPE$ = case12TYPE$
            gosub [pictureARME3]
            print #main.map, "drawbmp ";namePICTUREarme$;" 1175 394" 'emplacement 11
        end if
    end if

end if


    if CLICKinv = 2 then
    print #main.map, "font Times New Roman 8;backcolor white; color black"
    if mX>905 and mX<952 and mY>235 and mY<280 then goto [passive1]
    if mX>965 and mX<1013 and mY>235 and mY<280 then goto [passive2]
    if mX>1025 and mX<1069 and mY>235 and mY<280 then goto [passive3]
    if mX>1080 and mX<1123 and mY>235 and mY<280 then goto [passive4]
    if mX>1133 and mX<1180 and mY>235 and mY<280 then goto [passive5]
    if mX>1190 and mX<1237 and mY>235 and mY<280 then goto [passive6]

    if mX>905 and mX<952 and mY>295 and mY<340 then goto [passive7]
    if mX>965 and mX<1013 and mY>295 and mY<340 then goto [passive8]
    if mX>1025 and mX<1069 and mY>295 and mY<340 then goto [passive9]
    if mX>1080 and mX<1123 and mY>295 and mY<340 then goto [passive10]
    if mX>1133 and mX<1180 and mY>295 and mY<340 then goto [passive11]
    if mX>1190 and mX<1237 and mY>295 and mY<340 then goto [passive12]

    if mX>905 and mX<952 and mY>355 and mY<400 then goto [passive13]
    if mX>965 and mX<1013 and mY>355 and mY<400 then goto [passive14]
    if mX>1025 and mX<1069 and mY>355 and mY<400 then goto [passive15]
    if mX>1080 and mX<1123 and mY>355 and mY<400 then goto [passive16]
    if mX>1133 and mX<1180 and mY>355 and mY<400 then goto [passive17]
    if mX>1190 and mX<1237 and mY>355 and mY<400 then goto [passive18]

    if mX>905 and mX<952 and mY>415 and mY<460 then goto [passive19]
    if mX>965 and mX<1013 and mY>415 and mY<460 then goto [passive20]
    if mX>1025 and mX<1069 and mY>415 and mY<460 then goto [passive21]
    if mX>1080 and mX<1123 and mY>415 and mY<460 then goto [passive22]
    if mX>1133 and mX<1180 and mY>415 and mY<460 then goto [passive23]
    if mX>1190 and mX<1237 and mY>415 and mY<460 then goto [passive24]


    gosub [refreshINVENT]
    gosub [refreshINVENTskill]

    numberSKILL = 0
    end if

if CLICKinv = 0 then print #main.map, "drawbmp select 650 250"
if CLICKinv = 1 then print #main.map, "drawbmp select 650 293"
if CLICKinv = 2 then print #main.map, "drawbmp select 650 335"
if CLICKinv = 3 then print #main.map, "drawbmp select 650 377"
if CLICKinv = 4 then print #main.map, "drawbmp select 650 415"
wait



[pictureARMURE3]
if caseTYPE$ = "Simple veste" or caseTYPE$ = "Single jacket" then namePICTUREarmure$ = "2a"
if caseTYPE$ = "Veste de cuir" or caseTYPE$ = "Leather Jacket" then namePICTUREarmure$ = "3a"
if caseTYPE$ = "Cotte de mailles" or caseTYPE$ = "Chainmail" then namePICTUREarmure$ = "5a"
if caseTYPE$ = "Plastron de fer" or caseTYPE$ = "Iron Breastplate" then namePICTUREarmure$ = "9a"
if caseTYPE$ = "Manteau épais" or caseTYPE$ = "Thick coat" then namePICTUREarmure$ = "4a"
if caseTYPE$ = "Chemise" or caseTYPE$ = "Shirt" then namePICTUREarmure$ = "1a"
if caseTYPE$ = "Armure de cuir" or caseTYPE$ = "Leather Armor" then namePICTUREarmure$ = "8a"
if caseTYPE$ = "Armure de fer" or caseTYPE$ = "Iron armor" then namePICTUREarmure$ = "11a"
if caseTYPE$ = "Armure d'acier" or caseTYPE$ = "Steel Armor" then namePICTUREarmure$ = "10a"
if caseTYPE$ = "Armure de dragon" or caseTYPE$ = "Dragon armor" then namePICTUREarmure$ = "12a"
if caseTYPE$ = "Plastron d'aciers" or caseTYPE$ = "Breastplate of steel" then namePICTUREarmure$ = "9a"
if caseTYPE$ = "Armure imaginaire" or caseTYPE$ = "Imaginary armor" then namePICTUREarmure$ = "13a"
if caseTYPE$ = "Robe de sorcier" or caseTYPE$ = "Dress sorcerer" then namePICTUREarmure$ = "7a"
if caseTYPE$ = "Cape précieuse" or caseTYPE$ = "Cape valuable" then namePICTUREarmure$ = "6a"
return

[pictureARME3]
if caseTYPE$ = "Epée" or caseTYPE$ = "Sword" then namePICTUREarme$ = "1w"
if caseTYPE$ = "Hache" or caseTYPE$ = "Heavy ax" then namePICTUREarme$ = "2w"
if caseTYPE$ = "Lance" or caseTYPE$ = "Spear" then namePICTUREarme$ = "3w"
if caseTYPE$ = "Masse" or caseTYPE$ = "Mass" then namePICTUREarme$ = "7w"
if caseTYPE$ = "Marteau" or caseTYPE$ = "Hammer" then namePICTUREarme$ = "7w"
if caseTYPE$ = "Bâton" or caseTYPE$ = "Stick" then namePICTUREarme$ = "4w"
if caseTYPE$ = "Sabre" or caseTYPE$ = "Saber" then namePICTUREarme$ = "13w"
if caseTYPE$ = "Katana" then namePICTUREarme$ = "15w"
if caseTYPE$ = "Coûteau" or caseTYPE$ = "Knife" then namePICTUREarme$ = "12w"
if caseTYPE$ = "Double épées" or caseTYPE$ = "Double swords" then namePICTUREarme$ = "8w"
if caseTYPE$ = "Arc" then namePICTUREarme$ = "6w"
if caseTYPE$ = "Arbalète"  then namePICTUREarme$ = "5w"
if caseTYPE$ = "Baguette" then namePICTUREarme$ = "9w"
if caseTYPE$ = "Javelot" then namePICTUREarme$ = "3w"
if caseTYPE$ = "Hachette" or caseTYPE$ = "Hatchet" then namePICTUREarme$ = "14w"
if caseTYPE$ = "Mortier" or caseTYPE$ = "Mortar" then namePICTUREarme$ = "10w"
if caseTYPE$ = "Fronde" or caseTYPE$ = "Sling" then namePICTUREarme$ = "11w"
return


    [refreshINVENT]
    print #main.map, "backcolor white;font Times New Roman 28 color white"
    print #main.map, "place 893 258 ;\"; "                                        "
    print #main.map, "place 893 298 ;\"; "                                        "
    print #main.map, "place 893 340 ;\"; "                                        "
    print #main.map, "place 893 382 ;\"; "                                        "
    print #main.map, "place 893 424 ;\"; "                                        "
    print #main.map, "place 893 464 ;\"; "                                        "
    print #main.map, "backcolor white;font Times New Roman 9; color black"
    return

    [refreshINVENTskill]
    print #main.map, "drawbmp s1 905 235"
    print #main.map, "drawbmp s2 965 235"
    print #main.map, "drawbmp s3 1023 235"
    print #main.map, "drawbmp s4 1078 235"
    print #main.map, "drawbmp s5 1133 235"
    print #main.map, "drawbmp s6 1190 235"

    print #main.map, "drawbmp s7 905 295"
    print #main.map, "drawbmp s8 965 295"
    print #main.map, "drawbmp s9 1023 295"
    print #main.map, "drawbmp s10 1078 295"
    print #main.map, "drawbmp s11 1134 295"
    print #main.map, "drawbmp s12 1190 295"

    print #main.map, "drawbmp s13 905 355"
    print #main.map, "drawbmp s14 965 355"
    print #main.map, "drawbmp s15 1023 355"
    print #main.map, "drawbmp s16 1078 355"
    print #main.map, "drawbmp s17 1134 355"
    print #main.map, "drawbmp s18 1190 355"

    print #main.map, "drawbmp s19 905 415"
    print #main.map, "drawbmp s20 965 415"
    print #main.map, "drawbmp s21 1023 415"
    print #main.map, "drawbmp s22 1078 415"
    print #main.map, "drawbmp s23 1134 415"
    print #main.map, "drawbmp s24 1190 415"

   'passiv
    print #main.map, "font Times New Roman 7"
    print #main.map, "place 908 246 ;\"; lvlPASSIVE1
    print #main.map, "place 968 246 ;\"; lvlPASSIVE2
    print #main.map, "place 1026 246 ;\"; lvlPASSIVE3
    print #main.map, "place 1081 246 ;\"; lvlPASSIVE4
    print #main.map, "place 1136 246 ;\"; lvlPASSIVE5
    print #main.map, "place 1193 246 ;\"; lvlPASSIVE6

    print #main.map, "place 908 306 ;\"; lvlPASSIVE7
    print #main.map, "place 968 306 ;\"; lvlPASSIVE8
    print #main.map, "place 1026 306 ;\"; lvlPASSIVE9
    print #main.map, "place 1081 306 ;\"; lvlPASSIVE10
    print #main.map, "place 1136 306 ;\"; lvlPASSIVE11
    print #main.map, "place 1193 306 ;\"; lvlPASSIVE12

    print #main.map, "place 908 366 ;\"; lvlPASSIVE13
    print #main.map, "place 968 366 ;\"; lvlPASSIVE14
    print #main.map, "place 1026 366 ;\"; lvlPASSIVE15
    print #main.map, "place 1081 366 ;\"; lvlPASSIVE16
    print #main.map, "place 1136 366 ;\"; lvlPASSIVE17
    print #main.map, "place 1193 366 ;\"; lvlPASSIVE18

    print #main.map, "place 908 426 ;\"; lvlPASSIVE19
    print #main.map, "place 968 426 ;\"; lvlPASSIVE20
    print #main.map, "place 1026 426 ;\"; lvlPASSIVE21
    print #main.map, "place 1081 426 ;\"; lvlPASSIVE22
    print #main.map, "place 1136 426 ;\"; lvlPASSIVE23
    print #main.map, "place 1193 426 ;\"; lvlPASSIVE24

    return

    [PoPint]
    r = 215: v =215 : b = 215
    print #main.map, "backcolor ";r;" ";v;" ";b
if PoP >0 then
    intelligence = intelligence + 1
    PoP = PoP - 1
    pm = int(pm+3)
    pmTOTAL = int(pmTOTAL+3)
    print #main.map, "font Times New Roman 9; color black"
    if version = 1 then
        print #main.map, "place 185 690 ;\"; "Science : "
        print #main.map, "place 250 690 ;\"; intelligence
        print #main.map, "place 150 575 ;\"; "Points de Science : "; pm;"   "
        print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  "; PoP;"    "
    end if
    if version = 2 then
        print #main.map, "place 185 690 ;\"; "Science : "
        print #main.map, "place 250 690 ;\"; intelligence
        print #main.map, "place 150 575 ;\"; "Points of Science : "; pm;"   "
        print #main.map, "place 150 635 ;\"; "Points of capacities available :  "; PoP;"     "
    end if
    if capacity$ = "Science" then
        atk = atk + 2
        if version = 1 then print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
        if version = 2 then print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    end if
end if
wait
[PoPint2]
r = 215: v =215 : b = 215
print #main.map, "backcolor ";r;" ";v;" ";b
if PoP >0 then
    intelligence = intelligence + PoP
    pm = int(pm+(3*PoP))
    pmTOTAL = int(pmTOTAL+(3*PoP))
    if capacity$ = "Science" then
        print #main.map, "font Times New Roman 9; color black"
        atk = atk + (2*PoP)
        if version = 1 then print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
        if version = 2 then print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    end if
    PoP = 0
    if version = 1 then
        print #main.map, "place 185 690 ;\"; "Science : "
        print #main.map, "place 250 690 ;\"; intelligence
        print #main.map, "place 150 575 ;\"; "Points de Science : "; pm;"   "
        print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  "; PoP; "    "
    end if
    if version = 2 then
        print #main.map, "place 185 690 ;\"; "Science : "
        print #main.map, "place 250 690 ;\"; intelligence
        print #main.map, "place 150 575 ;\"; "Points of Science : "; pm;"   "
        print #main.map, "place 150 635 ;\"; "Points of capacities :  "; PoP;"     "
    end if
end if
wait

[PoPstr]
r = 215: v =215 : b = 215
print #main.map, "backcolor ";r;" ";v;" ";b
if PoP >0 then
    Strength = Strength + 1
    PoP = PoP - 1
    pv = int(pv+4)
    pvTOTAL = int(pvTOTAL+4)
     print #main.map, "font Times New Roman 9; color black"
    if version = 1 then
    print #main.map, "place 185 675 ;\"; "Force : "
    print #main.map, "place 250 675 ;\"; Strength
    print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk;"   "
    print #main.map, "place 150 560 ;\"; "Points de vie : "; pv; " / ";pvTOTAL
    print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  "; PoP;"     "
    end if
    if version = 2 then
    print #main.map, "place 185 675 ;\"; "Strength : "
    print #main.map, "place 250 675 ;\"; Strength
    print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk;"   "
    print #main.map, "place 150 560 ;\"; "Points of Life : "; pv; " / ";pvTOTAL
    print #main.map, "place 150 635 ;\"; "Points of capacities available:  "; PoP;"     "
    end if
    if capacity$ = "Strength" or capacity$ = "Force" then
        atk = atk + 2
        if version = 1 then print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
        if version = 2 then print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    end if
end if
wait
[PoPstr2]
r = 215: v =215 : b = 215
print #main.map, "backcolor ";r;" ";v;" ";b
if PoP >0 then
    Strength = Strength + PoP
    pv = int(pv+(4*PoP))
    pvTOTAL = int(pvTOTAL+(4*PoP))
    if capacity$ = "Strength" or capacity$ = "Force" then
        print #main.map, "font Times New Roman 9; color black"
        atk = atk + (2*PoP)
        if version = 1 then print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
        if version = 2 then print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    end if
    PoP = 0
    if version = 1 then
    print #main.map, "place 185 675 ;\"; "Force : "
    print #main.map, "place 250 675 ;\"; Strength
    print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk;"   "
    print #main.map, "place 150 560 ;\"; "Points de vie : "; pv; " / ";pvTOTAL
    print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  "; PoP;"     "
    end if
    if version = 2 then
    print #main.map, "place 185 675 ;\"; "Strength : "
    print #main.map, "place 250 675 ;\"; Strength
    print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk;"   "
    print #main.map, "place 150 560 ;\"; "Points of Life : "; pv; " / ";pvTOTAL
    print #main.map, "place 150 635 ;\"; "Points of capacities available:  "; PoP;"     "
    end if
end if
wait

[PoPagi]
r = 215: v =215 : b = 215
print #main.map, "backcolor ";r;" ";v;" ";b
if PoP >0 then
    Agility = Agility + 1
    PoP = PoP - 1
    def = def+1
    print #main.map, "font Times New Roman 9; color black"
    if version = 1 then
    print #main.map, "place 185 660 ;\"; "Agilité : "
    print #main.map, "place 250 660 ;\"; Agility
    print #main.map, "place 150 615 ;\"; "Armure : "; def ;" + ";BONUSdef;"    "
    print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  "; PoP;"     "
    end if
    if version = 2 then
    print #main.map, "place 185 660 ;\"; "Agility :  "
    print #main.map, "place 250 660 ;\"; Agility
    print #main.map, "place 150 615 ;\"; "Armor : "; def ;" + ";BONUSdef;"    "
    print #main.map, "place 150 635 ;\"; "Points of capacities available:  "; PoP;"      "
    end if
    if capacity$ = "Agility" or capacity$ = "Agilité" then
        def = def-1
        atk = atk + 5
        if version = 1 then print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
        if version = 2 then print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    end if
end if
wait
[PoPagi2]
r = 215: v =215 : b = 215
print #main.map, "backcolor ";r;" ";v;" ";b
if PoP >0 then
    Agility = Agility + PoP
    def = def + (1*PoP)
    if capacity$ = "Agility" or capacity$ = "Agilité" then
        print #main.map, "font Times New Roman 9; color black"
        def = def - (1*PoP)
        atk = atk + (5*PoP)
        if version = 1 then print #main.map, "place 150 600 ;\"; "Points d'attaque : "; atk ; " + ";BONUSatk
        if version = 2 then print #main.map, "place 150 600 ;\"; "Points of Damages : "; atk ; " + ";BONUSatk
    end if
    PoP = 0
    if version = 1 then
    print #main.map, "place 185 660 ;\"; "Agilité : "
    print #main.map, "place 250 660 ;\"; Agility
    print #main.map, "place 150 615 ;\"; "Armure : "; def ;" + ";BONUSdef;"    "
    print #main.map, "place 150 635 ;\"; "Points de caractéristique disponibles:  "; PoP;"     "
    end if
    if version = 2 then
    print #main.map, "place 185 660 ;\"; "Agility :  "
    print #main.map, "place 250 660 ;\"; Agility
    print #main.map, "place 150 615 ;\"; "Armor : "; def ;" + ";BONUSdef;"    "
    print #main.map, "place 150 635 ;\"; "Points of capacities available:  "; PoP;"     "
    end if

end if
wait

[Armory]
achatatkITEM = 0
armoryMarchand = 1
#main.map, "cls"
#main.map, "when leftButtonDown [SimpleClickG4]"
print #main.map, "drawbmp mapMARCHAND2 0 0"
print #main.map, "background mapMARCHAND2"
if secu1PALLIER = 0 then gosub [dataDEF]
secu1PALLIER = 1

print #main.map, "font Times New Roman 14 bold;color black;backcolor white"
if version = 1 then
    #main.map, "place 110 50 ;\"; "VENDEUSE D'ARMURES"
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    print #main.map, "place 560 140 ;\"; "Votre Or  : ";money;"                  "
    if TYPEdefEQUIP$ <> "" then print #main.map, "place 630 200 ;\"; "Votre équipement  ";TYPEdefEQUIP$ ;" : "; BONUSdef;" def "; " [ niveau ";lvlITEM2;" ]            "
    txtWeapon$ = "Armure"
    levelTXT$ = ""
    prixTXT$ = "Prix : "
    goldTXT$ = " d'or "
    achatTXT$ = "ACHETER"
    explicationTXT1$ = "Astuce : Votre armure constitue votre principale défense. L'amélioration de l'armure détermine le nombre \de points d'armures qui seront ajoutés par monté de niveau au forgeron. Ex: [7] ajoutera 7 d'armures... \Une armure avec un plus haut niveau d'amélioration sera donc plus puissante mais coûtera plus cher."
end if
if version = 2 then
    #main.map, "place 680 50 ;\"; "ARMORS SELLER"
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    print #main.map, "place 560 140 ;\"; "Your Gold  : ";money;"           "
    if TYPEdefEQUIP$ <> "" then print #main.map, "place 630 200 ;\"; "Your stuff ";TYPEdefEQUIP$ ;" : "; BONUSdef;" def "; " [ level";lvlITEM2;" ]              "
    txtWeapon$ = "Armor"
    levelTXT$ = ""
    prixTXT$ = "Price : "
    goldTXT$ = " gold "
    achatTXT$ = "BUY IT"
    explicationTXT1$ = "Trick : Your armor is your main source of protection. The upgrade to your armor give you the number \of armor points adds after the forgeron's upgrade level. Ex: [7] will add 7 armors points ... \A armor with a large upgradable capacity is more powerfull but more expensive to."
end if

print #main.map, "font Times New Roman 8;color black;backcolor white"
#main.map, "place 560 95 ;\"; explicationTXT1$
print #main.map, "font Times New Roman 9;color black;backcolor white"


nameDEF$ = nameDEF1$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 455 245"
if defDEF1 < 1 then defDEF1 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 260 ;\"; nameDEF$;" \";defDEF1;" ";txtWeapon$;" [+";levelTXT$;lvlDEF1;"] \"; prixTXT$; int((6*defDEF1)+(3*lvlDEF1)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 260 ;\"; nameDEF$;" \";defDEF1;" ";txtWeapon$;" [+";levelTXT$;lvlDEF1;"] \"; prixTXT$; int((6*defDEF1)+(3*lvlDEF1)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF2$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 455 357"
if defDEF2 < 1 then defDEF2 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 372 ;\"; nameDEF$;" \";defDEF2;" ";txtWeapon$;" [+";levelTXT$;lvlDEF2;"] \"; prixTXT$; int((6*defDEF2)+(3*lvlDEF2)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 372 ;\"; nameDEF$;" \";defDEF2;" ";txtWeapon$;" [+";levelTXT$;lvlDEF2;"] \"; prixTXT$; int((6*defDEF2)+(3*lvlDEF2)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF3$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 455 471"
if defDEF3 < 1 then defDEF3 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 485 ;\"; nameDEF$;" \";defDEF3;" ";txtWeapon$;" [+";levelTXT$;lvlDEF3;"] \"; prixTXT$; int((6*defDEF3)+(3*lvlDEF3)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 485 ;\"; nameDEF$;" \";defDEF3;" ";txtWeapon$;" [+";levelTXT$;lvlDEF3;"] \"; prixTXT$; int((6*defDEF3)+(3*lvlDEF3)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF4$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 455 583"
if defDEF4 < 1 then defDEF4 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 598 ;\"; nameDEF$;" \";defDEF4;" ";txtWeapon$;" [+";levelTXT$;lvlDEF4;"] \"; prixTXT$; int((6*defDEF4)+(3*lvlDEF4)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 598 ;\"; nameDEF$;" \";defDEF4;" ";txtWeapon$;" [+";levelTXT$;lvlDEF4;"] \"; prixTXT$; int((6*defDEF4)+(3*lvlDEF4)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF5$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 876 245"
if defDEF5 < 1 then defDEF5 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 260 ;\"; nameDEF$;" \";defDEF5;" ";txtWeapon$;" [+";levelTXT$;lvlDEF5;"] \"; prixTXT$; int((6*defDEF5)+(3*lvlDEF5)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 260 ;\"; nameDEF$;" \";defDEF5;" ";txtWeapon$;" [+";levelTXT$;lvlDEF5;"] \"; prixTXT$; int((6*defDEF5)+(3*lvlDEF5)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF6$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 876 357"
if defDEF6 < 1 then defDEF6 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 372 ;\"; nameDEF$;" \";defDEF6;" ";txtWeapon$;" [+";levelTXT$;lvlDEF6;"] \"; prixTXT$; int((6*defDEF6)+(3*lvlDEF6)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 372 ;\"; nameDEF$;" \";defDEF6;" ";txtWeapon$;" [+";levelTXT$;lvlDEF6;"] \"; prixTXT$; int((6*defDEF6)+(3*lvlDEF6)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF7$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 876 471"
if defDEF7 < 1 then defDEF7 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 485 ;\"; nameDEF$;" \";defDEF7;" ";txtWeapon$;" [+";levelTXT$;lvlDEF7;"] \"; prixTXT$; int((6*defDEF7)+(3*lvlDEF7)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 485 ;\"; nameDEF$;" \";defDEF7;" ";txtWeapon$;" [+";levelTXT$;lvlDEF7;"] \"; prixTXT$; int((6*defDEF7)+(3*lvlDEF7)+1)*2;" ";goldTXT$

nameDEF$ = nameDEF8$
gosub [pictureARMURE]
print #main.map, "drawbmp ";namePICTUREarmure$;" 876 583"
if defDEF8 < 1 then defDEF8 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 598 ;\"; nameDEF$;" \";defDEF8;" ";txtWeapon$;" [+";levelTXT$;lvlDEF8;"] \"; prixTXT$; int((6*defDEF8)+(3*lvlDEF8)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 598 ;\"; nameDEF$;" \";defDEF8;" ";txtWeapon$;" [+";levelTXT$;lvlDEF8;"] \"; prixTXT$; int((6*defDEF8)+(3*lvlDEF8)+1)*2;" ";goldTXT$

print #main.map, "font Times New Roman 8;color black;backcolor white"
#main.map, "place 465 313 ;\"; achatTXT$
#main.map, "place 465 425 ;\"; achatTXT$
#main.map, "place 465 540 ;\"; achatTXT$
#main.map, "place 465 652 ;\"; achatTXT$
#main.map, "place 885 313 ;\"; achatTXT$
#main.map, "place 885 425 ;\"; achatTXT$
#main.map, "place 885 540 ;\"; achatTXT$
#main.map, "place 885 652 ;\"; achatTXT$
#main.map, "flush"
wait

[pictureARMURE]
if nameDEF$ = "Simple veste" or nameDEF$ = "Single jacket" then namePICTUREarmure$ = "2a"
if nameDEF$ = "Veste de cuir" or nameDEF$ = "Leather Jacket" then namePICTUREarmure$ = "3a"
if nameDEF$ = "Cotte de mailles" or nameDEF$ = "Chainmail" then namePICTUREarmure$ = "5a"
if nameDEF$ = "Plastron de fer" or nameDEF$ = "Iron Breastplate" then namePICTUREarmure$ = "9a"
if nameDEF$ = "Manteau épais" or nameDEF$ = "Thick coat" then namePICTUREarmure$ = "4a"
if nameDEF$ = "Chemise" or nameDEF$ = "Shirt" then namePICTUREarmure$ = "1a"
if nameDEF$ = "Armure de cuir" or nameDEF$ = "Leather Armor" then namePICTUREarmure$ = "8a"
if nameDEF$ = "Armure de fer" or nameDEF$ = "Iron armor" then namePICTUREarmure$ = "11a"
if nameDEF$ = "Armure d'acier" or nameDEF$ = "Steel Armor" then namePICTUREarmure$ = "10a"
if nameDEF$ = "Armure de dragon" or nameDEF$ = "Dragon armor" then namePICTUREarmure$ = "12a"
if nameDEF$ = "Plastron d'aciers" or nameDEF$ = "Breastplate of steel" then namePICTUREarmure$ = "9a"
if nameDEF$ = "Armure imaginaire" or nameDEF$ = "Imaginary armor" then namePICTUREarmure$ = "13a"
if nameDEF$ = "Robe de sorcier" or nameDEF$ = "Dress sorcerer" then namePICTUREarmure$ = "7a"
if nameDEF$ = "Cape précieuse" or nameDEF$ = "Cape valuable" then namePICTUREarmure$ = "6a"
return

[SimpleClickG4]
    mX = MouseX
    mY = MouseY
    SECUmusic = 0
compteurCLICK = compteurCLICK + 1
    'notice mX;" / ";mY
    print #main.map, "font Times New Roman 8;color white"
    if mX>455 and mX<525 and mY>300 and mY<315 then
        if weaponMarchand = 1 then goto [achatATK1]
        if armoryMarchand = 1 then goto [achatDEF1]
    end if
    if mX>455 and mX<525 and mY>415 and mY<430 then
        if weaponMarchand = 1 then goto [achatATK2]
        if armoryMarchand = 1 then goto [achatDEF2]
    end if
    if mX>455 and mX<525 and mY>530 and mY<545 then
        if weaponMarchand = 1 then goto [achatATK3]
        if armoryMarchand = 1 then goto [achatDEF3]
    end if
    if mX>455 and mX<525 and mY>640 and mY<655 then
        if weaponMarchand = 1 then goto [achatATK4]
        if armoryMarchand = 1 then goto [achatDEF4]
    end if
    if mX>875 and mX<950 and mY>300 and mY<315 then
        if weaponMarchand = 1 then goto [achatATK5]
        if armoryMarchand = 1 then goto [achatDEF5]
    end if
    if mX>875 and mX<950 and mY>415 and mY<430 then
        if weaponMarchand = 1 then goto [achatATK6]
        if armoryMarchand = 1 then goto [achatDEF6]
    end if
    if mX>875 and mX<950 and mY>530 and mY<545 then
        if weaponMarchand = 1 then goto [achatATK7]
        if armoryMarchand = 1 then goto [achatDEF7]
    end if
    if mX>875 and mX<950 and mY>640 and mY<655 then
        if weaponMarchand = 1 then goto [achatATK8]
        if armoryMarchand = 1 then goto [achatDEF8]
    end if
    if mX>160 and mX<220 and mY>630 and mY<690 then
        weaponMarchand = 0
        armoryMarchand = 0
        if ACHAT = 1 then SECUmusic = 1
        ACHAT = 0
        goto [city]
    end if
wait


[Weapon]
achatdefITEM = 0
weaponMarchand = 1
#main.map, "cls"
#main.map, "when leftButtonDown [SimpleClickG4]"
print #main.map, "drawbmp mapMARCHAND 0 0"
print #main.map, "background mapMARCHAND"
if secu2PALLIER = 0 then gosub [dataATKmelee]
if secu2PALLIER = 0 then gosub [dataATKdistance]
secu2PALLIER = 1

print #main.map, "font Times New Roman 14 bold;color black;backcolor white"
if version = 1 then
    #main.map, "place 100 50 ;\"; "VENDEUSE D'ARMES"
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    print #main.map, "place 560 140 ;\"; "Votre Or  : ";money;"              "
    if TYPEatkEQUIP$ <> "" then print #main.map, "place 635 200 ;\"; "Votre équipement ";TYPEatkEQUIP$ ;" : "; BONUSatk;" dégâts "; " [ niveau ";lvlITEM1;" ]      "
    txtWeapon$ = "Dégâts" : levelTXT$ = "" : prixTXT$ = "Prix : " : goldTXT$ = " d'or " : achatTXT$ = "ACHETER"
    explicationTXT1$ = "Astuce : Votre arme constitue votre principale source de dégâts. L'amélioration de l'arme détermine\ le nombre de dégats qui seront ajoutés après chaque monté de niveau au forgeron. Ex: [7] ajoutera 7 \dégâts...Une arme avec un plus haut niveau d'amélioration sera donc plus puissante mais coûtera plus cher."
end if
if version = 2 then
    #main.map, "place 690 50 ;\"; "WEAPON SELLER"
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    print #main.map, "place 560 140 ;\"; "Your Gold  : ";money;"             "
    if TYPEatkEQUIP$ <> "" then print #main.map, "place 635 200 ;\"; "Your stuff ";TYPEatkEQUIP$ ;" : "; BONUSatk;" damages "; " [ level ";lvlITEM1;" ]      "
    txtWeapon$ = "Damages" : levelTXT$ = "" : prixTXT$ = "Price : " : goldTXT$ = " gold " : achatTXT$ = "BUY IT"
    explicationTXT1$ = "Trick : Your weapon is your main source of damages. The upgrade to your weapon give you the number \of damages adds after the forgeron's upgrade level. Ex: [7] will add 7 damages ... A weapon with a large \upgradable capacity is more powerfull but more expensive to."
end if

print #main.map, "font Times New Roman 8;color black;backcolor white"
#main.map, "place 560 95 ;\"; explicationTXT1$
print #main.map, "font Times New Roman 9;color black;backcolor white"

nameATKmelee$ = nameATKmelee1$
gosub [pictureARME1]
print #main.map, "drawbmp ";namePICTUREarme$;" 455 245"
if atkATKmelee1 < 1 then atkATKmelee1 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 260 ;\"; nameATKmelee$;" \";atkATKmelee1;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee1;"] \"; prixTXT$; int((6*atkATKmelee1)+(3*lvlATKmelee1)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 260 ;\"; nameATKmelee$;" \";atkATKmelee1;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee1;"] \"; prixTXT$; int((6*atkATKmelee1)+(3*lvlATKmelee1)+1)*2;" ";goldTXT$

nameATKmelee$ = nameATKmelee2$
gosub [pictureARME1]
print #main.map, "drawbmp ";namePICTUREarme$;" 455 357"
if atkATKmelee2 < 1 then atkATKmelee2 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 372 ;\"; nameATKmelee$;" \";atkATKmelee2;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee2;"] \"; prixTXT$; int((6*atkATKmelee2)+(3*lvlATKmelee2)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 372 ;\"; nameATKmelee$;" \";atkATKmelee2;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee2;"] \"; prixTXT$; int((6*atkATKmelee2)+(3*lvlATKmelee2)+1)*2;" ";goldTXT$

nameATKmelee$ = nameATKmelee3$
gosub [pictureARME1]
print #main.map, "drawbmp ";namePICTUREarme$;" 455 471"
if atkATKmelee3 < 1 then atkATKmelee3 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 485 ;\"; nameATKmelee$;" \";atkATKmelee3;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee3;"] \"; prixTXT$; int((6*atkATKmelee3)+(3*lvlATKmelee3)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 485 ;\"; nameATKmelee$;" \";atkATKmelee3;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee3;"] \"; prixTXT$; int((6*atkATKmelee3)+(3*lvlATKmelee3)+1)*2;" ";goldTXT$

nameATKmelee$ = nameATKmelee4$
gosub [pictureARME1]
print #main.map, "drawbmp ";namePICTUREarme$;" 455 583"
if atkATKmelee4 < 1 then atkATKmelee4 = 1
if RACE$ = "ARTISAN" then #main.map, "place 535 598 ;\"; nameATKmelee$;" \";atkATKmelee4;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee4;"] \"; prixTXT$; int((6*atkATKmelee4)+(3*lvlATKmelee4)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 535 598 ;\"; nameATKmelee$;" \";atkATKmelee4;" ";txtWeapon$;" [+";levelTXT$;lvlATKmelee4;"] \"; prixTXT$; int((6*atkATKmelee4)+(3*lvlATKmelee4)+1)*2;" ";goldTXT$

nameATKdistance$ = nameATKdistance1$
gosub [pictureARME2]
print #main.map, "drawbmp ";namePICTUREarme$;" 876 245"
if atkATKdistance1 < 1 then atkATKdistance1 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 260 ;\"; nameATKdistance$;" \";atkATKdistance1;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance1;"] \"; prixTXT$; int((6*atkATKdistance1)+(3*lvlATKdistance1)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 260 ;\"; nameATKdistance$;" \";atkATKdistance1;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance1;"] \"; prixTXT$; int((6*atkATKdistance1)+(3*lvlATKdistance1)+1)*2;" ";goldTXT$

nameATKdistance$ = nameATKdistance2$
gosub [pictureARME2]
print #main.map, "drawbmp ";namePICTUREarme$;" 876 357"
if atkATKdistance2 < 1 then atkATKdistance2 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 372 ;\"; nameATKdistance$;" \";atkATKdistance2;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance2;"] \"; prixTXT$; int((6*atkATKdistance2)+(3*lvlATKdistance2)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 372 ;\"; nameATKdistance$;" \";atkATKdistance2;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance2;"] \"; prixTXT$; int((6*atkATKdistance2)+(3*lvlATKdistance2)+1)*2;" ";goldTXT$

nameATKdistance$ = nameATKdistance3$
gosub [pictureARME2]
print #main.map, "drawbmp ";namePICTUREarme$;" 876 471"
if atkATKdistance3 < 1 then atkATKdistance3 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 485 ;\"; nameATKdistance$;" \";atkATKdistance3;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance3;"] \"; prixTXT$; int((6*atkATKdistance3)+(3*lvlATKdistance3)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 485 ;\"; nameATKdistance$;" \";atkATKdistance3;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance3;"] \"; prixTXT$; int((6*atkATKdistance3)+(3*lvlATKdistance3)+1)*2;" ";goldTXT$

nameATKdistance$ = nameATKdistance4$
gosub [pictureARME2]
print #main.map, "drawbmp ";namePICTUREarme$;" 876 583"
if atkATKdistance4 < 1 then atkATKdistance4 = 1
if RACE$ = "ARTISAN" then #main.map, "place 955 598 ;\"; nameATKdistance$;" \";atkATKdistance4;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance4;"] \"; prixTXT$; int((6*atkATKdistance4)+(3*lvlATKdistance4)+1);" ";goldTXT$
if RACE$ <> "ARTISAN" then #main.map, "place 955 598 ;\"; nameATKdistance$;" \";atkATKdistance4;" ";txtWeapon$;" [+";levelTXT$;lvlATKdistance4;"] \"; prixTXT$; int((6*atkATKdistance4)+(3*lvlATKdistance4)+1)*2;" ";goldTXT$

print #main.map, "font Times New Roman 8;color black;backcolor white"
#main.map, "place 465 313 ;\"; achatTXT$
#main.map, "place 465 425 ;\"; achatTXT$
#main.map, "place 465 540 ;\"; achatTXT$
#main.map, "place 465 652 ;\"; achatTXT$
#main.map, "place 885 313 ;\"; achatTXT$
#main.map, "place 885 425 ;\"; achatTXT$
#main.map, "place 885 540 ;\"; achatTXT$
#main.map, "place 885 652 ;\"; achatTXT$
#main.map, "flush"
wait

[pictureARME1]
if nameATKmelee$ = "Epée" or nameATKmelee$ = "Sword" then namePICTUREarme$ = "1w"
if nameATKmelee$ = "Hache" or nameATKmelee$ = "Heavy ax" then namePICTUREarme$ = "2w"
if nameATKmelee$ = "Lance" or nameATKmelee$ = "Spear" then namePICTUREarme$ = "3w"
if nameATKmelee$ = "Masse" or nameATKmelee$ = "Mass" then namePICTUREarme$ = "7w"
if nameATKmelee$ = "Marteau" or nameATKmelee$ = "Hammer" then namePICTUREarme$ = "7w"
if nameATKmelee$ = "Bâton" or nameATKmelee$ = "Stick" then namePICTUREarme$ = "4w"
if nameATKmelee$ = "Sabre" or nameATKmelee$ = "Saber" then namePICTUREarme$ = "13w"
if nameATKmelee$ = "Katana" then namePICTUREarme$ = "15w"
if nameATKmelee$ = "Coûteau" or nameATKmelee$ = "Knife" then namePICTUREarme$ = "12w"
if nameATKmelee$ = "Double épées" or nameATKmelee$ = "Double swords" then namePICTUREarme$ = "8w"
return
[pictureARME2]
if nameATKdistance$ = "Arc" then namePICTUREarme$ = "6w"
if nameATKdistance$ = "Arbalète"  then namePICTUREarme$ = "5w"
if nameATKdistance$ = "Baguette" then namePICTUREarme$ = "9w"
if nameATKdistance$ = "Javelot" then namePICTUREarme$ = "3w"
if nameATKdistance$ = "Hachette" or nameATKdistance$ = "Hatchet" then namePICTUREarme$ = "14w"
if nameATKdistance$ = "Mortier" or nameATKdistance$ = "Mortar" then namePICTUREarme$ = "10w"
if nameATKdistance$ = "Fronde" or nameATKdistance$ = "Sling" then namePICTUREarme$ = "11w"
return


[SimpleClickG10]
    mX = MouseX
    mY = MouseY
compteurCLICK = compteurCLICK + 1
'notice mX; " / "; mY

    if mX>885 and mX<940 and mY>280 and mY<300 then goto [ameliorationARMUREMAX]
    if mX>885 and mX<940 and mY>510 and mY<530 then goto [ameliorationARMEMAX]

    if mX>845 and mX<975 and mY>465 and mY<495 then goto [ameliorationARME]
    if mX>845 and mX<975 and mY>230 and mY<260 then goto [ameliorationARMURE]

    if mX>225 and mX<285 and mY>680 and mY<740 then
        weaponMarchand = 0
        armoryMarchand = 0
        if ACHAT = 1 then SECUmusic = 1
        ACHAT = 0
        goto [city]
    end if
wait


[pictureARMURE0]
if TYPEdefEQUIP$ = "Simple veste" or TYPEdefEQUIP$ = "Single jacket" then namePICTUREarmure$ = "2a"
if TYPEdefEQUIP$ = "Veste de cuir" or TYPEdefEQUIP$ = "Leather Jacket" then namePICTUREarmure$ = "3a"
if TYPEdefEQUIP$ = "Cotte de mailles" or TYPEdefEQUIP$ = "Chainmail" then namePICTUREarmure$ = "5a"
if TYPEdefEQUIP$ = "Plastron de fer" or TYPEdefEQUIP$ = "Iron Breastplate" then namePICTUREarmure$ = "9a"
if TYPEdefEQUIP$ = "Manteau épais" or TYPEdefEQUIP$ = "Thick coat" then namePICTUREarmure$ = "4a"
if TYPEdefEQUIP$ = "Chemise" or TYPEdefEQUIP$ = "Shirt" then namePICTUREarmure$ = "1a"
if TYPEdefEQUIP$ = "Armure de cuir" or TYPEdefEQUIP$ = "Leather Armor" then namePICTUREarmure$ = "8a"
if TYPEdefEQUIP$ = "Armure de fer" or TYPEdefEQUIP$ = "Iron armor" then namePICTUREarmure$ = "11a"
if TYPEdefEQUIP$ = "Armure d'acier" or TYPEdefEQUIP$ = "Steel Armor" then namePICTUREarmure$ = "10a"
if TYPEdefEQUIP$ = "Armure de dragon" or TYPEdefEQUIP$ = "Dragon armor" then namePICTUREarmure$ = "12a"
if TYPEdefEQUIP$ = "Plastron d'aciers" or TYPEdefEQUIP$ = "Breastplate of steel" then namePICTUREarmure$ = "9a"
if TYPEdefEQUIP$ = "Armure imaginaire" or TYPEdefEQUIP$ = "Imaginary armor" then namePICTUREarmure$ = "13a"
if TYPEdefEQUIP$ = "Robe de sorcier" or TYPEdefEQUIP$ = "Dress sorcerer" then namePICTUREarmure$ = "7a"
if TYPEdefEQUIP$ = "Cape précieuse" or TYPEdefEQUIP$ = "Cape valuable" then namePICTUREarmure$ = "6a"
return
[pictureARME0]
if TYPEatkEQUIP$ = "Epée" or TYPEatkEQUIP$ = "Sword" then namePICTUREarme$ = "1w"
if TYPEatkEQUIP$ = "Hache" or TYPEatkEQUIP$ = "Heavy ax" then namePICTUREarme$ = "2w"
if TYPEatkEQUIP$ = "Lance" or TYPEatkEQUIP$ = "Spear" then namePICTUREarme$ = "3w"
if TYPEatkEQUIP$ = "Masse" or TYPEatkEQUIP$ = "Mass" then namePICTUREarme$ = "7w"
if TYPEatkEQUIP$ = "Marteau" or TYPEatkEQUIP$ = "Hammer" then namePICTUREarme$ = "7w"
if TYPEatkEQUIP$ = "Bâton" or TYPEatkEQUIP$ = "Stick" then namePICTUREarme$ = "4w"
if TYPEatkEQUIP$ = "Sabre" or TYPEatkEQUIP$ = "Saber" then namePICTUREarme$ = "13w"
if TYPEatkEQUIP$ = "Katana" then namePICTUREarme$ = "15w"
if TYPEatkEQUIP$ = "Coûteau" or TYPEatkEQUIP$ = "Knife" then namePICTUREarme$ = "12w"
if TYPEatkEQUIP$ = "Double épées" or TYPEatkEQUIP$ = "Double swords" then namePICTUREarme$ = "8w"
if TYPEatkEQUIP$ = "Arc" then namePICTUREarme$ = "6w"
if TYPEatkEQUIP$ = "Arbalète"  then namePICTUREarme$ = "5w"
if TYPEatkEQUIP$ = "Baguette" then namePICTUREarme$ = "9w"
if TYPEatkEQUIP$ = "Javelot" then namePICTUREarme$ = "3w"
if TYPEatkEQUIP$ = "Hachette" or TYPEatkEQUIP$ = "Hatchet" then namePICTUREarme$ = "14w"
if TYPEatkEQUIP$ = "Mortier" or TYPEatkEQUIP$ = "Mortar" then namePICTUREarme$ = "10w"
if TYPEatkEQUIP$ = "Fronde" or TYPEatkEQUIP$ = "Sling" then namePICTUREarme$ = "11w"
return

[forgeron]
#main.map, "cls"
if version =  1 then txtButtonAchat$ = "AMELIORER"
if version = 2 then txtButtonAchat$ = "UPGRADE"
#main.map , "backcolor white;font Times New Roman 100"
print #main.map, "drawbmp mapFORGERON 0 0"
print #main.map, "background mapFORGERON"
#main.map, "when leftButtonDown [SimpleClickG10]"

'if TYPEdefEQUIP$ = "" then #main.map, "place 480 310 ;\"; "                                                                                                                                              "
'if TYPEatkEQUIP$ = "" then #main.map, "place 480 535 ;\"; "                                        "

print #main.map, "font Times New Roman 14 bold;color black;backcolor white"
#main.map, "place 200 50 ;\"; "FORGERON"

print #main.map, "font Times New Roman 10;color black"
if TYPEdefEQUIP$ <> "" then gosub [pictureARMURE0]
if TYPEdefEQUIP$ <> "" then print #main.map, "drawbmp ";namePICTUREarmure$;" 510 228"
if TYPEdefEQUIP$ <> "" then print #main.map, "place 610 245 ;\"; "Armure : ";TYPEdefEQUIP$ ; "    "
if TYPEdefEQUIP$ <> "" and version = 1 then print #main.map, "place 610 260 ;\"; "Amélioration : ";BONUSdef ; " [ +";lvlITEM2+lvlPASSIVE14;" ]  ===>  ";int(BONUSdef+lvlITEM2); "    "
if TYPEdefEQUIP$ <> "" and version = 2 then print #main.map, "place 610 260 ;\"; "Upgrade : ";BONUSdef ; " [ +";lvlITEM2+lvlPASSIVE14;" ]  ===>  ";int(BONUSdef+lvlITEM2); "    "

if TYPEatkEQUIP$ <> "" then gosub [pictureARME0]
if TYPEatkEQUIP$ <> "" then print #main.map, "drawbmp ";namePICTUREarme$;" 510 458"
if TYPEatkEQUIP$ <> "" then print #main.map, "place 610 477 ;\"; "Arme : "; TYPEatkEQUIP$ ; "    "
if TYPEatkEQUIP$ <> "" and version = 1 then print #main.map, "place 610 492 ;\"; "Amélioration : ";BONUSatk ; " [ +";lvlITEM1+lvlPASSIVE14;" ]  ===>  ";int(BONUSatk+lvlITEM1); "    "
if TYPEatkEQUIP$ <> "" and version = 2 then print #main.map, "place 610 492 ;\"; "Upgrade : ";BONUSatk ; " [ +";lvlITEM1+lvlPASSIVE14;" ]  ===>  ";int(BONUSatk+lvlITEM1); "    "

#main.map, "place 896 293 ;\"; "MAX "
#main.map, "place 896 524 ;\"; "MAX "

if RACE$ = "ARTISAN" then
    costITEM1forgeUP = int(((BONUSatk+lvlITEM1)*5)/2)-(lvlPASSIVE15*(5*lvlPASSIVE15))
    costITEM2forgeUP = int(((BONUSdef+lvlITEM2)*5)/2)-(lvlPASSIVE15*(5*lvlPASSIVE15))
    if costITEM1forgeUP <= 0 then costITEM1forgeUP = 1
    if costITEM2forgeUP <= 0 then costITEM2forgeUP = 1
    goto [secuFor1]
end if
costITEM1forgeUP = int((BONUSatk+lvlITEM1)*5)-(lvlPASSIVE15*(5*lvlPASSIVE15))
costITEM2forgeUP = int((BONUSdef+lvlITEM2)*5)-(lvlPASSIVE15*(5*lvlPASSIVE15))
if costITEM1forgeUP <= 0 then costITEM1forgeUP = 1
if costITEM2forgeUP <= 0 then costITEM2forgeUP = 1
[secuFor1]

if version = 1 then explicationTXT2$ = "Astuce : \Le forgeron améliore vos équipements. Plus le l'amélioration symbolisé par [nombre] est grande et plus vos \équipements seront puissants. Les coûts d'amélioration dépendent de plusieurs facteurs : Le niveau de votre \objet, la valeur apporté de votre objet (dégâts ou armure initial) et le nombre de fois que vous améliorer l'objet. \Plus vous l'améliorer et plus cela coûtera cher à la prochaine fois."
if version = 2 then explicationTXT2$ = "Trick : \Le forgeron améliore vos équipements. Plus le l'amélioration symbolisé par [nombre] est grande et plus vos \équipements seront puissants. Les coûts d'amélioration dépendent de plusieurs facteurs : Le niveau de votre \objet, la valeur apporté de votre objet (dégâts ou armure initial) et le nombre de fois que vous améliorer l'objet. \Plus vous l'améliorer et plus cela coûtera cher à la prochaine fois."

print #main.map, "font Times New Roman 8;color black;backcolor white"
#main.map, "place 485 80 ;\"; explicationTXT2$
print #main.map, "font Times New Roman 10"

if TYPEdefEQUIP$ <> "" and version = 1 then #main.map, "place 610 285 ;\"; "Coût d'amélioration : ";costITEM2forgeUP; "    "
if TYPEdefEQUIP$ <> "" and version = 2 then #main.map, "place 610 285 ;\"; "Upgrade cost : ";costITEM2forgeUP; "    "
if TYPEatkEQUIP$ <> "" and version = 1 then #main.map, "place 610 517 ;\"; "Coût d'amélioration : ";costITEM1forgeUP; "    "
if TYPEatkEQUIP$ <> "" and version = 2 then #main.map, "place 610 517 ;\"; "Upgrade cost : ";costITEM1forgeUP; "    "
#main.map, "place 875 252;\"; "UPGRADE"
#main.map, "place 875 252 ;\"; "AMELIORER"
#main.map, "place 875 480 ;\"; "UPGRADE"
#main.map, "place 875 483 ;\"; "AMELIORER"

print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money
if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money


print #main, "font Times New Roman 10"
#main.map, "flush"
wait

[ameliorationARMEMAX]
print #main.map, "font Times New Roman 10;color black;backcolor white"
if money < costITEM1forgeUP then wait
if BONUSatk+lvlITEM1 = 0 then wait
SECUmusic = 1
money = money - costITEM1forgeUP
nombreUPitem = nombreUPitem + 1
BONUSatk = BONUSatk + lvlITEM1
if TYPEatkEQUIP$ <> "" and version = 1 then print #main.map, "place 610 492 ;\"; "Amélioration : ";BONUSatk ; " [ +";lvlITEM1;" ]  ===>  ";int(BONUSatk+lvlITEM1); "    "
if TYPEatkEQUIP$ <> "" and version = 2 then print #main.map, "place 610 492 ;\"; "Upgrade : ";BONUSatk ; " [ +";lvlITEM1;" ]  ===>  ";int(BONUSatk+lvlITEM1); "    "
if RACE$ = "ARTISAN" then
    costITEM1forgeUP = int(((BONUSatk+lvlITEM1)*5)/2)-(lvlPASSIVE15*(5*lvlPASSIVE15))
    if costITEM1forgeUP <= 0 then costITEM1forgeUP = 1
    if TYPEatkEQUIP$ <> "" and version = 1 then #main.map, "place 610 517 ;\"; "Coût d'amélioration : ";costITEM1forgeUP; "    "
    if TYPEatkEQUIP$ <> "" and version = 2 then #main.map, "place 610 517 ;\"; "Upgrade cost : ";costITEM1forgeUP; "    "
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
    if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
    if money >= costITEM1forgeUP then goto [ameliorationARMEMAX]
    wait
end if
costITEM1forgeUP = int(((BONUSatk+lvlITEM1)*5)-(lvlPASSIVE15*(5*lvlPASSIVE15)))
if costITEM1forgeUP <= 0 then costITEM1forgeUP = 1
if TYPEatkEQUIP$ <> "" and version = 1 then #main.map, "place 610 517 ;\"; "Coût d'amélioration : ";costITEM1forgeUP; "    "
if TYPEatkEQUIP$ <> "" and version = 2 then #main.map, "place 610 517 ;\"; "Upgrade cost : ";costITEM1forgeUP; "    "
print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
if money >= costITEM1forgeUP then goto [ameliorationARMEMAX]
wait

[ameliorationARME]
print #main.map, "font Times New Roman 10;color black;backcolor white"
if money < costITEM1forgeUP then wait
if BONUSatk+lvlITEM1 = 0 then wait
SECUmusic = 1
money = money - costITEM1forgeUP
nombreUPitem = nombreUPitem + 1
BONUSatk = BONUSatk + lvlITEM1
if TYPEatkEQUIP$ <> "" and version = 1 then print #main.map, "place 610 492 ;\"; "Amélioration : ";BONUSatk ; " [ +";lvlITEM1;" ]  ===>  ";int(BONUSatk+lvlITEM1); "    "
if TYPEatkEQUIP$ <> "" and version = 2 then print #main.map, "place 610 492 ;\"; "Upgrade : ";BONUSatk ; " [ +";lvlITEM1;" ]  ===>  ";int(BONUSatk+lvlITEM1); "    "
if RACE$ = "ARTISAN" then
    costITEM1forgeUP = int(((BONUSatk+lvlITEM1)*5 )/2)-(lvlPASSIVE15*(5*lvlPASSIVE15))
    if costITEM1forgeUP <= 0 then costITEM1forgeUP = 1
    if TYPEatkEQUIP$ <> "" and version = 1 then #main.map, "place 610 517 ;\"; "Coût d'amélioration : ";costITEM1forgeUP; "    "
    if TYPEatkEQUIP$ <> "" and version = 2 then #main.map, "place 610 517 ;\"; "Upgrade cost : ";costITEM1forgeUP; "    "
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
    if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
    wait
end if
costITEM1forgeUP = int((BONUSatk+lvlITEM1)*5)-(lvlPASSIVE15*(5*lvlPASSIVE15))
if costITEM1forgeUP <= 0 then costITEM1forgeUP = 1
if TYPEatkEQUIP$ <> "" and version = 1 then #main.map, "place 610 517 ;\"; "Coût d'amélioration : ";costITEM1forgeUP; "    "
if TYPEatkEQUIP$ <> "" and version = 2 then #main.map, "place 610 517 ;\"; "Upgrade cost : ";costITEM1forgeUP; "    "
print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
wait

[ameliorationARMUREMAX]
print #main.map, "font Times New Roman 10;color black;backcolor white"
if money < costITEM2forgeUP then wait
if BONUSdef+lvlITEM2 = 0 then wait
SECUmusic = 1
money = money - costITEM2forgeUP
nombreUPitem = nombreUPitem + 1
BONUSdef = BONUSdef + lvlITEM2
if TYPEdefEQUIP$ <> "" and version = 1 then print #main.map, "place 610 260 ;\"; "Amélioration : ";BONUSdef ; " [ +";lvlITEM2;" ]  ===>  ";int(BONUSdef+lvlITEM2); "    "
if TYPEdefEQUIP$ <> "" and version = 2 then print #main.map, "place 610 260 ;\"; "Upgrade : ";BONUSdef ; " [ +";lvlITEM2;" ]  ===>  ";int(BONUSdef+lvlITEM2); "    "
if RACE$ = "ARTISAN" then
    costITEM2forgeUP = int(((BONUSdef+lvlITEM2)*5)/2)
    if TYPEdefEQUIP$ <> "" and version = 1 then #main.map, "place 610 285 ;\"; "Coût d'amélioration : ";costITEM2forgeUP; "    "
    if TYPEdefEQUIP$ <> "" and version = 2 then #main.map, "place 610 285 ;\"; "Upgrade cost : ";costITEM2forgeUP; "    "
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
    if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
    if money >= costITEM2forgeUP then goto [ameliorationARMUREMAX]
    wait
end if
costITEM2forgeUP = int((BONUSdef+lvlITEM2)*5)
if TYPEdefEQUIP$ <> "" and version = 1 then #main.map, "place 610 285 ;\"; "Coût d'amélioration : ";costITEM2forgeUP; "    "
if TYPEdefEQUIP$ <> "" and version = 2 then #main.map, "place 610 285 ;\"; "Upgrade cost : ";costITEM2forgeUP; "    "
print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
if money >= costITEM2forgeUP then goto [ameliorationARMUREMAX]
wait

[ameliorationARMURE]
print #main.map, "font Times New Roman 10;color black;backcolor white"
if money < costITEM2forgeUP then wait
if BONUSdef+lvlITEM2 = 0 then wait
SECUmusic = 1
money = money - costITEM2forgeUP
nombreUPitem = nombreUPitem + 1
BONUSdef = BONUSdef + lvlITEM2
if TYPEdefEQUIP$ <> "" and version = 1 then print #main.map, "place 610 260 ;\"; "Amélioration : ";BONUSdef ; " [ +";lvlITEM2;" ]  ===>  ";int(BONUSdef+lvlITEM2); "    "
if TYPEdefEQUIP$ <> "" and version = 2 then print #main.map, "place 610 260 ;\"; "Upgrade : ";BONUSdef ; " [ +";lvlITEM2;" ]  ===>  ";int(BONUSdef+lvlITEM2); "    "
if RACE$ = "ARTISAN" then
    costITEM2forgeUP = int(((BONUSdef+lvlITEM2)*5)/2)
    if TYPEdefEQUIP$ <> "" and version = 1 then #main.map, "place 610 285 ;\"; "Coût d'amélioration : ";costITEM2forgeUP; "    "
if TYPEdefEQUIP$ <> "" and version = 2 then #main.map, "place 610 285 ;\"; "Upgrade cost : ";costITEM2forgeUP; "    "
    print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
    if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
    if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
    wait
end if
costITEM2forgeUP = int((BONUSdef+lvlITEM2)*5)
if TYPEdefEQUIP$ <> "" and version = 1 then #main.map, "place 610 285 ;\"; "Coût d'amélioration : ";costITEM2forgeUP; "    "
if TYPEdefEQUIP$ <> "" and version = 2 then #main.map, "place 610 285 ;\"; "Upgrade cost : ";costITEM2forgeUP; "    "
print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 2 then print #main.map, "place 485 170 ;\"; "Your Gold  : ";money; "           "
if version = 1 then print #main.map, "place 485 170 ;\"; "Votre Or  : ";money; "           "
wait



[scanCASEitem]
if caseITEM1 = 1 then goto [caseITEM2]
if caseITEM1 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 1 : caseITEM1 = 1
    if achatdefITEM = 1 then case1TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case1TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case1TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case1TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case1TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case1TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case1TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case1TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case1TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case1TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case1TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case1TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case1TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case1TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case1TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case1TYPE$ = nameATKdistance4$ 
    if achatdefITEM > 0 then case1TYPE = 1
    if achatatkITEM > 0 then case1TYPE = 2
    goto [endscan1]
end if
[caseITEM2]
if caseITEM2 = 1 then goto [caseITEM3]
if caseITEM2 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1: caseNUMBER = 2 : caseITEM2 = 1
    if achatdefITEM = 1 then case2TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case2TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case2TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case2TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case2TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case2TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case2TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case2TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case2TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case2TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case2TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case2TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case2TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case2TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case2TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case2TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case2TYPE = 1
    if achatatkITEM > 0 then case2TYPE = 2
    goto [endscan1]
end if
[caseITEM3]
'notice achatdefITEM ; "/" ; achatatkITEM
if caseITEM3 = 1 then goto [caseITEM4]
if caseITEM3 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 3 : caseITEM3 = 1
    if achatdefITEM = 1 then case3TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case3TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case3TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case3TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case3TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case3TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case3TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case3TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case3TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case3TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case3TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case3TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case3TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case3TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case3TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case3TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case3TYPE = 1
    if achatatkITEM > 0 then case3TYPE = 2
    goto [endscan1]
end if
[caseITEM4]
if caseITEM4 = 1 then goto [caseITEM5]
if caseITEM4 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 4 : caseITEM4 = 1
    if achatdefITEM = 1 then case4TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case4TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case4TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case4TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case4TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case4TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case4TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case4TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case4TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case4TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case4TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case4TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case4TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case4TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case4TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case4TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case4TYPE = 1
    if achatatkITEM > 0 then case4TYPE = 2
    goto [endscan1]
end if
[caseITEM5]
if caseITEM5 = 1 then goto [caseITEM6]
if caseITEM5 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 5 : caseITEM5 = 1
    if achatdefITEM = 1 then case5TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case5TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case5TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case5TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case5TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case5TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case5TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case5TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case5TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case5TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case5TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case5TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case5TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case5TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case5TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case5TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case5TYPE = 1
    if achatatkITEM > 0 then case5TYPE = 2
    goto [endscan1]
end if
[caseITEM6]
if caseITEM6 = 1 then goto [caseITEM7]
if caseITEM6 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 6 : caseITEM6 = 1
    if achatdefITEM = 1 then case6TYPE$ = nameDEF1$ 
    if achatdefITEM = 2 then case6TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case6TYPE$ = nameDEF3$ 
    if achatdefITEM = 4 then case6TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case6TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case6TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case6TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case6TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case6TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case6TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case6TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case6TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case6TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case6TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case6TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case6TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case6TYPE = 1
    if achatatkITEM > 0 then case6TYPE = 2
    goto [endscan1]
end if
[caseITEM7]
if caseITEM7 = 1 then goto [caseITEM8]
if caseITEM7 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 7 : caseITEM7 = 1
    if achatdefITEM = 1 then case7TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case7TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case7TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case7TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case7TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case7TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case7TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case7TYPE$ = nameDEF8$ 
    if achatatkITEM = 1 then case7TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case7TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case7TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case7TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case7TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case7TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case7TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case7TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case7TYPE = 1
    if achatatkITEM > 0 then case7TYPE = 2
    goto [endscan1]
end if
[caseITEM8]
if caseITEM8 = 1 then goto [caseITEM9]
if caseITEM8 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 8 : caseITEM8 = 1
    if achatdefITEM = 1 then case8TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case8TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case8TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case8TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case8TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case8TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case8TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case8TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case8TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case8TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case8TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case8TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case8TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case8TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case8TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case8TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case8TYPE = 1
    if achatatkITEM > 0 then case8TYPE = 2
    goto [endscan1]
end if
[caseITEM9]
if caseITEM9 = 1 then goto [caseITEM10]
if caseITEM9 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 9 : caseITEM9 = 1
    if achatdefITEM = 1 then case9TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case9TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case9TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case9TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case9TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case9TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case9TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case9TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case9TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case9TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case9TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case9TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case9TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case9TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case9TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case9TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case9TYPE = 1
    if achatatkITEM > 0 then case9TYPE = 2
    goto [endscan1]
end if
[caseITEM10]
if caseITEM10 = 1 then goto [caseITEM11]
if caseITEM10 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 10 : caseITEM10 = 1
    if achatdefITEM = 1 then case10TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case10TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case10TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case10TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case10TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case10TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case10TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case10TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case10TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case10TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case10TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case10TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case10TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case10TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case10TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case10TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case10TYPE = 1
    if achatatkITEM > 0 then case10TYPE = 2
    goto [endscan1]
end if
[caseITEM11]
if caseITEM11 = 1 then goto [caseITEM12]
if caseITEM11 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 11 : caseITEM11 = 1
    if achatdefITEM = 1 then case11TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case11TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case11TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case11TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case11TYPE$ = nameDEF5$ 
    if achatdefITEM = 6 then case11TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case11TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case11TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case11TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case11TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case11TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case11TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case11TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case11TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case11TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case11TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case11TYPE = 1
    if achatatkITEM > 0 then case11TYPE = 2
    goto [endscan1]
end if
[caseITEM12]
if caseITEM12 = 1 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
if caseITEM12 = 0 then
    if ItemPLACE = 0 then notice "Vous ne pouvez plus porter d'équipement. Vous devez libérer de la place." : wait
    ItemPLACE = ItemPLACE - 1 : caseNUMBER = 12 : caseITEM12 = 1
    if achatdefITEM = 1 then case12TYPE$ = nameDEF1$
    if achatdefITEM = 2 then case12TYPE$ = nameDEF2$
    if achatdefITEM = 3 then case12TYPE$ = nameDEF3$
    if achatdefITEM = 4 then case12TYPE$ = nameDEF4$ 
    if achatdefITEM = 5 then case12TYPE$ = nameDEF5$
    if achatdefITEM = 6 then case12TYPE$ = nameDEF6$
    if achatdefITEM = 7 then case12TYPE$ = nameDEF7$
    if achatdefITEM = 8 then case12TYPE$ = nameDEF8$
    if achatatkITEM = 1 then case12TYPE$ = nameATKmelee1$
    if achatatkITEM = 2 then case12TYPE$ = nameATKmelee2$
    if achatatkITEM = 3 then case12TYPE$ = nameATKmelee3$
    if achatatkITEM = 4 then case12TYPE$ = nameATKmelee4$ 
    if achatatkITEM = 5 then case12TYPE$ = nameATKdistance1$
    if achatatkITEM = 6 then case12TYPE$ = nameATKdistance2$
    if achatatkITEM = 7 then case12TYPE$ = nameATKdistance3$
    if achatatkITEM = 8 then case12TYPE$ = nameATKdistance4$
    if achatdefITEM > 0 then case12TYPE = 1
    if achatatkITEM > 0 then case12TYPE = 2
end if
[endscan1]



return

[achatDEF1]
if achatdefITEM = 1 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF1)+(3*lvlDEF1)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF1)+(3*lvlDEF1)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF1 : TYPEdefEQUIP$ = nameDEF1$ : lvlITEM2 = lvlDEF1 : ACHAT = 1 : achatdefITEM = 1
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF1)+(3*lvlDEF1)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF1)+(3*lvlDEF1)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF2]
if achatdefITEM = 2 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF2)+(3*lvlDEF2)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF2)+(3*lvlDEF2)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF2 : TYPEdefEQUIP$ = nameDEF2$ : lvlITEM2 = lvlDEF2 : ACHAT = 1 : achatdefITEM = 2
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF2)+(3*lvlDEF2)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF2)+(3*lvlDEF2)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF3]
if achatdefITEM = 3 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF3)+(3*lvlDEF3)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF3)+(3*lvlDEF3)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF3 : TYPEdefEQUIP$ = nameDEF3$ : lvlITEM2 = lvlDEF3 : ACHAT = 1 : achatdefITEM = 3
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF3)+(3*lvlDEF3)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF3)+(3*lvlDEF3)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF4]
if achatdefITEM = 4 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF4)+(3*lvlDEF4)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF4)+(3*lvlDEF4)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF4 : TYPEdefEQUIP$ = nameDEF4$ : lvlITEM2 = lvlDEF4 : ACHAT = 1 : achatdefITEM = 4
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF4)+(3*lvlDEF4)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF4)+(3*lvlDEF4)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF5]
if achatdefITEM = 5 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF5)+(3*lvlDEF5)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF5)+(3*lvlDEF5)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF5 : TYPEdefEQUIP$ = nameDEF5$ : lvlITEM2 = lvlDEF5 : ACHAT = 1 : achatdefITEM = 5
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF5)+(3*lvlDEF5)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF5)+(3*lvlDEF5)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF6]
if achatdefITEM = 6 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF6)+(3*lvlDEF6)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF6)+(3*lvlDEF6)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF6 : TYPEdefEQUIP$ = nameDEF6$ : lvlITEM2 = lvlDEF6 : ACHAT = 1 : achatdefITEM = 6
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF6)+(3*lvlDEF6)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF6)+(3*lvlDEF6)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF7]
if achatdefITEM = 7 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF7)+(3*lvlDEF7)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF7)+(3*lvlDEF7)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF7 : TYPEdefEQUIP$ = nameDEF7$ : lvlITEM2 = lvlDEF7 : ACHAT = 1 : achatdefITEM = 7
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF7)+(3*lvlDEF7)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF7)+(3*lvlDEF7)+1)*2
achatdefITEM = 0
goto [endACHATdef]
[achatDEF8]
if achatdefITEM = 8 then wait
if RACE$ = "ARTISAN" and money < int((6*defDEF8)+(3*lvlDEF8)+1) or RACE$ <> "ARTISAN" and money < int((6*defDEF8)+(3*lvlDEF8)+1)*2 then wait
caseTYPE = 1
BONUSdef = defDEF8 : TYPEdefEQUIP$ = nameDEF8$ : lvlITEM2 = lvlDEF8 : ACHAT = 1 : achatdefITEM = 8
gosub [scanCASEitem]
if RACE$ = "ARTISAN" then money = money - int((6*defDEF8)+(3*lvlDEF8)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*defDEF8)+(3*lvlDEF8)+1)*2
achatdefITEM = 0
[endACHATdef]
nombreACHATitem = nombreACHATitem + 1
print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 1 then print #main.map, "place 560 140 ;\"; "Votre Or  : ";money;"         "
if version = 1 then print #main.map, "place 630 200 ;\"; "Votre équipement ( ";TYPEdefEQUIP$ ;" : "; BONUSdef;" def "; " [ niveau ";lvlITEM2;" ] )"; "              "
if version = 2 then print #main.map, "place 560 140 ;\"; "Your Gold  : ";money;"         "
if version = 2 then print #main.map, "place 630 200 ;\"; "Your stuff ( ";TYPEdefEQUIP$ ;" : "; BONUSdef;" def "; " [ level ";lvlITEM2;" ] )"; "                 "
wait

[achatATK1]
if achatatkITEM = 1 then wait
if RACE$ = "ARTISAN" and money < int((6*atkATKmelee1)+(3*lvlATKmelee1)+1) or RACE$ <> "ARTISAN" and money <  int((6*atkATKmelee1)+(3*lvlATKmelee1)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money -  int((6*atkATKmelee1)+(3*lvlATKmelee1)+1)
if RACE$ <> "ARTISAN" then money = money -  int((6*atkATKmelee1)+(3*lvlATKmelee1)+1)*2
BONUSatk = atkATKmelee1 : TYPEatkEQUIP$ = nameATKmelee1$ : lvlITEM1 = lvlATKmelee1 : ACHAT = 1 : achatatkITEM = 1
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK2]
if achatatkITEM = 2 then wait
if RACE$ = "ARTISAN" and money <  int((6*atkATKmelee2)+(3*lvlATKmelee2)+1) or RACE$ <> "ARTISAN" and money <  int((6*atkATKmelee2)+(3*lvlATKmelee2)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money -  int((6*atkATKmelee2)+(3*lvlATKmelee2)+1)
if RACE$ <> "ARTISAN" then money = money -  int((6*atkATKmelee2)+(3*lvlATKmelee2)+1)*2
BONUSatk = atkATKmelee2 : TYPEatkEQUIP$ = nameATKmelee2$ : lvlITEM1 = lvlATKmelee2 : ACHAT = 1 : achatatkITEM = 2
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK3]
if achatatkITEM = 3 then wait
if RACE$ = "ARTISAN" and money <  int((6*atkATKmelee3)+(3*lvlATKmelee3)+1) or RACE$ <> "ARTISAN" and money <  int((6*atkATKmelee3)+(3*lvlATKmelee3)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money -  int((6*atkATKmelee3)+(3*lvlATKmelee3)+1)
if RACE$ <> "ARTISAN" then money = money -  int((6*atkATKmelee3)+(3*lvlATKmelee3)+1)*2
BONUSatk = atkATKmelee3 : TYPEatkEQUIP$ = nameATKmelee3$ : lvlITEM1 = lvlATKmelee3 : ACHAT = 1 : achatatkITEM = 3
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK4]
if achatatkITEM = 4 then wait
if RACE$ = "ARTISAN" and money <  int((6*atkATKmelee4)+(3*lvlATKmelee4)+1) or RACE$ <> "ARTISAN" and money <  int((6*atkATKmelee4)+(3*lvlATKmelee4)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money -  int((6*atkATKmelee4)+(3*lvlATKmelee4)+1)
if RACE$ <> "ARTISAN" then money = money -  int((6*atkATKmelee4)+(3*lvlATKmelee4)+1)*2
BONUSatk = atkATKmelee4 : TYPEatkEQUIP$ = nameATKmelee4$ : lvlITEM1 = lvlATKmelee4 : ACHAT = 1 : achatatkITEM = 4
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK5]
if achatatkITEM = 5 then wait
if RACE$ = "ARTISAN" and money <  int((6*atkATKdistance1)+(3*lvlATKdistance1)+1) or RACE$ <> "ARTISAN" and money < int((6*atkATKdistance1)+(3*lvlATKdistance1)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money - int((6*atkATKdistance1)+(3*lvlATKdistance1)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*atkATKdistance1)+(3*lvlATKdistance1)+1)*2
BONUSatk = atkATKdistance1 : TYPEatkEQUIP$ = nameATKdistance1$ : lvlITEM1 = lvlATKdistance1 : ACHAT = 1 : achatatkITEM = 5
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK6]
if achatatkITEM = 6 then wait
if RACE$ = "ARTISAN" and money < int((6*atkATKdistance2)+(3*lvlATKdistance2)+1) or RACE$ <> "ARTISAN" and money < int((6*atkATKdistance2)+(3*lvlATKdistance2)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money - int((6*atkATKdistance2)+(3*lvlATKdistance2)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*atkATKdistance2)+(3*lvlATKdistance2)+1)*2
BONUSatk = atkATKdistance2 : TYPEatkEQUIP$ = nameATKdistance2$ : lvlITEM1 = lvlATKdistance2 : ACHAT = 1 : achatatkITEM = 6
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK7]
if achatatkITEM = 7 then wait
if RACE$ = "ARTISAN" and money < int((6*atkATKdistance3)+(3*lvlATKdistance3)+1) or RACE$ <> "ARTISAN" and money < int((6*atkATKdistance3)+(3*lvlATKdistance3)+1)*2 then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money - int((6*atkATKdistance3)+(3*lvlATKdistance3)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*atkATKdistance3)+(3*lvlATKdistance3)+1)*2
BONUSatk = atkATKdistance3 : TYPEatkEQUIP$ = nameATKdistance3$ : lvlITEM1 = lvlATKdistance3 : ACHAT = 1 : achatatkITEM = 7
gosub [scanCASEitem]
achatatkITEM = 0
goto [endACHATatk]
[achatATK8]
if achatatkITEM = 8 then wait
if RACE$ = "ARTISAN" and money < int((6*atkATKdistance4)+(3*lvlATKdistance4)+1) or RACE$ <> "ARTISAN" and money < int((6*atkATKdistance4)+(3*lvlATKdistance4)+1) then wait
caseTYPE = 2
if RACE$ = "ARTISAN" then money = money - int((6*atkATKdistance4)+(3*lvlATKdistance4)+1)
if RACE$ <> "ARTISAN" then money = money - int((6*atkATKdistance4)+(3*lvlATKdistance4)+1)*2
BONUSatk = atkATKdistance4 : TYPEatkEQUIP$ = nameATKdistance4$ : lvlITEM1 = lvlATKdistance4 : ACHAT = 1 : achatatkITEM = 8
gosub [scanCASEitem]
achatatkITEM = 0
[endACHATatk]
nombreACHATitem = nombreACHATitem + 1
print #main.map, "font Times New Roman 8 bold;color black;backcolor white"
if version = 1 then print #main.map, "place 560 140 ;\"; "Votre Or  : ";money;"                    "
if version = 1 then print #main.map, "place 630 200 ;\"; "Votre équipement ( ";TYPEatkEQUIP$ ;" : "; BONUSatk;" dégâts "; " [ niveau ";lvlITEM1;" ] )";"                                                    "
if version = 2 then print #main.map, "place 560 140 ;\"; "Your Gold  : ";money;"            "
if version = 2 then print #main.map, "place 630 200 ;\"; "Your stuff ( ";TYPEatkEQUIP$ ;" : "; BONUSatk;" damages "; " [ level ";lvlITEM1;" ] )";"                                                    "
wait


[dataDEF]
achatdefITEM = 0
for x = 1 to 8
nameDEF = int(rnd(1)*15+1)
lvlDEF = int(rnd(1)*(2*LvlDONJON)+1)
select case nameDEF
    case 1
        if version = 1 then nameDEF$ = "Simple veste"
        if version = 2 then nameDEF$ = "Single jacket"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*4)+LvlDONJON)+lvl
        typeITEMdef = 1
    case 2
        if version = 1 then nameDEF$ = "Veste de cuir"
        if version = 2 then nameDEF$ = "Leather Jacket"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*7)+LvlDONJON)
        typeITEMdef = 2
    case 3
        if version = 1 then nameDEF$ = "Cotte de mailles"
        if version = 2 then nameDEF$ = "Chainmail"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*19)+LvlDONJON)+lvl
        typeITEMdef = 3
    case 4
        if version = 1 then nameDEF$ = "Plastron de fer"
        if version = 2 then nameDEF$ = "Iron Breastplate"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*26)+LvlDONJON)+lvl
        typeITEMdef = 4
    case 5
        if version = 1 then nameDEF$ = "Manteau épais"
        if version = 2 then nameDEF$ = "Thick coat"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*9)+LvlDONJON)+lvl
        typeITEMdef = 5
    case 6
        if version = 1 then nameDEF$ = "Chemise"
        if version = 2 then nameDEF$ = "Shirt"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*2)+LvlDONJON)+lvl
        typeITEMdef = 6
    case 7
        if version = 1 then nameDEF$ = "Armure de cuir"
        if version = 2 then nameDEF$ = "Leather Armor"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*12)+LvlDONJON)+lvl
        typeITEMdef = 7
    case 8
        if version = 1 then nameDEF$ = "Armure de cuivre"
        if version = 2 then nameDEF$ = "Copper armor"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*16)+LvlDONJON)+lvl
        typeITEMdef = 8
    case 9
        if version = 1 then nameDEF$ = "Armure de fer"
        if version = 2 then nameDEF$ = "Iron armor"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*38)+LvlDONJON)+lvl
        typeITEMdef = 9
    case 10
        if version = 1 then nameDEF$ = "Armure d'acier"
        if version = 2 then nameDEF$ = "Steel Armor"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*44)+LvlDONJON)+lvl
        typeITEMdef = 10
    case 11
        if version = 1 then nameDEF$ = "Armure de dragon"
        if version = 2 then nameDEF$ = "Dragon armor"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*60)+LvlDONJON)+lvl
        typeITEMdef = 11
    case 12
        if version = 1 then nameDEF$ = "Plastron d'aciers"
        if version = 2 then nameDEF$ = "Breastplate of steel"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*50)+LvlDONJON)+lvl
        typeITEMdef = 12
    case 13
        if version = 1 then nameDEF$ = "Armure imaginaire"
        if version = 2 then nameDEF$ = "Imaginary armor"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*1)+LvlDONJON)+lvl
        typeITEMdef = 13
    case 14
        if version = 1 then nameDEF$ = "Robe de sorcier"
        if version = 2 then nameDEF$ = "Dress sorcerer"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*14)+LvlDONJON)+lvl
        typeITEMdef = 14
    case 15
        if version = 1 then nameDEF$ = "Cape précieuse"
        if version = 2 then nameDEF$ = "Cape valuable"
        defDEF = int(rnd(1)*(LvlDONJON*LvlDONJON*10)+LvlDONJON)+lvl
        typeITEMdef = 15
end select
    if x = 1 then
        nameDEF1$ = nameDEF$ : defDEF1 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF1 = lvlDEF : typeITEMdef1 = typeITEMdef : PositionDEF1 = 1
    end if
    if x = 2 then
        nameDEF2$ = nameDEF$ : defDEF2 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF2 = lvlDEF : typeITEMdef2 = typeITEMdef : PositionDEF2 = 2
    end if
    if x = 3 then
        nameDEF3$ = nameDEF$ : defDEF3 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF3 = lvlDEF : typeITEMdef3 = typeITEMdef : PositionDEF3 = 3
    end if
    if x = 4 then
        nameDEF4$ = nameDEF$ : defDEF4 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF4 = lvlDEF : typeITEMdef4 = typeITEMdef : PositionDEF4 = 4
    end if
    if x = 5 then
        nameDEF5$ = nameDEF$ : defDEF5 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF5 = lvlDEF : typeITEMdef5 = typeITEMdef : PositionDEF5 = 5
    end if
    if x = 6 then
        nameDEF6$ = nameDEF$ : defDEF6 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF6 = lvlDEF : typeITEMdef6 = typeITEMdef : PositionDEF6 = 6
    end if
    if x = 7 then
        nameDEF7$ = nameDEF$ : defDEF7 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF7 = lvlDEF : typeITEMdef7 = typeITEMdef : PositionDEF7 = 7
    end if
    if x = 8 then
        nameDEF8$ = nameDEF$ :defDEF8 = defDEF : TYPEdef$ = nameDEF$ : lvlDEF8 = lvlDEF : typeITEMdef8 = typeITEMdef : PositionDEF8 = 8
    end if
next x

return

[dataATKmelee]
achatatkITEM = 0
for x = 1 to 4
nameATKmelee = int(rnd(1)*10+1)
lvlATKmelee = int(rnd(1)*(2*LvlDONJON)+1)
select case nameATKmelee
    case 1
        if version = 1 then nameATKmelee$ = "Epée"
        if version = 2 then nameATKmelee$ = "Sword"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*21)+LvlDONJON)+lvl
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 2
        if version = 1 then nameATKmelee$ = "Hache"
        if version = 2 then nameATKmelee$ = "Heavy ax"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*19)+LvlDONJON)+lvl
        if RACE$ = "TANK" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 3
        if version = 1 then nameATKmelee$ = "Lance"
        if version = 2 then nameATKmelee$ = "Spear"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*20)+LvlDONJON)+lvl
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 4
        if version = 1 then nameATKmelee$ = "Masse"
        if version = 2 then nameATKmelee$ = "Mass"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*22)+LvlDONJON)+lvl
        if RACE$ = "TANK" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 5
        if version = 1 then nameATKmelee$ = "Marteau"
        if version = 2 then nameATKmelee$ = "Hammer"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*18)+LvlDONJON)+lvl
        if RACE$ = "TANK" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 6
        if version = 1 then nameATKmelee$ = "Bâton"
        if version = 2 then nameATKmelee$ = "Stick"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*15)+LvlDONJON)+lvl
        if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" or RACE$ = "ARTISAN" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 7
        if version = 1 then nameATKmelee$ = "Sabre"
        if version = 2 then nameATKmelee$ = "Saber"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*24)+LvlDONJON)+lvl
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 8
        nameATKmelee$ = "Katana"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*50)+LvlDONJON)+lvl
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 9
        if version = 1 then nameATKmelee$ = "Coûteau"
        if version = 2 then nameATKmelee$ = "Knife"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*8)+LvlDONJON)+lvl
        if RACE$ = "ARTISAN" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
    case 10
        if version = 1 then nameATKmelee$ = "Double épées"
        if version = 2 then nameATKmelee$ = "Double swords"
        atkATKmelee = int(rnd(1)*(LvlDONJON*LvlDONJON*43)+LvlDONJON)+lvl
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then atkATKmelee = int(atkATKmelee+(atkATKmelee/4))
end select
    if x = 1 then
        nameATKmelee1$ = nameATKmelee$
        atkATKmelee1 = atkATKmelee
        TYPEatk$ = nameATKmelee$
        lvlATKmelee1 = lvlATKmelee
    end if
    if x = 2 then
        nameATKmelee2$ = nameATKmelee$
        atkATKmelee2 = atkATKmelee
        TYPEatk$ = nameATKmelee$
        lvlATKmelee2 = lvlATKmelee
    end if
    if x = 3 then
        nameATKmelee3$ = nameATKmelee$
        atkATKmelee3 = atkATKmelee
        TYPEatk$ = nameATKmelee$
        lvlATKmelee3 = lvlATKmelee
    end if
    if x = 4 then
        nameATKmelee4$ = nameATKmelee$
        atkATKmelee4 = atkATKmelee
        TYPEatk$ = nameATKmelee$
        lvlATKmelee4 = lvlATKmelee
    end if
next x

if atkATKmelee = 0 then atkATKmelee = 1

return

[dataATKdistance]
achatatkITEM = 0
for x = 1 to 4
nameATKdistance = int(rnd(1)*7+1)
lvlATKdistance = int(rnd(1)*(2*LvlDONJON)+1)
select case nameATKdistance
    case 1
        nameATKdistance$ = "Arc"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*19)+LvlDONJON)+lvl
        if RACE$ = "ARCHER" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
    case 2
        nameATKdistance$ = "Arbalète"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*30)+LvlDONJON)+lvl
        if RACE$ = "ARCHER" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
    case 3
        nameATKdistance$ = "Baguette"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*10)+LvlDONJON)+lvl
        if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
    case 4
        nameATKdistance$ = "Javelot"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*17)+LvlDONJON)+lvl
        if RACE$ = "ARCHER" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
    case 5
        if version = 1 then nameATKdistance$ = "Hachette"
        if version = 2 then nameATKdistance$ = "Hatchet"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*16)+LvlDONJON)+lvl
        if RACE$ = "GUERRIER" or RACE$ = "WARRIOR" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
    case 6
        if version = 1 then nameATKdistance$ = "Mortier"
        if version = 2 then nameATKdistance$ = "Mortar"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*41)+LvlDONJON)+lvl
        if RACE$ = "ARTISAN" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
    case 7
        if version = 1 then nameATKdistance$ = "Fronde"
        if version = 2 then nameATKdistance$ = "Sling"
        atkATKdistance = int(rnd(1)*(LvlDONJON*LvlDONJON*16)+LvlDONJON)+lvl
        if RACE$ = "ARCHER" then atkATKdistance = int(atkATKdistance+(atkATKdistance/4))
end select
    if x = 1 then
        nameATKdistance1$ = nameATKdistance$
        atkATKdistance1 = atkATKdistance
        TYPEatk$ = nameATKdistance$
        lvlATKdistance1 = lvlATKdistance
    end if
    if x = 2 then
        nameATKdistance2$ = nameATKdistance$
        atkATKdistance2 = atkATKdistance
        TYPEatk$ = nameATKdistance$
        lvlATKdistance2 = lvlATKdistance
    end if
    if x = 3 then
        nameATKdistance3$ = nameATKdistance$
        atkATKdistance3 = atkATKdistance
        TYPEatk$ = nameATKdistance$
        lvlATKdistance3 = lvlATKdistance
    end if
    if x = 4 then
        nameATKdistance4$ = nameATKdistance$
        atkATKdistance4 = atkATKdistance
        TYPEatk$ = nameATKdistance$
        lvlATKdistance4 = lvlATKdistance
    end if
next x

if atkATKdistance = 0 then atkATKdistance = 1
return

[achatPOTION1]
if ValeurORPotion1 > money then wait
if nMax1 >= MAX1 then wait
nMax1 = nMax1 + 1 : PotionLittleHP = PotionLittleHP + 1 : money = money - ValeurORPotion1
print #main.map, "place 500 360 ;\"; PotionLittleHP
goto [refreshACHATpotions]

[achatPOTION2]
if ValeurORPotion2 > money then wait
if nMax1 >= MAX1 then wait
nMax1 = nMax1 + 1 : PotionMediumHP = PotionMediumHP + 1 : money = money - ValeurORPotion2
print #main.map, "place 830 360 ;\"; PotionMediumHP
goto [refreshACHATpotions]

[achatPOTION3]
if ValeurORPotion3 > money then wait
if nMax1 >= MAX1 then wait
nMax1 = nMax1 + 1 : PotionBigHP = PotionBigHP + 1 : money = money - ValeurORPotion3
print #main.map, "place 500 495 ;\"; PotionBigHP
goto [refreshACHATpotions]

[achatPOTION4]
if ValeurORPotion4 > money then wait
if nMax1 >= MAX1 then wait
nMax1 = nMax1 + 1 : PotionBig2HP = PotionBig2HP + 1 : money = money - ValeurORPotion4
print #main.map, "place 830 495 ;\"; PotionBig2HP
goto [refreshACHATpotions]

[achatPOTION5]
if ValeurORPotion5 > money then wait
if nMax1 >= MAX1 then wait
nMax1 = nMax1 + 1 : PotionBig3HP = PotionBig3HP + 1 : money = money - ValeurORPotion5
print #main.map, "place 500 635 ;\"; PotionBig3HP

[refreshACHATpotions]
nombreACHATpop = nombreACHATpop + 1
print #main.map, "font Times New Roman 9 BOLD"
if version = 2 then print #main.map, "place 740 230 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 740 230 ;\"; "Votre Or  : ";money;"     "
print #main.map, "font Times New Roman 10"
if version = 1 then print #main.map, "place 670 250 ;\"; "Place disponible dans votre sac : ";nMax1;" / ";MAX1;"                 "
if version = 2 then print #main.map, "place 670 250 ;\"; "Slot available in your bag : ";nMax1;" / ";MAX1;"                 "
wait

[healer]
'close #main
ValeurORPotion5 = int(240 + (50*(lvlDONJONtota/3)-50))
ValeurORPotion4 = int(140 + (30*(lvlDONJONtota/3)-30))
ValeurORPotion3 = int(75 + (15*(lvlDONJONtota/3)-15))
ValeurORPotion2 = int(40 + (5*(lvlDONJONtota/3)-5))
ValeurORPotion1 = int(15 + (2*(lvlDONJONtota/3)-2))
ValeurORparchemin7 = int(500+(500*(lvlDONJONtota/3)))

if RACE$ = "ARTISAN" then
    ValeurORPotion5 = int(100 + (25*(lvlDONJONtota/3)-25))
    ValeurORPotion4 = int(75 + (15*(lvlDONJONtota/3)-15))
    ValeurORPotion3 = int(40 + (10*(lvlDONJONtota/3)-10))
    ValeurORPotion2 = int(20 + (3*(lvlDONJONtota/3)-5))
    ValeurORPotion1 = int(10 + (1*(lvlDONJONtota/3)-2))
    ValeurORparchemin7 = int(500+(500*(lvlDONJONtota/3)))
end if

#main.map , "down"
print #main.map, "drawbmp mapHEALER 0 0"
print #main.map, "background mapHEALER"
#main.map , "backcolor white; color black;font Times New Roman 25"
if pv = pvTOTAL then print #main.map, "place 540 175 ;\"; "                                                         "
print #main.map, "font Times New Roman 10 BOLD"
if pv < pvTOTAL then
    if version = 1 then #main.map, "place 743 172 ;\"; "SOIGNEZ MOI"
    if version = 2 then #main.map, "place 743 172 ;\"; "HEAL ME"
end if
#main.map, "when leftButtonDown [SimpleClickSOIN]"

print #main.map, "font Times New Roman 10; color black;backcolor white"
'potions----
if version = 1 then
    print #main.map, "place 540 322 ;\"; "Soigne "; int(((pvTOTAL/10)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)));" Pv"
    print #main.map, "place 540 337 ;\"; "Pour ";ValeurORPotion1;" pièces d'or"
    print #main.map, "place 865 322 ;\"; "Soigne "; int(((pvTOTAL/4)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)));" Pv"
    print #main.map, "place 865 337 ;\"; "Pour ";ValeurORPotion2;" pièces d'or"
    print #main.map, "place 540 457 ;\"; "Soigne "; int(((pvTOTAL/2)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)));" Pv"
    print #main.map, "place 540 475 ;\"; "Pour ";ValeurORPotion3;" pièces d'or"
    print #main.map, "place 865 457 ;\"; "Soigne "; int((((pvTOTAL/4)*3)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)));" Pv"
    print #main.map, "place 865 475 ;\"; "Pour ";ValeurORPotion4;" pièces d'or"
    print #main.map, "place 540 597 ;\"; "Soigne totalement"
    print #main.map, "place 540 615 ;\"; "Pour ";ValeurORPotion5;" pièces d'or"
    print #main.map, "place 865 597 ;\"; "Médaillon d'immortalité"
    print #main.map, "place 865 615 ;\"; "Acheter pour ";ValeurORparchemin7;" d'or (1 max)"
end if


if version = 2 then
    print #main.map, "place 540 322 ;\"; "Heal "; int(pvTOTAL/10)+(pmTOTAL*1);" Hp"
    print #main.map, "place 540 337 ;\"; "For ";ValeurORPotion1;" Gold coins"
    print #main.map, "place 865 322 ;\"; "Heal "; int(pvTOTAL/4)+(pmTOTAL*2);" Hp"
    print #main.map, "place 865 337 ;\"; "For ";ValeurORPotion2;" Gold coins"
    print #main.map, "place 540 457 ;\"; "Heal "; int(pvTOTAL/2)+(pmTOTAL*3);" Hp"
    print #main.map, "place 540 475 ;\"; "For ";ValeurORPotion3;" Gold coins"
    print #main.map, "place 865 547 ;\"; "Heal "; int((pvTOTAL/4)*3)+(pmTOTAL*4);" Hp"
    print #main.map, "place 865 475 ;\"; "For ";ValeurORPotion4;" Gold coins"
    print #main.map, "place 540 597 ;\"; "Total Heal"
    print #main.map, "place 540 615 ;\"; "For ";ValeurORPotion5;" Gold coins"
    print #main.map, "place 865 597 ;\"; "Medaillon of immortality"
    print #main.map, "place 865 615 ;\"; "Buy it for ";ValeurORparchemin7;" gold (1 max)"
end if

if version = 1 then print #main.map, "place 670 250 ;\"; "Place disponible dans votre sac : ";nMax1;" / ";MAX1;"                 "
if version = 2 then print #main.map, "place 670 250 ;\"; "Slot available in your bag : ";nMax1;" / ";MAX1;"                 "

print #main.map, "place 500 360 ;\"; PotionLittleHP
print #main.map, "place 830 360 ;\"; PotionMediumHP
print #main.map, "place 500 495 ;\"; PotionBigHP
print #main.map, "place 830 495 ;\"; PotionBig2HP
print #main.map, "place 500 635 ;\"; PotionBig3HP
print #main.map, "place 830 635 ;\"; PARCHEMIN7

soin = int((pvTOTAL-pv)/15)
if soin > ValeurORPotion5 then soin = ValeurORPotion5
if soin = 0 then soin = 1
if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" then soin = 0

print #main, "font Times New Roman 11"
if pv = pvTOTAL then
    if version = 1 then print #main.map, "place 550 125 ;\"; "Bonjour ! J'ai de nombreux articles disponibles."
    if version = 2 then print #main.map, "place 550 125 ;\"; "Hello ! I have a lot of items availables."
    else
    if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" then
        if version = 1 then print #main.map, "place 550 125 ;\"; "Bonjour cher confrère, pour toi les soins sont gratuits ! Veux tu que je te soigne ?"
        if version = 2 then print #main.map, "place 550 125 ;\"; "Hello dear colleague, for you the healing is free ! Do you want to be treated ?"
        goto [secHeal1]
    end if
    if pv < pvTOTAL then
        if version = 1 then print #main.map, "place 550 125 ;\"; "Bonjour ! Je peux te soigner pour "; soin;" pièce(s) d'or."
        if version = 2 then print #main.map, "place 550 125 ;\"; "Hello ! I can heal you for "; soin;" coin(s) of gold ."
    end if
end if
[secHeal1]
print #main.map, "font Times New Roman 9 bold"
if version = 2 then print #main.map, "place 740 230 ;\"; "Your Gold  : ";money
if version = 1 then print #main.map, "place 740 230 ;\"; "Votre Or  : ";money
print #main.map, "backcolor white;font Times New Roman 10; color black"
#main.map, "flush"
wait

[SimpleClickSOIN]
    mX = MouseX
    mY = MouseY

'notice mX;" / ";mY
compteurCLICK = compteurCLICK + 1
    if mX>180 and mX<240 and mY>660 and mY<720 then goto [city]
    if mX>710 and mX<865 and mY>155 and mY<180 then goto [heal]
    if mX>575 and mX<680 and mY>360 and mY<390 then goto [achatPOTION1]
    if mX>905 and mX<1010 and mY>360 and mY<390 then goto [achatPOTION2]
    if mX>575 and mX<680 and mY>495 and mY<525 then goto [achatPOTION3]
    if mX>905 and mX<1010 and mY>495 and mY<525 then goto [achatPOTION4]
    if mX>575 and mX<680 and mY>635 and mY<665 then goto [achatPOTION5]
    if mX>905 and mX<1010 and mY>635 and mY<665 then goto [achatPARCHEMIN7]
wait

[heal]
on error goto [w]
if pv = pvTOTAL then wait
if RACE$ = "HEALER" or RACE$ = "SOIGNEUR" then goto [heal2]
if int((pvTOTAL-pv)/15) > money then wait
if int((pvTOTAL-pv)/15) > ValeurORPotion5 then money = money - ValeurORPotion5
if int((pvTOTAL-pv)/15) < ValeurORPotion5 then money = money - int((pvTOTAL-pv)/15)
[heal2]
pv = pvTOTAL
bouclier = int(20+(9*lvlPASSIVE20*lvlPASSIVE20))
print #main.map, "font Times New Roman 9 bold; color black;backcolor white"
if version = 2 then print #main.map, "place 740 230 ;\"; "Your Gold  : ";money;"      "
if version = 1 then print #main.map, "place 740 230 ;\"; "Votre Or  : ";money;"      "
print #main.map, "font Times New Roman 9; color black;backcolor white"
print #main.map, "backcolor white; color black"
if version = 1 then print #main.map, "place 550 125 ;\"; "Tu es maintenant en pleine santé. Bonne journée !                                                                            "
if version = 2 then print #main.map, "place 550 125 ;\"; "You are now full life. Have a good day !                                                                                     "
#main.map , "backcolor white; color black"
print #main.map, "font Times New Roman 25"
print #main.map, "place 540 175 ;\"; "                                                         "
print #main.map, "font Times New Roman 9"
print #main.b1, ""
wait

[achatPoP]
if ValeurORPoP > money then wait
print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
PoP = PoP + 1
money = money - ValeurORPoP
if version = 2 then print #main.map, "place 740 100 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 740 100 ;\"; "Votre Or  : ";money;"     "
print #main.map, "font Times New Roman 8; color black;backcolor white"
add2 = add2 + 1
ValeurORPoP = int(1000+(100*add2))
if version = 1 then print #main.map, "place 710 458 ;\"; "Pour ";ValeurORPoP;" pièces d'or"
if version = 2 then print #main.map, "place 710 458 ;\"; "For ";ValeurORPoP;" coin gold"
print #main.map, "place 845 443 ;\"; PoP;"  "
wait


[SimpleClickLIBRARY]
mX = MouseX
mY = MouseY
compteurCLICK = compteurCLICK + 1
'notice mX;" / "; mY

    print #main.map, "font Times New Roman 8; color black"
    if mX>145 and mX<204 and mY>625 and mY<680 then goto [city]

    if mX>510 and mX<580 and mY>210 and mY<300 then
        INDEXmatriceBOUTIQ = INDEXmatriceBOUTIQ - 1
        if INDEXmatriceBOUTIQ < 1 then INDEXmatriceBOUTIQ = 24
        if INDEXmatriceBOUTIQ > 24 then INDEXmatriceBOUTIQ = 1
        goto [library2]
    end if

    if mX>1000 and mX<1070 and mY>210 and mY<300 then
        INDEXmatriceBOUTIQ = INDEXmatriceBOUTIQ + 1
        if INDEXmatriceBOUTIQ < 1 then INDEXmatriceBOUTIQ = 24
        if INDEXmatriceBOUTIQ > 24 then INDEXmatriceBOUTIQ = 1
        goto [library2]
    end if

    if mX>685 and mX<885 and mY>315 and mY<340 then
        if INDEXmatriceBOUTIQ = 1 then goto [achatPASSIVE1]
        if INDEXmatriceBOUTIQ = 2 then goto [achatPASSIVE2]
        if INDEXmatriceBOUTIQ = 3 then goto [achatPASSIVE3]
        if INDEXmatriceBOUTIQ = 4 then goto [achatPASSIVE4]
        if INDEXmatriceBOUTIQ = 5 then goto [achatPASSIVE5]
        if INDEXmatriceBOUTIQ = 6 then goto [achatPASSIVE6]
        if INDEXmatriceBOUTIQ = 7 then goto [achatPASSIVE7]
        if INDEXmatriceBOUTIQ = 8 then goto [achatPASSIVE8]
        if INDEXmatriceBOUTIQ = 9 then goto [achatPASSIVE9]
        if INDEXmatriceBOUTIQ = 10 then goto [achatPASSIVE10]
        if INDEXmatriceBOUTIQ = 11 then goto [achatPASSIVE11]
        if INDEXmatriceBOUTIQ = 12 then goto [achatPASSIVE12]
        if INDEXmatriceBOUTIQ = 13 then goto [achatPASSIVE13]
        if INDEXmatriceBOUTIQ = 14 then goto [achatPASSIVE14]
        if INDEXmatriceBOUTIQ = 15 then goto [achatPASSIVE15]
        if INDEXmatriceBOUTIQ = 16 then goto [achatPASSIVE16]
        if INDEXmatriceBOUTIQ = 17 then goto [achatPASSIVE17]
        if INDEXmatriceBOUTIQ = 18 then goto [achatPASSIVE18]
        if INDEXmatriceBOUTIQ = 19 then goto [achatPASSIVE19]
        if INDEXmatriceBOUTIQ = 20 then goto [achatPASSIVE20]
        if INDEXmatriceBOUTIQ = 21 then goto [achatPASSIVE21]
        if INDEXmatriceBOUTIQ = 22 then goto [achatPASSIVE22]
        if INDEXmatriceBOUTIQ = 23 then goto [achatPASSIVE23]
        if INDEXmatriceBOUTIQ = 24 then goto [achatPASSIVE24]
    end if

wait

[pictureskill]
if INDEXmatriceBOUTIQ = 1 then print #main.map, "drawbmp s1 625 200"
if INDEXmatriceBOUTIQ = 2 then print #main.map, "drawbmp s2 625 200"
if INDEXmatriceBOUTIQ = 3 then print #main.map, "drawbmp s3 625 200"
if INDEXmatriceBOUTIQ = 4 then print #main.map, "drawbmp s4 625 200"
if INDEXmatriceBOUTIQ = 5 then print #main.map, "drawbmp s5 625 200"
if INDEXmatriceBOUTIQ = 6 then print #main.map, "drawbmp s6 625 200"
if INDEXmatriceBOUTIQ = 7 then print #main.map, "drawbmp s7 625 200"
if INDEXmatriceBOUTIQ = 8 then print #main.map, "drawbmp s8 625 200"
if INDEXmatriceBOUTIQ = 9 then print #main.map, "drawbmp s9 625 200"
if INDEXmatriceBOUTIQ = 10 then print #main.map, "drawbmp s10 625 200"
if INDEXmatriceBOUTIQ = 11 then print #main.map, "drawbmp s11 625 200"
if INDEXmatriceBOUTIQ = 12 then print #main.map, "drawbmp s12 625 200"
if INDEXmatriceBOUTIQ = 13 then print #main.map, "drawbmp s13 625 200"
if INDEXmatriceBOUTIQ = 14 then print #main.map, "drawbmp s14 625 200"
if INDEXmatriceBOUTIQ = 15 then print #main.map, "drawbmp s15 625 200"
if INDEXmatriceBOUTIQ = 16 then print #main.map, "drawbmp s16 625 200"
if INDEXmatriceBOUTIQ = 17 then print #main.map, "drawbmp s17 625 200"
if INDEXmatriceBOUTIQ = 18 then print #main.map, "drawbmp s18 625 200"
if INDEXmatriceBOUTIQ = 19 then print #main.map, "drawbmp s19 625 200"
if INDEXmatriceBOUTIQ = 20 then print #main.map, "drawbmp s20 625 200"
if INDEXmatriceBOUTIQ = 21 then print #main.map, "drawbmp s21 625 200"
if INDEXmatriceBOUTIQ = 22 then print #main.map, "drawbmp s22 625 200"
if INDEXmatriceBOUTIQ = 23 then print #main.map, "drawbmp s23 625 200"
if INDEXmatriceBOUTIQ = 24 then print #main.map, "drawbmp s24 625 200"
return

[library]

INDEXmatriceBOUTIQ = 1
INDEXmatriceBOUTIQmax = 24
ValeurPASSIVE1 = int(1250+(1250*lvlPASSIVE1))
ValeurPASSIVE2 = int(1000+(1000*lvlPASSIVE2))
ValeurPASSIVE3 = int(1000+(1000*lvlPASSIVE3))
ValeurPASSIVE4 = int(500+(500*lvlPASSIVE4))
ValeurPASSIVE5 = int(1000+(1000*lvlPASSIVE5))
ValeurPASSIVE6 = int(1500+(1500*lvlPASSIVE6))
ValeurPASSIVE7 = int(1000+(1000*lvlPASSIVE7))
ValeurPASSIVE8 = int(500+(500*lvlPASSIVE8))
ValeurPASSIVE9 = int(500+(500*lvlPASSIVE9))
ValeurPASSIVE10 = int(500+(500*lvlPASSIVE10))
ValeurPASSIVE11 = int(1000+(1000*lvlPASSIVE11))
ValeurPASSIVE12 = int(1000+(1000*lvlPASSIVE12))
ValeurPASSIVE13 = int(1000+(1000*lvlPASSIVE13))
ValeurPASSIVE14 = int(1000+(1000*lvlPASSIVE14))
ValeurPASSIVE15 = int(1000+(1000*lvlPASSIVE15))
ValeurPASSIVE16 = int(1000+(1000*lvlPASSIVE16))
ValeurPASSIVE17 = int(1000+(1000*lvlPASSIVE17))
ValeurPASSIVE18 = int(1000+(1000*lvlPASSIVE18))
ValeurPASSIVE19 = int(1000+(1000*lvlPASSIVE19))
ValeurPASSIVE20 = int(1000+(1000*lvlPASSIVE20))
ValeurPASSIVE21 = int(1000+(1000*lvlPASSIVE21))
ValeurPASSIVE22 = int(1000+(1000*lvlPASSIVE22))
ValeurPASSIVE23 = int(1000+(1000*lvlPASSIVE23))
ValeurPASSIVE24 = int(1000+(1000*lvlPASSIVE24))


ValeurORparchemin1 = int(200+(100*(lvlDONJONtota/3)))
ValeurORparchemin2 = int(150+(75*(lvlDONJONtota/3)))
ValeurORparchemin3 = int(150+(75*(lvlDONJONtota/3)))
ValeurORparchemin4 = int(50+(25*(lvlDONJONtota/3)))
ValeurORparchemin5 = int(200+(100*(lvlDONJONtota/3)))
ValeurORparchemin6 = int(500+(250*(lvlDONJONtota/3)))
ValeurORPoP = int(1000+(100*add2))

#main.map, "cls"
#main.map, "when leftButtonDown [SimpleClickLIBRARY]"
#main.map , "down;fill white"
print #main.map, "drawbmp lib 0 0"
print #main.map, "background lib"

[library2]
gosub [pictureskill]
print #main.map, "font Times New Roman 25; color black;backcolor white"
#main.map, "place 570 110 ;\"; "MAITRE MAGE DE LA VILLE"
print #main.map, "font Times New Roman 9 bold; color black;backcolor white"
if version = 2 then print #main.map, "place 730 370 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 730 370 ;\"; "Votre Or  : ";money;"     "
'#main.map, "place 755 480 ;\";
print #main.map, "font Times New Roman 9; color black;backcolor white"
gosub [dataMATRICEboutiq]

print #main.map, "place 630 267 ;\"; "Descriptif :                                                                                     \                                                                                                          \                                                                "
if version = 1 then
    print #main.map, "font Times New Roman 6; color black;backcolor white"
    print #main.map, "place 628 210 ;\"; lvlUPGRADEcompetenceBOUTIQ
    print #main.map, "font Times New Roman 12 bold; color black;backcolor white"
    print #main.map, "place 695 230 ;\"; "                                                                "
    print #main.map, "place 695 230 ;\"; "Compétence : ";NameCompetenceBOUTIQ$;"         "
    print #main.map, "font Times New Roman 8; color black;backcolor white"
    print #main.map, "place 630 300 ;\"; "                                          ";prixUPGRADEboutiq; " pièces d'or";"               "
    print #main.map, "place 630 267 ;\"; "                     ";descriptBOUTIQ$;"             "
    print #main.map, "place 713 332 ;\"; "AMELIORER COMPETENCE"
    print #main.map, "place 420 270 ;\"; "Précédent :\";NameCompetenceBOUTIQ2$;"       "
    print #main.map, "place 1100 270 ;\"; "Suivant :\";NameCompetenceBOUTIQ3$;"        "
    print #main.map, "font Times New Roman 8 bold; color black;backcolor white"
    print #main.map, "place 630 267 ;\"; "Descriptif :"
    print #main.map, "place 630 300 ;\"; "Prix de l'amélioration :"
    print #main.map, "font Times New Roman 8; color green;backcolor black"
    print #main.map, "place 752 444 ;\"; "DEBUTANT"
    print #main.map, "font Times New Roman 8; color white;backcolor black"
    print #main.map, "place 749 515 ;\"; "CONFIRMER"
    print #main.map, "place 756 589 ;\"; "MAITRISE"
    print #main.map, "place 766 673 ;\"; "DIVIN"
end if

if version = 2 then
    print #main.map, "font Times New Roman 12 bold; color black;backcolor white"
    print #main.map, "place 695 230 ;\"; "Skills : ";NameCompetenceBOUTIQ$;"            "
    print #main.map, "font Times New Roman 8; color black;backcolor white"
    print #main.map, "place 626 210 ;\"; lvlUPGRADEcompetenceBOUTIQ;"               "
    print #main.map, "place 630 300 ;\"; "Upgrade price : ";prixUPGRADEboutiq; " pièces d'or";"               "
    print #main.map, "place 630 267 ;\"; "             : ";descriptBOUTIQ$;"               "
    print #main.map, "place 713 332 ;\"; "UPGRADE SKILL POINT"
    print #main.map, "place 420 257 ;\"; "Précédent :\";NameCompetenceBOUTIQ2$;"        "
    print #main.map, "place 1100 257 ;\"; "Next :\";NameCompetenceBOUTIQ3$;"        "
    print #main.map, "font Times New Roman 8 bold; color black;backcolor white"
    print #main.map, "place 630 267 ;\"; "Descriptif :"
    print #main.map, "place 630 300 ;\"; "Upgrade price :"
    print #main.map, "font Times New Roman 8; color green;backcolor black"
    print #main.map, "place 752 444 ;\"; "STARTER"
    print #main.map, "font Times New Roman 8; color white;backcolor black"
    print #main.map, "place 749 515 ;\"; "CONFIRMED"
    print #main.map, "place 761 589 ;\"; "MASTER"
    print #main.map, "place 766 673 ;\"; "DIVIN"
end if

 '   print #main.map, "place 590 623 ;\"; FragmentBLEU1;"     "
 '   print #main.map, "place 776 623 ;\"; FragmentBLEU2;"     "
 '   print #main.map, "place 965 623 ;\"; FragmentBLEU3;"     "

print #main.map, "flush"
wait

[dataMATRICEboutiq]

select case INDEXmatriceBOUTIQ
    case 1
    NameCompetenceBOUTIQ$ = " Santé"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE1
    prixUPGRADEboutiq = ValeurPASSIVE1
    descriptBOUTIQ$ = "Compétence qui augmente la santé de votre \personnage de facon définitive."
    NameCompetenceBOUTIQ2$ = "Mineur"
    NameCompetenceBOUTIQ3$ = "Attaque"
    case 2
    NameCompetenceBOUTIQ$ = "Attaque"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE2
    prixUPGRADEboutiq = ValeurPASSIVE2
    descriptBOUTIQ$ = "Compétence qui augmente l'attaque de votre \personnage de facon définitive."
    NameCompetenceBOUTIQ2$ = "Santé"
    NameCompetenceBOUTIQ3$ = "Défense"
    case 3
    NameCompetenceBOUTIQ$ = "Défense"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE3
    prixUPGRADEboutiq = ValeurPASSIVE3
    descriptBOUTIQ$ = "Compétence qui augmente la défense de votre \personnage de facon définitive."
    NameCompetenceBOUTIQ2$ = "Attaque"
    NameCompetenceBOUTIQ3$ = "Science"
    case 4
    NameCompetenceBOUTIQ$ = "Science"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE4
    prixUPGRADEboutiq = ValeurPASSIVE4
    descriptBOUTIQ$ = "Compétence qui augmente la science de votre \personnage de facon définitive."
    NameCompetenceBOUTIQ2$ = "Défense"
    NameCompetenceBOUTIQ3$ = "Expérience"
    case 5
    NameCompetenceBOUTIQ$ = "Exp."
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE5
    prixUPGRADEboutiq = ValeurPASSIVE5
    descriptBOUTIQ$ = "Compétence qui augmente l'expérience gagné après\un combat de facon définitive."
    NameCompetenceBOUTIQ2$ = "Science"
    NameCompetenceBOUTIQ3$ = "Richesse"
    case 6
    NameCompetenceBOUTIQ$ = "Richesse"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE6
    prixUPGRADEboutiq = ValeurPASSIVE6
    descriptBOUTIQ$ = "Compétence qui augmente l'or gagné après un combat\de facon définitive."
    NameCompetenceBOUTIQ2$ = "Expérience"
    NameCompetenceBOUTIQ3$ = "Vol-vie"
    case 7
    NameCompetenceBOUTIQ$ = "Vol-vie"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE7
    prixUPGRADEboutiq = ValeurPASSIVE7
    descriptBOUTIQ$ = "Compétence qui augmente le vol-vie de votre\personnage lors des combats de facon définitive."
    NameCompetenceBOUTIQ2$ = "Richesse"
    NameCompetenceBOUTIQ3$ = "Force"
    case 8
    NameCompetenceBOUTIQ$ = "Force"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE8
    prixUPGRADEboutiq = ValeurPASSIVE8
    descriptBOUTIQ$ = "Compétence qui augmente la force pour chaque \niveaux gagnés de facon définitive."
    NameCompetenceBOUTIQ2$ = "Vol-vie"
    NameCompetenceBOUTIQ3$ = "Agilité"
    case 9
    NameCompetenceBOUTIQ$ = "Agilité"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE9
    prixUPGRADEboutiq = ValeurPASSIVE9
    descriptBOUTIQ$ = "Compétence qui augmente l'agilité pour chaque \niveaux gagnés de facon définitive."
    NameCompetenceBOUTIQ2$ = "Force"
    NameCompetenceBOUTIQ3$ = "Science"
    case 10
    NameCompetenceBOUTIQ$ = "Science"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE10
    prixUPGRADEboutiq = ValeurPASSIVE10
    descriptBOUTIQ$ = "Compétence qui augmente la science pour chaque \niveaux gagnés de facon définitive."
    NameCompetenceBOUTIQ2$ = "Agilité"
    NameCompetenceBOUTIQ3$ = "Anti tueur"
    case 11
    NameCompetenceBOUTIQ$ = "Anti PK"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE11
    prixUPGRADEboutiq = ValeurPASSIVE11
    descriptBOUTIQ$ = "Compétence qui diminue de facon définitive \les dégâts reçu par les autres joueurs."
    NameCompetenceBOUTIQ2$ = "Agilité"
    NameCompetenceBOUTIQ3$ = "Anti Boss"
    case 12
    NameCompetenceBOUTIQ$ = "Anti Boss"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE12
    prixUPGRADEboutiq = ValeurPASSIVE12
    descriptBOUTIQ$ = "Compétence qui diminue de facon définitive \les dégâts reçu par les boss de palier."
    NameCompetenceBOUTIQ2$ = "Anti PK"
    NameCompetenceBOUTIQ3$ = "Résurection"
    case 13
    NameCompetenceBOUTIQ$ = "Résurection"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE13
    prixUPGRADEboutiq = ValeurPASSIVE13
    descriptBOUTIQ$ = "Vous permet de revivre après avoir tuer \un nombre défini d'ennemis."
    NameCompetenceBOUTIQ2$ = "Anti Boss"
    NameCompetenceBOUTIQ3$ = "Equipement"
    case 14
    NameCompetenceBOUTIQ$ = "Equipement"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE14
    prixUPGRADEboutiq = ValeurPASSIVE14
    descriptBOUTIQ$ = "Améliore le niveau d'amélioration de vos \équipements."
    NameCompetenceBOUTIQ2$ = "Résurection"
    NameCompetenceBOUTIQ3$ = "Diminution coût"
    case 15
    NameCompetenceBOUTIQ$ = "Amélioration"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE15
    prixUPGRADEboutiq = ValeurPASSIVE15
    descriptBOUTIQ$ = "Diminution du coût d'amélioration de vos \équipements."
    NameCompetenceBOUTIQ2$ = "Equipement"
    NameCompetenceBOUTIQ3$ = "Boost Potions"
    case 16
    NameCompetenceBOUTIQ$ = "Boost Potions"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE16
    prixUPGRADEboutiq = ValeurPASSIVE16
    descriptBOUTIQ$ = "Augmente le maximum des points de vie rendu \par vos potions."
    NameCompetenceBOUTIQ2$ = "Diminution coût"
    NameCompetenceBOUTIQ3$ = "Chef de guilde"
    case 17
    NameCompetenceBOUTIQ$ = "Chef de guilde"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE17
    prixUPGRADEboutiq = ValeurPASSIVE17
    descriptBOUTIQ$ = "Augmente le nombre maximal que votre guilde \peut avoir comme membre."
    NameCompetenceBOUTIQ2$ = "Boost Potions"
    NameCompetenceBOUTIQ3$ = "Honneur et force"
    case 18
    NameCompetenceBOUTIQ$ = "Honneur et force"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE18
    prixUPGRADEboutiq = ValeurPASSIVE18
    descriptBOUTIQ$ = "Augmente les caractéristiques des membres \de votre guilde de façon permanente."
    NameCompetenceBOUTIQ2$ = "Chef de guilde"
    NameCompetenceBOUTIQ3$ = "Rage du Berserk"
    case 19
    NameCompetenceBOUTIQ$ = "Berserker"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE19
    prixUPGRADEboutiq = ValeurPASSIVE19
    descriptBOUTIQ$ = "Augment fortement votre attaque mais diminue \fortement votre défense."
    NameCompetenceBOUTIQ2$ = "Honneur et force"
    NameCompetenceBOUTIQ3$ = "Barrière spirituelle"
    case 20
    NameCompetenceBOUTIQ$ = "Barrière psy"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE20
    prixUPGRADEboutiq = ValeurPASSIVE20
    descriptBOUTIQ$ = "Créé un champ de protection qui absorbe les \dégâts. Peut être recharger en se soignant."
    NameCompetenceBOUTIQ2$ = "Rage du Berserk"
    NameCompetenceBOUTIQ3$ = "Conquérant"
    case 21
    NameCompetenceBOUTIQ$ = "Conquérant"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE21
    prixUPGRADEboutiq = ValeurPASSIVE21
    descriptBOUTIQ$ = "Donne un bonus a votre guilde lorsque vous êtes \en guerre contre une autre."
    NameCompetenceBOUTIQ2$ = "Barrière spirituelle"
    NameCompetenceBOUTIQ3$ = "Impot de guerre"
    case 22
    NameCompetenceBOUTIQ$ = "Impôt"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE22
    prixUPGRADEboutiq = ValeurPASSIVE22
    descriptBOUTIQ$ = "Permet d'avoir un bonus d'or lorsque vous tué un \autre joueur."
    NameCompetenceBOUTIQ2$ = "Conquérant"
    NameCompetenceBOUTIQ3$ = "Coup critique"
    case 23
    NameCompetenceBOUTIQ$ = "Coup critique"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE23
    prixUPGRADEboutiq = ValeurPASSIVE23
    descriptBOUTIQ$ = "Permet d'avoir un pourcentage de coup critique \infliguant un multiplicateur a vos dégâts."
    NameCompetenceBOUTIQ2$ = "Impot de guerre"
    NameCompetenceBOUTIQ3$ = "mineur"
    case 24
    NameCompetenceBOUTIQ$ = "Mineur"
    lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE24
    prixUPGRADEboutiq = ValeurPASSIVE24
    descriptBOUTIQ$ = "Augmente la probabilité de découvrir un cristal \après un combat, sur la carte."
    NameCompetenceBOUTIQ2$ = "Coup critique"
    NameCompetenceBOUTIQ3$ = "Santé"
end select
return

[refreshACHATparch]
print #main.map, "font Times New Roman 6; color black;backcolor white"
print #main.map, "place 627 210 ;\"; lvlUPGRADEcompetenceBOUTIQ
print #main.map, "font Times New Roman 8; color black;backcolor white"
print #main.map, "place 630 300 ;\"; "                                          ";prixUPGRADEboutiq; " pièces d'or";"               "
print #main.map, "font Times New Roman 9 bold; color black;backcolor white"
if version = 2 then print #main.map, "place 730 370 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 730 370 ;\"; "Votre Or  : ";money;"     "
print #main.map, "font Times New Roman 8 bold; color black;backcolor white"
print #main.map, "place 630 300 ;\"; "Prix de l'amélioration :"
print #main.map, "font Times New Roman 8; color black;backcolor white"
wait

[achatPASSIVE1]
if money < ValeurPASSIVE1 then wait
money = money - ValeurPASSIVE1 : lvlPASSIVE1 = lvlPASSIVE1 + 1 : pv = pv + int(20+(7*LvlDONJON)) : pvTOTAL = pvTOTAL + int(20+(7*LvlDONJON)) : add1 = add1 + 1 : ValeurPASSIVE1 = int(1250+(1250*lvlPASSIVE1)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE1 : prixUPGRADEboutiq = ValeurPASSIVE1
goto [refreshACHATparch]
[achatPASSIVE2]
if money < ValeurPASSIVE2 then wait
money = money - ValeurPASSIVE2 : lvlPASSIVE2 = lvlPASSIVE2 + 1 : atk = atk + int(4+(3*LvlDONJON)) : add1 = add1 + 1 : ValeurPASSIVE2 = int(1000+(1000*lvlPASSIVE2)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE2 : prixUPGRADEboutiq = ValeurPASSIVE2
goto [refreshACHATparch]
[achatPASSIVE3]
if money < ValeurPASSIVE3 then wait
money = money - ValeurPASSIVE3 : lvlPASSIVE3 = lvlPASSIVE3 + 1 : def = def + int(4+(3*LvlDONJON)) : add1 = add1 + 1 : ValeurPASSIVE3 = int(1000+(1000*lvlPASSIVE3)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE3 : prixUPGRADEboutiq = ValeurPASSIVE3
goto [refreshACHATparch]
[achatPASSIVE4]
if money < ValeurPASSIVE4 then wait
money = money - ValeurPASSIVE4 : lvlPASSIVE4 = lvlPASSIVE4 + 1 : pm = pm + int(4+(1*LvlDONJON)) : pmTOTAL = pmTOTAL + int(4+(1*LvlDONJON)) : add1 = add1 + 1 : ValeurPASSIVE4 = int(500+(500*lvlPASSIVE4)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE4 : prixUPGRADEboutiq = ValeurPASSIVE4
goto [refreshACHATparch]
[achatPASSIVE5]
if money < ValeurPASSIVE5 then wait
money = money - ValeurPASSIVE5 : lvlPASSIVE5 = lvlPASSIVE5 + 1 : BONUSxp = BONUSxp + int(47+(3*LvlDONJON)) : add1 = add1 + 1 : ValeurPASSIVE5 = int(1000+(1000*lvlPASSIVE5)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE5 : prixUPGRADEboutiq = ValeurPASSIVE5
goto [refreshACHATparch]
[achatPASSIVE6]
if money < ValeurPASSIVE6 then wait
money = money - ValeurPASSIVE6 : lvlPASSIVE6 = lvlPASSIVE6 + 1 : add1 = add1 + 1 : ValeurPASSIVE6 = int(1500+(1500*lvlPASSIVE6)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE6 : prixUPGRADEboutiq = ValeurPASSIVE6
goto [refreshACHATparch]
[achatPASSIVE7]
if money < ValeurPASSIVE7 then wait
money = money - ValeurPASSIVE7 : lvlPASSIVE7 = lvlPASSIVE7 + 1 : add1 = add1 + 1 : ValeurPASSIVE7 = int(1000+(1000*lvlPASSIVE7)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE7 : prixUPGRADEboutiq = ValeurPASSIVE7
goto [refreshACHATparch]
[achatPASSIVE8]
if money < ValeurPASSIVE8 then wait
money = money - ValeurPASSIVE8 : lvlPASSIVE8 = lvlPASSIVE8 + 1 : add1 = add1 + 1 : ValeurPASSIVE8 = int(500+(500*lvlPASSIVE8)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE8 : prixUPGRADEboutiq = ValeurPASSIVE8
goto [refreshACHATparch]
[achatPASSIVE9]
if money < ValeurPASSIVE9 then wait
money = money - ValeurPASSIVE9 : lvlPASSIVE9 = lvlPASSIVE9 + 1 : add1 = add1 + 1 : ValeurPASSIVE9 = int(500+(500*lvlPASSIVE9)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE9 : prixUPGRADEboutiq = ValeurPASSIVE9
goto [refreshACHATparch]
[achatPASSIVE10]
if money < ValeurPASSIVE10 then wait
money = money - ValeurPASSIVE10 : lvlPASSIVE10 = lvlPASSIVE10 + 1 : add1 = add1 + 1 : ValeurPASSIVE10 = int(500+(500*lvlPASSIVE10)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE10 : prixUPGRADEboutiq = ValeurPASSIVE10
goto [refreshACHATparch]
[achatPASSIVE11]
if money < ValeurPASSIVE11 then wait
money = money - ValeurPASSIVE11 : lvlPASSIVE11 = lvlPASSIVE11 + 1 : add1 = add1 + 1 : ValeurPASSIVE11 = int(1000+(1000*lvlPASSIVE11)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE11 : prixUPGRADEboutiq = ValeurPASSIVE11
goto [refreshACHATparch]
[achatPASSIVE12]
if money < ValeurPASSIVE12 then wait
money = money - ValeurPASSIVE12 : lvlPASSIVE12 = lvlPASSIVE12 + 1 : add1 = add1 + 1 : ValeurPASSIVE12 = int(1000+(1000*lvlPASSIVE12)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE12 : prixUPGRADEboutiq = ValeurPASSIVE12
goto [refreshACHATparch]
[achatPASSIVE13]
if money < ValeurPASSIVE13 then wait
money = money - ValeurPASSIVE13 : lvlPASSIVE13 = lvlPASSIVE13 + 1 : add1 = add1 + 1 : ValeurPASSIVE13 = int(1000+(1000*lvlPASSIVE13)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE13 : prixUPGRADEboutiq = ValeurPASSIVE13
goto [refreshACHATparch]
[achatPASSIVE14]
if money < ValeurPASSIVE14 then wait
money = money - ValeurPASSIVE14 : lvlPASSIVE14 = lvlPASSIVE14 + 1 : add1 = add1 + 1 : ValeurPASSIVE14 = int(1000+(1000*lvlPASSIVE14)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE14 : prixUPGRADEboutiq = ValeurPASSIVE14
goto [refreshACHATparch]
[achatPASSIVE15]
if money < ValeurPASSIVE15 then wait
money = money - ValeurPASSIVE15 : lvlPASSIVE15 = lvlPASSIVE15 + 1 : add1 = add1 + 1 : ValeurPASSIVE15 = int(1000+(1000*lvlPASSIVE15)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE15 : prixUPGRADEboutiq = ValeurPASSIVE15
goto [refreshACHATparch]
[achatPASSIVE16]
if money < ValeurPASSIVE16 then wait
money = money - ValeurPASSIVE12 : lvlPASSIVE16 = lvlPASSIVE16 + 1 : add1 = add1 + 1 : ValeurPASSIVE16 = int(1000+(1000*lvlPASSIVE16)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE16 : prixUPGRADEboutiq = ValeurPASSIVE16
goto [refreshACHATparch]
[achatPASSIVE17]
if money < ValeurPASSIVE17 then wait
money = money - ValeurPASSIVE17 : lvlPASSIVE17 = lvlPASSIVE17 + 1 : add1 = add1 + 1 : ValeurPASSIVE17 = int(1000+(1000*lvlPASSIVE17)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE17 : prixUPGRADEboutiq = ValeurPASSIVE17
goto [refreshACHATparch]
[achatPASSIVE18]
if money < ValeurPASSIVE18 then wait
money = money - ValeurPASSIVE18 : lvlPASSIVE18 = lvlPASSIVE18 + 1 : add1 = add1 + 1 : ValeurPASSIVE18 = int(1000+(1000*lvlPASSIVE18)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE18 : prixUPGRADEboutiq = ValeurPASSIVE18
goto [refreshACHATparch]
[achatPASSIVE19]
if money < ValeurPASSIVE19 then wait
money = money - ValeurPASSIVE19 : lvlPASSIVE19 = lvlPASSIVE19 + 1 : add1 = add1 + 1 : ValeurPASSIVE19 = int(1000+(1000*lvlPASSIVE19)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE19 : prixUPGRADEboutiq = ValeurPASSIVE19
goto [refreshACHATparch]
[achatPASSIVE20]
if money < ValeurPASSIVE20 then wait
money = money - ValeurPASSIVE20 : lvlPASSIVE20 = lvlPASSIVE20 + 1 : add1 = add1 + 1 : ValeurPASSIVE20 = int(1000+(1000*lvlPASSIVE20)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE20 : prixUPGRADEboutiq = ValeurPASSIVE20 : bouclier = int(20+(9*lvlPASSIVE20*lvlPASSIVE20))
goto [refreshACHATparch]
[achatPASSIVE21]
if money < ValeurPASSIVE18 then wait
money = money - ValeurPASSIVE21 : lvlPASSIVE21 = lvlPASSIVE21 + 1 : add1 = add1 + 1 : ValeurPASSIVE21 = int(1000+(1000*lvlPASSIVE21)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE21 : prixUPGRADEboutiq = ValeurPASSIVE21
goto [refreshACHATparch]
[achatPASSIVE22]
if money < ValeurPASSIVE22 then wait
money = money - ValeurPASSIVE22 : lvlPASSIVE22 = lvlPASSIVE22 + 1 : add1 = add1 + 1 : ValeurPASSIVE22 = int(1000+(1000*lvlPASSIVE22)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE22 : prixUPGRADEboutiq = ValeurPASSIVE22
goto [refreshACHATparch]
[achatPASSIVE23]
if money < ValeurPASSIVE23 then wait
money = money - ValeurPASSIVE23 : lvlPASSIVE23 = lvlPASSIVE23 + 1 : add1 = add1 + 1 : ValeurPASSIVE23 = int(1000+(1000*lvlPASSIVE23)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE23 : prixUPGRADEboutiq = ValeurPASSIVE23
goto [refreshACHATparch]
[achatPASSIVE24]
if money < ValeurPASSIVE24 then wait
money = money - ValeurPASSIVE24 : lvlPASSIVE24 = lvlPASSIVE24 + 1 : add1 = add1 + 1 : ValeurPASSIVE24 = int(1000+(1000*lvlPASSIVE24)) : lvlUPGRADEcompetenceBOUTIQ = lvlPASSIVE24 : prixUPGRADEboutiq = ValeurPASSIVE24
goto [refreshACHATparch]

[SimpleClickLIBRARY2]
mX = MouseX
mY = MouseY
compteurCLICK = compteurCLICK + 1
'notice mX;" / "; mY

    print #main.map, "font Times New Roman 8; color black"
    if mX>170 and mX<225 and mY>605 and mY<660 then goto [city]

    if mX>510 and mX<580 and mY>210 and mY<300 then
        INDEXmatriceBOUTIQ = INDEXmatriceBOUTIQ - 1
        if INDEXmatriceBOUTIQ < 1 then INDEXmatriceBOUTIQ = 6
        if INDEXmatriceBOUTIQ > 6 then INDEXmatriceBOUTIQ = 1
        goto [library4]
    end if

    if mX>1000 and mX<1070 and mY>210 and mY<300 then
        INDEXmatriceBOUTIQ = INDEXmatriceBOUTIQ + 1
        if INDEXmatriceBOUTIQ < 1 then INDEXmatriceBOUTIQ = 6
        if INDEXmatriceBOUTIQ > 6 then INDEXmatriceBOUTIQ = 1
        goto [library4]
    end if

    if mX>685 and mX<885 and mY>315 and mY<340 then
        if INDEXmatriceBOUTIQ = 1 then goto [achatPARCHEMIN1]
        if INDEXmatriceBOUTIQ = 2 then goto [achatPARCHEMIN2]
        if INDEXmatriceBOUTIQ = 3 then goto [achatPARCHEMIN3]
        if INDEXmatriceBOUTIQ = 4 then goto [achatPARCHEMIN4]
        if INDEXmatriceBOUTIQ = 5 then goto [achatPARCHEMIN5]
        if INDEXmatriceBOUTIQ = 6 then goto [achatPARCHEMIN6]
    end if
wait

[library3]
INDEXmatriceBOUTIQ = 1
INDEXmatriceBOUTIQmax = 6
ValeurORparchemin1 = int(200+(100*(lvlDONJONtota/3)))
ValeurORparchemin2 = int(150+(75*(lvlDONJONtota/3)))
ValeurORparchemin3 = int(150+(75*(lvlDONJONtota/3)))
ValeurORparchemin4 = int(50+(25*(lvlDONJONtota/3)))
ValeurORparchemin5 = int(200+(100*(lvlDONJONtota/3)))
ValeurORparchemin6 = int(500+(250*(lvlDONJONtota/3)))
ValeurORPoP = int(1000+(100*add2))
#main.map, "cls"
#main.map, "when leftButtonDown [SimpleClickLIBRARY2]"
#main.map , "down;fill white"
print #main.map, "drawbmp mapMARCHAND4 0 0"
print #main.map, "background mapMARCHAND4"

[library4]
print #main.map, "font Times New Roman 25; color black;backcolor white"
#main.map, "place 700 80 ;\"; "LIBRAIRIE"
print #main.map, "font Times New Roman 9 bold; color black;backcolor white"
if version = 2 then print #main.map, "place 730 370 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 730 370 ;\"; "Votre Or  : ";money;"     "
'#main.map, "place 755 480 ;\";
print #main.map, "font Times New Roman 8; color black;backcolor white"
gosub [dataMATRICEboutiq2]

print #main.map, "place 630 240 ;\"; "Descriptif :                                                                                      \                                                                                                          \                                                                "

if version = 1 then
    print #main.map, "font Times New Roman 12 bold; color black;backcolor white"
    print #main.map, "place 675 170 ;\"; "Parchemin de type ";NameCompetenceBOUTIQ$;"  ( "; INDEXmatriceBOUTIQ;" / ";INDEXmatriceBOUTIQmax;" )      "
    print #main.map, "font Times New Roman 8; color black;backcolor white"
    print #main.map, "place 630 210 ;\"; "Nombre de parchemins achétés : ";NOMBREparcheminBOUTIQ; " ( Sac : ";nMax2 ;" / "; MAX2;" )    "
    print #main.map, "place 630 300 ;\"; "Prix d'achat du parchemin : ";prixUPGRADEboutiq; " pièces d'or";"               "
    print #main.map, "place 630 240 ;\"; "Descriptif : ";descriptBOUTIQ$;"               "
    print #main.map, "place 713 332 ;\"; "ACHETER LE PARCHEMIN"
    print #main.map, "place 420 257 ;\"; "Précédent : \ "; NameCompetenceBOUTIQ2$;"        "
    print #main.map, "place 1100 257 ;\";"Suivants : \";  NameCompetenceBOUTIQ3$;"      "
    print #main.map, "font Times New Roman 8; color green;backcolor black"
    print #main.map, "place 752 444 ;\"; "DEBUTANT"
    print #main.map, "font Times New Roman 8; color white;backcolor black"
    print #main.map, "place 749 515 ;\"; "CONFIRMER"
    print #main.map, "place 756 589 ;\"; "MAITRISE"
    print #main.map, "place 766 673 ;\"; "DIVIN"
end if

if version = 2 then
    print #main.map, "font Times New Roman 12 bold; color black;backcolor white"
    print #main.map, "place 675 170 ;\"; "Scroll type ";NameCompetenceBOUTIQ$;"  ( "; INDEXmatriceBOUTIQ;" / ";INDEXmatriceBOUTIQmax;" )      "
    print #main.map, "font Times New Roman 8; color black;backcolor white"
    print #main.map, "place 630 210 ;\"; "Number of Scroll Bought : ";NOMBREparcheminBOUTIQ;"               "
    print #main.map, "place 630 300 ;\"; "Scroll price : ";prixUPGRADEboutiq; " Gold coins";"               "
    print #main.map, "place 630 240 ;\"; "Descriptif : ";descriptBOUTIQ$;"               "
    print #main.map, "place 713 332 ;\"; "BUY THE SCROLL"
    print #main.map, "place 420 257 ;\"; "Précédent : \ ";NameCompetenceBOUTIQ2$;"        "
    print #main.map, "place 1100 257 ;\"; "Next : \"; NameCompetenceBOUTIQ3$;"        "
    print #main.map, "font Times New Roman 8; color green;backcolor black"
    print #main.map, "place 752 444 ;\"; "STARTER"
    print #main.map, "font Times New Roman 8; color white;backcolor black"
    print #main.map, "place 749 515 ;\"; "CONFIRMED"
    print #main.map, "place 761 589 ;\"; "MASTER"
    print #main.map, "place 766 673 ;\"; "DIVIN"
end if

   ' print #main.map, "place 590 623 ;\"; FragmentJAUNE1;"     "
   ' print #main.map, "place 776 623 ;\"; FragmentJAUNE2;"     "
   ' print #main.map, "place 965 623 ;\"; FragmentJAUNE3;"     "

print #main.map, "flush"
wait


[dataMATRICEboutiq2]

select case INDEXmatriceBOUTIQ
    case 1
    NameCompetenceBOUTIQ$ = "Santé"
    prixUPGRADEboutiq = ValeurORparchemin1
    NOMBREparcheminBOUTIQ = PARCHEMIN1
    descriptBOUTIQ$ = "Ce parchemin augmente le nombre de points de vie\de votre personnage de 10% pendant un combat. L'effet se dissipe \une fois le combat terminé."
    NameCompetenceBOUTIQ2$ = "Richèsse"
    NameCompetenceBOUTIQ3$ = "Attaque"
    case 2
    NameCompetenceBOUTIQ$ = "Attaque"
    prixUPGRADEboutiq = ValeurORparchemin2
    NOMBREparcheminBOUTIQ = PARCHEMIN2
    descriptBOUTIQ$ = "Ce parchemin augmente le nombre d'attaque de \votre personnage de 10% pendant un combat. L'effet se dissipe \une fois le combat terminé."
    NameCompetenceBOUTIQ2$ = "Santé"
    NameCompetenceBOUTIQ3$ = "Défense"
    case 3
    NameCompetenceBOUTIQ$ = "Défense"
    prixUPGRADEboutiq = ValeurORparchemin3
    NOMBREparcheminBOUTIQ = PARCHEMIN3
    descriptBOUTIQ$ = "Ce parchemin augmente le nombre de défense de \votre personnage de 10% pendant un combat. L'effet se dissipe \une fois le combat terminé."
    NameCompetenceBOUTIQ2$ = "Attaque"
    NameCompetenceBOUTIQ3$ = "Science"
    case 4
    NameCompetenceBOUTIQ$ = "Science"
    prixUPGRADEboutiq = ValeurORparchemin4
    NOMBREparcheminBOUTIQ = PARCHEMIN4
    descriptBOUTIQ$ = "Ce parchemin augmente la science et l'éfficacité de \vos potions de 10% pendant un combat. L'effet se dissipe \une fois le combat terminé."
    NameCompetenceBOUTIQ2$ = "Défense"
    NameCompetenceBOUTIQ3$ = "Expérience"
    case 5
    NameCompetenceBOUTIQ$ = "Expérience"
    prixUPGRADEboutiq = ValeurORparchemin5
    NOMBREparcheminBOUTIQ = PARCHEMIN5
    descriptBOUTIQ$ = "Ce parchemin augmente l'expérience reçu par votre \personnage de 50% en fin de combat. L'effet se dissipe une fois \le combat terminé."
    NameCompetenceBOUTIQ2$ = "Science"
    NameCompetenceBOUTIQ3$ = "Richesse"
    case 6
    NameCompetenceBOUTIQ$ = "Richesse"
    prixUPGRADEboutiq = ValeurORparchemin6
    NOMBREparcheminBOUTIQ = PARCHEMIN6
    descriptBOUTIQ$ = "Ce parchemin augmente l'or reçu par votre personnage \de 50% en fin de combat. L'effet se dissipe une fois le combat \terminé."
    NameCompetenceBOUTIQ2$ = "Expérience"
    NameCompetenceBOUTIQ3$ = "Santé"
end select
return

[achatPARCHEMIN1]
if money < ValeurORparchemin1 then wait
if nMax2 >= MAX2 then wait
nMax2 = nMax2 + 1 : money = money - ValeurORparchemin1 : PARCHEMIN1 = PARCHEMIN1 + 1 : NOMBREparcheminBOUTIQ = PARCHEMIN1 : prixUPGRADEboutiq = ValeurORparchemin1
goto [refreshACHATparch2]
[achatPARCHEMIN2]
if money < ValeurORparchemin2 then wait
if nMax2 >= MAX2 then wait
nMax2 = nMax2 + 1 : money = money - ValeurORparchemin2 : PARCHEMIN2 = PARCHEMIN2 + 1 : NOMBREparcheminBOUTIQ = PARCHEMIN2 : prixUPGRADEboutiq = ValeurORparchemin2
goto [refreshACHATparch2]
[achatPARCHEMIN3]
if money < ValeurORparchemin3 then wait
if nMax2 >= MAX2 then wait
nMax2 = nMax2 + 1 : money = money - ValeurORparchemin3 : PARCHEMIN3 = PARCHEMIN3 + 1 : NOMBREparcheminBOUTIQ = PARCHEMIN3 : prixUPGRADEboutiq = ValeurORparchemin3
goto [refreshACHATparch2]
[achatPARCHEMIN4]
if money < ValeurORparchemin4 then wait
if nMax2 >= MAX2 then wait
nMax2 = nMax2 + 1 : money = money - ValeurORparchemin4 : PARCHEMIN4 = PARCHEMIN4 + 1 : NOMBREparcheminBOUTIQ = PARCHEMIN4 : prixUPGRADEboutiq = ValeurORparchemin4
goto [refreshACHATparch2]
[achatPARCHEMIN5]
if money < ValeurORparchemin5 then wait
if nMax2 >= MAX2 then wait
nMax2 = nMax2 + 1 : money = money - ValeurORparchemin5 : PARCHEMIN5 = PARCHEMIN5 + 1 : NOMBREparcheminBOUTIQ = PARCHEMIN5 : prixUPGRADEboutiq = ValeurORparchemin5
goto [refreshACHATparch2]
[achatPARCHEMIN6]
if money < ValeurORparchemin6 then wait
if nMax2 >= MAX2 then wait
nMax2 = nMax2 + 1 : money = money - ValeurORparchemin6 : PARCHEMIN6 = PARCHEMIN6 + 1 : NOMBREparcheminBOUTIQ = PARCHEMIN6 : prixUPGRADEboutiq = ValeurORparchemin6
goto [refreshACHATparch2]

[achatPARCHEMIN7]
if money < ValeurORparchemin7 then wait
if PARCHEMIN7 >= 1 then wait
money = money - ValeurORparchemin7
PARCHEMIN7 = PARCHEMIN7 + 1
print #main.map, "place 830 635 ;\"; PARCHEMIN7 ; "  /  1"
print #main.map, "backcolor white;font Times New Roman 9 bold; color black"
if version = 2 then print #main.map, "place 740 230 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 740 230 ;\"; "Votre Or  : ";money;"     "
wait

[refreshACHATparch2]
print #main.map, "place 630 210 ;\"; "Nombre de parchemins achétés : ";NOMBREparcheminBOUTIQ; " ( Sac : ";nMax2 ;" / "; MAX2;" )    "
'print #main.map, "place 620 417 ;\"; "Prix d'achat du parchemin : ";prixUPGRADEboutiq; " pièces d'or";"               "
print #main.map, "font Times New Roman 9 bold; color black;backcolor white"
if version = 2 then print #main.map, "place 730 370 ;\"; "Your Gold  : ";money;"    "
if version = 1 then print #main.map, "place 730 370 ;\"; "Votre Or  : ";money;"     "
wait

[maro]
UpgradeSAC1cout = int((MAX1*lvlMAX1)*lvlMAX1)
UpgradeSAC2cout = int((MAX2*lvlMAX2)*lvlMAX2)
#main.map, "cls"
#main.map, "when leftButtonDown [SimpleClickMARO]"
#main.map , "down;fill black"
print #main.map, "drawbmp maro 0 0"
print #main.map, "background maro"
print #main.map, "backcolor white"
print #main.map, "font Times New Roman 25; color black"
if version = 1 then print #main.map, "place 720 120 ;\"; "Maroquinerie"
[maro2]
print #main.map, "font Times New Roman 18; color black"
    print #main.map, "place 665 510;\"; MAX1
    print #main.map, "place 935 510;\"; MAX2
print #main.map, "font Times New Roman 12; color black"
    if version = 1 then print #main.map, "place 685 430;\"; "EMPLACEMENTS DANS VOTRE SAC"
    if version = 2 then print #main.map, "place 685 430;\"; "SLOTS INTO YOUR BAG"
print #main.map, "font Times New Roman 9; color black"

if version = 1 then
    print #main.map, "place 570 563;\"; "AMELIORER"
    print #main.map, "place 570 465;\"; "Partie Potions"
    print #main.map, "place 840 465;\"; "Partie Parchemins"
    print #main.map, "place 840 563;\"; "AMELIORER"
    print #main.map, "place 670 563;\"; "Prix : ";UpgradeSAC1cout
    print #main.map, "place 940 563;\"; "Prix : ";UpgradeSAC2cout
    print #main.map, "place 575 180 ;\"; "Salut à toi ! Ici je traite tous ce qui concerne les sacs et sachoche afin de pouvoir mener vos \quêtes à bien ! \\Améliorer votre sac vous permettra d'emmener plus de potions et de parchemins divers en combat\ce n'est pas un point à négliger surtout contre des adversaires plus forts que vous."
    print #main.map, "font Times New Roman 9 bold; color black"
    print #main.map, "place 575 260 ;\"; "Votre or  : ";money;"     "
end if
if version = 2 then
    print #main.map, "place 570 563;\"; "UPGRADE"
    print #main.map, "place 570 465;\"; "Potions part"
    print #main.map, "place 840 465;\"; "Parchment part"
    print #main.map, "place 840 563;\"; "UPGRADE"
    print #main.map, "place 670 563;\"; "Price : ";UpgradeSAC1cout
    print #main.map, "place 940 563;\"; "Price : ";UpgradeSAC2cout
    print #main.map, "place 575 180 ;\"; "Salut à toi ! Ici je traite tous ce qui concerne les sacs et sachoche afin de pouvoir mener vos \quêtes à bien ! \\Améliorer votre sac vous permettra d'emmener plus de potions et de parchemins divers en combat\ce n'est pas un point à négliger surtout contre des adversaires plus forts que vous."
    print #main.map, "font Times New Roman 9 bold; color black"
    print #main.map, "place 575 260 ;\"; "Your gold  : ";money;"     "
end if
#main.map, "flush"
wait


[SimpleClickMARO]
    mX = MouseX
    mY = MouseY
compteurCLICK = compteurCLICK + 1
'notice mX;" / ";mY
    if mX>555 and mX<655 and mY>545 and mY<575 goto [UPmax1]
    if mX>830 and mX<930 and mY>545 and mY<575 goto [UPmax2]
    if mX>160 and mX<220 and mY>630 and mY<690 goto [city]
wait

[UPmax1]
if money < UpgradeSAC1cout then wait
money = money - UpgradeSAC1cout
MAX1 = MAX1 + 1
lvlMAX1 = lvlMAX1 + 1
nombreUPsac = nombreUPsac +1
UpgradeSAC1cout = int((MAX1*lvlMAX1)*lvlMAX1)
goto [maro2]
[UPmax2]
if money < UpgradeSAC2cout then wait
money = money - UpgradeSAC2cout
MAX2 = MAX2 + 1
lvlMAX2 = lvlMAX2 + 1
nombreUPsac = nombreUPsac +1
UpgradeSAC2cout = int((MAX2*lvlMAX2)*lvlMAX2)
goto [maro2]

[taverne]
if VEROUQUESTkey = 0 then QUESTkey = int(rnd(1)*10+1)
if VEROUQUESTkey = QUESTkey then QUESTkey = VEROUQUESTkey

#main.map, "cls"
WindowWidth = 1300 : WindowHeight = 800
#main.map, "when leftButtonDown [SimpleClickTAVERNE]"
#main.map , "down;fill black"
print #main.map, "drawbmp taverne 0 0"
print #main.map, "background taverne"
print #main.map, "backcolor white;font Times New Roman 9; color black"
#main.map, "flush"
wait


[SimpleClickTAVERNE]
    mX = MouseX
    mY = MouseY
'notice mX;" / ";mY
compteurCLICK = compteurCLICK + 1
QUESTtaverneON = 0
QUESTtaverneONrnd = QUESTkey'int(rnd(1)*10+1)

    if mX>590 and mX<680 and mY>280 and mY<400 then
        persoTavern = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>780 and mX<860 and mY>330 and mY<420 then
        persoTavern = 2
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>975 and mX<1050 and mY>275 and mY<360 then
        persoTavern = 3
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>1120 and mX<1200 and mY>365 and mY<430 then
        persoTavern = 4
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>1020 and mX<1120 and mY>145 and mY<230 then
        persoTavern = 5
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>615 and mX<735 and mY>135 and mY<215 then
        persoTavern = 6
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>440 and mX<525 and mY>125 and mY<215 then
        persoTavern = 7
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>240 and mX<305 and mY>120 and mY<200 then
        persoTavern = 8
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>215 and mX<280 and mY>255 and mY<310 then
        persoTavern = 9
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if
    if mX>25 and mX<110 and mY>240 and mY<295 then
        persoTavern = 10
        if QUESTtaverneONrnd = QUESTkey and QUESTkey = persoTavern then QUESTtaverneON = 1
        if QUESTtaverne = persoTavern then QUESTtaverneON = 1
        goto [TAVENdial]
    end if


    if mX>120 and mX<180 and mY>670 and mY<720 then
        persoTavern1pnjACTIVATION = 0 : persoTavern2pnjACTIVATION = 0
        persoTavern3pnjACTIVATION = 0 : persoTavern4pnjACTIVATION = 0
        persoTavern5pnjACTIVATION = 0 : persoTavern6pnjACTIVATION = 0
        persoTavern7pnjACTIVATION = 0 : persoTavern8pnjACTIVATION = 0
        persoTavern9pnjACTIVATION = 0 : persoTavern10pnjACTIVATION = 0
        dialgSAV = 0 : QUESTtaverne = 0
        if NombreQuestENcours = 0 then
            verrouillageQUEST1taverne = 0 : verrouillageQUEST2taverne = 0
            verrouillageQUEST3taverne = 0 : verrouillageQUEST4taverne = 0
            verrouillageQUEST5taverne = 0 : verrouillageQUEST6taverne = 0
            verrouillageQUEST7taverne = 0 : verrouillageQUEST8taverne = 0
            verrouillageQUEST9taverne = 0 : verrouillageQUEST10taverne = 0
            verrouillageQUEST11taverne = 0
            persoTavern = 0 : VEROUQUESTkey = 0 : notifendQ = 0 : QUESTtaverneON = 0
            QUESTtaverne2A = 0 : QUESTtaverne2B = 0 : QUESTtaverne2C = 0 : QUESTtaverne2D = 0 : QUESTtaverne2E = 0
            QUESTtaverne2F = 0 : QUESTtaverne2G = 0 : QUESTtaverne2H = 0 : QUESTtaverne2I = 0 : QUESTtaverne2J = 0
            QUESTtaverne2K = 0
        end if
        goto [city]
    end if

wait

[TAVENdial]
pnj = int(rnd(1)*4+1)
if pnj2 = pnj then goto [TAVENdial]
pnj2 = pnj

if persoTavern = 1 then
    if persoTavern1pnjACTIVATION = 0 then persoTavern1pnj = pnj
    persoTavern1pnjACTIVATION = 1
    pnj = persoTavern1pnj
end if
if persoTavern = 2 then
    if persoTavern2pnjACTIVATION = 0 then persoTavern2pnj = pnj
    persoTavern2pnjACTIVATION = 1
    pnj = persoTavern2pnj
end if
if persoTavern = 3 then
    if persoTavern3pnjACTIVATION = 0 then persoTavern3pnj = pnj
    persoTavern3pnjACTIVATION = 1
    pnj = persoTavern3pnj
end if
if persoTavern = 4 then
    if persoTavern4pnjACTIVATION = 0 then persoTavern4pnj = pnj
    persoTavern4pnjACTIVATION = 1
    pnj = persoTavern4pnj
end if
if persoTavern = 5 then
    if persoTavern5pnjACTIVATION = 0 then persoTavern5pnj = pnj
    persoTavern5pnjACTIVATION = 1
    pnj = persoTavern5pnj
end if
if persoTavern = 6 then
    if persoTavern6pnjACTIVATION = 0 then persoTavern6pnj = pnj
    persoTavern6pnjACTIVATION = 1
    pnj = persoTavern6pnj
end if
if persoTavern = 7 then
    if persoTavern7pnjACTIVATION = 0 then persoTavern7pnj = pnj
    persoTavern7pnjACTIVATION = 1
    pnj = persoTavern7pnj
end if
if persoTavern = 8 then
    if persoTavern8pnjACTIVATION = 0 then persoTavern8pnj = pnj
    persoTavern8pnjACTIVATION = 1
    pnj = persoTavern8pnj
end if
if persoTavern = 9 then
    if persoTavern9pnjACTIVATION = 0 then persoTavern9pnj = pnj
    persoTavern9pnjACTIVATION = 1
    pnj = persoTavern9pnj
end if
if persoTavern = 10 then
    if persoTavern10pnjACTIVATION = 0 then persoTavern10pnj = pnj
    pnj = persoTavern10pnj
end if

if NombreQuestENcours = 1 then goto [dataQUESTtav] ': wait
if tavernDIAL = 1 then close #tavernDIAL

tavernDIAL = 1 : WindowWidth = 301 : WindowHeight = 151
UpperLeftX=int((DisplayWidth-WindowWidth)/2) : UpperLeftY=int((DisplayHeight-WindowHeight)/1.5)
graphicbox #tavernDIAL.map, 0, 0, WindowWidth+5, WindowHeight+5
open " " for window_popup as #tavernDIAL
#tavernDIAL, "trapclose [quitTAVENdial]"
#tavernDIAL.map , "down;fill white"
#tavernDIAL.map, "when leftButtonDown [SimpleClicktavernDIAL]"

print #tavernDIAL.map, "backcolor white;font Times New Roman 9; color black"
if QUESTtaverneON <> 1 then gosub [dataDIAG]
if QUESTtaverneON = 1 then gosub [dataQUESTtav]
if QUESTtaverneON <> 1 then
    print #tavernDIAL.map, "place 10 105 ;\"; "Un inconnu vous réponds :"
    print #tavernDIAL.map, "backcolor white;font Times New Roman 25; color white"
    print #tavernDIAL.map, "place 110 36 ;\"; "                      \                     "
    print #tavernDIAL.map, "backcolor white;font Times New Roman 9; color black"
end if
if QUESTtaverneON = 1 then print #tavernDIAL.map, "place 10 105 ;\"; "Un inconnu vous propose une quête :"

print #tavernDIAL.map, "place 10 120 ;\"; txt$
speakTOpnj = speakTOpnj + 1
if dialg = 41 and recompenseQ6b <> 2 then notice " " + chr$(13) +  "Vous avez reçu une carte pour découvrir le donjon."
wait


[dataQUESTtav]
dialg = int(rnd(1)*11+1)

if NombreQuestENcours = 1 then
   if QueteTAVERNEnum = 1 and persoTavern = QUESTtaverne2A then
        if QueteTAVERNEcompt >= 5 then goto [dataQUESTtavB]
        notice " " + chr$(13) +  "Rappel de quête : Sangliers à tuer ( ";QueteTAVERNEcompt;" / 5 ) " : wait
   end if
   if QueteTAVERNEnum = 2 and persoTavern = QUESTtaverne2B then
        if QueteTAVERNEcompt = 10 then goto [dataQUESTtavB]
        notice " " + chr$(13) +  "Rappel de quête : Gobelins à tuer ( ";QueteTAVERNEcompt;" / 10 ) " : wait
   end if
   if QueteTAVERNEnum = 3 and persoTavern = QUESTtaverne2C then
        if QueteTAVERNEcompt = 12 then goto [dataQUESTtavB]
        notice " " + chr$(13) +  "Rappel de quête : Plantes géantes à tuer ( ";QueteTAVERNEcompt;" / 12 ) " : wait
   end if
   if QueteTAVERNEnum = 4 and persoTavern = QUESTtaverne2D then
        if QueteTAVERNEcompt = 30 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Araignées à tuer ( ";QueteTAVERNEcompt;" / 30 ) " : wait
   end if
   if QueteTAVERNEnum = 5 and persoTavern = QUESTtaverne2E then
        if QueteTAVERNEcompt = 1 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Tuer Soiquar, le faux marchand !" : wait
   end if
   if QueteTAVERNEnum = 6 and persoTavern = QUESTtaverne2F then
        if QueteTAVERNEcompt = 20 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Mort-vivants à tuer ( ";QueteTAVERNEcompt;" / 20 ) " : wait
   end if
   if QueteTAVERNEnum = 7 and persoTavern = QUESTtaverne2G then
        if QueteTAVERNEcompt = 10 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Centaures à tuer ( ";QueteTAVERNEcompt;" / 10 ) " : wait
   end if
   if QueteTAVERNEnum = 8 and persoTavern = QUESTtaverne2H then
        if QueteTAVERNEcompt = 1 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Tuer Jean michel la merguèse" : wait
   end if
   if QueteTAVERNEnum = 9 and persoTavern = QUESTtaverne2I then
        if QueteTAVERNEcompt = 1 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Tuer LucAvador " : wait
   end if
   if QueteTAVERNEnum = 10 and persoTavern = QUESTtaverne2J then
        if QueteTAVERNEcompt = 1 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Tuer l'Imperator" : wait
   end if
   if QueteTAVERNEnum = 11 and persoTavern = QUESTtaverne2K then
        if QueteTAVERNEcompt = 1 then goto [dataQUESTtavB]
        notice  " " + chr$(13) +  "Rappel de quête : Tuer WithDragon" : wait
   end if
   notice  " " + chr$(13) +  "Un quête est déjà en cours !"
   wait

    [dataQUESTtavB]
    NOTICE "Quête accomplie ! Votre récompense : ";recompenseTAVquest
    money = money + recompenseTAVquest
    QUESTtaverne = 0
    QueteTAVERNEcompt = 0
    verrouillageQUEST1taverne = 0
    NombreQuestENcours = 0
    QueteTAVERNEnum = 0
    notifendQ = 0
    VEROUQUESTkey = 0
    persoTavern = 0
    QUESTtaverne2A = 0 : QUESTtaverne2B = 0 : QUESTtaverne2C = 0 : QUESTtaverne2D = 0 : QUESTtaverne2E = 0
    QUESTtaverne2F = 0 : QUESTtaverne2G = 0 : QUESTtaverne2H = 0 : QUESTtaverne2I = 0 : QUESTtaverne2J = 0
    QUESTtaverne2K = 0
    verrouillageQUEST1taverne = 0 : verrouillageQUEST2taverne = 0
    verrouillageQUEST3taverne = 0 : verrouillageQUEST4taverne = 0
    verrouillageQUEST5taverne = 0 : verrouillageQUEST6taverne = 0
    verrouillageQUEST7taverne = 0 : verrouillageQUEST8taverne = 0
    verrouillageQUEST9taverne = 0 : verrouillageQUEST10taverne = 0
    verrouillageQUEST11taverne = 0
    QUESTkey = int(rnd(1)*10+1)
    dialgSAV = 0
    Qtaverne = Qtaverne + 1
    wait
end if

select case dialg

print #tavernDIAL.map, "drawbmp dialog 0 0"
if NombreQuestENcours = 1 and QUESTtaverneON = 1 then pnj = pnjQUEST
if pnj = 1 then print #tavernDIAL.map, "drawbmp pnj1 2 2"
if pnj = 2 then print #tavernDIAL.map, "drawbmp pnj2 2 2"
if pnj = 3 then print #tavernDIAL.map, "drawbmp pnj3 2 2"
if pnj = 4 then print #tavernDIAL.map, "drawbmp pnj4 2 2"

if dialgSAV = 1 and persoTavern = QUESTtaverne2A then goto [questTAVERNE1ok]
if dialgSAV = 2 and persoTavern = QUESTtaverne2B then goto [questTAVERNE2ok]
if dialgSAV = 3 and persoTavern = QUESTtaverne2C then goto [questTAVERNE3ok]
if dialgSAV = 4 and persoTavern = QUESTtaverne2D then goto [questTAVERNE4ok]
if dialgSAV = 5 and persoTavern = QUESTtaverne2E then goto [questTAVERNE5ok]
if dialgSAV = 6 and persoTavern = QUESTtaverne2F then goto [questTAVERNE6ok]
if dialgSAV = 7 and persoTavern = QUESTtaverne2G then goto [questTAVERNE7ok]
if dialgSAV = 8 and persoTavern = QUESTtaverne2H then goto [questTAVERNE8ok]
if dialgSAV = 9 and persoTavern = QUESTtaverne2I then goto [questTAVERNE9ok]
if dialgSAV = 10 and persoTavern = QUESTtaverne2J then goto [questTAVERNE10ok]
if dialgSAV = 11 and persoTavern = QUESTtaverne2K then goto [questTAVERNE11ok]


    case 1
        if LvlDONJON > 2 then goto [dataQUESTtav]
        if verrouillageQUEST1taverne = 1 and persoTavern <> QUESTtaverne2A then goto [dataQUESTtav]
        [questTAVERNE1ok]
        txt$ = "''Salut a toi, je te propose de tuer 5 sangliers !\ La récompense : ";int(400*(lvlDONJONtota/3));" d'or. (";QueteTAVERNEcompt;" / 5)''"
        txtSAV$ = "Rappel de quête : Sangliers à tuer ( ";QueteTAVERNEcompt;" / 5 ) "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2A = QUESTtaverne
        verrouillageQUEST1taverne = 1
        recompenseTAVquest = int(400*(lvlDONJONtota/3))
      '  NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 5
        QueteTAVERNEnum = 1
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 1
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST1taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 2
        if LvlDONJON < 2 and LvlDONJON > 3 then goto [dataQUESTtav]
        if verrouillageQUEST2taverne = 1 and persoTavern <> QUESTtaverne2B then goto [dataQUESTtav]
        [questTAVERNE2ok]
        txt$ = "''J'aime pas les gobelins ! Tues en 10 pour \";int(1000*(lvlDONJONtota/3));" d'or ! (";QueteTAVERNEcompt;" / 10) ''"
        txtSAV$ = "Rappel de quête : Gobelins à tuer ( ";QueteTAVERNEcompt;" / 10 ) "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2B = QUESTtaverne
        verrouillageQUEST2taverne = 1
        recompenseTAVquest = int(1000*(lvlDONJONtota/3))
      '  NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 10
        QueteTAVERNEnum = 2
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 2
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST2taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 3
        if LvlDONJON <> 4 then goto [dataQUESTtav]
        if verrouillageQUEST3taverne = 1 and persoTavern <> QUESTtaverne2C then goto [dataQUESTtav]
        [questTAVERNE3ok]
        txt$ = "''C'est une invasion ! Tues 12 Plantes géantes, pour \";int(3000*(lvlDONJONtota/3));" d'or ! (";QueteTAVERNEcompt;" / 12) ''"
        txtSAV$ = "Rappel de quête : Plantes géantes à tuer ( ";QueteTAVERNEcompt;" / 12 ) "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2C = QUESTtaverne
        verrouillageQUEST3taverne = 1
        recompenseTAVquest = int(3000*(lvlDONJONtota/3))
      '  NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 12
        QueteTAVERNEnum = 3
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 3
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST3taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 4
        if LvlDONJON <> 3 then goto [dataQUESTtav]
        if verrouillageQUEST4taverne = 1 and persoTavern <> QUESTtaverne2D then goto [dataQUESTtav]
        [questTAVERNE4ok]
        txt$ = "''Je desteste les araignées ! Tues en 30 et je \te payerais ";int(2500*(lvlDONJONtota/3));" d'or ! (";QueteTAVERNEcompt;" / 30) ''"
        txtSAV$ = "Rappel de quête : Araignées à tuer ( ";QueteTAVERNEcompt;" / 30 ) "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2D = QUESTtaverne
        verrouillageQUEST4taverne = 1
        recompenseTAVquest = int(2500*(lvlDONJONtota/3))
     '   NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 30
        QueteTAVERNEnum = 4
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 4
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST4taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 5
        if verrouillageQUEST5taverne = 1 and persoTavern <> QUESTtaverne2E then goto [dataQUESTtav]
        [questTAVERNE5ok]
        txt$ = "''Soiquar est un marchand crapuleux ! Il m'a arnaqué ! Je\te payerais ";int(4000*(lvlDONJONtota/3));" d'or pour que tu me rapporte sa tête ! ''"
        txtSAV$ = "Rappel de quête : Tuer Soiquar, le faux marchand !"
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2E = QUESTtaverne
        verrouillageQUEST5taverne = 1
        nameEnnemy2QUEST$ = "Soiquar le faux marchand"
        recompenseTAVquest = int(4000*(lvlDONJONtota/3))
      '  NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 1
        QueteTAVERNEnum = 5
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 5
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST5taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 6
        if LvlDONJON <> 5 then goto [dataQUESTtav]
        if verrouillageQUEST6taverne = 1 and persoTavern <> QUESTtaverne2F then goto [dataQUESTtav]
        [questTAVERNE6ok]
        txt$ = "''De nombreux mort vivants on été repéré ! \La ville offre ";int(5000*(lvlDONJONtota/3));" pièces pour en tuer 20 ! (";QueteTAVERNEcompt;" / 20) ''"
        txtSAV$ = "Rappel de quête : Mort-vivants à tuer ( ";QueteTAVERNEcompt;" / 20 ) "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2F = QUESTtaverne
        verrouillageQUEST6taverne = 1
        recompenseTAVquest = int(5000*(lvlDONJONtota/3))
      '  NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 20
        QueteTAVERNEnum = 6
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 6
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST6taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 7
        if LvlDONJON <> 6 then goto [dataQUESTtav]
        if verrouillageQUEST7taverne = 1 and persoTavern <> QUESTtaverne2G then goto [dataQUESTtav]
        [questTAVERNE7ok]
        txt$ = "''Les centaures nous empèches de chasser dans \les fôrets ! La ville offre ";int(7000*(lvlDONJONtota/3));" pièces ! (";QueteTAVERNEcompt;" / 10)''"
        txtSAV$ = "Rappel de quête : Centaures à tuer ( ";QueteTAVERNEcompt;" / 10 ) "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2G = QUESTtaverne
        verrouillageQUEST7taverne = 1
        recompenseTAVquest = int(7000*(lvlDONJONtota/3))
      '  NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 10
        QueteTAVERNEnum = 7
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 7
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST7taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 8
        if verrouillageQUEST8taverne = 1 and persoTavern <> QUESTtaverne2H then goto [dataQUESTtav]
        [questTAVERNE8ok]
        txt$ = "''Je ne peux plus le supporter !\Tue moi Jean Michel la merguèse et tu auras ";int(4000*(lvlDONJONtota/3));"! ''"
        txtSAV$ = "Rappel de quête : Tuer Jean michel la merguèse"
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2H = QUESTtaverne
        verrouillageQUEST8taverne = 1
        nameEnnemy2QUEST$ = "Jean michel la merguèse"
        recompenseTAVquest = int(4000*(lvlDONJONtota/3))
     '   NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 1
        QueteTAVERNEnum = 8
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 8
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST8taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 9
        if verrouillageQUEST9taverne = 1 and persoTavern <> QUESTtaverne2I then goto [dataQUESTtav]
        [questTAVERNE9ok]
        txt$ = "''Il parait qu'on ne peux pas tuer LucAvador ?\Rapporte moi sa tête pour ";int(4000*(lvlDONJONtota/3));" d'or ! ''"
        txtSAV$ = "Rappel de quête : Tuer LucAvador "
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2I = QUESTtaverne
        verrouillageQUEST9taverne = 1
        recompenseTAVquest = int(4000*(lvlDONJONtota/3))
       ' NombreQuestENcours = 1
        nameEnnemy2QUEST$ = "LucAvador"
        QueteTAVERNEcomptMAX = 1
        QueteTAVERNEnum = 9
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 9
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST9taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 10
        if verrouillageQUEST10taverne = 1 and persoTavern <> QUESTtaverne2J then goto [dataQUESTtav]
        [questTAVERNE10ok]
        txt$ = "''Ya un mec qui me cherche des noises?\Peux tu te charger d'Imperator pour ";int(4000*(lvlDONJONtota/3));" d'or ? ''"
        txtSAV$ = "Rappel de quête : Tuer l'Imperator"
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2J = QUESTtaverne
        verrouillageQUEST10taverne = 1
        recompenseTAVquest = int(4000*(lvlDONJONtota/3))
        nameEnnemy2QUEST$ = "Imperator"
       ' NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 1
        QueteTAVERNEnum = 10
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 10
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST10taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
    case 11
        if verrouillageQUEST11taverne = 1 and persoTavern <> QUESTtaverne2K then goto [dataQUESTtav]
        [questTAVERNE11ok]
        txt$ = "''TUE LE TUE LE TUE LE !!\TUE WhitDraGon ET TU RECEVRA ";int(4000*(lvlDONJONtota/3));" d'or !!! ''"
        txtSAV$ = "Rappel de quête : Tuer WithDragon"
        if NombreQuestENcours = 0 then QUESTtaverne = persoTavern
        if NombreQuestENcours = 0 then QUESTtaverne2K = QUESTtaverne
        nameEnnemy2QUEST$ = "WhitDraGon"
        verrouillageQUEST11taverne = 1
        recompenseTAVquest = int(4000*(lvlDONJONtota/3))
       ' NombreQuestENcours = 1
        QueteTAVERNEcomptMAX = 1
        QueteTAVERNEnum = 11
        pnjQUEST = pnj
        VEROUQUESTkey = QUESTkey
        dialgSAV = 11
        if QueteTAVERNEcompt = QueteTAVERNEcomptMAX then
            money = money + recompenseTAVquest
            QUESTtaverne = 0
            QueteTAVERNEcompt = 0
            verrouillageQUEST11taverne = 0
            NombreQuestENcours = 0
            QueteTAVERNEnum = 0
            notifendQ = 1
            VEROUQUESTkey = 0
        end if
end select
print #tavernDIAL.map, "place 131 30 ;\"; "ACCEPTER LA QUETE"
print #tavernDIAL.map, "place 137 66 ;\"; "REFUSER LA QUETE"
[dataQUESTtav2]
return

   ' nameEnnemy2$ = "KillTOkill"
   ' nameEnnemy2$ = "Cherche pas t mort"
  '  nameEnnemy2$ = "Akatsuki"
  '  nameEnnemy2$ = "RazorBlade"
  ' nameEnnemy2$ = "FfouBaTtoi"


[SimpleClicktavernDIAL]
mX = MouseX
mY = MouseY
'notice mX;" / ";mY
compteurCLICK = compteurCLICK + 1
if mX>110 and mX<280 and mY>10 and mY<40 then
    tavernDIAL = 0
    close #tavernDIAL
    if version = 1 then notice " " + chr$(13) +  "QUÊTE ACCEPTEE !" : NombreQuestENcours = 1
    if version = 2 then notice " " + chr$(13) +  "QUEST ACCEPTED !" : NombreQuestENcours = 0
    wait
end if

if mX>110 and mX<280 and mY>45 and mY<75 then
    tavernDIAL = 0
    close #tavernDIAL
    QueteTAVERNEcompt = 0
    verrouillageQUEST1taverne = 0
    verrouillageQUEST2taverne = 0
    verrouillageQUEST3taverne = 0
    verrouillageQUEST4taverne = 0
    verrouillageQUEST5taverne = 0
    verrouillageQUEST6taverne = 0
    verrouillageQUEST7taverne = 0
    verrouillageQUEST8taverne = 0
    verrouillageQUEST9taverne = 0
    verrouillageQUEST10taverne = 0
    verrouillageQUEST11taverne = 0
    NombreQuestENcours = 0
    QueteTAVERNEnum = 0
    QUESTtaverne = 0
    VEROUQUESTkey = 0
    QUESTkey = int(rnd(1)*10+1)
    QUESTtaverneON = 0
    dialgSAV = 0
    wait
end if

'close #tavernDIAL
wait

[quitTAVENdial]
tavernDIAL = 0
dialgSAV = 0
close #tavernDIAL
wait

[dataDIAG]

print #tavernDIAL.map, "drawbmp dialog 0 0"
if NombreQuestENcours = 1 and QUESTtaverneON = 1 then pnj = pnjQUEST
if pnj = 1 then print #tavernDIAL.map, "drawbmp pnj1 2 2"
if pnj = 2 then print #tavernDIAL.map, "drawbmp pnj2 2 2"
if pnj = 3 then print #tavernDIAL.map, "drawbmp pnj3 2 2"
if pnj = 4 then print #tavernDIAL.map, "drawbmp pnj4 2 2"

dialg = int(rnd(1)*50+1)
select case dialg
    case 1
        txt$ = "''Salut l'ami !''"
    case 2
        txt$ = "''Quel bon vent t'amène ?''"
    case 3
        txt$ = "''Heyyy tttssssss tu tu veux un verre ?''"
    case 4
        txt$ = "''Moi j'aime les poules bien dodues ! Et toi ?''"
    case 5
        txt$ = "''Un jour j'ai vu un fromage ! Jte jure c'était un \vrai de vrai !''"
    case 6
        txt$ = "''Il fait beau aujourd'hui, dommage qu'il pleuve ...''"
    case 7
        txt$ = "''Un jour, un canard, un jour, un calamard !''"
    case 8
        txt$ = "''J'ai la tête qui tourne pas toi ?''"
    case 9
        txt$ = "''J'ai une belle bourse, tu veux la voir ?''"
    case 10
        if sexe = 1 then txt$ = "''T'es mignon toi ....''"
        if sexe = 2 then txt$ = "''T'es mignonne toi ....''"
    case 11
        txt$ = "''Tu passe la soirée ici ?''"
    case 12
        txt$ = "''T'aime les fleurs ?''"
    case 13
        txt$ = "''Non maman, y'a pas école aujourd'hui !''"
    case 14
        txt$ = "''Tu sens pas le malaise là ?''"
    case 15
        txt$ = "''Haaaaaaa ! non rien en fait !''"
    case 16
        txt$ = "''Ta de belles formes toi tu sais ?''"
    case 17
        txt$ = "''Un ... deux ... tr ... quoi t'es encore la ?!''"
    case 18
        txt$ = "''Ta déjà gouté un vers en verre sous terre ?''"
    case 19
        txt$ = "''Holala il se fait tard ! T'es qui ?''"
    case 20
        txt$ = "''Attention t'as un cafard sur l'épaule''"
    case 21
        txt$ = "''Ouais, ca m'arrive d'aller pisser... et alors ?!''"
    case 22
        txt$ = "''Une bierre et une femme, c'est tout ce qu'il me faut !''"
    case 23
        txt$ = "''Un jour la pierre mangera le serpent !''"
    case 24
        txt$ = "''Viens boire avec nous !''"
    case 25
        txt$ = "''Tu veux une quête ? ben non !!! MUHAHAHAH''"
    case 26
        txt$ = "''Certains vont te proposer des quêtes içi. Attention \aux arnaques !''"
    case 27
        txt$ = "''Ouais ouais, on livre à domicile !''"
    case 28
        txt$ = "''J'ai une quête pour toi ! Ah ben non ...''"
    case 29
        txt$ = "''Moi je m'appel Robert...''"
    case 30
        txt$ = "''Regarde ce que je peux faire avec mon nez ! Imagine \avec le reste....''"
    case 31
        txt$ = "''Un...deux...trois, soleil !!!''"
    case 32
        txt$ = "''Tu danse ?''"
    case 33
        txt$ = "''J'aime bien le jambon ...''"
    case 34
        txt$ = "''Tu connais le vieux borgne ?''"
    case 35
        txt$ = "''Je connais un secret ! si si jte jure !''"
    case 36
        txt$ = "''Ben moi je m'en vais !''"
    case 37
        txt$ = "''Ho, un con !''"
    case 38
        txt$ = "''Tu m'aime ? ouais je sais, jsuis beau !''"
    case 39
        txt$ = "''Fait gaff à la chèvre ! Elle rend maboule !''"
    case 40
        txt$ = "''C'est vrai ? m'en fou !''"
    case 41
        if recompenseQ6b = 2 then goto [dataDIAG]
        dialgXX = int(rnd(1)*2+1)
        if dialgXX = 1 then goto [dataDIAG]
        DonjonMaudit = 1
        txt$ = "''Hey je connais un donjon secret !Voici la carte\pour y accéder....''"
    case 42
        txt$ = "''Jambon, beurre ... ou est ce que j'ai vu ca moi ....''"
    case 43
        txt$ = "''Le sol est bien bas vu d'en haut...''"
    case 44
        txt$ = "''Moi je suis ! Et toi ?''"
    case 45
        txt$ = "''Attention à pas te perdre...''"
    case 46
        txt$ = "''Battre un boss est assez difficile tu sais ?''"
    case 47
        txt$ = "''Je me demande comment c'est le monde réel.''"
    case 48
        txt$ = "''Arriveras-tu a finir ce jeu ?''"
    case 49
        txt$ = "''Jcrois pas non ....''"
    case 50
        txt$ = "''Tsais pas qui jsuis ! (hic)''"
end select
return
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


[SimpleClickG3]
    mX = MouseX
    mY = MouseY
'notice mX;"/";mY
compteurCLICK = compteurCLICK + 1

    ACTIVATIONspriteVALRAK = 0
    ACTIVATIONspriteCAMP1 = 0
    ACTIVATIONcamp2FOND = 0
    if noCLICK > 3 and mX>680 and mX<860 and mY>515 and mY<625 then goto [city]
    if noCLICK > 3 and mX>160 and mX<230 and mY>240 and mY<290 then
        if int(LvlDONJON*3)< lvlDONJONtota then
            if version = 1 then notice " " + chr$(13) +  "Vous avez déjà battu tous les ennemis de ce donjon, vous devez allez au donjon du dernier pallier connu pour combattre de nouveaux adversaires."
            if version = 2 then notice " " + chr$(13) +  "You already defeated all ennemies in this dungeon level, you have to go on the last available level for fight news ennemies."
            goto [Arena0]
        end if
        goto [donjon]
    end if
    if mX>330 and mX<370 and mY>500 and mY<545 and VALRAKlife = 0 and recompenseQ5a = 0 and Q5pack2 = 1 and packQ2 = 1 then
        ACTIVATIONspriteVALRAK = 1
        goto [ArenaLVL]
    end if
    if mX>315 and mX<345 and mY>245 and mY<275 and NombreKILLsangi < 9 and recompenseQ6a = 0 and Q6pack2 = 1 and packQ2 = 1 then
        ACTIVATIONspriteCAMP1 = 1
        goto [ArenaLVL]
    end if
    if mX>90 and mX<140 and mY>490 and mY<530 and Q6pack3 = 1 and recompenseQ6b = 0 and DonjonMaudit = 1 and LvlDONJONmaudit <=12 then
        ACTIVATIONcamp2FOND = 1
        goto [donjon]
    end if
    if noCLICK > 3 and mX>55 and mX<940 and mY>110 and mY<670 then goto [ArenaLVL]
    if noCLICK > 3 and mX>1100 and mX<1185 and mY>110 and mY<185 then goto [Character]
    if noCLICK > 3 and mX>35 and mX<115 and mY>20 and mY<48 then goto [GameStartMAIN2]
    if noCLICK > 3 and mX>1210 and mX<1260 and mY>115 and mY<160 then goto [Updown]

    noCLICK = noCLICK + 1
    if AIDEpnj2 = 0 then noCLICK = 5

[Arena0]
nameEnnemy$ = ""
nameEnnemy2$ = ""
#main.map, "cls"
timer 0

if tavernDIAL = 1 then
    tavernDIAL = 0
    close #tavernDIAL
end if

secuINV = 0
#main.map,"SpriteVisible mapbutton2 off"
#main.map,"SpriteVisible mapbutton off"
#main.map,"SpriteVisible menubutton1 off"
#main.map,"SpriteVisible menubutton2 off"
#main.map,"SpriteVisible menubutton3 off"
#main.map,"SpriteVisible menubutton4 off"
#main.map,"SpriteVisible menubutton5 off"
#main.map,"addsprite fenetre1 fenetre1"
#main.map,"SpriteVisible fenetre1 off"
#main.map,"SpriteVisible perso off"

if donjon = 1 and guard =1  then #main.map,"SpriteVisible guard4 off"
if donjon = 1 and guard =2  then #main.map,"SpriteVisible guard4 off"
if donjon = 1 and guard =4  then #main.map,"SpriteVisible guard1 off"
if donjon = 1 and guard =5  then #main.map,"SpriteVisible guard2 off"
if donjon = 1 and guard =3  then #main.map,"SpriteVisible gardien off"

guard = 0 : donjon = 0 : city = 0 : arena = 0  : Inmap = 1

#main.map, "when leftButtonDown [SimpleClickG3]"
#main.map , "down;setfocus"
#main.map, "drawbmp map 0 0"
#main.map, "background map"
#main.map,"spritexy barre 1000 24"
#main.map,"spritexy perso 1100 100"
#main.map,"SpriteVisible perso on"
#main.map,"SpriteVisible barre on"
#main.map,"spritexy mapbutton2 1215 120"
#main.map,"SpriteVisible mapbutton2 on"
#main.map,"addsprite camp2 camp2"
#main.map,"spritexy camp2 94 490"

         if VALRAKlife = 0 and recompenseQ5a = 0 and Q5pack2 = 1 and packQ2 = 1 then
            #main.map,"addsprite Qp Qp"
            #main.map,"spritexy Qp 330 500"
            #main.map,"SpriteVisible Qp on"
            ACTIVATIONvalrak = 1
         end if
        if NombreKILLsangi <9 and recompenseQ6a = 0 and Q6pack2 = 1 and packQ2 = 1 then
            #main.map,"addsprite camp camp"
            #main.map,"spritexy camp 320 250"
            #main.map,"SpriteVisible camp on"
            ACTIVATIONcampSANGI = 1
        end if
        if Q6pack3 = 1 and recompenseQ6b = 0 and DonjonMaudit = 1 and LvlDONJONmaudit <=12 then
            #main.map,"SpriteVisible camp2 on"
            ACTIVATIONcamp2 = 1
        end if
        if DonjonMaudit = 0 or LvlDONJONmaudit > 12 then #main.map,"SpriteVisible camp2 off"

#main.map "SetFocus; DrawSprites"

if NombreKILLsangi <9 and recompenseQ6a = 0 and Q6pack2 = 1 and packQ2 = 1 then
    print #main.map, "backcolor ";134;" ";157;" ";66;";color black;font Times New Roman 7"
    print #main.map, "place 322 280 ;\"; int(9-NombreKILLsangi) ; " / 9"
end if

r = 140 : b = 70 : v = 160
print #main.map, "backcolor ";r;" ";v;" ";b;"font Times New Roman 10; color black"
print #main.map, "font Times New Roman 10"
if version = 1 then print #main.map, "place 770 582 ;\"; "Ville"
if version = 2 then print #main.map, "place 770 582 ;\"; "City"

r = 180 : b = 130 : v = 180
print #main.map, "font Times New Roman 7; color black;backcolor ";r;" ";v;" ";b
if version = 1 then print #main.map, "place 175 264 ;\"; "DONJON"
if version = 2 then print #main.map, "place 172 264 ;\"; "Dungeon"

r = 91 : b = 234 : v = 152
indicMAPlv0 = int((10*LvlDONJON)-10)
if LvlDONJON = 1 then indicMAPlv0 = 1
indicMAPlvl=(10*LvlDONJON)

money$ = "" : money2$ = str$(money)
if money > 99999 then money$ = " k" : money2$ = str$(int(money/1000))
if money > 9999999 then money$ = " m" : money2$ = str$(int(money/1000000))
if money > 9999999999 then money$ = " M" : money2$ = str$(int(money/1000000000))

print #main.map, "backcolor ";r;" ";v;" ";b;";font Times New Roman 12"
if version = 1 then print #main.map, "place 370 40 ;\"; "Palier ";LvlDONJON;" : MONSTRES DE NIVEAU ";indicMAPlv0;" à ";indicMAPlvl
if version = 2 then print #main.map, "place 370 40 ;\"; "FLOOR ";LvlDONJON;" : MONSTERS LEVEL ";indicMAPlv0;" to ";indicMAPlvl
print #main.map, "font Times New Roman 9"
print #main.map, "place 56 40 ;\"; "| MENU |"
r = 136 : v = 136 : b = 136

print #main.map, "font Times New Roman 8;backcolor ";r;" ";v;" ";b;"; color white"
if version = 1 then print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1030 36 ;\"; name$; " - ";RACE$;" - Palier ";LvlDONJON
if version = 2 then print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1030 36 ;\"; name$; " - ";RACE$;" - Floor ";LvlDONJON
print #main.map, "font Times New Roman 8 ; backcolor white; color black"
print #main.map, "place 1120 160 ;\"; "Personnage"
print #main.map, "place 1137 171 ;\"; "info."
print #main.map, "place 1028 265 ;\"; "TABLEAU DES TÂCHES EN COURS"
print #main.map, "place 985 300 ;\"; " - QUÊTE DE TAVERNE :"
print #main.map, "place 985 400 ;\"; " - QUÊTE D'ACTE :"
print #main.map, "place 1085 550 ;\"; " - OBJETS - "
if version = 1 then print #main.map, "place 995 585 ;\"; "Votre Or : ";money2$;money$
if version = 2 then print #main.map, "place 995 585 ;\"; "Your Gold : ";money2$;money$
print #main.map, "place 995 615 ;\"; "Cristaux de feu : ";FragmentJAUNE1;" / ";FragmentJAUNE2;" / ";FragmentJAUNE3
print #main.map, "place 995 630 ;\"; "Cristaux de mana : ";FragmentBLEU1;" / ";FragmentBLEU2;" / ";FragmentBLEU3
print #main.map, "place 995 660 ;\"; "Oeuf de phénix : ";nombreOEUFphenix
print #main.map, "place 995 675 ;\"; "Dent de sanglier : "
print #main.map, "place 995 690 ;\"; "Os de défint : "
print #main.map, "place 995 705 ;\"; "Prisme Opale : "
print #main.map, "place 995 720 ;\"; "Griffe de dragon : "
print #main.map, "place 1130 660 ;\"; "Plante aromatique : "
print #main.map, "place 1130 675 ;\"; "Talisman : "
print #main.map, "place 1130 690 ;\"; "Sabot de centaure : "
print #main.map, "place 1130 705 ;\"; "Âme de joueur : "
print #main.map, "place 1130 720 ;\"; "Diamant brute : "
gosub [DATAlife]
gosub [restorBarreHp]

if PoP > 0 or PoS> 0 then #main.map, "drawbmp indic1 1160 120"

if AIDEpnj2 = 1 and noCLICK = 1 then
    print #main.map, "drawbmp pnjY1 0 0"
    print #main.map, "font Times New Roman 15 italic; color black;backcolor white"
    print #main.map, "place 450 200 ;\"; "''Bonjour, je m'appelle Ulrik !\Je vais t'expliquer les deux principaux lieux \pour gagner de l'expérience ainsi que des objets : \\La carte hors donjon permet de rencontrer des \monstres de bas niveaux et d'autres joueurs. C'est \l'endroit idéal pour monter de niveau et se faire un \bon équipement.'' \\\\ (appuyez pour continuer)"
    print #main.map, "flush"
    wait
end if
if AIDEpnj2 = 1 and noCLICK = 2 then
    print #main.map, "drawbmp pnjY1 0 0"
    print #main.map, "font Times New Roman 15 italic; color black;backcolor white"
    print #main.map, "place 450 200 ;\"; "''Une fois que tu te sentiras assez fort, le donjon \devrait pouvoir te donner quelques frissons...\C'est le lieu ou tu trouveras les ennemis les plus \forts. Le nombre de monstre y est limité à 10. Une \fois ces monstres battus, tu pourras te mesurer au \boss de palier! Battre celui-ci te fera monter au \niveau supérieur.\\Bonne chance à toi jeune ";info1$;" ! '' \\\ (appuyez pour continuer)"
    print #main.map, "flush"
    AIDEpnj2 = 0
    wait
end if
print #main.map, "flush"
wait



[ArenaLVL]
lvlENNEMI = int(rnd(1)*(10*LvlDONJON)+1)
if lvlENNEMI < int((10*LvlDONJON)-10) then goto [ArenaLVL]
if lvlENNEMI > lvl and LvlDONJON = 1 then lvlENNEMI = lvl

pvENNEMI = int((67*lvlENNEMI)+pv/2) : pvTOTALennemi = pvENNEMI
atkENNEMI = int((46*lvlENNEMI) + ((BONUSdef+def)/2))
defENNEMI = int(13*lvlENNEMI)

xpENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+lvlENNEMI)
moneyENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+lvlENNEMI)
player1rnd = int(rnd(1)*20+1)

if ACTIVATIONspriteVALRAK = 1 or ACTIVATIONspriteCAMP1 = 1 then
    if version = 1 then nameEnnemy$ = "Joueur (Tueur de joueur)"
    if version = 2 then nameEnnemy$ = "Player (Player killer)"
    goto [Arena]
end if
if version = 1 and lvlENNEMI>=1 and lvlENNEMI<=15 then nameEnnemy$ = "Sanglier"
if version = 2 and lvlENNEMI>=1 and lvlENNEMI<=15 then nameEnnemy$ = "Boar"
if version = 1 and lvlENNEMI>=16 and lvlENNEMI<=30 then nameEnnemy$ = "Gobelin"
if version = 2 and lvlENNEMI>=16 and lvlENNEMI<=30 then nameEnnemy$ = "Gobelin"
if version = 1 and lvlENNEMI>=31 and lvlENNEMI<=45 then nameEnnemy$ = "Araigné géante"
if version = 2 and lvlENNEMI>=31 and lvlENNEMI<=45 then nameEnnemy$ = "Giant Spider"
if version = 1 and lvlENNEMI>=46 and lvlENNEMI<=60 then nameEnnemy$ = "Plante carnivore géante"
if version = 2 and lvlENNEMI>=46 and lvlENNEMI<=60 then nameEnnemy$ = "Giant carnivorous plant"
if version = 1 and lvlENNEMI>=61 and lvlENNEMI<=75 then nameEnnemy$ = "Mort-vivant"
if version = 2 and lvlENNEMI>=61 and lvlENNEMI<=75 then nameEnnemy$ = "Undead"
if version = 1 and lvlENNEMI>=76 and lvlENNEMI<=90 then nameEnnemy$ = "Champion centaure"
if version = 2 and lvlENNEMI>=76 and lvlENNEMI<=90 then nameEnnemy$ = "Centaur champion"
if version = 1 and lvlENNEMI>=91 and lvlENNEMI<=105 then nameEnnemy$ = "Golem géant"
if version = 2 and lvlENNEMI>=91 and lvlENNEMI<=105 then nameEnnemy$ = "Giant golem"
if version = 1 and lvlENNEMI>=106 and lvlENNEMI<=120 then nameEnnemy$ = "Phénix"
if version = 2 and lvlENNEMI>=106 and lvlENNEMI<=120 then nameEnnemy$ = "Pheonix"
if version = 1 and lvlENNEMI>=121  then nameEnnemy$ = "Dragon Rouge"
if version = 2 and lvlENNEMI>=121  then nameEnnemy$ = "Red Dragon"
'if version = 1 and lvlENNEMI>=91 and lvlENNEMI<=99 then nameEnnemy$ = "Titan"
'if version = 2 and lvlENNEMI>=91 and lvlENNEMI<=99 then nameEnnemy$ = "Titan"
'if version = 1 and lvlENNEMI>=100 then nameEnnemy$ = "Gardien d'aincrad"
'if version = 2 and lvlENNEMI>=100 then nameEnnemy$ = "Guardian Aincrad"
'if version = 1 and lvlENNEMI>=110 then nameEnnemy$ = "Titan d'élite"
'if version = 2 and lvlENNEMI>=110 then nameEnnemy$ = "Elite Titan"
'if version = 1 and lvlENNEMI>=120 then nameEnnemy$ = "Phénix divin"
'if version = 2 and lvlENNEMI>=120 then nameEnnemy$ = "Divin pheonix"
'if version = 1 and lvlENNEMI>=130 then nameEnnemy$ = "Dragon vert"
'if version = 2 and lvlENNEMI>=130 then nameEnnemy$ = "Green dragon"
'if version = 1 and lvlENNEMI>=140 then nameEnnemy$ = "Dragon noir"
'if version = 2 and lvlENNEMI>=140 then nameEnnemy$ = "Black dragon"
'if version = 1 and lvlENNEMI>150 then nameEnnemy$ = "Ancien Gardien d'aincrad"
'if version = 2 and lvlENNEMI>150 then nameEnnemy$ = "Old Guardian of Aincrad"

if player1rnd =20 and POPplayers >= 2 and lvl > 5 then
    if version = 1 then nameEnnemy$ = "Joueur (Tueur de joueur)"
    if version = 2 then nameEnnemy$ = "Player (Player killer)"
    [rmkLVLpk]
    lvlENNEMI = int(rnd(1)*(20*LvlDONJON)+1)
    if lvlENNEMI < int(7*LvlDONJON) then goto [rmkLVLpk]
   ' if lvlENNEMI > int(lvl+ (lvl/2)) then lvlENNEMI = int(lvl+ (lvl/2))
    pvENNEMI = int((90*lvlENNEMI)+pv/2) : pvTOTALennemi = pvENNEMI
    atkENNEMI = int((70*lvlENNEMI)+ ((BONUSdef+def)/2))
    defENNEMI = int(30*lvlENNEMI)
    xpENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+(atkENNEMI+defENNEMI))
    moneyENNEMI = pvTOTALennemi
    securOS = 1
end if


[Arena]
timer 0
#main.map, "cls"
action = 0 : donjon = 0 : arena = 1 : SECUmusic = 0 : ennemiX = 770 : ennemiY = 320
#main, "trapclose [quit]"
#main.map, "drawbmp foret1 0 0"
#main.map, "background foret1"
#main.map, "when leftButtonDown [SimpleClickDONJON]"
#main.map,"addsprite barre barre"
#main.map,"addsprite barre2 barre2"
#main.map,"addsprite fuir fuir"
#main.map,"addsprite pendentif1 pendentif1"
#main.map,"spritexy barre 350 350"
#main.map,"spritexy barre2 880 430"
#main.map,"spritexy fuir 165 660"
#main.map,"spritexy fenetre1 40 265"
#main.map,"spritexy pendentif1 368 366"
#main.map,"SpriteVisible mapbutton2 off"
#main.map,"SpriteVisible fenetre1 on"
#main.map,"SpriteVisible perso off"
#main.map,"SpriteVisible fuir on"
#main.map,"SpriteVisible barre2 on"

if ACTIVATIONvalrak = 1 then #main.map,"SpriteVisible Qp off"
ACTIVATIONvalrak = 0
if ACTIVATIONcampSANGI = 1 then #main.map,"SpriteVisible camp off"
ACTIVATIONcampSANGI = 0

if PARCHEMIN7 >= 1 then #main.map,"SpriteVisible pendentif1 on"
if PARCHEMIN7 < 1 then #main.map,"SpriteVisible pendentif1 off"

if sexe = 1 then
    if campagne$= "Warrior" then
        #main.map,"addsprite guerrierHOMME guerrierHOMME"
        #main.map,"spritexy guerrierHOMME 145 372"
        #main.map,"SpriteVisible guerrierHOMME on"
    end if
    if campagne$= "Tank" then
        #main.map,"addsprite tankHOMME tankHOMME"
        #main.map,"spritexy tankHOMME 190 370"
        #main.map,"SpriteVisible tankHOMME on"
    end if
    if campagne$= "Archer" then
        #main.map,"addsprite archerHOMME archerHOMME"
        #main.map,"spritexy archerHOMME 200 294"
        #main.map,"SpriteVisible archerHOMME on"
    end if
    if campagne$= "HEALER" then
        #main.map,"addsprite mageHOMME mageHOMME"
        #main.map,"spritexy mageHOMME 200 372"
        #main.map,"SpriteVisible mageHOMME on"
    end if
    if campagne$= "Artisan" then
        #main.map,"addsprite artisanHOMME artisanHOMME"
        #main.map,"spritexy artisanHOMME 180 378"
         #main.map,"SpriteVisible artisanHOMME on"
    end if
end if

if sexe = 2 then
    if campagne$= "Warrior" then
        #main.map,"addsprite guerrierFEMME guerrierFEMME"
        #main.map,"spritexy guerrierFEMME 180 372"
        #main.map,"SpriteVisible guerrierFEMME on"
    end if
    if campagne$= "Tank" then
        #main.map,"addsprite tankFEMME tankFEMME"
        #main.map,"spritexy tankFEMME 190 371"
        #main.map,"SpriteVisible tankFEMME on"
    end if
    if campagne$= "Archer" then
        #main.map,"addsprite archerFEMME archerFEMME"
        #main.map,"spritexy archerFEMME 200 372"
        #main.map,"SpriteVisible archerFEMME on"
    end if
    if campagne$= "Artisan" then
        #main.map,"addsprite artisanFEMME artisanFEMME"
        #main.map,"spritexy artisanFEMME 185 371"
        #main.map,"SpriteVisible artisanFEMME on"
    end if
    if campagne$= "HEALER" then
        #main.map,"addsprite mageFEMME mageFEMME"
        #main.map,"spritexy mageFEMME 185 371"
        #main.map,"SpriteVisible mageFEMME on"
    end if
end if

if nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then
    [killerREFRSH]
    playerkiller1 = int(rnd(1)*4+1)
    if playerkiller1 = playerkiller1HOLD then goto [killerREFRSH]
    playerkiller1HOLD = playerkiller1

if playerkiller1 <= 2 then
    playerkillerNAME = int(rnd(1)*10+1)
    if playerkillerNAME > 10 then playerkillerNAME = 10
    select case playerkillerNAME
    case 1
    nameEnnemy2$ = "Soiquar le faux marchand"
    case 2
    nameEnnemy2$ = "Jean michel la merguèse"
    case 3
    nameEnnemy2$ = "LucAvador"
    case 4
    nameEnnemy2$ = "Imperator"
    case 5
    nameEnnemy2$ = "WhitDraGon"
    case 6
    nameEnnemy2$ = "KillTOkill"
    case 7
    nameEnnemy2$ = "Cherche pas t mort"
    case 8
    nameEnnemy2$ = "Akatsuki"
    case 9
    nameEnnemy2$ = "RazorBlade"
    case 10
    nameEnnemy2$ = "TheKiller"
    end select
end if
if playerkiller1 > 2 then
    playerkillerNAME = int(rnd(1)*10+1)
    if playerkillerNAME > 10 then playerkillerNAME = 10
    select case playerkillerNAME
    case 1
    nameEnnemy2$ = "NikTAtata"
    case 2
    nameEnnemy2$ = "La villaine fille"
    case 3
    nameEnnemy2$ = "Killeuse2Killeur"
    case 4
    nameEnnemy2$ = "Imperatrice"
    case 5
    nameEnnemy2$ = "ReineDdrakon"
    case 6
    nameEnnemy2$ = "IwantYOU"
    case 7
    nameEnnemy2$ = "Lovely"
    case 8
    nameEnnemy2$ = "YouWantMe"
    case 9
    nameEnnemy2$ = "Bonnasssee"
    case 10
    nameEnnemy2$ = "LaCochonne"
    end select
end if

if nameEnnemy2QUEST$ <> "" then nameEnnemy2$ = nameEnnemy2QUEST$ : playerkiller1 = int(rnd(1)*2+1)
nameEnnemy2QUEST$ = ""
'notice VALRAKlife; " ";recompenseQ5a; " ";Q5pack2

        if VALRAKlife = 0 and recompenseQ5a = 0 and Q5pack2 = 1 and ACTIVATIONspriteVALRAK = 1 then
            if version = 1 then nameEnnemy$ = "Joueur (Tueur de joueur)"
            if version = 2 then nameEnnemy$ = "Player (Player killer)"
            nameEnnemy2$ = "VALRAK LE FOURBE"
            lvlENNEMI = 40
            pvENNEMI = 18000 + (200*lvl) : pvTOTALennemi = pvENNEMI
            atkENNEMI = 300 + (50*lvl)
            defENNEMI = 200 + (20*lvl)
            #main.map,"addsprite valrak valrak"
            #main.map,"spritexy valrak ";ennemiX-40;" ";ennemiY+130
            #main.map,"SpriteVisible valrak on"
        end if

        if NombreKILLsangi <9 and recompenseQ6a = 0 and Q6pack2 = 1 and ACTIVATIONspriteCAMP1 = 1 then
            if version = 1 then nameEnnemy$ = "Joueur (Tueur de joueur)"
            if version = 2 then nameEnnemy$ = "Player (Player killer)"
            nameEnnemy2$ = "Membre de la guilde sanguinaire"
            lvlENNEMI = int(rnd(1)*10+20)
            playerkiller1 = 2
            pvENNEMI = int(rnd(1)*4000+(50*lvlENNEMI)) : pvTOTALennemi = pvENNEMI
            atkENNEMI = (20*lvlENNEMI) + (10*lvl)
            defENNEMI = (10*lvlENNEMI) + (10*lvl)
            #main.map,"addsprite player2 player2"
            #main.map,"spritexy player2 ";ennemiX;" ";ennemiY+115
            #main.map,"SpriteVisible player2 on"
        end if

    if playerkiller1 = 1 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 = 0 then
        #main.map,"addsprite player1 player1"
        #main.map,"spritexy player1 ";ennemiX-40;" ";ennemiY+130
        #main.map,"SpriteVisible player1 on"
    end if
    if playerkiller1 = 2 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 = 0 then
        #main.map,"addsprite player2 player2"
        #main.map,"spritexy player2 ";ennemiX;" ";ennemiY+115
        #main.map,"SpriteVisible player2 on"
    end if
    if playerkiller1 = 3 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 = 0 then
        #main.map,"addsprite player3 player3"
        #main.map,"spritexy player3 ";ennemiX+5;" ";ennemiY+125
        #main.map,"SpriteVisible player3 on"
    end if
    if playerkiller1 = 4 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 = 0 then
        #main.map,"addsprite player4 player4"
        #main.map,"spritexy player4 ";ennemiX+5;" ";ennemiY+125
        #main.map,"SpriteVisible player4 on"
    end if
end if


if nameEnnemy$ = "Sanglier" or nameEnnemy$ ="Boar" then
    sanglier = int(rnd(1)*2+1)
    if sanglier = 1 then
        nameEnnemy2$ = "Sanglier Alpha"
        #main.map,"addsprite sanglier1 sanglier1"
        #main.map,"spritexy sanglier1 ";ennemiX-15;" ";ennemiY+150
        #main.map,"SpriteVisible sanglier1 on"
    end if
    if sanglier = 2 then
        nameEnnemy2$ = "Sanglier des bois"
        #main.map,"addsprite sanglier2 sanglier2"
        #main.map,"spritexy sanglier2 ";ennemiX;" ";ennemiY+188
        #main.map,"SpriteVisible sanglier2 on"
    end if
end if

if nameEnnemy$ = "Gobelin" then
    Gobelin = int(rnd(1)*6+1)
    if Gobelin = 1 then
        nameEnnemy2$ = "Gobelin à piques"
        #main.map,"addsprite gobelin1 gobelin1"
        #main.map,"spritexy gobelin1 ";ennemiX+20;" ";ennemiY+190
        #main.map,"SpriteVisible gobelin1 on"
    end if
    if Gobelin = 2 then
        nameEnnemy2$ = "Gobelin pyromane"
        #main.map,"addsprite gobelin2 gobelin2"
        #main.map,"spritexy gobelin2 ";ennemiX;" ";ennemiY+145
        #main.map,"SpriteVisible gobelin2 on"
    end if
    if Gobelin = 3 then
        nameEnnemy2$ = "Gobelin bagareur"
        #main.map,"addsprite gobelin3 gobelin3"
        #main.map,"spritexy gobelin3 ";ennemiX-20;" ";ennemiY+160
        #main.map,"SpriteVisible gobelin3 on"
    end if
    if Gobelin = 4 then
        nameEnnemy2$ = "Gobelin archaïque"
        #main.map,"addsprite gobelin4 gobelin4"
        #main.map,"spritexy gobelin4 ";ennemiX;" ";ennemiY+150
        #main.map,"SpriteVisible gobelin4 on"
    end if
    if Gobelin = 5 then
        nameEnnemy2$ = "Gobelin sanguinaire"
        #main.map,"addsprite gobelin5 gobelin5"
        #main.map,"spritexy gobelin5 ";ennemiX+20;" ";ennemiY+165
        #main.map,"SpriteVisible gobelin5 on"
    end if
    if Gobelin = 6 then
        nameEnnemy2$ = "Gobelin Gigantesque"
        #main.map,"addsprite gobelin6 gobelin6"
        #main.map,"spritexy gobelin6 ";ennemiX-10;" ";ennemiY+130
        #main.map,"SpriteVisible gobelin6 on"
    end if
end if

if nameEnnemy$ = "Araigné géante" or nameEnnemy$ ="Giant Spider" then
    araigner = int(rnd(1)*5+1)
    if araigner = 1 then
        nameEnnemy2$ = "Araignée des fôrets"
        #main.map,"addsprite araigner1 araigner1"
        #main.map,"spritexy araigner1 ";ennemiX+10;" ";ennemiY+240
        #main.map,"SpriteVisible araigner1 on"
    end if
    if araigner = 2 then
        nameEnnemy2$ = "Araignée camouflée"
        #main.map,"addsprite araigner2 araigner2"
        #main.map,"spritexy araigner2 ";ennemiX+10;" ";ennemiY+230
        #main.map,"SpriteVisible araigner2 on"
    end if
    if araigner = 3 then
        nameEnnemy2$ = "Araignée tisseuse"
        #main.map,"addsprite araigner3 araigner3"
        #main.map,"spritexy araigner3 ";ennemiX-70;" ";ennemiY+200
        #main.map,"SpriteVisible araigner3 on"
    end if
    if araigner = 4 then
        nameEnnemy2$ = "Araignée mortelle"
        #main.map,"addsprite araigner4 araigner4"
        #main.map,"spritexy araigner4 ";ennemiX-60;" ";ennemiY+200
        #main.map,"SpriteVisible araigner4 on"
    end if
    if araigner = 5 then
        nameEnnemy2$ = "Araignée fillaire"
        #main.map,"addsprite araigner5 araigner5"
        #main.map,"spritexy araigner5 ";ennemiX-60;" ";ennemiY+200
        #main.map,"SpriteVisible araigner5 on"
    end if
end if

if nameEnnemy$ = "Plante carnivore géante" or nameEnnemy$ ="Giant carnivorous plant" then
    plante = int(rnd(1)*1+1)
    if plante = 1 then
        nameEnnemy2$ = "Carnovirus Dégulicus"
        #main.map,"addsprite plante1 plante1"
        #main.map,"spritexy plante1 ";ennemiX+10;" ";ennemiY+160
        #main.map,"SpriteVisible plante1 on"
    end if
    if plante = 2 then
        nameEnnemy2$ = "Mangeuse d'Homme"
        #main.map,"addsprite plante1 plante1"
        #main.map,"spritexy plante1 ";ennemiX+10;" ";ennemiY+160
        #main.map,"SpriteVisible plante1 on"
    end if
end if

if nameEnnemy$ = "Mort-vivant" or nameEnnemy$ = "Undead" then
    ud = int(rnd(1)*2+1)
    if ud = 1 then
        nameEnnemy2$ = "Garde déchu"
        #main.map,"addsprite ud1 ud1"
        #main.map,"spritexy ud1 ";ennemiX+10;" ";ennemiY+170
        #main.map,"SpriteVisible ud1 on"
    end if
    if ud = 2 then
        nameEnnemy2$ = "Paysant d'outre tombe"
        #main.map,"addsprite ud2 ud2"
        #main.map,"spritexy ud2 ";ennemiX+10;" ";ennemiY+170
        #main.map,"SpriteVisible ud2 on"
    end if
end if


if nameEnnemy$ = "Champion centaure" or nameEnnemy$ = "Centaur champion" then
    centaur = int(rnd(1)*1+1)
    if centaur = 1 then
        nameEnnemy2$ = "Champion centaure enragé"
        if nameEnnemy$ = "Champion centaure" or nameEnnemy$ = "Centaur champion" and RoisDEScentaures = 0 and recompenseQ3b = 0 and Q3pack3 = 1 then
            roiCENT = int(rnd(1)*6+1)
            if roiCENT = 6 then
                nameEnnemy2$ = "KRYGUR Le roi des Centaures"
                lvlENNEMI = 90
                pvENNEMI = int(30000 + (400*lvl) + (pv/2)) : pvTOTALennemi = pvENNEMI
                atkENNEMI = 600 + (74*lvl) + ((BONUSdef+def)/2)
                defENNEMI = 400 + (67*lvl)
                xpENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+lvlENNEMI)
                moneyENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+lvlENNEMI)
            end if
        end if
        #main.map,"addsprite centaur1 centaur1"
        #main.map,"spritexy centaur1 ";ennemiX-80;" ";ennemiY+150
        #main.map,"SpriteVisible centaur1 on"
    end if
    if centaur = 2 then
        nameEnnemy2$ = "Champion centaure"
        if nameEnnemy$ = "Champion centaure" or nameEnnemy$ = "Centaur champion" and RoisDEScentaures = 0 and recompenseQ3b = 0 and Q3pack3 = 1 then
            roiCENT = int(rnd(1)*6+1)
            if roiCENT = 6 then
                nameEnnemy2$ = "KRYGUR Le roi des Centaures"
                lvlENNEMI = 90
                pvENNEMI = int(30000 + (400*lvl) + (pv/2)) : pvTOTALennemi = pvENNEMI
                atkENNEMI = 600 + (74*lvl) + ((BONUSdef+def)/2)
                defENNEMI = 400 + (67*lvl)
                xpENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+lvlENNEMI)
                moneyENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+lvlENNEMI)
            end if
        end if
        #main.map,"addsprite centaur1 centaur1"
        #main.map,"spritexy centaur1 ";ennemiX+10;" ";ennemiY+170
        #main.map,"SpriteVisible centaur1 on"
    end if
end if

if nameEnnemy$ = "Golem géant" or nameEnnemy$ = "Giant golem" then
    golem = int(rnd(1)*2+1)
    if golem = 1 then
        nameEnnemy2$ = "Golem géant de granite"
        #main.map,"addsprite golem1 golem1"
        #main.map,"spritexy golem1 ";ennemiX-30;" ";ennemiY+150
        #main.map,"SpriteVisible golem1 on"
    end if
    if golem = 2 then
        nameEnnemy2$ = "Golem destructeur"
        #main.map,"addsprite golem2 golem2"
        #main.map,"spritexy golem2 ";ennemiX-30;" ";ennemiY+150
        #main.map,"SpriteVisible golem2 on"
    end if
end if

if nameEnnemy$ = "Phénix" or nameEnnemy$ = "Pheonix" then
    Pheonix = int(rnd(1)*1+1)
    if Pheonix = 1 then
        nameEnnemy2$ = "Phénix ravageur"
        #main.map,"addsprite phenix1 phenix1"
        #main.map,"spritexy phenix1 ";ennemiX-20;" ";ennemiY+120
        #main.map,"SpriteVisible phenix1 on"
    end if
    if Pheonix = 2 then
        nameEnnemy2$ = "Phénix éteincelant"
        #main.map,"addsprite phenix1 phenix1"
        #main.map,"spritexy phenix1 ";ennemiX-20;" ";ennemiY+120
        #main.map,"SpriteVisible phenix1 on"
    end if
end if

if nameEnnemy$ = "Dragon Rouge" or nameEnnemy$ = "Red Dragon" then
    drake = int(rnd(1)*1+1)
    if drake = 1 then
        nameEnnemy2$ = "Dragon des fourneaux"
        #main.map,"addsprite RedDragon1 RedDragon1"
        #main.map,"spritexy RedDragon1 ";ennemiX-120;" ";ennemiY+70
        #main.map,"SpriteVisible RedDragon1 on"
    end if
end if

rndX1 = int(rnd(1)*50)+800
rndY1 = int(rnd(1)*100)+400
rndX2 = int(rnd(1)*50)+300
rndY2 = int(rnd(1)*50)+450

#main.map,"addsprite boum boum"
#main.map,"spritexy boum ";rndX1;" ";rndY1
#main.map,"addsprite boum3 boum"
#main.map,"spritexy boum3 ";rndX2;" ";rndY2
#main.map,"addsprite boum2 boum2"
#main.map,"spritexy boum2 810 480"
#main.map,"addsprite boum4 boum2"
#main.map,"spritexy boum4 290 580"
#main.map,"SpriteVisible boum off"
#main.map,"SpriteVisible boum2 off"
#main.map,"SpriteVisible boum3 off"
#main.map,"SpriteVisible boum4 off"
#main.map,"SpriteVisible camp2 off"
#main.map "DrawSprites"

gosub [DATAlife]
gosub [restorBarreHp]
gosub [restorPOPO]
wait

[refreshArena1]
#main.map "DrawSprites"
gosub [DATAlife]
gosub [restorBarreHp]
gosub [restorPOPO]
wait

[restorPOPO]
print #main.map, "backcolor white; color black"
print #main.map, "place 52 302 ;\"; PotionLittleHP
print #main.map, "place 52 346 ;\"; PotionMediumHP
print #main.map, "place 52 390 ;\"; PotionBigHP
print #main.map, "place 52 434 ;\"; PotionBig2HP
print #main.map, "place 52 476 ;\"; PotionBig3HP
print #main.map, "place 52 518 ;\"; PARCHEMIN1
print #main.map, "place 52 560 ;\"; PARCHEMIN2
print #main.map, "place 52 604 ;\"; PARCHEMIN3
print #main.map, "place 52 646 ;\"; PARCHEMIN4
print #main.map, "place 52 690 ;\"; PARCHEMIN5
print #main.map, "place 52 734 ;\"; PARCHEMIN6
return

[useParchemin1]
if PARCHEMIN1 < 1 then wait
if activationPARCHEMIN1 = 1 then wait
PARCHEMIN1 = PARCHEMIN1 - 1
nombreUTILparch = nombreUTILparch + 1
#main.map , "backcolor white; color black"
print #main.map, "place  52 518 ;\"; PARCHEMIN1;"  "
if version = 1 then notice " " + chr$(13) + "Parchemin activé : Points de vie améliorer de 20% durant le combat !"
if version = 2 then notice " " + chr$(13) + "Parchemin activated : Life points up by 20% during the fight !"
PARCHEMIN1bonus = int(pvTOTAL/5)
pv = int(pv+PARCHEMIN1bonus)
pvTOTAL = int(pvTOTAL+PARCHEMIN1bonus)
activationPARCHEMIN1 = 1
nMax2 = nMax2 - 1
if nMax2 < 0 then nMax2 = 0
'print #main.map, "place 270 341 ;\";pv+PARCHEMIN1bonus; " / "; pvTOTAL+PARCHEMIN1bonus;"    "
goto [potionUSED]

[useParchemin2]
if PARCHEMIN2 < 1 then wait
if PARCHEMIN2bonus = 1 then wait
PARCHEMIN2 = PARCHEMIN2 - 1
nombreUTILparch = nombreUTILparch + 1
#main.map , "backcolor white; color black"
print #main.map, "place 52 560 ;\"; PARCHEMIN2;"  "
if version = 1 then notice " " + chr$(13) + "Parchemin activé : +20% de dégats infligés durant le combat !"
if version = 2 then notice " " + chr$(13) + "Parchemin activated : +20% of damages deals during the fight !"
PARCHEMIN2bonus = 1
nMax2 = nMax2 - 1
if nMax2 < 0 then nMax2 = 0
wait

[useParchemin3]
if PARCHEMIN3 < 1 then wait
if PARCHEMIN3bonus = 1 then wait
PARCHEMIN3 = PARCHEMIN3 - 1
nombreUTILparch = nombreUTILparch + 1
#main.map , "backcolor white; color black"
print #main.map, "place 52 604 ;\"; PARCHEMIN3;"  "
if version = 1 then notice " " + chr$(13) + "Parchemin activé : -20% de dégats reçus durant le combat !"
if version = 2 then notice " " + chr$(13) + "Parchemin activated : -20% of damages take during the fight !"
PARCHEMIN3bonus = 1
nMax2 = nMax2 - 1
if nMax2 < 0 then nMax2 = 0
wait

[useParchemin4]
if PARCHEMIN4 < 1 then wait
if PARCHEMIN4bonus = 1 then wait
PARCHEMIN4 = PARCHEMIN4 - 1
nombreUTILparch = nombreUTILparch + 1
#main.map , "backcolor white; color black"
print #main.map, "place 52 646 ;\"; PARCHEMIN4;"  "
if version = 1 then notice " " + chr$(13) + "Parchemin activé : Potions +10% efficasse et +10% d'expérience durant le combat !"
if version = 2 then notice " " + chr$(13) + "Parchemin activated : Potions +10% better and +10% more exp durieng the fight !"
PARCHEMIN4bonus = 1
nMax2 = nMax2 - 1
if nMax2 < 0 then nMax2 = 0
wait

[useParchemin5]
if PARCHEMIN5 < 1 then wait
if PARCHEMIN5bonus = 1 then wait
#main.map , "backcolor white; color black"
PARCHEMIN5 = PARCHEMIN5 - 1
nombreUTILparch = nombreUTILparch + 1
print #main.map, "place 52 690 ;\"; PARCHEMIN5;"  "
if version = 1 then notice " " + chr$(13) + "Parchemin activé : Points d'expériences doublés durant le combat !"
if version = 2 then notice " " + chr$(13) + "Parchemin activated : Double your Exp points during the fight !"
PARCHEMIN5bonus = 1
nMax2 = nMax2 - 1
if nMax2 < 0 then nMax2 = 0
wait

[useParchemin6]
if PARCHEMIN6 < 1 then wait
if PARCHEMIN6bonus = 1 then wait
#main.map , "backcolor white; color black"
PARCHEMIN6 = PARCHEMIN6 - 1
nombreUTILparch = nombreUTILparch + 1
print #main.map, "place 52 734 ;\"; PARCHEMIN6;"  "
if version = 1 then notice " " + chr$(13) + "Parchemin activé : + 50% d'or à la fin du combat !"
if version = 2 then notice " " + chr$(13) + "Parchemin activated : + 50% gold during the fight !"
PARCHEMIN6bonus = 1
nMax2 = nMax2 - 1
if nMax2 < 0 then nMax2 = 0
wait


[SimpleClickDONJON]
    mX = MouseX
    mY = MouseY
compteurCLICK = compteurCLICK + 1
if noCLICK = 1 then
    noCLICK = 0
    #main.map, "drawsprites"
    goto [donjon]
end if

'notice mX;" / "; mY
    if mX>40 and mX<84 and mY>265 and mY<305 then goto [usePotion1]
    if mX>40 and mX<84 and mY>310 and mY<350 then goto [usePotion2]
    if mX>40 and mX<84 and mY>355 and mY<395 then goto [usePotion3]
    if mX>40 and mX<84 and mY>395 and mY<435 then goto [usePotion4]
    if mX>40 and mX<84 and mY>440 and mY<480 then goto [usePotion5]
    if mX>40 and mX<84 and mY>480 and mY<520 then goto [useParchemin1]
    if mX>40 and mX<84 and mY>525 and mY<565 then goto [useParchemin2]
    if mX>40 and mX<84 and mY>570 and mY<610 then goto [useParchemin3]
    if mX>40 and mX<84 and mY>610 and mY<655 then goto [useParchemin4]
    if mX>40 and mX<84 and mY>660 and mY<700 then goto [useParchemin5]
    if mX>40 and mX<84 and mY>700 and mY<740 then goto [useParchemin6]

    if mX>ennemiX-300 and mX<ennemiX+300 and mY>ennemiY-100 and mY<ennemiY+500 then goto [Attaque]
    if mX>160 and mX<210 and mY>655 and mY<705 and donjon = 1 or arena = 1 and mX>160 and mX<210 and mY>655 and mY<705 then
        timer 0
        fuite = int(rnd(1)*10+1)
        gardien = 0
        action = 0
        PARCHEMIN1bonus = 0
        PARCHEMIN2bonus = 0
        PARCHEMIN3bonus = 0
        PARCHEMIN4bonus = 0
        PARCHEMIN5bonus = 0
        PARCHEMIN6bonus = 0
        activationPARCHEMIN1 = 0
        if fuite = 10 then goto [runUSED]
        fuite = 0
        gosub [resetSpritearena]
        goto [Arena0]
    end if
    if donjon = 1 then goto [refreshDONJON1]
    if arena = 1 then goto [refreshArena1]
wait

[donjon]
timer 0
#main.map, "cls"
donjon = 1 : action = 0 : arena = 0 : SECUmusic = 0 : ennemiX = 520 : ennemiY = 40
if version = 1 then nameEnnemy$ = "Garde du donjon"
if version = 2 then nameEnnemy$ = "Guard of dunjeon"
if DonjonMaudit = 1 and LvlDONJONmaudit <=12 and ACTIVATIONcamp2FOND = 1 then ennemiX = 570 : ennemiY = -100
gosub [FLOOR2]

if BOSS = 1 then
    defENNEMI = defBOOS
    atkENNEMI = atkBOOS
    pvENNEMI = pvBOOS
    pvTOTALennemi = pvENNEMI
    xpENNEMI = xpBOSS
    moneyENNEMI = moneyBOSS
end if

#main, "trapclose [quit]"
#main.map , "backcolor white"
#main.map, "when leftButtonDown [SimpleClickDONJON]"
#main.map , "down"

if ACTIVATIONcamp2FOND = 0 then
    #main.map, "drawbmp donjon1 0 0"
    #main.map,"background donjon1"
end if
if ACTIVATIONcamp2FOND = 1 then
    #main.map, "drawbmp donjon2 0 0"
    #main.map,"background donjon2"
end if

#main.map,"addsprite barre barre"
#main.map,"spritexy barre 120 300"
#main.map,"addsprite barre2 barre2"
#main.map,"spritexy barre2 750 250"
#main.map,"addsprite fuir fuir"
#main.map,"spritexy fuir 165 660"
#main.map,"spritexy fenetre1 40 265"
#main.map,"addsprite boss1 boss1"
#main.map,"addsprite boss2 boss2"
#main.map,"addsprite boss3 boss3"
#main.map,"addsprite boss4 boss4"
#main.map,"addsprite boss5 boss5"
#main.map,"addsprite boss6 boss6"
#main.map,"addsprite boss7 boss7"
#main.map,"addsprite boss8 boss8"
#main.map,"addsprite boss9 boss9"
#main.map,"addsprite boss10 boss10"
#main.map,"addsprite boss11 boss11"
#main.map,"addsprite boss12 boss12"
#main.map,"SpriteVisible fenetre1 on"
#main.map,"SpriteVisible perso off"
#main.map,"SpriteVisible fuir on"
#main.map,"SpriteVisible barre2 on"
#main.map,"SpriteVisible boss1 off"
#main.map,"SpriteVisible boss2 off"
#main.map,"SpriteVisible boss3 off"
#main.map,"SpriteVisible boss4 off"
#main.map,"SpriteVisible boss5 off"
#main.map,"SpriteVisible boss6 off"
#main.map,"SpriteVisible boss7 off"
#main.map,"SpriteVisible boss8 off"
#main.map,"SpriteVisible boss9 off"
#main.map,"SpriteVisible boss10 off"
#main.map,"SpriteVisible boss11 off"
#main.map,"SpriteVisible boss12 off"
#main.map,"SpriteVisible mapbutton2 off"
#main.map,"SpriteVisible camp2 off"

if ACTIVATIONvalrak = 1 then #main.map,"SpriteVisible Qp off"
ACTIVATIONvalrak = 0

if ACTIVATIONcampSANGI = 1 then #main.map,"SpriteVisible camp off"
ACTIVATIONcampSANGI = 0

#main.map,"addsprite pendentif1 pendentif1"
#main.map,"spritexy pendentif1 138 316"
if PARCHEMIN7 >= 1 then #main.map,"SpriteVisible pendentif1 on"
if PARCHEMIN7 < 1 then #main.map,"SpriteVisible pendentif1 off"

if sexe = 1 then
    if campagne$= "Warrior" then
        #main.map,"addsprite guerrierHOMME guerrierHOMME"
        #main.map,"spritexy guerrierHOMME 180 372"
        #main.map,"SpriteVisible guerrierHOMME on"
    end if
    if campagne$= "Tank" then
        #main.map,"addsprite tankHOMME tankHOMME"
        #main.map,"spritexy tankHOMME 190 370"
        #main.map,"SpriteVisible tankHOMME on"
    end if
    if campagne$= "Archer" then
        #main.map,"addsprite archerHOMME archerHOMME"
        #main.map,"spritexy archerHOMME 200 294"
        #main.map,"SpriteVisible archerHOMME on"
    end if
    if campagne$= "HEALER" then
        #main.map,"addsprite mageHOMME mageHOMME"
        #main.map,"spritexy mageHOMME 200 372"
        #main.map,"SpriteVisible mageHOMME on"
    end if
    if campagne$= "Artisan" then
        #main.map,"addsprite artisanHOMME artisanHOMME"
        #main.map,"spritexy artisanHOMME 180 378"
         #main.map,"SpriteVisible artisanHOMME on"
    end if
end if

if sexe = 2 then
    if campagne$= "Warrior" then
        #main.map,"addsprite guerrierFEMME guerrierFEMME"
        #main.map,"spritexy guerrierFEMME 180 372"
        #main.map,"SpriteVisible guerrierFEMME on"
    end if
    if campagne$= "Tank" then
        #main.map,"addsprite tankFEMME tankFEMME"
        #main.map,"spritexy tankFEMME 190 371"
        #main.map,"SpriteVisible tankFEMME on"
    end if
    if campagne$= "Archer" then
        #main.map,"addsprite archerFEMME archerFEMME"
        #main.map,"spritexy archerFEMME 200 372"
        #main.map,"SpriteVisible archerFEMME on"
    end if
    if campagne$= "Artisan" then
        #main.map,"addsprite artisanFEMME artisanFEMME"
        #main.map,"spritexy artisanFEMME 180 371"
        #main.map,"SpriteVisible artisanFEMME on"
    end if
    if campagne$= "HEALER" then
        #main.map,"addsprite mageFEMME mageFEMME"
        #main.map,"spritexy mageFEMME 180 371"
        #main.map,"SpriteVisible mageFEMME on"
    end if
end if

if DonjonMaudit = 1 and LvlDONJONmaudit <13 and ACTIVATIONcamp2FOND = 1 then
    if version = 1 then nameEnnemy$ = "Garde du donjon"
    if version = 2 then nameEnnemy$ = "Guard of dunjeon"
        lvlENNEMI = int(LvlDONJON*5)
        pvENNEMI = int(350*lvlENNEMI) : pvTOTALennemi = pvENNEMI
        atkENNEMI = int(70*lvlENNEMI+(def+BONUSdef))
        defENNEMI = int(40*lvlENNEMI+(def/2))
        xpENNEMI = int(atkENNEMI+defENNEMI)*2
        moneyENNEMI = pvTOTALennemi
    guard = int(rnd(1)*2+4)
    if LvlDONJONmaudit = 12 then guard = 3
    if guard = 4 then
        #main.map,"addsprite guard1 guard1"
        #main.map,"spritexy guard1 ";ennemiX+90;" ";ennemiY+325
        #main.map,"SpriteVisible guard1 on"
    end if
    if guard = 5 then
        #main.map,"addsprite guard2 guard2"
        #main.map,"spritexy guard2 ";ennemiX+90;" ";ennemiY+330
        #main.map,"SpriteVisible guard2 on"
    end if
    if guard = 3 then
        nameEnnemy$ = "GarGar'Urth le maudit"
        #main.map,"addsprite gardien gardien"
        #main.map,"spritexy gardien ";ennemiX+40;" ";ennemiY+300
        #main.map,"SpriteVisible gardien on"
        lvlENNEMI = int(LvlDONJON*8)
        pvENNEMI = int(1000*lvlENNEMI) : pvTOTALennemi = pvENNEMI
        atkENNEMI = int(220*lvlENNEMI+(def+BONUSdef))
        defENNEMI = int(80*lvlENNEMI+(def/2))
        xpENNEMI = int(atkENNEMI+defENNEMI)*2
        moneyENNEMI = pvTOTALennemi
    end if
    goto [nextDONJON]
end if
'BOSS = 1 : LvlDONJON = 10

if BOSS = 0 and nameEnnemy$ = "Garde du donjon" or nameEnnemy$ = "Guard of dunjeon" then
    guard = int(rnd(1)*2+1)
    if NumberFLOORmonster = 1 then guard = 3
    if guard = 1 then
        #main.map,"addsprite guard4 guard4"
        #main.map,"spritexy guard4 ";ennemiX+60;" ";ennemiY+270
        #main.map,"SpriteVisible guard4 on"
    end if
    if guard = 2 then
        #main.map,"addsprite guard4 guard4"
        #main.map,"spritexy guard4 ";ennemiX+60;" ";ennemiY+270
        #main.map,"SpriteVisible guard4 on"
    end if
    if guard = 3 and gardien = 0 then
        gardien = 1
        nameEnnemy$ = "Gardien"
        #main.map,"addsprite gardien gardien"
        #main.map,"spritexy gardien ";ennemiX+40;" ";ennemiY+300
        #main.map,"SpriteVisible gardien on"
        lvlENNEMI = int(LvlDONJON*10)
        pvENNEMI = int(250*lvlENNEMI) : pvTOTALennemi = pvENNEMI
        atkENNEMI = int((80*lvlENNEMI)+(def+BONUSdef))
        defENNEMI = int(40*lvlENNEMI)
        xpENNEMI = int(atkENNEMI+defENNEMI)*2
        moneyENNEMI = pvTOTALennemi
    end if
end if


if BOSS = 1 then
lvlBOOS = int(LvlDONJON*20)

    if LvlDONJON = 1 then
        nameEnnemy$ = "BOSS : Hulk'ar, le ravageur"
        #main.map,"spritexy boss1 ";ennemiX+25;" ";ennemiY+315
        #main.map,"SpriteVisible boss1 on"
        pvBOOS = 16500 + pv
        atkBOOS = 950 + int((BONUSdef+def)/2)
        defBOOS = 700
        xpBOSS = 15000
        moneyBOSS = 20000
    end if
    if LvlDONJON = 2 then
        nameEnnemy$ = "BOSS : Hendrax l'Egorgeur"
        #main.map,"spritexy boss2 ";ennemiX+40;" ";ennemiY+290
        #main.map,"SpriteVisible boss2 on"
        pvBOOS = 37000+ pv
        atkBOOS = 2000+ int((BONUSdef+def)/2)
        defBOOS = 1100
        xpBOSS = 27000
        moneyBOSS = 35000
    end if
    if LvlDONJON = 3 then
        nameEnnemy$ = "BOSS : Titanos le puissant"
        #main.map,"spritexy boss3 ";ennemiX;" ";ennemiY+255
        #main.map,"SpriteVisible boss3 on"
        pvBOOS = 71000+ pv
        atkBOOS = 4000+ int((BONUSdef+def)/2)
        defBOOS = 2000
        xpBOSS = 35000
        moneyBOSS = 50000
    end if
    if LvlDONJON = 4 then
        nameEnnemy$ = "BOSS : Tengû le divin"
        #main.map,"spritexy boss4 ";ennemiX;" ";ennemiY+270
        #main.map,"SpriteVisible boss4 on"
        pvBOOS = 120000 + pv
        atkBOOS = 6000+ int((BONUSdef+def)/2)
        defBOOS = 6000
        xpBOSS = 40000
        moneyBOSS = 60000
    end if
    if LvlDONJON = 5 then
        nameEnnemy$ = "BOSS : Nirull le roi déchu"
        #main.map,"spritexy boss5 ";ennemiX-20;" ";ennemiY+260
        #main.map,"SpriteVisible boss5 on"
        pvBOOS = 180000 + pv
        atkBOOS = 9000+ int((BONUSdef+def)/2)
        defBOOS = 3000
        xpBOSS = 50000
        moneyBOSS = 65000
    end if
    if LvlDONJON = 6 then
        nameEnnemy$ = "BOSS : Nabasu le vengeur"
        #main.map,"spritexy boss6 ";ennemiX-85;" ";ennemiY+250
        #main.map,"SpriteVisible boss6 on"
        pvBOOS = 214000 + pv
        atkBOOS = 8000+ int((BONUSdef+def)/2)
        defBOOS = 6000
        xpBOSS = 55000
        moneyBOSS = 75000
    end if
    if LvlDONJON = 7 then
        nameEnnemy$ = "BOSS : Daageros le seigneur des lames"
        #main.map,"spritexy boss7 ";ennemiX-40;" ";ennemiY+240
        #main.map,"SpriteVisible boss7 on"
        pvBOOS = 260000 + pv
        atkBOOS = 11000+ int((BONUSdef+def)/2)
        defBOOS = 8000
        xpBOSS = 700000
        moneyBOSS = 80000
    end if
    if LvlDONJON = 8 then
        nameEnnemy$ = "BOSS : Agamemnon le chevaucheur du chaos"
        #main.map,"spritexy boss8 ";ennemiX-100;" ";ennemiY+220
        #main.map,"SpriteVisible boss8 on"
        pvBOOS = 286000 + pv
        atkBOOS = 15000+ int((BONUSdef+def)/2)
        defBOOS = 10000
        xpBOSS = 84000
        moneyBOSS = 90000
    end if
    if LvlDONJON = 9 then
        nameEnnemy$ = "BOSS : Titanos, titan des 5 mondes"
        #main.map,"spritexy boss9 ";ennemiX-30;" ";ennemiY+220
        #main.map,"SpriteVisible boss9 on"
        pvBOOS = 3490000 + pv
        atkBOOS = 19000+ int((BONUSdef+def)/2)
        defBOOS = 14000
        xpBOSS = 90000
        moneyBOSS = 100000
    end if
    if LvlDONJON = 10 then
        nameEnnemy$ = "BOSS : Thorilk, ancien dieu déchu"
        #main.map,"spritexy boss10 ";ennemiX-25;" ";ennemiY+110
        #main.map,"SpriteVisible boss10 on"
        pvBOOS = 695000 + pv
        atkBOOS = 30000+ int((BONUSdef+def)/2)
        defBOOS = 30000
        xpBOSS = 100000
        moneyBOSS = 150000
    end if
    if LvlDONJON = 11 then
        nameEnnemy$ = "BOSS : Itara, tueur de faux dieux"
        #main.map,"spritexy boss11 ";ennemiX+25;" ";ennemiY+280
        #main.map,"SpriteVisible boss11 on"
        pvBOOS = 640000 + pv
        atkBOOS = 40000+ int((BONUSdef+def)/2)
        defBOOS = 20000
        xpBOSS = 110000
        moneyBOSS = 160000
    end if
    if LvlDONJON = 12 then
        nameEnnemy$ = "BOSS : OULRAK, Le marteleur de crâne"
        #main.map,"spritexy boss12 ";ennemiX-10;" ";ennemiY+200
        #main.map,"SpriteVisible boss12 on"
        pvBOOS = 775000 + pv
        atkBOOS = 45000+ int((BONUSdef+def)/2)
        defBOOS = 34000
        xpBOSS = 120000
        moneyBOSS = 175000
    end if
    if LvlDONJON > 12 then
        nameEnnemy$ = "BOSS"
        pvBOOS = int(11530*lvlBOOS)
        atkBOOS = int(185*lvlBOOS)
        defBOOS = int(115*lvlBOOS)
        xpBOSS = int(10000+(10000*LvlDONJON))
        moneyBOSS = int(10000+(15000*LvlDONJON))
        #main.map,"spritexy boss1 ";ennemiX+25;" ";ennemiY+315
        #main.map,"SpriteVisible boss1 on"
    end if

pvENNEMI = int(pvBOOS)
pvTOTALennemi = pvENNEMI
atkENNEMI = int(atkBOOS)
defENNEMI = int(defBOOS)
xpENNEMI = int(xpBOSS)
moneyENNEMI = int(moneyBOSS)
end if


[nextDONJON]
rndX1 = rnd(1)*50+650
rndY1 = rnd(1)*50+400
rndX2 = rnd(1)*50+200
rndY2 = rnd(1)*50+500
#main.map,"addsprite boum boum"
#main.map,"spritexy boum ";rndX1;" ";rndY1
#main.map,"addsprite boum3 boum"
#main.map,"spritexy boum3 ";rndX2;" ";rndY2
#main.map,"addsprite boum2 boum2"
#main.map,"spritexy boum2 605 380"
#main.map,"addsprite boum4 boum2"
#main.map,"spritexy boum4 290 580"
#main.map,"SpriteVisible boum off"
#main.map,"SpriteVisible boum2 off"
#main.map,"SpriteVisible boum3 off"
#main.map,"SpriteVisible boum4 off"
#main.map "DrawSprites"
gosub [DATAlife]
gosub [restorBarreHp]
gosub [restorPOPO]

if sexe = 1 then info1$ = "aventurier" : info2$ = "nouveau"
if sexe = 2 then info1$ = "aventurière" : info2$ = "nouvelle"

if AIDEpnj3 = 1 and ACTIVATIONcamp2FOND = 0 then
    print #main.map, "drawbmp pnjY2 0 0"
    print #main.map, "font Times New Roman 15 italic; color black;backcolor white"
    print #main.map, "place 510 200 ;\"; "'' Fait attention ! \C'est ici que tu trouveras les monstres les plus forts. \Si tu te sens en danger ne panique pas, améliore \ton équipement, achète des potions et des parchemins.\Si tu as encore du mal, retourne sur la carte et \augmente de niveau.\\Bonne chance à toi jeune ";info1$;" ! '' \\\ (Appuyez pour continuer)"
    noCLICK = 1
    AIDEpnj3 = 0
end if

wait

[refreshDONJON1]
#main.map "DrawSprites"
gosub [DATAlife]
gosub [restorBarreHp]
gosub [restorPOPO]



wait

[HPbarre]
if arena = 1 then
    r = 99 : v = 175 : b = 13
    print #main.map, "size 9; color ";r;" ";v;" ";b
    if pv<= INT((pvTOTAL/100)*60) then print #main.map, "size 9; color ";255;" ";113;" ";17
    if pv<= INT((pvTOTAL/100)*20) then print #main.map, "size 9; color ";217;" ";17;" ";27
    print #main.map, "line "; 384; " "; 375; " "; 584; " "; 375
    r = 99 : v = 175 : b = 13
    print #main.map, "size 9; color ";r;" ";v;" ";b
    if pvENNEMI<= INT((pvTOTALennemi/100)*60) then print #main.map, "size 9; color ";255;" ";113;" ";17
    if pvENNEMI<= INT((pvTOTALennemi/100)*20) then print #main.map, "size 9; color ";217;" ";17;" ";27
    print #main.map, "line "; 914; " "; 456; " "; 1114; " "; 456
end if
if donjon = 1 then
    r = 99 : v = 175 : b = 13
    print #main.map, "size 9; color ";r;" ";v;" ";b
    if pv<= INT((pvTOTAL/100)*60) then print #main.map, "size 9; color ";255;" ";113;" ";17
    if pv<= INT((pvTOTAL/100)*20) then print #main.map, "size 9; color ";217;" ";17;" ";27
    print #main.map, "line "; 153; " "; 326; " "; 353; " "; 326
    r = 99 : v = 175 : b = 13
    print #main.map, "size 9; color ";r;" ";v;" ";b
    if pvENNEMI<= INT((pvTOTALennemi/100)*60) then print #main.map, "size 9; color ";255;" ";113;" ";17
    if pvENNEMI<= INT((pvTOTALennemi/100)*20) then print #main.map, "size 9; color ";217;" ";17;" ";27
    print #main.map, "line "; 783; " "; 276; " "; 983; " "; 276
end if
if city = 1 or Inmap = 1 and arena = 0 and donjon = 0 then
    r = 99 : v = 175 : b = 13
    print #main.map, "size 9; color ";r;" ";v;" ";b
    if pv<= INT((pvTOTAL/100)*60) then print #main.map, "size 9; color ";255;" ";113;" ";17
    if pv<= INT((pvTOTAL/100)*20) then print #main.map, "size 9; color ";217;" ";17;" ";27
    print #main.map, "line "; 1030; " "; 50; " "; 1230; " "; 50
end if
print #main.map, "size 9; color black"
return

    [restorBarreHp]
    r = 136 : b = 136 : v = 136
    print #main.map, "font Times New Roman 7; backcolor ";r;" ";v;" ";b ;"; color white"
    if pv > 99999 then pv$ = "";str$(int(pv/1000));" k"
    if pv < 99999 then pv$ = "";str$(pv)
    if pvTOTAL > 99999 then pvTOTAL$ = "";str$(int(pvTOTAL/1000));" k"
    if pvTOTAL < 99999 then pvTOTAL$ = "";str$(pvTOTAL)
    if xpTOTAL < 99999 then xpTOTAL$ = "";str$(xpTOTAL)
    if xpTOTAL > 99999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000));" k"
    if xpTOTAL > 99999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000));" m"
    if xpTOTAL > 99999999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000000));" M"
    if xp < 99999 then xp$ = "";str$(xp)
    if xp > 99999 then xp$ = "";str$(int(xp/1000));" k"
    if xp > 99999999 then xp$ = "";str$(int(xp/1000000));" m"
    if xp > 99999999999 then xp$ = "";str$(int(xp/1000000000));" M"
    if pvENNEMI > 99999 then pvENNEMI$ = "";str$(int(pvENNEMI/1000));" k"
    if pvENNEMI < 99999 then pvENNEMI$ = "";str$(pvENNEMI)
    if pvTOTALennemi > 99999 then pvTOTALennemi$ = "";str$(int(pvTOTALennemi/1000));" k"
    if pvTOTALennemi < 99999 then pvTOTALennemi$ = "";str$(pvTOTALennemi)

    if city = 1 or Inmap = 1 and arena = 0 and donjon = 0 then
        print #main.map, "place 1150 65 ;\";pv$; " / "; pvTOTAL$;"    "
        print #main.map, "place 1220 65 ;\"; "lv."; lvl
    end if
    if arena = 1 then
        print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 1027 471 ;\";pvENNEMI$; " / "; pvTOTALennemi$
        print #main.map, "backcolor ";r;" ";v;" ";b ;"; place 500 391 ;\";pv$; " / "; pvTOTAL$;"    "
        print #main.map, "place 500 391 ;\";pv$; " / "; pvTOTAL$;"    "
        print #main.map, "place 570 391 ;\"; "lv."; lvl
        print #main.map, "place 515 362 ;\"; "Xp : "; xp$; " / "; xpTOTAL$
        print #main.map, "place 903 441 ;\"; nameEnnemy2$
        print #main.map, "place 375 362 ;\"; name$; " - ";RACE$
        print #main.map, "place 1027 471 ;\";pvENNEMI$; " / "; pvTOTALennemi$;"       "
        print #main.map, "place 1050 441 ;\"; "lv."; lvlENNEMI
        if lvlPASSIVE20 > 0 then #main.map, "place 493 404 ;\"; "Bouclier : ";int(bouclier);"   "
    end if
    if donjon = 1 then
        if version = 1 then floor$ = "PALIER ";LvlDONJON
        if version = 2 then floor$ = "FLOOR ";LvlDONJON
        print #main.map, "place 270 341 ;\";pv$; " / "; pvTOTAL$;"    "
        print #main.map, "place 340 341 ;\"; "lv."; lvl
        print #main.map, "place 280 312 ;\"; "Xp : "; xp$; " / "; xpTOTAL$
        if lvlPASSIVE20 > 0 then #main.map, "place 263 354 ;\"; "Bouclier : ";int(bouclier);"   "
        if DonjonMaudit = 1 and LvlDONJONmaudit <=12 and ACTIVATIONcamp2FOND = 1 then print #main.map, "place 775 262 ;\"; nameEnnemy$ ; "  [ Ennemis : "; int(12-LvlDONJONmaudit);" ]"
        if BOSS = 0 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 775 262 ;\"; nameEnnemy$ ; " [";floor$;"] "
        if BOSS = 1 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 775 262 ;\"; nameEnnemy$ ; " [";floor$;"]"
        print #main.map, "place 150 312 ;\"; name$; " - ";RACE$
        print #main.map, "place 892 292 ;\";pvENNEMI$; " / "; pvTOTALennemi$;"       "
        if BOSS = 0 then print #main.map, "place 955 262 ;\"; "lv."; lvlENNEMI
        if BOSS = 1 and LvlDONJON = 100 then print #main.map, "place 775 262 ;\"; "ULTIMATE BOSS : HEATHCLIFF "
        print #main.map, "backcolor white;color black"
        if BOSS = 0 and version = 1 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Ennemis en vie : ";NumberFLOORmonster
        if BOSS = 0 and version = 2 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Ennemies alive : ";NumberFLOORmonster
        if BOSS = 1 and version = 1 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Boss de palier ";LvlDONJON
        if BOSS = 1 and version = 2 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Boss floor ";LvlDONJON

    end if


    return

[DATAlife]
gosub [HPbarre]
if arena = 1 then
if pvENNEMI< INT((pvTOTALennemi/100)*100) AND pvENNEMI>= INT((pvTOTALennemi/100)*95) then print #main.map, "line "; 1114; " "; 456; " "; 1104; " "; 456
if pvENNEMI< INT((pvTOTALennemi/100)*95) AND pvENNEMI>= INT((pvTOTALennemi/100)*90) then print #main.map, "line "; 1114; " "; 456; " "; 1094; " ";456
if pvENNEMI < INT((pvTOTALennemi/100)*90) AND pvENNEMI >= INT((pvTOTALennemi/100)*85) then print #main.map, "line "; 1114; " "; 456; " "; 1084; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*85) AND pvENNEMI >= INT((pvTOTALennemi/100)*80) then print #main.map, "line "; 1114; " "; 456; " "; 1074; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*80) AND pvENNEMI >= INT((pvTOTALennemi/100)*75) then print #main.map, "line "; 1114; " "; 456; " "; 1064; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*75) AND pvENNEMI >= INT((pvTOTALennemi/100)*70) then print #main.map, "line "; 1114; " "; 456; " "; 1054; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*70) AND pvENNEMI >= INT((pvTOTALennemi/100)*65) then print #main.map, "line "; 1114; " "; 456; " "; 1044; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*65) AND pvENNEMI >= INT((pvTOTALennemi/100)*70) then print #main.map, "line "; 1114; " "; 456; " "; 1034; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*70) AND pvENNEMI >= INT((pvTOTALennemi/100)*55) then print #main.map, "line "; 1114; " "; 456; " "; 1024; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*55) AND pvENNEMI >= INT((pvTOTALennemi/100)*50) then print #main.map, "line "; 1114; " "; 456; " "; 1014; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*50) AND pvENNEMI >= INT((pvTOTALennemi/100)*45) then print #main.map, "line "; 1114; " "; 456; " "; 1004; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*45) AND pvENNEMI >= INT((pvTOTALennemi/100)*40) then print #main.map, "line "; 1114; " "; 456; " "; 994; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*40) AND pvENNEMI >= INT((pvTOTALennemi/100)*35) then print #main.map, "line "; 1114; " "; 456; " "; 984; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*35) AND pvENNEMI >= INT((pvTOTALennemi/100)*30) then print #main.map, "line "; 1114; " "; 456; " "; 974; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*30) AND pvENNEMI >= INT((pvTOTALennemi/100)*25) then print #main.map, "line "; 1114; " "; 456; " "; 964; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*25) AND pvENNEMI >= INT((pvTOTALennemi/100)*20) then print #main.map, "line "; 1114; " "; 456; " "; 954; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*20) AND pvENNEMI >= INT((pvTOTALennemi/100)*15) then print #main.map, "line "; 1114; " "; 456; " "; 934; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*15) AND pvENNEMI >= INT((pvTOTALennemi/100)*10) then print #main.map, "line "; 1114; " "; 456; " "; 924; " "; 456
if pvENNEMI < INT((pvTOTALennemi/100)*10) AND pvENNEMI >= 1 then print #main.map, "line "; 1114; " "; 456; " "; 918; " "; 456
if pvENNEMI <= 0 then print #main.map, "line "; 1114; " "; 456; " "; 910; " "; 456
end if
if donjon = 1 then
if pvENNEMI< INT((pvTOTALennemi/100)*100) AND pvENNEMI>= INT((pvTOTALennemi/100)*95) then print #main.map, "line "; 983; " "; 276; " "; 973; " "; 276
if pvENNEMI< INT((pvTOTALennemi/100)*95) AND pvENNEMI>= INT((pvTOTALennemi/100)*90) then print #main.map, "line "; 983; " "; 276; " "; 963; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*90) AND pvENNEMI >= INT((pvTOTALennemi/100)*85) then print #main.map, "line "; 983; " "; 276; " "; 953; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*85) AND pvENNEMI >= INT((pvTOTALennemi/100)*80) then print #main.map, "line "; 983; " "; 276; " "; 943; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*80) AND pvENNEMI >= INT((pvTOTALennemi/100)*75) then print #main.map, "line "; 983; " "; 276; " "; 933; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*75) AND pvENNEMI >= INT((pvTOTALennemi/100)*70) then print #main.map, "line "; 983; " "; 276; " "; 923; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*70) AND pvENNEMI >= INT((pvTOTALennemi/100)*65) then print #main.map, "line "; 983; " "; 276; " "; 913; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*65) AND pvENNEMI >= INT((pvTOTALennemi/100)*70) then print #main.map, "line "; 983; " "; 276; " "; 903; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*70) AND pvENNEMI >= INT((pvTOTALennemi/100)*55) then print #main.map, "line "; 983; " "; 276; " "; 893; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*55) AND pvENNEMI >= INT((pvTOTALennemi/100)*50) then print #main.map, "line "; 983; " "; 276; " "; 883; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*50) AND pvENNEMI >= INT((pvTOTALennemi/100)*45) then print #main.map, "line "; 983; " "; 276; " "; 873; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*45) AND pvENNEMI >= INT((pvTOTALennemi/100)*40) then print #main.map, "line "; 983; " "; 276; " "; 863; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*40) AND pvENNEMI >= INT((pvTOTALennemi/100)*35) then print #main.map, "line "; 983; " "; 276; " "; 853; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*35) AND pvENNEMI >= INT((pvTOTALennemi/100)*30) then print #main.map, "line "; 983; " "; 276; " "; 843; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*30) AND pvENNEMI >= INT((pvTOTALennemi/100)*25) then print #main.map, "line "; 983; " "; 276; " "; 833; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*25) AND pvENNEMI >= INT((pvTOTALennemi/100)*20) then print #main.map, "line "; 983; " "; 276; " "; 823; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*20) AND pvENNEMI >= INT((pvTOTALennemi/100)*15) then print #main.map, "line "; 983; " "; 276; " "; 813; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*15) AND pvENNEMI >= INT((pvTOTALennemi/100)*10) then print #main.map, "line "; 983; " "; 276; " "; 803; " "; 276
if pvENNEMI < INT((pvTOTALennemi/100)*10) AND pvENNEMI >= 1 then print #main.map, "line "; 983; " "; 276; " "; 793; " "; 276
if pvENNEMI <= 0 then print #main.map, "line "; 983; " "; 276; " "; 788; " "; 276
end if

if arena = 1 then
if pv< pvTOTAL AND pv>= INT((pvTOTAL/100)*95) then print #main.map, "line "; 584; " "; 375; " "; 574; " ";375
if pv< INT((pvTOTAL/100)*95) AND pv>= INT((pvTOTAL/100)*90) then print #main.map, "line "; 584; " "; 375; " "; 564; " ";375
if pv< INT((pvTOTAL/100)*90) AND pv>= INT((pvTOTAL/100)*85) then print #main.map, "line "; 584; " "; 375; " "; 554; " ";375
if pv < INT((pvTOTAL/100)*85) AND pv >= INT((pvTOTAL/100)*80) then print #main.map, "line "; 584; " "; 375; " "; 544; " "; 375
if pv < INT((pvTOTAL/100)*80) AND pv >= INT((pvTOTAL/100)*75) then print #main.map, "line "; 584; " "; 375; " "; 534; " "; 375
if pv < INT((pvTOTAL/100)*75) AND pv >= INT((pvTOTAL/100)*70) then print #main.map, "line "; 584; " "; 375; " "; 524; " "; 375
if pv < INT((pvTOTAL/100)*70) AND pv >= INT((pvTOTAL/100)*65) then print #main.map, "line "; 584; " "; 375; " "; 514; " "; 375
if pv < INT((pvTOTAL/100)*65) AND pv >= INT((pvTOTAL/100)*60) then print #main.map, "line "; 584; " "; 375; " "; 504; " "; 375
if pv < INT((pvTOTAL/100)*60) AND pv >= INT((pvTOTAL/100)*55) then print #main.map, "line "; 584; " "; 375; " "; 494; " "; 375
if pv < INT((pvTOTAL/100)*55) AND pv >= INT((pvTOTAL/100)*50) then print #main.map, "line "; 584; " "; 375; " "; 484; " "; 375
if pv < INT((pvTOTAL/100)*50) AND pv >= INT((pvTOTAL/100)*45) then print #main.map, "line "; 584; " "; 375; " "; 474; " "; 375
if pv < INT((pvTOTAL/100)*45) AND pv >= INT((pvTOTAL/100)*40) then print #main.map, "line "; 584; " "; 375; " "; 464; " "; 375
if pv < INT((pvTOTAL/100)*40) AND pv >= INT((pvTOTAL/100)*35) then print #main.map, "line "; 584; " "; 375; " "; 454; " "; 375
if pv < INT((pvTOTAL/100)*35) AND pv >= INT((pvTOTAL/100)*30) then print #main.map, "line "; 584; " "; 375; " "; 444; " "; 375
if pv < INT((pvTOTAL/100)*30) AND pv >= INT((pvTOTAL/100)*25) then print #main.map, "line "; 584; " "; 375; " "; 434; " "; 375
if pv < INT((pvTOTAL/100)*25) AND pv >= INT((pvTOTAL/100)*20) then print #main.map, "line "; 584; " "; 375; " "; 424; " "; 375
if pv < INT((pvTOTAL/100)*20) AND pv >= INT((pvTOTAL/100)*15) then print #main.map, "line "; 584; " "; 375; " "; 414; " "; 375
if pv < INT((pvTOTAL/100)*15) AND pv >= INT((pvTOTAL/100)*10) then print #main.map, "line "; 584; " "; 375; " "; 404; " "; 375
if pv < INT((pvTOTAL/100)*10) AND pv >= INT((pvTOTAL/100)*05) then print #main.map, "line "; 584; " "; 375; " "; 394; " "; 375
if pv < INT((pvTOTAL/100)*5) AND pv >= INT((pvTOTAL/100)*1) then print #main.map, "line "; 584; " "; 375; " "; 384; " "; 375
if pv <= INT((pvTOTAL/100)*1) then print #main.map, "line "; 584; " "; 375; " "; 380; " "; 375
end if

if donjon = 1 then
if pv< pvTOTAL AND pv>= INT((pvTOTAL/100)*95) then print #main.map, "line "; 353; " "; 326; " "; 343; " ";326
if pv< INT((pvTOTAL/100)*95) AND pv>= INT((pvTOTAL/100)*90) then print #main.map, "line "; 353; " "; 326; " "; 333; " ";326
if pv< INT((pvTOTAL/100)*90) AND pv>= INT((pvTOTAL/100)*85) then print #main.map, "line "; 353; " "; 326; " "; 323; " ";326
if pv < INT((pvTOTAL/100)*85) AND pv >= INT((pvTOTAL/100)*80) then print #main.map, "line "; 353; " "; 326; " "; 313; " ";326
if pv < INT((pvTOTAL/100)*80) AND pv >= INT((pvTOTAL/100)*75) then print #main.map, "line "; 353; " "; 326; " "; 303; " ";326
if pv < INT((pvTOTAL/100)*75) AND pv >= INT((pvTOTAL/100)*70) then print #main.map, "line "; 353; " "; 326; " "; 293; " ";326
if pv < INT((pvTOTAL/100)*70) AND pv >= INT((pvTOTAL/100)*65) then print #main.map, "line "; 353; " "; 326; " "; 283; " ";326
if pv < INT((pvTOTAL/100)*65) AND pv >= INT((pvTOTAL/100)*60) then print #main.map, "line "; 353; " "; 326; " "; 273; " ";326
if pv < INT((pvTOTAL/100)*60) AND pv >= INT((pvTOTAL/100)*55) then print #main.map, "line "; 353; " "; 326; " "; 263; " ";326
if pv < INT((pvTOTAL/100)*55) AND pv >= INT((pvTOTAL/100)*50) then print #main.map, "line "; 353; " "; 326; " "; 253; " ";326
if pv < INT((pvTOTAL/100)*50) AND pv >= INT((pvTOTAL/100)*45) then print #main.map, "line "; 353; " "; 326; " "; 243; " ";326
if pv < INT((pvTOTAL/100)*45) AND pv >= INT((pvTOTAL/100)*40) then print #main.map, "line "; 353; " "; 326; " "; 233; " ";326
if pv < INT((pvTOTAL/100)*40) AND pv >= INT((pvTOTAL/100)*35) then print #main.map, "line "; 353; " "; 326; " "; 223; " ";326
if pv < INT((pvTOTAL/100)*35) AND pv >= INT((pvTOTAL/100)*30) then print #main.map, "line "; 353; " "; 326; " "; 213; " ";326
if pv < INT((pvTOTAL/100)*30) AND pv >= INT((pvTOTAL/100)*25) then print #main.map, "line "; 353; " "; 326; " "; 203; " ";326
if pv < INT((pvTOTAL/100)*25) AND pv >= INT((pvTOTAL/100)*20) then print #main.map, "line "; 353; " "; 326; " "; 193; " ";326
if pv < INT((pvTOTAL/100)*20) AND pv >= INT((pvTOTAL/100)*15) then print #main.map, "line "; 353; " "; 326; " "; 183; " ";326
if pv < INT((pvTOTAL/100)*15) AND pv >= INT((pvTOTAL/100)*10) then print #main.map, "line "; 353; " "; 326; " "; 173; " ";326
if pv < INT((pvTOTAL/100)*10) AND pv >= INT((pvTOTAL/100)*05) then print #main.map, "line "; 353; " "; 326; " "; 163; " ";326
if pv < INT((pvTOTAL/100)*5) AND pv >= INT((pvTOTAL/100)*1) then print #main.map, "line "; 353; " "; 326; " "; 153; " ";326
if pv <= INT((pvTOTAL/100)*1) then print #main.map, "line "; 353; " "; 326; " "; 150; " ";326
end if

if city = 1 or Inmap = 1 and arena = 0 and donjon = 0 then
if pv< pvTOTAL AND pv>= INT((pvTOTAL/100)*95) then print #main.map, "line "; 1230; " "; 50; " "; 1220; " ";50
if pv< INT((pvTOTAL/100)*95) AND pv>= INT((pvTOTAL/100)*90) then print #main.map, "line "; 1230; " "; 50; " "; 1210; " ";50
if pv< INT((pvTOTAL/100)*90) AND pv>= INT((pvTOTAL/100)*85) then print #main.map, "line "; 1230; " "; 50; " "; 1200; " ";50
if pv < INT((pvTOTAL/100)*85) AND pv >= INT((pvTOTAL/100)*80) then print #main.map, "line "; 1230; " "; 50; " "; 1190; " "; 50
if pv < INT((pvTOTAL/100)*80) AND pv >= INT((pvTOTAL/100)*75) then print #main.map, "line "; 1230; " "; 50; " "; 1180; " "; 50
if pv < INT((pvTOTAL/100)*75) AND pv >= INT((pvTOTAL/100)*70) then print #main.map, "line "; 1230; " "; 50; " "; 1170; " "; 50
if pv < INT((pvTOTAL/100)*70) AND pv >= INT((pvTOTAL/100)*65) then print #main.map, "line "; 1230; " "; 50; " "; 1160; " "; 50
if pv < INT((pvTOTAL/100)*65) AND pv >= INT((pvTOTAL/100)*60) then print #main.map, "line "; 1230; " "; 50; " "; 1150; " "; 50
if pv < INT((pvTOTAL/100)*60) AND pv >= INT((pvTOTAL/100)*55) then print #main.map, "line "; 1230; " "; 50; " "; 1140; " "; 50
if pv < INT((pvTOTAL/100)*55) AND pv >= INT((pvTOTAL/100)*50) then print #main.map, "line "; 1230; " "; 50; " "; 1130; " "; 50
if pv < INT((pvTOTAL/100)*50) AND pv >= INT((pvTOTAL/100)*45) then print #main.map, "line "; 1230; " "; 50; " "; 1120; " "; 50
if pv < INT((pvTOTAL/100)*45) AND pv >= INT((pvTOTAL/100)*40) then print #main.map, "line "; 1230; " "; 50; " "; 1110; " "; 50
if pv < INT((pvTOTAL/100)*40) AND pv >= INT((pvTOTAL/100)*35) then print #main.map, "line "; 1230; " "; 50; " "; 1100; " "; 50
if pv < INT((pvTOTAL/100)*35) AND pv >= INT((pvTOTAL/100)*30) then print #main.map, "line "; 1230; " "; 50; " "; 1090; " "; 50
if pv < INT((pvTOTAL/100)*30) AND pv >= INT((pvTOTAL/100)*25) then print #main.map, "line "; 1230; " "; 50; " "; 1080; " "; 50
if pv < INT((pvTOTAL/100)*25) AND pv >= INT((pvTOTAL/100)*20) then print #main.map, "line "; 1230; " "; 50; " "; 1070; " "; 50
if pv < INT((pvTOTAL/100)*20) AND pv >= INT((pvTOTAL/100)*15) then print #main.map, "line "; 1230; " "; 50; " "; 1060; " "; 50
if pv < INT((pvTOTAL/100)*15) AND pv >= INT((pvTOTAL/100)*10) then print #main.map, "line "; 1230; " "; 50; " "; 1050; " "; 50
if pv < INT((pvTOTAL/100)*10) AND pv >= INT((pvTOTAL/100)*05) then print #main.map, "line "; 1230; " "; 50; " "; 1040; " "; 50
if pv < INT((pvTOTAL/100)*5) AND pv >= INT((pvTOTAL/100)*1) then print #main.map, "line "; 1230; " "; 50; " "; 1030; " "; 50
if pv <= INT((pvTOTAL/100)*1) then print #main.map, "line "; 1230; " "; 50; " "; 1025; " "; 50
end if
return

[usePotion1]
if pv = pvTOTAL or PotionLittleHP = 0 then wait
nMax1 = nMax1 - 1
if nMax1 < 0 then nMax1 = 0
PotionLittleHP = PotionLittleHP -1
pv = int((pv + (pvTOTAL/10)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)))
if PARCHEMIN4bonus = 1 then pv = pv + (((pvTOTAL/10) + 1 * pmTOTAL)/10)
if pv > pvTOTAL then pv = pvTOTAL
goto [potionUSED]

[usePotion2]
if pv = pvTOTAL or PotionMediumHP = 0 then wait
nMax1 = nMax1 - 1
if nMax1 < 0 then nMax1 = 0
PotionMediumHP = PotionMediumHP -1
pv = int((pv + (pvTOTAL/4)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)))
if PARCHEMIN4bonus = 1 then pv = pv + int(((pvTOTAL/4) + 2 * pmTOTAL)/10)
if pv > pvTOTAL then pv = pvTOTAL
goto [potionUSED]

[usePotion3]
if pv = pvTOTAL or PotionBigHP = 0 then wait
nMax1 = nMax1 - 1
if nMax1 < 0 then nMax1 = 0
PotionBigHP = PotionBigHP -1
pv = int((pv + (pvTOTAL/2)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)))
if PARCHEMIN4bonus = 1 then pv = pv + int(((pvTOTAL/2)+ 3 * pmTOTAL)/10)
if pv > pvTOTAL then pv = pvTOTAL
goto [potionUSED]

[usePotion4]
if pv = pvTOTAL or PotionBig2HP = 0 then wait
nMax1 = nMax1 - 1
if nMax1 < 0 then nMax1 = 0
PotionBig2HP = PotionBig2HP -1
pv = int((pv + ((pvTOTAL/4)*3)) + (pmTOTAL/2) + (11*(lvlPASSIVE16+1)*(lvlPASSIVE16+1)))
if PARCHEMIN4bonus = 1 then pv = pv + int((((pvTOTAL/4)*3)+ 4 * pmTOTAL)/10)
if pv > pvTOTAL then pv = pvTOTAL
goto [potionUSED]

[usePotion5]
if pv = pvTOTAL or PotionBig3HP = 0 then wait
nMax1 = nMax1 - 1
if nMax1 < 0 then nMax1 = 0
PotionBig3HP = PotionBig3HP -1
pv = pvTOTAL
goto [potionUSED]

[SimpleClickDONJONwait]
wait

[Attaque]

if action = 1 then wait
action = 1
#main.map, "when leftButtonDown [SimpleClickDONJONwait]"
print #main.map, "font Times New Roman 8; color white"
if version = 1 then point2vi$ = "PV"
if version = 2 then point2vi$ = "HP"
dommage = int(rnd(1)*(((atk+BONUSatk)/2)-(defENNEMI))+((atk+BONUSatk)/2))
if PARCHEMIN2bonus = 1 then dommage =  int(dommage*1.2)
if lvlPASSIVE19 > 0 then dommage = int(dommage*(1+((8+(2*lvlPASSIVE19))/100)))

if lvlPASSIVE23 > 0 then
    chanceCRIT = int(rnd(1)*100+(4.9+0.1*lvlPASSIVE23))
    if chanceCRIT >= 100 then dommage =  int(dommage*(1.8+0.2*lvlPASSIVE23))
end if

if dommage < 0 then dommage = 0
if dommage <= 0 then #main.map,"SpriteVisible boum2 on"
if dommage > 0 then #main.map,"SpriteVisible boum on"
pvENNEMI = int(pvENNEMI - dommage)
if pvENNEMI < 1 then pvENNEMI = 0
if pvENNEMI > pvTOTALennemi then pvENNEMI = pvTOTALennemi

if pvENNEMI <= 0 then
   pvENNEMI = 0
   action = 0
   gosub [DATAlife]
   gosub [restorBarreHp]
   goto [ENDattaque]
end if

[runUSED]
dommageE = int(rnd(1)*atkENNEMI+1)
if BOSS = 0 and dommageE < atkENNEMI/2 then dommageE = atkENNEMI/2
dommageE = dommageE -(def+BONUSdef)
if BOSS = 1 then dommageE = int((dommageE-200*LvlDONJON) - (lvlPASSIVE12*20))
if PARCHEMIN3bonus = 1 then dommageE =  int(dommageE*0.8)
if lvlPASSIVE19 > 0 then dommageE = int(dommageE*(1+((8+(2*lvlPASSIVE19))/100)))
if nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then dommageE = int(dommageE - (lvlPASSIVE11*20))
if dommageE< 0 then dommageE = 0
if dommageE > 0 then #main.map,"SpriteVisible boum3 on"
if dommageE = 0 then #main.map,"SpriteVisible boum4 on"

if arena = 1 and lvlPASSIVE20 > 0 then #main.map, "place 493 404 ;\"; "Bouclier : ";int(bouclier);"   "
if donjon = 1 and lvlPASSIVE20 > 0 then #main.map, "place 263 354 ;\"; "Bouclier : ";int(bouclier);"   "

if lvlPASSIVE20 > 0 then
    dommageE2 = dommageE
    dommageE = dommageE - bouclier
    if dommageE > 0 then bouclier = 0
    bouclier = bouclier - dommageE2
    if bouclier < 0 then bouclier = 0
end if

pv = int(pv - dommageE)
pv = pv + int(5*lvlPASSIVE7)
if pv <= 0  and securOS = 1 then pv = 1
securOS = 0
if pv > pvTOTAL then pv = pvTOTAL
if pv < 0 then pv = 0
#main.map,"drawsprites"
gosub [DATAlife]
gosub [restorBarreHp]

[potionUSED]


#main.map, "when leftButtonDown [SimpleClickDONJON]"
r = 136 : b = 136 : v = 136
print #main.map, "font Times New Roman 7; backcolor ";r;" ";v;" ";b ;"; color white"
if pvENNEMI > 99999 then pvENNEMI$ = "";str$(int(pvENNEMI/1000));" k"
if pvENNEMI < 99999 then pvENNEMI$ = "";str$(pvENNEMI)
if pvTOTALennemi > 99999 then pvTOTALennemi$ = "";str$(int(pvTOTALennemi/1000));" k"
if pvTOTALennemi < 99999 then pvTOTALennemi$ = "";str$(pvTOTALennemi)
if donjon = 0 then print #main.map, "place 1027 471 ;\";pvENNEMI$; " / "; pvTOTALennemi$;"         "
if donjon = 1 then print #main.map, "place 892 292 ;\";pvENNEMI$; " / "; pvTOTALennemi$;"         "
if pv > 99999 then pv$ = "";str$(int(pv/1000));" k"
if pv < 99999 then pv$ = "";str$(pv)
if pvTOTAL > 99999 then pvTOTAL$ = "";str$(int(pvTOTAL/1000));" k"
if pvTOTAL < 99999 then pvTOTAL$ = "";str$(pvTOTAL)
if donjon = 0 then print #main.map, "place 500 391 ;\";pv$; " / "; pvTOTAL$;"    "
if donjon = 1 then print #main.map, "place 270 341 ;\";pv$; " / "; pvTOTAL$;"    "
if arena = 1 then
   print #main.map, "place 1050 441 ;\"; "lv."; lvlENNEMI
   print #main.map, "place 570 391 ;\"; "lv."; lvl
end if
if donjon = 1 then
   if BOSS = 0 then print #main.map, "place 955 262 ;\"; "lv."; lvlENNEMI
   print #main.map, "place 340 341 ;\"; "lv."; lvl
end if

    if xpTOTAL < 99999 then xpTOTAL$ = "";str$(xpTOTAL)
    if xpTOTAL > 99999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000));" k"
    if xpTOTAL > 99999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000));" m"
    if xpTOTAL > 99999999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000000));" M"
    if xp < 99999 then xp$ = "";str$(xp)
    if xp > 99999 then xp$ = "";str$(int(xp/1000));" k"
    if xp > 99999999 then xp$ = "";str$(int(xp/1000000));" m"
    if xp > 99999999999 then xp$ = "";str$(int(xp/1000000000));" M"
    if donjon = 0 then print #main.map, "place 515 362 ;\"; "Xp : "; xp$; " / "; xpTOTAL$
    if donjon = 1 then print #main.map, "place 280 312 ;\"; "Xp : "; xp$; " / "; xpTOTAL$


if donjon = 0 then print #main.map, "place 903 441 ;\"; nameEnnemy2$
if DonjonMaudit = 1 and LvlDONJONmaudit <=12 and ACTIVATIONcamp2FOND = 1 then print #main.map, "place 775 262 ;\"; nameEnnemy$ ; "  [ Ennemis : "; int(12-LvlDONJONmaudit);" ]"
if donjon = 1 and BOSS = 0 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 775 262 ;\"; nameEnnemy$ ; " [";floor$;"] "
if donjon = 1 and BOSS = 1 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 775 262 ;\"; nameEnnemy$ ; " [";floor$;"]"
if donjon = 0 then print #main.map, "place 375 362 ;\"; name$; " - ";RACE$
if donjon = 1 then print #main.map, "place 150 312 ;\"; name$; " - ";RACE$
print #main.map, "backcolor white;color black"

        if donjon = 1 and BOSS = 0 and version = 1 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Ennemis en vie : ";NumberFLOORmonster
        if donjon = 1 and BOSS = 0 and version = 2 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Ennemies alive : ";NumberFLOORmonster
        if donjon = 1 and BOSS = 1 and version = 1 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Boss de palier ";LvlDONJON
        if donjon = 1 and BOSS = 1 and version = 2 and ACTIVATIONcamp2FOND = 0 then print #main.map, "place 623 107 ;\"; "Boss floor ";LvlDONJON

if pv <= 0 and lvlPASSIVE13 >= 1 and compteurPASSIVE13 >= 100 then pv = 1 : compteurPASSIVE13 = 0
if pv <= 0 then goto [die]

timer 200, [ani1]
gosub [restorPOPO]
wait

[ani1]
timer 0
#main.map,"SpriteVisible boum off"
#main.map,"SpriteVisible boum2 off"
#main.map,"SpriteVisible boum3 off"
#main.map,"SpriteVisible boum4 off"
#main.map,"drawsprites"

gosub [DATAlife]
gosub [restorBarreHp]
gosub [restorPOPO]

if donjon = 0 then
    rndX1 = rnd(1)*100+700
    rndY1 = rnd(1)*100+500
end if
if donjon = 1 then
    rndX1 = rnd(1)*40+520
    rndY1 = rnd(1)*40+300
end if
   rndX2 = rnd(1)*100+220
   rndY2 = rnd(1)*100+500
#main.map,"spritexy boum ";rndX1;" ";rndY1
#main.map,"spritexy boum3 ";rndX2;" ";rndY2

print #main.map, "font Times New Roman 7; color white"
r = 136 : b = 136 : v = 136
print #main.map, "backcolor ";r;" ";v;" ";b
if pvENNEMI > 99999 then pvENNEMI$ = "";str$(int(pvENNEMI/1000));" k"
if pvENNEMI < 99999 then pvENNEMI$ = "";str$(pvENNEMI)
if pvTOTALennemi > 99999 then pvTOTALennemi$ = "";str$(int(pvTOTALennemi/1000));" k"
if pvTOTALennemi < 99999 then pvTOTALennemi$ = "";str$(pvTOTALennemi)
if pv > 99999 then pv$ = "";str$(int(pv/1000));" k"
if pv < 99999 then pv$ = "";str$(pv)
if pvTOTAL > 99999 then pvTOTAL$ = "";str$(int(pvTOTAL/1000));" k"
if pvTOTAL < 99999 then pvTOTAL$ = "";str$(pvTOTAL)

if arena = 1 then
print #main.map, "place 1027 471 ;\";pvENNEMI$; " / "; pvTOTALennemi$;"         "
print #main.map, "place 500 391 ;\";pv$; " / "; pvTOTAL$;"    "
print #main.map, "place 903 441 ;\"; nameEnnemy2$
print #main.map, "place 375 362 ;\"; name$; " - ";RACE$
end if
if donjon = 1 then
print #main.map, "place 892 292 ;\";pvENNEMI$; " / "; pvTOTALennemi$;"         "
print #main.map, "place 270 341 ;\";pv$; " / "; pvTOTAL$;"    "
print #main.map, "place 775 262 ;\"; nameEnnemy$
print #main.map, "place 150 312 ;\"; name$; " - ";RACE$
end if
action = 0
wait

[ENDattaque]
if BOSS = 1 and pv >0 and donjon = 1 then BOSS = 2
r = 136 : b = 136 : v = 136
print #main.map, "font Times New Roman 7; backcolor ";r;" ";v;" ";b ;"; color white"
if donjon = 0 then print #main.map, "place 375 362 ;\"; name$; " - ";RACE$
if donjon = 1 then print #main.map, "place 150 312 ;\"; name$; " - ";RACE$

    if xpTOTAL < 99999 then xpTOTAL$ = "";str$(xpTOTAL)
    if xpTOTAL > 99999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000));" k"
    if xpTOTAL > 99999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000));" m"
    if xpTOTAL > 99999999999 then xpTOTAL$ = "";str$(int(xpTOTAL/1000000000));" M"
    if xp < 99999 then xp$ = "";str$(xp)
    if xp > 99999 then xp$ = "";str$(int(xp/1000));" k"
    if xp > 99999999 then xp$ = "";str$(int(xp/1000000));" m"
    if xp > 99999999999 then xp$ = "";str$(int(xp/1000000000));" M"
    if donjon = 0 then print #main.map, "place 515 362 ;\"; "Xp : "; xp$; " / "; xpTOTAL$
    if donjon = 1 then print #main.map, "place 280 312 ;\"; "Xp : "; xp$; " / "; xpTOTAL$

if PARCHEMIN5bonus = 1 then ParcheminXp = int(xpENNEMI+BONUSxp+pmTOTAL)
if PARCHEMIN5bonus = 0 then ParcheminXp = 0
if PARCHEMIN6bonus = 1 then ParcheminGold = int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON)))/2)
if PARCHEMIN6bonus = 0 then ParcheminGold = 0

    money$ = ""
    money2$ = str$(int(moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold))
    if (moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold) > 99999 then
        money$ = " k"
        money2$ = str$(int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold)/1000))
    end if
    if (moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold) > 9999999 then
        money$ = " m"
        money2$ = str$(int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold)/1000000))
    end if
    if (moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold) > 9999999999 then
        money$ = " M"
        money2$ = str$(int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold)/1000000000))
    end if

    xp$ = ""
    xp2$ = str$(int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp))
    if int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp) > 99999 then
        xp$ = " k"
        xp2$ = str$(int((xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp)/1000))
    end if
    if int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp) > 9999999 then
        xp$ = " m"
        xp2$ = str$(int((xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp)/1000000))
    end if
    if int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp) > 9999999999 then
        xp$ = " M"
        xp2$ = str$(int((xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp)/1000000000))
    end if

print #main.map, "font Times New Roman 10; color black;backcolor white"
if lvlPASSIVE13 >= 1 then compteurPASSIVE13 = compteurPASSIVE13 + 1
if version = 1 then print #main.map, "place 580 460 ;\"; "  VICTOIRE : + ";xp2$;xp$;" XP + ";money2$;money$;" D'OR  "
if version = 2 then print #main.map, "place 580 460 ;\"; "  VICTORY : + ";xp2$;xp$;" XP + ";money2$;money$;" GOLD  "

gardien = 0

rndPOTIONS = int(rnd(1)*5+1)
if rndPOTIONS = 5 then
    nombreDROPpotion = nombreDROPpotion + 1
    rndPOTIONS2 = int(rnd(1)*5+1)
    if rndPOTIONS2 = 1 then
       if nMax1 >= MAX1 then goto [endPotionMax]
       nMax1 = nMax1 + 1
       if nMax1 > MAX1 then nMax1 = MAX1
       PotionLittleHP = PotionLittleHP + 1
       if version = 1 then print #main.map, "place 580 475 ;\"; "  + 1 petite potion !"
       if version = 2 then print #main.map, "place 580 475 ;\"; "  + 1 little potion !"
    end if
    if rndPOTIONS2 = 2 then
       if nMax1 >= MAX1 then goto [endPotionMax]
       nMax1 = nMax1 + 1
       if nMax1 > MAX1 then nMax1 = MAX1
       PotionMediumHP = PotionMediumHP + 1
       if version = 1 then print #main.map, "place 580 475 ;\"; "  + 1 moyenne potion !"
       if version = 2 then print #main.map, "place 580 475 ;\"; "  + 1 medium potion !"
    end if
    if rndPOTIONS2 = 3 then
       if nMax1 >= MAX1 then goto [endPotionMax]
       nMax1 = nMax1 + 1
       if nMax1 > MAX1 then nMax1 = MAX1
       PotionBigHP = PotionBigHP + 1
       if version = 1 then print #main.map, "place 580 475 ;\"; "  + 1 grosse potion !"
       if version = 2 then print #main.map, "place 580 475 ;\"; "  + 1 big potion !"
    end if
    if rndPOTIONS2 = 4 then
       if nMax1 >= MAX1 then goto [endPotionMax]
       nMax1 = nMax1 + 1
       if nMax1 > MAX1 then nMax1 = MAX1
       PotionBig2HP = PotionBig2HP + 1
       if version = 1 then print #main.map, "place 580 475 ;\"; "  + 1 très grosse potion !"
       if version = 2 then print #main.map, "place 580 475 ;\"; "  + 1 very big potion !"
    end if
    if rndPOTIONS2 = 5 then
       if nMax1 >= MAX1 then goto [endPotionMax]
       nMax1 = nMax1 + 1
       if nMax1 > MAX1 then nMax1 = MAX1
       PotionBig3HP = PotionBig3HP + 1
       if version = 1 then print #main.map, "place 580 475 ;\"; "  + 1 potion max !"
       if version = 2 then print #main.map, "place 580 475 ;\"; "  + 1 max potion !"
    end if
end if

if nameEnnemy$ = "Phénix" or nameEnnemy$ = "Pheonix" then
    phenixKILLED = phenixKILLED + 1
    chanceOEUFphenix = int(rnd(1)*3+1)
    if chanceOEUFphenix = 3 then
        nombreOEUFphenix = nombreOEUFphenix +1
        if version = 1 then print #main.map, "place 580 490 ;\"; " Vous avez trouvez un oeuf de phénix ! "
        if version = 1 then print #main.map, "place 580 490 ;\"; " You found a pheonix eggs ! "
    end if
end if


chanceFragmentJAUNE1 = int(rnd(1)*100+(1*LvlDONJON+lvlPASSIVE24))
chanceFragmentJAUNE2 = int(rnd(1)*500+1)
chanceFragmentJAUNE3 = int(rnd(1)*2000+1)
chanceFragmentBLEU1 = int(rnd(1)*100+(1*LvlDONJON+lvlPASSIVE24))
chanceFragmentBLEU2 = int(rnd(1)*500+1)
chanceFragmentBLEU3 = int(rnd(1)*2000+1)

if chanceFragmentJAUNE1 >=100 then
    FragmentJAUNE1 = FragmentJAUNE1 +1
    if version = 1 then print #main.map, "place 580 505 ;\"; " Vous avez trouvez un fragment jaune ! "
    if version = 2 then print #main.map, "place 580 505 ;\"; " You found a yellow fragment ! "
end if
if chanceFragmentJAUNE2 >= 500 then
    FragmentJAUNE2 = FragmentJAUNE2 +1
    if version = 1 then print #main.map, "place 580 505 ;\"; " Vous avez trouvez un fragment orange ! "
    if version = 2 then print #main.map, "place 580 505 ;\"; " You found a orange fragment ! "
end if
if chanceFragmentJAUNE3 >= 2000 then
    FragmentJAUNE3 = FragmentJAUNE3 +1
    if version = 1 then print #main.map, "place 580 505 ;\"; " Vous avez trouvez un fragment rouge ! "
    if version = 2 then print #main.map, "place 580 505 ;\"; " You found a red fragment ! "
end if
if chanceFragmentBLEU1 >=100 then
    FragmentBLEU1 = FragmentBLEU1 +1
    if version = 1 then print #main.map, "place 580 505 ;\"; " Vous avez trouvez un fragment bleu clair ! "
    if version = 2 then print #main.map, "place 580 505 ;\"; " You found a lightblue fragment ! "
end if
if chanceFragmentBLEU2 >= 500 then
    FragmentBLEU2 = FragmentBLEU2 +1
    if version = 1 then print #main.map, "place 580 505 ;\"; " Vous avez trouvez un fragment bleu ! "
    if version = 2 then print #main.map, "place 580 505 ;\"; " You found a blue fragment ! "
end if
if chanceFragmentBLEU3 >= 2000 then
    FragmentBLEU3 = FragmentBLEU3 +1
    if version = 1 then print #main.map, "place 580 505 ;\"; " Vous avez trouvez un fragment bleu foncé ! "
    if version = 2 then print #main.map, "place 580 505 ;\"; " You found a darkblue fragment ! "
end if





[endPotionMax]
'#main.map, "when leftButtonDown [SimpleClickDONJONwait]"
timer 1000, [endPotionMax2]
wait

[endPotionMax2]
timer 0

#main.map, "when leftButtonDown [SimpleClickDONJON]"
rndPOTIONS = 0 : rndPOTIONS2 = 0

if activationPARCHEMIN1 = 1 then pvTOTAL = int(pvTOTAL-PARCHEMIN1bonus)
if pv > pvTOTAL then pv = pvTOTAL
PARCHEMIN1bonus = 0
PARCHEMIN2bonus = 0
PARCHEMIN3bonus = 0
activationPARCHEMIN1 = 0
if PARCHEMIN4bonus = 1 then xp = xp + int((xpENNEMI+BONUSxp+pmTOTAL)/10)
PARCHEMIN4bonus = 0
xp = int(xp +xpENNEMI + BONUSxp + pmTOTAL) + ParcheminXp
money = money +moneyENNEMI + (lvlPASSIVE6*int(4+LvlDONJON)) + ParcheminGold
goldTOTAL = goldTOTAL + moneyENNEMI + (lvlPASSIVE6*int(4+LvlDONJON)) + ParcheminGold
if nameEnnemy$ = "Gobelin" then nombreGOBtuer = nombreGOBtuer + 1
if nameEnnemy$ = "Araigné géante" or nameEnnemy$ ="Giant Spider" then nombreARAtuer = nombreARAtuer + 1
if nameEnnemy$ = "Mort-vivant" or nameEnnemy$ = "Undead" then nombreSQUEtuer = nombreSQUEtuer + 1
if nameEnnemy$ = "Plante carnivore géante" or nameEnnemy$ ="Giant carnivorous plant" then nombrePLANTtuer = nombrePLANTtuer + 1

if DonjonMaudit = 1 and LvlDONJONmaudit <13 and ACTIVATIONcamp2FOND = 1 then LvlDONJONmaudit = LvlDONJONmaudit +1
if LvlDONJONmaudit > 12 then DonjonMaudit = 2

if VALRAKlife = 0 and recompenseQ5a = 0 and Q5pack2 = 1 and nameEnnemy2$ = "VALRAK LE FOURBE" then
    VALRAKlife = 1
    POPplayers = POPplayers - 1
    #main.map,"SpriteVisible valrak off"
end if
if NombreKILLsangi < 9 and recompenseQ6a = 0 and Q6pack2 = 1 and nameEnnemy2$ = "Membre de la guilde sanguinaire" then
    NombreKILLsangi = NombreKILLsangi + 1
    POPplayers = POPplayers - 1
    if NombreKILLsangi > 9 then NombreKILLsangi = 9
    #main.map,"SpriteVisible player2 off"
end if

if nameEnnemy2$ = "KRYGUR Le roi des Centaures" and RoisDEScentaures = 0 and recompenseQ3b = 0 and Q3pack3 = 1 then RoisDEScentaures  = 1

'notice QueteTAVERNEnum; " / "; QueteTAVERNEcompt

if QueteTAVERNEnum = 1 and nameEnnemy$ = "Sanglier" or nameEnnemy$ ="Boar" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 2 and nameEnnemy$ = "Gobelin" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 3 and nameEnnemy$ = "Plante carnivore géante" or nameEnnemy$ ="Giant carnivorous plant" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 4 and nameEnnemy$ = "Araigné géante" or nameEnnemy$ ="Giant Spider" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 5 and nameEnnemy2$ = "Soiquar le faux marchand" and nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 6 and nameEnnemy$ = "Mort-vivant" or nameEnnemy$ = "Undead" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 7 and nameEnnemy$ = "Champion centaure" or nameEnnemy$ = "Centaur champion" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 8 and nameEnnemy2$ = "Jean michel la merguèse" and nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 9 and nameEnnemy2$ = "LucAvador" and nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 10 and nameEnnemy2$ = "Imperator" and nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEnum = 11 and nameEnnemy2$ = "WhitDraGon" and nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then QueteTAVERNEcompt = QueteTAVERNEcompt + 1
if QueteTAVERNEcompt > QueteTAVERNEcomptMAX then QueteTAVERNEcompt = QueteTAVERNEcomptMAX

PARCHEMIN5bonus = 0
PARCHEMIN6bonus = 0

gosub [resetSpritearena]

[lvlUPsecurity]
if xp >= xpTOTAL then gosub [lvlUPinfo]
[lvlUPsecurity2]
if xp >= xpTOTAL then goto [lvlUPsecurity]

action = 0
[MEDAILLE]

    if NombreEnnemiKILL >= 100 and MEDAILLE1 = 0 then MEDAILLEgoto = 1 : MEDAILLE1 = 1 : MEDAILLE1$ = "";NombreEnnemiKILL;" / 100" : goto [HF]
    if NombreEnnemiKILL >= 500 and MEDAILLE1 = 1 then MEDAILLEgoto = 1 : MEDAILLE1 = 2 : MEDAILLE1$ = "";NombreEnnemiKILL;" / 500" : goto [HF]
    if NombreEnnemiKILL >= 2000 and MEDAILLE1 = 2 then MEDAILLEgoto = 1 : MEDAILLE1 = 3 : MEDAILLE1$ = "";NombreEnnemiKILL;" / 2000" : goto [HF]
    if NombreEnnemiKILL >= 5000 and MEDAILLE1 = 3 then MEDAILLEgoto = 1 : MEDAILLE1 = 4 : MEDAILLE1$ = "";NombreEnnemiKILL;" / 5000" : goto [HF]
    if NombreEnnemiKILL >= 10000 and MEDAILLE1 = 4 then MEDAILLEgoto = 1 : MEDAILLE1 = 5 : MEDAILLE1$ = "";NombreEnnemiKILL;" / 10000" : goto [HF]

    if NombrePlayerKILL >= 5 and MEDAILLE2 = 0 then MEDAILLEgoto = 2 : MEDAILLE2 = 1 : MEDAILLE2$ = "";NombrePlayerKILL;" / 5" : goto [HF]
    if NombrePlayerKILL >= 10 and MEDAILLE2 = 1 then MEDAILLEgoto = 2 : MEDAILLE2 = 2 : MEDAILLE2$ = "";NombrePlayerKILL;" / 10" : goto [HF]
    if NombrePlayerKILL >= 25 and MEDAILLE2 = 2 then MEDAILLEgoto = 2 : MEDAILLE2 = 3 : MEDAILLE2$ = "";NombrePlayerKILL;" / 25" : goto [HF]
    if NombrePlayerKILL >= 50 and MEDAILLE2 = 3 then MEDAILLEgoto = 2 : MEDAILLE2 = 4 : MEDAILLE2$ = "";NombrePlayerKILL;" / 50" : goto [HF]
    if NombrePlayerKILL >= 100 and MEDAILLE2 = 4 then MEDAILLEgoto = 2 : MEDAILLE2 = 5 : MEDAILLE2$ = "";NombrePlayerKILL;" / 100" : goto [HF]

    if NombreBossKILL >=1 and MEDAILLE3 = 0 then MEDAILLEgoto = 3 : MEDAILLE3 = 1 : MEDAILLE3$ = "";NombreBossKILL;" / 1" : goto [HF]
    if NombreBossKILL >=3 and MEDAILLE3 = 1 then MEDAILLEgoto = 3 : MEDAILLE3 = 2 : MEDAILLE3$ = "";NombreBossKILL;" / 3" : goto [HF]
    if NombreBossKILL >=5 and MEDAILLE3 = 2 then MEDAILLEgoto = 3 : MEDAILLE3 = 3 : MEDAILLE3$ = "";NombreBossKILL;" / 5" : goto [HF]
    if NombreBossKILL >=10 and MEDAILLE3 = 3 then MEDAILLEgoto = 3 : MEDAILLE3 = 4 : MEDAILLE3$ = "";NombreBossKILL;" / 10" : goto [HF]
    if NombreBossKILL >=20 and MEDAILLE3 = 4 then MEDAILLEgoto = 3 : MEDAILLE3 = 5 : MEDAILLE3$ = "";NombreBossKILL;" / 20" : goto [HF]

    if goldTOTAL >= 5000 and MEDAILLE4 = 0 then MEDAILLEgoto = 4 : MEDAILLE4 = 1 : MEDAILLE4$ = "";goldTOTAL;" / 5000" : goto [HF]
    if goldTOTAL >= 10000 and MEDAILLE4 = 1 then MEDAILLEgoto = 4 : MEDAILLE4 = 2 : MEDAILLE4$ = "";goldTOTAL;" / 10 000" : goto [HF]
    if goldTOTAL >= 50000 and MEDAILLE4 = 2 then MEDAILLEgoto = 4 : MEDAILLE4 = 3 : MEDAILLE4$ = "";goldTOTAL;" / 50 000" : goto [HF]
    if goldTOTAL >= 100000 and MEDAILLE4 = 3 then MEDAILLEgoto = 4 : MEDAILLE4 = 4 : MEDAILLE4$ = "";goldTOTAL;" / 100 000" : goto [HF]
    if goldTOTAL >= 500000 and MEDAILLE4 = 4 then MEDAILLEgoto = 4 : MEDAILLE4 = 5 : MEDAILLE4$ = "";goldTOTAL;" / 500 000" : goto [HF]

    if nombreACHATitem >= 5 and MEDAILLE5 = 0 then MEDAILLEgoto = 5 : MEDAILLE5 = 1 : MEDAILLE5$ = "";nombreACHATitem;" / 5" : goto [HF]
    if nombreACHATitem >= 20 and MEDAILLE5 = 1 then MEDAILLEgoto = 5 : MEDAILLE5 = 2 : MEDAILLE5$ = "";nombreACHATitem;" / 20" : goto [HF]
    if nombreACHATitem >= 50 and MEDAILLE5 = 2 then MEDAILLEgoto = 5 : MEDAILLE5 = 3 : MEDAILLE5$ = "";nombreACHATitem;" / 50" : goto [HF]
    if nombreACHATitem >= 100 and MEDAILLE5 = 3 then MEDAILLEgoto = 5 : MEDAILLE5 = 4 : MEDAILLE5$ = "";nombreACHATitem;" / 100" : goto [HF]
    if nombreACHATitem >= 200 and MEDAILLE5 = 4 then MEDAILLEgoto = 5 : MEDAILLE5 = 5 : MEDAILLE5$ = "";nombreACHATitem;" / 200" : goto [HF]

    if nombreUPitem >= 10 and MEDAILLE6 = 0 then MEDAILLEgoto = 6 : MEDAILLE6 = 1 : MEDAILLE6$ = "";nombreUPitem;" / 10" : goto [HF]
    if nombreUPitem >= 50 and MEDAILLE6 = 1 then MEDAILLEgoto = 6 : MEDAILLE6 = 2 : MEDAILLE6$ = "";nombreUPitem;" / 50" : goto [HF]
    if nombreUPitem >= 100 and MEDAILLE6 = 2 then MEDAILLEgoto = 6 : MEDAILLE6 = 3 : MEDAILLE6$ = "";nombreUPitem;" / 100" : goto [HF]
    if nombreUPitem >= 250 and MEDAILLE6 = 3 then MEDAILLEgoto = 6 : MEDAILLE6 = 4 : MEDAILLE6$ = "";nombreUPitem;" / 250" : goto [HF]
    if nombreUPitem >= 500 and MEDAILLE6 = 4 then MEDAILLEgoto = 6 : MEDAILLE6 = 5 : MEDAILLE6$ = "";nombreUPitem;" / 500" : goto [HF]

    if nombreQUEST >= 2 and MEDAILLE7 = 0 then MEDAILLEgoto = 7 : MEDAILLE7 = 1 : MEDAILLE7$ = "";nombreQUEST;" / 2" : goto [HF]
    if nombreQUEST >= 15 and MEDAILLE7 = 1 then MEDAILLEgoto = 7 : MEDAILLE7 = 2 : MEDAILLE7$ = "";nombreQUEST;" / 15" : goto [HF]
    if nombreQUEST >= 40 and MEDAILLE7 = 2 then MEDAILLEgoto = 7 : MEDAILLE7 = 3 : MEDAILLE7$ = "";nombreQUEST;" / 40" : goto [HF]
    if nombreQUEST >= 100 and MEDAILLE7 = 3 then MEDAILLEgoto = 7 : MEDAILLE7 = 4 : MEDAILLE7$ = "";nombreQUEST;" / 100" : goto [HF]
    if nombreQUEST >= 200 and MEDAILLE7 = 4 then MEDAILLEgoto = 7 : MEDAILLE7 = 5 : MEDAILLE7$ = "";nombreQUEST;" / 200" : goto [HF]

    if nombreUPsac >= 10 and MEDAILLE8 = 0 then MEDAILLEgoto = 8 : MEDAILLE8 = 1 : MEDAILLE8$ = "";nombreUPsac;" / 10" : goto [HF]
    if nombreUPsac >= 50 and MEDAILLE8 = 1 then MEDAILLEgoto = 8 : MEDAILLE8 = 2 : MEDAILLE8$ = "";nombreUPsac;" / 50" : goto [HF]
    if nombreUPsac >= 100 and MEDAILLE8 = 2 then MEDAILLEgoto = 8 : MEDAILLE8 = 3 : MEDAILLE8$ = "";nombreUPsac;" / 100" : goto [HF]
    if nombreUPsac >= 250 and MEDAILLE8 = 3 then MEDAILLEgoto = 8 : MEDAILLE8 = 4 : MEDAILLE8$ = "";nombreUPsac;" / 250" : goto [HF]
    if nombreUPsac >= 500 and MEDAILLE8 = 4 then MEDAILLEgoto = 8 : MEDAILLE8 = 5 : MEDAILLE8$ = "";nombreUPsac;" / 500" : goto [HF]

    if nombreUTILparch >= 2 and MEDAILLE9 = 0 then MEDAILLEgoto = 9 : MEDAILLE9 = 1 : MEDAILLE9$ = "";nombreUTILparch;" / 2" : goto [HF]
    if nombreUTILparch >= 10 and MEDAILLE9 = 1 then MEDAILLEgoto = 9 : MEDAILLE9 = 2 : MEDAILLE9$ = "";nombreUTILparch;" / 10" : goto [HF]
    if nombreUTILparch >= 50 and MEDAILLE9 = 2 then MEDAILLEgoto = 9 : MEDAILLE9 = 3 : MEDAILLE9$ = "";nombreUTILparch;" / 50" : goto [HF]
    if nombreUTILparch >= 100 and MEDAILLE9 = 3 then MEDAILLEgoto = 9 : MEDAILLE9 = 4 : MEDAILLE9$ = "";nombreUTILparch;" / 100" : goto [HF]
    if nombreUTILparch >= 200 and MEDAILLE9 = 4 then MEDAILLEgoto = 9 : MEDAILLE9 = 5 : MEDAILLE9$ = "";nombreUTILparch;" / 200" : goto [HF]

    if nombreDROPpotion >= 10 and MEDAILLE10 = 0 then MEDAILLEgoto = 10 : MEDAILLE10 = 1 : MEDAILLE10$ = "";nombreDROPpotion;" / 10" : goto [HF]
    if nombreDROPpotion >= 100 and MEDAILLE10 = 1 then MEDAILLEgoto = 10 : MEDAILLE10 = 2 : MEDAILLE10$ = "";nombreDROPpotion;" / 100" : goto [HF]
    if nombreDROPpotion >= 500 and MEDAILLE10 = 2 then MEDAILLEgoto = 10 : MEDAILLE10 = 3 : MEDAILLE10$ = "";nombreDROPpotion;" / 500" : goto [HF]
    if nombreDROPpotion >= 1000 and MEDAILLE10 = 3 then MEDAILLEgoto = 10 : MEDAILLE10 = 4 : MEDAILLE10$ = "";nombreDROPpotion;" / 1 000" : goto [HF]
    if nombreDROPpotion >= 5000 and MEDAILLE10 = 4 then MEDAILLEgoto = 10 : MEDAILLE10 = 5 : MEDAILLE10$ = "";nombreDROPpotion;" / 5 000" : goto [HF]

    if nombreUTILmedail >= 2 and MEDAILLE11 = 0 then MEDAILLEgoto = 11 : MEDAILLE11 = 1 : MEDAILLE11$ = "";nombreUTILmedail;" / 2" : goto [HF]
    if nombreUTILmedail >= 5 and MEDAILLE11 = 1 then MEDAILLEgoto = 11 : MEDAILLE11 = 2 : MEDAILLE11$ = "";nombreUTILmedail;" / 5" : goto [HF]
    if nombreUTILmedail >= 10 and MEDAILLE11 = 2 then MEDAILLEgoto = 11 : MEDAILLE11 = 3 : MEDAILLE11$ = "";nombreUTILmedail;" / 10" : goto [HF]
    if nombreUTILmedail >= 25 and MEDAILLE11 = 3 then MEDAILLEgoto = 11 : MEDAILLE11 = 4 : MEDAILLE11$ = "";nombreUTILmedail;" / 25" : goto [HF]
    if nombreUTILmedail >= 50 and MEDAILLE11 = 4 then MEDAILLEgoto = 11 : MEDAILLE11 = 5 : MEDAILLE11$ = "";nombreUTILmedail;" / 50" : goto [HF]

    if speakTOpnj >= 50 and MEDAILLE12 = 0 then MEDAILLEgoto = 12 : MEDAILLE12 = 1 : MEDAILLE12$ = "";speakTOpnj;" / 50" : goto [HF]
    if speakTOpnj >= 400 and MEDAILLE12 = 1 then MEDAILLEgoto = 12 : MEDAILLE12 = 2 : MEDAILLE12$ = "";speakTOpnj;" / 400" : goto [HF]
    if speakTOpnj >= 2000 and MEDAILLE12 = 2 then MEDAILLEgoto = 12 : MEDAILLE12 = 3 : MEDAILLE12$ = "";speakTOpnj;" / 2 000" : goto [HF]
    if speakTOpnj >= 5000 and MEDAILLE12 = 3 then MEDAILLEgoto = 12 : MEDAILLE12 = 4 : MEDAILLE12$ = "";speakTOpnj;" / 5 000" : goto [HF]
    if speakTOpnj >= 10000 and MEDAILLE12 = 4 then MEDAILLEgoto = 12 : MEDAILLE12 = 5 : MEDAILLE12$ = "";speakTOpnj;" / 10 000" : goto [HF]

if arena = 1 then
   NombreEnnemiKILL = NombreEnnemiKILL +1
   if nameEnnemy$ = "Joueur (Tueur de joueur)" or nameEnnemy$ = "Player (Player killer)" then
      NombrePlayerKILL = NombrePlayerKILL + 1
      if lvlPASSIVE22 > 0 then money = money + int(400+150*lvlPASSIVE22*LvlDONJON)
      POPplayers = POPplayers - 1
      if POPplayers < 1 then POPplayers = 1
   end if
   if POPplayers < 1 then POPplayers = 1
   goto [Arena0]
end if

if donjon = 1 and ACTIVATIONcamp2FOND = 0 then
   NumberFLOORmonster = NumberFLOORmonster-1
   if BOSS = 2 then
      NombreBossKILL = NombreBossKILL +1
      #main.map,"SpriteVisible fenetre1 off"
      if LvlDONJON >= 100 then notice " " + chr$(13) + "You win the game !!! Thx for playing this game !"
      if LvlDONJON = int(lvlDONJONtota/3) then
         LvlDONJON = LvlDONJON + 1
         lvlDONJONtota = lvlDONJONtota + 3
      end if
      secu1PALLIER = 0 : secu2PALLIER = 0 : securITEM = 0
      gosub [FLOOR]
      goto [GameStartMAINsecu2]
   end if
   if NumberFLOORmonster <= 0 then BOSS = 1
   if POPplayers < 1 then POPplayers = 1
   goto [donjon]
end if

if LvlDONJONmaudit <= 12 then goto [donjon]
goto [Arena0]
wait


'input #save, NombreKILLsangi
'nput #save, VALRAKlife
'input #save, nombrePLANTtuer
'input #save, nombreSQUEtuer
'input #save, nombreGOBtuer
'input #save, nombreARAtuer
'nput #save, Qtaverne
'nput #save, nombreOEUFphenix
'input #save, phenixKILLED
'input #save, RoisDEScentaures
'input #save, DonjonMaudit
'input #save, LvlDONJONmaudit


[resetSpritearena]

    if ACTIVATIONspriteCAMP1 = 1 and playerkiller1 = 2 then #main.map,"SpriteVisible player2 off"
    if ACTIVATIONspriteVALRAK = 1 then #main.map,"SpriteVisible valrak off"
    if playerkiller1 = 1 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 =0 then #main.map,"SpriteVisible player1 off"
    if playerkiller1 = 2 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 =0 then #main.map,"SpriteVisible player2 off"
    if playerkiller1 = 3 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 =0 then #main.map,"SpriteVisible player3 off"
    if playerkiller1 = 4 and ACTIVATIONspriteVALRAK = 0 and ACTIVATIONspriteCAMP1 =0 then #main.map,"SpriteVisible player4 off"
    if nameEnnemy$ = "Sanglier" and sanglier = 1 or nameEnnemy$ ="Boar" and sanglier = 1 then #main.map,"SpriteVisible sanglier1 off"
    if nameEnnemy$ = "Sanglier" and sanglier = 2 or nameEnnemy$ ="Boar" and sanglier = 2 then #main.map,"SpriteVisible sanglier2 off"
    if nameEnnemy$ = "Sanglier" and sanglier = 3 or nameEnnemy$ ="Boar" and sanglier = 3 then #main.map,"SpriteVisible sanglier3 off"
    if nameEnnemy$ = "Gobelin" and Gobelin = 1 then #main.map,"SpriteVisible gobelin1 off"
    if nameEnnemy$ = "Gobelin" and Gobelin = 2 then #main.map,"SpriteVisible gobelin2 off"
    if nameEnnemy$ = "Gobelin" and Gobelin = 3 then #main.map,"SpriteVisible gobelin3 off"
    if nameEnnemy$ = "Gobelin" and Gobelin = 4 then #main.map,"SpriteVisible gobelin4 off"
    if nameEnnemy$ = "Gobelin" and Gobelin = 5 then #main.map,"SpriteVisible gobelin5 off"
    if nameEnnemy$ = "Gobelin" and Gobelin = 6 then #main.map,"SpriteVisible gobelin6 off"
    if nameEnnemy$ = "Araigné géante" and araigner = 1 or nameEnnemy$ ="Giant Spider" and araigner = 1 then #main.map,"SpriteVisible araigner1 off"
    if nameEnnemy$ = "Araigné géante" and araigner = 2 or nameEnnemy$ ="Giant Spider" and araigner = 2 then #main.map,"SpriteVisible araigner2 off"
    if nameEnnemy$ = "Araigné géante" and araigner = 3 or nameEnnemy$ ="Giant Spider" and araigner = 3 then #main.map,"SpriteVisible araigner3 off"
    if nameEnnemy$ = "Araigné géante" and araigner = 4 or nameEnnemy$ ="Giant Spider" and araigner = 4 then #main.map,"SpriteVisible araigner4 off"
    if nameEnnemy$ = "Araigné géante" and araigner = 5 or nameEnnemy$ ="Giant Spider" and araigner = 5 then #main.map,"SpriteVisible araigner5 off"
    if nameEnnemy$ = "Plante carnivore géante" and plante = 1 or nameEnnemy$ ="Giant carnivorous plant" and plante = 1 then #main.map,"SpriteVisible plante1 off"
    if nameEnnemy$ = "Mort-vivant" and ud = 1 or nameEnnemy$ = "Undead" and ud = 1  then #main.map,"SpriteVisible ud1 off"
    if nameEnnemy$ = "Mort-vivant" and ud = 2 or nameEnnemy$ = "Undead" and ud = 2 then #main.map,"SpriteVisible ud2 off"
    if nameEnnemy$ = "Champion centaure" and centaur = 1 or nameEnnemy$ = "Centaur champion" and centaur = 1 then #main.map,"SpriteVisible centaur1 off"
    if nameEnnemy$ = "Phénix" and Pheonix = 1  or nameEnnemy$ = "Pheonix" and Pheonix = 1 then #main.map,"SpriteVisible phenix1 off"
    if nameEnnemy$ = "Golem géant" and golem = 1 or nameEnnemy$ = "Giant golem" and golem = 1 then #main.map,"SpriteVisible golem1 off"
    if nameEnnemy$ = "Golem géant" and golem = 2 or nameEnnemy$ = "Giant golem" and golem = 2 then #main.map,"SpriteVisible golem2 off"
    if nameEnnemy$ = "Dragon Rouge" and drake = 1 or nameEnnemy$ = "Red Dragon" and drake = 1 then #main.map,"SpriteVisible RedDragon1 off"


    sanglier = 0 : golem = 0 : Pheonix = 0 : centaur = 0 : ud = 0 : plante = 0 : araigner = 0 : Gobelin = 0 : araigner = 0 : plante = 0 : playerkiller1 = 0 : drake = 0

if arena = 1 or donjon = 1 then
if donjon = 1 and guard =1  then #main.map,"SpriteVisible guard4 off"
if donjon = 1 and guard =2  then #main.map,"SpriteVisible guard4 off"
if donjon = 1 and guard =4  then #main.map,"SpriteVisible guard1 off"
if donjon = 1 and guard =5  then #main.map,"SpriteVisible guard2 off"
if donjon = 1 and guard =3  then #main.map,"SpriteVisible gardien off"
#main.map,"SpriteVisible fuir off"
'#main.map,"SpriteVisible barre off"
#main.map,"SpriteVisible barre2 off"
#main.map,"SpriteVisible pendentif1 off"


if sexe = 1 then
    if campagne$= "Warrior" then #main.map,"SpriteVisible guerrierHOMME off"
    if campagne$= "Tank" then #main.map,"SpriteVisible tankHOMME off"
    if campagne$= "Archer" then #main.map,"SpriteVisible archerHOMME off"
    if campagne$= "HEALER" then #main.map,"SpriteVisible mageHOMME off"
    if campagne$= "Artisan" then #main.map,"SpriteVisible artisanHOMME off"
end if
if sexe = 2 then
    if campagne$= "Warrior" then #main.map,"SpriteVisible guerrierFEMME off"
    if campagne$= "Tank" then #main.map,"SpriteVisible tankFEMME off"
    if campagne$= "Archer" then #main.map,"SpriteVisible archerFEMME off"
    if campagne$= "HEALER" then #main.map,"SpriteVisible mageFEMME off"
    if campagne$= "Artisan" then #main.map,"SpriteVisible artisanFEMME off"
end if

if donjon = 1 and LvlDONJON = 1 then #main.map,"SpriteVisible boss1 off"
if donjon = 1 and LvlDONJON = 2 then #main.map,"SpriteVisible boss2 off"
if donjon = 1 and LvlDONJON = 3 then #main.map,"SpriteVisible boss3 off"
if donjon = 1 and LvlDONJON = 4 then #main.map,"SpriteVisible boss4 off"
if donjon = 1 and LvlDONJON = 5 then #main.map,"SpriteVisible boss5 off"
if donjon = 1 and LvlDONJON = 6 then #main.map,"SpriteVisible boss6 off"
if donjon = 1 and LvlDONJON = 7 then #main.map,"SpriteVisible boss7 off"
if donjon = 1 and LvlDONJON = 8 then #main.map,"SpriteVisible boss8 off"
if donjon = 1 and LvlDONJON = 9 then #main.map,"SpriteVisible boss9 off"
if donjon = 1 and LvlDONJON = 10 then #main.map,"SpriteVisible boss10 off"
if donjon = 1 and LvlDONJON = 11 then #main.map,"SpriteVisible boss11 off"
if donjon = 1 and LvlDONJON = 12 then #main.map,"SpriteVisible boss12 off"
if donjon = 1 and LvlDONJON > 12 then #main.map,"SpriteVisible boss1 off"

#main.map,"SpriteVisible boum off"
#main.map,"SpriteVisible boum2 off"
#main.map,"SpriteVisible boum3 off"
#main.map,"SpriteVisible boum4 off"
end if
'#main.map, "drawsprites"
'#main.map , "cls"
return

[HF]
timer 0
#main.map , "cls"
#main.map , "down"
#main.map, "drawbmp HF 0 0"
#main.map,"background HF"
#main.map, "when leftButtonDown [SimpleClickHF]"
print #main.map, "font Times New Roman 16; color black;backcolor white"
print #main.map, "place 545 520 ;\"; "HAUT FAIT"
print #main.map, "font Times New Roman 10; color black;backcolor white"
if MEDAILLEgoto = 1 then
    if MEDAILLE1 = 1 then
        print #main.map, "place 510 560 ;\"; " Vous avez tué 100 monstres !\     Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE1 = 2 then
        print #main.map, "place 510 560 ;\"; " Vous avez tué 500 monstres !\     Récompense : 50 000 d'or"
        money = money + 50000
    end if
    if MEDAILLE1 = 3 then
        print #main.map, "place 510 560 ;\"; "Vous avez tué 2000 monstres !\    Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE1 = 4 then
        print #main.map, "place 510 560 ;\"; "Vous avez tué 5000 monstres !\    Récompense : 400 000 d'or"
        money = money + 400000
    end if
    if MEDAILLE1 = 5 then
        print #main.map, "place 510 560 ;\"; "Vous avez tué 10 000 monstres !\ Récompense : 5 000 000 d'or"
        money = money + 5000000
    end if
end if
if MEDAILLEgoto = 2 then
    if MEDAILLE2 = 1 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 5 Tueurs !\Récompense : 25 000 d'or"
        money = money + 25000
    end if
    if MEDAILLE2 = 2 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 10 Tueurs !\Récompense : 50 000 d'or"
        money = money + 50000
    end if
    if MEDAILLE2 = 3 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 25 Tueurs !\Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE2 = 4 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 50 Tueurs !\Récompense : 500 000 d'or"
        money = money + 500000
    end if
    if MEDAILLE2 = 5 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 100 Tueurs !\Récompense : 5 000 000 d'or"
        money = money + 5000000
    end if
end if
if MEDAILLEgoto = 3 then
    if MEDAILLE3 = 1 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 1 Boss !\Récompense : 5 000 d'or"
        money = money + 5000
    end if
    if MEDAILLE3 = 2 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 3 Boss !\Récompense : 20 000 d'or"
        money = money + 20000
    end if
    if MEDAILLE3 = 3 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 5 Boss !\Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE3 = 4 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 10 Boss !\Récompense : 400 000 d'or"
        money = money + 400000
    end if
    if MEDAILLE3 = 5 then
        print #main.map, "place 525 560 ;\"; "Vous avez tué 20 Boss !\Récompense : 2 000 000 d'or"
        money = money + 2000000
    end if
end if
if MEDAILLEgoto = 4 then
    if MEDAILLE4 = 1 then
        print #main.map, "place 505 560 ;\"; "Vous avez stocké 5000 pièces d'or !\         Récompense : 1 000 d'or"
        money = money + 1000
    end if
    if MEDAILLE4 = 2 then
        print #main.map, "place 505 560 ;\"; "Vous avez stocké 10000 pièces d'or !\        Récompense : 5 000 d'or"
        money = money + 5000
    end if
    if MEDAILLE4 = 3 then
        print #main.map, "place 500 560 ;\"; "Vous avez stocké 50 000 pièces d'or !\       Récompense : 20 000 d'or"
        money = money + 20000
    end if
    if MEDAILLE4 = 4 then
        print #main.map, "place 495 560 ;\"; "Vous avez stocké 100 0000 pièces d'or !\        Récompense : 50 000 d'or"
        money = money + 50000
    end if
    if MEDAILLE4 = 5 then
        print #main.map, "place 495 560 ;\"; "Vous avez stocké 500 0000 pièces d'or !\       Récompense : 100 000 d'or"
        money = money + 100000
    end if
end if
if MEDAILLEgoto = 5 then
    if MEDAILLE5 = 1 then
        print #main.map, "place 505 560 ;\"; "Vous avez acheté 5 équipements !\         Récompense : 2 000 d'or"
        money = money + 2000
    end if
    if MEDAILLE5 = 2 then
        print #main.map, "place 505 560 ;\"; "Vous avez acheté 20 équipements !\        Récompense : 5 000 d'or"
        money = money + 5000
    end if
    if MEDAILLE5 = 3 then
        print #main.map, "place 500 560 ;\"; "Vous avez acheté 50 équipements !\       Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE5 = 4 then
        print #main.map, "place 495 560 ;\"; "Vous avez acheté 100 équipements !\        Récompense : 40 000 d'or"
        money = money + 40000
    end if
    if MEDAILLE5 = 5 then
        print #main.map, "place 495 560 ;\"; "Vous avez acheté 200 équipements !\       Récompense : 100 000 d'or"
        money = money + 100000
    end if
end if
if MEDAILLEgoto = 6 then
    if MEDAILLE6 = 1 then
        print #main.map, "place 505 560 ;\"; "Vous avez amélioré 10 équipements !\         Récompense : 4 000 d'or"
        money = money + 4000
    end if
    if MEDAILLE6 = 2 then
        print #main.map, "place 505 560 ;\"; "Vous avez amélioré 50 équipements !\        Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE6 = 3 then
        print #main.map, "place 500 560 ;\"; "Vous avez amélioré 100 équipements !\       Récompense : 30 000 d'or"
        money = money + 30000
    end if
    if MEDAILLE6 = 4 then
        print #main.map, "place 495 560 ;\"; "Vous avez amélioré 200 équipements !\        Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE6 = 5 then
        print #main.map, "place 495 560 ;\"; "Vous avez amélioré 500 équipements !\     Récompense : 1 000 000 d'or"
        money = money + 1000000
    end if
end if
if MEDAILLEgoto = 7 then
    if MEDAILLE7 = 1 then
        print #main.map, "place 530 560 ;\"; "Vous avez fini 2 quêtes !\ Récompense : 2 000 d'or"
        money = money + 2000
    end if
    if MEDAILLE7 = 2 then
        print #main.map, "place 530 560 ;\"; "Vous avez fini 15 quêtes !\ Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE7 = 3 then
        print #main.map, "place 530 560 ;\"; "Vous avez fini 40 quêtes !\ Récompense : 20 000 d'or"
        money = money + 20000
    end if
    if MEDAILLE7 = 4 then
        print #main.map, "place 530 560 ;\"; "Vous avez fini 100 quêtes !\ Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE7 = 5 then
        print #main.map, "place 530 560 ;\"; "Vous avez fini 200 quêtes !\ Récompense : 300 000 d'or"
        money = money + 300000
    end if
end if
if MEDAILLEgoto = 8 then
    if MEDAILLE8 = 1 then
        print #main.map, "place 510 560 ;\"; "Vous avez améliorer votre sac 10 !\        Récompense : 2 000 d'or"
        money = money + 2000
    end if
    if MEDAILLE8 = 2 then
        print #main.map, "place 510 560 ;\"; "Vous avez améliorer votre sac 50 !\        Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE8 = 3 then
        print #main.map, "place 510 560 ;\"; "Vous avez améliorer votre sac 100 !\       Récompense : 20 000 d'or"
        money = money + 20000
    end if
    if MEDAILLE8 = 4 then
        print #main.map, "place 510 560 ;\"; "Vous avez améliorer votre sac 250 !\    Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE8 = 5 then
        print #main.map, "place 510 560 ;\"; "Vous avez améliorer votre sac 500 !\    Récompense : 300 000 d'or"
        money = money + 300000
    end if
end if
if MEDAILLEgoto = 9 then
    if MEDAILLE9 = 1 then
        print #main.map, "place 510 560 ;\"; "Vous avez utilisez 2 parchemins !\        Récompense : 4 000 d'or"
        money = money + 4000
    end if
    if MEDAILLE9 = 2 then
        print #main.map, "place 510 560 ;\"; "Vous avez utilisez 10 parchemins !\        Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE9 = 3 then
        print #main.map, "place 510 560 ;\"; "Vous avez utilisez 50 parchemins !\       Récompense : 30 000 d'or"
        money = money + 30000
    end if
    if MEDAILLE9 = 4 then
        print #main.map, "place 510 560 ;\"; "Vous avez utilisez 100 parchemins !\    Récompense : 50 000 d'or"
        money = money + 50000
    end if
    if MEDAILLE9 = 5 then
        print #main.map, "place 510 560 ;\"; "Vous avez utilisez 200 parchemins !\    Récompense : 100 000 d'or"
        money = money + 100000
    end if
end if
if MEDAILLEgoto = 10 then
    if MEDAILLE10 = 1 then
        print #main.map, "place 510 560 ;\"; "Vous avez récupéré 10 potions !\        Récompense : 1 000 d'or"
        money = money + 1000
    end if
    if MEDAILLE10 = 2 then
        print #main.map, "place 510 560 ;\"; "Vous avez récupéré 100 potions !\        Récompense : 3 000 d'or"
        money = money + 3000
    end if
    if MEDAILLE10 = 3 then
        print #main.map, "place 510 560 ;\"; "Vous avez récupéré 500 potions !\       Récompense : 10 000 d'or"
        money = money + 10000
    end if
    if MEDAILLE10 = 4 then
        print #main.map, "place 510 560 ;\"; "Vous avez récupéré 1000 potions !\    Récompense : 20 000 d'or"
        money = money + 20000
    end if
    if MEDAILLE10 = 5 then
        print #main.map, "place 510 560 ;\"; "Vous avez récupéré 5000 potions !\    Récompense : 50 000 d'or"
        money = money + 50000
    end if
end if
if MEDAILLEgoto = 11 then
    if MEDAILLE11 = 1 then
        print #main.map, "place 510 560 ;\"; "Vous avez évité la mort 2 fois !\        Récompense : 5 000 d'or"
        money = money + 5000
    end if
    if MEDAILLE11 = 2 then
        print #main.map, "place 510 560 ;\"; "Vous avez évité la mort 5 fois !\        Récompense : 20 000 d'or"
        money = money + 20000
    end if
    if MEDAILLE11 = 3 then
        print #main.map, "place 510 560 ;\"; "Vous avez évité la mort 10 fois !\       Récompense : 50 000 d'or"
        money = money + 50000
    end if
    if MEDAILLE11 = 4 then
        print #main.map, "place 510 560 ;\"; "Vous avez évité la mort 25 fois !\    Récompense : 100 000 d'or"
        money = money + 100000
    end if
    if MEDAILLE11 = 5 then
        print #main.map, "place 510 560 ;\"; "Vous avez évité la mort 50 fois !\    Récompense : 300 000 d'or"
        money = money + 300000
    end if
end if
if MEDAILLEgoto = 12 then
    if MEDAILLE12 = 1 then
        print #main.map, "place 510 560 ;\"; "Vous avez parler a un pnj 50 fois !\        Récompense : 5 000 d'or"
        money = money + 5000
    end if
    if MEDAILLE12 = 2 then
        print #main.map, "place 510 560 ;\"; "Vous avez parler a un pnj 400 fois !\        Récompense : 50 000 d'or"
        money = money + 50000
    end if
    if MEDAILLE12 = 3 then
        print #main.map, "place 510 560 ;\"; "Vous avez parler a un pnj 2000 fois !\       Récompense : 300 000 d'or"
        money = money + 300000
    end if
    if MEDAILLE12 = 4 then
        print #main.map, "place 510 560 ;\"; "Vous avez parler a un pnj 5000 fois !\    Récompense : 1 000 000 d'or"
        money = money + 1000000
    end if
    if MEDAILLE12 = 5 then
        print #main.map, "place 500 560 ;\"; "Vous avez parler a un pnj 10 000 fois !\    Récompense : 10 000 000 d'or"
        money = money + 10000000
    end if
end if
wait

[SimpleClickHF]
mX = MouseX
mY = MouseY
compteurCLICK = compteurCLICK + 1
goto [MEDAILLE]
wait


[SimpleClickLVLup]
mX = MouseX
mY = MouseY
compteurCLICK = compteurCLICK + 1
goto [lvlUPsecurity2]
wait

[lvlUPinfo]
timer 0
#main.map , "cls"
#main.map , "down"
#main.map, "drawbmp lvlUP 0 0"
#main.map,"background lvlUP"
#main.map, "when leftButtonDown [SimpleClickLVLup]"

'notice campagne$

if campagne$ = "Warrior" then vieUP = int(23+(lvlDONJONtota*2))
if campagne$ = "Archer" then vieUP = int(12+(lvlDONJONtota))
if campagne$ = "Tank" then vieUP = int(41+(lvlDONJONtota*2))
if campagne$ = "Artisan" then vieUP = int(14+(lvlDONJONtota/2))
if campagne$ = "HEALER" then vieUP = int(12+(lvlDONJONtota/2))

if campagne$ = "Warrior" then atkUP = int(12+(lvlDONJONtota))
if campagne$ = "Archer" then atkUP = int(31+(lvlDONJONtota*2))
if campagne$ = "Tank" then atkUP = int(10+(lvlDONJONtota/2))
if campagne$ = "Artisan" then atkUP = int(8+(lvlDONJONtota))
if campagne$ = "HEALER" then atkUP = int(9+(lvlDONJONtota/4))

if campagne$ = "Warrior" then defUP = int(5+(lvlDONJONtota/3))
if campagne$ = "Archer" then defUP = int(3+(lvlDONJONtota/4))
if campagne$ = "Tank" then defUP = int(10+(lvlDONJONtota))
if campagne$ = "Artisan" then defUP = int(2+(lvlDONJONtota/2))
if campagne$ = "HEALER" then defUP = int(3+(lvlDONJONtota/4))

if campagne$ = "Warrior" then strUP = int(4 + int(2*lvlPASSIVE8))
if campagne$ = "Archer" then strUP = int(2 + int(2*lvlPASSIVE8))
if campagne$ = "Tank" then strUP = int(8 + int(2*lvlPASSIVE8))
if campagne$ = "Artisan" then strUP = int(3 + int(2*lvlPASSIVE8))
if campagne$ = "HEALER" then strUP = int(1 + int(2*lvlPASSIVE8))

if campagne$ = "Warrior" then agiUP = int(3 + int(2*lvlPASSIVE9))
if campagne$ = "Archer" then agiUP = int(9 + int(2*lvlPASSIVE9))
if campagne$ = "Tank" then agiUP = int(1 + int(2*lvlPASSIVE9))
if campagne$ = "Artisan" then agiUP = int(3 + int(2*lvlPASSIVE9))
if campagne$ = "HEALER" then agiUP = int(1 + int(2*lvlPASSIVE9))

if campagne$ = "Warrior" then sciUP = int(1 + int(2*lvlPASSIVE10))
if campagne$ = "Archer" then sciUP = int(2 + int(2*lvlPASSIVE10))
if campagne$ = "Tank" then sciUP = int(1 + int(2*lvlPASSIVE10))
if campagne$ = "Artisan" then sciUP = int(3 + int(2*lvlPASSIVE10))
if campagne$ = "HEALER" then sciUP = int(6 + int(2*lvlPASSIVE10))

print #main.map, "font Times New Roman 25; color black;backcolor white"
if version = 1 then
print #main.map, "place 550 350 ;\"; "NIVEAU ";lvl + 1
print #main.map, "font Times New Roman 10; color black;backcolor white"
print #main.map, "place 565 385 ;\"; "Vos points de vie : + ";vieUP
print #main.map, "place 555 400 ;\"; "Vos points d'attaque : + ";atkUP
print #main.map, "place 552 415 ;\"; "Vos points de défense : + ";defUP
print #main.map, "place 580 445 ;\"; "Votre force : + ";strUP
print #main.map, "place 576 460 ;\"; "Votre agilité : + ";agiUP
print #main.map, "place 573 475 ;\"; "Votre science : + ";sciUP
end if
if version = 2 then
print #main.map, "place 560 350 ;\"; "LEVEL ";lvl + 1
print #main.map, "font Times New Roman 10; color black;backcolor white"
print #main.map, "place 565 385 ;\"; "Points of life : + ";vieUP
print #main.map, "place 555 400 ;\"; "Points of damages : + ";atkUP
print #main.map, "place 552 415 ;\"; "Points of armor : + ";defUP
print #main.map, "place 580 445 ;\"; "Strenght : + ";strUP
print #main.map, "place 576 460 ;\"; "Agility : + ";agiUP
print #main.map, "place 573 475 ;\"; "Science : + ";sciUP
end if

    money$ = ""
    money2$ = str$(int(moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold))
    if (moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold) > 99999 then
        money$ = " k"
        money2$ = str$(int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold)/1000))
    end if
    if (moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold) > 9999999 then
        money$ = " m"
        money2$ = str$(int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold)/1000000))
    end if
    if (moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold) > 9999999999 then
        money$ = " M"
        money2$ = str$(int((moneyENNEMI+(lvlPASSIVE6*int(4+LvlDONJON))+ParcheminGold)/1000000000))
    end if

    xp$ = ""
    xp2$ = str$(int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp))
    if int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp) > 99999 then
        xp$ = " k"
        xp2$ = str$(int((xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp)/1000))
    end if
    if int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp) > 9999999 then
        xp$ = " m"
        xp2$ = str$(int((xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp)/1000000))
    end if
    if int(xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp) > 9999999999 then
        xp$ = " M"
        xp2$ = str$(int((xpENNEMI+BONUSxp+pmTOTAL+ParcheminXp)/1000000000))
    end if

print #main.map, "font Times New Roman 10; color black;backcolor white"
if version = 1 then print #main.map, "place 170 365 ;\"; "  VICTOIRE : \+ ";xp2$;xp$;" XP \+ ";money2$;money$;" D'OR  "
if version = 2 then print #main.map, "place 170 365 ;\"; "  VICTORY : \+ ";xp2$;xp$;" XP \+ ";money2$;money$;" GOLD  "

gosub [lvlUP]
wait


[die]
timer 0
PARCHEMIN5bonus = 0
if PARCHEMIN7 >= 1 then
   PARCHEMIN7 = PARCHEMIN7 - 1
   nombreUTILmedail = nombreUTILmedail + 1
   pv = pvTOTAL
   print #main.map, "font Times New Roman 10; color black;backcolor white"
   if version = 1 then print #main.map, "place 500 500 ;\"; "Vous êtes mort ...\Vous utilisez un médaillon d'immortalité afin de poursuivre l'aventure !\Vous n'avez plus de médaillon.\Soyez prudent car votre mort sans médaillon sera définitive !"
   if version = 2 then print #main.map, "place 500 500 ;\"; "Your dead ...\Vous utilisez un médaillon d'immortalité afin de poursuivre l'aventure !\Vous n'avez plus de médaillon.\Soyez prudent car votre mort sans médaillon sera définitive !"
   if PARCHEMIN7 >= 1 then #main.map,"SpriteVisible pendentif1 on"
   if PARCHEMIN7 < 1 then #main.map,"SpriteVisible pendentif1 off"
   #main.map, "when leftButtonDown [potionUSED]"
   wait
end if
dir$ = "" : file$ = "data\id\Save";name$;".sao"
if fileExist(dir$,file$) = 1 then
    if systemSAV = 1 then kill "data\id\Save";name$;".sao"
end if
#main.map , "down"
#main.map, "drawbmp over 0 0"
#main.map,"background over"
timer 1000, [iniEND]
#main.map, "when leftButtonDown [iniEND]"
wait

[iniEND]
timer 0
#main.map, "cls"
close #main
open "Néttoyage de la mémoire" for window_nf as #main
goto [ini]


[lvlUP]
timer 0

secu1PALLIER = 0
secu2PALLIER = 0
securITEM = 0
bouclier = int(20+(9*lvlPASSIVE20*lvlPASSIVE20))
PStota = int(PStota + 5)
PPtota = int(PPtota + 5)
lvlIND = lvl/10
if lvlIND <1 then lvlIND = 1
select case campagne$
    case "Warrior"
    atk = int((atk + 16)+(lvlDONJONtota))
    def = int((def + 7)+(lvlDONJONtota/3))
    pv = int((pvTOTAL + 29)+(lvlDONJONtota*2))
    pm = int((pmTOTAL + 3)+(lvlDONJONtota/4))
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = lvl +1
    xpTOTAL = int(xpTOTAL + ((100*lvl) * lvlIND) )
    Agility = Agility +3 + lvlPASSIVE9
    Strength = Strength +4 + lvlPASSIVE8
    intelligence = intelligence +1 + lvlPASSIVE10
    PoP = PoP + 3
    PoS = PoS + 1
    case "Archer"
    atk = int((atk + 26)+(lvlDONJONtota*2))
    def = int((def + 4)+(lvlDONJONtota/4))
    pv = int((pvTOTAL + 18)+(lvlDONJONtota))
    pm = int((pmTOTAL + 4)+(lvlDONJONtota/2))
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = lvl +1
    xpTOTAL = int(xpTOTAL + ((100*lvl) * lvlIND) )
    Agility = Agility +9 + lvlPASSIVE9
    Strength = Strength +2 + lvlPASSIVE8
    intelligence = intelligence +2 + lvlPASSIVE10
    PoP = PoP + 3
    PoS = PoS + 1
    case "Tank"
    atk = int((atk + 12)+(lvlDONJONtota/2))
    def = int((def + 13)+(lvlDONJONtota))
    pv = int((pvTOTAL + 49)+(lvlDONJONtota*2))
    pm = int((pmTOTAL + 1)+(lvlDONJONtota/6))
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = lvl +1
    xpTOTAL = int(xpTOTAL + ((100*lvl) * lvlIND) )
    Agility = Agility +1 + lvlPASSIVE9
    Strength = Strength +8 + lvlPASSIVE8
    intelligence = intelligence +1 + lvlPASSIVE10
    PoP = PoP + 3
    PoS = PoS + 1
    case "Artisan"
    atk = int((atk + 10)+(lvlDONJONtota))
    def = int((def + 3)+(lvlDONJONtota/2))
    pv = int((pvTOTAL + 20)+(lvlDONJONtota/2))
    pm = int((pmTOTAL + 5)+(lvlDONJONtota))
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = lvl +1
    xpTOTAL = int(xpTOTAL + ((100*lvl) * lvlIND) )
    Agility = Agility +3 + lvlPASSIVE9
    Strength = Strength +3 + lvlPASSIVE8
    intelligence = intelligence +3 + lvlPASSIVE10
    PoP = PoP + 3
    PoS = PoS + 1
    case "HEALER"
    atk = int((atk + 11)+(lvlDONJONtota/4))
    def = int((def + 4)+(lvlDONJONtota/4))
    pv = int((pvTOTAL + 18)+(lvlDONJONtota/2))
    pm = int((pmTOTAL + 10)+(lvlDONJONtota*2))
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = lvl +1
    xpTOTAL = int(xpTOTAL + ((100*lvl) * lvlIND) )
    Agility = Agility +1 + lvlPASSIVE9
    Strength = Strength +1 + lvlPASSIVE8
    intelligence = intelligence +6 + lvlPASSIVE10
    PoP = PoP + 3
    PoS = PoS + 1
end select
return

[data]
select case campagne
    case 1
    Agility = 8
    Strength = 12
    intelligence = 6
    LvlDONJON= 1
    campagne$ = "Warrior"
    atk = int(25+(Strength*2))
    def = int(5+Agility/5)
    pv = int(71+(Strength*4))
    pm = int(10+intelligence/5)
    money = 200
    goldTOTAL = money
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = 1
    xp = 00
    xpTOTAL = 50
    CC = 6
    PoP = 5
    PoS = 1
    case 2
    Agility = 15
    Strength = 7
    intelligence = 10
    LvlDONJON= 1
    campagne$ = "Archer"
    atk = int(44+(Agility*2))
    def = int(3+Agility/5)
    pv = int(55+(Strength*4))
    pm = int(14+(intelligence/5))
    money = 300
    goldTOTAL = money
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = 1
    xp = 00
    xpTOTAL = 50
    CC = 10
    PoP = 5
    PoS = 1
    case 3
    Agility = 7
    Strength = 19
    intelligence = 4
    LvlDONJON= 1
    campagne$ = "Tank"
    atk = int(10+(Strength*2))
    def = int(10+Agility/5)
    pv = int(130+Strength*4)
    pm = int(4+intelligence/5)
    money = 200
    goldTOTAL = money
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = 1
    xp = 00
    xpTOTAL = 50
    CC = 8
    PoP = 5
    PoS = 1
    case 4
    Agility = 6
    Strength = 5
    intelligence = 11
    LvlDONJON= 1
    campagne$ = "Artisan"
    atk = int(8+(intelligence*2))
    def = int(5+Agility/5)
    pv = int(50+(Strength*4))
    pm = int(11+intelligence/5)
    money = 600
    goldTOTAL = money
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = 1
    xp = 00
    xpTOTAL = 50
    CC = 12
    PoP = 5
    PoS = 1
    case 5
    Agility = 5
    Strength = 5
    intelligence = 16
    LvlDONJON= 1
    campagne$ = "HEALER"
    atk = int(10+intelligence*2)
    def = int(2+Agility/5)
    pv = int(52+Strength*4)
    pm = int(20+intelligence/5)
    money = 400
    goldTOTAL = money
    pvTOTAL = pv
    pmTOTAL = pm
    lvl = 1
    xp = 00
    xpTOTAL = 50
    CC = 2
    PoP = 5
    PoS = 1
end select
return

[FLOOR]
BOSS = 0
MaxlvlMONSTERbyFLOOR = (LvlDONJON*4)-1
NumberFLOORmonster = 10
[FLOOR2]
if BOSS = 0 then
    lvlENNEMI = int(rnd(1)*(10*LvlDONJON)+(9*LvlDONJON))
    if lvlENNEMI > int(10*LvlDONJON) then lvlENNEMI = int(10*LvlDONJON)
    pvENNEMI = int(114*lvlENNEMI) : pvTOTALennemi = pvENNEMI
    atkENNEMI = int(51*lvlENNEMI + ((BONUSdef+def)/2))
    defENNEMI = int(18*lvlENNEMI)
    xpENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+1)
    moneyENNEMI = int(rnd(1)*(atkENNEMI+defENNEMI)+1)
end if
return


'----sauvegarde-----------------------------------------------------------------------------------------------------------------------|
[save]
open "data\id\time.sao" for input as #save
input #save, xTIMER
CLOSE #save
compteurTIME = xTIMER

moneyTOTA = int(money*12)
LvlDONJON = int(lvlDONJONtota/3)
PStota = int(lvl*5+add1)
PPtota = int(lvl*5+add2)
PARCHEMIN1tota = int(PARCHEMIN1+(lvlDONJONtota*7))
PARCHEMIN2tota = int(PARCHEMIN2+(lvlDONJONtota*6))
PARCHEMIN3tota = int(PARCHEMIN3+(lvlDONJONtota*5))
PARCHEMIN4tota = int(PARCHEMIN4+(lvlDONJONtota*4))
PARCHEMIN5tota = int(PARCHEMIN5+(lvlDONJONtota*3))
PARCHEMIN6tota = int(PARCHEMIN6+(lvlDONJONtota*2))
PARCHEMIN7tota = int(PARCHEMIN7+(lvlDONJONtota))
PotionLittleHPtota = int(PotionLittleHP+(def+pv)*2)
PotionMediumHPtota = int(PotionMediumHP+(def+pv)*4)
PotionBigHPtota = int(PotionBigHP+(def+pv)*8)
PotionBig2HPtota = int(PotionBig2HP+(def+pv)*16)
PotionBig3HPtota = int(PotionBig3HP+(def+pv)*32)
atktota = int(atk+(pv+atk))
deftota = int(def+(pv+xp))
pvtota = int(pv+(xp+atk))
pmtota = int(pm+(pv+lvl))
lvltota = int(lvl+(lvl+atk))
xptota = int(xp+(xp+lvl))
xpTOTALtota  = int(xpTOTAL+(def+lvl))
lvlITEM1tota  = int(lvlITEM1+(xp+def))
lvlITEM2tota  = int(lvlITEM2+(xp+atk))
lvlPASSIVE1tota  = int(lvlPASSIVE1+(pm+atk))
lvlPASSIVE2tota  = int(lvlPASSIVE2+(xp+pm))
lvlPASSIVE3tota  = int(lvlPASSIVE3+(xp+lvl))
lvlPASSIVE4tota  = int(lvlPASSIVE4+(def+pm))
lvlPASSIVE5tota  = int(lvlPASSIVE5+(pm+pv))
lvlPASSIVE6tota  = int(lvlPASSIVE6+(xp+pv))
lvlPASSIVE7tota  = int(lvlPASSIVE7+(lvl+pv))
lvlPASSIVE8tota  = int(lvlPASSIVE8+(xp*lvl))
lvlPASSIVE9tota  = int(lvlPASSIVE9+(lvl*pv))
lvlPASSIVE10tota  = int(lvlPASSIVE10+(xp+pv+lvl))
lvlPASSIVE11tota  = int(lvlPASSIVE11+(pm+pv+lvl))
lvlPASSIVE12tota  = int(lvlPASSIVE12+(pm+pv+pm))
Agilitytota  = int(Agility+(pv+6))
Strengthtota  = int(Strength+(xp+3))
intelligencetota  = int(intelligence+(pm+1))
BONUSgoldtota = int(BONUSgold*6)
BONUSxptota = int(BONUSxp*3)
NumberFLOORmonstertota = int((NumberFLOORmonster)+(xp+pv+lvl+pm))
nMax2tota = int(nMax2+(pm*9))
MAX2tota = int(MAX2+(xp+xpTOTAL))
lvlMAX2tota = int(lvlMAX2+(xpTOTAL*6))
nMax1tota = int(nMax1+(pv+pvTOTAL*3))
MAX1tota = int(MAX1+(pvTOTAL*7))
lvlMAX1tota = int(lvlMAX1+(Agility+intelligence*6))
nombreACHATitemtota = int(nombreACHATitem+(xp+xp+pvTOTAL))
nombreUPitemtota = int(nombreUPitem+(Agility+xp))
nombreQUESTtota = int(nombreQUEST+(xp+intelligence*6))
nombreUPsactota= int(nombreUPsac+(xp+intelligence*10))
nombreUTILparchtota= int(nombreUTILparch+(xp+intelligence*6))
nombreDROPpotiontota= int(nombreDROPpotion+(xp+intelligence*8))
nombreUTILmedailtota= int(nombreUTILmedail+(xp+intelligence*4))
speakTOpnjtota = int(speakTOpnj+(xp+intelligence*2))
recompenseQ1tota = int(recompenseQ1+(pm*9))
recompenseQ2tota = int(recompenseQ2+(pm*15))
recompenseQ3tota = int(recompenseQ3+(pm*21))
recompenseQ4tota = int(recompenseQ4+(pm*5))
recompenseQ5tota = int(recompenseQ5+(pm*7))
recompenseQ6tota = int(recompenseQ6+(pm*13))
recompenseQ1atota = int(recompenseQ1a+(pm*22))
recompenseQ2atota = int(recompenseQ2a+(pm*2))
recompenseQ3atota = int(recompenseQ3a+(pm*4))
recompenseQ4atota = int(recompenseQ4a+(pm*8))
recompenseQ5atota = int(recompenseQ5a+(pm*9))
recompenseQ6atota = int(recompenseQ6a+(pm*6))
recompenseQ1btota = int(recompenseQ1b+(pm*7))
recompenseQ2btota = int(recompenseQ2b+(pm*41))
recompenseQ3btota = int(recompenseQ3b+(pm*18))
recompenseQ4btota = int(recompenseQ4b+(pm*16))
recompenseQ5btota = int(recompenseQ5b+(pm*21))
recompenseQ6btota = int(recompenseQ6b+(pm*23))
recompenseQ1ctota = int(recompenseQ1c+(pm*15))
recompenseQ2ctota = int(recompenseQ2c+(pm*11))
recompenseQ3ctota = int(recompenseQ3c+(pm*12))
recompenseQ4ctota = int(recompenseQ4c+(pm*15))
recompenseQ5ctota = int(recompenseQ5c+(pm*27))
recompenseQ6ctota = int(recompenseQ6c+(pm*26))
recompenseQ1dtota = int(recompenseQ1d+(pm*4))
recompenseQ2dtota = int(recompenseQ2d+(pm*8))
recompenseQ3dtota = int(recompenseQ3d+(pm*11))
recompenseQ4dtota = int(recompenseQ4d+(pm*16))
recompenseQ5dtota = int(recompenseQ5d+(pm*3))
recompenseQ6dtota = int(recompenseQ6d+(pm*75))
packQ1tota = int(packQ1+(xp*7))
packQ2tota = int(packQ2+(xp*3))
packQ3tota = int(packQ3+(xp*5))
packQ4tota = int(packQ4+(xp*8))
packQ5tota = int(packQ5+(xp*4))
Q1pack1tota = int(Q1pack1+(xp*2))
Q2pack1tota = int(Q2pack1+(xp*3))
Q3pack1tota = int(Q3pack1+(xp*5))
Q4pack1tota = int(Q4pack1+(xp*9))
Q5pack1tota = int(Q5pack1+(xp*7))
Q6pack1tota = int(Q6pack1+(xp*6))
Q1pack2tota = int(Q1pack2+(xp*8))
Q2pack2tota = int(Q2pack2+(xp*5))
Q3pack2tota = int(Q3pack2+(xp*2))
Q4pack2tota = int(Q4pack2+(xp*3))
Q5pack2tota = int(Q5pack2+(xp*5))
Q6pack2tota = int(Q6pack2+(xp*6))
Q1pack3tota = int(Q1pack3+(xp*5))
Q2pack3tota = int(Q2pack3+(xp*2))
Q3pack3tota = int(Q3pack3+(xp*3))
Q4pack3tota = int(Q4pack3+(xp*6))
Q5pack3tota = int(Q5pack3+(xp*8))
Q6pack3tota = int(Q6pack3+(xp*4))
Q1pack4tota = int(Q1pack4+(xp*2))
Q2pack4tota = int(Q2pack4+(xp*8))
Q3pack4tota = int(Q3pack4+(xp*4))
Q4pack4tota = int(Q4pack4+(xp*7))
Q5pack4tota = int(Q5pack4+(xp*3))
Q6pack4tota = int(Q6pack4+(xp*6))
Q1pack5tota = int(Q1pack5+(xp*4))
Q2pack5tota = int(Q2pack5+(xp*7))
Q3pack5tota = int(Q3pack5+(xp*2))
Q4pack5tota = int(Q4pack5+(xp*5))
Q5pack5tota = int(Q5pack5+(xp*6))
Q6pack5tota = int(Q6pack5+(xp*3))
nombreACHATpoptota = int(nombreACHATpop+(pvTOTAL*17))
NombreKILLsangitota = int(NombreKILLsangi+(pv+xp*3))
VALRAKlifetota = int(VALRAKlife+(pv+xp*5))
nombrePLANTtuertota = int(nombrePLANTtuer+(pv+xp*6))
nombreSQUEtuertota = int(nombreSQUEtuer+(pv+xp*11))
nombreGOBtuertota = int(nombreGOBtuer+(pv+xp*12))
nombreARAtuertota = int(nombreARAtuer+(pv+xp*2))
Qtavernetota = int(Qtaverne+(pv+xp*22))
nombreOEUFphenixtota = int(nombreOEUFphenix+(pv+xp*17))
phenixKILLEDtota = int(phenixKILLED+(pv+xp*16))
RoisDEScentaurestota = int(RoisDEScentaures+(pv+xp*19))
DonjonMaudittota = int(DonjonMaudit+(pv+xp*28))
LvlDONJONmaudittota = int(LvlDONJONmaudit+(pv+xp*33))

open "data\id\Save";name$;".sao" for output as #save
print #save, name$
print #save, mdp$
print #save, MusicSELECT
print #save, systemSAV
print #save, version
print #save, langue$
print #save, LvlDONJON
print #save, campagne$
print #save, atk
print #save, def
print #save, pv
print #save, pm
print #save, money
print #save, pvTOTAL
print #save, pmTOTAL
print #save, lvl
print #save, xp
print #save, xpTOTAL
print #save, Agility
print #save, Strength
print #save, intelligence
print #save, PoP
print #save, PoS
print #save, nMax2
print #save, MAX2
print #save, lvlMAX2
print #save, nMax1
print #save, MAX1
print #save, lvlMAX1
print #save, nombreACHATitem
print #save, nombreACHATitemtota
print #save, nombreUPitem
print #save, nombreQUEST
print #save, nombreUPitemtota
print #save, nombreQUESTtota
print #save, nombreUPsac
print #save, nombreUTILparch
print #save, nombreDROPpotion
print #save, nombreUTILmedail
print #save, speakTOpnj
print #save, nombreUPsactota
print #save, nombreUTILparchtota
print #save, nombreDROPpotiontota
print #save, nombreUTILmedailtota
print #save, speakTOpnjtota
print #save, packQ1
print #save, packQ2
print #save, packQ3
print #save, packQ4
print #save, packQ5
print #save, Q1pack1
print #save, Q2pack1
print #save, Q3pack1
print #save, Q4pack1
print #save, Q5pack1
print #save, Q6pack1
print #save, Q1pack2
print #save, Q2pack2
print #save, Q3pack2
print #save, Q4pack2
print #save, Q5pack2
print #save, Q6pack2
print #save, Q1pack3
print #save, Q2pack3
print #save, Q3pack3
print #save, Q4pack3
print #save, Q5pack3
print #save, Q6pack3
print #save, Q1pack4
print #save, Q2pack4
print #save, Q3pack4
print #save, Q4pack4
print #save, Q5pack4
print #save, Q6pack4
print #save, Q1pack5
print #save, Q2pack5
print #save, Q3pack5
print #save, Q4pack5
print #save, Q5pack5
print #save, Q6pack5
print #save, packQ1tota
print #save, packQ2tota
print #save, packQ3tota
print #save, packQ4tota
print #save, packQ5tota
print #save, Q1pack1tota
print #save, Q2pack1tota
print #save, Q3pack1tota
print #save, Q4pack1tota
print #save, Q5pack1tota
print #save, Q6pack1tota
print #save, Q1pack2tota
print #save, Q2pack2tota
print #save, Q3pack2tota
print #save, Q4pack2tota
print #save, Q5pack2tota
print #save, Q6pack2tota
print #save, Q1pack3tota
print #save, Q2pack3tota
print #save, Q3pack3tota
print #save, Q4pack3tota
print #save, Q5pack3tota
print #save, Q6pack3tota
print #save, Q1pack4tota
print #save, Q2pack4tota
print #save, Q3pack4tota
print #save, Q4pack4tota
print #save, Q5pack4tota
print #save, Q6pack4tota
print #save, Q1pack5tota
print #save, Q2pack5tota
print #save, Q3pack5tota
print #save, Q4pack5tota
print #save, Q5pack5tota
print #save, Q6pack5tota
print #save, nombreACHATpop
print #save, nombreACHATpoptota
print #save, recompenseQ1
print #save, recompenseQ2
print #save, recompenseQ3
print #save, recompenseQ4
print #save, recompenseQ5
print #save, recompenseQ6
print #save, recompenseQ1a
print #save, recompenseQ2a
print #save, recompenseQ3a
print #save, recompenseQ4a
print #save, recompenseQ5a
print #save, recompenseQ6a
print #save, recompenseQ1b
print #save, recompenseQ2b
print #save, recompenseQ3b
print #save, recompenseQ4b
print #save, recompenseQ5b
print #save, recompenseQ6b
print #save, recompenseQ1c
print #save, recompenseQ2c
print #save, recompenseQ3c
print #save, recompenseQ4c
print #save, recompenseQ5c
print #save, recompenseQ6c
print #save, recompenseQ1d
print #save, recompenseQ2d
print #save, recompenseQ3d
print #save, recompenseQ4d
print #save, recompenseQ5d
print #save, recompenseQ6d
print #save, recompenseQ1tota
print #save, recompenseQ2tota
print #save, recompenseQ3tota
print #save, recompenseQ4tota
print #save, recompenseQ5tota
print #save, recompenseQ6tota
print #save, recompenseQ1atota
print #save, recompenseQ2atota
print #save, recompenseQ3atota
print #save, recompenseQ4atota
print #save, recompenseQ5atota
print #save, recompenseQ6atota
print #save, recompenseQ1btota
print #save, recompenseQ2btota
print #save, recompenseQ3btota
print #save, recompenseQ4btota
print #save, recompenseQ5btota
print #save, recompenseQ6btota
print #save, recompenseQ1ctota
print #save, recompenseQ2ctota
print #save, recompenseQ3ctota
print #save, recompenseQ4ctota
print #save, recompenseQ5ctota
print #save, recompenseQ6ctota
print #save, recompenseQ1dtota
print #save, recompenseQ2dtota
print #save, recompenseQ3dtota
print #save, recompenseQ4dtota
print #save, recompenseQ5dtota
print #save, recompenseQ6dtota
print #save, NombreKILLsangitota
print #save, VALRAKlifetota
print #save, nombrePLANTtuertota
print #save, nombreSQUEtuertota
print #save, nombreGOBtuertota
print #save, nombreARAtuertota
print #save, Qtavernetota
print #save, nombreOEUFphenixtota
print #save, phenixKILLEDtota
print #save, RoisDEScentaurestota
print #save, DonjonMaudittota
print #save, LvlDONJONmaudittota
print #save, NombreKILLsangi
print #save, VALRAKlife
print #save, nombrePLANTtuer
print #save, nombreSQUEtuer
print #save, nombreGOBtuer
print #save, nombreARAtuer
print #save, Qtaverne
print #save, nombreOEUFphenix
print #save, phenixKILLED
print #save, RoisDEScentaures
print #save, DonjonMaudit
print #save, LvlDONJONmaudit
'gosub [FLOOR]
print #save, nMax2tota
print #save, MAX2tota
print #save, lvlMAX2tota
print #save, nMax1tota
print #save, MAX1tota
print #save, lvlMAX1tota
print #save, NumberFLOORmonster
print #save, BOSS
print #save, RACE$
print #save, capacity$
print #save, lvlPASSIVE1
print #save, lvlPASSIVE2
print #save, lvlPASSIVE3
print #save, lvlPASSIVE4
print #save, lvlPASSIVE5
print #save, lvlPASSIVE6
print #save, lvlPASSIVE7
print #save, lvlPASSIVE8
print #save, lvlPASSIVE9
print #save, lvlPASSIVE10
print #save, lvlPASSIVE11
print #save, lvlPASSIVE12
print #save, lvlPASSIVE13
print #save, lvlPASSIVE14
print #save, lvlPASSIVE15
print #save, lvlPASSIVE16
print #save, lvlPASSIVE17
print #save, lvlPASSIVE18
print #save, lvlPASSIVE19
print #save, lvlPASSIVE20
print #save, lvlPASSIVE21
print #save, lvlPASSIVE22
print #save, lvlPASSIVE23
print #save, lvlPASSIVE24
print #save, BONUSatk
print #save, TYPEatkEQUIP$
print #save, BONUSdef
print #save, TYPEdefEQUIP$
print #save, lvlITEM1
print #save, lvlITEM2
print #save, PotionLittleHP
print #save, PotionMediumHP
print #save, PotionBigHP
print #save, sexe
print #save, BONUSgold
print #save, BONUSxp
print #save, PotionBig2HP
print #save, PotionBig3HP
print #save, lvlDONJONtota
print #save, PStota
print #save, PPtota
print #save, moneyTOTA
print #save, PARCHEMIN1tota
print #save, PARCHEMIN2tota
print #save, PARCHEMIN3tota
print #save, PARCHEMIN4tota
print #save, PARCHEMIN5tota
print #save, PARCHEMIN6tota
print #save, PARCHEMIN7tota
print #save, PotionLittleHPtota
print #save, PotionMediumHPtota
print #save, PotionBigHPtota
print #save, PotionBig2HPtota
print #save, PotionBig3HPtota
print #save, atktota
print #save, deftota
print #save, pvtota
print #save, pmtota
print #save, lvltota
print #save, xptota
print #save, xpTOTALtota
print #save, lvlITEM1tota
print #save, lvlITEM2tota
print #save, lvlPASSIVE1tota
print #save, lvlPASSIVE2tota
print #save, lvlPASSIVE3tota
print #save, lvlPASSIVE4tota
print #save, lvlPASSIVE5tota
print #save, lvlPASSIVE6tota
print #save, lvlPASSIVE7tota
print #save, lvlPASSIVE8tota
print #save, lvlPASSIVE9tota
print #save, lvlPASSIVE10tota
print #save, lvlPASSIVE11tota
print #save, lvlPASSIVE12tota
print #save, lvlPASSIVE13tota
print #save, lvlPASSIVE14tota
print #save, lvlPASSIVE15tota
print #save, lvlPASSIVE16tota
print #save, lvlPASSIVE17tota
print #save, lvlPASSIVE18tota
print #save, lvlPASSIVE19tota
print #save, lvlPASSIVE20tota
print #save, lvlPASSIVE21tota
print #save, lvlPASSIVE22tota
print #save, lvlPASSIVE23tota
print #save, lvlPASSIVE24tota
print #save, NumberFLOORmonstertota
print #save, Agilitytota
print #save, Strengthtota
print #save, intelligencetota
print #save, BONUSgoldtota
print #save, BONUSxptota
print #save, add1
print #save, add2
print #save, PARCHEMIN1
print #save, PARCHEMIN2
print #save, PARCHEMIN3
print #save, PARCHEMIN4
print #save, PARCHEMIN5
print #save, PARCHEMIN6
print #save, PARCHEMIN7
print #save, NombreEnnemiKILL
print #save, NombrePlayerKILL
print #save, NombreBossKILL
print #save, goldTOTAL
print #save, aDate$
print #save, MEDAILLE1
print #save, MEDAILLE2
print #save, MEDAILLE3
print #save, MEDAILLE4
print #save, MEDAILLE5
print #save, MEDAILLE6
print #save, MEDAILLE7
print #save, MEDAILLE8
print #save, MEDAILLE9
print #save, MEDAILLE10
print #save, MEDAILLE11
print #save, MEDAILLE12
print #save, MEDAILLE13
print #save, MEDAILLE14
print #save, MEDAILLE15
print #save, MEDAILLE16
print #save, MEDAILLE17
print #save, MEDAILLE18
print #save, MEDAILLE19
print #save, MEDAILLE20
print #save, MEDAILLE21
print #save, MEDAILLE22
print #save, MEDAILLE23
print #save, MEDAILLE24
print #save, FragmentJAUNE1
print #save, FragmentJAUNE2
print #save, FragmentJAUNE3
print #save, FragmentBLEU1
print #save, FragmentBLEU2
print #save, FragmentBLEU3
print #save, AIDEpnj1
print #save, AIDEpnj2
print #save, AIDEpnj3
print #save, compteurTIME
print #save, MEDAILLE1$
print #save, MEDAILLE2$
print #save, MEDAILLE3$
print #save, MEDAILLE4$
print #save, MEDAILLE5$
print #save, MEDAILLE6$
print #save, MEDAILLE7$
print #save, MEDAILLE8$
print #save, MEDAILLE9$
print #save, MEDAILLE10$
print #save, MEDAILLE11$
print #save, MEDAILLE12$
print #save, MEDAILLE13$
print #save, MEDAILLE14$
print #save, MEDAILLE15$
print #save, MEDAILLE16$
print #save, MEDAILLE17$
print #save, MEDAILLE18$
print #save, MEDAILLE19$
print #save, MEDAILLE20$
print #save, MEDAILLE21$
print #save, MEDAILLE22$
print #save, MEDAILLE23$
print #save, MEDAILLE24$
print #save, compteurPASSIVE13
print #save, compteurCLICK
print #save, caseITEM1
print #save, caseITEM2
print #save, caseITEM3
print #save, caseITEM4
print #save, caseITEM5
print #save, caseITEM6
print #save, caseITEM7
print #save, caseITEM8
print #save, caseITEM9
print #save, caseITEM10
print #save, caseITEM11
print #save, caseITEM12
print #save, case1TYPE
print #save, case2TYPE
print #save, case3TYPE
print #save, case4TYPE
print #save, case5TYPE
print #save, case6TYPE
print #save, case7TYPE
print #save, case8TYPE
print #save, case9TYPE
print #save, case10TYPE
print #save, case11TYPE
print #save, case12TYPE
print #save, case1TYPE$
print #save, case2TYPE$
print #save, case3TYPE$
print #save, case4TYPE$
print #save, case5TYPE$
print #save, case6TYPE$
print #save, case7TYPE$
print #save, case8TYPE$
print #save, case9TYPE$
print #save, case10TYPE$
print #save, case11TYPE$
print #save, case12TYPE$

CLOSE #save

r = 18 : b = 138 : v = 66
print #main.map, "font Times New Roman 12 ; backcolor ";r;" ";v;" ";b ;" color black"
if version = 1 then print #main.map, "place 415 100 ;\"; "Sauvegarde OK"
if version = 2 then print #main.map, "place 415 100 ;\"; "Save data OK"
wait


'----chargement----------------------------------------------------------------------------------------------------------------|


[loadEND2]
if errorNOTICED = 1 = 1 then wait
errorNOTICED = 1
notice " " + chr$(13) +  "Les valeures de votre sauvegarde ont été modifiés. Votre partie ne peut être lancée. Il est possible qu'une nouvelle version ne rende plus compatible votre ancienne sauvegarde avec le jeu. Il est donc recommandé de recommancer avec un nouveau personnage (dite non lors du chargement de votre partie). Merci de votre compréhension. Nous vous conseillons de sauvegarder vos données et à relancer le jeu pour éviter toute nouvelle erreur."
close #save
wait



[confirmationC]
if version = 1 then confirm "Voulez vous quitter cette partie pour en charger une autre ?"; load$
if version = 2 then confirm "Do you want to leave this game for load a other ?"; load$
if load$ = "no" then wait
camp = 0
goto [iniEND]


[load]
timer 0
dir$ = "" : file$ = "data\id\Save";name$;".sao"
if fileExist(dir$,file$) = 0 then
    if version = 1 then notice " " + chr$(13) + "Aucune partie n'est sauvegardé!"
    if version = 2 then notice " " + chr$(13) + "You have no backup saved!"
    goto [GameStart]
end if
if version = 1 then confirm "Charger votre dernière partie?"; load$
if version = 2 then confirm "Load your last save?"; load$
if load$ = "no" and camp = 0 then goto [GameStart]
if load$ = "no" and camp = 1 then wait
load = 1

[loading1]
errorNOTICED = 0
on error goto [loadEND2]
achatdefITEM = 0
achatatkITEM = 0
open "data\id\Save";name$;".sao" for input as #save
input #save, name$
input #save, mdp$
input #save, MusicSELECT
input #save, systemSAV
input #save, version
input #save, langue$
input #save, LvlDONJON
input #save, campagne$
input #save, atk
input #save, def
input #save, pv
input #save, pm
input #save, money
input #save, pvTOTAL
input #save, pmTOTAL
input #save, lvl
input #save, xp
input #save, xpTOTAL
input #save, Agility
input #save, Strength
input #save, intelligence
input #save, PoP
input #save, PoS
input #save, nMax2
input #save, MAX2
input #save, lvlMAX2
input #save, nMax1
input #save, MAX1
input #save, lvlMAX1
input #save, nombreACHATitem
input #save, nombreACHATitemtota
input #save, nombreUPitem
input #save, nombreQUEST
input #save, nombreUPitemtota
input #save, nombreQUESTtota
input #save, nombreUPsac
input #save, nombreUTILparch
input #save, nombreDROPpotion
input #save, nombreUTILmedail
input #save, speakTOpnj
input #save, nombreUPsactota
input #save, nombreUTILparchtota
input #save, nombreDROPpotiontota
input #save, nombreUTILmedailtota
input #save, speakTOpnjtota
input #save, packQ1
input #save, packQ2
input #save, packQ3
input #save, packQ4
input #save, packQ5
input #save, Q1pack1
input #save, Q2pack1
input #save, Q3pack1
input #save, Q4pack1
input #save, Q5pack1
input #save, Q6pack1
input #save, Q1pack2
input #save, Q2pack2
input #save, Q3pack2
input #save, Q4pack2
input #save, Q5pack2
input #save, Q6pack2
input #save, Q1pack3
input #save, Q2pack3
input #save, Q3pack3
input #save, Q4pack3
input #save, Q5pack3
input #save, Q6pack3
input #save, Q1pack4
input #save, Q2pack4
input #save, Q3pack4
input #save, Q4pack4
input #save, Q5pack4
input #save, Q6pack4
input #save, Q1pack5
input #save, Q2pack5
input #save, Q3pack5
input #save, Q4pack5
input #save, Q5pack5
input #save, Q6pack5
input #save, packQ1tota
input #save, packQ2tota
input #save, packQ3tota
input #save, packQ4tota
input #save, packQ5tota
input #save, Q1pack1tota
input #save, Q2pack1tota
input #save, Q3pack1tota
input #save, Q4pack1tota
input #save, Q5pack1tota
input #save, Q6pack1tota
input #save, Q1pack2tota
input #save, Q2pack2tota
input #save, Q3pack2tota
input #save, Q4pack2tota
input #save, Q5pack2tota
input #save, Q6pack2tota
input #save, Q1pack3tota
input #save, Q2pack3tota
input #save, Q3pack3tota
input #save, Q4pack3tota
input #save, Q5pack3tota
input #save, Q6pack3tota
input #save, Q1pack4tota
input #save, Q2pack4tota
input #save, Q3pack4tota
input #save, Q4pack4tota
input #save, Q5pack4tota
input #save, Q6pack4tota
input #save, Q1pack5tota
input #save, Q2pack5tota
input #save, Q3pack5tota
input #save, Q4pack5tota
input #save, Q5pack5tota
input #save, Q6pack5tota
input #save, nombreACHATpop
input #save, nombreACHATpoptota
input #save, recompenseQ1
input #save, recompenseQ2
input #save, recompenseQ3
input #save, recompenseQ4
input #save, recompenseQ5
input #save, recompenseQ6
input #save, recompenseQ1a
input #save, recompenseQ2a
input #save, recompenseQ3a
input #save, recompenseQ4a
input #save, recompenseQ5a
input #save, recompenseQ6a
input #save, recompenseQ1b
input #save, recompenseQ2b
input #save, recompenseQ3b
input #save, recompenseQ4b
input #save, recompenseQ5b
input #save, recompenseQ6b
input #save, recompenseQ1c
input #save, recompenseQ2c
input #save, recompenseQ3c
input #save, recompenseQ4c
input #save, recompenseQ5c
input #save, recompenseQ6c
input #save, recompenseQ1d
input #save, recompenseQ2d
input #save, recompenseQ3d
input #save, recompenseQ4d
input #save, recompenseQ5d
input #save, recompenseQ6d
input #save, recompenseQ1tota
input #save, recompenseQ2tota
input #save, recompenseQ3tota
input #save, recompenseQ4tota
input #save, recompenseQ5tota
input #save, recompenseQ6tota
input #save, recompenseQ1atota
input #save, recompenseQ2atota
input #save, recompenseQ3atota
input #save, recompenseQ4atota
input #save, recompenseQ5atota
input #save, recompenseQ6atota
input #save, recompenseQ1btota
input #save, recompenseQ2btota
input #save, recompenseQ3btota
input #save, recompenseQ4btota
input #save, recompenseQ5btota
input #save, recompenseQ6btota
input #save, recompenseQ1ctota
input #save, recompenseQ2ctota
input #save, recompenseQ3ctota
input #save, recompenseQ4ctota
input #save, recompenseQ5ctota
input #save, recompenseQ6ctota
input #save, recompenseQ1dtota
input #save, recompenseQ2dtota
input #save, recompenseQ3dtota
input #save, recompenseQ4dtota
input #save, recompenseQ5dtota
input #save, recompenseQ6dtota
input #save, NombreKILLsangitota
input #save, VALRAKlifetota
input #save, nombrePLANTtuertota
input #save, nombreSQUEtuertota
input #save, nombreGOBtuertota
input #save, nombreARAtuertota
input #save, Qtavernetota
input #save, nombreOEUFphenixtota
input #save, phenixKILLEDtota
input #save, RoisDEScentaurestota
input #save, DonjonMaudittota
input #save, LvlDONJONmaudittota
input #save, NombreKILLsangi
input #save, VALRAKlife
input #save, nombrePLANTtuer
input #save, nombreSQUEtuer
input #save, nombreGOBtuer
input #save, nombreARAtuer
input #save, Qtaverne
input #save, nombreOEUFphenix
input #save, phenixKILLED
input #save, RoisDEScentaures
input #save, DonjonMaudit
input #save, LvlDONJONmaudit
'gosub [FLOOR]
input #save, nMax2tota
input #save, MAX2tota
input #save, lvlMAX2tota
input #save, nMax1tota
input #save, MAX1tota
input #save, lvlMAX1tota
input #save, NumberFLOORmonster
input #save, BOSS
input #save, RACE$
input #save, capacity$
input #save, lvlPASSIVE1
input #save, lvlPASSIVE2
input #save, lvlPASSIVE3
input #save, lvlPASSIVE4
input #save, lvlPASSIVE5
input #save, lvlPASSIVE6
input #save, lvlPASSIVE7
input #save, lvlPASSIVE8
input #save, lvlPASSIVE9
input #save, lvlPASSIVE10
input #save, lvlPASSIVE11
input #save, lvlPASSIVE12
input #save, lvlPASSIVE13
input #save, lvlPASSIVE14
input #save, lvlPASSIVE15
input #save, lvlPASSIVE16
input #save, lvlPASSIVE17
input #save, lvlPASSIVE18
input #save, lvlPASSIVE19
input #save, lvlPASSIVE20
input #save, lvlPASSIVE21
input #save, lvlPASSIVE22
input #save, lvlPASSIVE23
input #save, lvlPASSIVE24
input #save, BONUSatk
input #save, TYPEatkEQUIP$
input #save, BONUSdef
input #save, TYPEdefEQUIP$
input #save, lvlITEM1
input #save, lvlITEM2
input #save, PotionLittleHP
input #save, PotionMediumHP
input #save, PotionBigHP
input #save, sexe
input #save, BONUSgold
input #save, BONUSxp
input #save, PotionBig2HP
input #save, PotionBig3HP
input #save, lvlDONJONtota
input #save, PStota
input #save, PPtota
input #save, moneyTOTA
input #save, PARCHEMIN1tota
input #save, PARCHEMIN2tota
input #save, PARCHEMIN3tota
input #save, PARCHEMIN4tota
input #save, PARCHEMIN5tota
input #save, PARCHEMIN6tota
input #save, PARCHEMIN7tota
input #save, PotionLittleHPtota
input #save, PotionMediumHPtota
input #save, PotionBigHPtota
input #save, PotionBig2HPtota
input #save, PotionBig3HPtota
input #save, atktota
input #save, deftota
input #save, pvtota
input #save, pmtota
input #save, lvltota
input #save, xptota
input #save, xpTOTALtota
input #save, lvlITEM1tota
input #save, lvlITEM2tota
input #save, lvlPASSIVE1tota
input #save, lvlPASSIVE2tota
input #save, lvlPASSIVE3tota
input #save, lvlPASSIVE4tota
input #save, lvlPASSIVE5tota
input #save, lvlPASSIVE6tota
input #save, lvlPASSIVE7tota
input #save, lvlPASSIVE8tota
input #save, lvlPASSIVE9tota
input #save, lvlPASSIVE10tota
input #save, lvlPASSIVE11tota
input #save, lvlPASSIVE12tota
input #save, lvlPASSIVE13tota
input #save, lvlPASSIVE14tota
input #save, lvlPASSIVE15tota
input #save, lvlPASSIVE16tota
input #save, lvlPASSIVE17tota
input #save, lvlPASSIVE18tota
input #save, lvlPASSIVE19tota
input #save, lvlPASSIVE20tota
input #save, lvlPASSIVE21tota
input #save, lvlPASSIVE22tota
input #save, lvlPASSIVE23tota
input #save, lvlPASSIVE24tota
input #save, NumberFLOORmonstertota
input #save, Agilitytota
input #save, Strengthtota
input #save, intelligencetota
input #save, BONUSgoldtota
input #save, BONUSxptota
input #save, add1
input #save, add2
input #save, PARCHEMIN1
input #save, PARCHEMIN2
input #save, PARCHEMIN3
input #save, PARCHEMIN4
input #save, PARCHEMIN5
input #save, PARCHEMIN6
input #save, PARCHEMIN7
input #save, NombreEnnemiKILL
input #save, NombrePlayerKILL
input #save, NombreBossKILL
input #save, goldTOTAL
input #save, aDate$ 
input #save, MEDAILLE1
input #save, MEDAILLE2
input #save, MEDAILLE3
input #save, MEDAILLE4
input #save, MEDAILLE5
input #save, MEDAILLE6
input #save, MEDAILLE7
input #save, MEDAILLE8
input #save, MEDAILLE9
input #save, MEDAILLE10
input #save, MEDAILLE11
input #save, MEDAILLE12
input #save, MEDAILLE13
input #save, MEDAILLE14
input #save, MEDAILLE15
input #save, MEDAILLE16
input #save, MEDAILLE17
input #save, MEDAILLE18
input #save, MEDAILLE19
input #save, MEDAILLE20
input #save, MEDAILLE21
input #save, MEDAILLE22
input #save, MEDAILLE23
input #save, MEDAILLE24
input #save, FragmentJAUNE1
input #save, FragmentJAUNE2
input #save, FragmentJAUNE3
input #save, FragmentBLEU1
input #save, FragmentBLEU2
input #save, FragmentBLEU3
input #save, AIDEpnj1
input #save, AIDEpnj2
input #save, AIDEpnj3
input #save, compteurTIME
input #save, MEDAILLE1$
input #save, MEDAILLE2$
input #save, MEDAILLE3$
input #save, MEDAILLE4$
input #save, MEDAILLE5$
input #save, MEDAILLE6$
input #save, MEDAILLE7$
input #save, MEDAILLE8$
input #save, MEDAILLE9$
input #save, MEDAILLE10$
input #save, MEDAILLE11$
input #save, MEDAILLE12$
input #save, MEDAILLE13$
input #save, MEDAILLE14$
input #save, MEDAILLE15$
input #save, MEDAILLE16$
input #save, MEDAILLE17$
input #save, MEDAILLE18$
input #save, MEDAILLE19$
input #save, MEDAILLE20$
input #save, MEDAILLE21$
input #save, MEDAILLE22$
input #save, MEDAILLE23$
input #save, MEDAILLE24$
input #save, compteurPASSIVE13
input #save, compteurCLICK
input #save, caseITEM1
input #save, caseITEM2
input #save, caseITEM3
input #save, caseITEM4
input #save, caseITEM5
input #save, caseITEM6
input #save, caseITEM7
input #save, caseITEM8
input #save, caseITEM9
input #save, caseITEM10
input #save, caseITEM11
input #save, caseITEM12
input #save, case1TYPE
input #save, case2TYPE
input #save, case3TYPE
input #save, case4TYPE
input #save, case5TYPE
input #save, case6TYPE
input #save, case7TYPE
input #save, case8TYPE
input #save, case9TYPE
input #save, case10TYPE
input #save, case11TYPE
input #save, case12TYPE
input #save, case1TYPE$
input #save, case2TYPE$
input #save, case3TYPE$
input #save, case4TYPE$
input #save, case5TYPE$
input #save, case6TYPE$
input #save, case7TYPE$
input #save, case8TYPE$
input #save, case9TYPE$
input #save, case10TYPE$
input #save, case11TYPE$
input #save, case12TYPE$
CLOSE #save

bouclier = int(20+(9*lvlPASSIVE20*lvlPASSIVE20))

if MusicSELECT = 0 then gosub [stopMusic2]
if NombreKILLsangitota <> int(NombreKILLsangi+(pv+xp*3))then goto [loadEND2]
if VALRAKlifetota <> int(VALRAKlife+(pv+xp*5))then goto [loadEND2]
if nombrePLANTtuertota <> int(nombrePLANTtuer+(pv+xp*6))then goto [loadEND2]
if nombreSQUEtuertota <> int(nombreSQUEtuer+(pv+xp*11))then goto [loadEND2]
if nombreGOBtuertota <> int(nombreGOBtuer+(pv+xp*12))then goto [loadEND2]
if nombreARAtuertota <> int(nombreARAtuer+(pv+xp*2))then goto [loadEND2]
if Qtavernetota <> int(Qtaverne+(pv+xp*22))then goto [loadEND2]
if nombreOEUFphenixtota <> int(nombreOEUFphenix+(pv+xp*17))then goto [loadEND2]
if phenixKILLEDtota <> int(phenixKILLED+(pv+xp*16))then goto [loadEND2]
if RoisDEScentaurestota <> int(RoisDEScentaures+(pv+xp*19))then goto [loadEND2]
if DonjonMaudittota <> int(DonjonMaudit+(pv+xp*28))then goto [loadEND2]
if LvlDONJONmaudittota <> int(LvlDONJONmaudit+(pv+xp*33))then goto [loadEND2]
if recompenseQ1tota <> int(recompenseQ1+(pm*9)) then goto [loadEND2]
if recompenseQ2tota <> int(recompenseQ2+(pm*15)) then goto [loadEND2]
if recompenseQ3tota <> int(recompenseQ3+(pm*21)) then goto [loadEND2]
if recompenseQ4tota <> int(recompenseQ4+(pm*5)) then goto [loadEND2]
if recompenseQ5tota <> int(recompenseQ5+(pm*7)) then goto [loadEND2]
if recompenseQ6tota <> int(recompenseQ6+(pm*13)) then goto [loadEND2]
if recompenseQ1atota <> int(recompenseQ1a+(pm*22)) then goto [loadEND2]
if recompenseQ2atota <> int(recompenseQ2a+(pm*2)) then goto [loadEND2]
if recompenseQ3atota <> int(recompenseQ3a+(pm*4)) then goto [loadEND2]
if recompenseQ4atota <> int(recompenseQ4a+(pm*8)) then goto [loadEND2]
if recompenseQ5atota <> int(recompenseQ5a+(pm*9)) then goto [loadEND2]
if recompenseQ6atota <> int(recompenseQ6a+(pm*6)) then goto [loadEND2]
if recompenseQ1btota <> int(recompenseQ1b+(pm*7)) then goto [loadEND2]
if recompenseQ2btota <> int(recompenseQ2b+(pm*41)) then goto [loadEND2]
if recompenseQ3btota <> int(recompenseQ3b+(pm*18)) then goto [loadEND2]
if recompenseQ4btota <> int(recompenseQ4b+(pm*16)) then goto [loadEND2]
if recompenseQ5btota <> int(recompenseQ5b+(pm*21)) then goto [loadEND2]
if recompenseQ6btota <> int(recompenseQ6b+(pm*23)) then goto [loadEND2]
if recompenseQ1ctota <> int(recompenseQ1c+(pm*15)) then goto [loadEND2]
if recompenseQ2ctota <> int(recompenseQ2c+(pm*11)) then goto [loadEND2]
if recompenseQ3ctota <> int(recompenseQ3c+(pm*12)) then goto [loadEND2]
if recompenseQ4ctota <> int(recompenseQ4c+(pm*15)) then goto [loadEND2]
if recompenseQ5ctota <> int(recompenseQ5c+(pm*27)) then goto [loadEND2]
if recompenseQ6ctota <> int(recompenseQ6c+(pm*26)) then goto [loadEND2]
if recompenseQ1dtota <> int(recompenseQ1d+(pm*4)) then goto [loadEND2]
if recompenseQ2dtota <> int(recompenseQ2d+(pm*8)) then goto [loadEND2]
if recompenseQ3dtota <> int(recompenseQ3d+(pm*11)) then goto [loadEND2]
if recompenseQ4dtota <> int(recompenseQ4d+(pm*16)) then goto [loadEND2]
if recompenseQ5dtota <> int(recompenseQ5d+(pm*3)) then goto [loadEND2]
if recompenseQ6dtota <> int(recompenseQ6d+(pm*75)) then goto [loadEND2]
if nombreACHATpoptota <> int(nombreACHATpop+(pvTOTAL*17)) then goto [loadEND2]
if packQ1tota <> int(packQ1+(xp*7)) then goto [loadEND2]
if packQ2tota <> int(packQ2+(xp*3)) then goto [loadEND2]
if packQ3tota <> int(packQ3+(xp*5)) then goto [loadEND2]
if packQ4tota <> int(packQ4+(xp*8)) then goto [loadEND2]
if packQ5tota <> int(packQ5+(xp*4)) then goto [loadEND2]
if Q1pack1tota <> int(Q1pack1+(xp*2)) then goto [loadEND2]
if Q2pack1tota <> int(Q2pack1+(xp*3)) then goto [loadEND2]
if Q3pack1tota <> int(Q3pack1+(xp*5)) then goto [loadEND2]
if Q4pack1tota <> int(Q4pack1+(xp*9)) then goto [loadEND2]
if Q5pack1tota <> int(Q5pack1+(xp*7)) then goto [loadEND2]
if Q6pack1tota <> int(Q6pack1+(xp*6)) then goto [loadEND2]
if Q1pack2tota <> int(Q1pack2+(xp*8)) then goto [loadEND2]
if Q2pack2tota <> int(Q2pack2+(xp*5)) then goto [loadEND2]
if Q3pack2tota <> int(Q3pack2+(xp*2)) then goto [loadEND2]
if Q4pack2tota <> int(Q4pack2+(xp*3)) then goto [loadEND2]
if Q5pack2tota <> int(Q5pack2+(xp*5)) then goto [loadEND2]
if Q6pack2tota <> int(Q6pack2+(xp*6)) then goto [loadEND2]
if Q1pack3tota <> int(Q1pack3+(xp*5)) then goto [loadEND2]
if Q2pack3tota <> int(Q2pack3+(xp*2)) then goto [loadEND2]
if Q3pack3tota <> int(Q3pack3+(xp*3)) then goto [loadEND2]
if Q4pack3tota <> int(Q4pack3+(xp*6)) then goto [loadEND2]
if Q5pack3tota <> int(Q5pack3+(xp*8)) then goto [loadEND2]
if Q6pack3tota <> int(Q6pack3+(xp*4)) then goto [loadEND2]
if Q1pack4tota <> int(Q1pack4+(xp*2)) then goto [loadEND2]
if Q2pack4tota <> int(Q2pack4+(xp*8)) then goto [loadEND2]
if Q3pack4tota <> int(Q3pack4+(xp*4)) then goto [loadEND2]
if Q4pack4tota <> int(Q4pack4+(xp*7)) then goto [loadEND2]
if Q5pack4tota <> int(Q5pack4+(xp*3)) then goto [loadEND2]
if Q6pack4tota <> int(Q6pack4+(xp*6)) then goto [loadEND2]
if Q1pack5tota <> int(Q1pack5+(xp*4)) then goto [loadEND2]
if Q2pack5tota <> int(Q2pack5+(xp*7)) then goto [loadEND2]
if Q3pack5tota <> int(Q3pack5+(xp*2)) then goto [loadEND2]
if Q4pack5tota <> int(Q4pack5+(xp*5)) then goto [loadEND2]
if Q5pack5tota <> int(Q5pack5+(xp*6)) then goto [loadEND2]
if Q6pack5tota <> int(Q6pack5+(xp*3)) then goto [loadEND2]
if NumberFLOORmonstertota <> int((NumberFLOORmonster)+(xp+pv+lvl+pm)) then goto [loadEND2]
if nMax2tota <> int(nMax2+(pm*9)) then goto [loadEND2]
if MAX2tota <> int(MAX2+(xp+xpTOTAL)) then goto [loadEND2]
if lvlMAX2tota <> int(lvlMAX2+(xpTOTAL*6)) then goto [loadEND2]
if nMax1tota <> int(nMax1+(pv+pvTOTAL*3)) then goto [loadEND2]
if MAX1tota <> int(MAX1+(pvTOTAL*7)) then goto [loadEND2]
if lvlMAX1tota <> int(lvlMAX1+(Agility+intelligence*6)) then goto [loadEND2]
if nombreACHATitemtota <> int(nombreACHATitem+(xp+xp+pvTOTAL)) then goto [loadEND2]
if nombreUPitemtota <> int(nombreUPitem+(Agility+xp)) then goto [loadEND2]
if nombreQUESTtota <> int(nombreQUEST+(xp+intelligence*6)) then goto [loadEND2]
if nombreUPsactota <> int(nombreUPsac+(xp+intelligence*10)) then goto [loadEND2]
if nombreUTILparchtota <> int(nombreUTILparch+(xp+intelligence*6)) then goto [loadEND2]
if nombreDROPpotiontota <> int(nombreDROPpotion+(xp+intelligence*8)) then goto [loadEND2]
if nombreUTILmedailtota <> int(nombreUTILmedail+(xp+intelligence*4)) then goto [loadEND2]
if speakTOpnjtota <> int(speakTOpnj+(xp+intelligence*2)) then goto [loadEND2]
if lvlPASSIVE7tota <> int(lvlPASSIVE7+(lvl+pv)) then goto [loadEND2]
if lvlPASSIVE8tota <> int(lvlPASSIVE8+(xp*lvl)) then goto [loadEND2]
if lvlPASSIVE9tota <> int(lvlPASSIVE9+(lvl*pv)) then goto [loadEND2]
if lvlPASSIVE10tota <> int(lvlPASSIVE10+(xp+pv+lvl)) then goto [loadEND2]
if lvlPASSIVE11tota <> int(lvlPASSIVE11+(pm+pv+lvl)) then goto [loadEND2]
if lvlPASSIVE12tota <> int(lvlPASSIVE12+(pm+pv+pm)) then goto [loadEND2]
if BONUSgoldtota <> int(BONUSgold*6) then goto [loadEND2]
if BONUSxptota <> int(BONUSxp*3) then goto [loadEND2]
if PARCHEMIN1tota <> int(PARCHEMIN1+(lvlDONJONtota*7)) then goto [loadEND2]
if PARCHEMIN2tota <> int(PARCHEMIN2+(lvlDONJONtota*6)) then goto [loadEND2]
if PARCHEMIN3tota <> int(PARCHEMIN3+(lvlDONJONtota*5)) then goto [loadEND2]
if PARCHEMIN4tota <> int(PARCHEMIN4+(lvlDONJONtota*4)) then goto [loadEND2]
if PARCHEMIN5tota <> int(PARCHEMIN5+(lvlDONJONtota*3)) then goto [loadEND2]
if PARCHEMIN6tota <> int(PARCHEMIN6+(lvlDONJONtota*2)) then goto [loadEND2]
if PARCHEMIN7tota <> int(PARCHEMIN7+(lvlDONJONtota)) then goto [loadEND2]
if PotionLittleHPtota <> int(PotionLittleHP+(def+pv)*2) then goto [loadEND2]
if PotionMediumHPtota <> int(PotionMediumHP+(def+pv)*4) then goto [loadEND2]
if PotionBigHPtota <> int(PotionBigHP+(def+pv)*8) then goto [loadEND2]
if PotionBig2HPtota <> int(PotionBig2HP+(def+pv)*16) then goto [loadEND2]
if PotionBig3HPtota <> int(PotionBig3HP+(def+pv)*32) then goto [loadEND2]
if atktota <> int(atk+(pv+atk)) then goto [loadEND2]
if deftota <> int(def+(pv+xp)) then goto [loadEND2]
if pvtota <> int(pv+(xp+atk)) then goto [loadEND2]
if pmtota <> int(pm+(pv+lvl)) then goto [loadEND2]
if lvltota <> int(lvl+(lvl+atk)) then goto [loadEND2]
if xptota <> int(xp+(xp+lvl)) then goto [loadEND2]
if xpTOTALtota <> int(xpTOTAL+(def+lvl)) then goto [loadEND2]
if lvlITEM1tota <> int(lvlITEM1+(xp+def)) then goto [loadEND2]
if lvlITEM2tota <> int(lvlITEM2+(xp+atk)) then goto [loadEND2]
if lvlPASSIVE1tota <> int(lvlPASSIVE1+(pm+atk)) then goto [loadEND2]
if lvlPASSIVE2tota <> int(lvlPASSIVE2+(xp+pm)) then goto [loadEND2]
if lvlPASSIVE3tota <> int(lvlPASSIVE3+(xp+lvl)) then goto [loadEND2]
if lvlPASSIVE4tota <> int(lvlPASSIVE4+(def+pm)) then goto [loadEND2]
if lvlPASSIVE5tota <> int(lvlPASSIVE5+(pm+pv)) then goto [loadEND2]
if lvlPASSIVE6tota <> int(lvlPASSIVE6+(xp+pv)) then goto [loadEND2]
if Agilitytota <> int(Agility+(pv+6)) then goto [loadEND2]
if Strengthtota <> int(Strength+(xp+3)) then goto [loadEND2]
if intelligencetota <> int(intelligence+(pm+1)) then goto [loadEND2]
if lvlDONJONtota <> int(LvlDONJON*3) then goto [loadEND2]
if PStota <> int(lvl*5+add1) then goto [loadEND2]
if PPtota <> int(lvl*5+add2) then goto [loadEND2]
if moneyTOTA <> int(money*12) then goto [loadEND2]

close #main
goto [GameStartMAIN2]

[loading2]
version = 1
langue$ = "Français"
on error goto [loading2END]
open "data\id\Save";name$;".sao" for input as #save
input #save, name$
input #save, mdp$
input #save, MusicSELECT
input #save, version
input #save, langue$
CLOSE #save
[loading2END]
return


    [MusicSELECT]
    if MusicSELECT = 1 then
        MusicSELECT = 0
        gosub [stopMusic2]
        goto [refreshSONGtxt]
    end if
    MusicSELECT = 1
    gosub [startMusic]
    goto [refreshSONGtxt]
    [stopMusic]
    MusicSELECT = 0
    gosub [stopMusic2]
    [refreshSONGtxt]
    wait


[quit]
if tavernDIAL = 1 then close #tavernDIAL
if UPdown = 1 then close #UPdown
gosub [stopMusic2]
close #main

open "data\id\time.sao" for output as #save
print #save, 0
print #save, 0
CLOSE #save

end


[startMusic]
    mus$ = "data\sons\main.mp3" ' GetShortPathName$(mus$)
    ext$ = upper$(right$(mus$,3))
    mp3$ = "open "+mus$+" type MpegVideo alias fictoplay"
    mid$ = "open "+mus$+" type sequencer alias fictoplay"
    if ext$ = "MID" then a$ = mid$ else a$ = mp3$
    calldll #winmm,"mciSendStringA",a$ as ptr,_
        i1 as ulong,_
        i2 as long,_
        i3 as long,_
        r as long
    a$="play fictoplay"
    calldll #winmm,"mciSendStringA",_
        a$ as ptr,_
        i1 as ulong,_
        i2 as long,_
        i3 as long,_
        r as long
    return

[stopMusic2]
    a$="close fictoplay"
    calldll #winmm,"mciSendStringA",_
        a$ as ptr,_
        i1 as ulong,_
        i2 as long,_
        i3 as long,_
        r as long
    return

'aDate$= date$("mm/dd/yyyy")



'fonctions ----------------------------------


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

Function GetShortPathName$(lPath$)
    lPath$=lPath$+Chr$(0)
    sPath$=Space$(256)
    lenPath=Len(sPath$)
    CallDLL #kernel32, "GetShortPathNameA",lPath$ As ptr,_
    sPath$ As ptr,lenPath As long,r As long
    GetShortPathName$=Left$(sPath$,r)
End Function

