Frame 1
MochiAd.showPreGameAd({id:"87f955b6db74b8f2", res:"655x482"});
Frame 2
stop();
Instance of Symbol 107 MovieClip in Frame 2
onClipEvent (load) {
if (_root.getBytesTotal() < 1000) {
this.filesize = Math.floor(_root.getBytesTotal()) + " bytes";
} else if (_root.getBytesTotal() > 1000000) {
this.filesize = Math.floor(_root.getBytesTotal() / 1000000) + " mb";
} else {
this.filesize = Math.floor(_root.getBytesTotal() / 1000) + " kb";
}
}
onClipEvent (enterFrame) {
this.pourcentage = (Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%") + " du chargement du jeu";
fini = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (fini == 100) {
_root.play();
}
}
Frame 3
stop();
Frame 4
var perso = new Array();
var maisonA = new batiment("maison1", 55, 55);
var maisonB = new batiment("maison2", 55, 55);
var maisonC = new batiment("maison3", 55, 55);
var ferme = new batiment("ferme", 30, 30);
var bat_terre = new batiment("terre", 60, 20);
var bat_bois = new batiment("bois", 20, 60);
var bat_inactif = new batiment("inactif", 0, 0);
var bat_prier = new batiment("prier", 0, 0);
vitesseC = 200;
_root.vitesse_metier = 3000;
_root["vitesse_ann\u00E9e"] = 35000;
_root.V_deplacement = 20;
_root.nourriture = 60;
_root.nourritureM = 100;
_root.bois = 55;
_root.boisM = 100;
_root.terre = 55;
_root.terreM = 100;
_root.divin = 5;
_root.bonus_recolte = 0;
_root.bonus_vitesse = 0;
_root.bonus_vie = 0;
_root.habitantsM = 3;
_root.habitants = 0;
_root.viemax = 60;
_root.annee = 100;
_root.cheat = 0;
_root.fin = 0;
Frame 7
function affiche_score() {
_root.bois_info = (_root.bois + "/") + _root.boisM;
_root.nourriture_info = (_root.nourriture + "/") + _root.nourritureM;
_root.terre_info = (_root.terre + "/") + _root.terreM;
_root.fer_info = (_root.fer + "/") + _root.ferM;
_root.gold_info = (_root.gold + "/") + _root.goldM;
_root.gemmes_info = (_root.gemmes + "/") + _root.gemmes;
_root.habitants_info = (_root.habitants + "/") + _root.habitantsM;
}
function newperso(nom, ages, sexe, metier) {
n = _root.perso.length;
if (nom == "") {
nom = nom_random(sexe);
}
profondeur = _root.emplacement.getDepth() + 1;
trace(profondeur);
if (sexe == "F") {
_root.perso[n] = _root.attachMovie("persoF", "persoF" + n, profondeur + n);
_root.perso[n].nom = nom;
} else {
_root.perso[n] = _root.attachMovie("persoM", "persoM" + n, profondeur + n);
_root.perso[n].nom = nom;
}
_root.perso[n]._y = _root.zones.inactif._y;
placement = _root.bat_inactif.ajout_perso(n, _root.perso[n].nom);
_root.perso[n]._x = (_root.zones.inactif._x + ((placement - 1) * 18)) - 5;
if (placement > 15) {
_root.perso[n]._y = _root.perso[n]._y + 40;
_root.perso[n]._x = _root.perso[n]._x - 270;
}
if (ages < 16) {
_root.perso[n].type_perso.gotoAndStop("petit");
} else {
_root.perso[n].type_perso.gotoAndStop(random(4) + 1);
}
_root.perso[n].ages = ages;
_root.perso[n].sexe = sexe;
_root.perso[n].metier = metier;
_root.perso[n].sante = 100;
_root.perso[n].niveauMetier = [1, 1, 1, 1];
_root.perso[n].dead = 0;
_root.habitants = _root.habitants + 1;
affiche_score();
trace("TAILLE" + _root.perso.length);
}
function up_metier(metier, idperso, bonus) {
n = idperso;
if (metier == "bucheron") {
_root.perso[n].niveauMetier[0] = _root.perso[n].niveauMetier[0] + bonus;
}
if (metier == "fermier") {
_root.perso[n].niveauMetier[1] = _root.perso[n].niveauMetier[1] + bonus;
}
if (metier == "pierre") {
_root.perso[n].niveauMetier[2] = _root.perso[n].niveauMetier[2] + bonus;
}
if (metier == "prier") {
_root.perso[n].niveauMetier[3] = _root.perso[n].niveauMetier[3] + bonus;
}
if (metier == "all") {
_root.perso[n].niveauMetier[0] = _root.perso[n].niveauMetier[0] + bonus;
_root.perso[n].niveauMetier[1] = _root.perso[n].niveauMetier[1] + bonus;
_root.perso[n].niveauMetier[2] = _root.perso[n].niveauMetier[2] + bonus;
_root.perso[n].niveauMetier[3] = _root.perso[n].niveauMetier[3] + bonus;
}
}
function start_metier(metier, idperso) {
clearInterval(_root.perso[idperso].metier_interval);
if (metier == "inactif") {
clearInterval(_root.perso[idperso].metier_interval);
} else {
_root.perso[idperso].metier_interval = setInterval(_root.metier_action, _root.vitesse_metier, idperso, metier);
}
}
function metier_action(idperso, metier) {
trace("METIER ACTION :" + metier);
if ((metier == "bucheron") && ((random(150) + _root.perso[idperso].niveauMetier[0]) > 100)) {
if (_root.bois < _root.boisM) {
ress_gagner = 1 + random((Math.ceil(_root.perso[idperso].niveauMetier[1] / 10) + _root.bonus_recolte) + _root.bat_bois.niveau);
_root.perso[idperso].gotoAndPlay("plus1");
_root.perso[idperso].recolte = "+" + ress_gagner;
_root.bois = _root.bois + ress_gagner;
affiche_score();
if ((random(100) > 50) && (_root.perso[idperso].niveauMetier[0] < 100)) {
_root.perso[idperso].niveauMetier[0] = _root.perso[idperso].niveauMetier[0] + 1;
}
} else {
first_moveperso(idperso, "inactif");
}
} else if ((metier == "fermier") && ((random(150) + _root.perso[idperso].niveauMetier[1]) > 100)) {
if (_root.nourriture < _root.nourritureM) {
ress_gagner = 1 + random((Math.ceil(_root.perso[idperso].niveauMetier[1] / 10) + _root.bonus_recolte) + _root.ferme.niveau);
_root.nourriture = _root.nourriture + ress_gagner;
_root.perso[idperso].gotoAndPlay("plus1");
_root.perso[idperso].recolte = "+" + ress_gagner;
affiche_score();
if ((random(100) > 50) && (_root.perso[idperso].niveauMetier[1] < 100)) {
_root.perso[idperso].niveauMetier[1] = _root.perso[idperso].niveauMetier[1] + 1;
}
} else {
first_moveperso(idperso, "inactif");
}
} else if ((metier == "terre") && ((random(150) + _root.perso[idperso].niveauMetier[2]) > 100)) {
if (_root.terre < _root.terreM) {
ress_gagner = 1 + random((Math.ceil(_root.perso[idperso].niveauMetier[1] / 10) + _root.bonus_recolte) + _root.bat_terre.niveau);
_root.terre = _root.terre + ress_gagner;
_root.perso[idperso].gotoAndPlay("plus1");
_root.perso[idperso].recolte = "+" + ress_gagner;
affiche_score();
if ((random(100) > 50) && (_root.perso[idperso].niveauMetier[2] < 100)) {
_root.perso[idperso].niveauMetier[2] = _root.perso[idperso].niveauMetier[2] + 1;
}
} else {
first_moveperso(idperso, "inactif");
}
}
}
function prier() {
ma_str = new String(_root.annee);
val = Number(ma_str.slice(2));
_root.divin = _root.divin + _root.bat_prier.persoliveid();
id = random(_root.perso.length);
if ((((val == 0) or (val == 3)) or (val == 6)) && (_root.perso[id].dead == 0)) {
trace((Math.ceil(_root.habitants / 6) + "length prier :") + _root.bat_prier.persoliveid());
if (Math.ceil(_root.habitants / 6) > _root.bat_prier.persoliveid()) {
if (random(50) > 25) {
_root.fleaux._x = _root.perso[id]._x - 10;
_root.fleaux._y = _root.perso[id]._y + 10;
_root.fleaux.gotoAndPlay("eclair");
_root.perso[id].sante = _root.perso[id].sante - (random(60) + 20);
} else {
_root.fleaux._x = _root.perso[id]._x - 20;
_root.fleaux._y = _root.perso[id]._y;
_root.fleaux.gotoAndPlay("noir");
_root.perso[id].sante = _root.perso[id].sante - (random(20) + 20);
_root.perso[id].type_perso.gotoAndStop("fantome");
}
}
}
}
function plus1ans() {
_root.annee = _root.annee + 1;
prier();
if (((_root.habitants == 30) and (_root.cheat == 0)) and (_root.fin == 0)) {
_root.fin = 1;
theend.gotoAndPlay(2);
}
consommation = 0;
_root.info = "";
i = 0;
while (i <= _root.perso.length) {
if (_root.perso[i].dead == 0) {
_root.perso[i].ages = _root.perso[i].ages + 1;
if (_root.perso[i].ages < 17) {
trace("PREADULTE:" + _root.perso[i].ages);
_root.perso[i].ages = _root.perso[i].ages + 1;
trace("PREADULTE2:" + _root.perso[i].ages);
if (_root.perso[i].ages >= 15) {
trace("ADULTE:" + _root.perso[i].ages);
newname = random(4) + 1;
_root.perso[i].type_perso.gotoAndStop(newname);
}
}
if ((_root.perso[i].sexe == "M") && (_root.nourriture >= 4)) {
_root.perso[i].ages = _root.perso[i].ages + 1;
_root.nourriture = _root.nourriture - 2;
consommation = consommation + 2;
if ((_root.perso[i].sante < 95) && (_root.perso[i].metier == "inactif")) {
_root.perso[i].sante = _root.perso[i].sante + 10;
}
} else if ((_root.perso[i].sexe == "F") && (_root.nourriture >= 2)) {
_root.perso[i].ages = _root.perso[i].ages + 1;
_root.nourriture = _root.nourriture - 1;
consommation = consommation + 1;
if ((_root.perso[i].sante < 95) && (_root.perso[i].metier == "inactif")) {
_root.perso[i].sante = _root.perso[i].sante + 10;
}
} else {
_root.perso[i].sante = _root.perso[i].sante - 25;
if (_root.perso[i].sante < 1) {
_root.dead(i);
} else {
_root.perso[i].gotoAndPlay("nourriture");
_root.info = _root.info + (("\n Warning " + _root.perso[i].nom) + " is sick!");
}
}
if (((_root.perso[i].ages > _root.viemax) && (_root.perso[i].sante > 0)) && (random(100) < _root.perso[i].ages)) {
_root.dead(i);
trace("DADEAD");
} else if ((_root.perso[i].ages > (_root.viemax - 5)) or (_root.perso[i].sante < 30)) {
_root.perso[i].gotoAndPlay("avant_dead");
if (_root.perso[i].sante < 1) {
_root.dead(i);
}
}
}
i++;
}
_root.info = _root.info + ("\n Your peasants food consomation is : " + consommation);
if (_root.nourriture < 20) {
_root.info = _root.info + " \n WARNING! You need more food!";
}
affiche_score();
}
function nom_random(sexe) {
if (sexe == "F") {
nom = ["Sophie", "Cindy", "Pam", "Pamy", "Lara", "Candy", "Moon", "Anna", "Nami", "Nina", "bulma"];
} else {
nom = ["Chopper", "Luffy", "John", "Tom", "Actarus", "Malcolm", "Bal", "Lucius", "Carlos", "Doug"];
}
return((nom[random(nom.length)] + " ") + random(100));
}
function b\u00E9b\u00E9() {
_root.nourriture = _root.nourriture - 30;
quel_sexe = random(100);
if (quel_sexe > 55) {
newperso(nom_random("F"), 1, "F", "inactif");
} else {
newperso(nom_random("M"), 1, "M", "inactif");
}
}
Frame 8
function Newpartie() {
newperso("", 25, "M", "inactif");
newperso("", 24, "M", "inactif");
newperso("", 16, "F", "inactif");
up_metier("all", 0, 30);
up_metier("all", 1, 30);
up_metier("all", 2, 30);
affiche_score();
_root.evolution = setInterval(_root.plus1ans, _root["vitesse_ann\u00E9e"]);
_root.ferme.ajoute_outil(2);
}
function dead(i) {
if (_root.perso[i].dead == 0) {
_root.perso[i].gotoAndStop(1);
_root.ferme.sup_perso(i);
_root.bat_inactif.sup_perso(i);
_root.bat_terre.sup_perso(i);
_root.bat_bois.sup_perso(i);
_root.bat_prier.sup_perso(i);
_root.perso[i].dead = 1;
_root.perso[i].sante = 0;
clearInterval(_root.perso[i].metier_interval);
_root.perso[i].gotoAndPlay("dead");
_root.habitants = _root.habitants - 1;
affiche_score();
}
}
function first_moveperso(idperso, metierx) {
trace("metier=" + _root.perso[idperso].metier);
if (_root.perso[idperso].metier == "bucheron") {
_root.perso[idperso]._y = _root.zones.bois._y;
}
start_metier("inactif", idperso);
_root.ferme.sup_perso(idperso);
_root.bat_inactif.sup_perso(idperso);
_root.bat_terre.sup_perso(idperso);
_root.bat_bois.sup_perso(idperso);
_root.bat_prier.sup_perso(idperso);
_root.perso[idperso].metier = metierx;
_root.perso[idperso].etape = 0;
clearInterval(_root.perso[idperso].deplacement);
_root.perso[idperso].deplacement = setInterval(_root.moveperso, _root.V_deplacement, idperso, metierx);
}
function moveperso(idperso, metier) {
_root.perso[idperso].gotoAndStop(2);
vx = _root.zones.route._x;
vy = _root.zones.route._y;
if (_root.perso[idperso].etape == 0) {
persox = _root.perso[idperso]._x;
if (persox < vx) {
_root.perso[idperso]._x = _root.perso[idperso]._x + 1;
mouvement_direction(idperso, "droite");
} else if (persox > (vx + 5)) {
_root.perso[idperso]._x = _root.perso[idperso]._x - 1;
mouvement_direction(idperso, "gauche");
} else {
_root.perso[idperso].etape = 1;
}
}
if (_root.perso[idperso].etape == 1) {
if (metier == "bucheron") {
_root.perso[idperso].ciblex = _root.zones.bois._x;
_root.perso[idperso].cibley = _root.zones.bois._y;
}
if (metier == "fermier") {
_root.perso[idperso].ciblex = _root.zones.fermier._x;
_root.perso[idperso].cibley = _root.zones.fermier._y;
}
if (metier == "inactif") {
_root.perso[idperso].ciblex = _root.zones.inactif._x;
_root.perso[idperso].cibley = _root.zones.inactif._y;
}
if (metier == "terre") {
_root.perso[idperso].ciblex = _root.zones.terre._x;
_root.perso[idperso].cibley = _root.zones.terre._y;
}
if (metier == "fruits") {
_root.perso[idperso].ciblex = _root.zones.fruits._x;
_root.perso[idperso].cibley = _root.zones.fruits._y;
}
if (metier == "prier") {
_root.perso[idperso].ciblex = _root.zones.prier._x;
_root.perso[idperso].cibley = _root.zones.prier._y;
}
if (_root.perso[idperso].cibley > (perso[idperso]._y + 5)) {
_root.perso[idperso]._y = _root.perso[idperso]._y + 1;
mouvement_direction(idperso, "bas");
} else if (_root.perso[idperso].cibley < perso[idperso]._y) {
_root.perso[idperso]._y = _root.perso[idperso]._y - 1;
mouvement_direction(idperso, "haut");
} else {
_root.perso[idperso].etape = 2;
}
}
if (_root.perso[idperso].etape == 2) {
if (_root.perso[idperso].ciblex > (perso[idperso]._x + 5)) {
_root.perso[idperso]._x = _root.perso[idperso]._x + 1;
mouvement_direction(idperso, "droite");
} else if (_root.perso[idperso].ciblex < perso[idperso]._x) {
_root.perso[idperso]._x = _root.perso[idperso]._x - 1;
mouvement_direction(idperso, "gauche");
} else {
mouvement_direction(idperso, 1);
_root.perso[idperso].etape = 0;
clearInterval(_root.perso[idperso].deplacement);
if (_root.perso[idperso].dead == 1) {
_root.perso[idperso].gotoAndPlay("dead");
} else if (metier == "bucheron") {
if (_root.bat_bois.persoliveid() < _root.bat_bois.outils) {
_root.perso[idperso].type_perso.direction_perso.gotoAndStop("gauche");
_root.perso[idperso].gotoAndPlay("bois");
_root.start_metier("bucheron", idperso);
placementperso = bat_bois.ajout_perso(idperso, _root.perso[idperso].nom) - 1;
_root.perso[idperso]._y = _root.perso[idperso]._y - ((15 * placementperso) - 40);
_root.perso[idperso].swapDepths(-placementperso);
} else {
first_moveperso(idperso, "inactif");
_root.info = "\n Not enough tools for wood ";
}
} else if ((metier == "fermier") or (metier == "fruits")) {
if (_root.ferme.persoliveid() < _root.ferme.outils) {
_root.perso[idperso].gotoAndPlay("coupe_bois");
_root.start_metier("fermier", idperso);
if (metier == "fruits") {
_root.perso[idperso].gotoAndPlay("fruits");
_root.perso[idperso]._x = _root.perso[idperso]._x + random(130);
_root.perso[idperso]._y = _root.perso[idperso]._y + (random(20) - random(20));
ferme.ajout_perso(idperso, _root.perso[idperso].nom);
} else {
_root.perso[idperso]._y = _root.perso[idperso]._y + (random(20) - random(20));
_root.perso[idperso]._x = _root.perso[idperso]._x + (20 * (ferme.ajout_perso(idperso, _root.perso[idperso].nom) - 1));
}
} else {
first_moveperso(idperso, "inactif");
_root.info = _root.info + "\n Not enough tools for farm";
}
} else if (metier == "terre") {
if (_root.bat_terre.persoliveid() < _root.bat_terre.outils) {
_root.perso[idperso].gotoAndPlay("coupe_bois");
_root.start_metier("terre", idperso);
_root.perso[idperso]._x = _root.perso[idperso]._x + (20 * (bat_terre.ajout_perso(idperso, _root.perso[idperso].nom) - 1));
} else {
first_moveperso(idperso, "inactif");
_root.info = _root.info + "\n Not enough tools for stone";
}
} else if (metier == "prier") {
if (_root.bat_prier.persoliveid() < 7) {
_root.perso[idperso].type_perso.direction_perso.gotoAndStop("gauche");
_root.perso[idperso].gotoAndStop("prier");
_root.perso[idperso]._x = _root.perso[idperso]._x + (20 * (bat_prier.ajout_perso(idperso, _root.perso[idperso].nom) - 1));
_root.perso[idperso]._y = _root.perso[idperso]._y + (random(10) - random(10));
} else {
first_moveperso(idperso, "inactif");
_root.info = _root.info + "\n You have the maximum prayers possible!";
}
trace("Nbres prier" + _root.bat_prier.persoliveid());
} else if (metier == "inactif") {
_root.perso[idperso].gotoAndPlay(1);
_root.start_metier("inactif", idperso);
_root.perso[idperso]._y = _root.zones.inactif._y;
placement = _root.bat_inactif.ajout_perso(idperso, _root.perso[idperso].nom);
_root.perso[idperso]._x = (_root.zones.inactif._x + ((placement - 1) * 18)) - 5;
if (placement > 15) {
_root.perso[idperso]._y = _root.perso[idperso]._y + 40;
_root.perso[idperso]._x = _root.perso[idperso]._x - 270;
}
}
}
}
}
function mouvement_direction(idperso, la_direction) {
if (_root.perso[idperso].la_direction != la_direction) {
trace((idperso + " ") + la_direction);
_root.perso[idperso].type_perso.direction_perso.gotoAndPlay(la_direction);
_root.perso[idperso].la_direction = la_direction;
}
}
stop();
_root.maisonA.decor = _root.emplacement.maison1;
_root.maisonB.decor = _root.emplacement.maison2;
_root.maisonC.decor = _root.emplacement.maison3;
_root.ferme.decor = _root.emplacement.ferme;
_root.bat_terre.decor = _root.emplacement.terre;
_root.bat_bois.decor = _root.emplacement.bois;
_root.bat_inactif.decor = _root.emplacement.inactif;
Newpartie();
Instance of Symbol 100 MovieClip [persoM] "persoM" in Frame 8
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 55 MovieClip [persoF] "persoF" in Frame 8
onClipEvent (load) {
this._visible = false;
}
Symbol 13 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 10
gotoAndPlay ("bas");
Symbol 13 MovieClip Frame 20
gotoAndPlay ("gauche");
Symbol 13 MovieClip Frame 29
gotoAndPlay ("haut");
Symbol 13 MovieClip Frame 39
gotoAndPlay ("droite");
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 10
gotoAndPlay ("bas");
Symbol 25 MovieClip Frame 20
gotoAndPlay ("gauche");
Symbol 25 MovieClip Frame 29
gotoAndPlay ("haut");
Symbol 25 MovieClip Frame 39
gotoAndPlay ("droite");
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 11
gotoAndPlay ("bas");
Symbol 38 MovieClip Frame 21
gotoAndPlay ("gauche");
Symbol 38 MovieClip Frame 30
gotoAndPlay ("haut");
Symbol 38 MovieClip Frame 40
gotoAndPlay ("droite");
Symbol 39 MovieClip Frame 1
stop();
Symbol 55 MovieClip [persoF] Frame 1
stop();
Instance of Symbol 39 MovieClip "type_perso" in Symbol 55 MovieClip [persoF] Frame 1
on (release) {
ma_str = new String(this._parent);
_root.idselection = ma_str.slice(14);
trace(_root.idselection);
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("metierF");
}
Symbol 55 MovieClip [persoF] Frame 16
this.gotoAndPlay("coupe_bois");
Symbol 55 MovieClip [persoF] Frame 27
if (this.dead == 1) {
gotoAndPlay ("dead");
} else if (this.metier == "fruits") {
gotoAndStop ("fruits");
} else {
gotoAndPlay ("coupe_bois");
}
Symbol 55 MovieClip [persoF] Frame 56
gotoAndStop (1);
Symbol 55 MovieClip [persoF] Frame 67
stop();
Symbol 55 MovieClip [persoF] Frame 103
gotoAndStop (1);
Instance of Symbol 52 MovieClip in Symbol 55 MovieClip [persoF] Frame 104
on (release) {
ma_str = new String(this._parent);
_root.idselection = ma_str.slice(14);
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("perso");
}
Symbol 55 MovieClip [persoF] Frame 145
stop();
this._visible = 0;
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 11
gotoAndPlay ("bas");
Symbol 67 MovieClip Frame 21
gotoAndPlay ("gauche");
Symbol 67 MovieClip Frame 30
gotoAndPlay ("haut");
Symbol 67 MovieClip Frame 40
gotoAndPlay ("droite");
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 11
gotoAndPlay ("bas");
Symbol 80 MovieClip Frame 21
gotoAndPlay ("gauche");
Symbol 80 MovieClip Frame 30
gotoAndPlay ("haut");
Symbol 80 MovieClip Frame 40
gotoAndPlay ("droite");
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 11
gotoAndPlay ("bas");
Symbol 92 MovieClip Frame 21
gotoAndPlay ("gauche");
Symbol 92 MovieClip Frame 30
gotoAndPlay ("haut");
Symbol 92 MovieClip Frame 40
gotoAndPlay ("droite");
Symbol 94 MovieClip Frame 1
stop();
Symbol 100 MovieClip [persoM] Frame 1
if (this.dead == 1) {
gotoAndPlay ("dead");
}
Instance of Symbol 94 MovieClip "type_perso" in Symbol 100 MovieClip [persoM] Frame 1
on (release) {
ma_str = new String(this._parent);
_root.idselection = ma_str.slice(14);
trace(_root.idselection);
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("metier");
}
Symbol 100 MovieClip [persoM] Frame 5
stop();
Symbol 100 MovieClip [persoM] Frame 17
this.gotoAndPlay("coupe_bois");
if (this.dead == 1) {
gotoAndPlay ("dead");
}
Symbol 100 MovieClip [persoM] Frame 28
if (this.dead == 1) {
gotoAndPlay ("dead");
} else if (this.metier == "bucheron") {
gotoAndPlay ("bois");
} else {
gotoAndPlay ("coupe_bois");
}
Symbol 100 MovieClip [persoM] Frame 58
gotoAndStop (1);
Symbol 100 MovieClip [persoM] Frame 73
gotoAndPlay ("bois");
if (this.dead == 1) {
gotoAndPlay ("dead");
}
Symbol 100 MovieClip [persoM] Frame 105
gotoAndStop (1);
Instance of Symbol 52 MovieClip in Symbol 100 MovieClip [persoM] Frame 106
on (release) {
ma_str = new String(this._parent);
_root.idselection = ma_str.slice(14);
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("perso");
}
Symbol 100 MovieClip [persoM] Frame 170
stop();
this._visible = 0;
Symbol 536 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 537 MovieClip [__Packages.batiment] Frame 0
class batiment
{
var nom, decor;
function batiment (nomA, boiso, terreo, fero, goldo, gemmeo) {
nom = nomA;
bois = boiso;
terre = terreo;
fer = fero;
gold = goldo;
gemme = gemmeo;
personom_in = [];
persoid_in = [];
}
function changenom(noma) {
nom = noma;
}
function ajout_perso(nomid, noma) {
var _local3 = 0;
var _local2 = 0;
while (_local2 <= (persoid_in.length - 1)) {
trace("0==" + persoid_in[_local2]);
if (persoid_in[_local2] == -1) {
persoid_in[_local2] = nomid;
personom_in[_local2] = noma;
trace("Invert");
_local3 = 1;
return(_local2 + 1);
}
_local2++;
}
if (_local3 == 0) {
persoid_in.push(nomid);
personom_in.push(noma);
return(persoid_in.length);
}
}
function ajoute_outil(fois) {
outils = outils + fois;
trace("longeur " + outils);
}
function sup_perso(nomid) {
var _local2 = 0;
while (_local2 <= (persoid_in.length - 1)) {
if (nomid == persoid_in[_local2]) {
persoid_in[_local2] = -1;
personom_in[_local2] = undefined;
}
_local2++;
}
trace((personom_in + " ") + persoid_in);
}
function persolive() {
var _local3 = "";
var _local2 = 0;
while (_local2 <= (persoid_in.length - 1)) {
if (undefined == personom_in[_local2]) {
} else {
_local3 = _local3 + (" " + personom_in[_local2]);
}
_local2++;
}
return(_local3);
}
function persoliveid() {
var _local3 = 0;
var _local2 = 0;
while (_local2 <= (persoid_in.length - 1)) {
if (undefined == personom_in[_local2]) {
} else {
_local3 = _local3 + 1;
}
_local2++;
}
return(_local3);
}
function lvlup_maison() {
trace("up " + nom);
building = 0;
niveau = niveau + 1;
bois = bois * 2;
terre = terre * 2;
decor.nextFrame();
if (nom.slice(0, 3) == "mai") {
_root.habitantsM = _root.habitantsM + 3;
}
if (nom.slice(0, 3) == "fer") {
_root.nourritureM = _root.nourritureM + 50;
}
if (nom.slice(0, 3) == "boi") {
_root.boisM = _root.boisM + 50;
terre = terre - (niveau * 11);
}
if (nom.slice(0, 3) == "ter") {
_root.terreM = _root.terreM + 50;
bois = bois - (niveau * 11);
}
_root.affiche_score();
}
function lvlup_special() {
bois = bois * 2;
terre = bois * 2;
fer = (fer * 2) + 50;
gold = (gold * 2) + 50;
gemme = (gemme * 2) + 50;
}
function prix_terre() {
return(terre);
}
function building_maison(maison_pr_repere) {
trace("pourcentage?" + maison_pr_repere.building);
maison_pr_repere.building = maison_pr_repere.building + 1;
maison_pr_repere.decor.build = maison_pr_repere.building;
if (maison_pr_repere.building > 99) {
maison_pr_repere.lvlup_maison();
clearInterval(maison_pr_repere.timing);
}
}
function first_build(maison_pr_repere) {
decor.nextFrame();
building = 0;
timing = setInterval(building_maison, _root.vitesseC, maison_pr_repere);
trace(((("VITESSE" + _root.vitesseC) + timing) + " ") + building);
}
var niveau = 0;
var building = 0;
var bois = 0;
var terre = 0;
var fer = 0;
var gold = 0;
var gemme = 0;
var timing = 0;
var personom_in = new Array();
var persoid_in = new Array();
var outils = 2;
}
Symbol 124 Button
on (rollOver) {
detail = "One player \n \n Try to make your village bigger and better as fast as possible !";
}
on (release) {
play();
}
Symbol 127 Button
on (rollOver) {
detail = "Multiplayer Version \n \n Play with real people online for free!";
}
on (release) {
getURL ("http://www.celtic-game.com/en_index.php", "_blank");
}
Symbol 134 MovieClip Frame 1
homme.gotoAndPlay("droite");
Symbol 134 MovieClip Frame 2
homme.gotoAndPlay("droite");
Symbol 134 MovieClip Frame 72
homme.gotoAndPlay("gauche");
Symbol 134 MovieClip Frame 109
homme.gotoAndStop(1);
Symbol 160 Button
on (release) {
play();
}
Symbol 165 MovieClip Frame 1
_root.stop();
Instance of Symbol 13 MovieClip in Symbol 165 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop("gauche");
}
Instance of Symbol 92 MovieClip in Symbol 165 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop("droite");
}
Symbol 165 MovieClip Frame 30
stop();
Symbol 165 MovieClip Frame 31
_root.play();
Symbol 165 MovieClip Frame 55
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 4
gotoAndStop (2);
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 4
gotoAndStop (2);
Symbol 253 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 4
gotoAndStop (2);
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 4
gotoAndStop (2);
Symbol 261 MovieClip Frame 1
stop();
trace("deptgaDDD" + this.getDepth());
Instance of Symbol 190 MovieClip "maison1" in Symbol 261 MovieClip Frame 1
on (release) {
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("batiment");
_root.idselection = _root.maisonA;
}
Instance of Symbol 190 MovieClip "maison2" in Symbol 261 MovieClip Frame 1
on (release) {
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("batiment");
_root.idselection = _root.maisonB;
}
Instance of Symbol 190 MovieClip "maison3" in Symbol 261 MovieClip Frame 1
on (release) {
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("batiment");
_root.idselection = _root.maisonC;
}
Instance of Symbol 238 MovieClip "ferme" in Symbol 261 MovieClip Frame 1
on (release) {
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("batiment");
_root.idselection = _root.ferme;
}
Instance of Symbol 253 MovieClip "terre" in Symbol 261 MovieClip Frame 1
on (release) {
_root.idselection = _root.bat_terre;
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("batiment");
}
Instance of Symbol 259 MovieClip "bois" in Symbol 261 MovieClip Frame 1
on (release) {
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("batiment");
_root.idselection = _root.bat_bois;
}
Instance of Symbol 260 MovieClip in Symbol 261 MovieClip Frame 1
on (release) {
_root.menu.gotoAndStop(1);
_root.menu.gotoAndStop("divine");
}
Symbol 279 Button
on (press) {
startDrag (this._parent);
}
on (release) {
stopDrag();
}
Symbol 283 Button
on (release) {
_root.menu.gotoAndStop(1);
}
Symbol 295 Button
on (release) {
_root.menu.gotoAndStop("l_perso");
}
Symbol 298 MovieClip Frame 1
_root.menu.metier_liste.b_terre._visible = false;
_root.menu.metier_liste.b_inactif._visible = false;
_root.menu.metier_liste.b_bois._visible = false;
_root.menu.metier_liste.b_ferme._visible = false;
_root.menu.metier_liste.b_prier._visible = false;
var b_fermeL = new Array();
afficheF = 0;
var b_inactifL = new Array();
afficheI = 0;
var b_boisL = new Array();
afficheB = 0;
var b_terreL = new Array();
afficheT = 0;
var b_prierL = new Array();
afficheP = 0;
Maxperso = (((_root.bat_prier.personom_in.length + _root.bat_inactif.personom_in.length) + _root.ferme.personom_in.length) + _root.bat_bois.personom_in.length) + _root.bat_terre.personom_in.length;
trace("lengeur" + Maxperso);
var j = 0;
while (j < Maxperso) {
if ((_root.bat_inactif.personom_in[j] != undefined) and (afficheI < 10)) {
(_root.menu.metier_liste);// not popped
duplicateMovieClip (b_inactif, "b_inactifL" + j, this.getNextHighestDepth());
("b_inactifL" + j)[undefined] = undefined;
_root.menu.metier_liste["b_inactifL" + j].texte = _root.bat_inactif.personom_in[j];
_root.menu.metier_liste["b_inactifL" + j]._y = b_inactif._y + (20 * afficheI);
afficheI = afficheI + 1;
trace("inactiff" + _root.bat_inactif.personom_in[j]);
_root.menu.metier_liste["b_inactifL" + j].onRelease = function () {
ma_str = new String(this);
val = Number(ma_str.slice(36));
_root.idselection = _root.bat_inactif.persoid_in[val];
_root.menu.gotoAndStop("metier");
};
}
if ((_root.ferme.personom_in[j] != undefined) and (afficheF < 10)) {
(_root.menu.metier_liste);// not popped
duplicateMovieClip (b_ferme, "b_fermeL" + j, this.getNextHighestDepth());
("b_fermeL" + j)[undefined] = undefined;
_root.menu.metier_liste["b_fermeL" + j].texte = _root.ferme.personom_in[j];
_root.menu.metier_liste["b_fermeL" + j]._y = b_ferme._y + (20 * afficheF);
afficheF = afficheF + 1;
_root.menu.metier_liste["b_fermeL" + j].onRelease = function () {
ma_str = new String(this);
val = Number(ma_str.slice(34));
_root.idselection = _root.ferme.persoid_in[val];
_root.menu.gotoAndStop("metier");
};
}
if ((_root.bat_bois.personom_in[j] != undefined) and (afficheB < 10)) {
(_root.menu.metier_liste);// not popped
duplicateMovieClip (b_bois, "b_boisL" + j, this.getNextHighestDepth());
("b_boisL" + j)[undefined] = undefined;
_root.menu.metier_liste["b_boisL" + j].texte = _root.bat_bois.personom_in[j];
_root.menu.metier_liste["b_boisL" + j]._y = b_bois._y + (20 * afficheB);
afficheB = afficheB + 1;
_root.menu.metier_liste["b_boisL" + j].onRelease = function () {
ma_str = new String(this);
val = Number(ma_str.slice(33));
_root.idselection = _root.bat_bois.persoid_in[val];
_root.menu.gotoAndStop("metier");
};
}
if ((_root.bat_terre.personom_in[j] != undefined) and (afficheT < 10)) {
(_root.menu.metier_liste);// not popped
duplicateMovieClip (b_terre, "b_terreL" + j, this.getNextHighestDepth());
("b_terreL" + j)[undefined] = undefined;
_root.menu.metier_liste["b_terreL" + j].texte = _root.bat_terre.personom_in[j];
_root.menu.metier_liste["b_terreL" + j]._y = b_terre._y + (20 * afficheT);
afficheT = afficheT + 1;
_root.menu.metier_liste["b_terreL" + j].onRelease = function () {
ma_str = new String(this);
val = Number(ma_str.slice(34));
_root.idselection = _root.bat_terre.persoid_in[val];
_root.menu.gotoAndStop("metier");
};
}
if ((_root.bat_prier.personom_in[j] != undefined) and (afficheP < 10)) {
(_root.menu.metier_liste);// not popped
duplicateMovieClip (b_prier, "b_prierL" + j, this.getNextHighestDepth());
("b_prierL" + j)[undefined] = undefined;
_root.menu.metier_liste["b_prierL" + j].texte = _root.bat_prier.personom_in[j];
_root.menu.metier_liste["b_prierL" + j]._y = b_prier._y + (20 * afficheP);
afficheP = afficheP + 1;
_root.menu.metier_liste["b_prierL" + j].onRelease = function () {
ma_str = new String(this);
val = Number(ma_str.slice(34));
_root.idselection = _root.bat_prier.persoid_in[val];
_root.menu.gotoAndStop("metier");
};
}
j++;
}
Symbol 302 Button
on (release) {
this.gotoAndStop("perso");
}
Symbol 318 Button
on (release) {
this._parent.gotoAndStop("habitants");
}
Symbol 327 Button
on (release) {
play();
}
Symbol 336 MovieClip Frame 1
stop();
_root.menu.perso_liste.b_perso._visible = false;
var b_persoL = new Array();
placement = 0;
max = 25;
var j = _root.perso.length;
while ((j + 1) > 0) {
if (((_root.perso[j].nom != undefined) and (_root.perso[j].dead == 0)) and (placement < max)) {
(_root.menu.perso_liste);// not popped
duplicateMovieClip (b_perso, "b_persoL" + j, this.getNextHighestDepth());
("b_persoL" + j)[undefined] = undefined;
_root.menu.perso_liste["b_persoL" + j].nom = _root.perso[j].nom;
_root.menu.perso_liste["b_persoL" + j].age = _root.perso[j].ages;
_root.menu.perso_liste["b_persoL" + j].sexe = _root.perso[j].sexe;
_root.menu.perso_liste["b_persoL" + j].sante = _root.perso[j].sante + "%";
_root.menu.perso_liste["b_persoL" + j].metier = _root.perso[j].metier;
_root.menu.perso_liste["b_persoL" + j]._y = b_perso._y + (12 * placement);
placement = placement + 1;
_root.menu.perso_liste["b_persoL" + j].onRelease = function () {
ma_str = new String(this);
val = Number(ma_str.slice(33));
_root.idselection = val;
_root.menu.gotoAndStop("perso");
};
}
j--;
}
Symbol 336 MovieClip Frame 3
stop();
_root.menu.perso_liste.b_perso._visible = false;
var b_persoL = new Array();
placement = 0;
max = 25;
var j = _root.perso.length;
while ((j + 1) > 0) {
_root.menu.perso_liste["b_persoL" + j]._visible = 0;
if (((_root.perso[j].nom != undefined) and (_root.perso[j].dead == 1)) and (placement < max)) {
_root.menu.perso_liste["b_persoL" + j]._visible = 1;
(_root.menu.perso_liste);// not popped
duplicateMovieClip (b_perso, "b_persoL" + j, this.getNextHighestDepth());
("b_persoL" + j)[undefined] = undefined;
_root.menu.perso_liste["b_persoL" + j].nom = _root.perso[j].nom;
_root.menu.perso_liste["b_persoL" + j].age = _root.perso[j].ages;
_root.menu.perso_liste["b_persoL" + j].sexe = _root.perso[j].sexe;
_root.menu.perso_liste["b_persoL" + j].sante = _root.perso[j].sante + "%";
_root.menu.perso_liste["b_persoL" + j].metier = _root.perso[j].metier;
_root.menu.perso_liste["b_persoL" + j]._y = b_perso._y + (12 * placement);
placement = placement + 1;
}
j--;
}
Symbol 340 Button
on (release) {
_root.perso[_root.idselection].nom = nomperso;
_root.menu.gotoAndStop(1);
}
Symbol 341 Button
on (release) {
_root.menu.gotoAndStop("metier");
}
Symbol 358 MovieClip Frame 1
n = _root.idselection;
nomperso = _root.perso[n].nom;
if ((_root.perso[n].sante < 1) or (_root.perso[n].dead == 1)) {
_root.menu.gotoAndStop("persodead");
}
if (_root.perso[n].sexe == "F") {
_root.menu.gotoAndStop("persoF");
}
age = _root.perso[n].ages;
if (age < 16) {
info = "What a beautiful child! \n he'll begin working at his 18th year";
b_metier._visible = false;
} else if (age > 60) {
info = "That peasant is old!";
} else {
info = " Adult";
b_metier._visible = true;
}
sexe = _root.perso[n].sexe;
metier = _root.perso[n].metier;
if (metier == "bucheron") {
niveau_metier = "Nv :" + _root.perso[n].niveauMetier[0];
metier = "Lumberjack";
} else if (metier == "fermier") {
niveau_metier = "Nv :" + _root.perso[n].niveauMetier[1];
metier = "farmer";
} else if (metier == "terre") {
niveau_metier = "Nv :" + _root.perso[n].niveauMetier[2];
metier = "Stone miner";
}
sante = _root.perso[n].sante + " %";
Symbol 373 Button
on (release) {
trace((Number(_root.habitantsM) + " >= ") + _root.habitants);
if ((_root.habitantsM > _root.habitants) && (_root.nourriture > 30)) {
trace("BEBE");
_root.b\u00E9b\u00E9();
_root.affiche_score();
_root.menu.gotoAndStop(1);
} else {
info = "Caution, too much babies reduce the level of food really fast!";
}
}
on (rollOver) {
info = "You must have more houses to have more peasants or more food";
}
Symbol 375 Button
on (release) {
_root.menu.gotoAndStop("metierF");
}
Symbol 378 MovieClip Frame 1
n = _root.idselection;
nomperso = _root.perso[n].nom;
if (_root.perso[n].sante < 1) {
_root.menu.gotoAndStop("persodead");
}
age = _root.perso[n].ages;
if (age < 16) {
info = "What a beautiful child! \n She'll be working /n at her 18th year";
bebe._visible = false;
b_metier._visible = false;
} else if (age > 60) {
info = "That peasant is very old!";
} else {
info = " Adult";
bebe._visible = true;
b_metier._visible = true;
}
sexe = _root.perso[n].sexe;
metier = _root.perso[n].metier;
if (metier == "bucheron") {
niveau_metier = "Nv :" + _root.perso[n].niveauMetier[0];
metier = "Lumberjack";
} else if ((metier == "fermier") or (metier == "fruits")) {
niveau_metier = "Nv :" + _root.perso[n].niveauMetier[1];
metier = "farmer";
} else if (metier == "terre") {
niveau_metier = "Nv :" + _root.perso[n].niveauMetier[2];
metier = "Miner of stone";
}
sante = _root.perso[n].sante + " %";
Symbol 386 Button
on (release) {
_root.perso[n]._visible = false;
_root.menu.gotoAndStop(1);
}
Symbol 390 MovieClip Frame 1
n = _root.idselection;
nomperso = _root.perso[n].nom;
age = _root.perso[n].ages;
sexe = _root.perso[n].sexe;
metier = _root.perso[n].metier;
sante = _root.perso[n].sante + " %";
_root.perso[n].gotoAndPlay("dead");
Symbol 397 Button
on (release) {
_root.menu.gotoAndStop("divine");
}
Symbol 400 MovieClip Frame 1
maisonA.nom = "House1";
maisonA.level = _root.maisonA.niveau;
maisonA.onRelease = function () {
_root.idselection = _root.maisonA;
_root.menu.gotoAndStop("batiment");
};
maisonB.nom = "House2";
maisonB.level = _root.maisonB.niveau;
maisonB.onRelease = function () {
_root.idselection = _root.maisonB;
_root.menu.gotoAndStop("batiment");
};
maisonC.nom = "House3";
maisonC.level = _root.maisonC.niveau;
maisonC.onRelease = function () {
_root.idselection = _root.maisonC;
_root.menu.gotoAndStop("batiment");
};
ferme.nom = "Farm";
ferme.level = _root.ferme.niveau;
ferme.onRelease = function () {
_root.idselection = _root.ferme;
_root.menu.gotoAndStop("batiment");
};
terre.nom = "Stone";
terre.level = _root.bat_terre.niveau;
terre.onRelease = function () {
_root.idselection = _root.bat_terre;
_root.menu.gotoAndStop("batiment");
};
bois.nom = "Wood";
bois.level = _root.bat_bois.niveau;
bois.onRelease = function () {
_root.idselection = _root.bat_bois;
_root.menu.gotoAndStop("batiment");
};
Symbol 405 Button
on (release) {
if ((_root.bois >= _root.idselection.bois) && (_root.terre >= _root.idselection.terre)) {
_root.idselection.first_build(_root.idselection);
_root.bois = _root.bois - _root.idselection.bois;
_root.terre = _root.terre - _root.idselection.terre;
_root.affiche_score();
_root.menu.gotoAndStop(1);
} else {
info = "\n Not enough resources!";
}
}
on (rollOver) {
info = (((("\n Upgrade this building and its tools \n Level : " + niveauPlus) + "\n Price :") + bois) + ",") + terre;
}
Symbol 411 Button
on (rollOver) {
if (b_info_outil == "Cree un lit") {
info = "\n permet de r\u00E9cuperer de la sant\u00E9 plus vite";
} else {
info = ((("\n The more tools you have, the more peasants you can send to work here \n \n Price :" + prix_outils) + " wood, ") + prix_outils) + " stone";
}
}
on (release) {
if ((_root.bois >= prix_outils) && (_root.terre >= prix_outils)) {
_root.idselection.ajoute_outil(1);
_root.bois = _root.bois - prix_outils;
_root.terre = _root.terre - prix_outils;
_root.affiche_score();
_root.menu.gotoAndStop(1);
}
}
Symbol 415 MovieClip Frame 1
stop();
bois = _root.idselection.bois + " wood";
terre = _root.idselection.terre + " stone";
nom = _root.idselection.nom;
niveau = _root.idselection.niveau;
niveauPlus = _root.idselection.niveau + 1;
trace("1ER LETTRE:" + nom.slice(0, 3));
prix_outils = _root.idselection.outils * 6;
if (_root.idselection.outils > 9) {
b_outil._visible = false;
}
if (_root.idselection.building > 0) {
info = ("batiment " + nom) + " Upgrading...";
b_bluid._visible = false;
occupants = _root.idselection.persolive();
outils = (_root.idselection.persoliveid() + "/") + _root.idselection.outils;
} else if (nom.slice(0, 3) == "mai") {
occupants = _root.bat_inactif.persolive();
b_outil._visible = false;
info_outil = " ";
outils = " ";
b_info_outil = " ";
info = "Houses allow you to have more peasants";
if (niveau == 3) {
b_bluid._visible = false;
info = "Sorry, but you got the level max for this building!";
}
} else if (nom.slice(0, 3) == "fer") {
occupants = _root.ferme.persolive();
outils = (_root.ferme.persoliveid() + "/") + _root.ferme.outils;
info = "This allow you to upgrade your stock, /n and also your tools";
} else if (nom.slice(0, 3) == "ter") {
occupants = _root.bat_terre.persolive();
outils = (_root.bat_terre.persoliveid() + "/") + _root.bat_terre.outils;
info = "This allow you to upgrade your stock, /n and also your tools";
} else if (nom.slice(0, 3) == "boi") {
occupants = _root.bat_bois.persolive();
outils = (_root.bat_bois.persoliveid() + "/") + _root.bat_bois.outils;
info = "This allow you to upgrade your stock, /n and also your tools";
}
if (niveau == 3) {
niveau = "3";
b_bluid._visible = false;
info = "You've reached the max level for this building!";
}
Symbol 420 Button
on (rollOver) {
Prix_divin = ((_root.bonus_recolte + 1) * 10) + _root.habitants;
info = (("You'll get more resources \n Level : " + (_root.bonus_recolte + 1)) + "\n Required gods pts : ") + Prix_divin;
}
on (release) {
if (_root.divin >= Prix_divin) {
_root.divin = _root.divin - Prix_divin;
_root.bonus_recolte = _root.bonus_recolte + 1;
_root.menu.gotoAndStop(1);
}
}
Symbol 422 Button
on (rollOver) {
Prix_divin = ((_root.bonus_vitesse + 1) * 8) + _root.habitants;
info = (("Upgrade your villagers speed \n Level : " + (_root.bonus_vitesse + 1)) + "\n required Gods pts : ") + Prix_divin;
}
on (release) {
if (_root.divin >= Prix_divin) {
_root.divin = _root.divin - Prix_divin;
_root.bonus_vitesse = _root.bonus_vitesse + 1;
_root.V_deplacement = _root.V_deplacement - 4;
_root.menu.gotoAndStop(1);
}
}
Symbol 423 Button
on (rollOver) {
Prix_divin = ((_root.bonus_vie + 1) * 9) + _root.habitants;
info = (("Your peasants will live longer \n Level : " + (_root.bonus_vie + 1)) + "\n Required gods pts : ") + Prix_divin;
}
on (release) {
if (_root.divin >= Prix_divin) {
_root.divin = _root.divin - Prix_divin;
_root.bonus_vie = _root.bonus_vie + 1;
_root.viemax = _root.viemax + 7;
_root.menu.gotoAndStop(1);
}
}
Symbol 426 MovieClip Frame 1
if (_root.bonus_recolte == 3) {
b_bonusR._visible = 0;
}
if (_root.bonus_vitesse == 3) {
b_bonusV._visible = 0;
}
if (_root.bonus_vie == 3) {
b_bonusA._visible = 0;
}
Symbol 432 Button
on (release) {
nextFrame();
}
Symbol 443 MovieClip Frame 1
now = new Date();
currentSecond = now.getSeconds();
previousSecond = currentSecond;
textF = 0;
counter = 0;
Symbol 443 MovieClip Frame 2
now = new Date();
currentSecond = now.getSeconds();
counter++;
if (currentSecond != previousSecond) {
previousSecond = currentSecond;
textF = counter;
counter = 0;
}
Symbol 443 MovieClip Frame 3
gotoAndPlay (2);
Symbol 451 MovieClip Frame 1
stop();
Instance of Symbol 300 MovieClip in Symbol 451 MovieClip Frame 1
onClipEvent (load) {
if (Key.isDown(40)) {
his._visible1;
_root.cheat = 1;
} else {
this._visible = 0;
}
}
on (release) {
_root.menu.gotoAndStop("cheat");
}
Symbol 452 Button
on (release) {
_root.bois = _root.bois + 500;
_root.nourriture = _root.nourriture + 500;
_root.terre = _root.terre + 500;
_root.divin = _root.divin + 100;
_root.affiche_score();
}
Symbol 455 Button
on (release) {
_root.newperso("", 30, "M", "inactif");
}
Symbol 457 Button
on (release) {
_root.newperso("", 30, "F", "inactif");
}
Symbol 459 Button
on (release) {
n = _root.idselection;
trace("VALEUR DE N" + n);
_root.first_moveperso(n, "bucheron");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "Get wood to upgrade your buildings";
}
Symbol 462 Button
on (release) {
n = _root.idselection;
trace("VALEUR DE N" + n);
_root.first_moveperso(n, "fermier");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "Get food for your village";
}
Symbol 463 Button
on (release) {
n = _root.idselection;
_root.first_moveperso(n, "inactif");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "The villager doesn't work in order to \n regain Health ";
}
Symbol 466 Button
on (release) {
n = _root.idselection;
_root.first_moveperso(n, "terre");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "Make your villagers getting stone";
}
Symbol 472 Button
on (release) {
_root.menu.gotoAndStop("perso");
}
on (rollOver) {
detail = "informations about that peasant";
}
Symbol 473 MovieClip Frame 1
n = _root.idselection;
if ((_root.perso[n].sante < 1) or (_root.perso[n].dead == 1)) {
_root.menu.gotoAndStop("persodead");
}
if (_root.perso[n].ages < 16) {
_root.menu.gotoAndStop("perso");
}
if (_root.perso[n].sexe == "F") {
_root.menu.gotoAndStop("metierF");
}
nom = _root.perso[n].nom;
Symbol 474 Button
on (release) {
n = _root.idselection;
_root.first_moveperso(n, "fruits");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "Your peasant will get fruits";
}
Symbol 475 Button
on (release) {
n = _root.idselection;
_root.first_moveperso(n, "inactif");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "This peasant doesn't work in order to regain Health";
}
Symbol 478 Button
on (release) {
trace((Number(_root.habitantsM) + " >= ") + _root.habitants);
if ((_root.habitantsM > _root.habitants) && (_root.nourriture > 30)) {
trace("BEBE");
_root.b\u00E9b\u00E9();
_root.affiche_score();
_root.menu.gotoAndStop(1);
} else {
detail = "Need more place in your houses!";
if (_root.nourriture < 30) {
detail = "You don't have enough food!";
}
}
}
on (rollOver) {
detail = "Allow you to get a baby (price = 30 food)";
}
Symbol 480 Button
on (release) {
n = _root.idselection;
_root.first_moveperso(n, "prier");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "Avoid Gods wrath, and allow you to 'upgrade' your peasants";
}
Symbol 482 Button
on (release) {
n = _root.idselection;
trace("VALEUR DE N" + n);
_root.first_moveperso(n, "fermier");
_root.menu.gotoAndStop(1);
}
on (rollOver) {
detail = "Make the peasant harvesting food";
}
Symbol 485 Button
on (release) {
_root.menu.gotoAndStop("perso");
}
on (rollOver) {
detail = "Informations about that peasant";
}
Symbol 486 MovieClip Frame 1
n = _root.idselection;
if ((_root.perso[n].sante < 1) or (_root.perso[n].dead == 1)) {
_root.menu.gotoAndStop("persodead");
}
if (_root.perso[_root.idselection].ages < 16) {
_root.menu.gotoAndStop("perso");
}
nom = _root.perso[_root.idselection].nom;
Symbol 487 MovieClip Frame 1
stop();
this.swapDepths(10);
Instance of Symbol 264 MovieClip in Symbol 487 MovieClip Frame 1
on (release) {
this._parent.gotoAndStop(1);
this._parent.gotoAndStop("batiments");
}
Instance of Symbol 266 MovieClip in Symbol 487 MovieClip Frame 1
on (release) {
this._parent.gotoAndStop(1);
this._parent.gotoAndStop("options");
}
Instance of Symbol 269 MovieClip in Symbol 487 MovieClip Frame 1
on (release) {
this._parent.gotoAndStop(1);
this._parent.gotoAndStop("habitants");
}
Symbol 487 MovieClip Frame 15
stop();
Instance of Symbol 300 MovieClip in Symbol 487 MovieClip Frame 16
on (release) {
this._parent.nextFrame();
}
Instance of Symbol 300 MovieClip in Symbol 487 MovieClip Frame 16
on (release) {
this._parent.prevFrame();
}
Instance of Symbol 300 MovieClip in Symbol 487 MovieClip Frame 17
on (release) {
this._parent.prevFrame();
}
Instance of Symbol 300 MovieClip in Symbol 487 MovieClip Frame 17
on (release) {
this._parent.nextFrame();
}
Symbol 489 MovieClip Frame 1
this.swapDepths(9);
Symbol 512 MovieClip Frame 1
this.swapDepths(11);
Symbol 512 MovieClip Frame 2
stop();
Symbol 512 MovieClip Frame 45
gotoAndStop (2);
Symbol 512 MovieClip Frame 73
gotoAndStop (2);
Symbol 520 Button
on (release) {
play();
}
Symbol 534 MovieClip Frame 1
stop();
Symbol 534 MovieClip Frame 2
stop();
name = "Anonyme";
com = " ";
Symbol 534 MovieClip Frame 3
passw = "achanger";
name = name;
_root.passw = "achanger";
com = com;
score = _root.annee;
loadVariablesNum ("http://celtic.village.free.fr/score.php", , "POST");
Symbol 534 MovieClip Frame 17
stop();
Symbol 534 MovieClip Frame 18
stop();