Frame 1
var MochiAd = {showPreloaderAd:function (options) {
var _local29 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812};
options = MochiAd._parseOptions(options, _local29);
var _local15 = options.clip;
var _local25 = 11000;
var _local28 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
return(undefined);
}
_local15.stop();
var mc = _local15._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local16 = MochiAd._getRes(options);
var _local5 = _local16[0];
var _local14 = _local16[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local24 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local26 = options.outline;
delete options.outline;
var _local6 = _local8.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local8.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local24);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local26, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local5 - 20, 0);
_local7.lineTo(_local5 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local25;
chk.ad_timeout = _local28;
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.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;
}
}
};
}, showTimedAd:function (options) {
var _local15 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd"};
options = MochiAd._parseOptions(options, _local15);
var _local6 = options.clip;
var _local12 = 11000;
var _local14 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
return(undefined);
}
_local6.stop();
var mc = _local6._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local7 = MochiAd._getRes(options);
var _local16 = _local7[0];
var _local13 = _local7[1];
mc._x = _local16 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local12;
chk.ad_timeout = _local14;
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.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;
}
}
};
}, _allowDomains:function (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);
}, _loadCommunicator:function (options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
MochiAd._allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
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) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
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);
}, fetchHighScores:function (options, callbackObj, callbackMethod) {
var _local1 = MochiAd._loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}, sendHighScore:function (options, callbackObj, callbackMethod) {
var _local1 = MochiAd._loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}, load:function (options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local7 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = MochiAd._getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = MochiAd._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 _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}, unload:function (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);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (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]);
}, _parseOptions:function (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);
}, _:null};
MochiAd.showPreloaderAd({id:"f649ec8a6dfdd5ad", res:"490x550"});
Frame 3
stop();
Frame 4
stop();
Mus = new Sound(MObj);
Mus.attachSound("MUSIC");
Mus.setVolume(0);
MusicStarted = false;
Hor = new Sound();
Hor.attachSound("HORN");
Frame 5
function OnSite() {
return(this._url == "http://www.sugar-free-games.com/games/g849.swf");
}
function Save(Slot, SlotName) {
Saved.data.Slots[Slot] = new Object();
Saved.data.Slots[Slot].SlotName = SlotName;
Saved.data.Slots[Slot].MusicOn = MusicOn;
Saved.data.Slots[Slot].FXOn = FXOn;
Saved.data.Slots[Slot].GameSpeed = GameSpeed;
Saved.data.Slots[Slot].BattleSpeed = BattleSpeed;
if (OriginalID != undefined) {
Saved.data.Slots[Slot].OriginalID = OriginalID;
} else {
Saved.data.Slots[Slot].OriginalID = GameIndex;
}
Saved.data.Slots[Slot].YourChar = {Name:YourChar.Name, Healthiness:YourChar.Healthiness, Agility:YourChar.Agility, Accuracy:YourChar.Accuracy, Intelligence:YourChar.Intelligence};
Saved.data.Slots[Slot].CharacterPortrait = CharacterPortrait;
Saved.data.Slots[Slot].Time = {Day:Day, Month:Month, Year:Year, Hour:Hour, Min:Min};
Now = new Date();
Saved.data.Slots[Slot].SaveTime = Now;
Saved.data.Slots[Slot].GameMode = GameMode;
if (GameMode == 2) {
Saved.data.Slots[Slot].CompMode = CompMode;
Saved.data.Slots[Slot].Competitive = new Object();
for (prpt in Competitive) {
Saved.data.Slots[Slot].Competitive[prpt] = Competitive[prpt];
}
}
Saved.data.Slots[Slot].PoliceStatus = PoliceStatus;
Saved.data.Slots[Slot].MilitiaStatus = MilitiaStatus;
if (GameMode == 1) {
Saved.data.Slots[Slot].Story = new Object();
for (prpt in Story) {
Saved.data.Slots[Slot].Story[prpt] = Story[prpt];
}
Saved.data.Slots[Slot].DefaultStages = new Array();
prpt = 1;
while (prpt < DefaultStages.length) {
Saved.data.Slots[Slot].DefaultStages[prpt] = DefaultStages[prpt];
prpt++;
}
}
Saved.data.Slots[Slot].People = new Array();
ppl = 0;
while (ppl < People.length) {
Saved.data.Slots[Slot].People[ppl] = new Object();
if (People[ppl].HP != People[ppl].MaxHP) {
Saved.data.Slots[Slot].People[ppl].HP = People[ppl].HP;
}
if (People[ppl].SniperExperience > 0) {
Saved.data.Slots[Slot].People[ppl].SniperExperience = People[ppl].SniperExperience;
}
if (People[ppl].DoctorExperience > 0) {
Saved.data.Slots[Slot].People[ppl].DoctorExperience = People[ppl].DoctorExperience;
}
if (People[ppl].VeterinaryExperience > 0) {
Saved.data.Slots[Slot].People[ppl].VeterinaryExperience = People[ppl].VeterinaryExperience;
}
if (People[ppl].MechanicExperience > 0) {
Saved.data.Slots[Slot].People[ppl].MechanicExperience = People[ppl].MechanicExperience;
}
if (People[ppl].Status != 1) {
Saved.data.Slots[Slot].People[ppl].Status = People[ppl].Status;
}
if (People[ppl].PayDay != undefined) {
Saved.data.Slots[Slot].People[ppl].PayDay = People[ppl].PayDay;
}
if (People[ppl].Kills > 0) {
Saved.data.Slots[Slot].People[ppl].Kills = People[ppl].Kills;
}
if (People[ppl].APExperience > 0) {
Saved.data.Slots[Slot].People[ppl].APExperience = People[ppl].APExperience;
}
if (People[ppl].StrengthExperience > 0) {
Saved.data.Slots[Slot].People[ppl].StrengthExperience = People[ppl].StrengthExperience;
}
pts = 0;
ppl++;
}
Saved.data.Slots[Slot].Towns = new Array();
Saved.data.Slots[Slot].Group = new Object();
Saved.data.Slots[Slot].Group.Money = Group.Money;
Saved.data.Slots[Slot].Group.Water = Group.Water;
Saved.data.Slots[Slot].Group.Direction = Group.Direction;
Saved.data.Slots[Slot].Group.Move = Group.Move;
Saved.data.Slots[Slot].Group.x = Group.x;
Saved.data.Slots[Slot].Group.y = Group.y;
Saved.data.Slots[Slot].Group.InTown = Group.InTown;
Saved.data.Slots[Slot].Group.Members = new Array();
for (mmb in Group.Members) {
Saved.data.Slots[Slot].Group.Members[mmb] = {Index:Group.Members[mmb].Index};
Saved.data.Slots[Slot].Group.Members[mmb].Holding = new Array();
hld = 0;
while (hld <= 4) {
if (Group.Members[mmb].Holding[hld] instanceof Object) {
Saved.data.Slots[Slot].Group.Members[mmb].Holding[hld] = {Type:Group.Members[mmb].Holding[hld].Type, Amount:Group.Members[mmb].Holding[hld].Amount};
} else {
Saved.data.Slots[Slot].Group.Members[mmb].Holding[hld] = 0;
}
hld++;
}
}
Saved.data.Slots[Slot].Group.Cargo = new Array();
for (crg in Group.Cargo) {
Saved.data.Slots[Slot].Group.Cargo[crg] = {Type:Group.Cargo[crg].Type, Amount:Group.Cargo[crg].Amount};
}
Saved.data.Slots[Slot].Group.Inventory = new Array();
for (inv in Group.Inventory) {
Saved.data.Slots[Slot].Group.Inventory[inv] = {Type:Group.Inventory[inv].Type, Amount:Group.Inventory[inv].Amount};
if (Group.Inventory[inv].InUse != undefined) {
Saved.data.Slots[Slot].Group.Inventory[inv].InUse = Group.Inventory[inv].InUse;
}
}
Saved.data.Slots[Slot].Group.Transport = new Array();
for (trn in Group.Transport) {
Saved.data.Slots[Slot].Group.Transport[trn] = {Type:Group.Transport[trn].Type, HP:Group.Transport[trn].HP};
if ((Transports[Group.Transport[trn].Type].Class == 1) or (Transports[Group.Transport[trn].Type].Class == 2)) {
if (Group.Transport[trn].Attached instanceof Object) {
for (sa in Group.Transport) {
if (Group.Transport[sa] == Group.Transport[trn].Attached) {
Saved.data.Slots[Slot].Group.Transport[trn].Attached = sa;
break;
}
}
}
}
}
tt = 1;
while (tt <= 16) {
Saved.data.Slots[Slot].Towns[tt] = new Object();
Saved.data.Slots[Slot].Towns[tt].Money = Towns[tt].Money;
Saved.data.Slots[Slot].Towns[tt].Population = Towns[tt].Population;
Saved.data.Slots[Slot].Towns[tt].Production = new Array();
for (cp in Towns[tt].Production) {
Saved.data.Slots[Slot].Towns[tt].Production[cp] = Towns[tt].Production[cp];
}
Saved.data.Slots[Slot].Towns[tt].Industries = new Array();
for (ci in Towns[tt].Industries) {
Saved.data.Slots[Slot].Towns[tt].Industries[ci] = {Production:Towns[tt].Industries[ci].Production, HadNoRaw:Towns[tt].Industries[ci].HadNoRaw};
}
Saved.data.Slots[Slot].Towns[tt].Property = new Array();
for (cp in Towns[tt].Property) {
if (Towns[tt].Property[cp].Amount > 0) {
Saved.data.Slots[Slot].Towns[tt].Property[cp] = {Type:Towns[tt].Property[cp].Type, Amount:Towns[tt].Property[cp].Amount};
}
}
Saved.data.Slots[Slot].Towns[tt].Citizens = new Array();
for (cc in Towns[tt].Citizens) {
Saved.data.Slots[Slot].Towns[tt].Citizens[cc] = Towns[tt].Citizens[cc].Index;
}
Saved.data.Slots[Slot].Towns[tt].Houses = new Array();
for (ch in Towns[tt].Houses) {
if ((GameMode == 1) and (Towns[tt].Houses[ch].Type == 5)) {
Saved.data.Slots[Slot].Towns[tt].Houses.push({Index:ch, Revealed:Towns[tt].Houses[ch].Revealed});
}
if (Towns[tt].Houses[ch].Type == 2) {
if (Towns[tt].Houses[ch].SubType == 1) {
lst = Saved.data.Slots[Slot].Towns[tt].Houses.push({Index:ch, AssortmentAmount:new Array()});
lst--;
for (aa in Towns[tt].Houses[ch].Assortment) {
Saved.data.Slots[Slot].Towns[tt].Houses[lst].AssortmentAmount[aa] = Towns[tt].Houses[ch].Assortment[aa].Amount;
}
}
if (Towns[tt].Houses[ch].SubType == 2) {
lst = Saved.data.Slots[Slot].Towns[tt].Houses.push({Index:ch, Stuff:new Array()});
lst--;
for (aa in Towns[tt].Houses[ch].Stuff) {
Saved.data.Slots[Slot].Towns[tt].Houses[lst].Stuff[aa] = {Type:Towns[tt].Houses[ch].Stuff[aa].Type, HP:Towns[tt].Houses[ch].Stuff[aa].HP};
}
}
}
}
tt++;
}
Saved.data.Slots[Slot].RobbersNum = new Array();
cx = 0;
while (cx < RobbersNum.length) {
Saved.data.Slots[Slot].RobbersNum[cx] = new Array();
cy = 0;
while (cy < RobbersNum[cx].length) {
Saved.data.Slots[Slot].RobbersNum[cx][cy] = RobbersNum[cx][cy];
cy++;
}
cx++;
}
Saved.data.Slots[Slot].Police = new Array();
cx = 0;
while (cx < Police.length) {
Saved.data.Slots[Slot].Police[cx] = new Array();
cy = 0;
while (cy < Police[cx].length) {
Saved.data.Slots[Slot].Police[cx][cy] = Police[cx][cy];
cy++;
}
cx++;
}
Saved.data.Slots[Slot].Militia = new Array();
cx = 0;
while (cx < Militia.length) {
Saved.data.Slots[Slot].Militia[cx] = new Array();
cy = 0;
while (cy < Militia[cx].length) {
Saved.data.Slots[Slot].Militia[cx][cy] = Militia[cx][cy];
cy++;
}
cx++;
}
Saved.data.Slots[Slot].Activity = new Array();
if (RivalGroup == BaseGuards) {
Saved.data.Slots[Slot].RivalGroup = "BG";
}
a = 1;
while (a <= TotalAct) {
if (Activity[a].Active) {
si = Saved.data.Slots[Slot].Activity.push(new Object());
si--;
if (Activity[a] == RivalGroup) {
Saved.data.Slots[Slot].RivalGroup = si;
}
Saved.data.Slots[Slot].Activity[si].Type = Activity[a].Type;
Saved.data.Slots[Slot].Activity[si].Direction = Activity[a].Direction;
Saved.data.Slots[Slot].Activity[si].Stopped = Activity[a].Stopped;
Saved.data.Slots[Slot].Activity[si].Money = Activity[a].Money;
Saved.data.Slots[Slot].Activity[si].Water = Activity[a].Water;
Saved.data.Slots[Slot].Activity[si].x = Activity[a].x;
Saved.data.Slots[Slot].Activity[si].y = Activity[a].y;
Saved.data.Slots[Slot].Activity[si].Members = new Array();
for (mmb in Activity[a].Members) {
Saved.data.Slots[Slot].Activity[si].Members[mmb] = new Object();
for (prm in Activity[a].Members[mmb]) {
if ((((((((((((((((((((((prm != "Group") and (prm != "Doctor")) and (prm != "Veterinary")) and (prm != "Mechanic")) and (prm != "Sniper")) and (prm != "WalkSpeed")) and (prm != "MaxHP")) and (prm != "MaxAP")) and (prm != "Strength")) and (prm != "Capacity")) and (prm != "Dead")) and (prm != "AffectHealthiness")) and (prm != "AffectAgility")) and (prm != "AffectAccuracy")) and (prm != "AffectIntelligence")) and (prm != "HealthState")) and (prm != "Noticeability")) and (prm != "InCar")) and (prm != "Carrying")) and (prm != "Holding")) and (prm != "ToSecond")) and (prm != "BestIn")) {
Saved.data.Slots[Slot].Activity[si].Members[mmb][prm] = Activity[a].Members[mmb][prm];
}
}
Saved.data.Slots[Slot].Activity[si].Members[mmb].Holding = new Array();
hld = 0;
while (hld <= 4) {
if (Activity[a].Members[mmb].Holding[hld] instanceof Object) {
Saved.data.Slots[Slot].Activity[si].Members[mmb].Holding[hld] = {Type:Activity[a].Members[mmb].Holding[hld].Type, Amount:Activity[a].Members[mmb].Holding[hld].Amount};
} else {
Saved.data.Slots[Slot].Activity[si].Members[mmb].Holding[hld] = 0;
}
hld++;
}
}
Saved.data.Slots[Slot].Activity[si].Cargo = new Array();
for (crg in Activity[a].Cargo) {
Saved.data.Slots[Slot].Activity[si].Cargo[crg] = {Type:Activity[a].Cargo[crg].Type, Amount:Activity[a].Cargo[crg].Amount};
}
Saved.data.Slots[Slot].Activity[si].Inventory = new Array();
for (inv in Activity[a].Inventory) {
Saved.data.Slots[Slot].Activity[si].Inventory[inv] = {Type:Activity[a].Inventory[inv].Type, Amount:Activity[a].Inventory[inv].Amount};
}
Saved.data.Slots[Slot].Activity[si].Transport = new Array();
for (trn in Activity[a].Transport) {
Saved.data.Slots[Slot].Activity[si].Transport[trn] = {Type:Activity[a].Transport[trn].Type, HP:Activity[a].Transport[trn].HP};
}
Saved.data.Slots[Slot].Activity[si].OverIt = Activity[a].OverIt;
switch (Activity[a].Type) {
case 2 :
Saved.data.Slots[Slot].Activity[si].InTheWay = Activity[a].InTheWay;
Saved.data.Slots[Slot].Activity[si].CoveredDist = Activity[a].CoveredDist;
Saved.data.Slots[Slot].Activity[si].Route = Activity[a].Route;
Saved.data.Slots[Slot].Activity[si].CurrentPoint = Activity[a].CurrentPoint;
break;
case 3 :
Saved.data.Slots[Slot].Activity[si].Payed = Activity[a].Payed;
break;
case 5 :
Saved.data.Slots[Slot].Activity[si].Angle = Activity[a].Angle;
Saved.data.Slots[Slot].Activity[si].Distance = Activity[a].Distance;
break;
case 6 :
Saved.data.Slots[Slot].Activity[si].Phase = Activity[a].Phase;
Saved.data.Slots[Slot].Activity[si].Phase1Target = Activity[a].Phase1Target;
Saved.data.Slots[Slot].Activity[si].Phase2Target = Activity[a].Phase2Target;
break;
case 7 :
Saved.data.Slots[Slot].Activity[si].Phase = Activity[a].Phase;
Saved.data.Slots[Slot].Activity[si].Target = Activity[a].Target;
}
}
a++;
}
Saved.data.Slots[Slot].Messages = new Array();
for (msg in Messages) {
Saved.data.Slots[Slot].Messages[msg] = new Object();
for (prpt in Messages[msg]) {
Saved.data.Slots[Slot].Messages[msg][prpt] = Messages[msg][prpt];
}
}
if (Mode == 5) {
Saved.data.Slots[Slot].Messages.unshift(new Object());
for (prpt in TheMessage) {
Saved.data.Slots[Slot].Messages[0][prpt] = TheMessage[prpt];
}
}
Saved.data.Slots[Slot].News = new Array();
for (nws in News) {
Saved.data.Slots[Slot].News[nws] = new Object();
for (prpt in News[nws]) {
Saved.data.Slots[Slot].News[nws][prpt] = News[nws][prpt];
}
}
Saved.data.Slots[Slot].LackingCaravans = new Array();
for (cv in LackingCaravans) {
Saved.data.Slots[Slot].LackingCaravans[cv] = LackingCaravans[cv];
}
var _local11;
_local11 = Saved.flush();
Saved = SharedObject.getLocal("Caravaneer");
return(_local11);
}
function Load(Slot) {
MusicOn = Saved.data.Slots[Slot].MusicOn;
FXOn = Saved.data.Slots[Slot].FXOn;
OriginalID = Saved.data.Slots[Slot].OriginalID;
GameSpeed = Saved.data.Slots[Slot].GameSpeed;
if (Saved.data.Slots[Slot].BattleSpeed != undefined) {
BattleSpeed = Saved.data.Slots[Slot].BattleSpeed;
}
CharacterPortrait = Saved.data.Slots[Slot].CharacterPortrait;
for (prmt in PreSetChars[CharacterPortrait]) {
YourChar[prmt] = PreSetChars[CharacterPortrait][prmt];
}
for (cp in Saved.data.Slots[Slot].YourChar) {
YourChar[cp] = Saved.data.Slots[Slot].YourChar[cp];
}
Day = Saved.data.Slots[Slot].Time.Day;
Month = Saved.data.Slots[Slot].Time.Month;
Year = Saved.data.Slots[Slot].Time.Year;
Hour = Saved.data.Slots[Slot].Time.Hour;
Min = Saved.data.Slots[Slot].Time.Min;
PoliceStatus = Saved.data.Slots[Slot].PoliceStatus;
MilitiaStatus = Saved.data.Slots[Slot].MilitiaStatus;
GameMode = Saved.data.Slots[Slot].GameMode;
if (GameMode == 2) {
CompMode = Saved.data.Slots[Slot].CompMode;
for (cp in Saved.data.Slots[Slot].Competitive) {
Competitive[cp] = Saved.data.Slots[Slot].Competitive[cp];
}
}
if (GameMode == 1) {
for (cp in Saved.data.Slots[Slot].Story) {
Story[cp] = Saved.data.Slots[Slot].Story[cp];
}
for (cp in Saved.data.Slots[Slot].DefaultStages) {
DefaultStages[cp] = Saved.data.Slots[Slot].DefaultStages[cp];
}
}
for (ppl in Saved.data.Slots[Slot].People) {
for (cp in Saved.data.Slots[Slot].People[ppl]) {
People[ppl][cp] = Saved.data.Slots[Slot].People[ppl][cp];
}
UpdateMemberParams(People[ppl]);
}
if (isNaN(People[0].HP)) {
People[0].HP = People[0].MaxHP;
}
Group.Money = Saved.data.Slots[Slot].Group.Money;
Group.Water = Saved.data.Slots[Slot].Group.Water;
Group.Direction = Saved.data.Slots[Slot].Group.Direction;
Group.Move = Saved.data.Slots[Slot].Group.Move;
Group.x = Saved.data.Slots[Slot].Group.x;
Group.y = Saved.data.Slots[Slot].Group.y;
Map.Group._x = Group.x;
Map.Group._y = Group.y;
Group.InTown = Saved.data.Slots[Slot].Group.InTown;
Group.Members = new Array();
for (mmb in Saved.data.Slots[Slot].Group.Members) {
Group.Members[mmb] = People[Saved.data.Slots[Slot].Group.Members[mmb].Index];
Group.Members[mmb].Holding = new Array();
cp = 0;
while (cp <= 4) {
if (Saved.data.Slots[Slot].Group.Members[mmb].Holding[cp] instanceof Object) {
Group.Members[mmb].Holding[cp] = {Type:Saved.data.Slots[Slot].Group.Members[mmb].Holding[cp].Type, Amount:Saved.data.Slots[Slot].Group.Members[mmb].Holding[cp].Amount};
} else {
Group.Members[mmb].Holding[cp] = 0;
}
cp++;
}
UpdateCarrying(Group.Members[mmb]);
Group.Members[mmb].Group = Group;
}
Group.Cargo = new Array();
for (crg in Saved.data.Slots[Slot].Group.Cargo) {
Group.Cargo[crg] = {Type:Saved.data.Slots[Slot].Group.Cargo[crg].Type, Amount:Saved.data.Slots[Slot].Group.Cargo[crg].Amount};
}
Group.Inventory = new Array();
for (inv in Saved.data.Slots[Slot].Group.Inventory) {
Group.Inventory[inv] = new Object();
for (cp in Saved.data.Slots[Slot].Group.Inventory[inv]) {
Group.Inventory[inv][cp] = Saved.data.Slots[Slot].Group.Inventory[inv][cp];
}
}
Group.Transport = new Array();
for (trn in Saved.data.Slots[Slot].Group.Transport) {
Group.Transport[trn] = {Type:Saved.data.Slots[Slot].Group.Transport[trn].Type, HP:Saved.data.Slots[Slot].Group.Transport[trn].HP};
Group.Transport[trn].MaxHP = Transports[Group.Transport[trn].Type].MaxHP;
UpdateTransportParams(Group.Transport[trn]);
}
for (trn in Saved.data.Slots[Slot].Group.Transport) {
if (!isNaN(Saved.data.Slots[Slot].Group.Transport[trn].Attached)) {
Group.Transport[trn].Attached = Group.Transport[Saved.data.Slots[Slot].Group.Transport[trn].Attached];
}
}
UpdateGroupParams(Group);
UpdateGroupCargo(Group);
tt = 1;
while (tt <= 16) {
Towns[tt].Money = Saved.data.Slots[Slot].Towns[tt].Money;
Towns[tt].Population = Saved.data.Slots[Slot].Towns[tt].Population;
Tosns[tt].Production = new Array();
for (cp in Saved.data.Slots[Slot].Towns[tt].Production) {
Towns[tt].Production[cp] = Saved.data.Slots[Slot].Towns[tt].Production[cp];
}
for (ind in Saved.data.Slots[Slot].Towns[tt].Industries) {
Towns[tt].Industries[ind].Production = Saved.data.Slots[Slot].Towns[tt].Industries[ind].Production;
Towns[tt].Industries[ind].HadNoRaw = Saved.data.Slots[Slot].Towns[tt].Industries[ind].HadNoRaw;
}
Towns[tt].Property = new Array();
for (prp in Saved.data.Slots[Slot].Towns[tt].Property) {
Towns[tt].Property[prp] = {Type:Saved.data.Slots[Slot].Towns[tt].Property[prp].Type, Amount:Saved.data.Slots[Slot].Towns[tt].Property[prp].Amount};
}
Towns[tt].Stock = new Array();
for (Prp in Towns[tt].Property) {
Towns[tt].Stock[Towns[tt].Property[Prp].Type] = Towns[tt].Property[Prp];
}
n = 1;
while (n < Goods.length) {
if (!(Towns[tt].Stock[n] instanceof Object)) {
lst = Towns[tt].Property.push({Type:n, Amount:0});
Towns[tt].Stock[n] = Towns[tt].Property[lst - 1];
}
n++;
}
Towns[tt].Citizens = new Array();
for (ctz in Saved.data.Slots[Slot].Towns[tt].Citizens) {
Towns[tt].Citizens[ctz] = People[Saved.data.Slots[Slot].Towns[tt].Citizens[ctz]];
}
for (hs in Saved.data.Slots[Slot].Towns[tt].Houses) {
TheHouse = Towns[tt].Houses[Saved.data.Slots[Slot].Towns[tt].Houses[hs].Index];
if (TheHouse.Type == 5) {
TheHouse.Revealed = Saved.data.Slots[Slot].Towns[tt].Houses[hs].Revealed;
}
if (TheHouse.Type == 2) {
if (TheHouse.SubType == 1) {
for (as in Saved.data.Slots[Slot].Towns[tt].Houses[hs].AssortmentAmount) {
TheHouse.Assortment[as].Amount = Saved.data.Slots[Slot].Towns[tt].Houses[hs].AssortmentAmount[as];
}
}
if (TheHouse.SubType == 2) {
for (ca in TheHouse.Assortment) {
TheHouse.Assortment[ca].Amount = 0;
}
TheHouse.Stuff = new Array();
for (st in Saved.data.Slots[Slot].Towns[tt].Houses[hs].Stuff) {
TheHouse.Stuff[st] = {Type:Saved.data.Slots[Slot].Towns[tt].Houses[hs].Stuff[st].Type, HP:Saved.data.Slots[Slot].Towns[tt].Houses[hs].Stuff[st].HP};
TheHouse.Stuff[st].MaxHP = Transports[TheHouse.Stuff[st].Type].MaxHP;
UpdateTransportParams(TheHouse.Stuff[st]);
for (fa in TheHouse.Assortment) {
if (TheHouse.Assortment[fa].Type == TheHouse.Stuff[st].Type) {
TheHouse.Assortment[fa].Amount++;
break;
}
}
}
}
}
}
UpdateTownEconomy(Towns[tt]);
tt++;
}
FirstTime = false;
RobbersNum = new Array();
cx = 0;
while (cx < Saved.data.Slots[Slot].RobbersNum.length) {
RobbersNum[cx] = new Array();
cy = 0;
while (cy < Saved.data.Slots[Slot].RobbersNum[cx].length) {
RobbersNum[cx][cy] = Saved.data.Slots[Slot].RobbersNum[cx][cy];
cy++;
}
cx++;
}
Police = new Array();
cx = 0;
while (cx < Saved.data.Slots[Slot].Police.length) {
Police[cx] = new Array();
cy = 0;
while (cy < Saved.data.Slots[Slot].Police[cx].length) {
Police[cx][cy] = Saved.data.Slots[Slot].Police[cx][cy];
cy++;
}
cx++;
}
Militia = new Array();
cx = 0;
while (cx < Saved.data.Slots[Slot].Militia.length) {
Militia[cx] = new Array();
cy = 0;
while (cy < Saved.data.Slots[Slot].Militia[cx].length) {
Militia[cx][cy] = Saved.data.Slots[Slot].Militia[cx][cy];
cy++;
}
cx++;
}
Activity = new Array();
TotalAct = 0;
if (Saved.data.Slots[Slot].RivalGroup == "BG") {
RivalGroup = BaseGuards;
}
for (a in Saved.data.Slots[Slot].Activity) {
NewAct = AddActivity(Saved.data.Slots[Slot].Activity[a].x, Saved.data.Slots[Slot].Activity[a].y);
if (Saved.data.Slots[Slot].RivalGroup == a) {
RivalGroup = Activity[NewAct];
}
Activity[NewAct].Type = Saved.data.Slots[Slot].Activity[a].Type;
Activity[NewAct].Direction = Saved.data.Slots[Slot].Activity[a].Direction;
Activity[NewAct].Money = Saved.data.Slots[Slot].Activity[a].Money;
Activity[NewAct].Water = Saved.data.Slots[Slot].Activity[a].Water;
Activity[NewAct].Members = new Array();
for (mmb in Saved.data.Slots[Slot].Activity[a].Members) {
Activity[NewAct].Members[mmb] = new Object();
for (prm in Saved.data.Slots[Slot].Activity[a].Members[mmb]) {
if (prm != "Holding") {
Activity[NewAct].Members[mmb][prm] = Saved.data.Slots[Slot].Activity[a].Members[mmb][prm];
}
}
Activity[NewAct].Members[mmb].Holding = new Array();
hld = 0;
while (hld <= 4) {
if ((Saved.data.Slots[Slot].Activity[a].Members[mmb].Holding[hld] instanceof Object) and (Saved.data.Slots[Slot].Activity[a].Members[mmb].Holding[hld].Type > 0)) {
Activity[NewAct].Members[mmb].Holding[hld] = {Type:Saved.data.Slots[Slot].Activity[a].Members[mmb].Holding[hld].Type, Amount:Saved.data.Slots[Slot].Activity[a].Members[mmb].Holding[hld].Amount};
} else {
Activity[NewAct].Members[mmb].Holding[hld] = 0;
}
hld++;
}
}
for (mmbr in Activity[NewAct].Members) {
Activity[NewAct].Members[mmbr].Group = Activity[NewAct];
UpdateMemberParams(Activity[NewAct].Members[mmbr]);
}
for (crg in Saved.data.Slots[Slot].Activity[a].Cargo) {
Activity[NewAct].Cargo[crg] = {Type:Saved.data.Slots[Slot].Activity[a].Cargo[crg].Type, Amount:Saved.data.Slots[Slot].Activity[a].Cargo[crg].Amount};
}
for (inv in Saved.data.Slots[Slot].Activity[a].Inventory) {
Activity[NewAct].Inventory[inv] = {Type:Saved.data.Slots[Slot].Activity[a].Inventory[inv].Type, Amount:Saved.data.Slots[Slot].Activity[a].Inventory[inv].Amount};
}
for (trn in Saved.data.Slots[Slot].Activity[a].Transport) {
Activity[NewAct].Transport[trn] = {Type:Saved.data.Slots[Slot].Activity[a].Transport[trn].Type, HP:Saved.data.Slots[Slot].Activity[a].Transport[trn].HP};
Activity[NewAct].Transport[trn].MaxHP = Transports[Activity[NewAct].Transports[trn].Type].MaxHP;
UpdateTransportParams(Activity[NewAct].Transport[trn]);
}
DistributeCarts(Activity[NewAct]);
Activity[NewAct].OverIt = Saved.data.Slots[Slot].Activity[a].OverIt;
switch (Activity[NewAct].Type) {
case 2 :
Activity[NewAct].InTheWay = Saved.data.Slots[Slot].Activity[a].InTheWay;
Activity[NewAct].CoveredDist = Saved.data.Slots[Slot].Activity[a].CoveredDist;
Activity[NewAct].Route = Saved.data.Slots[Slot].Activity[a].Route;
Activity[NewAct].CurrentPoint = Saved.data.Slots[Slot].Activity[a].CurrentPoint;
Activity[NewAct].TargetX = eval ("Map.Town" + Routes[Activity[NewAct].Route][Activity[NewAct].CurrentPoint].Town)._x;
Activity[NewAct].TargetY = eval ("Map.Town" + Routes[Activity[NewAct].Route][Activity[NewAct].CurrentPoint].Town)._y;
break;
case 3 :
Activity[NewAct].Payed = Saved.data.Slots[Slot].Activity[a].Payed;
break;
case 5 :
Activity[NewAct].Angle = Saved.data.Slots[Slot].Activity[a].Angle;
Activity[NewAct].Distance = Saved.data.Slots[Slot].Activity[a].Distance;
break;
case 6 :
Activity[NewAct].Phase = Saved.data.Slots[Slot].Activity[a].Phase;
Activity[NewAct].Phase1Target = {x:Saved.data.Slots[Slot].Activity[a].Phase1Target.x, y:Saved.data.Slots[Slot].Activity[a].Phase1Target.y};
Activity[NewAct].Phase2Target = {x:Saved.data.Slots[Slot].Activity[a].Phase2Target.x, y:Saved.data.Slots[Slot].Activity[a].Phase2Target.y};
break;
case 7 :
Activity[NewAct].Phase = Saved.data.Slots[Slot].Activity[a].Phase;
Activity[NewAct].Target = {x:Saved.data.Slots[Slot].Activity[a].Target.x, y:Saved.data.Slots[Slot].Activity[a].Target.y};
}
UpdateGroupParams(Activity[NewAct]);
UpdateGroupCargo(Activity[NewAct]);
}
Messages = new Array();
for (msg in Saved.data.Slots[Slot].Messages) {
Messages[msg] = new Object();
for (cp in Saved.data.Slots[Slot].Messages[msg]) {
Messages[msg][cp] = Saved.data.Slots[Slot].Messages[msg][cp];
}
}
News = new Array();
for (nws in Saved.data.Slots[Slot].News) {
News[nws] = new Object();
for (cp in Saved.data.Slots[Slot].News[nws]) {
News[nws][cp] = Saved.data.Slots[Slot].News[nws][cp];
}
}
LackingCaravans = new Array();
for (cp in Saved.data.Slots[Slot].LackingCaravans) {
LackingCaravans[cp] = Saved.data.Slots[Slot].LackingCaravans[cp];
}
if (Story.AllDone) {
Towns[6].Houses[12].Dialogue = 2;
}
}
function PrintObject(Obj, Level) {
var _local2 = "";
as = 1;
while (as <= Level) {
_local2 = _local2 + "-";
as++;
}
for (prpt in Obj) {
if ((Obj[prpt] instanceof Object) or (Obj[prpt] instanceof Array)) {
trace((_local2 + prpt) + " ->");
PrintObject(Obj[prpt], Level + 1);
} else {
trace(((_local2 + prpt) + ": ") + Obj[prpt]);
}
}
}
function CopyObject(ToObj, FromObj) {
for (prpt in FromObj) {
if ((FromObj[prpt] instanceof Object) or (FromObj[prpt] instanceof Array)) {
if (FromObj[prpt] instanceof Object) {
ToObj[prpt] = new Object();
}
if (FromObj[prpt] instanceof Array) {
ToObj[prpt] = new Array();
}
CopyObject(ToObj[prpt], FromObj[prpt]);
} else {
ToObj[prpt] = FromObj[prpt];
}
}
}
function FormatedTime(PDay, PMonth, PYear, PHour) {
if (isNaN(PDay)) {
ADay = Day;
} else {
ADay = PDay;
}
if (isNaN(PMonth)) {
AMonth = Month;
} else {
AMonth = PMonth;
}
if (isNaN(PYear)) {
AYear = Year;
} else {
AYear = PYear;
}
if (isNaN(PHour)) {
AHour = Hour;
} else {
AHour = PHour;
}
if (AYear >= 10) {
YearText = AYear;
} else {
YearText = "0" + AYear;
}
if (AHour <= 12) {
HourText = AHour + "AM";
} else {
HourText = (AHour - 12) + "PM";
}
if (AHour == 0) {
HourText = "12PM";
}
Res = (((((ADay + "-") + Months[AMonth].Name) + "-") + YearText) + " ") + HourText;
return(Res);
}
function AllButtons(MC, On) {
for (bb in MC) {
if (MC[bb] instanceof Button) {
MC[bb].enabled = On;
}
if ((MC[bb] instanceof MovieClip) and MC[bb]._visible) {
AllButtons(MC[bb], On);
}
}
}
function TimePeriod(Per) {
var _local1;
TM = Per % 54;
TM = Math.round(TM * 1.111);
TH = Math.floor(Per / 54);
TD = Math.floor(TH / 24);
TH = TH % 24;
_local1 = ((((TD + "d. ") + TH) + "h. ") + TM) + "m.";
return(_local1);
}
stop();
delete onEnterFrame;
OriginalID = undefined;
GameIndex = undefined;
GamePass = undefined;
YourChar = new Object();
GamePage = "http://www.sugar-free-games.com/showgame.php?game=849";
CreditsText = " <b>Copyright 2007, <u><a href='http://www.sugar-free-games.com' target='_blank'>Sugar-Free-Games.com</a></u> Story, graphics and programming by Dmitry Zheltobriukhov. Grammar corrections by Rosa Blanco. Music by Andrey Seriy (Eshtag) - <u><a href='http://www.anora-dimentia.com' target='_blank'>www.anora-dimentia.com</a></u> or <u><a href='http://myspace.com/anoradimentia' target='_blank'>myspace.com/anoradimentia</a></u> Special thanks to Moose Hole for in-depth testing.</b>";
CL1.autoSize = (CL2.autoSize = "left");
CL1.html = (CL2.html = true);
CL1.htmlText = CreditsText;
CL2.htmlText = CreditsText;
SkipWidth = CL1.textWidth;
CL1.htmlText = CL1.htmlText + CreditsText;
CL2.htmlText = CL2.htmlText + CreditsText;
this.onEnterFrame = function () {
CL1._x--;
CL2._x--;
if (CL1._x < (-SkipWidth)) {
CL1._x = CL1._x + SkipWidth;
CL2._x = CL2._x + SkipWidth;
}
};
GameMode = 1;
CompMode = undefined;
Loading = undefined;
VersionCode = "1_16";
OptionsMenu._visible = false;
OptionsMenu.FromMainMenu = true;
OptionsMenu.gotoAndStop(2);
PreSetChars = [Number.NaN, {Name:"Martin Milloshi", Healthiness:7, Agility:5, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:3, SkinColor:15850430, JacketColor:4605510, SleevesColor:4605510, PantsColor:2631720, HairColor:0}, {Name:"Selma Nilsson", Healthiness:4, Agility:8, Accuracy:6, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:5, LegType:3, HeadType:4, SkinColor:14665389, JacketColor:6797526, SleevesColor:6797526, PantsColor:8806, HairColor:16381672}, {Name:"Ahmed Ashrawi", Healthiness:6, Agility:6, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:1, LegType:1, HeadType:1, SkinColor:10782828, JacketColor:9079179, SleevesColor:9079179, SkirtColor:16777215, PantsColor:9079179, HairColor:722950}, {Name:"Jasmine Mahankali", Healthiness:3, Agility:9, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:5, LegType:5, HeadType:2, SkinColor:10252882, JacketColor:11520453, SleevesColor:11520453, PantsColor:8921702, HairColor:197379}, {Name:"Eko Bombata", Healthiness:10, Agility:4, Accuracy:5, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:3, SkinColor:5519905, JacketColor:11776690, SleevesColor:11776690, PantsColor:4473924, HairColor:0}, {Name:"Lisa Mitchell", Healthiness:6, Agility:8, Accuracy:6, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:6, ArmType:4, LegType:2, HeadType:7, SkinColor:8545608, JacketColor:16711165, SleevesColor:0, PantsColor:2245768, HairColor:526342}, {Name:"Lin Park", Healthiness:4, Agility:10, Accuracy:7, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:16572598, JacketColor:5081211, SleevesColor:5081211, PantsColor:3368567, HairColor:11706499}, {Name:"Kumiko Kobayashi", Healthiness:3, Agility:9, Accuracy:8, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:5, HeadType:2, SkinColor:15786187, JacketColor:4684179, SleevesColor:4684179, PantsColor:4684179, HairColor:1512980}, {Name:"Juan Miguel Ulloa", Healthiness:5, Agility:5, Accuracy:10, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:4, SkinColor:13146726, JacketColor:10057114, SleevesColor:10057114, PantsColor:8921719, HairColor:263172}, {Name:"Taipa Pell", Healthiness:4, Agility:8, Accuracy:9, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:5, HeadType:5, SkinColor:12091717, JacketColor:8947033, SleevesColor:8947033, PantsColor:8947033, HairColor:131329}];
var Saved = SharedObject.getLocal("Caravaneer");
if (!(Saved.data.Slots instanceof Array)) {
Saved.data.Slots = new Array();
}
Months = [Number.NaN, {Name:"Jan", Days:31}, {Name:"Feb", Days:28}, {Name:"Mar", Days:31}, {Name:"Apr", Days:30}, {Name:"May", Days:31}, {Name:"Jun", Days:30}, {Name:"Jul", Days:31}, {Name:"Aug", Days:31}, {Name:"Sep", Days:30}, {Name:"Oct", Days:31}, {Name:"Nov", Days:30}, {Name:"Dec", Days:31}];
Instance of Symbol 48 MovieClip in Frame 5
on (release) {
getURL ("http://caravaneer.gamesofhonor.com", "_blank");
}
Frame 6
delete onEnterFrame;
if (OnSite()) {
SM.gotoAndStop(1);
} else {
SM.gotoAndStop(2);
}
Frame 7
function SetSelection() {
Selection.setFocus("NameText");
Selection.setSelection(0, NameText.text.length);
}
function UpdateFromPreset() {
CharacterPortrait = CurrentPreset;
YourChar = new Object();
for (pr in PreSetChars[CharacterPortrait]) {
YourChar[pr] = PreSetChars[CharacterPortrait][pr];
}
Portrait.gotoAndStop(CharacterPortrait);
CharName = YourChar.Name;
this.onEnterFrame = function () {
SetSelection();
delete this.onEnterFrame;
};
SparePoints = 0;
UpdateButtons();
}
function ChangeValue(What, How) {
YourChar[ValueNames[What]] = YourChar[ValueNames[What]] + How;
SparePoints = SparePoints - How;
UpdateButtons();
}
function UpdateButtons() {
sb = 1;
while (sb <= 4) {
this["a" + sb].Digit = YourChar[ValueNames[sb]];
if ((SparePoints <= 0) or (YourChar[ValueNames[sb]] >= 10)) {
this["a" + sb].Plus.enabled = false;
this["a" + sb].BCover1._visible = true;
} else {
this["a" + sb].Plus.enabled = true;
this["a" + sb].BCover1._visible = false;
}
if (YourChar[ValueNames[sb]] <= 1) {
this["a" + sb].Minus.enabled = false;
this["a" + sb].BCover2._visible = true;
} else {
this["a" + sb].Minus.enabled = true;
this["a" + sb].BCover2._visible = false;
}
sb++;
}
}
function Done() {
YourChar.Name = CharName;
for (prmt in PreSetChars[CharacterPortrait]) {
if (((((prmt != "Name") and (prmt != "Healthiness")) and (prmt != "Agility")) and (prmt != "Accuracy")) and (prmt != "Intelligence")) {
YourChar[prmt] = PreSetChars[CharacterPortrait][prmt];
}
}
NameText.removeTextField();
if (GameMode == 1) {
gotoAndStop ("Your Story");
} else {
gotoAndPlay ("Initiate");
}
}
stop();
delete onEnterFrame;
PreSetChars = [Number.NaN, {Name:"Martin Milloshi", Healthiness:7, Agility:5, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:3, SkinColor:15850430, JacketColor:4605510, SleevesColor:4605510, PantsColor:2631720, HairColor:0}, {Name:"Selma Nilsson", Healthiness:4, Agility:8, Accuracy:6, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:5, LegType:3, HeadType:4, SkinColor:14665389, JacketColor:6797526, SleevesColor:6797526, PantsColor:8806, HairColor:16381672}, {Name:"Ahmed Ashrawi", Healthiness:6, Agility:6, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:1, LegType:1, HeadType:1, SkinColor:10782828, JacketColor:9079179, SleevesColor:9079179, SkirtColor:16777215, PantsColor:9079179, HairColor:722950}, {Name:"Jasmine Mahankali", Healthiness:3, Agility:9, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:5, LegType:5, HeadType:2, SkinColor:10252882, JacketColor:11520453, SleevesColor:11520453, PantsColor:8921702, HairColor:197379}, {Name:"Eko Bombata", Healthiness:10, Agility:4, Accuracy:5, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:3, SkinColor:5519905, JacketColor:11776690, SleevesColor:11776690, PantsColor:4473924, HairColor:0}, {Name:"Lisa Mitchell", Healthiness:6, Agility:8, Accuracy:6, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:6, ArmType:4, LegType:2, HeadType:7, SkinColor:8545608, JacketColor:16711165, SleevesColor:0, PantsColor:2245768, HairColor:526342}, {Name:"Lin Park", Healthiness:4, Agility:10, Accuracy:7, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:16572598, JacketColor:5081211, SleevesColor:5081211, PantsColor:3368567, HairColor:11706499}, {Name:"Kumiko Kobayashi", Healthiness:3, Agility:9, Accuracy:8, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:5, HeadType:2, SkinColor:15786187, JacketColor:4684179, SleevesColor:4684179, PantsColor:4684179, HairColor:1512980}, {Name:"Juan Miguel Ulloa", Healthiness:5, Agility:5, Accuracy:10, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:4, SkinColor:13146726, JacketColor:10057114, SleevesColor:10057114, PantsColor:8921719, HairColor:263172}, {Name:"Taipa Pell", Healthiness:4, Agility:8, Accuracy:9, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:5, HeadType:5, SkinColor:12091717, JacketColor:8947033, SleevesColor:8947033, PantsColor:8947033, HairColor:131329}];
CurrentPreset = 1;
ValueNames = [undefined, "Healthiness", "Agility", "Accuracy", "Intelligence"];
sb = 1;
while (sb <= 4) {
this["a" + sb].Index = sb;
this["a" + sb].Plus.onPress = function () {
ChangeValue(this._parent.Index, 1);
};
this["a" + sb].Minus.onPress = function () {
ChangeValue(this._parent.Index, -1);
};
sb++;
}
UpdateFromPreset();
PreSetName = PreSetChars[CurrentPreset].Name;
PreSetIcon.gotoAndStop(CurrentPreset);
var my_fmt = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "Arial";
my_fmt.color = 0;
my_fmt.align = "center";
my_fmt.bold = true;
my_fmt.size = 12;
this.createTextField("NameText", this.getNextHighestDepth(), 158.1, 313, 173.9, 19.9);
NameText.type = "input";
NameText.maxChars = 20;
NameText.variable = "CharName";
NameText.setNewTextFormat(my_fmt);
NameText.text = YourChar.Name;
Frame 9
if (!MusicStarted) {
Mus.start(0, 100000000);
MusicStarted = true;
}
Key.removeListener(KeyListener);
Competitive = {PlayTime:0, Kills:0};
LackingCaravans = new Array();
Story = {MacCoySendsRegards:false, TalkedToMacCoy:false, RBaseDestroyed:false, RBaseVisited:false, EngineerKilled:false, SentToBase:false, RemovedDPCrew:false, SentToCaravanX:false, CaravanXDestroyed:false, SpokeToFrancesca:false, BeenToTheBase:false, DoneWithPass:false, PassReturned:false, HavePass:false, RaffSendsYou:false, HaveLetter:false, SDInProgress:false, PowerOff:false, SystemLocked:false, SentToDisableMissiles:false, SentToDisableMissiles2:false, MissilesDisabled:false, TalkedToTheGeneral:false, HaveTheBook:false, HaveTheManual:false, HaveSniper:false, AllDone:false};
News = [{Type:2, Time:"2-Mar-01 12AM", Route:9}, {Type:1, Time:"23-Feb-01 6PM", Route:9, ByWhom:1}];
GameSpeed = 2;
BattleSpeed = 2;
MusicOn = true;
FXOn = true;
FirstTime = true;
Messages = new Array();
MedsUse = 2;
PoliceStatus = 0;
MilitiaStatus = 0;
MSSpeed = (MSSpeed1 = 15);
MSSpeed2 = 25;
MoveScreen = 0;
SwitchCharSpeed = 50;
Directions = [{x:0, y:-1}, {x:1, y:0}, {x:0, y:1}, {x:-1, y:0}];
EightDirs = [{x:0, y:-1}, {x:1, y:-1}, {x:1, y:0}, {x:1, y:1}, {x:0, y:1}, {x:-1, y:1}, {x:-1, y:0}, {x:-1, y:-1}];
WpnModeNames = [Number.NaN, "Quick Shot", "Aimed Shot", "3 Round Burst", "5 Round Burst", "10 Round Burst", "Throw", "Launch", "Hit"];
HairColors = [0, 5388836, 7559991, 9862734, 14737058, 16447954, 12749857, 16711680, 65280, 255];
SkinColors = [16775141, 16114623, 15454882, 13743485, 11243092, 9069871, 6899736, 4204548, 16768445, 16248001];
People = [YourChar, {Name:"Martynas Baranauskas", Healthiness:7, Agility:6, Accuracy:6, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:500, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:14138018, JacketColor:6521970, SleevesColor:6521970, PantsColor:6710886, HairColor:7822661, Salary:720}, {Name:"Najib Al Habash ", Healthiness:4, Agility:8, Accuracy:5, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:11701346, JacketColor:10461087, SleevesColor:10461087, PantsColor:8947848, HairColor:1840655, Salary:550}, {Name:"Ramon Montoya", Healthiness:8, Agility:5, Accuracy:4, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:1, SkinColor:12096368, JacketColor:3684409, SleevesColor:3684409, PantsColor:16764074, HairColor:1709586, Salary:650}, {Name:"Milena Vaculik", Healthiness:3, Agility:7, Accuracy:4, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:6, ArmType:4, LegType:2, HeadType:4, SkinColor:14009764, JacketColor:8939042, SleevesColor:0, PantsColor:8806, HairColor:723464, Salary:460}, {Name:"Pedro Rodriguez", Healthiness:6, Agility:5, Accuracy:6, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:13940887, JacketColor:12248309, SleevesColor:12248309, PantsColor:2236962, HairColor:1446672, Salary:520}, {Name:"Arabella Bakker", Healthiness:7, Agility:5, Accuracy:5, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:6, ArmType:4, LegType:2, HeadType:6, SkinColor:13809021, JacketColor:9224062, SleevesColor:0, PantsColor:4482696, HairColor:16249776, Salary:580}, {Name:"Constantin Sorescu", Healthiness:8, Agility:4, Accuracy:6, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:1, SkinColor:15912363, JacketColor:11222080, SleevesColor:11222080, PantsColor:1327978, HairColor:1327978, Salary:560}, {Name:"Bataar Hulan", Healthiness:9, Agility:4, Accuracy:4, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:4, ArmType:2, LegType:1, HeadType:3, SkinColor:10783855, JacketColor:16776958, SleevesColor:0, PantsColor:2236962, HairColor:0, Salary:640}, {Name:"Angela Cordoba", Healthiness:3, Agility:6, Accuracy:4, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:1500, MechanicExperience:0, BodyType:5, ArmType:6, LegType:3, HeadType:1, SkinColor:12034432, JacketColor:14671839, SleevesColor:14671839, PantsColor:8947848, HairColor:1381652, Salary:850}, {Name:"Jozef Kralik", Healthiness:6, Agility:5, Accuracy:5, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:15322040, JacketColor:8299987, SleevesColor:8299987, PantsColor:5583616, HairColor:3946035, Salary:620}, {Name:"Pakuna Whirlwindhorse", Healthiness:4, Agility:7, Accuracy:6, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:5, HeadType:4, SkinColor:9533532, JacketColor:3434817, SleevesColor:3434817, PantsColor:2263040, HairColor:3814192, Salary:680}, {Name:"James Brown", Healthiness:6, Agility:5, Accuracy:6, Intelligence:5, SniperExperience:50, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:200, BodyType:2, ArmType:1, LegType:1, HeadType:1, HatType:1, SkinColor:15519145, JacketColor:8146754, SleevesColor:8146754, SkirtColor:3365501, PantsColor:8806, HairColor:7162943, HatColor:2904429, Salary:950}, {Name:"William Steward", Healthiness:5, Agility:6, Accuracy:8, Intelligence:4, SniperExperience:500, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:3, HatType:2, HatColor:15987165, SkinColor:14006431, JacketColor:9453118, SleevesColor:9453118, PantsColor:2245768, HairColor:0, Salary:1300}, {Name:"Jorge Arbusto", Healthiness:4, Agility:4, Accuracy:6, Intelligence:0, SniperExperience:400, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:6, LegType:1, HeadType:1, SkinColor:13279626, JacketColor:10255163, SkirtColor:14276822, SleevesColor:14276822, PantsColor:17544, HairColor:14276822, Salary:1000}, {Name:"Hendrik Peeterson", Healthiness:5, Agility:6, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:6, LegType:1, HeadType:1, SkinColor:15455420, JacketColor:9265978, SkirtColor:11908790, SleevesColor:11908790, PantsColor:4469504, HairColor:4471607, Salary:850}, {Name:"Ralf Schneider", Healthiness:5, Agility:5, Accuracy:7, Intelligence:8, SniperExperience:0, DoctorExperience:500, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:1, LegType:1, HeadType:3, SkinColor:15259305, JacketColor:4539717, SleevesColor:4539717, SkirtColor:16645629, PantsColor:4539717, HairColor:0, Salary:1500}, {Name:"Eithan Cohen", Healthiness:4, Agility:6, Accuracy:6, Intelligence:9, SniperExperience:0, DoctorExperience:100, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:15323812, JacketColor:16412, SleevesColor:16412, PantsColor:2236962, HairColor:16412, Salary:1300}, {Name:"Maxim Salenko", Healthiness:7, Agility:5, Accuracy:6, Intelligence:3, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:500, BodyType:1, ArmType:1, LegType:1, HeadType:1, SkinColor:16374979, JacketColor:7838903, SleevesColor:7838903, PantsColor:7838903, HairColor:12694690, Salary:1350}, {Name:"Yafeu Ogego", Healthiness:8, Agility:6, Accuracy:8, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:3, SkinColor:6376504, JacketColor:16777215, SleevesColor:16777215, PantsColor:2236962, HairColor:0, Salary:1520}, {Name:"Michele Fournier", Healthiness:5, Agility:5, Accuracy:6, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:3, HeadType:4, SkinColor:16640735, JacketColor:11963807, SleevesColor:11963807, PantsColor:11963807, HairColor:6245173, Salary:1250}, {Name:"Catherine Perdue", Healthiness:6, Agility:7, Accuracy:8, Intelligence:7, SniperExperience:200, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:6, ArmType:4, LegType:2, HeadType:7, SkinColor:13670768, JacketColor:9015647, SleevesColor:0, PantsColor:2245768, HairColor:4406069, Salary:1740}, {Name:"Vincenzo Gobetti", Healthiness:4, Agility:4, Accuracy:6, Intelligence:5, SniperExperience:200, DoctorExperience:200, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:1, LegType:1, HeadType:1, SkinColor:13345662, JacketColor:8022108, SleevesColor:8022108, PantsColor:8022108, SkirtColor:14620704, HairColor:8288372, Salary:1220}, {Name:"Wolfgang Muller", Healthiness:5, Agility:7, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:15916482, JacketColor:10144737, SleevesColor:10144737, PantsColor:2234368, HairColor:394500, Salary:1680}, {Name:"Niele Ali'ikai", Healthiness:6, Agility:6, Accuracy:5, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:5, LegType:5, HeadType:4, SkinColor:12161379, JacketColor:16427468, SleevesColor:16427468, PantsColor:16427468, HairColor:2433564, Salary:1450}, {Name:"Olaf Berg", Healthiness:4, Agility:6, Accuracy:6, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:3, SkinColor:15190444, JacketColor:15329758, SleevesColor:15329758, PantsColor:16772812, HairColor:0, Salary:1310}, {Name:"Mahmoud Zenawi", Healthiness:8, Agility:6, Accuracy:5, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:3, SkinColor:8548187, JacketColor:10143637, SleevesColor:10143637, PantsColor:2236928, HairColor:0, Salary:1550}, {Name:"Nicolae Maiorescu", Healthiness:7, Agility:5, Accuracy:6, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:1, SkinColor:10143637, JacketColor:10789304, SleevesColor:10789304, PantsColor:8939008, HairColor:6309936, Salary:1730}, {Name:"Vasily Rubanov", Healthiness:5, Agility:6, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:3, SkinColor:15124649, JacketColor:8758706, SleevesColor:8758706, PantsColor:4469504, HairColor:0, Salary:1500}, {Name:"Johann Hoffmann", Healthiness:3, Agility:5, Accuracy:2, Intelligence:8, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:5, LegType:1, HeadType:1, SkinColor:13609607, JacketColor:12367479, SleevesColor:12367479, PantsColor:4473924, HairColor:10713938, Salary:1200}, {Name:"Golapi Abarba", Healthiness:6, Agility:9, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:2, HeadType:4, SkinColor:12685916, JacketColor:22925, SleevesColor:22925, PantsColor:8840, HairColor:263172, Salary:1950}, {Name:"Huang Xun", Healthiness:5, Agility:7, Accuracy:5, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:13221538, JacketColor:5662613, SleevesColor:5662613, PantsColor:5662613, HairColor:855308, Salary:1320}, {Name:"Hans Jacobsen", Healthiness:6, Agility:5, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:3, SkinColor:15388584, JacketColor:8092539, SleevesColor:8092539, PantsColor:2236962, HairColor:0, Salary:1560}, {Name:"Bashasha Ta'anari", Healthiness:2, Agility:7, Accuracy:4, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:5, HeadType:7, SkinColor:12954514, JacketColor:8141631, SleevesColor:8141631, PantsColor:8141631, HairColor:131586, Salary:1320}, {Name:"Mary Wilson", Healthiness:4, Agility:10, Accuracy:5, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:4, LegType:3, HeadType:6, SkinColor:15586231, JacketColor:8992569, SleevesColor:0, PantsColor:16768460, HairColor:16445916, Salary:1120}, {Name:"John Harris", Healthiness:9, Agility:4, Accuracy:5, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:16445916, JacketColor:13021851, SleevesColor:13021851, PantsColor:4469504, HairColor:6442293, Salary:950}, {Name:"Cian O'Bryen", Healthiness:5, Agility:5, Accuracy:7, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:1, LegType:1, HeadType:1, SkinColor:13939600, JacketColor:24096, SleevesColor:24096, PantsColor:24096, SkirtColor:14803425, HairColor:7690307, Salary:1100}, {Name:"Negasso Araya", Healthiness:7, Agility:6, Accuracy:8, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:7490596, JacketColor:12354618, SleevesColor:12354618, PantsColor:16772812, HairColor:65536, Salary:1250}, {Name:"Ludwig Menasse", Healthiness:6, Agility:5, Accuracy:7, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:14859154, JacketColor:11457398, SleevesColor:11457398, PantsColor:34986, HairColor:4932416, Salary:1200}, {Name:"Astrid Larsson", Healthiness:5, Agility:7, Accuracy:6, Intelligence:5, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:6, LegType:4, HeadType:1, SkinColor:13611411, JacketColor:7776163, SleevesColor:7776163, PantsColor:26214, HairColor:15395289, Salary:1050}, {Name:"Galina Yevseyeva", Healthiness:3, Agility:5, Accuracy:3, Intelligence:8, SniperExperience:0, DoctorExperience:500, VeterinaryExperience:200, MechanicExperience:0, BodyType:3, ArmType:6, LegType:3, HeadType:2, SkinColor:14795678, JacketColor:8521480, SleevesColor:8521480, PantsColor:10061943, HairColor:11570278, Salary:970}, {Name:"Robbie McNeill", Healthiness:5, Agility:6, Accuracy:2, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:1, SkinColor:15257278, JacketColor:8022881, SleevesColor:8022881, PantsColor:8944240, HairColor:7822919, Salary:900}, {Name:"Gina Mason", Healthiness:6, Agility:3, Accuracy:5, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:6, ArmType:5, LegType:2, HeadType:7, SkinColor:6768680, JacketColor:1816237, SleevesColor:1816237, PantsColor:2236962, HairColor:131329, Salary:980}, {Name:"Oskar Simberg", Healthiness:5, Agility:7, Accuracy:8, Intelligence:6, SniperExperience:40, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:1, LegType:1, HeadType:1, SkinColor:14664871, JacketColor:3553078, SleevesColor:3553078, PantsColor:3553078, SkirtColor:16185334, HairColor:16114890, Salary:1400}, {Name:"Marta Llompart", Healthiness:6, Agility:7, Accuracy:4, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:5, LegType:4, HeadType:4, SkinColor:15125941, JacketColor:12869271, SleevesColor:12869271, PantsColor:8912896, HairColor:8480588, Salary:1000}, {Name:"Francesco Manzoni", Healthiness:7, Agility:5, Accuracy:6, Intelligence:5, SniperExperience:1000, DoctorExperience:100, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:14202774, JacketColor:3038789, SleevesColor:3038789, PantsColor:34816, HairColor:7365722, Salary:2000}, {Name:"Hassan Tahiri", Healthiness:6, Agility:5, Accuracy:7, Intelligence:3, SniperExperience:800, DoctorExperience:200, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:1, SkinColor:10388838, JacketColor:8242551, SleevesColor:8242551, PantsColor:34816, HairColor:789001, Salary:1800}, {Name:"Miroslav Lazarevic", Healthiness:7, Agility:7, Accuracy:9, Intelligence:6, SniperExperience:600, DoctorExperience:100, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:3, HatType:1, SkinColor:13809043, JacketColor:11312251, SleevesColor:11312251, PantsColor:8939076, HairColor:0, HatColor:10920564, Salary:3200}, {Name:"Ana Ferrero", Healthiness:6, Agility:9, Accuracy:8, Intelligence:7, SniperExperience:400, DoctorExperience:500, VeterinaryExperience:0, MechanicExperience:0, BodyType:5, ArmType:4, LegType:2, HeadType:2, SkinColor:12359279, JacketColor:10661472, SleevesColor:0, PantsColor:2263057, HairColor:3154465, Salary:3300}, {Name:"Stewart MacLean", Healthiness:10, Agility:4, Accuracy:7, Intelligence:3, SniperExperience:500, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:13875356, JacketColor:11183453, SleevesColor:11183453, PantsColor:4491298, HairColor:8741182, Salary:3000}, {Name:"Thich Nhat Co", Healthiness:6, Agility:10, Accuracy:8, Intelligence:6, SniperExperience:500, DoctorExperience:20, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:6, LegType:1, HeadType:1, SkinColor:11176811, JacketColor:10795399, SleevesColor:10795399, PantsColor:10795399, HairColor:5523262, Salary:3000}, {Name:"Ferdinand Vieira", Healthiness:8, Agility:7, Accuracy:8, Intelligence:5, SniperExperience:600, DoctorExperience:100, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:13808286, JacketColor:8289892, SleevesColor:8289892, PantsColor:8289892, HairColor:4602937, Salary:3100}, {Name:"Madis Kivikas", Healthiness:3, Agility:4, Accuracy:6, Intelligence:10, SniperExperience:0, DoctorExperience:5000, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:6, LegType:1, HeadType:1, SkinColor:8289892, JacketColor:13156250, SleevesColor:13156250, PantsColor:13156250, HairColor:12829378, SkirtColor:9881565, Salary:4000}, {Name:"Ingrid Bergmann", Healthiness:4, Agility:7, Accuracy:5, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:7, ArmType:4, LegType:4, HeadType:6, SkinColor:15323839, JacketColor:11584472, SleevesColor:0, PantsColor:17544, HairColor:15702462, Salary:1000}, {Name:"Baruch Jestespanski", Healthiness:4, Agility:6, Accuracy:3, Intelligence:8, SniperExperience:0, DoctorExperience:100, VeterinaryExperience:500, MechanicExperience:0, BodyType:2, ArmType:6, LegType:1, HeadType:1, HatType:2, SkinColor:12229497, JacketColor:4013374, SleevesColor:4013374, PantsColor:4013374, SkirtColor:16777215, HairColor:5983813, HatColor:4013374, Salary:1500}, {Name:"Muhammed Al-Karachi", Healthiness:6, Agility:4, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:4, SkinColor:9003082, JacketColor:9003082, SleevesColor:9003082, PantsColor:9003082, HairColor:15856113, Salary:1600}, {Name:"Brian Brooks", Healthiness:6, Agility:7, Accuracy:4, Intelligence:4, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:3, LegType:1, HeadType:1, SkinColor:15856113, JacketColor:13813777, SleevesColor:13813777, PantsColor:8912896, HairColor:12074046, Salary:1750}, {Name:"Linda Naruszewicz", Healthiness:4, Agility:7, Accuracy:6, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:7, ArmType:4, LegType:6, HeadType:4, SkinColor:13081453, JacketColor:11879222, SleevesColor:0, PantsColor:11879222, HairColor:15855570, Salary:1800}, {Name:"Pierre Bernard", Healthiness:5, Agility:7, Accuracy:6, Intelligence:6, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:5, LegType:1, HeadType:4, SkinColor:16508364, JacketColor:3552822, SleevesColor:3552822, PantsColor:3552822, HairColor:1578774, Salary:2300}, {Name:"Luis Alberto Gimenez", Healthiness:7, Agility:6, Accuracy:8, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:1, ArmType:1, LegType:1, HeadType:2, SkinColor:11366967, JacketColor:10686226, SleevesColor:10686226, PantsColor:8943411, HairColor:591879, Salary:2500}, {Name:"Edward Jackson", Healthiness:8, Agility:6, Accuracy:9, Intelligence:7, SniperExperience:0, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:4000, BodyType:1, ArmType:1, LegType:1, HeadType:3, HatType:1, SkinColor:5323561, JacketColor:5340324, SleevesColor:5340324, PantsColor:5340324, HatColor:5340324, HairColor:0, Salary:3500}, {Name:"Kinaki Nakamura", Healthiness:6, Agility:6, Accuracy:10, Intelligence:8, SniperExperience:500, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:6, LegType:1, HeadType:1, SkinColor:14858637, JacketColor:6710886, SleevesColor:6710886, PantsColor:6710886, SkirtColor:16777215, HairColor:1381395, Salary:3800}, {Name:"Combat Engineer", Healthiness:6, Agility:8, Accuracy:8, Intelligence:8, SniperExperience:500, DoctorExperience:500, VeterinaryExperience:0, MechanicExperience:10000, BodyType:2, ArmType:6, LegType:1, HeadType:3, HatType:1, SkinColor:12096620, JacketColor:3377152, SleevesColor:3377152, PantsColor:3377152, HatColor:3377152, SkirtColor:5614131, Special:true, Salary:0}, {Name:"Sniper", Healthiness:5, Agility:6, Accuracy:10, Intelligence:8, SniperExperience:10000, DoctorExperience:0, VeterinaryExperience:0, MechanicExperience:0, BodyType:2, ArmType:2, LegType:1, HeadType:3, SkinColor:14662293, JacketColor:3552822, SleevesColor:3552822, PantsColor:3552822, SkirtColor:13882323, Special:true, Salary:0}, {Name:"DP Soldier", Healthiness:8, Agility:9, Accuracy:10, Intelligence:8, SniperExperience:5000, DoctorExperience:500, VeterinaryExperience:200, MechanicExperience:1000, BodyType:1, ArmType:6, LegType:1, HeadType:3, HatType:1, SkinColor:12096620, JacketColor:3377152, SleevesColor:3377152, PantsColor:3377152, HatColor:3377152, Special:true, Salary:0}, {Name:"DP Soldier", Healthiness:10, Agility:8, Accuracy:10, Intelligence:6, SniperExperience:3000, DoctorExperience:100, VeterinaryExperience:300, MechanicExperience:200, BodyType:1, ArmType:1, LegType:1, HeadType:3, HatType:1, SkinColor:12096620, JacketColor:3377152, SleevesColor:3377152, PantsColor:3377152, HatColor:3377152, Special:true, Salary:0}];
for (ai in People) {
People[ai].Index = ai;
}
Towns = [Number.NaN, {Name:"Smerd", Population:552, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:520}, {Type:2, MaxAmount:960}, {Type:3, MaxAmount:1540}, {Type:4, MaxAmount:380}, {Type:5, MaxAmount:560}, {Type:6, MaxAmount:3590}, {Type:7, MaxAmount:2720}, {Type:8, MaxAmount:4735}, {Type:9, MaxAmount:645}, {Type:10, MaxAmount:636}, {Type:11, MaxAmount:55}, {Type:12, MaxAmount:82}, {Type:13, MaxAmount:95}, {Type:14, MaxAmount:12}, {Type:15, MaxAmount:20}, {Type:16, MaxAmount:4}, {Type:17, MaxAmount:4}, {Type:18, MaxAmount:5}, {Type:19, MaxAmount:75}, {Type:20, MaxAmount:55}, {Type:21, MaxAmount:8}, {Type:22, MaxAmount:18}, {Type:23, MaxAmount:8}, {Type:24, MaxAmount:10}, {Type:25, MaxAmount:22}, {Type:26, MaxAmount:4}, {Type:27, MaxAmount:2}, {Type:28, MaxAmount:9}, {Type:29, MaxAmount:4}, {Type:30, MaxAmount:10}, {Type:34, MaxAmount:4}, {Type:35, MaxAmount:15}, {Type:36, MaxAmount:28}, {Type:37, MaxAmount:25}, {Type:38, MaxAmount:4}, {Type:39, MaxAmount:3}, {Type:40, MaxAmount:2}, {Type:41, MaxAmount:45}, {Type:42, MaxAmount:5}, {Type:43, MaxAmount:6}, {Type:44, MaxAmount:10}, {Type:45, MaxAmount:8}, {Type:46, MaxAmount:4}, {Type:47, MaxAmount:5}, {Type:48, MaxAmount:4}, {Type:51, MaxAmount:8}, {Type:52, MaxAmount:12}, {Type:53, MaxAmount:75}, {Type:54, MaxAmount:90}, {Type:55, MaxAmount:10}, {Type:57, MaxAmount:2}, {Type:58, MaxAmount:2}, {Type:59, MaxAmount:2}, {Type:60, MaxAmount:2}, {Type:61, MaxAmount:20}, {Type:62, MaxAmount:25}, {Type:63, MaxAmount:12}, {Type:70, MaxAmount:20}, {Type:71, MaxAmount:4}, {Type:72, MaxAmount:12}, {Type:74, MaxAmount:25}, {Type:75, MaxAmount:5}, {Type:76, MaxAmount:4}, {Type:77, MaxAmount:4}, {Type:82, MaxAmount:3}, {Type:80, MaxAmount:5}, {Type:81, MaxAmount:2}]}, {Type:3, Name:"Clinic", SubType:1, HealPrice:10}, {Type:2, Name:"Transport Shop", SubType:2, Assortment:[{Type:10, MaxAmount:8}, {Type:11, MaxAmount:4}, {Type:12, MaxAmount:9}, {Type:13, MaxAmount:16}, {Type:14, MaxAmount:8}, {Type:15, MaxAmount:8}, {Type:16, MaxAmount:8}, {Type:17, MaxAmount:2}]}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:13}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:9}, {Type:8, Name:"Well"}, {Type:5, Name:"Pierre Seton's House", Revealed:false, Dialogue:5}], Industries:[{Type:5, Production:673}, {Type:11, Production:2112}, {Type:14, Production:1513}, {Type:9, Production:563}], Property:[{Type:1, Amount:21574}, {Type:2, Amount:1569}, {Type:3, Amount:18931}, {Type:5, Amount:1913}, {Type:9, Amount:12561}, {Type:4, Amount:1867}, {Type:10, Amount:0}, {Type:13, Amount:3872}], Citizens:[People[39], People[40], People[41], People[42], People[43], People[44]], Money:39953, OtherPrice:1.2, WpnPrice:1, AmmoPrice:0.9, ArmPrice:0.95, WaterPrice:0.1, AnimalsPrice:1.2, CartsPrice:1.1, CarsPrice:1, Motorized:true}, {Name:"Abu Kirdyk", Population:129, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:950}, {Type:2, MaxAmount:3120}, {Type:3, MaxAmount:1120}, {Type:4, MaxAmount:997}, {Type:5, MaxAmount:1850}, {Type:6, MaxAmount:3120}, {Type:7, MaxAmount:2965}, {Type:8, MaxAmount:1570}, {Type:9, MaxAmount:950}, {Type:10, MaxAmount:820}, {Type:13, MaxAmount:125}, {Type:15, MaxAmount:68}, {Type:19, MaxAmount:75}, {Type:20, MaxAmount:10}, {Type:22, MaxAmount:78}, {Type:23, MaxAmount:12}, {Type:24, MaxAmount:8}, {Type:25, MaxAmount:80}, {Type:26, MaxAmount:4}, {Type:27, MaxAmount:4}, {Type:36, MaxAmount:88}, {Type:37, MaxAmount:92}, {Type:40, MaxAmount:4}, {Type:44, MaxAmount:8}, {Type:54, MaxAmount:250}, {Type:61, MaxAmount:75}, {Type:62, MaxAmount:12}, {Type:63, MaxAmount:2}, {Type:69, MaxAmount:20}, {Type:70, MaxAmount:15}, {Type:73, MaxAmount:10}, {Type:74, MaxAmount:10}, {Type:82, MaxAmount:2}]}, {Type:3, Name:"Clinic", SubType:1, HealPrice:8}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:14}, {Type:8, Name:"Well"}], Industries:[{Type:1, Production:140}, {Type:2, Production:140}, {Type:3, Production:25}, {Type:9, Production:194}, {Type:12, Production:782}], Property:[{Type:1, Amount:2542}, {Type:2, Amount:836}, {Type:3, Amount:1286}, {Type:5, Amount:113}, {Type:8, Amount:56}, {Type:11, Amount:0}, {Type:9, Amount:1356}], Citizens:[People[27], People[28]], Money:7561, OtherPrice:1.1, WpnPrice:1.3, AmmoPrice:1.2, ArmPrice:1.1, WaterPrice:0, AnimalsPrice:1.1, CartsPrice:1, CarsPrice:1.1, Motorized:true}, {Name:"Masriah", Population:412, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:150}, {Type:2, MaxAmount:540}, {Type:3, MaxAmount:990}, {Type:4, MaxAmount:145}, {Type:5, MaxAmount:90}, {Type:6, MaxAmount:420}, {Type:7, MaxAmount:560}, {Type:8, MaxAmount:120}, {Type:9, MaxAmount:150}, {Type:10, MaxAmount:782}, {Type:13, MaxAmount:25}, {Type:15, MaxAmount:32}, {Type:19, MaxAmount:65}, {Type:20, MaxAmount:44}, {Type:22, MaxAmount:25}, {Type:25, MaxAmount:24}, {Type:36, MaxAmount:28}, {Type:37, MaxAmount:35}, {Type:41, MaxAmount:35}, {Type:52, MaxAmount:4}, {Type:53, MaxAmount:25}, {Type:54, MaxAmount:65}, {Type:61, MaxAmount:20}, {Type:62, MaxAmount:10}, {Type:58, MaxAmount:8}, {Type:68, MaxAmount:8}, {Type:69, MaxAmount:2}, {Type:70, MaxAmount:12}, {Type:79, MaxAmount:4}, {Type:73, MaxAmount:4}, {Type:74, MaxAmount:20}, {Type:82, MaxAmount:4}]}, {Type:3, Name:"Hospital", SubType:1, HealPrice:12}, {Type:2, Name:"Farm", SubType:2, Assortment:[{Type:1, MaxAmount:12}, {Type:2, MaxAmount:16}, {Type:3, MaxAmount:8}, {Type:4, MaxAmount:24}, {Type:6, MaxAmount:16}]}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:10}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:13}, {Type:8, Name:"Well"}], Industries:[{Type:1, Production:118}, {Type:3, Production:37}, {Type:9, Production:572}, {Type:7, Production:95}, {Type:2, Production:567}, {Type:6, Production:1113}, {Type:14, Production:1105}], Property:[{Type:1, Amount:10540}, {Type:2, Amount:3215}, {Type:3, Amount:5863}, {Type:5, Amount:1230}, {Type:9, Amount:15564}, {Type:7, Amount:892}, {Type:6, Amount:4113}, {Type:13, Amount:2884}], Citizens:[People[34], People[35], People[36], People[37], People[38]], Money:18965, OtherPrice:1.15, WpnPrice:1, AmmoPrice:0.9, ArmPrice:1.2, WaterPrice:0.1, AnimalsPrice:0.9, CartsPrice:1, CarsPrice:1.1, Motorized:true}, {Name:"Fort Goks", Population:641, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shopping Center", SubType:1, Assortment:[{Type:1, MaxAmount:1950}, {Type:2, MaxAmount:2550}, {Type:3, MaxAmount:1825}, {Type:4, MaxAmount:1780}, {Type:5, MaxAmount:2290}, {Type:6, MaxAmount:5780}, {Type:7, MaxAmount:4950}, {Type:8, MaxAmount:7320}, {Type:9, MaxAmount:5120}, {Type:10, MaxAmount:2120}, {Type:11, MaxAmount:385}, {Type:12, MaxAmount:586}, {Type:13, MaxAmount:695}, {Type:14, MaxAmount:16}, {Type:15, MaxAmount:24}, {Type:16, MaxAmount:18}, {Type:17, MaxAmount:25}, {Type:18, MaxAmount:35}, {Type:19, MaxAmount:125}, {Type:20, MaxAmount:95}, {Type:21, MaxAmount:25}, {Type:22, MaxAmount:48}, {Type:23, MaxAmount:28}, {Type:24, MaxAmount:30}, {Type:25, MaxAmount:45}, {Type:26, MaxAmount:25}, {Type:27, MaxAmount:30}, {Type:28, MaxAmount:50}, {Type:29, MaxAmount:25}, {Type:30, MaxAmount:40}, {Type:31, MaxAmount:4}, {Type:32, MaxAmount:2}, {Type:33, MaxAmount:20}, {Type:34, MaxAmount:25}, {Type:35, MaxAmount:25}, {Type:36, MaxAmount:55}, {Type:37, MaxAmount:65}, {Type:38, MaxAmount:24}, {Type:39, MaxAmount:25}, {Type:40, MaxAmount:12}, {Type:41, MaxAmount:75}, {Type:42, MaxAmount:12}, {Type:43, MaxAmount:20}, {Type:44, MaxAmount:35}, {Type:45, MaxAmount:8}, {Type:46, MaxAmount:12}, {Type:47, MaxAmount:8}, {Type:48, MaxAmount:4}, {Type:50, MaxAmount:2}, {Type:51, MaxAmount:25}, {Type:52, MaxAmount:30}, {Type:53, MaxAmount:350}, {Type:54, MaxAmount:420}, {Type:55, MaxAmount:50}, {Type:56, MaxAmount:20}, {Type:57, MaxAmount:25}, {Type:58, MaxAmount:30}, {Type:59, MaxAmount:40}, {Type:60, MaxAmount:50}, {Type:61, MaxAmount:30}, {Type:62, MaxAmount:35}, {Type:63, MaxAmount:25}, {Type:64, MaxAmount:20}, {Type:67, MaxAmount:20}, {Type:68, MaxAmount:35}, {Type:69, MaxAmount:40}, {Type:70, MaxAmount:45}, {Type:71, MaxAmount:20}, {Type:72, MaxAmount:8}, {Type:73, MaxAmount:30}, {Type:74, MaxAmount:20}, {Type:75, MaxAmount:8}, {Type:76, MaxAmount:8}, {Type:77, MaxAmount:4}, {Type:78, MaxAmount:4}, {Type:80, MaxAmount:12}, {Type:81, MaxAmount:1}, {Type:82, MaxAmount:8}]}, {Type:2, Name:"Transport Shop", SubType:2, Assortment:[{Type:12, MaxAmount:8}, {Type:13, MaxAmount:12}, {Type:14, MaxAmount:7}, {Type:15, MaxAmount:12}, {Type:16, MaxAmount:4}, {Type:17, MaxAmount:4}]}, {Type:3, Name:"Hospital", SubType:1, HealPrice:10}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:15}, {Type:8, Name:"Well"}, {Type:5, Name:"Fracesca's House", Revealed:false, Dialogue:4}, {Type:5, Name:"Military Base", Revealed:true, Dialogue:6}], Industries:[{Type:3, Production:2990}, {Type:9, Production:115}, {Type:8, Production:32}, {Type:5, Production:3}, {Type:14, Production:1021}], Property:[{Type:1, Amount:13856}, {Type:2, Amount:158}, {Type:3, Amount:15897}, {Type:5, Amount:558}, {Type:4, Amount:562}, {Type:7, Amount:593}, {Type:8, Amount:341}, {Type:13, Amount:1241}], Citizens:[People[45], People[46], People[47], People[48], People[49], People[50], People[51]], Money:108999, OtherPrice:1.1, WpnPrice:0.9, AmmoPrice:0.9, ArmPrice:1, WaterPrice:0.1, AnimalsPrice:1.3, CartsPrice:1.2, CarsPrice:1, Motorized:true}, {Name:"Sekir Bashka", Population:96, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:820}, {Type:2, MaxAmount:1580}, {Type:3, MaxAmount:580}, {Type:4, MaxAmount:635}, {Type:5, MaxAmount:1843}, {Type:6, MaxAmount:2310}, {Type:7, MaxAmount:1950}, {Type:8, MaxAmount:720}, {Type:9, MaxAmount:840}, {Type:10, MaxAmount:732}, {Type:13, MaxAmount:73}, {Type:14, MaxAmount:12}, {Type:15, MaxAmount:43}, {Type:19, MaxAmount:35}, {Type:22, MaxAmount:50}, {Type:25, MaxAmount:48}, {Type:36, MaxAmount:62}, {Type:37, MaxAmount:42}, {Type:54, MaxAmount:115}, {Type:61, MaxAmount:25}, {Type:66, MaxAmount:20}, {Type:67, MaxAmount:3}, {Type:68, MaxAmount:8}, {Type:69, MaxAmount:12}, {Type:70, MaxAmount:8}, {Type:73, MaxAmount:8}, {Type:74, MaxAmount:10}]}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:8}, {Type:8, Name:"Well"}], Industries:[{Type:1, Production:45}, {Type:2, Production:145}, {Type:3, Production:13}, {Type:9, Production:56}, {Type:12, Production:536}], Property:[{Type:1, Amount:2542}, {Type:2, Amount:836}, {Type:3, Amount:1286}, {Type:5, Amount:113}, {Type:8, Amount:56}, {Type:11, Amount:150}, {Type:9, Amount:856}], Citizens:[People[25], People[26]], Money:3210, OtherPrice:1.15, WpnPrice:1.2, AmmoPrice:1.2, ArmPrice:1.1, WaterPrice:0, AnimalsPrice:1, CartsPrice:1.1, CarsPrice:1.05, Motorized:true}, {Name:"Qubba", Population:983, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Knives & Armors", SubType:1, Assortment:[{Type:56, MaxAmount:25}, {Type:57, MaxAmount:30}, {Type:58, MaxAmount:50}, {Type:59, MaxAmount:55}, {Type:60, MaxAmount:85}, {Type:61, MaxAmount:75}, {Type:62, MaxAmount:83}, {Type:63, MaxAmount:60}, {Type:64, MaxAmount:4}]}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:2, MaxAmount:850}, {Type:4, MaxAmount:620}, {Type:5, MaxAmount:555}, {Type:16, MaxAmount:12}, {Type:17, MaxAmount:8}, {Type:18, MaxAmount:10}, {Type:21, MaxAmount:8}, {Type:23, MaxAmount:5}, {Type:24, MaxAmount:6}, {Type:66, MaxAmount:30}, {Type:67, MaxAmount:25}, {Type:68, MaxAmount:30}, {Type:69, MaxAmount:40}, {Type:70, MaxAmount:45}, {Type:71, MaxAmount:10}, {Type:72, MaxAmount:16}, {Type:73, MaxAmount:30}, {Type:74, MaxAmount:50}, {Type:75, MaxAmount:8}, {Type:76, MaxAmount:8}, {Type:77, MaxAmount:10}, {Type:78, MaxAmount:10}, {Type:79, MaxAmount:10}, {Type:80, MaxAmount:10}, {Type:81, MaxAmount:10}, {Type:82, MaxAmount:10}]}, {Type:2, Name:"Guns & Ammo", SubType:1, Assortment:[{Type:1, MaxAmount:320}, {Type:2, MaxAmount:3150}, {Type:3, MaxAmount:580}, {Type:4, MaxAmount:250}, {Type:5, MaxAmount:2180}, {Type:6, MaxAmount:4120}, {Type:7, MaxAmount:4150}, {Type:8, MaxAmount:3980}, {Type:9, MaxAmount:3885}, {Type:10, MaxAmount:520}, {Type:11, MaxAmount:420}, {Type:12, MaxAmount:320}, {Type:13, MaxAmount:350}, {Type:14, MaxAmount:4}, {Type:15, MaxAmount:25}, {Type:19, MaxAmount:145}, {Type:20, MaxAmount:130}, {Type:22, MaxAmount:35}, {Type:25, MaxAmount:55}, {Type:26, MaxAmount:28}, {Type:27, MaxAmount:12}, {Type:28, MaxAmount:35}, {Type:29, MaxAmount:8}, {Type:30, MaxAmount:25}, {Type:31, MaxAmount:8}, {Type:32, MaxAmount:4}, {Type:35, MaxAmount:20}, {Type:36, MaxAmount:150}, {Type:37, MaxAmount:180}, {Type:38, MaxAmount:20}, {Type:40, MaxAmount:12}, {Type:41, MaxAmount:180}, {Type:44, MaxAmount:18}, {Type:45, MaxAmount:16}, {Type:46, MaxAmount:18}, {Type:47, MaxAmount:12}, {Type:48, MaxAmount:25}, {Type:49, MaxAmount:8}, {Type:50, MaxAmount:8}, {Type:51, MaxAmount:25}, {Type:52, MaxAmount:30}, {Type:53, MaxAmount:320}, {Type:54, MaxAmount:450}, {Type:55, MaxAmount:250}]}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:18}, {Type:2, Name:"Carts", SubType:2, Assortment:[{Type:7, MaxAmount:10}, {Type:8, MaxAmount:10}, {Type:9, MaxAmount:10}, {Type:10, MaxAmount:12}, {Type:11, MaxAmount:8}, {Type:12, MaxAmount:16}, {Type:13, MaxAmount:16}]}, {Type:2, Name:"Cars", SubType:2, Assortment:[{Type:14, MaxAmount:16}, {Type:15, MaxAmount:24}, {Type:16, MaxAmount:12}, {Type:17, MaxAmount:8}, {Type:18, MaxAmount:8}]}, {Type:2, Name:"Animals", SubType:2, Assortment:[{Type:1, MaxAmount:8}, {Type:2, MaxAmount:12}, {Type:3, MaxAmount:8}, {Type:4, MaxAmount:16}, {Type:6, MaxAmount:16}, {Type:5, MaxAmount:4}]}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:10}, {Type:3, Name:"Hospital", SubType:1, HealPrice:13}, {Type:8, Name:"Water Pump"}, {Type:5, Name:"Government", Dialogue:9, Revealed:true}], Industries:[{Type:13, Production:135}, {Type:5, Production:58}, {Type:8, Production:32}], Property:[{Type:1, Amount:25963}, {Type:2, Amount:2394}, {Type:3, Amount:48942}, {Type:4, Amount:7145}, {Type:5, Amount:32993}, {Type:6, Amount:7814}, {Type:7, Amount:13154}, {Type:8, Amount:2154}, {Type:9, Amount:72182}, {Type:10, Amount:56948}, {Type:11, Amount:5182}, {Type:12, Amount:913}], Citizens:[People[52], People[53], People[54], People[55], People[56], People[57], People[58], People[59], People[60], People[61]], Money:185918, OtherPrice:1.3, WpnPrice:1.2, AmmoPrice:1.3, ArmPrice:1.2, WaterPrice:0.2, AnimalsPrice:1.3, CartsPrice:1.1, CarsPrice:0.9, Motorized:true}, {Name:"Kulin", Population:277, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:150}, {Type:2, MaxAmount:580}, {Type:3, MaxAmount:950}, {Type:4, MaxAmount:95}, {Type:6, MaxAmount:780}, {Type:7, MaxAmount:650}, {Type:9, MaxAmount:420}, {Type:10, MaxAmount:750}, {Type:19, MaxAmount:58}, {Type:20, MaxAmount:45}, {Type:22, MaxAmount:34}, {Type:25, MaxAmount:30}, {Type:36, MaxAmount:20}, {Type:37, MaxAmount:35}, {Type:43, MaxAmount:8}, {Type:52, MaxAmount:2}, {Type:41, MaxAmount:36}, {Type:53, MaxAmount:40}, {Type:54, MaxAmount:55}, {Type:60, MaxAmount:40}, {Type:61, MaxAmount:30}, {Type:62, MaxAmount:28}, {Type:69, MaxAmount:8}, {Type:70, MaxAmount:10}, {Type:71, MaxAmount:4}, {Type:73, MaxAmount:5}, {Type:74, MaxAmount:10}, {Type:80, MaxAmount:2}]}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:10}, {Type:3, Name:"Hospital", SubType:1, HealPrice:7}, {Type:2, Name:"Transport Fair", SubType:2, Assortment:[{Type:1, MaxAmount:8}, {Type:2, MaxAmount:10}, {Type:3, MaxAmount:12}, {Type:4, MaxAmount:12}, {Type:7, MaxAmount:4}, {Type:8, MaxAmount:4}, {Type:9, MaxAmount:2}, {Type:10, MaxAmount:4}, {Type:11, MaxAmount:3}, {Type:12, MaxAmount:4}, {Type:13, MaxAmount:2}, {Type:14, MaxAmount:2}]}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:6}, {Type:8, Name:"Well"}], Industries:[{Type:8, Production:134}, {Type:9, Production:226}, {Type:3, Production:13}, {Type:2, Production:151}, {Type:1, Production:50}], Property:[{Type:1, Amount:1964}, {Type:8, Amount:286}, {Type:2, Amount:150}, {Type:5, Amount:120}, {Type:3, Amount:1872}], Citizens:[People[22], People[23], People[24]], Money:12346, OtherPrice:0.9, WpnPrice:1, AmmoPrice:1.05, ArmPrice:1.3, WaterPrice:0, AnimalsPrice:0.9, CartsPrice:1, CarsPrice:1.1, Motorized:true}, {Name:"Hara", Population:456, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Firearms", SubType:1, Assortment:[{Type:1, MaxAmount:1230}, {Type:2, MaxAmount:2550}, {Type:3, MaxAmount:885}, {Type:4, MaxAmount:950}, {Type:5, MaxAmount:1230}, {Type:6, MaxAmount:3320}, {Type:7, MaxAmount:3150}, {Type:8, MaxAmount:913}, {Type:9, MaxAmount:450}, {Type:10, MaxAmount:554}, {Type:11, MaxAmount:25}, {Type:12, MaxAmount:40}, {Type:13, MaxAmount:75}, {Type:15, MaxAmount:25}, {Type:19, MaxAmount:95}, {Type:20, MaxAmount:60}, {Type:22, MaxAmount:25}, {Type:25, MaxAmount:12}, {Type:36, MaxAmount:15}, {Type:37, MaxAmount:20}, {Type:38, MaxAmount:12}, {Type:40, MaxAmount:13}, {Type:41, MaxAmount:58}, {Type:44, MaxAmount:18}, {Type:45, MaxAmount:3}, {Type:46, MaxAmount:4}, {Type:47, MaxAmount:3}, {Type:51, MaxAmount:4}, {Type:52, MaxAmount:5}, {Type:53, MaxAmount:96}, {Type:54, MaxAmount:120}, {Type:58, MaxAmount:25}]}, {Type:2, Name:"Supplies", SubType:1, Assortment:[{Type:56, MaxAmount:30}, {Type:57, MaxAmount:45}, {Type:58, MaxAmount:50}, {Type:59, MaxAmount:30}, {Type:60, MaxAmount:55}, {Type:61, MaxAmount:35}, {Type:62, MaxAmount:25}, {Type:63, MaxAmount:8}, {Type:66, MaxAmount:10}, {Type:67, MaxAmount:25}, {Type:68, MaxAmount:35}, {Type:69, MaxAmount:40}, {Type:70, MaxAmount:38}, {Type:71, MaxAmount:25}, {Type:72, MaxAmount:4}, {Type:73, MaxAmount:45}, {Type:74, MaxAmount:65}, {Type:75, MaxAmount:30}, {Type:76, MaxAmount:8}, {Type:77, MaxAmount:4}, {Type:78, MaxAmount:2}, {Type:80, MaxAmount:5}, {Type:81, MaxAmount:2}, {Type:82, MaxAmount:5}]}, {Type:2, Name:"Transport Shop", SubType:2, Assortment:[{Type:10, MaxAmount:20}, {Type:11, MaxAmount:4}, {Type:12, MaxAmount:15}, {Type:13, MaxAmount:8}, {Type:14, MaxAmount:10}, {Type:15, MaxAmount:8}, {Type:16, MaxAmount:4}]}, {Type:3, Name:"Clinic", SubType:1, HealPrice:8}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:13}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:6}, {Type:8, Name:"Water Source"}], Industries:[{Type:11, Production:8518}, {Type:1, Production:115}], Property:[{Type:1, Amount:12000}, {Type:2, Amount:560}, {Type:3, Amount:7320}, {Type:5, Amount:2680}, {Type:9, Amount:38967}, {Type:10, Amount:0}], Citizens:[People[29], People[30], People[31], People[32], People[33]], Money:25830, OtherPrice:1.2, WpnPrice:1, AmmoPrice:1, ArmPrice:1, WaterPrice:0.1, AnimalsPrice:1.3, CartsPrice:0.9, CarsPrice:1, Motorized:true}, {Name:"Nirgendwo", Population:258, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:2, MaxAmount:950}, {Type:3, MaxAmount:1540}, {Type:6, MaxAmount:562}, {Type:7, MaxAmount:685}, {Type:10, MaxAmount:1820}, {Type:19, MaxAmount:55}, {Type:20, MaxAmount:60}, {Type:30, MaxAmount:8}, {Type:41, MaxAmount:50}, {Type:42, MaxAmount:8}, {Type:43, MaxAmount:12}, {Type:53, MaxAmount:40}, {Type:54, MaxAmount:25}, {Type:60, MaxAmount:35}, {Type:61, MaxAmount:4}, {Type:62, MaxAmount:12}, {Type:70, MaxAmount:8}, {Type:73, MaxAmount:8}, {Type:74, MaxAmount:16}, {Type:75, MaxAmount:1}, {Type:76, MaxAmount:1}, {Type:80, MaxAmount:2}, {Type:82, MaxAmount:4}]}, {Type:3, Name:"Clinic", SubType:1, HealPrice:8}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:13}, {Type:2, Name:"Transport Shop", SubType:2, Assortment:[{Type:7, MaxAmount:4}, {Type:8, MaxAmount:4}, {Type:9, MaxAmount:4}, {Type:10, MaxAmount:8}, {Type:11, MaxAmount:2}, {Type:12, MaxAmount:4}, {Type:13, MaxAmount:2}, {Type:14, MaxAmount:8}]}, {Type:8, Name:"Water Pump"}], Industries:[{Type:5, Production:702}, {Type:9, Production:372}, {Type:1, Production:100}, {Type:3, Production:18}], Property:[{Type:5, Amount:2637}, {Type:1, Amount:1263}, {Type:4, Amount:3532}, {Type:9, Amount:1386}, {Type:2, Amount:1564}], Citizens:[People[19], People[20], People[21]], Money:5560, OtherPrice:1, WpnPrice:1.1, AmmoPrice:1, ArmPrice:1.1, WaterPrice:0.05, AnimalsPrice:1, CartsPrice:0.9, CarsPrice:0.95, Motorized:true}, {Name:"Merdin", Population:75, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:290}, {Type:2, MaxAmount:565}, {Type:3, MaxAmount:325}, {Type:4, MaxAmount:20}, {Type:5, MaxAmount:25}, {Type:6, MaxAmount:150}, {Type:7, MaxAmount:255}, {Type:8, MaxAmount:56}, {Type:9, MaxAmount:230}, {Type:10, MaxAmount:185}, {Type:14, MaxAmount:5}, {Type:15, MaxAmount:2}, {Type:16, MaxAmount:5}, {Type:17, MaxAmount:4}, {Type:18, MaxAmount:2}, {Type:19, MaxAmount:3}, {Type:20, MaxAmount:3}, {Type:21, MaxAmount:3}, {Type:24, MaxAmount:5}, {Type:25, MaxAmount:3}, {Type:27, MaxAmount:2}, {Type:28, MaxAmount:2}, {Type:29, MaxAmount:2}, {Type:30, MaxAmount:1}, {Type:33, MaxAmount:3}, {Type:34, MaxAmount:5}, {Type:36, MaxAmount:1}, {Type:37, MaxAmount:2}, {Type:38, MaxAmount:3}, {Type:44, MaxAmount:3}, {Type:48, MaxAmount:3}, {Type:52, MaxAmount:3}, {Type:53, MaxAmount:10}, {Type:54, MaxAmount:3}, {Type:59, MaxAmount:3}, {Type:56, MaxAmount:5}, {Type:57, MaxAmount:3}, {Type:58, MaxAmount:5}, {Type:60, MaxAmount:30}, {Type:61, MaxAmount:4}, {Type:62, MaxAmount:2}, {Type:66, MaxAmount:20}, {Type:67, MaxAmount:10}, {Type:68, MaxAmount:3}, {Type:69, MaxAmount:5}, {Type:70, MaxAmount:3}]}, {Type:3, Name:"Mechanic", SubType:3, HealPrice:10}, {Type:3, Name:"Doctor", SubType:1, HealPrice:7}, {Type:8, Name:"Well"}], Industries:[{Type:1, Production:345}, {Type:9, Production:525}, {Type:2, Production:895}, {Type:6, Production:1132}, {Type:3, Production:3}], Property:[{Type:1, Amount:946}, {Type:2, Amount:576}, {Type:3, Amount:152}, {Type:5, Amount:78}, {Type:8, Amount:13}, {Type:6, Amount:2417}], Citizens:[People[8]], Money:1586, OtherPrice:0.95, WpnPrice:1, AmmoPrice:1, ArmPrice:1.4, WaterPrice:0, AnimalsPrice:0.9, CartsPrice:1.1, CarsPrice:3, Motorized:false}, {Name:"Okaidi", Population:218, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:935}, {Type:2, MaxAmount:1240}, {Type:3, MaxAmount:564}, {Type:4, MaxAmount:645}, {Type:5, MaxAmount:750}, {Type:6, MaxAmount:1280}, {Type:7, MaxAmount:945}, {Type:8, MaxAmount:260}, {Type:9, MaxAmount:640}, {Type:10, MaxAmount:720}, {Type:14, MaxAmount:5}, {Type:16, MaxAmount:15}, {Type:17, MaxAmount:4}, {Type:19, MaxAmount:3}, {Type:22, MaxAmount:6}, {Type:23, MaxAmount:5}, {Type:24, MaxAmount:8}, {Type:33, MaxAmount:3}, {Type:34, MaxAmount:6}, {Type:25, MaxAmount:6}, {Type:28, MaxAmount:4}, {Type:30, MaxAmount:3}, {Type:37, MaxAmount:5}, {Type:38, MaxAmount:4}, {Type:39, MaxAmount:6}, {Type:41, MaxAmount:10}, {Type:42, MaxAmount:8}, {Type:45, MaxAmount:1}, {Type:53, MaxAmount:15}, {Type:54, MaxAmount:3}, {Type:56, MaxAmount:20}, {Type:57, MaxAmount:10}, {Type:58, MaxAmount:6}, {Type:60, MaxAmount:45}, {Type:61, MaxAmount:5}, {Type:62, MaxAmount:3}, {Type:66, MaxAmount:3}, {Type:67, MaxAmount:5}, {Type:67, MaxAmount:2}, {Type:68, MaxAmount:5}, {Type:70, MaxAmount:10}, {Type:76, MaxAmount:5}, {Type:77, MaxAmount:2}]}, {Type:3, Name:"Doctor", SubType:1, HealPrice:8}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:15}, {Type:8, Name:"Well"}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:6}, {Type:2, Name:"Animals Market", SubType:2, Assortment:[{Type:1, MaxAmount:10}, {Type:2, MaxAmount:8}, {Type:3, MaxAmount:8}, {Type:4, MaxAmount:10}, {Type:6, MaxAmount:5}]}], Industries:[{Type:1, Production:115}, {Type:2, Production:238}, {Type:9, Production:197}, {Type:3, Production:5}, {Type:4, Production:2580}, {Type:5, Production:5}], Property:[{Type:1, Amount:1586}, {Type:2, Amount:3182}, {Type:3, Amount:454}, {Type:6, Amount:7573}, {Type:4, Amount:8391}], Citizens:[People[9], People[10], People[11]], Money:10381, OtherPrice:1, WpnPrice:1.1, AmmoPrice:1.05, ArmPrice:1.1, WaterPrice:0.1, AnimalsPrice:1.2, CartsPrice:1.2, CarsPrice:1.2, Motorized:false}, {Name:"Diep Gat", Population:156, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:960}, {Type:2, MaxAmount:1380}, {Type:3, MaxAmount:890}, {Type:4, MaxAmount:782}, {Type:6, MaxAmount:1440}, {Type:7, MaxAmount:1390}, {Type:8, MaxAmount:780}, {Type:9, MaxAmount:550}, {Type:10, MaxAmount:482}, {Type:14, MaxAmount:5}, {Type:15, MaxAmount:8}, {Type:16, MaxAmount:8}, {Type:18, MaxAmount:6}, {Type:19, MaxAmount:40}, {Type:20, MaxAmount:45}, {Type:21, MaxAmount:6}, {Type:22, MaxAmount:8}, {Type:23, MaxAmount:4}, {Type:26, MaxAmount:8}, {Type:27, MaxAmount:4}, {Type:28, MaxAmount:5}, {Type:30, MaxAmount:5}, {Type:34, MaxAmount:5}, {Type:35, MaxAmount:2}, {Type:36, MaxAmount:2}, {Type:37, MaxAmount:4}, {Type:38, MaxAmount:3}, {Type:39, MaxAmount:5}, {Type:40, MaxAmount:2}, {Type:41, MaxAmount:35}, {Type:42, MaxAmount:6}, {Type:53, MaxAmount:50}, {Type:54, MaxAmount:20}, {Type:57, MaxAmount:10}, {Type:58, MaxAmount:4}, {Type:60, MaxAmount:10}, {Type:61, MaxAmount:10}, {Type:62, MaxAmount:5}, {Type:63, MaxAmount:2}, {Type:67, MaxAmount:2}, {Type:68, MaxAmount:4}, {Type:69, MaxAmount:8}, {Type:70, MaxAmount:10}, {Type:71, MaxAmount:5}, {Type:73, MaxAmount:10}, {Type:74, MaxAmount:6}, {Type:75, MaxAmount:2}, {Type:76, MaxAmount:5}, {Type:77, MaxAmount:2}]}, {Type:2, Name:"Transport Shop", SubType:2, Assortment:[{Type:1, MaxAmount:2}, {Type:2, MaxAmount:6}, {Type:3, MaxAmount:10}, {Type:4, MaxAmount:3}, {Type:6, MaxAmount:8}, {Type:7, MaxAmount:2}, {Type:8, MaxAmount:5}, {Type:9, MaxAmount:4}, {Type:10, MaxAmount:5}, {Type:11, MaxAmount:3}, {Type:12, MaxAmount:5}, {Type:14, MaxAmount:6}]}, {Type:3, Name:"Doctor", SubType:1, HealPrice:8}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:5}, {Type:8, Name:"Well"}, {Type:5, Name:"General Schnittke's House", Dialogue:8, Revealed:false}], Industries:[{Type:9, Production:91}, {Type:9, Production:50}, {Type:2, Production:234}, {Type:3, Production:46}, {Type:10, Production:95}], Property:[{Type:1, Amount:2742}, {Type:3, Amount:2458}, {Type:5, Amount:113}, {Type:8, Amount:96}, {Type:9, Amount:559}, {Type:10, Amount:1386}], Citizens:[People[12], People[13], People[14]], Money:8993, OtherPrice:1.1, WpnPrice:0.9, AmmoPrice:1, ArmPrice:0.95, WaterPrice:0, AnimalsPrice:1.1, CartsPrice:0.95, CarsPrice:1, Motorized:true}, {Name:"Drushlak", Population:85, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:2, MaxAmount:275}, {Type:3, MaxAmount:50}, {Type:9, MaxAmount:280}, {Type:10, MaxAmount:100}, {Type:16, MaxAmount:5}, {Type:17, MaxAmount:10}, {Type:18, MaxAmount:3}, {Type:33, MaxAmount:5}, {Type:34, MaxAmount:2}, {Type:41, MaxAmount:1}, {Type:56, MaxAmount:10}, {Type:57, MaxAmount:5}, {Type:58, MaxAmount:1}, {Type:59, MaxAmount:15}, {Type:66, MaxAmount:20}, {Type:67, MaxAmount:5}, {Type:68, MaxAmount:2}]}, {Type:3, Name:"Clinic", SubType:1, HealPrice:5}, {Type:8, Name:"Well"}, {Type:5, Name:"Joseph Berg's House", Revealed:false, Dialogue:3}], Industries:[{Type:1, Production:582}, {Type:2, Production:1115}, {Type:3, Production:25}, {Type:9, Production:601}, {Type:6, Production:3028}], Property:[{Type:1, Amount:2546}, {Type:2, Amount:8564}, {Type:3, Amount:1852}, {Type:5, Amount:84}, {Type:8, Amount:32}, {Type:6, Amount:5632}], Citizens:[People[6], People[7]], Money:3720, OtherPrice:0.85, WpnPrice:1.1, AmmoPrice:1.03, ArmPrice:1.02, WaterPrice:0, AnimalsPrice:1, CartsPrice:1.1, CarsPrice:1.3, Motorized:false}, {Name:"Verdammter Platz", Population:173, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Transport Fair", SubType:2, Assortment:[{Type:1, MaxAmount:10}, {Type:2, MaxAmount:5}, {Type:4, MaxAmount:12}, {Type:6, MaxAmount:8}, {Type:7, MaxAmount:2}, {Type:8, MaxAmount:3}, {Type:9, MaxAmount:4}, {Type:10, MaxAmount:8}, {Type:11, MaxAmount:4}, {Type:12, MaxAmount:5}, {Type:14, MaxAmount:12}]}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:1530}, {Type:2, MaxAmount:964}, {Type:3, MaxAmount:852}, {Type:4, MaxAmount:722}, {Type:5, MaxAmount:1230}, {Type:6, MaxAmount:1593}, {Type:7, MaxAmount:1614}, {Type:8, MaxAmount:892}, {Type:9, MaxAmount:1584}, {Type:10, MaxAmount:541}, {Type:13, MaxAmount:56}, {Type:15, MaxAmount:8}, {Type:17, MaxAmount:14}, {Type:18, MaxAmount:4}, {Type:19, MaxAmount:48}, {Type:20, MaxAmount:52}, {Type:21, MaxAmount:8}, {Type:22, MaxAmount:4}, {Type:23, MaxAmount:15}, {Type:24, MaxAmount:4}, {Type:25, MaxAmount:4}, {Type:26, MaxAmount:8}, {Type:27, MaxAmount:2}, {Type:28, MaxAmount:20}, {Type:29, MaxAmount:4}, {Type:30, MaxAmount:8}, {Type:33, MaxAmount:4}, {Type:34, MaxAmount:3}, {Type:35, MaxAmount:3}, {Type:36, MaxAmount:4}, {Type:41, MaxAmount:48}, {Type:44, MaxAmount:4}, {Type:40, MaxAmount:3}, {Type:38, MaxAmount:8}, {Type:45, MaxAmount:2}, {Type:46, MaxAmount:3}, {Type:52, MaxAmount:4}, {Type:53, MaxAmount:55}, {Type:54, MaxAmount:35}, {Type:58, MaxAmount:20}, {Type:60, MaxAmount:5}, {Type:61, MaxAmount:20}, {Type:62, MaxAmount:10}, {Type:63, MaxAmount:3}, {Type:67, MaxAmount:2}, {Type:68, MaxAmount:8}, {Type:69, MaxAmount:15}, {Type:70, MaxAmount:20}, {Type:71, MaxAmount:10}, {Type:73, MaxAmount:25}, {Type:74, MaxAmount:30}, {Type:75, MaxAmount:4}, {Type:76, MaxAmount:5}, {Type:80, MaxAmount:5}]}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:13}, {Type:8, Name:"Well"}, {Type:3, Name:"Hospital", SubType:1, HealPrice:6}, {Type:5, Name:"Desert Patrol Headquarters", Revealed:true, Dialogue:2}], Industries:[{Type:9, Production:165}, {Type:11, Production:15}, {Type:3, Production:21}, {Type:10, Production:81}, {Type:2, Production:189}], Property:[{Type:1, Amount:3876}, {Type:3, Amount:3854}, {Type:5, Amount:265}, {Type:8, Amount:115}, {Type:9, Amount:1318}, {Type:10, Amount:3151}], Citizens:[People[15], People[16], People[17], People[18]], Money:15862, OtherPrice:1.25, WpnPrice:1.2, AmmoPrice:1.25, ArmPrice:1.15, WaterPrice:0, AnimalsPrice:1.3, CartsPrice:1.2, CarsPrice:1.2, Motorized:true}, {Name:"Caganel", Population:99, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:1, MaxAmount:50}, {Type:2, MaxAmount:380}, {Type:3, MaxAmount:295}, {Type:5, MaxAmount:65}, {Type:9, MaxAmount:540}, {Type:10, MaxAmount:420}, {Type:14, MaxAmount:2}, {Type:16, MaxAmount:10}, {Type:18, MaxAmount:8}, {Type:20, MaxAmount:2}, {Type:24, MaxAmount:2}, {Type:33, MaxAmount:7}, {Type:34, MaxAmount:1}, {Type:39, MaxAmount:2}, {Type:41, MaxAmount:4}, {Type:42, MaxAmount:2}, {Type:59, MaxAmount:20}, {Type:56, MaxAmount:5}, {Type:57, MaxAmount:10}, {Type:66, MaxAmount:20}, {Type:67, MaxAmount:15}, {Type:68, MaxAmount:5}, {Type:69, MaxAmount:2}, {Type:70, MaxAmount:3}]}, {Type:3, Name:"Doctor", SubType:1, HealPrice:7}, {Type:2, Name:"Transport Shop", SubType:2, Assortment:[{Type:1, MaxAmount:5}, {Type:2, MaxAmount:5}, {Type:4, MaxAmount:10}, {Type:7, MaxAmount:8}, {Type:8, MaxAmount:6}, {Type:9, MaxAmount:2}, {Type:10, MaxAmount:3}]}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:5}, {Type:8, Name:"Well"}], Industries:[{Type:9, Production:501}, {Type:1, Production:605}, {Type:2, Production:998}, {Type:3, Production:6}, {Type:7, Production:2}, {Type:8, Production:7}], Property:[{Type:1, Amount:580}, {Type:2, Amount:1340}, {Type:3, Amount:850}, {Type:5, Amount:86}, {Type:7, Amount:85}, {Type:8, Amount:573}], Citizens:[People[4], People[5]], Money:4815, OtherPrice:0.9, WpnPrice:1.1, AmmoPrice:1.05, ArmPrice:1.08, WaterPrice:0, AnimalsPrice:0.9, CartsPrice:1.1, CarsPrice:1.3, Motorized:false}, {Name:"Poca Cosa", Population:117, Houses:[Number.NaN, {Type:1, Name:"Market"}, {Type:2, Name:"Shop", SubType:1, Assortment:[{Type:2, MaxAmount:720}, {Type:3, MaxAmount:560}, {Type:9, MaxAmount:640}, {Type:10, MaxAmount:273}, {Type:20, MaxAmount:5}, {Type:16, MaxAmount:13}, {Type:17, MaxAmount:8}, {Type:33, MaxAmount:9}, {Type:34, MaxAmount:5}, {Type:59, MaxAmount:43}, {Type:56, MaxAmount:7}, {Type:57, MaxAmount:2}, {Type:79, MaxAmount:4}, {Type:70, MaxAmount:4}, {Type:66, MaxAmount:36}, {Type:67, MaxAmount:10}, {Type:68, MaxAmount:8}, {Type:69, MaxAmount:2}]}, {Type:3, Name:"Doctor", SubType:1, HealPrice:7}, {Type:3, Name:"Veterinary", SubType:2, HealPrice:3}, {Type:5, Name:"Sheriff", Revealed:true, Dialogue:1}, {Type:2, Name:"Farm", SubType:2, Assortment:[{Type:1, MaxAmount:20}, {Type:2, MaxAmount:17}, {Type:3, MaxAmount:15}, {Type:4, MaxAmount:17}, {Type:6, MaxAmount:5}]}, {Type:3, Name:"Repair Shop", SubType:3, HealPrice:10}, {Type:2, Name:"Carts", SubType:2, Assortment:[{Type:7, MaxAmount:8}, {Type:8, MaxAmount:12}, {Type:9, MaxAmount:6}, {Type:10, MaxAmount:5}, {Type:11, MaxAmount:1}]}, {Type:8, Name:"Well"}], Industries:[{Type:1, Production:718}, {Type:2, Production:2113}, {Type:7, Production:31}, {Type:8, Production:1}, {Type:3, Production:12}, {Type:9, Production:444}], Property:[{Type:1, Amount:4820}, {Type:2, Amount:5481}, {Type:3, Amount:1480}, {Type:5, Amount:5}, {Type:7, Amount:326}, {Type:8, Amount:27}, {Type:9, Amount:300}], Citizens:[People[1], People[2], People[3]], Money:5560, OtherPrice:0.95, WpnPrice:1.05, AmmoPrice:1.02, ArmPrice:1.03, WaterPrice:0, AnimalsPrice:0.8, CartsPrice:1.05, CarsPrice:1.2, Motorized:false}, {Name:"Military Base", Virtual:true, Houses:[Number.NaN, {Name:"Colonel Kaminski's Office", Type:5, Dialogue:7, Revealed:true}, {Name:"MRM-12-R Operator's Console", Type:4}, {Name:"Exit", Type:6}]}];
Goods = [Number.NaN, {Name:"Food", BasicValue:1.2, Unit:"Kg", WeightPerUnit:1}, {Name:"Forage", BasicValue:0.03, Unit:"Kg", WeightPerUnit:1}, {Name:"Medicines", BasicValue:0.8, Unit:"g", WeightPerUnit:0.001}, {Name:"Textile", BasicValue:2.5, Unit:"m2", WeightPerUnit:1}, {Name:"Clothes", BasicValue:17, Unit:"unit", WeightPerUnit:1}, {Name:"Cotton", BasicValue:0.02, Unit:"Kg", WeightPerUnit:1}, {Name:"Leather", BasicValue:10, Unit:"m2", WeightPerUnit:2}, {Name:"Shoes", BasicValue:40, Unit:"unit", WeightPerUnit:3}, {Name:"Fuel", BasicValue:1.5, Unit:"L", WeightPerUnit:0.74}, {Name:"Crude Oil", BasicValue:30, Unit:"Barrel", WeightPerUnit:137}, {Name:"Gold", BasicValue:15, Unit:"g", WeightPerUnit:0.001}, {Name:"Jewelry", BasicValue:1500, Unit:"unit", WeightPerUnit:0.01}, {Name:"Alcohol", BasicValue:8, Unit:"L", WeightPerUnit:0.95}, {Name:"Explosives", BasicValue:1500, Unit:"Kg", WeightPerUnit:1, Special:true}];
Industries = [Number.NaN, {Name:"Animal Industry", Product:1, Raw:{Type:2, Amount:2}}, {Name:"Forage Cultivation", Product:2}, {Name:"Pharmaceutics", Product:3}, {Name:"Textile Industry", Product:4, Raw:{Type:6, Amount:2}}, {Name:"Clothing Industry", Product:5, Raw:{Type:4, Amount:1.5}}, {Name:"Cotton Cultivation", Product:6, WorkPlaces:1}, {Name:"Leather Production", Product:7, Raw:{Type:2, Amount:5}}, {Name:"Shoemaking Industry", Product:8, Raw:{Type:7, Amount:0.5}}, {Name:"Agriculture", Product:1}, {Name:"Oil Drilling", Product:10, Raw:{Type:9, Amount:0.01}}, {Name:"Fuel Production", Product:9, Raw:{Type:10, Amount:0.008}}, {Name:"Gold Mining", Product:11, Raw:{Type:9, Amount:0.5}}, {Name:"Jewelry Production", Product:12, Raw:{Type:11, Amount:10}}, {Name:"Alcohol Destilation", Product:13, Raw:{Type:1, Amount:0.5}}];
Transports = [Number.NaN, {Name:"Donkey", Class:1, Capacity:150, Speed:4, ForageUse:2, WaterUse:0.2, MaxHP:150, Price:800, CanHaveCart:true, Noticeability:60, Width:1, Height:1}, {Name:"Mule", Class:1, Capacity:250, Speed:5, ForageUse:3, WaterUse:0.3, MaxHP:200, Price:1500, CanHaveCart:true, Noticeability:70, Width:1, Height:1}, {Name:"Horse", Class:1, Capacity:200, Speed:15, ForageUse:5, WaterUse:0.5, MaxHP:200, Price:2000, CanHaveCart:true, Noticeability:80, Width:1, Height:1}, {Name:"Dromedary Camel", Class:1, Capacity:300, Speed:3, ForageUse:0.5, WaterUse:0.05, MaxHP:250, Price:3200, CanHaveCart:false, Noticeability:100, Width:1, Height:1}, {Name:"Bactrian Camel", Class:1, Capacity:500, Speed:4, ForageUse:1.5, WaterUse:0.3, MaxHP:350, Price:5300, CanHaveCart:false, Noticeability:150, Width:1, Height:1}, {Name:"Ox", Class:1, Capacity:500, Speed:3, ForageUse:8, WaterUse:0.8, MaxHP:450, Price:4700, CanHaveCart:true, Noticeability:80, Width:1, Height:1}, {Name:"Small Wooden Cart", Class:2, MaxCapacity:300, CapacityIncrease:2, Weight:40, MaxHP:60, Price:300, Noticeability:50, Width:1, Height:1}, {Name:"Medium Wooden Cart", Class:2, MaxCapacity:600, CapacityIncrease:2, Weight:80, MaxHP:80, Price:500, Noticeability:70, Width:1, Height:1}, {Name:"Big Wooden Cart", Class:2, MaxCapacity:1000, CapacityIncrease:2, Weight:160, MaxHP:100, Price:1000, Noticeability:90, Width:1, Height:1}, {Name:"Countryside Cart", Class:2, MaxCapacity:500, CapacityIncrease:2.5, Weight:80, MaxHP:100, Price:1000, Noticeability:50, Width:1, Height:1}, {Name:"'\u0162igan' Cart", Class:2, MaxCapacity:1200, CapacityIncrease:2.5, Weight:150, MaxHP:150, Price:1700, Noticeability:70, Width:1, Height:1}, {Name:"Small Metal Cart", Class:2, MaxCapacity:1000, CapacityIncrease:3, Weight:80, MaxHP:250, Price:2300, Noticeability:50, Width:1, Height:1}, {Name:"Big Metal Cart", Class:2, MaxCapacity:2000, CapacityIncrease:3, Weight:120, MaxHP:350, Price:3500, Noticeability:80, Width:1, Height:1}, {Name:"Arctic Cat 50cc ATV", Class:3, Capacity:75, Speed:15, FuelUse:3, Places:1, FuelTank:8, MaxHP:100, Price:4000, Noticeability:50, Width:1, Height:1}, {Name:"Yamaha Raptor 700R", Class:3, Capacity:200, Speed:25, FuelUse:6, Places:1, FuelTank:11, MaxHP:150, Price:7500, Noticeability:50, Width:1, Height:1}, {Name:"Jeep CJ-5", Class:3, Capacity:800, Speed:20, FuelUse:25, Places:2, FuelTank:57, MaxHP:300, Price:17000, Noticeability:100, Width:1, Height:1}, {Name:"Land Rover Defender", Class:3, Capacity:1000, Speed:20, FuelUse:15, Places:4, FuelTank:60, MaxHP:400, Price:25600, Noticeability:100, Width:1, Height:2}, {Name:"Hummer H1", Class:3, Capacity:1800, Speed:20, FuelUse:28, Places:5, FuelTank:160, MaxHP:600, Price:38400, Noticeability:110, Width:1, Height:2}];
Items = [Number.NaN, {Name:".50 AE", Class:2, Weight:0.045, Price:1.5}, {Name:"9mm Luger", Class:2, Weight:0.021, Price:0.4}, {Name:".44 Magnum", Class:2, Weight:0.023, Price:0.8}, {Name:".45 ACP", Class:2, Weight:0.024, Price:0.85}, {Name:"9x18mm Makarov", Class:2, Weight:0.02, Price:0.5}, {Name:"7.62x39mm", Class:2, Weight:0.016, Price:0.4}, {Name:"5.56x45mm NATO", Class:2, Weight:0.012, Price:0.6}, {Name:"7.62x51mm NATO", Class:2, Weight:0.02, Price:0.8}, {Name:".30-06 Springfield", Class:2, Weight:0.022, Price:0.7}, {Name:"12ga", Class:2, Weight:0.039, Price:0.9}, {Name:"PG-29V Rocket", Class:2, Weight:6.7, Price:85}, {Name:"PG-7VL Rocket", Class:2, Weight:2.6, Price:35}, {Name:"M6A3 Rocket", Class:2, Weight:3.2, Price:40}, {Name:"Desert Eagle", Class:1, Weight:2, Ammo:1, Capacity:7, DescCat:1, AnimCat:1, ReCock:3, Damage:20, Range:50, Accuracy:20, Price:1200}, {Name:"ATM Automag", Class:1, Weight:1.31, Ammo:1, Capacity:7, DescCat:1, AnimCat:1, ReCock:3, Damage:19, Range:50, Accuracy:25, Price:1050}, {Name:"Luger Parabellum", Class:1, Weight:0.871, Ammo:2, Capacity:8, DescCat:1, AnimCat:1, ReCock:2, Damage:5, Range:60, Accuracy:25, Price:400}, {Name:"Beretta M1951", Class:1, Weight:0.89, Ammo:2, Capacity:8, DescCat:1, AnimCat:1, ReCock:3, Damage:6, Range:75, Accuracy:30, Price:450}, {Name:"Browning Hi-Power", Class:1, Weight:0.9, Ammo:2, Capacity:13, DescCat:1, AnimCat:1, ReCock:3, Damage:7, Range:80, Accuracy:30, Price:650}, {Name:"Colt Anaconda", Class:1, Weight:1.503, Ammo:3, Capacity:6, DescCat:2, AnimCat:1, ReCock:3, Damage:15, Range:150, Accuracy:30, Price:1000}, {Name:"S&W Model 29", Class:1, Weight:1.4, Ammo:3, Capacity:6, DescCat:2, AnimCat:1, ReCock:3, Damage:15, Range:160, Accuracy:35, Price:1100}, {Name:"Springfield 1911-A1", Class:1, Weight:1.021, Ammo:4, Capacity:7, DescCat:1, AnimCat:1, ReCock:3, Damage:8, Range:65, Accuracy:25, Price:650}, {Name:"ATM Hardballer", Class:1, Weight:1.076, Ammo:4, Capacity:7, DescCat:1, AnimCat:1, ReCock:3, Damage:9, Range:70, Accuracy:30, Price:830}, {Name:"Colt M1917", Class:1, Weight:1.34, Ammo:4, Capacity:6, DescCat:2, AnimCat:1, ReCock:3, Damage:8, Range:46, Accuracy:25, Price:600}, {Name:"Makarov PM", Class:1, Weight:0.95, Ammo:5, Capacity:8, DescCat:1, AnimCat:1, ReCock:3, Damage:5, Range:60, Accuracy:30, Price:450}, {Name:"Beretta Cx4 Storm", Class:1, Weight:2.58, Ammo:2, Capacity:15, DescCat:3, AnimCat:2, ReCock:3, Damage:16, Range:350, Accuracy:50, Price:2050}, {Name:"UZI", Class:1, Weight:3.5, Ammo:2, Capacity:32, DescCat:4, AnimCat:1, ReCock:4, Damage:12, Range:150, Accuracy:20, Price:1500}, {Name:"Bizon", Class:1, Weight:3.2, Ammo:5, Capacity:64, DescCat:4, AnimCat:2, ReCock:4, Damage:13, Range:150, Accuracy:30, Price:1700}, {Name:"AK 47", Class:1, Weight:3.8, Ammo:6, Capacity:30, DescCat:5, AnimCat:2, ReCock:4, Damage:16, Range:300, Accuracy:40, Price:2000}, {Name:"AK 101", Class:1, Weight:3.4, Ammo:7, Capacity:30, DescCat:5, AnimCat:2, ReCock:4, Damage:17, Range:450, Accuracy:50, Price:2800}, {Name:"M 16", Class:1, Weight:2.9, Ammo:7, Capacity:30, DescCat:5, AnimCat:2, ReCock:4, Damage:14, Range:550, Accuracy:55, Price:2500}, {Name:"M24 SWS", Class:1, Weight:5.5, Ammo:8, Capacity:5, DescCat:6, AnimCat:2, ReCock:3, Damage:25, Range:800, Accuracy:100, Price:8420}, {Name:"M40A3", Class:1, Weight:7.5, Ammo:8, Capacity:5, DescCat:6, AnimCat:2, ReCock:3, Damage:25, Range:915, Accuracy:100, Price:9500}, {Name:"Springfield M1903", Class:1, Weight:3.95, Ammo:9, Capacity:5, DescCat:3, AnimCat:2, ReCock:2, Damage:20, Range:400, Accuracy:50, Price:1280}, {Name:"M1 Garand", Class:1, Weight:4.6, Ammo:9, Capacity:5, DescCat:3, AnimCat:2, ReCock:2, Damage:22, Range:550, Accuracy:55, Price:1400}, {Name:"M4", Class:1, Weight:2.52, Ammo:7, Capacity:30, DescCat:5, AnimCat:2, ReCock:4, Damage:15, Range:450, Accuracy:70, Price:3150}, {Name:"M14", Class:1, Weight:4.5, Ammo:8, Capacity:20, DescCat:5, AnimCat:2, ReCock:4, Damage:22, Range:460, Accuracy:50, Price:2140}, {Name:"Savage Slug Warrior", Class:1, Weight:3.4, Ammo:10, Capacity:2, DescCat:7, AnimCat:2, ReCock:2, Damage:4, Range:50, Accuracy:20, Price:1500, SubCat:1}, {Name:"Winchester 1300 Defender", Class:1, Weight:3.12, Ammo:10, Capacity:8, DescCat:7, AnimCat:2, ReCock:2, Damage:4, Range:50, Accuracy:20, Price:1750, SubCat:2}, {Name:"American Arms Brittany", Class:1, Weight:2.72, Ammo:10, Capacity:2, DescCat:7, AnimCat:2, ReCock:1, Damage:4, Range:50, Accuracy:20, Price:1700, SubCat:3}, {Name:"Beretta S682", Class:1, Weight:3.4, Ammo:10, Capacity:2, DescCat:7, AnimCat:2, ReCock:1, Damage:6, Range:50, Accuracy:40, Price:3560, SubCat:3}, {Name:"Browning BT-99", Class:1, Weight:3.63, Ammo:10, Capacity:1, DescCat:7, AnimCat:2, ReCock:1, Damage:4, Range:50, Accuracy:25, Price:1450, SubCat:4}, {Name:"NEF Tracker", Class:1, Weight:2.72, Ammo:10, Capacity:1, DescCat:7, AnimCat:2, ReCock:1, Damage:4, Range:50, Accuracy:20, Price:920, SubCat:4}, {Name:"Remington 870 Express", Class:1, Weight:2.72, Ammo:10, Capacity:6, DescCat:7, AnimCat:2, ReCock:2, Damage:4, Range:50, Accuracy:20, Price:1650, SubCat:2}, {Name:"Beretta AL391", Class:1, Weight:2.68, Ammo:10, Capacity:6, DescCat:7, AnimCat:2, ReCock:3, Damage:5, Range:50, Accuracy:25, Price:2980, SubCat:5}, {Name:"RPK", Class:1, Weight:5, Ammo:6, Capacity:100, DescCat:8, AnimCat:3, ReCock:4, Damage:20, Range:800, Accuracy:35, Price:4500}, {Name:"Bren LMG", Class:1, Weight:10.35, Ammo:8, Capacity:100, DescCat:8, AnimCat:3, ReCock:4, Damage:25, Range:1000, Accuracy:35, Price:5200}, {Name:"CETME Ameli", Class:1, Weight:6.35, Ammo:7, Capacity:200, DescCat:8, AnimCat:3, ReCock:4, Damage:16, Range:1000, Accuracy:40, Price:5850}, {Name:"FN MAG", Class:1, Weight:10.15, Ammo:8, Capacity:200, DescCat:8, AnimCat:3, ReCock:4, Damage:28, Range:1000, Accuracy:35, Price:5650}, {Name:"M1919 Browning", Class:1, Weight:14, Ammo:9, Capacity:250, DescCat:8, AnimCat:3, ReCock:4, Damage:25, Range:950, Accuracy:28, Price:4840}, {Name:"RPG 29", Class:1, Weight:6.7, Ammo:11, Capacity:1, DescCat:9, AnimCat:4, ReCock:1, Damage:60, Range:500, Accuracy:25, Price:6850}, {Name:"RPG 7", Class:1, Weight:7, Ammo:12, Capacity:1, DescCat:9, AnimCat:4, ReCock:1, Damage:50, Range:350, Accuracy:20, Price:3940}, {Name:"Bazooka M9A1", Class:1, Weight:7.23, Ammo:13, Capacity:1, DescCat:9, AnimCat:4, ReCock:1, Damage:45, Range:350, Accuracy:18, Price:3850}, {Name:"MK II", Class:4, Weight:0.6, AnimCat:5, Damage:30, Price:25}, {Name:"F-1", Class:4, Weight:0.6, AnimCat:5, Damage:32, Price:30}, {Name:"M67", Class:4, Weight:0.4, AnimCat:5, Damage:40, Price:50}, {Name:"Small Hunting Knife", Class:5, Weight:0.2, AnimCat:0, Damage:2, Price:20}, {Name:"Big Hunting Knife", Class:5, Weight:0.35, AnimCat:0, Damage:3, Price:40}, {Name:"Survival Knife", Class:5, Weight:0.5, AnimCat:0, Damage:5, Price:60}, {Name:"Scimitar", Class:5, Weight:1.5, AnimCat:6, Damage:8, Price:200}, {Name:"Katana", Class:5, Weight:1, AnimCat:6, Damage:10, Price:500}, {Name:"Light Bulletproof Vest", Class:3, Weight:3, Protection:20, Price:850, Col:4215924}, {Name:"Standard Bulletproof Vest", Class:3, Weight:5, Protection:30, Price:1050, Col:4665399}, {Name:"Heavy Bulletproof Vest", Class:3, Weight:7, Protection:50, Price:1520, Col:5062972}, {Name:"Military Armor", Class:3, Weight:7, Protection:60, Price:2800, Col:12626064}, {Name:"Police Armor", Class:3, Weight:6, Protection:55, Price:2500, Col:3289170}, {Name:"Glass Bottle", Class:7, Weight:0.3, Price:0.5, Capacity:0.75}, {Name:"Small Water Bottle", Class:7, Weight:0.07, Price:10, Capacity:0.8}, {Name:"Medium Water Bottle", Class:7, Weight:0.05, Price:15, Capacity:1}, {Name:"Big Water Bottle", Class:7, Weight:0.1, Price:30, Capacity:1.5}, {Name:"Water Jerry Can", Class:7, Weight:2, Price:50, Capacity:20}, {Name:"Metal Water Barrel", Class:7, Weight:17, Price:170, Capacity:200}, {Name:"Plastic Water Barrel", Class:7, Weight:12, Price:220, Capacity:208}, {Name:"10L Fuel Jerry Can", Class:8, Weight:1.2, Price:35, Capacity:10}, {Name:"20L Fuel Jerry Can", Class:8, Weight:2, Price:55, Capacity:20}, {Name:"Fuel Barrel", Class:8, Weight:18, Price:250, Capacity:200}, {Name:"First Aid Kit", Weight:2.5, Class:10, Price:120, Description:"Increases group's doctor skill by 5%", IncreaseWhat:1, IncreaseHow:1.05}, {Name:"Minor Sugery Kit", Weight:1.8, Class:10, Price:250, Description:"Increases group's doctor skill by 15%", IncreaseWhat:1, IncreaseHow:1.15}, {Name:"Advanced Sugery Kit", Weight:2.7, Class:10, Price:790, Description:"Increases group's doctor skill by 30%", IncreaseWhat:1, IncreaseHow:1.3}, {Name:"Veterinary Kit", Weight:2, Class:10, Price:280, Description:"Increases group's veterinary skill by 20%", IncreaseWhat:2, IncreaseHow:1.2}, {Name:"Basic Tool Set", Weight:6, Class:10, Price:190, Description:"Increases group's mechanic skill by 20%", IncreaseWhat:3, IncreaseHow:1.2}, {Name:"Advanced Tool Set", Weight:25, Class:10, Price:1050, Description:"Increases group's mechanic skill by 50%", IncreaseWhat:3, IncreaseHow:1.5}, {Name:"Binoculars", Weight:1, Class:10, Price:100, Description:"Lets you notice the enemy earlier", IncreaseWhat:4, IncreaseHow:1.3}, {Name:"Book", Weight:0.25, Class:10, Price:0, Description:"'War as I Knew It' book by General George S. Patton, Jr.", Special:true}, {Name:"Pass", Weight:0.005, Class:10, Price:0, Description:"A pass to Fort Goks base with the name and the picture of colonel Kaminski", Special:true}, {Name:"Your Pass", Weight:0.005, Class:10, Price:0, Description:"A pass to Fort Goks base with your name on it", Special:true}, {Name:"Letter", Weight:0.015, Class:10, Price:0, Description:"A letter from Oswald Raff to Colonel Kaminski", Special:true}, {Name:"Manual", Weight:0.05, Class:10, Price:0, Description:"A small book titled 'MRM-12-R OPERATOR'S GUIDE'", Special:true, Usable:true}];
Routes = [Number.NaN, [{Town:3, Sell:[{Type:8, Amount:1}, {Type:5, Amount:0.2}], Buy:[{Type:7, Amount:0.4}, {Type:6, Amount:0.4}, {Type:1, Amount:0.2}]}, {Town:4, Sell:[{Type:7, Amount:0.25}, {Type:1, Amount:1}, {Type:5, Amount:0.3}], Buy:[{Type:8, Amount:0.5}, {Type:3, Amount:0.01}]}, {Town:7, Sell:[{Type:7, Amount:0.75}, {Type:3, Amount:0.25}, {Type:5, Amount:0.3}], Buy:[{Type:8, Amount:0.5}, {Type:1, Amount:1}]}, {Town:6, Sell:[{Type:7, Amount:1}, {Type:3, Amount:0.75}, {Type:1, Amount:0.75}, {Type:8, Amount:0.5}, {Type:5, Amount:1}], Buy:[]}, {Town:11, Sell:[{Type:6, Amount:1}, {Type:8, Amount:0.3}], Buy:[{Type:4, Amount:1}]}, {Town:1, Sell:[{Type:4, Amount:1}, {Type:8, Amount:0.6}, {Type:1, Amount:1}], Buy:[{Type:5, Amount:1}]}], [{Town:16, Sell:[{Type:8, Amount:1}], Buy:[{Type:1, Amount:0.5}, {Type:2, Amount:0.3}, {Type:7, Amount:0.2}]}, {Town:7, Sell:[{Type:7, Amount:1}], Buy:[{Type:8, Amount:0.75}, {Type:2, Amount:0.25}]}, {Town:6, Sell:[{Type:1, Amount:0.75}, {Type:8, Amount:0.5}], Buy:[{Type:12, Amount:2E-5}]}, {Town:8, Sell:[{Type:12, Amount:1}, {Type:1, Amount:1}, {Type:2, Amount:1}, {Type:8, Amount:0.5}]}], [{Town:13, Sell:[{Type:5, Amount:0.5}], Buy:[{Type:1, Amount:0.2}, {Type:6, Amount:0.3}]}, {Town:10, Sell:[{Type:5, Amount:1}], Buy:[{Type:6, Amount:0.7}, {Type:1, Amount:0.3}]}, {Town:11, Sell:[{Type:6, Amount:1}], Buy:[{Type:4, Amount:1}]}, {Town:9, Sell:[{Type:4, Amount:1}], Buy:[{Type:5, Amount:1}]}, {Town:6, Sell:[{Type:5, Amount:1}, {Type:1, Amount:1}], Buy:[]}, {Town:9, Sell:[], Buy:[{Type:5, Amount:1}]}], [{Town:13, Sell:[{Type:5, Amount:0.5}], Buy:[{Type:1, Amount:0.2}, {Type:6, Amount:0.299}, {Type:3, Amount:0.001}]}, {Town:10, Sell:[{Type:5, Amount:1}, {Type:3, Amount:0.1}], Buy:[{Type:1, Amount:0.2}, {Type:6, Amount:0.8}]}, {Town:11, Sell:[{Type:6, Amount:1}, {Type:3, Amount:0.2}], Buy:[{Type:4, Amount:0.9}, {Type:1, Amount:0.1}]}, {Town:1, Sell:[{Type:4, Amount:0.9}, {Type:1, Amount:0.5}, {Type:3, Amount:1}], Buy:[{Type:5, Amount:1}]}, {Town:4, Sell:[{Type:4, Amount:1}, {Type:1, Amount:1}, {Type:5, Amount:0.4}], Buy:[{Type:3, Amount:0.002}]}], [{Town:12, Sell:[{Type:9, Amount:0.6}, {Type:12, Amount:0.7}], Buy:[{Type:10, Amount:0.3}, {Type:1, Amount:0.1}, {Type:2, Amount:0.1}]}, {Town:14, Sell:[{Type:1, Amount:0.2}, {Type:9, Amount:1}, {Type:12, Amount:0.5}], Buy:[{Type:10, Amount:1}]}, {Town:8, Sell:[{Type:10, Amount:0.8}, {Type:1, Amount:0.3}, {Type:12, Amount:1}], Buy:[{Type:9, Amount:1}]}, {Town:6, Sell:[{Type:9, Amount:1}, {Type:1, Amount:1}], Buy:[]}, {Town:1, Sell:[{Type:10, Amount:1}], Buy:[{Type:9, Amount:1}]}, {Town:6, Sell:[{Type:9, Amount:0.8}], Buy:[{Type:12, Amount:7E-5}]}, {Town:9, Sell:[{Type:9, Amount:1}], Buy:[{Type:1, Amount:0.3}]}, {Town:8, Sell:[{Type:1, Amount:1}], Buy:[{Type:9, Amount:1}]}], [{Town:5, Sell:[{Type:8, Amount:0.5}, {Type:5, Amount:0.5}, {Type:9, Amount:0.4}, {Type:13, Amount:0.5}], Buy:[{Type:11, Amount:0.6}, {Type:1, Amount:0.2}, {Type:2, Amount:0.2}]}, {Town:2, Sell:[{Type:2, Amount:1}, {Type:8, Amount:1}, {Type:5, Amount:1}, {Type:9, Amount:1}, {Type:13, Amount:1}], Buy:[{Type:11, Amount:0.79}, {Type:1, Amount:0.2}, {Type:3, Amount:0.01}]}, {Town:7, Sell:[{Type:3, Amount:1}], Buy:[{Type:1, Amount:0.1}, {Type:8, Amount:0.9}]}, {Town:6, Sell:[{Type:11, Amount:1}, {Type:1, Amount:0.5}, {Type:8, Amount:0.2}], Buy:[]}, {Town:1, Sell:[{Type:1, Amount:0.2}], Buy:[{Type:5, Amount:0.5}, {Type:9, Amount:0.4}, {Type:13, Amount:0.1}]}, {Town:4, Sell:[{Type:1, Amount:0.4}], Buy:[{Type:3, Amount:0.05}, {Type:13, Amount:0.1}]}, {Town:8, Sell:[{Type:1, Amount:1}, {Type:3, Amount:1}], Buy:[{Type:9, Amount:1}]}], [{Town:16, Sell:[{Type:5, Amount:0.6}], Buy:[{Type:1, Amount:0.5}, {Type:2, Amount:0.5}]}, {Town:15, Sell:[{Type:5, Amount:1}, {Type:2, Amount:0.5}], Buy:[{Type:1, Amount:1}]}, {Town:9, Sell:[{Type:2, Amount:1}], Buy:[{Type:5, Amount:0.3}, {Type:1, Amount:0.7}]}, {Town:6, Sell:[{Type:1, Amount:1}, {Type:5, Amount:0.5}], Buy:[]}, {Town:7, Sell:[], Buy:[{Type:2, Amount:0.4}, {Type:8, Amount:0.3}, {Type:1, Amount:0.3}]}, {Town:1, Sell:[{Type:1, Amount:0.3}, {Type:8, Amount:0.2}], Buy:[{Type:5, Amount:1}]}, {Town:5, Sell:[{Type:1, Amount:0.4}, {Type:2, Amount:0.4}, {Type:8, Amount:0.4}], Buy:[]}, {Town:8, Sell:[{Type:1, Amount:1}, {Type:2, Amount:1}, {Type:5, Amount:0.2}, {Type:8, Amount:1}], Buy:[]}], [{Town:8, Sell:[{Type:8, Amount:0.7}, {Type:3, Amount:0.4}, {Type:1, Amount:1}, {Type:2, Amount:0.6}], Buy:[{Type:9, Amount:1}]}, {Town:9, Sell:[{Type:8, Amount:1}, {Type:9, Amount:0.2}, {Type:2, Amount:1}, {Type:3, Amount:0.3}], Buy:[{Type:5, Amount:0.2}, {Type:1, Amount:0.5}]}, {Town:7, Sell:[{Type:9, Amount:0.15}, {Type:5, Amount:1}, {Type:3, Amount:0.5}], Buy:[{Type:1, Amount:0.3}, {Type:2, Amount:0.4}, {Type:8, Amount:0.3}]}, {Town:1, Sell:[{Type:1, Amount:0.2}, {Type:3, Amount:1}, {Type:8, Amount:0.2}], Buy:[{Type:5, Amount:1}]}, {Town:4, Sell:[{Type:9, Amount:0.5}, {Type:1, Amount:0.2}, {Type:8, Amount:0.2}], Buy:[{Type:1, Amount:0.5}]}, {Town:3, Sell:[{Type:9, Amount:1}, {Type:1, Amount:0.4}, {Type:3, Amount:0.15}, {Type:8, Amount:0.2}], Buy:[{Type:2, Amount:0.5}]}], [{Town:10, Sell:[{Type:13, Amount:0.25}], Buy:[{Type:1, Amount:0.25}]}, {Town:13, Sell:[{Type:13, Amount:0.33}], Buy:[{Type:1, Amount:0.33}]}, {Town:16, Sell:[{Type:13, Amount:0.5}], Buy:[{Type:1, Amount:0.5}]}, {Town:15, Sell:[{Type:13, Amount:1}], Buy:[{Type:1, Amount:1}]}, {Town:3, Sell:[{Type:1, Amount:0.2}], Buy:[{Type:13, Amount:0.33}]}, {Town:4, Sell:[{Type:1, Amount:0.4}], Buy:[{Type:13, Amount:0.4}]}, {Town:1, Sell:[{Type:1, Amount:1}], Buy:[{Type:13, Amount:1}]}], [{Town:3, Sell:[{Type:1, Amount:0.2}], Buy:[{Type:13, Amount:0.33}]}, {Town:1, Sell:[{Type:1, Amount:0.5}], Buy:[{Type:13, Amount:0.5}]}, {Town:4, Sell:[{Type:1, Amount:1}], Buy:[{Type:13, Amount:1}]}, {Town:6, Sell:[{Type:13, Amount:0.5}], Buy:[{Type:12, Amount:2E-5}]}, {Town:9, Sell:[{Type:13, Amount:0.25}], Buy:[{Type:1, Amount:1}]}, {Town:14, Sell:[{Type:13, Amount:0.33}, {Type:12, Amount:0.33}], Buy:[]}, {Town:12, Sell:[{Type:13, Amount:0.5}, {Type:12, Amount:0.5}], Buy:[]}, {Town:8, Sell:[{Type:13, Amount:1}, {Type:12, Amount:1}], Buy:[]}], [{Town:14, Sell:[], Buy:[{Type:10, Amount:0.5}]}, {Town:12, Sell:[], Buy:[{Type:10, Amount:1}]}, {Town:8, Sell:[{Type:10, Amount:1}], Buy:[]}], [{Town:12, Sell:[], Buy:[{Type:10, Amount:0.5}]}, {Town:14, Sell:[], Buy:[{Type:10, Amount:1}]}, {Town:1, Sell:[{Type:10, Amount:1}], Buy:[]}]];
RouteLevels = [Number.NaN, 10, 9, 100, 13, 8, 9, 16, 6, 16, 10, 200, 25];
RandomSeed = [0.473010233137757, 0.378484738525003, 0.959207360167056, 0.183179612271488, 0.761985629796982, 0.580421735532582, 0.584424225147814, 0.871017044875771, 0.822081737220287, 0.684809277765453, 0.577482746914029, 0.320378128904849, 0.581595440860838, 0.266888810321689, 0.467784673441201, 0.880415323656052, 0.756633234210312, 0.832991712260991, 0.287853440269828, 0.128512403462082, 0.647755643818527, 0.997548031620681, 0.855144315864891, 0.480423918459564, 0.749166686087847, 0.101551959291101, 0.285406440496445, 0.828618813771755, 0.868772000540048, 0.820792660582811, 0.447975135408342, 0.945850607007742, 0.485515695996583, 0.299976180773228, 0.161819606553763, 0.999458806123585, 0.426383294165134, 0.792128621600568, 0.272620643023401, 0.254312518984079, 0.631277449429035, 0.000469430815428495, 0.339119494892657, 0.290244649164379, 0.685187492519617, 0.588534944225103, 0.966573690995574, 0.412975143175572, 0.718453273177147, 0.579360836185515, 0.619524607434869, 0.803039207588881, 0.272917376831174, 0.620477699674666, 0.181090896949172, 0.156827242579311, 0.0820180322043598, 0.582870225422084, 0.147585873026401, 0.36589539097622, 0.603826053440571, 0.98251539375633, 0.0308897052891552, 0.00327745312824845, 0.297587210312486, 0.38807171722874, 0.954443099442869, 0.947180764283985, 0.263358352705836, 0.0491328472271562, 0.492858678102493, 0.259796321392059, 0.408085395116359, 0.727324014063925, 0.421291095670313, 0.153580063953996, 0.608987372368574, 0.423850896302611, 0.723191333934665, 0.911284624133259, 0.272580610588193, 0.91224355250597, 0.0873387702740729, 0.906330201774836, 0.329998270608485, 0.251448126509786, 0.582531251013279, 0.454810617025942, 0.918639354873449, 0.976537232752889, 0.865326924715191, 0.642374098766595, 0.237955170683563, 0.0835573491640389, 0.334632975049317, 0.268088433425874, 0.420504761394113, 0.699623781256378, 0.371043401304632, 0.183132431469858];
Dialogues = [Number.NaN, [Number.NaN, {CharSays:"Hello. How can I help you?", YouSay:[{Text:"My name is @name. My uncle died some days ago.", Action:function () {
TMenu.SetStage(2);
TMenu.SetDefault(1, 13);
}}, {Text:"Sorry. I've come to a wrong place. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"I'm sorry. He was a good man. He used to speak a lot about you. So, you came for the inheritance?", YouSay:[{Text:"That's right, sir. ", Action:function () {
TMenu.SetStage(3);
TMenu.SpecialAction(1);
}}]}, {CharSays:"Please, take a seat... A donkey, a rifle with some ammunition and $1000 in cash is what your uncle left you. Not of much use where you live, huh?... Your uncle... He was the best caravaneer in the zone\u2026 The cruelest robbers feared him...", YouSay:[{Text:"Excuse me sir, can you tell me how he exactly died?", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"Robbers\u2026 Damn robbers\u2026 He went too far. Tell me, @callyou, have you thought about becoming a caravaneer like your uncle?... You know, with the inheritance you have received you have all it takes to start a business of this kind\u2026", YouSay:[{Text:"Well\u2026 Maybe\u2026 Who knows\u2026", Action:function () {
TMenu.SetStage(5);
}}, {Text:"It sounds like a good idea.", Action:function () {
TMenu.SetStage(5);
}}, {Text:"No way.", Action:function () {
TMenu.SetStage(6);
}}]}, {CharSays:"If you decide to do it, never go farther than Drushlak. Robbers in this zone are not a piece of cake, but they're just kids in comparison to those you can meet in other zones. Don't repeat your uncle's mistakes. I suppose that you don't even have anybody to leave inheritance to.", YouSay:[{Text:"Thank you for your advice.", Action:function () {
TMenu.SetStage(7);
}}, {Text:"Thank you. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"It\u2019s a wise decision. Being a caravaneer could be quite profitable, but it\u2019s way too dangerous. Well\u2026 If you decide to become one anyway, don\u2019t ever go farther than Drushlak. You can deal with robbers here, but not with those in other zones.", YouSay:[{Text:"Well. Thank you. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"You\u2019re welcome.", YouSay:[{Text:"Let\u2019s say I become a caraveneer, how should I get started? ", Action:function () {
TMenu.SetStage(8);
}}, {Text:"How do I get from town to town? ", Action:function () {
TMenu.SetStage(9);
}}, {Text:"Can you tell me a little bit about the region?", Action:function () {
TMenu.SetStage(10);
}}, {Text:"OK. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"You see\u2026 Caravaneers make money buying goods where they are produced and selling them where they are needed. You already have transport and a weapon. You can start right here, in Poca Cosa. We produce more leather than we can possibly use, which means that leather is cheap here. Buy as much leather as you can and take it to Caganel.", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(31);
}}]}, {CharSays:"It\u2019s easy. You\u2019ve got a map, don\u2019tcha? Measure the direction on your map and go that way until you get where you want. ", YouSay:[{Text:"Thank you.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"Well\u2026 All the towns here belong to a sort of sate with the capital in Qubba. It\u2019s not the kind of state you may have read about in history books. The government hardly controls the small region near the capital. The rest of the settlements are left to themselves. Robbers are our worst problem. Fortunately, in this zone we don\u2019t produce anything really valuable,", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(33);
}}]}, {CharSays:"They\u2019re good guys. Probably, the only ones who really care about the security of the region. Unfortunately, they don\u2019t have enough power to protect the whole state. The organization was founded by oil drillers from Verdammer Platz and Diep Gat and they protect the caravans that pass through that region. Their leader is John Sheppard and their headquarters", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(34);
Story.MacCoySendsRegards = true;
}}]}, {CharSays:"As a sheriff I serve the government and apply its law without asking too many questions. However, as a citizen, I have my serious doubts about benefits of this law for our people. The head of the government is Oswald Raff. They say he used to be a robber in the past. I don\u2019t know if it\u2019s true, but what I know is that he keeps robbing us the legal way without offering", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(35);
}}]}, {CharSays:"Hi @callyou. How can I help you?", YouSay:[{Text:"Hi. I would like to become a caravaneer. How should I get started?", Action:function () {
TMenu.SetStage(8);
}}, {Text:"Hi. Can you tell me how to get from town to town?", Action:function () {
TMenu.SetStage(9);
}}, {Text:"Hello. Can you tell me a bit about this region? ", Action:function () {
TMenu.SetStage(10);
}}, {Text:"Hi. Just passing by. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hi @callyou. How are you doing?", YouSay:[{Text:"I\u2019m well. Thanks. How are things going?", Action:function () {
TMenu.SetStage(15);
}}, {Text:"I\u2019m fine. I have to ask you something\u2026", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"Very well. Thanks. Glad to see you @callyou.", YouSay:[{Text:"Me too. There\u2019s something I need to ask\u2026", Action:function () {
TMenu.SetStage(16);
}}, {Text:"Well\u2026 I need to go. See you around. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Go ahead\u2026", YouSay:[{Text:"I met John Sheppard, and he said you can help us solve certain problems.", Action:function () {
TMenu.SetStage(17);
Story.TalkedToMacCoy = true;
}}]}, {CharSays:"Oh\u2026 You\u2019re working for John. I\u2019m glad you have chosen the right way. How can I help?", YouSay:[{Text:"Have you ever heard about robbers' base?", Action:function () {
TMenu.SetStage(18);
}}]}, {CharSays:"Hmm\u2026 I\u2019ve heard about it, but there are so many legends about robbers that I can\u2019t tell what is true and what is not.", YouSay:[{Text:"Does the legend tell where this place is?", Action:function () {
TMenu.SetStage(19);
}}]}, {CharSays:"Not exactly. It seems like robbers come from the north-east, from somewhere near Abu Kirdyk and Sekir Bashka, so I suppose their headquarters are somewhere in that region\u2026 You know what\u2026 I know a person who can help you\u2026 There\u2019s an ex-robber called Joseph Berg. He belonged to one of the most dangerous gangs in the country.", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(37);
}}]}, {CharSays:"You know\u2026 He\u2019s an old man with bad temper and terrible reputation. He tries to cultivate some veggies and sell them, but to succeed in a business you need to be accepted in society, and he\u2019s not. So things go quite badly for him. If you offer him some money he may agree to help you\u2026 Maybe it will keep him from becoming a robber once again.", YouSay:[{Text:"Where can I find him?", Action:function () {
TMenu.SetStage(21);
TMenu.SpecialAction(2);
}}]}, {CharSays:"As I said, he lives in Drushlak. In a small house in the southern part of the town. There are not too many houses in Drushlak, so you\u2019ll find him quickly.", YouSay:[{Text:"Excellent. I\u2019m going to pay him visit. Thanks a lot.", Action:function () {
TMenu.SetStage(22);
}}]}, {CharSays:"I\u2019m glad to help\u2026. Ah\u2026 And one last thing\u2026 Don\u2019t tell him I sent you. Don\u2019t even mention my name. He hates me really bad.", YouSay:[{Text:"I will not. Thanks again. Bye", Action:function () {
TMenu.Leave();
TMenu.SetDefault(1, 23);
}}]}, {CharSays:"Hi. Have you talked to Joseph Berg?", YouSay:[{Text:"Not yet. I\u2019m working on it", Action:function () {
TMenu.SetStage(24);
}}]}, {CharSays:"Good luck.", YouSay:[{Text:"Thanks. See you around. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hey @callyou. You\u2019re doing a great job. Congratulations!", YouSay:[{Text:"Thank you. Have a nice day! [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hey. Have you met Berg?", YouSay:[{Text:"Yes.", Action:function () {
TMenu.SetStage(27);
}}, {Text:"No. I\u2019m working on it ", Action:function () {
TMenu.SetStage(24);
}}]}, {CharSays:"Did he tell you where that thing is?", YouSay:[{Text:"No. I mentioned your name and he went mad.", Action:function () {
TMenu.SetStage(28);
}}]}, {CharSays:"Too bad, @callyou\u2026 Too bad\u2026 Now he\u2019ll never tell you\u2026", YouSay:[{Text:"What should I do?", Action:function () {
TMenu.SetStage(29);
}}]}, {CharSays:"Well\u2026 I guess there\u2019s no other way but going to Abu Kirdyk zone and search for it\u2026 It could be really dangerous\u2026 you know\u2026", YouSay:[{Text:"Yes. I know. Thanks for trying to help me. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(1, 30);
}}]}, {CharSays:"I\u2019m glad to see you alive.", YouSay:[{Text:"Me too. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"They don\u2019t produce any leather, but they make shoes and need leather, which means that leather is expensive there and shoes are cheap. Sell leather there and buy shoes. Then go to Drushlak and sell the shoes. You can buy some clothes and medicines in Drushlak, bring it back to Poca Cosa and start all over again.", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(32);
}}]}, {CharSays:"Such cycle is called route. Your route will be Poca Cosa \u2013 Caganel \u2013 Drushlak. One more thing\u2026 If you want to survive, you better hire somebody to help you. An extra pair of hands will be of a great help\u2026 And don\u2019t forget to take enough water, food and forage to make sure your men and animals don\u2019t starve or die of thirst.", YouSay:[{Text:"Very well. Thank you.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"so robbers don\u2019t bother us too much. Other towns, like Verdammter Platz and Diep Gat had to found their own security organizations. Recently, all the organization of that region have joint forces and formed one big security group called Desert Patrol.", YouSay:[{Text:"Can you tell me more about Desert Patrol?", Action:function () {
TMenu.SetStage(11);
}}, {Text:"I\u2019d like to know more about the government.", Action:function () {
TMenu.SetStage(12);
}}, {Text:"Understood. Thanks.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"are in Verdammter Platz. If you are lucky to get there without getting killed by robbers, speak to John. Tell him I sent you. Maybe, you'll find a way to collaborate.", YouSay:[{Text:"OK. And the government. What about them?", Action:function () {
TMenu.SetStage(12);
}}, {Text:"I will. Thanks.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"much in exchange. He makes it look like he\u2019s fighting robbers, but everybody knows that he has agreed with them. They let him transport gold from Abu Kirdyk and Sekir Bashka to Qubba and probably sell him stolen goods. In exchange, he lets them do what they like. He has enough power to put and end to robbers, but he\u2019s not really interested in it.", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(36);
}}]}, {CharSays:"As long as citizens fear robbers, he has something to offer: military power that makes people feel more secure\u2026 I had the 'pleasure' to meet him personally, and I must say that he\u2019s not the kind of person one can trust. You know what\u2026 Take my advice\u2026 Whatever happens, don\u2019t ever accept any deals from his part or from the part of his men\u2026", YouSay:[{Text:"Thanks for the advice.", Action:function () {
TMenu.SetStage(7);
}}, {Text:"Can you tell me more about Desert Patrol?", Action:function () {
TMenu.SetStage(11);
}}]}, {CharSays:"We destroyed this gang about 20 years ago. Most of its members were killed in action or executed afterwards, but some, like Berg, agreed to collaborate and were only sentenced to several years in prison. Joseph was released last year and now he lives in Drushlak. He\u2019s not the nicest guy I\u2019ve ever met, but maybe he will help you.", YouSay:[{Text:"How can I convince him?", Action:function () {
TMenu.SetStage(20);
}}]}], [Number.NaN, {CharSays:"Hey you! What are you doing here?", YouSay:[{Text:"I\u2019m looking for John Sheppard.", Action:function () {
TMenu.SetStage(2);
}}, {Text:"I\u2019m just passing by. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"You\u2019re speaking to him. Who are you?", YouSay:[{Text:"Sheriff MacCoy told me to speak with you.", Action:function () {
TMenu.SetStage(3);
}, Condition:function () {
return(Story.MacCoySendsRegards);
}}, {Text:"My name\u2019s @name. I\u2019m a caravaneer.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"Ah! The good old MacCoy\u2026 How\u2019s he doing? Are you his new assistant?", YouSay:[{Text:"He\u2019s fine and no, I\u2019m not his new assistant. I\u2019m a caravaneer.", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"A caravaneer, I see\u2026 So, what has brought you here apart from sending me MacCoy\u2019s regards?", YouSay:[{Text:"I want to join Desert Patrol.", Action:function () {
TMenu.SetStage(5);
}}, {Text:"I want to help you.", Action:function () {
TMenu.SetStage(17);
}}, {Text:"Just wanted to have a look. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 29);
}}]}, {CharSays:"Why do you think I\u2019d be interested in taking you? I don\u2019t know anything about you. I don\u2019t even know if you actually met MacCoy.", YouSay:[{Text:"I suppose you have two choices: trust me or not.", Action:function () {
TMenu.SetStage(6);
}}, {Text:"I think I can help you.", Action:function () {
TMenu.SetStage(17);
}}, {Text:"That\u2019s right. I better go. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 29);
}}]}, {CharSays:"Why do you want to join Desert Patrol? ", YouSay:[{Text:"I heard they are the best army around.", Action:function () {
TMenu.SetStage(10);
}}, {Text:"Because I want to fight robbers.", Action:function () {
TMenu.SetStage(12);
}}, {Text:"I believe Desert Patrol is the only organization that can set our people free.", Action:function () {
TMenu.SetStage(20);
}}]}, {CharSays:"So, what do you want @name?", YouSay:[{Text:"I want to join Desert Patrol.", Action:function () {
TMenu.SetStage(8);
}}, {Text:"Nothing. I was just curious. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 30);
}}]}, {CharSays:"In Desert Patrol strangers can\u2019t even clean toilets. Find someone who can say something nice about you and come back. Then, I might think about it\u2026", YouSay:[{Text:"You can ask Sheriff MacCoy about me. By the way, he told me to speak with you.", Action:function () {
TMenu.SetStage(9);
}, Condition:function () {
return(Story.MacCoySendsRegards);
}}, {Text:"OK. I will look for such person. See you. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 30);
}}]}, {CharSays:"OK. Let\u2019s say MacCoy knows you, but why do you want to join Desert Patrol?", YouSay:[{Text:"I heard they are the best army around.", Action:function () {
TMenu.SetStage(10);
}}, {Text:"Because I want to fight robbers.", Action:function () {
TMenu.SetStage(12);
}}, {Text:"I believe Desert Patrol is the only organization that can set our people free.", Action:function () {
TMenu.SetStage(35);
}}]}, {CharSays:"Yes, we are indeed and do you know why that is? Because we only take the most honest and reliable men. Are you one of those? Can we trust you?", YouSay:[{Text:"Test me.", Action:function () {
TMenu.SetStage(11);
}}, {Text:"OK. If you don\u2019t trust me, I better leave. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 29);
}}]}, {CharSays:"OK. Keep doing what you did. We\u2019ll be watching you. Come back in a couple of months and we\u2019ll see\u2026", YouSay:[{Text:"OK. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 31);
}}]}, {CharSays:"In this case you came to the right place. Fighting robbers is what we do\u2026. OK\u2026 We may consider taking you. Do you know what our mission is?", YouSay:[{Text:"No. What is it?", Action:function () {
TMenu.SetStage(13);
}}]}, {CharSays:"We have a compromise with the people of Verdammter Platz and Diep Gat region. They finance us and we make sure oil caravans get to their target, which means that we guard the zone and don\u2019t let robbers attack caravans. ", YouSay:[{Text:"I see, but I think that you should get to the root of the problem", Action:function () {
TMenu.SetStage(14);
}}, {Text:"I\u2019m afraid it\u2019s not for me. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 33);
}}]}, {CharSays:"Really? And where is its root?", YouSay:[{Text:"I don\u2019t know yet, but I want to find out.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"Hmm\u2026 You seem to have too much initiative for a simple soldier\u2026 You know what\u2026 I will not recruit you, but I will collaborate with you. We will help you with all we can and you will help us. Being a caravaneer you attract less attention and can do more for our people than being a Desert Patrol soldier.", YouSay:[{Text:"Sounds great. I have a couple of questions to start with.", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"Go ahead.", YouSay:[{Text:"Do robbers have any kind of organization?", Action:function () {
TMenu.SetStage(23);
}}]}, {CharSays:"Why do you believe you can help us?", YouSay:[{Text:"Because I have weapons and know how to use them.", Action:function () {
TMenu.SetStage(18);
}}, {Text:"Because I hate robbers as much as you do.", Action:function () {
TMenu.SetStage(27);
}}]}, {CharSays:"We have enough men who know how to use weapons. Why do you think we need another one?", YouSay:[{Text:"Because I think the more men the better.", Action:function () {
TMenu.SetStage(19);
}}, {Text:"Because I believe that I can help extend your power to the whole state.", Action:function () {
TMenu.SetStage(20);
}}]}, {CharSays:"It is so in other organizations, but not in Desert Patrol. We only select the most honest and reliable men. I\u2019m afraid I just don\u2019t know you well enough to tell this about you.", YouSay:[{Text:"In this case, I\u2019ll come back later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 34);
}}]}, {CharSays:"How exactly?", YouSay:[{Text:"I believe that Desert Patrol must defeat Oswald Raff and take the power.", Action:function () {
TMenu.SetStage(21);
}}]}, {CharSays:"You're right. If we controlled Qubba we would have enough power to put and end to robbers, but a revolt requires a lot of funds and time. People finance our organization to protect their caravans and not to organize revolts. We can\u2019t do both things at the same time. Robbers are our priority and as long as they threaten the region we can't have other plans than fighting them continuously.", YouSay:[{Text:"Yeah. I understand. So, maybe, we have to put and end to robbers first.", Action:function () {
TMenu.SetStage(22);
}}]}, {CharSays:"Certainly. However, it is not as easy as it sounds.", YouSay:[{Text:"I can imagine. Can I ask you a couple of questions?", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"They have some kind of clans. Each clan has its leader or leaders. Sometimes these leaders meet to resolve tactical or political questions.", YouSay:[{Text:"And where do they meet?", Action:function () {
TMenu.SetStage(24);
}}]}, {CharSays:"I don\u2019t know. They say robbers have a kind of warehouse where they store stolen goods. This warehouse is also used as a meeting point or, let\u2019s say, their headquarters. I don\u2019t know where it is, but destroying it could harm robbers\u2019 organization.", YouSay:[{Text:"Any ideas on how I could find out where it is?", Action:function () {
TMenu.SetStage(25);
}}]}, {CharSays:"Not really\u2026 Among the people I know, the one who knows most about robbers is your friend sheriff MacCoy. He has fought robbers for more than 30 years. If I were you, I would ask him in the first place.", YouSay:[{Text:"Sounds reasonable. I\u2019m going to ask him.", Action:function () {
TMenu.SetStage(26);
TMenu.SetDefault(1, 14);
}}]}, {CharSays:"OK, but if you find out where this place is, don\u2019t even think about going there alone. Come back here and I\u2019ll give you some men.", YouSay:[{Text:"OK. I\u2019ll do it. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 36);
}}]}, {CharSays:"I\u2019m glad to hear that. How do you think you can help us?", YouSay:[{Text:"I believe that we can make Desert Patrol capture the power in the region", Action:function () {
TMenu.SetStage(20);
}}]}, {CharSays:"Hey\u2026 This is @name, a caravan destroyer!\u2026 Freeze! You\u2019re under arrest!", YouSay:[{Text:"[run away]", Action:function () {
TMenu.SpecialAction(3);
}}]}, {CharSays:"Yes? What do you want?", YouSay:[{Text:"I want to join Desert Patrol.", Action:function () {
TMenu.SetStage(6);
}}, {Text:"I want to help you.", Action:function () {
TMenu.SetStage(17);
}}, {Text:"Nothing. Just hanging around. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"What do you want @name?", YouSay:[{Text:"I want to join Desert Patrol", Action:function () {
TMenu.SetStage(8);
}}, {Text:"Nothing. I\u2019m going. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hey. We\u2019re watching you. You are doing well so far.", YouSay:[{Text:"OK. I\u2019ll keep it this way. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I need to talk to you.", Action:function () {
TMenu.SetStage(32);
}}]}, {CharSays:"Yeah? What is it?", YouSay:[{Text:"Nothing. See you later. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I don\u2019t want to join Desert Patrol as a soldier, but I think I could help you.", Action:function () {
TMenu.SetStage(17);
}}]}, {CharSays:"Yes? What else?", YouSay:[{Text:"Nothing. Just passing by. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I need to talk to you.", Action:function () {
TMenu.SetStage(32);
}}]}, {CharSays:"What?", YouSay:[{Text:"I want to help Desert Patrol.", Action:function () {
TMenu.SetStage(17);
}}, {Text:"Nothing. Bye.", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Well, we are an honest organization and we fight for people\u2019s freedom, but unfortunately we still don\u2019t have enough power to help everyone who needs help.", YouSay:[{Text:"If we join forces we can extend the Desert Patrol power to the whole state.", Action:function () {
TMenu.SetStage(20);
}}]}, {CharSays:"Hey. What\u2019s up? Have you talked to MacCoy?", YouSay:[{Text:"Not yet.", Action:function () {
TMenu.SetStage(37);
}}, {Text:"Yes, but it\u2019s not that easy. I need to investigate more.", Action:function () {
TMenu.SetStage(38);
}, Condition:function () {
return(Story.TalkedToMacCoy);
}}]}, {CharSays:"Well\u2026 Tell me when you do.", YouSay:[{Text:"Sure thing. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Well\u2026 Good luck then.", YouSay:[{Text:"Thanks. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hey! How is it going? Did you find out anything?", YouSay:[{Text:"Yes.", Action:function () {
TMenu.SetStage(41);
}}, {Text:"Not yet. I\u2019m working on it.", Action:function () {
TMenu.SetStage(40);
}}]}, {CharSays:"OK. Take your time.", YouSay:[{Text:"Well\u2026 See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Tell me!", YouSay:[{Text:"There\u2019s an underground bunker South-East to Abu Kirdyk.", Action:function () {
TMenu.SetStage(42);
}}]}, {CharSays:"Do you have the exact coordinates?", YouSay:[{Text:"Yes. You need to follow 113\u00BA direction from Abu Kirdyk about 130 Km.", Action:function () {
TMenu.SetStage(43);
}}]}, {CharSays:"Excellent! Now what we have to do is to destroy it. Are you ready to do it?", YouSay:[{Text:"Oh yeah!", Action:function () {
TMenu.SetStage(46);
}}, {Text:"Not yet. Give me some time to regain strength.", Action:function () {
TMenu.SetStage(44);
}}]}, {CharSays:"Sure thing. Come back when you\u2019re ready.", YouSay:[{Text:"OK. See you. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 45);
}}]}, {CharSays:"Hey! Are you ready to destroy the bunker?", YouSay:[{Text:"Yes. Tell your plan.", Action:function () {
TMenu.SetStage(46);
}}, {Text:"No. I need some more time.", Action:function () {
TMenu.SetStage(44);
}}]}, {CharSays:"Very well. I\u2019ll give you two squads of my best men, a combat engineer and some explosives. The engineer will go with your caravan and the squads will convoy you. The bunker may be guarded. Kill the guards and let the engineer deploy the explosives. OK?", YouSay:[{Text:"Consider it done.", Action:function () {
TMenu.SetStage(47);
TMenu.SpecialAction(4);
}}]}, {CharSays:"Great. Good luck!", YouSay:[{Text:"Thanks. See you when everything is done! [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 48);
}}]}, {CharSays:"Are you already done?", YouSay:[{Text:"No, sir. Not Yet.", Action:function () {
TMenu.SetStage(49);
}}]}, {CharSays:"Well\u2026 Tell me when you are.", YouSay:[{Text:"Sure thing. See you then. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"I know everything! Apart from destroying the base, you have killed 2 of the most important clan leaders. Great! Excellent! My congratulations! You are a national hero now, and I\u2019m proud to have you on our side. I bet you are very tired. Aren\u2019t you?", YouSay:[{Text:"Well\u2026 A little bit.", Action:function () {
TMenu.SetStage(51);
}}, {Text:"No. Not at all.", Action:function () {
TMenu.SetStage(53);
}}]}, {CharSays:"Sure. It wasn\u2019t an easy job. Here\u2026 Take some money as a reward for your heroic actions and have some rest. Come back when you\u2019re fresh and ready for more action.", YouSay:[{Text:"OK. Thanks. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 54);
Group.Money = Group.Money + 10000;
UpdateTradeText();
}}, {Text:"Please, keep your money. I\u2019m doing it for the good of our people.", Action:function () {
TMenu.SetStage(52);
}}]}, {CharSays:"Sorry. I didn\u2019t mean to offend you. Please come back when you are ready for a new mission. We have a lot of things to do together.", YouSay:[{Text:"It\u2019s alright. I\u2019ll be back soon. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 54);
}}, {Text:"I\u2019m ready now.", Action:function () {
TMenu.SetStage(53);
}}]}, {CharSays:"Really? You are tireless. Aren\u2019t you? Well. I suggest you to take a break before your new mission anyway, because once you complete it, you\u2019ll become one of the most wanted criminals of the state and will not be able to trade freely as you do now.", YouSay:[{Text:"Hmm\u2026 In that case I need more time. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 57);
}}, {Text:"It\u2019s OK. I\u2019m ready for it.", Action:function () {
TMenu.SetStage(58);
}}]}, {CharSays:"Hi. How are you? Have you rested well?", YouSay:[{Text:"Oh yeah!", Action:function () {
TMenu.SetStage(55);
}}, {Text:"No. I need more time.", Action:function () {
TMenu.SetStage(56);
}}]}, {CharSays:"There\u2019s one thing you need to know: Once you complete your next mission, you\u2019ll become one of the most wanted criminals of the state and will be persecuted by the police. So, if you want to earn some money before it happens, you better do it now.", YouSay:[{Text:"In that case I\u2019ll take some more time for myself.", Action:function () {
TMenu.SetStage(56);
TMenu.SetDefault(2, 57);
}}, {Text:"No problem. I\u2019m ready now.", Action:function () {
TMenu.SetStage(58);
}}]}, {CharSays:"Sure thing. Come back when you\u2019re ready.", YouSay:[{Text:"OK. See you then. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hi. Do you have enough funds and guts to become an enemy of the state?", YouSay:[{Text:"Oh yeah!", Action:function () {
TMenu.SetStage(58);
}}, {Text:"No. Not yet. I need more time.", Action:function () {
TMenu.SetStage(56);
}}]}, {CharSays:"Great. Have you ever heard about caravan X?", YouSay:[{Text:"I\u2019ve heard something\u2026", Action:function () {
TMenu.SetStage(59);
}}, {Text:"No.", Action:function () {
TMenu.SetStage(59);
}}]}, {CharSays:"OK. Oswald Raff\u2019s government and robbers have a pact. According to this pact, the government only controls the Qubba region and lets robbers do what they like in the rest of the territory. In exchange, robbers pay Oswald Raff a tax and let him transport gold from mines in Abu Kirdyk and Sekir Bashka to Qubba. The caravan that takes care of this is called Caravan X.", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(60);
}}]}, {CharSays:"Apart from transporting gold Caravan X buys stolen goods from robbers and sells them for a triple price in Qubba. Oswald Raff knows about it and encourages it, because a huge percentage of the profit goes to his pocket. As you probably understand, this caravan circulates between Abu Kirdyk, Sekir Bashka and Qubba. Your next mission is to destroy this caravan.", YouSay:[{Text:"[more...]", Action:function () {
TMenu.SetStage(61);
}}]}, {CharSays:"This way we will hurt Qubba financially and will leave robbers without their major client.", YouSay:[{Text:"Excellent plan. I\u2019m going to put it into practice right now.", Action:function () {
TMenu.SetStage(62);
Story.SentToCaravanX = true;
}}]}, {CharSays:"Great. Good luck, soldier.", YouSay:[{Text:"Thanks. See you soon. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 63);
}}]}, {CharSays:"Hi. Are you done?", YouSay:[{Text:"Not yet. I\u2019m working on it. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hmm\u2026 The engineer has been killed, huh? It\u2019s a pity, because I don\u2019t have another one to give you. It seems like you\u2019ll need to try and deploy the explosives yourself\u2026", YouSay:[{Text:"OK. I\u2019ll try. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Well done! Now, without gold Qubba will become weaker and weaker every day and robbers will have fewer reasons to rob caravans, because they won\u2019t sell the goods as easily as they used to.", YouSay:[{Text:"Great. Should we attack Qubba now?", Action:function () {
TMenu.SetStage(66);
}}]}, {CharSays:"Not yet. First of all, they\u2019re still too powerful. Let\u2019s give them some time to use up their reserves\u2026 Besides, we have recently received important strategic information\u2026", YouSay:[{Text:"What is it?", Action:function () {
TMenu.SetStage(67);
}}]}, {CharSays:"Well\u2026 I\u2019d call it bad news\u2026 It seems like the government possesses some kind of long range weapon. Being more accurate, they have missiles. We don\u2019t know anything about the warheads, but we must presume the worst.", YouSay:[{Text:"Hmm\u2026 Do you think they will use it if we try to attack?", Action:function () {
TMenu.SetStage(68);
}}]}, {CharSays:"Definitely. Oswald Raff is not the kind person who hesitates when his power is in danger.", YouSay:[{Text:"So what should we do?", Action:function () {
TMenu.SetStage(69);
Story.SentToDisableMissiles2 = (Story.SentToDisableMissiles = true);
}}]}, {CharSays:"I must admit that I don\u2019t have a definite plan. Missiles are located in Fort Goks. We have a sort of infiltrated person there. We don\u2019t communicate regularly with this person so I can\u2019t arrange anything from here. You should go to Fort Goks and find her.", YouSay:[{Text:"Her?", Action:function () {
TMenu.SetStage(70);
}}]}, {CharSays:"Yes. Her name is Francesca. She\u2019s some kind of\u2026 Well\u2026 She\u2019s a beautiful woman and all men of Fort Goks including high ranks of the military are mad about her. She\u2019s totally on our side and you can trust her completely.", YouSay:[{Text:"Where can I find her?", Action:function () {
TMenu.SetStage(71);
Towns[4].Houses[7].Revealed = true;
}}]}, {CharSays:"She lives near the shopping center. Cornelius St. 8, apt. 2.", YouSay:[{Text:"Alright. I\u2019m going to see her.", Action:function () {
TMenu.SetStage(72);
}}]}, {CharSays:"Excellent. I\u2019m sure you will find a way to get rid of the damn missiles.", YouSay:[{Text:"I hope so. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 73);
}}]}, {CharSays:"How is it going?", YouSay:[{Text:"I haven\u2019t seen the girl yet.", Action:function () {
TMenu.SetStage(74);
}}, {Text:"I\u2019ve spoken to Francesca, and there\u2019s a chance\u2026", Action:function () {
TMenu.SetStage(75);
}, Condition:function () {
return(Story.SpokeToFrancesca);
}}]}, {CharSays:"Ah\u2026 Alright. No hurry. Qubba is getting weaker every day and time is working for us.", YouSay:[{Text:"OK. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Really?", YouSay:[{Text:"Yes. Our plan is to falsify a security pass and get to the military base.", Action:function () {
TMenu.SetStage(76);
}}]}, {CharSays:"Very well. Can I help you with anything?", YouSay:[{Text:"Not really. We\u2019re doing fine so far.", Action:function () {
TMenu.SetStage(78);
}}, {Text:"Some money could help.", Action:function () {
TMenu.SetStage(77);
}}]}, {CharSays:"Sure. Here, take this. It\u2019s about $10.000. Can\u2019t give you more at the moment. I hope it helps.", YouSay:[{Text:"It certainly does. Thanks.", Action:function () {
TMenu.SetStage(78);
Group.Money = Group.Money + 10000;
UpdateTradeText();
}}]}, {CharSays:"Well\u2026 Good luck, then.", YouSay:[{Text:"Thanks. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 79);
}}]}, {CharSays:"Hi there. Any news?", YouSay:[{Text:"No. I'm still working on it.", Action:function () {
TMenu.SetStage(78);
}}, {Text:"I\u2019ve been to the base, but couldn\u2019t disable the missiles.", Action:function () {
TMenu.SetStage(80);
}, Condition:function () {
return(Story.BeenToTheBase);
}}]}, {CharSays:"Why?", YouSay:[{Text:"I don\u2019t know how to operate it. I need a manual.", Action:function () {
TMenu.SetStage(81);
}}]}, {CharSays:"Hmm\u2026 You know\u2026 I learnt military science myself reading books on the theme. I have quite a lot of books of this kind, but as far as I remember, there are no missile system manuals in my library.", YouSay:[{Text:"Where did you get these books?", Action:function () {
TMenu.SetStage(82);
}}]}, {CharSays:"From different places\u2026 Bought them, exchanged them, got some as presents\u2026 You know what\u2026 I know where you should look for the manual\u2026", YouSay:[{Text:"Where?", Action:function () {
TMenu.SetStage(83);
}}]}, {CharSays:"There\u2019s a man living in Diep Gat. He\u2019s a retired general and a passionate military literature collector. Apart from strategy and military science books he has loads of manuals and military documents of all kinds.", YouSay:[{Text:"Where exactly does he live? ", Action:function () {
TMenu.SetStage(84);
Towns[12].Houses[7].Revealed = true;
}}]}, {CharSays:"In the northern part of Diep Gat. He has two buildings on his terrain. One is his house and the other one is the library. You\u2019ll find him quickly.", YouSay:[{Text:"Great. Thanks.", Action:function () {
TMenu.SetStage(85);
}}]}, {CharSays:"Don\u2019t mention it. I hope you understand that your mission is top secret and you must not say a word about it to a stranger. Especially to an ex-general of the government.", YouSay:[{Text:"Of course.", Action:function () {
TMenu.SetStage(86);
}}]}, {CharSays:"In that case, good luck.", YouSay:[{Text:"Thanks. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 87);
}}]}, {CharSays:"Hi. Have you talked to the general?", YouSay:[{Text:"Not yet.", Action:function () {
TMenu.SetStage(88);
}}, {Text:"Yes.", Action:function () {
TMenu.SetStage(89);
}, Condition:function () {
return(Story.TalkedToTheGeneral);
}}]}, {CharSays:"Well\u2026 I hope he has the book and will give it to you.", YouSay:[{Text:"I hope so too. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Does he have the manual?", YouSay:[{Text:"Yes, but I couldn\u2019t get it.", Action:function () {
TMenu.SetStage(90);
}}]}, {CharSays:"Why?", YouSay:[{Text:"He says he doesn\u2019t sell his books.", Action:function () {
TMenu.SetStage(91);
}}]}, {CharSays:"Of course. I should have thought about it before. A true collector will never sell an item from his collection, especially if he\u2019s not what you call a poor man.", YouSay:[{Text:"What should I do now?", Action:function () {
TMenu.SetStage(92);
}}]}, {CharSays:"We\u2019ll make him an offer he won\u2019t be able to refuse.", YouSay:[{Text:"Should we menace him?", Action:function () {
TMenu.SetStage(93);
}}]}, {CharSays:"Not at all. He\u2019s a soldier and he will not give up without fighting. This mission is already risky enough. If we start a fight with an important person in the middle of Diep Gat, we will make it even worse.", YouSay:[{Text:"Then how?", Action:function () {
TMenu.SetStage(94);
}}]}, {CharSays:"Well\u2026 It will hurt, but I will give you a book, any collector would give his right arm for. It\u2019s a special early edition of Patton\u2019s \u201CWar as I Knew It\u201D. I suppose you don\u2019t understand much about this, but trust me, this book is worth much more than the manual.", YouSay:[{Text:"Does that mean that the general will accept the exchange?", Action:function () {
TMenu.SetStage(95);
Group.Inventory.push({Type:83, Amount:1});
Story.HaveTheBook = true;
}}]}, {CharSays:"No doubt.", YouSay:[{Text:"Great. In that case I\u2019m going to find him right now.", Action:function () {
TMenu.SetStage(96);
}}]}, {CharSays:"See you later.", YouSay:[{Text:"Bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 97);
}}]}, {CharSays:"Hey. Did you exchange the book?", YouSay:[{Text:"Not yet. I\u2019ll do it as soon as possible.", Action:function () {
TMenu.SetStage(98);
}}, {Text:"Oh yeah! ", Action:function () {
TMenu.SetStage(99);
}, Condition:function () {
return(Story.HaveTheManual);
}}]}, {CharSays:"OK. See you later.", YouSay:[{Text:"See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Sure. The old bastard must have been very happy to get Patton\u2019s memoirs in exchange of a stupid manual. Well\u2026 It\u2019s far from being stupid for us, so I\u2019m glad he agreed. Are you going to use it now?", YouSay:[{Text:"Yes.", Action:function () {
TMenu.SetStage(100);
}}]}, {CharSays:"Good luck, my friend. ", YouSay:[{Text:"Thanks. Bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 101);
}}]}, {CharSays:"How is it going?", YouSay:[{Text:"Well. As soon as I get to Fort Goks, I\u2019ll disable the missiles.", Action:function () {
TMenu.SetStage(100);
}}]}, {CharSays:"Am I wrong or it\u2019s you having a face of a person who has just disabled governmental missiles?", YouSay:[{Text:"You\u2019re right, John!", Action:function () {
TMenu.SetStage(103);
}}]}, {CharSays:"I knew I could rely on you. As soon as we seize the power, I\u2019ll make you a minister\u2026 Or you know what\u2026 You deserve becoming a governor, and I will take care of the military. After all, it\u2019s my vocation.", YouSay:[{Text:"Thanks for the confidence, but we must seize it first.", Action:function () {
TMenu.SetStage(104);
}}]}, {CharSays:"That\u2019s right, and we have to raise funds. Thanks to you, Raff perceives us more dangerous than ever. That\u2019s good from one side, but from another one, he does everything he can to blockade our economy, and he has been somewhat successful. To arm a worthwhile army we need about 5 million. We have 2. Would you refuse if I put you in charge of fund raising?", YouSay:[{Text:"Not at all.", Action:function () {
TMenu.SetStage(105);
}}]}, {CharSays:"Tell me what you need.", YouSay:[{Text:"Nothing at the moment. I\u2019ll let you know if I need anything.", Action:function () {
TMenu.SetStage(106);
}}, {Text:"If you give me a couple of good soldiers, it\u2019ll help a lot.", Action:function () {
TMenu.SetStage(107);
}}]}, {CharSays:"Ok then. I\u2019m here if you need me.", YouSay:[{Text:"Very well. Bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 108);
}}]}, {CharSays:"OK. I\u2019ll give you two of my best men. I\u2019d give you more, but we need to prepare a very important operation, you know\u2026 ", YouSay:[{Text:"Sure. Two is enough. Thanks.", Action:function () {
TMenu.SetStage(109);
Group.Members.push(People[64]);
Group.Members.push(People[65]);
UpdateGroupParams(Group);
UpdateTradeText();
}}]}, {CharSays:"Hi. Have you decided what you need?", YouSay:[{Text:"No. I\u2019m working on it myself. I\u2019ll tell you if anything is needed.", Action:function () {
TMenu.SetStage(106);
}}, {Text:"Yeah. Give me a couple of good soldiers.", Action:function () {
TMenu.SetStage(107);
}}, {Text:"I have the money. Here\u2026", Action:function () {
TMenu.SetStage(111);
Group.Money = Group.Money - 3000000;
}, Condition:function () {
return(Group.Money >= 3000000);
}}]}, {CharSays:"Is there anything else you need?", YouSay:[{Text:"Not really. I\u2019m doing well.", Action:function () {
TMenu.SetStage(110);
}}, {Text:"I have the money. Here\u2026", Action:function () {
TMenu.SetStage(111);
Group.Money = Group.Money - 3000000;
}, Condition:function () {
return(Group.Money >= 3000000);
}}]}, {CharSays:"Good for us. See you later.", YouSay:[{Text:"Bye-bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 109);
}}]}, {CharSays:"Amazing! I can\u2019t believe you did it so fast!", YouSay:[{Text:"So, it\u2019s time to attack, isn\u2019t it?", Action:function () {
TMenu.SetStage(112);
}}]}, {CharSays:"Almost. According to plan, the army will be fully prepared in 72 hours. Come back then and we\u2019ll start the show.", YouSay:[{Text:"OK. See you in 72 hours. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 113);
Story.Counter = 72;
Story.CounterFor = 4;
}}]}, {CharSays:"Hi. The army is not ready yet. Come back later.", YouSay:[{Text:"OK. See you when you\u2019re ready. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hello, my friend. We are fully prepared and waiting for you. Are you ready to kick some bad ass?", YouSay:[{Text:"Oh yeah! Let\u2019s do it!", Action:function () {
TMenu.SetStage(115);
}}, {Text:"Hmm\u2026 Can you give me some time to prepare a bit better?", Action:function () {
TMenu.SetStage(119);
}}]}, {CharSays:"Very well. Listen to me: My 5 regiments and I start our march towards Qubba right now. We can not count on taking them by surprise. Most citizens of Verdammter Platz know what we plan, and I\u2019m sure Oswald Raff knows it too, so it won\u2019t be an easy battle. I know there will be many victims, but I\u2019m ready for it. However, we need at least one regiment to survive after the battle. Otherwise, we will not have any soldiers to control Qubba after the revolt. I want your caravan to join the battle and to protect the regiments for as long as you can. I don\u2019t believe Raff will ever command to capitulate, which means that we will need to fight \u2018til the end. Are you ready, soldier?", YouSay:[{Text:"[more]", Action:function () {
TMenu.SetStage(116);
}}]}, {CharSays:"survive after the battle. Otherwise, we will not have any soldiers to control Qubba after the revolt. I want your caravan to join the battle and to protect the regiments for as long as you can. I don\u2019t believe Raff will ever command to capitulate, which means that we will need to fight \u2018til the end. Are you ready, soldier?", YouSay:[{Text:"I am!", Action:function () {
TMenu.SetStage(118);
}}]}, Number.NaN, {CharSays:"Hurrah!", YouSay:[{Text:"[let's go!]", Action:function () {
TMenu.SpecialAction(12);
}}]}, {CharSays:"No problem. We\u2019ll wait for you.", YouSay:[{Text:"OK. See you soon. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Too bad, pal\u2026 They have arrested Francesca and increased the security at the base. We don\u2019t have another person in Fort Goks. I\u2019m afraid it\u2019s Game Over.", YouSay:[{Text:"Yeah. I wish I could load a saved game. See you, pal. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"We are victorious, my friend. Quabba is ours as well as the whole state. I promised you will become the head of the new government and you can start right now.", YouSay:[{Text:"No, John. Thank you, but it\u2019s not for me. I like being a caravaneer.", Action:function () {
TMenu.SetStage(122);
}}]}, {CharSays:"I understand. It seems like I will need to take this responsibility. In any case, you will always be the symbol of freedom in this state, and if there\u2019s anything you need, don\u2019t hesitate to ask for it.", YouSay:[{Text:"Thank you John.", Action:function () {
TMenu.SetStage(123);
}}]}, {CharSays:"Thank YOU, friend. I owe you a lot.", YouSay:[{Text:"Don\u2019t mention it. I did it for the good of the people.", Action:function () {
TMenu.SetStage(124);
}}]}, {CharSays:"Of course\u2026 Well\u2026 There\u2019s a lot of work to be done\u2026", YouSay:[{Text:"Good luck.", Action:function () {
TMenu.SetStage(125);
}}]}, {CharSays:"Thanks. See you around\u2026 and\u2026 if you change your mind, my offer remains in force.", YouSay:[{Text:"OK. See you. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(2, 126);
}}]}, {CharSays:"Hi! Who are you doing?", YouSay:[{Text:"Very well. Thanks. How are you?", Action:function () {
TMenu.SetStage(127);
}}]}, {CharSays:"Well\u2026 tired. It\u2019s a hard work, you know.", YouSay:[{Text:"Yeah. I can imagine.", Action:function () {
TMenu.SetStage(128);
}}]}, {CharSays:"Can I do anything for you?", YouSay:[{Text:"No. I must go now. Just wanted to see you.", Action:function () {
TMenu.SetStage(129);
}}]}, {CharSays:"Well. Se you around, friend.", YouSay:[{Text:"See you. [leave]", Action:function () {
TMenu.Leave();
}}]}], [Number.NaN, {CharSays:"Yeah? What do you want?", YouSay:[{Text:"Hi. My name is @name. I heard you used to be a robber\u2026", Action:function () {
TMenu.SetStage(2);
}}, {Text:"Hi. Sheriff MacCoy told me you could help me.", Action:function () {
TMenu.SetStage(3);
}}]}, {CharSays:"Who told you that?", YouSay:[{Text:"People talk\u2026 You know\u2026", Action:function () {
TMenu.SetStage(4);
}}, {Text:"Sheriff MacCoy.", Action:function () {
TMenu.SetStage(3);
}}]}, {CharSays:"MacCoy?!! MacCoy sent you to me?!! Tell this son of a gun to go to hell. I will not move a finger to help him or any of his friends. Get your ass out of here before I get really mad and start shooting.", YouSay:[{Text:"[leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(3, 19);
TMenu.SetDefault(1, 26);
}}]}, {CharSays:"They talk too much\u2026", YouSay:[{Text:"Yeah\u2026 Maybe\u2026 I need some information about robbers.", Action:function () {
TMenu.SetStage(5);
}}]}, {CharSays:"Why in the world would I give you any information?", YouSay:[{Text:"I\u2019ll pay you well\u2026", Action:function () {
TMenu.SetStage(8);
}}, {Text:"I thought you would like to help society.", Action:function () {
TMenu.SetStage(6);
}}]}, {CharSays:"Ha ha ha ha!... You must be confusing me with someone else\u2026 I don\u2019t give a shit about your pathetic society. Why don\u2019t you go out there and ask robbers in the desert?", YouSay:[{Text:"I\u2019ll pay you well\u2026", Action:function () {
TMenu.SetStage(8);
}}]}, Number.NaN, {CharSays:"Hmm\u2026 What\u2019s well for you?", YouSay:[{Text:"$200", Action:function () {
TMenu.SetStage(9);
}}, {Text:"$2.000", Action:function () {
TMenu.SetStage(10);
}}, {Text:"$20.000", Action:function () {
TMenu.SetStage(11);
}}, {Text:"$50.000", Action:function () {
TMenu.SetStage(12);
}}]}, {CharSays:"Ha ha ha ha!... You\u2019re ridiculous!", YouSay:[{Text:"How about $2.000? ", Action:function () {
TMenu.SetStage(10);
}}, {Text:"I was kidding. It\u2019s $20.000.", Action:function () {
TMenu.SetStage(11);
}}, {Text:"It was a joke. I\u2019m ready to pay $50.000.", Action:function () {
TMenu.SetStage(12);
}}]}, {CharSays:"Hmm\u2026 Well\u2026 It depends on the information you need.", YouSay:[{Text:"I need to know where the robbers\u2019 headquarters are.", Action:function () {
TMenu.SetStage(13);
}}]}, {CharSays:"That\u2019s good money. What do you want to know?", YouSay:[{Text:"I need to know where the robbers\u2019 headquarters are.", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"Are you serious? If sounds really good. What is it you want to know?", YouSay:[{Text:"I\u2019m serious. I need to know where the robbers\u2019 headquarters are.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"You want to know too much\u2026 It\u2019s not your business.", YouSay:[{Text:"How about $20.000?", Action:function () {
TMenu.SetStage(14);
}}, {Text:"How about $50.000?", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"No! I said it\u2019s not your business! Get lost before I start shooting!", YouSay:[{Text:"[leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(3, 22);
}}, {Text:"$50.000", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"50 grand, huh?.. Hmm\u2026 Well\u2026 OK\u2026 Have you got the money?", YouSay:[{Text:"Yes. Here it is.", Action:function () {
TMenu.SetStage(17);
Group.Money = Group.Money - 50000;
}, Condition:function () {
return(Group.Money >= 50000);
}}, {Text:"No. I\u2019ll bring it later.", Action:function () {
TMenu.SetStage(18);
Story.BergPrice = 50000;
}}]}, {CharSays:"Hmm\u2026 You want to know things you\u2019re not supposed to, but\u2026 I\u2019m somewhat short of money, so I\u2019ll tell you\u2026 Anyway, you will surely get killed before you get there\u2026 Do you have the money?", YouSay:[{Text:"Yes. Here it is.", Action:function () {
TMenu.SetStage(17);
Group.Money = Group.Money - 20000;
}, Condition:function () {
return(Group.Money >= 20000);
}}, {Text:"No. I\u2019ll bring it later.", Action:function () {
TMenu.SetStage(18);
Story.BergPrice = 20000;
}}]}, {CharSays:"OK. You need to go to Abu Kirdyk. Take 113\u00BA direction and go about 130 Km. There\u2019s an underground bunker and a well armed squad guarding it. I don\u2019t think you\u2019ll ever get there. You\u2019ll be killed before you even get to Abu Kirdyk\u2026", YouSay:[{Text:"OK. Thanks. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(3, 21);
TMenu.SetDefault(1, 25);
TMenu.SetDefault(2, 39);
}}]}, {CharSays:"Well\u2026 We\u2019ll talk when you\u2019ll have money.", YouSay:[{Text:"OK. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(3, 20);
}}]}, {CharSays:"Go to hell! If you make another step, I start shooting!", YouSay:[{Text:"[leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Do you have the money?", YouSay:[{Text:"Yes. Here it is.", Action:function () {
TMenu.SetStage(17);
Group.Money = Group.Money - Story.BergPrice;
UpdateTradeText();
}, Condition:function () {
return(Group.Money >= Story.BergPrice);
}}, {Text:"No. I\u2019ll bring it later.", Action:function () {
TMenu.SetStage(18);
}}]}, {CharSays:"You\u2019re still alive, huh?", YouSay:[{Text:"Yes. I am. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"I said It\u2019s not your business. Go away.", YouSay:[{Text:"I\u2019ll give you $50.000.", Action:function () {
TMenu.SetStage(15);
}}, {Text:"Sorry. [leave]", Action:function () {
TMenu.Leave();
}}]}], [Number.NaN, {CharSays:"Hi, dear. How can I help you?", YouSay:[{Text:"Are you Francesca?", Action:function () {
TMenu.SetStage(3);
}}, {Text:"I\u2019m sorry. I must have got the wrong apartment. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 2);
}}]}, {CharSays:"Hi again. What is it?", YouSay:[{Text:"Is your name Francesca?", Action:function () {
TMenu.SetStage(3);
}}, {Text:"Nothing. Sorry. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Yes.", YouSay:[{Text:"My name is @name. John Sheppard sent me.", Action:function () {
TMenu.SetStage(5);
}}, {Text:"Just wanted to see how you look. Bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 4);
}}]}, {CharSays:"You again? What do you want?", YouSay:[{Text:"My name\u2019s @name. John Sheppard sent me.", Action:function () {
TMenu.SetStage(5);
}}, {Text:"Nothing. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Ah, Johnny\u2026 Yes. He told me he would send someone. Is it about the military base?", YouSay:[{Text:"Yes. John says there are missiles in there.", Action:function () {
TMenu.SetStage(6);
Story.SpokeToFrancesca = true;
}, Condition:function () {
return(!Story.BeenToTheBase);
}}, {Text:"Yes. Do you know how to operate their missiles?", Action:function () {
TMenu.SetStage(26);
Story.SpokeToFrancesca = true;
}, Condition:function () {
return(Story.BeenToTheBase);
}}]}, {CharSays:"That\u2019s right. I\u2019ve heard two officers talking about missiles. It seems like they have them at their base here in Fort Goks.", YouSay:[{Text:"Do you know what warheads they have?", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"Darling, I don\u2019t even know what warheads are\u2026", YouSay:[{Text:"Well. Never mind. Can you tell me more details?", Action:function () {
TMenu.SetStage(8);
}}]}, {CharSays:"Not much. I\u2019ve heard a private talk between colonel Kaminski and major Knoblauch. They were arguing on what missiles are better, and the colonel mentioned that they have missiles in Fort Goks. That\u2019s it.", YouSay:[{Text:"Did he say what type of missiles it is?", Action:function () {
TMenu.SetStage(9);
}}]}, {CharSays:"Yes he did\u2026 It was some abbreviation. A couple of letters and a number. I think it started with \u2018M\u2019.", YouSay:[{Text:"Alright.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"So, what do you want to do about it?", YouSay:[{Text:"We must find a way to disable the missiles.", Action:function () {
TMenu.SetStage(11);
}}]}, {CharSays:"Does that mean that you want to sneak in the base?", YouSay:[{Text:"Something like that.", Action:function () {
TMenu.SetStage(12);
}}]}, {CharSays:"Impossible. They have a 10 meters high wall surrounding it, lots of guards and an alarm system.", YouSay:[{Text:"How do you think I can get in there?", Action:function () {
TMenu.SetStage(13);
}}]}, {CharSays:"I don\u2019t know\u2026 Maybe we can get you a security pass, but you need to make up a good story. Otherwise a civilian stranger at the top secret military base will look too suspicious even with a security pass.", YouSay:[{Text:"I\u2019ll think on something. How can I get the pass?", Action:function () {
TMenu.SetStage(14);
}}]}, {CharSays:"I believe I can get one for you, but it will have the name and the picture of a high rank officer, so you won\u2019t be able to use it.", YouSay:[{Text:"So how does it help?", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"You can take it to a counterfeiter and he will make you a copy with your name and your picture.", YouSay:[{Text:"Great! When can you get the pass?", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"Come back here tomorrow morning. I most probably will have it then.", YouSay:[{Text:"Very well. See you tomorrow. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 17);
TMenu.SpecialAction(5);
}}]}, {CharSays:"Hi. I don\u2019t have it yet. Come back later.", YouSay:[{Text:"OK. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Shhh\u2026 Colonel is here. He must not hear us. Here\u2019s the pass. You MUST return in two days. Otherwise I\u2019ll have serious troubles. Now go\u2026", YouSay:[{Text:"Thanks. See you. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 20);
Group.Inventory.push({Type:84, Amount:1});
Story.Counter = 48;
Story.CounterFor = 3;
}}, {Text:"Wait. Where can I find a counterfeiter?", Action:function () {
TMenu.SetStage(19);
Group.Inventory.push({Type:84, Amount:1});
Story.Counter = 48;
Story.CounterFor = 3;
}}]}, {CharSays:"Go to Smerd and find the guy called Pierre Seton\u2026 Now go away.", YouSay:[{Text:"Thanks. Bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 22);
Towns[1].Houses[8].Revealed = true;
}}]}, {CharSays:"I told you, I can\u2019t talk now. What do you want?", YouSay:[{Text:"Where can I find a counterfeiter?", Action:function () {
TMenu.SetStage(19);
}}, {Text:"I\u2019m done. Here\u2019s the pass. Thanks.", Action:function () {
TMenu.SetStage(24);
TMenu.SpecialAction(6);
Story.PassReturned = true;
}, Condition:function () {
return(Story.DoneWithPass or Story.BeenToTheBase);
}}, {Text:"Nothing. Sorry. [leave]", Action:function () {
TMenu.Leave();
}}]}, Number.NaN, {CharSays:"Hey. How is it going?", YouSay:[{Text:"I\u2019m working on it.", Action:function () {
TMenu.SetStage(23);
}}, {Text:"I\u2019m done. Here\u2019s the pass. Thanks.", Action:function () {
TMenu.SetStage(24);
TMenu.SpecialAction(6);
Story.PassReturned = true;
}, Condition:function () {
return(Story.DoneWithPass or Story.BeenToTheBase);
}}]}, {CharSays:"You better do it faster. We don\u2019t have much time left.", YouSay:[{Text:"OK. See you soon. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Great. Do you need anything else?", YouSay:[{Text:"Not at the moment.", Action:function () {
TMenu.SetStage(25);
}}, {Text:"I need to know how to control the missile system.", Action:function () {
TMenu.SetStage(26);
}, Condition:function () {
return(Story.BeenToTheBase);
}}]}, {CharSays:"OK. Tell me if you need anything.", YouSay:[{Text:"Thanks. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 28);
}}]}, {CharSays:"Ha! Are you asking me this? Darling, I have no damn idea!", YouSay:[{Text:"I may need a manual. Any idea where I could get it?", Action:function () {
TMenu.SetStage(27);
}}]}, {CharSays:"Your friend Johnny has a whole load of military manuals in his library. Ask him.", YouSay:[{Text:"OK. I will. See you. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(4, 29);
}}]}, {CharSays:"Hi, darling. What can I do for you?", YouSay:[{Text:"Nothing. Just wanted to see you. Bye. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I need to know how to control the missiles.", Action:function () {
TMenu.SetStage(26);
}, Condition:function () {
return(Story.BeenToTheBase);
}}]}, {CharSays:"Hi, sweetheart. How are you doing?", YouSay:[{Text:"I\u2019m fine. Thanks. How are you?", Action:function () {
TMenu.SetStage(30);
}}]}, {CharSays:"Well\u2026 As always. What brings you here?", YouSay:[{Text:"Nothing special. Just wanted to say hello.", Action:function () {
TMenu.SetStage(31);
}}]}, {CharSays:"Hello, @name.", YouSay:[{Text:"Hello, Francesca. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Come on! You\u2019re too late! I thought you wouldn\u2019t come and didn\u2019t take the pass. Come back tomorrow morning, but please, do it on time!", YouSay:[{Text:"Sorry. I will. See you tomorrow. [leave]", Action:function () {
TMenu.Leave();
TMenu.SpecialAction(5);
TMenu.SetDefault(4, 17);
}}]}], [Number.NaN, {CharSays:"Hello. What can I do for you?", YouSay:[{Text:"Hi. You are Pierre Seton. Aren\u2019t you?", Action:function () {
TMenu.SetStage(2);
}}, {Text:"Sorry. I\u2019ve got the wrong house. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"And who\u2019s asking?", YouSay:[{Text:"My name is @name. I\u2019m a caravneer.", Action:function () {
TMenu.SetStage(3);
}}, {Text:"My name is @name. Francesca told me how to find you.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"Tell me, @name. I\u2019m all ears.", YouSay:[{Text:"I need to falsify a document.", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"I\u2019m sorry, but I don\u2019t quite understand what I have to do with this.", YouSay:[{Text:"You are a counterfeiter, aren\u2019t you?", Action:function () {
TMenu.SetStage(5);
}}, {Text:"Francesca told me you could help.", Action:function () {
TMenu.SetStage(9);
}}]}, {CharSays:"What?!! Me? Counterfeiter? Ha-ha-ha! I wish it was true. This way I wouldn\u2019t need to ruin my health working at the damn factory all day long earning a couple of pathetic pennies.", YouSay:[{Text:"I\u2019m sorry. I must have got a wrong person. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(5, 6);
}}, {Text:"Francesca told me you are a counterfeiter.", Action:function () {
TMenu.SetStage(9);
}}]}, {CharSays:"Hi. Still looking for a mystical counterfeiter?", YouSay:[{Text:"No. Not really. See you later. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"Come on. I\u2019m not a cop. Francesca told me how to find you.", Action:function () {
TMenu.SetStage(9);
}}]}, {CharSays:"Francesca, huh? Alright. What do you need?", YouSay:[{Text:"I need to falsify a document.", Action:function () {
TMenu.SetStage(8);
}}]}, {CharSays:"What document?", YouSay:[{Text:"A security pass to the military base in Fort Goks.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"Francesca, huh? You should have said it in the first place. What document do you need?", YouSay:[{Text:"A security pass to the military base in Fort Goks.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"I hope you know what you are doing. You\u2019re playing with fire, @callyou. If they catch you with a fake pass, you ain\u2019t gonna end up well, and if you tell them who made it for you, I\u2019ll follow your steps.", YouSay:[{Text:"I\u2019ll never tell anyone.", Action:function () {
TMenu.SetStage(11);
}}]}, {CharSays:"Yeah. Right. That\u2019s what you\u2019re saying now, but when they\u2019ll stick a hot rake into your butt, you will change your mind.", YouSay:[{Text:"Are you a man or a mouse?", Action:function () {
TMenu.SetStage(12);
}}, {Text:"Well. If you don\u2019t want to do it, I\u2019ll find another counterfeiter.", Action:function () {
TMenu.SetStage(13);
}}]}, {CharSays:"Hey! Watch your mouth! I\u2019m a counterfeiter and do have guts to go against the law. Still if I make you a pass to Fort Goks base, I will not be accused in counterfeiting, but in espionage, and I don\u2019t see a damn reason to take this risk.", YouSay:[{Text:"I\u2019ll pay you well.", Action:function () {
TMenu.SetStage(14);
}}]}, {CharSays:"Wait\u2026 How much are you ready to pay?", YouSay:[{Text:"You name it.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"Really? How much?", YouSay:[{Text:"You name it.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"Hmm\u2026 Do you have an original pass I can copy?", YouSay:[{Text:"Yes.", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"Well\u2026 It makes it a bit easier, but it\u2019s still way too dangerous. I will not do this work for less than $100.000.", YouSay:[{Text:"Alright.", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 100000 /* 0x0186A0 */;
}}, {Text:"You\u2019ve got to be crazy! I\u2019ll give you $50.000 and not a cent more.", Action:function () {
TMenu.SetStage(17);
}}]}, {CharSays:"Are you deaf? I said $100.000.", YouSay:[{Text:"OK\u2026 OK\u2026 $100.000", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 100000 /* 0x0186A0 */;
}}, {Text:"Well. I guess I need to look for another counterfeiter.", Action:function () {
TMenu.SetStage(18);
}}]}, {CharSays:"Where do you think you are? In Paris? Another counterfeiter may live 10.000 Km from here. $100.000 or nothing.", YouSay:[{Text:"OK, but I do it only because I\u2019m in a hurry.", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 100000 /* 0x0186A0 */;
}}, {Text:"I\u2019ll tell you how far he lives as soon as I find him. Bye.", Action:function () {
TMenu.SetStage(19);
}}]}, {CharSays:"Wait\u2026 $80.000", YouSay:[{Text:"I guess you were exaggerating about the distance. $60.000.", Action:function () {
TMenu.SetStage(20);
}}, {Text:"Alright.", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 80000 /* 0x013880 */;
}}]}, {CharSays:"$70.000 and not a cent less. It\u2019s not enough, but I\u2019m tired of this conversation.", YouSay:[{Text:"Alright.", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 70000 /* 0x011170 */;
}}, {Text:"$65.000", Action:function () {
TMenu.SetStage(21);
}}]}, {CharSays:"Hey! Go to hell. I already regret that I said $70.000", YouSay:[{Text:"Come on. $65.000 and we close the deal.", Action:function () {
TMenu.SetStage(22);
}}, {Text:"Well. Alright. $70.000.", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 70000 /* 0x011170 */;
}}]}, {CharSays:"No! $5.000 doesn\u2019t change a thing for me, but I ain\u2019t no dumb. I know what the work is worth and I ain\u2019t gonna play by your rules.", YouSay:[{Text:"You\u2019re right. 5 grand doesn\u2019t change much. Deal\u2026 ", Action:function () {
TMenu.SetStage(23);
Story.CounterfeiterPrice = 70000 /* 0x011170 */;
}}]}, {CharSays:"OK. Give me the original pass.", YouSay:[{Text:"Here it is\u2026", Action:function () {
TMenu.SetStage(24);
TMenu.SpecialAction(6);
}}]}, {CharSays:"Alright\u2026 Come back in 24 hours and you\u2019ll have it. And don\u2019t forget the money.", YouSay:[{Text:"I will not. See you in 24 hours. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(5, 25);
Story.CCounter = 24;
}}]}, {CharSays:"It\u2019s not ready yet. Come back later.", YouSay:[{Text:"OK. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"It\u2019s ready. Have you got the money?", YouSay:[{Text:"Yes. Here it is.", Action:function () {
TMenu.SetStage(27);
Group.Money = Group.Money - Story.CounterfeiterPrice;
UpdateTradeText();
}, Condition:function () {
return(Group.Money >= Story.CounterfeiterPrice);
}}, {Text:"No. I\u2019ll bring it soon. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Here you go. It looks more authentic than the original one.", YouSay:[{Text:"Yeah. Good work. Thanks. See you. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(5, 28);
Group.Inventory.push({Type:84, Amount:1});
Group.Inventory.push({Type:85, Amount:1});
Story.DoneWithPass = true;
Story.HavePass = true;
}}]}, {CharSays:"You again? Do you need another document?", YouSay:[{Text:"No. Just passing by. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}], [Number.NaN, {CharSays:"Your pass, @callyou.", YouSay:[{Text:"Here it is.", Action:function () {
TMenu.SetStage(5);
}, Condition:function () {
return(Story.HavePass);
}}, {Text:"I don\u2019t have a pass, but I have a very urgent business\u2026", Action:function () {
TMenu.SetStage(2);
}}]}, {CharSays:"I\u2019m sorry, @callyou, but I can\u2019t let you in without a pass.", YouSay:[{Text:"Alright. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I\u2019m on a very important mission. Oswald Raff sent me.", Action:function () {
TMenu.SetStage(3);
}}]}, {CharSays:"I have my orders, @callyou. Even Oswald Raff himself can\u2019t enter without a valid pass.", YouSay:[{Text:"Well. I\u2019ll come back with a pass. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"You\u2019re going to regret that!", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"I repeat. You can\u2019t enter without a pass.", YouSay:[{Text:"Alright. You\u2019ll see. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"OK. You can pass.", YouSay:[{Text:"Thank you. [enter]", Action:function () {
TMenu.InTheBase = true;
TMenu.Leave();
}}]}, {CharSays:"Your pass, @callyou.", YouSay:[{Text:"Here it is.", Action:function () {
TMenu.SetStage(7);
}, Condition:function () {
return(Story.HavePass);
}}, {Text:"Oops. I forgot it at home.", Action:function () {
TMenu.SetStage(8);
}}]}, {CharSays:"I\u2019m sorry, @callyou, but this is an old pass. It\u2019s not valid anymore. I cannot let you in.", YouSay:[{Text:"Damn! [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Sorry, @callyou, but you can\u2019t enter without a valid pass.", YouSay:[{Text:"OK\u2026 OK\u2026 I got it! [leave]", Action:function () {
TMenu.Leave();
}}]}], [Number.NaN, {CharSays:"Hey! What are you doing here?!!", YouSay:[{Text:"Oswald Raff sent me.", Action:function () {
TMenu.SetStage(13);
}, Condition:function () {
return(Story.RaffSendsYou);
}}, {Text:"I\u2019m an electrician. Must fix a couple of things.", Action:function () {
TMenu.SetStage(2);
}}]}, {CharSays:"What? I didn\u2019t know we had problems!", YouSay:[{Text:"Well. Now you know.", Action:function () {
TMenu.SetStage(3);
}}, {Text:"The captain called me.", Action:function () {
TMenu.SetStage(5);
}}]}, {CharSays:"Show me your order.", YouSay:[{Text:"Oops. It seems like I lost it.", Action:function () {
TMenu.SetStage(4);
}}, {Text:"I don\u2019t have an order. There\u2019s an urgent problem I must fix.", Action:function () {
TMenu.SetStage(8);
}}]}, {CharSays:"Hey! Guards!!! Arrest this guy and find out who he really is.", YouSay:[{Text:"Very well! I was checking you. Oswald Raff sent me.", Action:function () {
TMenu.SetStage(9);
}}, {Text:"[surrender]", Action:function () {
TMenu.SpecialAction(7);
}}]}, {CharSays:"What?!! What captain?", YouSay:[{Text:"I don\u2019t remember his name. A tall guy with brown hair.", Action:function () {
TMenu.SetStage(6);
}}]}, {CharSays:"I don\u2019t know what you\u2019re talking about. No one can enter this base without a permission signed by me or by Oswald Raff.", YouSay:[{Text:"There was an urgent problem, and we didn\u2019t have time for paperwork.", Action:function () {
TMenu.SetStage(7);
}}]}, {CharSays:"Bullshit! No electrical problem can be more important than security. You\u2019re under arrest, and if the captain you\u2019re talking about really exists, from now on he\u2019s a private.", YouSay:[{Text:"You do excellent job. I was checking you. Oswald Raff sent me.", Action:function () {
TMenu.SetStage(9);
}}, {Text:"[surrender]", Action:function () {
TMenu.SpecialAction(7);
}}]}, {CharSays:"Who let you in?", YouSay:[{Text:"The captain\u2026 I don\u2019t remember his name\u2026", Action:function () {
TMenu.SetStage(6);
}}]}, {CharSays:"Hmm\u2026 Really? Well\u2026 In this case you must have an order signed by him.", YouSay:[{Text:"Here\u2019s a letter for you.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"No. There\u2019s no order. Here\u2019s my pass.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"@name? It sounds familiar. Well. You must wait here until we receive a confirmation from Oswald Raff.", YouSay:[{Text:"Here. Take a letter from him.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"I can\u2019t. I must return to Qubba immediately.", Action:function () {
TMenu.SetStage(11);
}}, {Text:"I can\u2019t. My caravan is waiting for me.", Action:function () {
TMenu.SetStage(22);
}, Condition:function () {
return(Story.CaravanXDestroyed);
}}]}, {CharSays:"Why?", YouSay:[{Text:"I must present a report to Oswald Raff.", Action:function () {
TMenu.SetStage(12);
}}, {Text:"My caravan is waiting for me.", Action:function () {
TMenu.SetStage(22);
}, Condition:function () {
return(Story.CaravanXDestroyed);
}}]}, {CharSays:"Alright, but you must leave the base immediately, and I\u2019ll keep your pass. I suppose you don\u2019t need it anymore.", YouSay:[{Text:"Just a second. I almost forgot. I have a letter for you.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"Hmm\u2026 OK. [leave the base]", Action:function () {
TMenu.SpecialAction(8);
TMenu.SetDefault(7, 23);
}, Condition:function () {
return(!Story.HaveLetter);
}}]}, {CharSays:"Yes? Why?", YouSay:[{Text:"Here. Read this letter.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"He sends you his regards", Action:function () {
TMenu.SetStage(14);
}}]}, {CharSays:"What? Oswald Raff sends a person to a secret base just to send me his regards?!!", YouSay:[{Text:"Not really. Here\u2019s a letter from him.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"Not really. I need a man to take him to Verdammter Platz.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"First, I have no idea of what you are talking about, and second, I can\u2019t give you any man if you don\u2019t have a written order.", YouSay:[{Text:"I have it\u2026 Here.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"Really? So what should I do?", Action:function () {
TMenu.SetStage(16);
}}]}, {CharSays:"I must ask you to leave the base immediately and come back when you have an order.", YouSay:[{Text:"Actually I do have an order. Here it is. ", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"Alright. [leave the base]", Action:function () {
TMenu.SetDefault(7, 20);
TMenu.InTheBase = false;
TMenu.gotoAndStop(1);
}}]}, {CharSays:"\u2026. mm\u2026 alright\u2026 well\u2026. OK. The man will join you at the base gate as soon as you leave.", YouSay:[{Text:"Thanks. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(7, 18);
TMenu.SpecialAction(9);
}}]}, {CharSays:"Hello. What are you doing back here?", YouSay:[{Text:"Oswald Raff asked to tell you that he likes the way you work.", Action:function () {
TMenu.SetStage(19);
}}]}, {CharSays:"Well. I try to do my best. Thank you.", YouSay:[{Text:"You\u2019re welcome. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Did you get the order?", YouSay:[{Text:"Yes. Here it is.", Action:function () {
TMenu.SetStage(17);
}, Condition:function () {
return(Story.HaveLetter);
}}, {Text:"No. Not yet.", Action:function () {
TMenu.SetStage(21);
}}]}, {CharSays:"Then please leave the base immediately.", YouSay:[{Text:"OK. [leave the base]", Action:function () {
TMenu.InTheBase = false;
TMenu.gotoAndStop(1);
}}]}, {CharSays:"Caravan, huh?.. Wait\u2026 Now I remember who you are! You are the bastard who destroyed Caravan X! Guards! Put him under arrest immediately!", YouSay:[{Text:"[surrender]", Action:function () {
TMenu.SpecialAction(7);
}}]}, {CharSays:"You?!! Coming right here?!! I know who you are! You are the bastard who destroyed Caravan X! Guards! Arrest him immediately!", YouSay:[{Text:"[surrender]", Action:function () {
TMenu.SpecialAction(7);
}}]}], [Number.NaN, {CharSays:"Hello. Can I help you?", YouSay:[{Text:"I hope so. I\u2019ve heard you have a vast collection of military literature.", Action:function () {
TMenu.SetStage(2);
}}, {Text:"No. I got the wrong person. I\u2019m sorry. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Oh yes! I have the best collection on this continent. Some of my books are priceless.", YouSay:[{Text:"I\u2019m looking for a manual for a certain missile system.", Action:function () {
TMenu.SetStage(3);
}}]}, {CharSays:"What system?", YouSay:[{Text:"MRM-12-R", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"Hmm\u2026 Let me check my list\u2026 Yes. I have it, but I only have one and can\u2019t give it to you.", YouSay:[{Text:"I\u2019ll pay you as much as you want.", Action:function () {
TMenu.SetStage(5);
}}]}, {CharSays:"Why do you need it so bad? I didn\u2019t know it was a valuable book.", YouSay:[{Text:"I need it to operate a missile system.", Action:function () {
TMenu.SetStage(6);
}}, {Text:"I need it to complete my unique collection of missile system manuals.", Action:function () {
TMenu.SetStage(11);
}}]}, {CharSays:"What?!! Do you have a missile system?!!", YouSay:[{Text:"I don\u2019t, but the government does.", Action:function () {
TMenu.SetStage(7);
TMenu.SetDefault(6, 6);
}}, {Text:"Not a real one, just a simulator.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"So you want to operate a governmental system, huh? Does Oswald Raff know about it?", YouSay:[{Text:"Of course.", Action:function () {
TMenu.SetStage(8);
}}, {Text:"No. And if he did, he wouldn\u2019t like it.", Action:function () {
TMenu.SetStage(9);
}}]}, {CharSays:"Well. I will not give you this book before asking him personally.", YouSay:[{Text:"\u2026.OK. Bye-Bye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(8, 19);
}}]}, {CharSays:"In this case I must inform Oswald about a conspiracy against him. And, of course, I will not give you this book.", YouSay:[{Text:"Too bad. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(8, 20);
}}]}, {CharSays:"Are you ready to pay big money just to operate a simulator? You\u2019re weird. Well. In any case, I never sell books from my collection if I don\u2019t have another copy of them. I may exchange it for something more valuable, but it must be MUCH more valuable\u2026", YouSay:[{Text:"Hmm. I\u2019ll think about it. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(8, 12);
Story.TalkedToTheGeneral = true;
}}]}, {CharSays:"A unique collection, huh? I respect that, but I will never sell you a book if I don\u2019t have another copy of it. Probably, if you offer me something more valuable, I may think about it.", YouSay:[{Text:"OK. I\u2019ll try to find something to offer. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(8, 12);
Story.TalkedToTheGeneral = true;
}}]}, {CharSays:"Hello. Do you have an offer?", YouSay:[{Text:"No. Just passing by. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"Yes. Take a look at this.", Action:function () {
TMenu.SetStage(13);
}, Condition:function () {
return(Story.HaveTheBook);
}}]}, {CharSays:"Wow! This book is good. It is certainly worth it. So, do you want to exchange the manual for the book?", YouSay:[{Text:"Yes, sir.", Action:function () {
TMenu.SetStage(14);
}}, {Text:"Maybe. I\u2019ll think about it. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(8, 16);
}}]}, {CharSays:"Alright. Here you have it.", YouSay:[{Text:"Very well. Thank you.", Action:function () {
TMenu.SetStage(15);
TMenu.SpecialAction(11);
}}]}, {CharSays:"Thank YOU! You made my day.", YouSay:[{Text:"You\u2019re welcome. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(8, 17);
}}]}, {CharSays:"Hello. Are you ready for the exchange?", YouSay:[{Text:"Yes.", Action:function () {
TMenu.SetStage(14);
}}, {Text:"No. Not now. I must go. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hello. Have any more books to exchange?", YouSay:[{Text:"No, sir.", Action:function () {
TMenu.SetStage(18);
}}]}, {CharSays:"Well. Come back when you have any.", YouSay:[{Text:"OK. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"I have talked to Oswald Raff and he asked me to burn this book and to kill you if I see you. I will not do this, but I ask you to leave immediately.", YouSay:[{Text:"OK. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hey. Don\u2019t come close to my house. I will not deal with a state enemy.", YouSay:[{Text:"Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}], [Number.NaN, {CharSays:"I\u2019m busy. Please leave.", YouSay:[{Text:"Excuse me. Are you Oswald Raff, the head of the government?", Action:function () {
TMenu.SetStage(2);
}}, {Text:"I\u2019m sorry. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"I\u2019m busy. Please leave.", YouSay:[{Text:"OK. I\u2019m sorry. I\u2019m leaving. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 3);
}}, {Text:"Just wanted to meet you in person...", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"I told you, I\u2019m busy. What do you want?", YouSay:[{Text:"Nothing. I\u2019m leaving. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"Just wanted to meet you in person...", Action:function () {
TMenu.SetStage(4);
}}]}, {CharSays:"Who are you anyway?", YouSay:[{Text:"My name is @name. I\u2019m a caravaneer.", Action:function () {
TMenu.SetStage(5);
}}]}, {CharSays:"What brings you here?", YouSay:[{Text:"Nothing special. I\u2019ve heard a lot about you, so I was curious.", Action:function () {
TMenu.SetStage(6);
}}]}, {CharSays:"What kind of things have you heard?", YouSay:[{Text:"Mainly good ones.", Action:function () {
TMenu.SetStage(7);
}}, {Text:"All kinds\u2026", Action:function () {
TMenu.SetStage(33);
}}, {Text:"I\u2019ve heard you are the worst bastard in the area.", Action:function () {
TMenu.SetStage(37);
}}]}, {CharSays:"Hmm. I\u2019m proud to hear that. I work hard to protect people from robbers.", YouSay:[{Text:"You do very well, sir.", Action:function () {
TMenu.SetStage(8);
}}, {Text:"I guess you should work harder.", Action:function () {
TMenu.SetStage(29);
}}]}, {CharSays:"Thank you. Can I help you with anything?", YouSay:[{Text:"No, not really. I need to go. Nice to meet you, sir.", Action:function () {
TMenu.SetStage(9);
}}, {Text:"I\u2019m looking for new ways to earn money.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"Nice to meet you, @name. Good luck.", YouSay:[{Text:"Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 39);
}}]}, {CharSays:"What do you have in mind?", YouSay:[{Text:"I don\u2019t know. I thought you might have a job for me.", Action:function () {
TMenu.SetStage(11);
}}, {Text:"Nothing in particular. I thought you could suggest me something.", Action:function () {
TMenu.SetStage(28);
}}]}, {CharSays:"A job? I may have a job for you, but tell me, what do you think about Desert Patrol?", YouSay:[{Text:"They\u2019re good guys. They try to protect people from robbers.", Action:function () {
TMenu.SetStage(12);
}}, {Text:"I don\u2019t know anything about them.", Action:function () {
TMenu.SetStage(16);
}}, {Text:"They\u2019re bastards who use people\u2019s money to gain power.", Action:function () {
TMenu.SetStage(27);
}}]}, {CharSays:"Well\u2026 They make it look so, but actually they just use people\u2019s money to build an army and take power. If I were you, I wouldn\u2019t trust them too much.", YouSay:[{Text:"Alright. And what about the job you mentioned?", Action:function () {
TMenu.SetStage(13);
}}, {Text:"I still think they\u2019re good.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"I said I may have a job for you in the future, but not right now.", YouSay:[{Text:"When should I come back?", Action:function () {
TMenu.SetStage(14);
}}]}, {CharSays:"In a month or so.", YouSay:[{Text:"OK. See you then. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 40);
}}]}, {CharSays:"It seems like we have different political views, which means that we should not work together.", YouSay:[{Text:"You\u2019re right. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 42);
}}]}, {CharSays:"Then I\u2019ll tell you. They\u2019re an armed force which is supposed to protect caravans in the Verdammter Platz \u2013 Diep Gat region. However, their main goal is to seize the power in the state.", YouSay:[{Text:"So why don\u2019t you get rid of them?", Action:function () {
TMenu.SetStage(17);
}}, {Text:"I don\u2019t think they\u2019re that bad.", Action:function () {
TMenu.SetStage(26);
}}]}, {CharSays:"I\u2019m not a tyrant. I can\u2019t just bring the army and kill them all. It would seriously spoil my image.", YouSay:[{Text:"Is there any other way to do it?", Action:function () {
TMenu.SetStage(18);
}}]}, {CharSays:"There is, but I need a neutral person like you to help me with this.", YouSay:[{Text:"What is it that I have to do?", Action:function () {
TMenu.SetStage(19);
}}]}, {CharSays:"You\u2019ll take one of my men with you and make sure he gets to Verdammter Platz alive. I\u2019ll pay you $50.000 for that.", YouSay:[{Text:"I agree to do it for $100.000.", Action:function () {
TMenu.SetStage(20);
Story.RaffPrice = 100000 /* 0x0186A0 */;
}}, {Text:"OK. I agree.", Action:function () {
TMenu.SetStage(21);
Story.RaffPrice = 50000;
}}, {Text:"What person I am supposed to take there?", Action:function () {
TMenu.SetStage(22);
Story.RaffPrice = 50000;
}}]}, {CharSays:"$100.000, huh? Alright, but you must not ask any questions.", YouSay:[{Text:"OK. I agree.", Action:function () {
TMenu.SetStage(21);
}}, {Text:"I want to know what I am doing.", Action:function () {
TMenu.SetStage(22);
}}]}, {CharSays:"OK. You\u2019ll need to go to Fort Goks military base and speak to colonel Kaminski, but first I need to prepare the necessary papers. Come back in 2 hours, and I\u2019ll give them to you.", YouSay:[{Text:"OK. See you in 2 hours. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 43);
Story.Counter = 2;
Story.CounterFor = 5;
Story.RaffSendsYou = true;
PoliceStatus = 1;
}}]}, {CharSays:"It\u2019s a state secret. The only thing I can tell you is that this will put and end to Desert Patrol. Do you want this job or not?", YouSay:[{Text:"Yes. I want it.", Action:function () {
TMenu.SetStage(21);
}}, {Text:"No.", Action:function () {
TMenu.SetStage(23);
}}]}, {CharSays:"Alright. Goodbye then.", YouSay:[{Text:"Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 24);
}}]}, {CharSays:"You said you don\u2019t want the job I offered you, so what else do you want?", YouSay:[{Text:"Nothing. Just passing by. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I do want it.", Action:function () {
TMenu.SetStage(25);
}}]}, {CharSays:"Are you sure?", YouSay:[{Text:"I am.", Action:function () {
TMenu.SetStage(21);
}}, {Text:"No. I\u2019m just kidding. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Trust me. They are.", YouSay:[{Text:"So why don\u2019t you get rid of them?", Action:function () {
TMenu.SetStage(17);
}}, {Text:"I\u2019m sure they\u2019re good guys.", Action:function () {
TMenu.SetStage(15);
}}]}, {CharSays:"You\u2019re absolutely right. They\u2019re our main problem. Instead of fighting robbers the government must worry about Desert Patrol as if we didn\u2019t have other problems.", YouSay:[{Text:"So why don\u2019t you get rid of them?", Action:function () {
TMenu.SetStage(17);
}}]}, {CharSays:"I could offer you a job, but I need to know what you think about Desert Patrol.", YouSay:[{Text:"They\u2019re good guys. They try to protect people from robbers.", Action:function () {
TMenu.SetStage(12);
}}, {Text:"I don\u2019t know anything about them.", Action:function () {
TMenu.SetStage(16);
}}, {Text:"They\u2019re bastards who use people\u2019s money to gain power.", Action:function () {
TMenu.SetStage(27);
}}]}, {CharSays:"Really? Who are you to judge?", YouSay:[{Text:"I just see that robbers feel themselves at home in this state.", Action:function () {
TMenu.SetStage(30);
}}, {Text:"You should fight them for real, and not make deals with them.)", Action:function () {
TMenu.SetStage(31);
}}]}, {CharSays:"We are doing all we can, but it\u2019s not that easy. Apart from robbers we need to deal with many other problems.", YouSay:[{Text:"Is there a way I could help?", Action:function () {
TMenu.SetStage(28);
}}, {Text:"Yeah. Sure. You\u2019re making deals with them.", Action:function () {
TMenu.SetStage(31);
}}]}, {CharSays:"Deals? What deals? What are you talking about?", YouSay:[{Text:"You know it\u2019s true.", Action:function () {
TMenu.SetStage(32);
}}]}, {CharSays:"Hey. What you are saying is very offensive. I must ask you to leave the building. Otherwise I will need to put you under arrest.", YouSay:[{Text:"Great! I\u2019m leaving. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 42);
}}]}, {CharSays:"Yes. There are bad people who try to hurt the government speaking bad about it. They just don\u2019t like the fact that we have the power and they don\u2019t.", YouSay:[{Text:"Whom are you talking about?", Action:function () {
TMenu.SetStage(34);
}}, {Text:"I\u2019m sure you have an excellent government.", Action:function () {
TMenu.SetStage(8);
}}]}, {CharSays:"Mainly Desert Patrol and their followers. They just want the power.", YouSay:[{Text:"I see. So why don\u2019t you get rid of them?", Action:function () {
TMenu.SetStage(17);
}}, {Text:"No. They\u2019re good guys.", Action:function () {
TMenu.SetStage(35);
}}]}, {CharSays:"You are wrong. They pretend to be good to attract more followers.", YouSay:[{Text:"I\u2019m sure they\u2019re good and you are bad.", Action:function () {
TMenu.SetStage(36);
}}, {Text:"So why don\u2019t you get rid of them?", Action:function () {
TMenu.SetStage(17);
}}]}, {CharSays:"In this case I don\u2019t see the point in continuing this conversation.", YouSay:[{Text:"Neither do I. Goodbye. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 42);
}}]}, {CharSays:"And do you believe it?", YouSay:[{Text:"No. I\u2019m sure you are good.", Action:function () {
TMenu.SetStage(38);
}}, {Text:"Yes. I\u2019m totally convinced.", Action:function () {
TMenu.SetStage(36);
}}]}, {CharSays:"Of course. Simply there are people who are envious of the power I have. That\u2019s why they invent stories that make me look evil.", YouSay:[{Text:"Who are these people?", Action:function () {
TMenu.SetStage(34);
}}, {Text:"I\u2019ve never believed these stories. I think your government is great.", Action:function () {
TMenu.SetStage(8);
}}]}, {CharSays:"Hi, @name. How can I help you?", YouSay:[{Text:"I\u2019m just passing by. See you later. [leave]", Action:function () {
TMenu.Leave();
}}, {Text:"I\u2019m looking for new ways to earn money.", Action:function () {
TMenu.SetStage(10);
}}]}, {CharSays:"Hi, @name.", YouSay:[{Text:"Hi. Do you have a job for me?", Action:function () {
TMenu.SetStage(41);
}}, {Text:"Hi. Just wanted to say Hello. See you. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Not yet. Come back later.", YouSay:[{Text:"OK. Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hello @name. I hope you\u2019re not here to kill me.", YouSay:[{Text:"I\u2019m not. I\u2019m already leaving. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"It\u2019s not the time yet. Come back later.", YouSay:[{Text:"OK. See you soon. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Hello again. Everything\u2019s ready. Here\u2019s a pass to the Fort Goks military base and the letter you need to give to colonel Kaminski. The colonel will give you a man. Take this man to Verdammter Platz and come back here to get your money.", YouSay:[{Text:"Understood. See you when everything is done. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 45);
Story.HavePass = true;
Story.HaveLetter = true;
Group.Inventory.push({Type:85, Amount:1});
Group.Inventory.push({Type:86, Amount:1});
}}]}, {CharSays:"How is it going?", YouSay:[{Text:"I\u2019m working on it. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"You failed your mission. I\u2019m afraid I don\u2019t want to deal with you anymore.", YouSay:[{Text:"Goodbye. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"Well done. Please take the money I promised you.", YouSay:[{Text:"Very well.", Action:function () {
TMenu.SetStage(48);
Group.Money = Group.Money + Story.RaffPrice;
UpdateTradeText();
}}]}, {CharSays:"OK. At this moment I don\u2019t have any other job for you, but visit me later on. I may have something for you in the future.", YouSay:[{Text:"OK. See you later. [leave]", Action:function () {
TMenu.Leave();
TMenu.SetDefault(9, 49);
}}]}, {CharSays:"Hi. No jobs at the moment. Come back later.", YouSay:[{Text:"OK. See you later. [leave]", Action:function () {
TMenu.Leave();
}}]}, {CharSays:"How dare you showing up here?!! Guards!!! Arrest this person!", YouSay:[{Text:"[run away]", Action:function () {
Group.Moce = true;
Group.Direction = (Math.random() * Math.PI) * 2;
SwitchMode(1);
}}]}]];
DefaultStages = [Number.NaN, 1, 1, 1, 1, 1, 1, 1, 1, 1];
DialogueNames = [Number.NaN, "Sheriff MacCoy", "John Sheppard", "Joseph Berg", "Francesca", "Pierre Seton", "Guard", "Colonel Kaminski", "General Schnittke", "Oswald Raff"];
Frame 10
function SwitchMode(MD) {
switch (MD) {
case 1 :
MusicFade = 1;
OptionsMenu._visible = false;
BW._visible = false;
Succeed._visible = false;
EBWindow._visible = false;
SMap._visible = false;
TMenu._visible = false;
SWindow._visible = false;
MB._visible = false;
BFArrows._visible = false;
BMenu.gotoAndStop(1);
PTCol.setRGB(16777215);
break;
case 2 :
MusicFade = -1;
OptionsMenu._visible = false;
BW._visible = false;
Succeed._visible = false;
EBWindow._visible = false;
SMap._visible = true;
TMenu._visible = false;
SWindow._visible = false;
BFArrows._visible = false;
MB._visible = false;
BMenu.gotoAndStop(2);
PTCol.setRGB(16711680);
break;
case 3 :
MusicFade = -1;
OptionsMenu._visible = false;
Succeed._visible = false;
BW._visible = false;
TMenu._visible = true;
TMenu.MB.OnCancel();
if (TMenu._currentframe == 4) {
TMenu.Lst.SelectItem(Number.NaN);
TMenu.Display._visible = false;
}
if (TMenu._currentframe == 5) {
TMenu.CurrentList = TMenu.GeneratePropertyList();
TMenu.MarketList.SetList(TMenu.CurrentList, TMenu.MarketList.CurrentOffset);
}
if (TMenu._currentframe == 6) {
TMenu.CurrentList = TMenu.GenerateSellList();
TMenu.MarketList.SetList(TMenu.CurrentList, TMenu.MarketList.CurrentOffset);
}
if (TMenu._currentframe == 7) {
TMenu.List1.SelectItem(Number.NaN);
TMenu.List2.SelectItem(Number.NaN);
TMenu.Display._visible = false;
}
if (TMenu._currentframe == 9) {
if (TMenu.SubType == 2) {
TMenu.Lst.TheList = TMenu.GenerateAnimalsList();
}
if (TMenu.SubType == 3) {
TMenu.Lst.TheList = TMenu.GenerateMecList();
}
TMenu.Lst.SelectItem(TMenu.Lst.Selecteditem);
}
if (TMenu._currentframe == 10) {
TMenu.UpdateNews();
}
SMap._visible = false;
SWindow._visible = false;
MB._visible = false;
BFArrows._visible = false;
EBWindow._visible = false;
BMenu.gotoAndStop(3);
BMenu.TName = Towns[Group.InTown].Name;
BMenu.SelectButton(TMenu._currentframe);
UpdateTradeText();
PTCol.setRGB(0);
break;
case 4 :
MusicFade = -1;
OptionsMenu._visible = false;
Succeed._visible = false;
BW._visible = false;
SWindow._visible = true;
SMap._visible = false;
TMenu._visible = false;
EBWindow._visible = false;
MB._visible = false;
BFArrows._visible = false;
PointerText._visible = false;
BMenu.gotoAndStop(4);
BMenu.SelectButton(SWindow._currentframe);
if (SWindow._currentframe == 1) {
SWindow.UpdateInfo();
}
if (SWindow._currentframe == 2) {
SWindow.List2.TheList = SWindow.BattleItemsList();
SWindow.List2.SelectItem(Number.NaN);
SWindow.List1.SelectItem(SWindow.List1.SelectedItem);
}
if (SWindow._currentframe == 3) {
SWindow.WaterText = ("Water: " + Group.Water) + " L";
SWindow.CargoText = ((("Cargo: " + Group.CargoWeight) + " / ") + Group.MaxCargo) + " Kg";
SWindow.L1.SelectItem(SWindow.L1.SelectedItem);
SWindow.L2.SelectItem(SWindow.L2.SelectedItem);
if (SWindow["L" + SWindow.CurList].TheList.length == 0) {
if (SWindow.CurList == 1) {
OpList = 2;
} else {
OpList = 1;
}
SWindow["L" + OpList].SelectItem(0);
}
SWindow.CheckEmpty();
}
if (SWindow._currentframe == 4) {
SWindow.List1.TheList = SWindow.GenerateAnimalsList();
SWindow.List2.TheList = SWindow.GenerateCartsList();
SWindow.List1.SelectItem(SWindow.List1.SelectedItem);
SWindow.List2.SelectItem(SWindow.List2.SelectedItem);
}
if (SWindow._currentframe == 5) {
SWindow.Lst.SelectItem(SWindow.Lst.SelectedItem);
}
break;
case 5 :
MusicFade = -1;
OptionsMenu._visible = false;
Succeed._visible = false;
BW._visible = false;
SWindow._visible = false;
BFArrows._visible = false;
SMap._visible = false;
TMenu._visible = false;
EBWindow._visible = false;
MB._visible = true;
BMenu.gotoAndStop(1);
if (Group.Move) {
BMenu.Movement.gotoAndStop(2);
BMenu.Movement.Dir = Group.Direction + "\u00BA";
BMenu.Movement.Speed = Group.Speed + " Kmh";
} else {
BMenu.Movement.gotoAndStop(1);
}
break;
case 6 :
MusicFade = -1;
OptionsMenu._visible = false;
Succeed._visible = false;
BW._visible = true;
BFArrows._visible = true;
SMap._visible = false;
TMenu._visible = false;
SWindow._visible = false;
MB._visible = false;
EBWindow._visible = false;
BMenu.gotoAndStop(5);
InitiateBattle();
break;
case 7 :
MusicFade = -1;
OptionsMenu._visible = false;
Succeed._visible = false;
EBWindow._visible = true;
EBWindow.Offset = 0;
EBWindow.UpdateTrophies();
UpdateGroupCargo(Group);
EBWindow.UpdateTotalWeight();
BW._visible = false;
BFArrows._visible = false;
SMap._visible = false;
TMenu._visible = false;
SWindow._visible = false;
MB._visible = false;
BMenu.gotoAndStop(6);
break;
case 8 :
MusicFade = -1;
OptionsMenu._visible = false;
Succeed._visible = true;
BW._visible = true;
BFArrows._visible = false;
SMap._visible = false;
TMenu._visible = false;
SWindow._visible = false;
MB._visible = false;
EBWindow._visible = false;
BMenu.gotoAndStop(7);
break;
case 9 :
MusicFade = -1;
OptionsMenu._visible = true;
BMenu.gotoAndStop(7);
}
OldMode = Mode;
Mode = MD;
}
function UpdateTownEconomy(Twn) {
TotalWealth = 0;
for (p in Twn.Property) {
TotalWealth = TotalWealth + (Goods[Twn.Property[p].Type].LowPrice * Twn.Property[p].Amount);
}
TotalWealth = TotalWealth + Twn.Money;
Twn.Wealth = TotalWealth / Twn.Population;
if (Twn.Wealth <= 0) {
Twn.Wealth = 0;
}
Twn.PeopleNeeds = new Array();
UseFood = Twn.Wealth / 200;
if (UseFood < 0.2) {
UseFood = 0.2;
}
if (UseFood > 1.5) {
UseFood = 1.5;
}
Twn.PeopleNeeds.push({Type:1, Amount:UseFood});
UseMeds = Twn.Wealth / 1200;
if (UseMeds < 0.1) {
UseMeds = 0.1;
}
if (UseMeds > 2) {
UseMeds = 2;
}
if (Twn.Wealth < 50) {
UseMeds = UseMeds + 1;
}
Twn.PeopleNeeds.push({Type:3, Amount:UseMeds});
UseClothes = Twn.Wealth / 8000;
if (UseClothes > 1) {
UseClothes = 1;
}
if (UseClothes < 0) {
UseClothes = 0;
}
Twn.PeopleNeeds.push({Type:5, Amount:UseClothes});
UseShoes = Twn.Wealth / 20000;
if (UseShoes > 0.4) {
UseShoes = 0.4;
}
if (UseShoes < 0) {
UseShoes = 0;
}
Twn.PeopleNeeds.push({Type:8, Amount:UseShoes});
if (Twn.Motorized) {
UseFuel = Twn.Wealth / 500;
if (UseFuel < 0) {
UseFuel = 0;
}
Twn.PeopleNeeds.push({Type:9, Amount:UseFuel});
}
if (Twn.Wealth > 300) {
UseJewelry = Twn.Wealth / 30000;
if (UseJewelry < 0) {
UseJewelry = 0;
}
Twn.PeopleNeeds.push({Type:12, Amount:UseJewelry});
}
UseAlcohol = Twn.Wealth / 1000;
if (Twn.Population < 200) {
UseAlcohol = UseAlcohol * 2;
}
if (UseAlcohol < 0) {
UseAlcohol = 0;
}
Twn.PeopleNeeds.push({Type:13, Amount:UseAlcohol});
rst = 0;
while (rst < Goods.length) {
Twn.UseAmounts[rst] = 0;
rst++;
}
for (nd in Twn.PeopleNeeds) {
Twn.UseAmounts[Twn.PeopleNeeds[nd].Type] = Twn.UseAmounts[Twn.PeopleNeeds[nd].Type] + ((Twn.PeopleNeeds[nd].Amount * Twn.Population) * 30);
}
for (indn in Twn.Industries) {
if (!isNaN(Twn.Industries[indn].Pointer.Raw.Type)) {
Twn.UseAmounts[Twn.Industries[indn].Pointer.Raw.Type] = Twn.UseAmounts[Twn.Industries[indn].Pointer.Raw.Type] + ((Twn.Industries[indn].Pointer.Raw.Amount * Twn.Industries[indn].Production) * 30);
}
}
Twn.Use = new Array();
Twn.Prod = new Array();
Twn.Import = new Array();
Twn.Export = new Array();
us = 1;
while (us < Twn.UseAmounts.length) {
if (Twn.UseAmounts[us] > 0) {
Twn.Use.push({Type:us, Amount:Twn.UseAmounts[us]});
}
us++;
}
us = 1;
while (us < Twn.Production.length) {
if (Twn.Production[us] > 0) {
Twn.Prod.push({Type:us, Amount:Twn.Production[us]});
}
us++;
}
ie = 1;
while (ie < Goods.length) {
ProdRel = Twn.Production[ie] - Twn.UseAmounts[ie];
if (ProdRel > 0) {
Twn.Export.push({Type:ie, Amount:ProdRel});
}
if (ProdRel < 0) {
Twn.Import.push({Type:ie, Amount:-ProdRel});
}
ie++;
}
Twn.Use.sortOn("Amount", 18);
Twn.Prod.sortOn("Amount", 18);
Twn.Import.sortOn("Amount", 18);
Twn.Export.sortOn("Amount", 18);
if (Twn.Wealth > 0) {
Twn.DeathRate = 0.001 / Twn.Wealth;
}
Twn.BirthRate = Twn.Wealth / 15000000;
}
function CalculatePrice(BuySell, TownNum, ProductType, Amount) {
StartAmount = Towns[TownNum].Stock[ProductType].Amount;
if (isNaN(StartAmount)) {
StartAmount = 0;
}
MinValue = Goods[ProductType].LowPrice;
a = Goods[ProductType].BasicValue;
b = Towns[TownNum].UseAmounts[ProductType];
c = Towns[TownNum].Production[ProductType];
if (isNaN(c)) {
c = 0;
}
x = StartAmount;
if (BuySell == 1) {
x2 = StartAmount - Amount;
} else {
x2 = StartAmount + Amount;
}
if (x == 0) {
A = 0;
} else {
A = ((((18 * a) * b) * x) / ((((x * x) / 2) + ((6 * b) * x)) + ((12 * c) * x))) * x;
}
if (x2 == 0) {
A2 = 0;
} else {
A2 = ((((18 * a) * b) * x2) / ((((x2 * x2) / 2) + ((6 * b) * x2)) + ((12 * c) * x2))) * x2;
}
AT = Math.abs(A - A2);
if ((AT / Amount) < MinValue) {
AT = MinValue * Amount;
}
if (BuySell == 1) {
AT = AT * 1.05;
} else {
AT = AT * 0.95;
}
return(AT);
}
function MaxBuy(Twn, Prod, MaxWeight, MaxMoney) {
Limit = Math.floor(Math.min(MaxWeight / Goods[Prod.Type].WeightPerUnit, Prod.Amount));
a = Goods[Prod.Type].BasicValue;
b = Twn.UseAmounts[Prod.Type];
c = Twn.Production[Prod.Type];
StartAmount = Twn.Stock[Prod.Type].Amount;
MinValue = Goods[Prod.Type].LowPrice;
TA = MaxMoney;
x = StartAmount;
if (x == 0) {
A = 0;
} else {
A = ((((18 * a) * b) * x) / ((((x * x) / 2) + ((6 * b) * x)) + ((12 * c) * x))) * x;
}
Aq = ((0.525 * A) - ((18.9 * a) * b)) - (0.5 * TA);
Bq = ((((6.3 * A) * b) + ((12.6 * A) * c)) - ((6 * TA) * b)) - ((12 * TA) * c);
Res = (-2 * Bq) / (2 * Aq);
Res = Res - StartAmount;
Res = Math.floor(Math.abs(Res));
if (((Res == 0) or ((MaxMoney / Res) < (MinValue * 1.05))) or (b == 0)) {
Res = Math.floor(MaxMoney / (MinValue * 1.05));
}
Limit = Math.min(Limit, Res);
return(Limit);
}
function AddActivity(x, y) {
NA = 0;
ca = 1;
while (ca <= TotalAct) {
if (!Activity[ca].Active) {
NA = ca;
break;
}
ca++;
}
if (NA == 0) {
TotalAct++;
NA = TotalAct;
duplicateMovieClip (Map.ActivitySample, "A" + NA, Map.getNextHighestDepth());
Activity[NA] = new Object();
}
Activity[NA].Active = true;
Activity[NA].Members = new Array();
Activity[NA].Cargo = new Array();
Activity[NA].Inventory = new Array();
Activity[NA].Transport = new Array();
Activity[NA].Index = NA;
eval ("Map.A" + NA)._x = (Activity[NA].x = x);
eval ("Map.A" + NA)._y = (Activity[NA].y = y);
return(NA);
}
function RandomAppearance(Man) {
TotBodies = 8;
TotArms = 6;
TotLegs = 6;
TotHeads = 7;
TotHats = 3;
Man.BodyType = random(TotBodies) + 1;
if (Man.BodyType < 4) {
Man.ArmType = random(TotArms) + 1;
}
if ((Man.BodyType == 5) or (Man.BodyType == 8)) {
Man.ArmType = 4 + random(3);
}
if (Man.BodyType == 4) {
if (random(2) == 0) {
Man.ArmType = 2;
} else {
Man.ArmType = 4;
}
}
if ((Man.BodyType == 6) or (Man.BodyType == 7)) {
Man.ArmType = 4;
}
if (Man.BodyType <= 4) {
if (random(20) == 0) {
Man.LegType = 5;
} else {
Man.LegType = 1;
}
if (random(20) < 10) {
Man.HeadType = 1;
} else if (random(3) == 0) {
Man.HeadType = 2;
} else {
Man.HeadType = 3;
}
} else {
Man.LegType = 2 + random(5);
if (random(20) == 0) {
Man.HeadType = 1;
} else if (random(20) == 0) {
Man.HeadType = 3;
} else if (random(20) < 5) {
Man.HeadType = 2;
} else {
Man.HeadType = 4 + random(4);
}
}
Man.SkinColor = SkinColors[random(SkinColors.length)];
Man.HairColor = HairColors[random(HairColors.length)];
Man.JacketColor = (Man.SleevesColor = random(16777216));
Man.SkirtColor = random(16777216);
if (random(10) == 0) {
Man.PantsColor = Man.JacketColor;
} else {
Man.PantsColor = random(16777216);
}
if (random(5) == 0) {
if (Man.BodyType <= 4) {
Man.HatType = 1 + random(TotHats);
} else {
Man.HatType = 1 + random(2);
}
Man.HatColor = random(16777216);
}
}
function EquipGroup(TheGroup, WpnPattern, ArmorPattern, AmorPercentage) {
aw = 1;
while (aw <= Men) {
AddWpn = WpnPattern[random(WpnPattern.length)];
FoundWpn = false;
for (sw in TheGroup.Inventory) {
if (TheGroup.Inventory[sw].Type == AddWpn) {
if (Items[TheGroup.Inventory[sw].Type].Class == 4) {
TheGroup.Inventory[sw].Amount = TheGroup.Inventory[sw].Amount + 10;
} else {
TheGroup.Inventory[sw].Amount++;
}
FoundWpn = true;
break;
}
}
if (!FoundWpn) {
if (Items[AddWpn].Class == 4) {
TheGroup.Inventory.push({Type:AddWpn, Amount:10});
} else {
TheGroup.Inventory.push({Type:AddWpn, Amount:1});
}
}
if (Items[AddWpn].Class == 1) {
AddAmmo = Items[AddWpn].Ammo;
FoundAmmo = false;
for (sw in TheGroup.Inventory) {
if (TheGroup.Inventory[sw].Type == AddAmmo) {
TheGroup.Inventory[sw].Amount = TheGroup.Inventory[sw].Amount + (Items[AddWpn].Capacity * 10);
FoundAmmo = true;
break;
}
}
if (!FoundAmmo) {
TheGroup.Inventory.push({Type:AddAmmo, Amount:Items[AddWpn].Capacity * 10});
}
}
if (Math.random() < ArmorPercentage) {
AddArmor = ArmorPattern[random(ArmorPattern.length)];
FoundArmor = false;
for (sw in TheGroup.Inventory) {
if (TheGroup.Inventory[sw].Type == AddArmor) {
TheGroup.Inventory[sw].Amount++;
FoundArmor = true;
break;
}
}
if (!FoundArmor) {
TheGroup.Inventory.push({Type:AddArmor, Amount:1});
}
}
aw++;
}
}
function AddCaravan(Route) {
CP = random(Routes[Route].length);
NewAct = AddActivity(Towns[Routes[Route][CP].Town].x, Towns[Routes[Route][CP].Town].y);
Activity[NewAct].Type = 2;
Men = 10 + RouteLevels[Route];
if (Men > 40) {
Men = 40;
}
am = 1;
while (am <= Men) {
ln = Activity[NewAct].Members.push(RandomMember(Math.round(4 * NextRandomSeed()) + 1));
Activity[NewAct].Members[ln - 1].HP = Activity[NewAct].Members[ln - 1].MaxHP;
UpdateMemberParams(Activity[NewAct].Members[ln - 1]);
RandomAppearance(Activity[NewAct].Members[ln - 1]);
am++;
}
EquipGroup(Activity[NewAct], [14, 16, 17, 23, 34, 26, 33, 28, 30, 35, 37, 38, 39, 46, 53, 54, 52, 57], [61, 62, 63], 0.8);
DistributeItems(Activity[NewAct]);
DistributeAmmo(Activity[NewAct]);
Trans = 5 + RouteLevels[Route];
at = 1;
while (at <= Trans) {
TType = 1 + Math.round((Transports.length - 2) * NextRandomSeed());
ln = Activity[NewAct].Transport.push({Type:TType, HP:Transports[TType].MaxHP, MaxHP:Transports[TType].MaxHP});
UpdateTransportParams(Activity[NewAct].Transport[ln - 1]);
at++;
}
DistributeCarts(Activity[NewAct]);
UpdateGroupParams(Activity[NewAct]);
WaterNeed = Activity[NewAct].Drink * 72;
FuelNeed = Activity[NewAct].FuelUse;
while (WaterNeed > 0) {
AddContainer = 66 + random(7);
Found = false;
for (ci in Activity[NewAct].Inventory) {
if (Activity[NewAct].Inventory[ci].Type == AddContainer) {
Activity[NewAct].Inventory[ci].Amount++;
Found = true;
break;
}
}
if (!Found) {
Activity[NewAct].Inventory.push({Type:AddContainer, Amount:1});
}
WaterNeed = WaterNeed - Items[AddContainer].Capacity;
}
while (FuelNeed > 0) {
AddContainer = 73 + random(3);
Found = false;
for (ci in Activity[NewAct].Inventory) {
if (Activity[NewAct].Inventory[ci].Type == AddContainer) {
Activity[NewAct].Inventory[ci].Amount++;
Found = true;
break;
}
}
if (!Found) {
Activity[NewAct].Inventory.push({Type:AddContainer, Amount:1});
}
FuelNeed = FuelNeed - Items[AddContainer].Capacity;
}
UpdateGroupCargo(Activity[NewAct]);
Activity[NewAct].Money = Math.round(Math.sqrt(RouteLevels[Route] + ((RouteLevels[Route] * random(10000000)) * Math.random())));
if (Activity[NewAct].Carts > Activity[NewAct].Animals) {
OverCarts = Activity[NewAct].Carts - Activity[NewAct].Animals;
for (rc in Activity[NewAct].Transport) {
if (Transports[Activity[NewAct].Transport[rc].Type].Class == 2) {
Activity[NewAct].Transport.splice(rc, 1);
OverCarts--;
if (OverCarts <= 0) {
break;
}
}
}
DistributeCarts(Activity[NewAct]);
UpdateGroupCargo(Activity[NewAct]);
UpdateGroupParams(Activity[NewAct]);
}
Activity[NewAct].Route = Route;
Activity[NewAct].CurrentPoint = CP;
Activity[NewAct].FirstTime = true;
NextCaravanTarget(Activity[NewAct]);
}
function NextCaravanTarget(Car) {
Car.InTheWay = 0;
Car.CoveredDist = 0;
Car.Water = Car.MaxWater;
if (Car.FuelUse > 0) {
Found = false;
for (sf in Car.Cargo) {
if (Car.Cargo[sf].Type == 9) {
Car.Cargo[sf].Amount = Car.MaxFuel;
Found = true;
break;
}
}
if (!Found) {
Car.Cargo.push({Type:9, Amount:Car.MaxFuel});
}
}
if (Car.ForageUse > 0) {
Found = false;
for (sf in Car.Cargo) {
if (Car.Cargo[sf].Type == 2) {
Car.Cargo[sf].Amount = Math.round(Car.ForageUse * 9);
Found = true;
break;
}
}
if (!Found) {
Car.Cargo.push({Type:2, Amount:Math.round(Car.ForageUse * 9)});
}
}
for (cm in Car.Members) {
Car.Members[cm].HP = Car.Members[cm].MaxHP;
}
Found = false;
for (sf in Car.Cargo) {
if (Car.Cargo[sf].Type == 1) {
Car.Cargo[sf].Amount = Math.round(Car.Eat * 9);
Found = true;
break;
}
}
if (!Found) {
Car.Cargo.push({Type:1, Amount:Math.round(Car.Eat * 9)});
}
UpdateGroupCargo(Car);
if (Car.FirstTime) {
Car.FirstTime = false;
} else {
RoutePoint = Routes[Car.Route][Car.CurrentPoint];
Twn = Towns[RoutePoint.Town];
for (si in RoutePoint.Sell) {
GPos = Number.NaN;
for (fg in Car.Cargo) {
if (Car.Cargo[fg].Type == RoutePoint.Sell[si].Type) {
if (Car.Cargo[fg].Type == 10) {
SellAmount = NumberFormat(Car.Cargo[fg].Amount * RoutePoint.Sell[si].Amount, 2);
}
SellAmount = Math.floor(Car.Cargo[fg].Amount * RoutePoint.Sell[si].Amount);
Pr = NumberFormat(CalculatePrice(2, RoutePoint.Town, RoutePoint.Sell[si].Type, SellAmount), 2);
Car.Cargo[fg].Amount = Car.Cargo[fg].Amount - SellAmount;
Twn.Stock[RoutePoint.Sell[si].Type].Amount = Twn.Stock[RoutePoint.Sell[si].Type].Amount + SellAmount;
Twn.Money = Twn.Money - Pr;
break;
}
}
}
UpdateGroupCargo(Car);
SpaceToFill = Car.FreeCargo;
for (bi in RoutePoint.Buy) {
if (RoutePoint.Buy[bi].Type == 10) {
BuyAmount = NumberFormat((RoutePoint.Buy[bi].Amount * Car.FreeCargo) / Goods[RoutePoint.Buy[bi].Type].WeightPerUnit, 2);
} else {
BuyAmount = Math.floor((RoutePoint.Buy[bi].Amount * Car.FreeCargo) / Goods[RoutePoint.Buy[bi].Type].WeightPerUnit);
}
if (BuyAmount > Twn.Stock[RoutePoint.Buy[bi].Type].Amount) {
BuyAmount = Twn.Stock[RoutePoint.Buy[bi].Type].Amount;
}
Pr = NumberFormat(CalculatePrice(1, RoutePoint.Town, RoutePoint.Buy[bi].Type, BuyAmount), 2);
PPU = Pr / BuyAmount;
if (PPU > Goods[RoutePoint.Buy[bi].Type].BasicValue) {
if (RoutePoint.Buy[bi].Type == 10) {
BuyAmount = NumberFormat(BuyAmount * (Goods[RoutePoint.Buy[bi].Type].BasicValue / PPU), 2);
} else {
BuyAmount = Math.round(BuyAmount * (Goods[RoutePoint.Buy[bi].Type].BasicValue / PPU));
}
Pr = NumberFormat(CalculatePrice(1, RoutePoint.Town, RoutePoint.Buy[bi].Type, BuyAmount), 2);
}
AddCargo(Car, RoutePoint.Buy[bi].Type, BuyAmount);
Twn.Stock[RoutePoint.Buy[bi].Type].Amount = Twn.Stock[RoutePoint.Buy[bi].Type].Amount - BuyAmount;
Twn.Money = Twn.Money + Pr;
}
Twn.Money = Twn.Money + (Car.Members.length * 100);
Twn.Money = Twn.Money + (Car.Transport.length * 70);
UpdateGroupCargo(Car);
UpdateTownEconomy(Twn);
}
Car.CurrentPoint++;
if (Car.CurrentPoint >= Routes[Car.Route].length) {
Car.CurrentPoint = 0;
}
Car.Direction = CalcAngle(Car.x, Car.y, eval ("Map.Town" + Routes[Car.Route][Car.CurrentPoint].Town)._x, eval ("Map.Town" + Routes[Car.Route][Car.CurrentPoint].Town)._y);
Car.TargetX = eval ("Map.Town" + Routes[Car.Route][Car.CurrentPoint].Town)._x;
Car.TargetY = eval ("Map.Town" + Routes[Car.Route][Car.CurrentPoint].Town)._y;
}
function DistributeItems(TheGroup) {
SniperWeapons = new Array();
StrengthWeapons = new Array();
Armors = new Array();
for (da in TheGroup.Inventory) {
FillArray = Number.NaN;
if (Items[TheGroup.Inventory[da].Type].Class == 1) {
FillArray = SniperWeapons;
}
if ((Items[TheGroup.Inventory[da].Type].Class == 4) or (Items[TheGroup.Inventory[da].Type].Class == 5)) {
FillArray = StrengthWeapons;
}
if (Items[TheGroup.Inventory[da].Type].Class == 3) {
FillArray = Armors;
}
if (FillArray instanceof Array) {
FillArray.push({Type:TheGroup.Inventory[da].Type, Amount:TheGroup.Inventory[da].Amount});
}
}
SniperWeapons.sortOn("Damage", 18);
StrengthWeapons.sortOn("Damage", 18);
Armors.sortOn("Protection", 18);
Snipers = new Array();
StrongOnes = new Array();
FragilOnes = new Array();
for (dm in TheGroup.Members) {
Snipers.push(TheGroup.Members[dm]);
StrongOnes.push(TheGroup.Members[dm]);
FragilOnes.push(TheGroup.Members[dm]);
}
Snipers.sortOn("Sniper", 18);
StrongOnes.sortOn("Strength", 18);
FragilOnes.sortOn("MaxHP", 16);
Granades = 0;
OtherWpns = 0;
for (fg in TheGroup.Inventory) {
if (Items[TheGroup.Inventory[fg].Type].Class == 4) {
Granades = Granades + TheGroup.Inventory[fg].Amount;
}
if ((Items[TheGroup.Inventory[fg].Type].Class == 1) or (Items[TheGroup.Inventory[fg].Type].Class == 5)) {
OtherWpns = OtherWpns + TheGroup.Inventory[fg].Amount;
}
}
if (Granades > 0) {
if (OtherWpns < TheGroup.Members.length) {
MenToUseGranades = TheGroup.Members.length - OtherWpns;
} else {
IdealGranadeurs = Granades / 10;
RGU = IdealGranadeurs / (IdealGranadeurs + OtherWpns);
MenToUseGranades = TheGroup.Members.length * RGU;
}
GranadesPerMan = Math.round(Granades / MenToUseGranades);
}
dw = 0;
while (dw < TheGroup.Members.length) {
if ((SniperWeapons.length > 0) and (Snipers.length > 0)) {
NextSniper = NextUnArmed(Snipers);
NextSniper.Holding[0] = TakeFirstWpn(SniperWeapons, GranadesPerMan);
}
if ((StrengthWeapons.length > 0) and (StrongOnes.length > 0)) {
NextStrong = NextUnArmed(StrongOnes);
NextStrong.Holding[0] = TakeFirstWpn(StrengthWeapons, GranadesPerMan);
}
if ((Armors.length > 0) and (FragilOnes.length > 0)) {
FragilOnes[0].Holding[4] = TakeFirstWpn(Armors, GranadesPerMan);
FragilOnes.shift();
}
dw++;
}
}
function NextUnArmed(TheArr) {
while (TheArr[0].Holding[0] instanceof Object) {
TheArr.shift();
}
return(TheArr[0]);
}
function TakeFirstWpn(TheArr, Gr) {
TheWpn = {Type:TheArr[0].Type};
if (Items[TheWpn.Type].Class == 4) {
TakeAmount = Gr;
} else {
TakeAmount = 1;
}
TakeAmount = Math.min(TakeAmount, TheArr[0].Amount);
TheWpn.Amount = TakeAmount;
TheArr[0].Amount = TheArr[0].Amount - TakeAmount;
if (TheArr[0].Amount <= 0) {
TheArr.shift();
}
return(TheWpn);
}
function DistributeAmmo(TheGroup) {
AmmoPlaces = new Array();
AmmoTypes = new Array();
for (mm in TheGroup.Members) {
sl = 2;
while (sl <= 3) {
if (TheGroup.Members[mm].Holding[sl] instanceof Object) {
for (rmv in TheGroup.Inventory) {
if (TheGroup.Inventory[rmv].Type == TheGroup.Members[mm].Holding[sl].Type) {
TheGroup.Inventory[rmv].InUse = TheGroup.Inventory[rmv].InUse - TheGroup.Members[mm].Holding[sl].Amount;
break;
}
}
TheGroup.Members[mm].Holding[sl] = 0;
}
UpdateCarrying(TheGroup.Members[mm]);
sl++;
}
sl = 0;
while (sl <= 1) {
HldWpn = TheGroup.Members[mm].Holding[sl];
if ((HldWpn instanceof Object) and (Items[HldWpn.Type].Class == 1)) {
Parts = 1;
if (Items[HldWpn.Type].ReCock == 4) {
Parts = 2;
}
if (Items[HldWpn.Type].DescCat == 8) {
Parts = 3;
}
TheAmmo = Items[HldWpn.Type].Ammo;
if (sl == 0) {
ASlot = 2;
} else {
ASlot = 3;
}
AmmoPlaces.push({Subject:TheGroup.Members[mm], Slot:ASlot, Ammo:TheAmmo, Parts:Parts, Full:false});
if (!(AmmoTypes[TheAmmo] instanceof Object)) {
AmmoTypes[TheAmmo] = new Object();
}
if (isNaN(AmmoTypes[TheAmmo].Parts)) {
AmmoTypes[TheAmmo].Parts = Parts;
} else {
AmmoTypes[TheAmmo].Parts = AmmoTypes[TheAmmo].Parts + Parts;
}
}
sl++;
}
}
for (ca in TheGroup.Inventory) {
if (Items[TheGroup.Inventory[ca].Type].Class == 2) {
AmmoTypes[TheGroup.Inventory[ca].Type] = new Object();
if (isNaN(AmmoTypes[TheGroup.Inventory[ca].Type].Available)) {
AmmoTypes[TheGroup.Inventory[ca].Type].Available = TheGroup.Inventory[ca].Amount;
} else {
AmmoTypes[TheGroup.Inventory[ca].Type].Available = AmmoTypes[TheGroup.Inventory[ca].Type].Available + TheGroup.Inventory[ca].Amount;
}
AmmoTypes[TheGroup.Inventory[ca].Type].InventoryIndex = ca;
}
}
do {
for (da in AmmoPlaces) {
if (((AmmoPlaces[da].Subject.Capacity - AmmoPlaces[da].Subject.Carrying) >= Items[AmmoPlaces[da].Ammo].Weight) and (AmmoTypes[AmmoPlaces[da].Ammo].Available > 0)) {
GiveAmount = Math.round((AmmoPlaces[da].Parts * AmmoPlaces[da].Subject.MaxAP) / 10);
MaxHold = Math.floor((AmmoPlaces[da].Subject.Capacity - AmmoPlaces[da].Subject.Carrying) / Items[AmmoPlaces[da].Ammo].Weight);
if (GiveAmount > MaxHold) {
GiveAmount = MaxHold;
}
if (GiveAmount > AmmoTypes[AmmoPlaces[da].Ammo].Available) {
GiveAmount = AmmoTypes[AmmoPlaces[da].Ammo].Available;
}
if (AmmoPlaces[da].Subject.Holding[AmmoPlaces[da].Slot].Type == AmmoPlaces[da].Ammo) {
AmmoPlaces[da].Subject.Holding[AmmoPlaces[da].Slot].Amount = AmmoPlaces[da].Subject.Holding[AmmoPlaces[da].Slot].Amount + GiveAmount;
} else {
AmmoPlaces[da].Subject.Holding[AmmoPlaces[da].Slot] = {Type:AmmoPlaces[da].Ammo, Amount:GiveAmount};
}
AmmoTypes[AmmoPlaces[da].Ammo].Available = AmmoTypes[AmmoPlaces[da].Ammo].Available - GiveAmount;
TheGroup.Inventory[AmmoTypes[AmmoPlaces[da].Ammo].InventoryIndex].InUse = TheGroup.Inventory[AmmoTypes[AmmoPlaces[da].Ammo].InventoryIndex].InUse + GiveAmount;
UpdateCarrying(AmmoPlaces[da].Subject);
} else {
AmmoPlaces[da].Full = true;
}
}
var _local2 = true;
for (da in AmmoPlaces) {
if (!AmmoPlaces[da].Full) {
_local2 = false;
break;
}
}
} while (!_local2);
}
function AddRandomGroup(Type, Class) {
switch (random(4)) {
case 0 :
AppearPoint = {x:5 + random(480), y:5};
break;
case 1 :
AppearPoint = {x:485, y:5 + random(480)};
break;
case 2 :
AppearPoint = {x:5 + random(480), y:485};
break;
case 3 :
AppearPoint = {x:5, y:5 + random(480)};
}
Map.globalToLocal(AppearPoint);
NewAct = AddActivity(AppearPoint.x, AppearPoint.y);
Activity[NewAct].Type = Type;
Activity[NewAct].Attack = false;
Activity[NewAct].Direction = (CalcAngle(AppearPoint.x, AppearPoint.y, Group.x, Group.y) - (Math.PI/4)) + (Math.random() * halfPI);
Men = random(Math.round(Math.pow(Class, 1.2)) + 2) + (Class * 2);
m = 1;
while (m <= Men) {
Activity[NewAct].Members.push(RandomMember(Class));
Activity[NewAct].Members[Activity[NewAct].Members.length - 1].Group = Activity[NewAct];
m++;
}
if (Type == 1) {
if (Class == 1) {
SubClass = random(3) + 1;
if (SubClass == 1) {
WpnPat = [59];
}
if (SubClass == 2) {
WpnPat = [16, 56, 60];
}
if (SubClass == 3) {
WpnPat = [56, 57];
}
ArmPat = [];
ArmPer = 0;
}
if (Class == 2) {
SubClass = random(2) + 1;
if (Subclass == 1) {
WpnPat = [56, 16, 16, 17];
}
if (SubClass == 2) {
WpnPat = [60];
}
ArmPat = [];
ArmPer = 0;
}
if (Class == 3) {
SubClass = random(2) + 1;
if (SubClass == 1) {
WpnPat = [60];
}
if (SubClass == 2) {
WpnPat = [16, 17, 20, 34, 35, 57];
RobberHorses = random(3);
at = 1;
while (at <= RobberHorses) {
Activity[NewAct].Transport.push({Type:3, HP:Transports[3].MaxHP, MaxHP:Transports[3].MaxHP});
Activity[NewAct].Transport.push({Type:11, HP:Transports[11].MaxHP, MaxHP:Transports[11].MaxHP});
at++;
}
DistributeCarts(Activity[NewAct]);
}
ArmPat = [];
ArmPer = 0;
}
if (Class == 4) {
WpnPat = [19, 20, 41];
ArmPat = [];
ArmPer = 0;
}
if (Class == 5) {
WpnPat = [15, 19, 22, 25, 36, 37, 54];
ArmPat = [61];
ArmPer = 0.2;
at = 1;
while (at <= Men) {
Activity[NewAct].Transport.push({Type:14, HP:Transports[14].MaxHP, MaxHP:Transports[14].MaxHP});
at++;
}
}
if (Class == 6) {
WpnPat = [14, 19, 22, 24, 27, 28, 38, 44, 53, 53];
ArmPat = [61, 62];
ArmPer = 0.4;
PlacesToFill = Men;
while (PlacesToFill > 0) {
TransType = 14 + random(3);
Activity[NewAct].Transport.push({Type:TransType, HP:Transports[TransType].MaxHP, MaxHP:Transports[TransType].MaxHP});
PlacesToFill = PlacesToFill - Transports[TransType].Places;
}
}
if (Class == 7) {
WpnPat = [19, 29, 30, 35, 36, 44, 48, 52, 54, 55];
ArmPat = [62, 63];
ArmPer = 0.7;
at = 1;
while (at <= Men) {
Activity[NewAct].Transport.push({Type:15, HP:Transports[15].MaxHP, MaxHP:Transports[15].MaxHP});
at++;
}
}
}
if (Type == 3) {
WpnPat = [15, 25, 29, 40, 44, 48, 54, 51];
ArmPat = [65];
ArmPer = 1;
Activity[NewAct].Payed = false;
at = 1;
while (at <= Men) {
Activity[NewAct].Transport.push({Type:14, HP:Transports[14].MaxHP, MaxHP:Transports[14].MaxHP});
at++;
}
}
if (Type == 4) {
WpnPat = [15, 19, 26, 28, 36, 38, 44, 45, 53];
ArmPat = [62, 63, 64];
ArmPer = 1;
}
for (mb in Activity[NewAct].Members) {
if (Type == 3) {
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HatType = 1;
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = (Activity[NewAct].Members[mb].PantsColor = 2241416));
Activity[NewAct].Members[mb].HatColor = 1122918 /* 0x112266 */;
}
if (Type == 4) {
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HatType = 1;
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].HatColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = (Activity[NewAct].Members[mb].PantsColor = 3377152)));
}
if (Type == 1) {
if (Class == 1) {
if (SubClass == 1) {
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].HatType = 3;
Activity[NewAct].Members[mb].SkinColor = 10845266 /* 0xA57C52 */;
Activity[NewAct].Members[mb].HairColor = 0;
Activity[NewAct].Members[mb].JacketColor = 16777215 /* 0xFFFFFF */;
Activity[NewAct].Members[mb].SleevesColor = 16777215 /* 0xFFFFFF */;
Activity[NewAct].Members[mb].PantsColor = 16777215 /* 0xFFFFFF */;
Activity[NewAct].Members[mb].HatColor = random(16777216);
Activity[NewAct].Members[mb].Healthyness = 4 + random(2);
Activity[NewAct].Members[mb].Agility = 5 + random(2);
UpdateMemberParams(Activity[NewAct].Members[mb]);
Activity[NewAct].Members[mb].HP = Activity[NewAct].Members[mb].MaxHP;
UpdateMemberParams(Activity[NewAct].Members[mb]);
}
if (SubClass == 2) {
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
if (random(2) == 0) {
Activity[NewAct].Members[mb].LegType = 1;
} else {
Activity[NewAct].Members[mb].LegType = 5;
}
if (random(2) == 0) {
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].HairColor = HairColors[random(2)];
if (random(2) == 0) {
Activity[NewAct].Members[mb].HatType = 3;
Activity[NewAct].Members[mb].HatColor = random(16777216);
}
} else {
Activity[NewAct].Members[mb].HeadType = 4;
Activity[NewAct].Members[mb].HairColor = 16777215 /* 0xFFFFFF */;
}
Activity[NewAct].Members[mb].PantsColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = ((((random(64) + 192) * 65536) + ((random(32) + 192) * 256)) + random(32)) + 128));
Activity[NewAct].Members[mb].SkinColor = 10845266 /* 0xA57C52 */;
}
if (SubClass == 3) {
if (random(2) == 0) {
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 2 + random(2);
} else {
Activity[NewAct].Members[mb].BodyType = 4;
Activity[NewAct].Members[mb].ArmType = 2;
}
Activity[NewAct].Members[mb].ArmType = 2 + random(2);
Activity[NewAct].Members[mb].LegType = 1;
if (random(2) == 0) {
Activity[NewAct].Members[mb].HeadType = 1;
} else {
Activity[NewAct].Members[mb].HeadType = 3;
}
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = 16777215);
Activity[NewAct].Members[mb].PantsColor = 2236962 /* 0x222222 */;
Activity[NewAct].Members[mb].SkinColor = 6702080 /* 0x664400 */;
Activity[NewAct].Members[mb].HairColor = 1118481 /* 0x111111 */;
Activity[NewAct].Members[mb].Agility = 4 + random(2);
Activity[NewAct].Members[mb].Healthiness = 5 + random(3);
UpdateMemberParams(Activity[NewAct].Members[mb]);
Activity[NewAct].Members[mb].HP = Activity[NewAct].Members[mb].MaxHP;
UpdateMemberParams(Activity[NewAct].Members[mb]);
}
}
if (Class == 2) {
if (SubClass == 1) {
RandomAppearance(Activity[NewAct].Members[mb]);
}
if (SubClass == 2) {
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 6;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HeadType = 4;
Activity[NewAct].Members[mb].SkinColor = SkinColors[0];
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].PantsColor = (Activity[NewAct].Members[mb].SleevesColor = (Activity[NewAct].Members[mb].HairColor = 2236962)));
Activity[NewAct].Members[mb].Agility = 7 + random(3);
UpdateMemberParams(Activity[NewAct].Members[mb]);
}
}
if (Class == 3) {
if (SubClass == 1) {
Activity[NewAct].Members[mb].BodyType = 7;
Activity[NewAct].Members[mb].ArmType = 4;
Activity[NewAct].Members[mb].LegType = 6;
Activity[NewAct].Members[mb].HeadType = 4 + random(4);
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].PantsColor = random(16777216));
Activity[NewAct].Members[mb].Agility = 7 + random(3);
Activity[NewAct].Members[mb].Healthiness = 6 + random(2);
UpdateMemberParams(Activity[NewAct].Members[mb]);
Activity[NewAct].Members[mb].HP = Activity[NewAct].Members[mb].MaxHP;
UpdateMemberParams(Activity[NewAct].Members[mb]);
}
if (SubClass == 2) {
if (random(2) == 0) {
Activity[NewAct].Members[mb].BodyType = 1 + random(4);
Activity[NewAct].Members[mb].ArmType = 1 + random(6);
Activity[NewAct].Members[mb].HeadType = 1 + random(4);
Activity[NewAct].Members[mb].LegType = 1;
if (random(5) == 0) {
Activity[NewAct].Members[mb].HatType = 1 + random(2);
Activity[NewAct].Members[mb].HatColor = random(16777216);
}
if (random(3) == 0) {
RC = 255;
GC = (BC = 0);
} else {
if (random(2) == 0) {
RC = 255;
} else {
RC = 0;
}
if (random(2) == 0) {
GC = 255;
} else {
GC = 0;
}
if (random(2) == 0) {
BC = 255;
} else {
BC = 0;
}
}
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = ((RC * 65536) + (GC * 256)) + BC);
if (random(2) == 0) {
RC = 255;
} else {
RC = 0;
}
if (random(2) == 0) {
GC = 255;
} else {
GC = 0;
}
if (random(2) == 0) {
BC = 255;
} else {
BC = 0;
}
Activity[NewAct].Members[mb].PantsColor = ((RC * 65536) + (GC * 256)) + BC;
if (random(2) == 0) {
RC = 255;
} else {
RC = 0;
}
if (random(2) == 0) {
GC = 255;
} else {
GC = 0;
}
if (random(2) == 0) {
BC = 255;
} else {
BC = 0;
}
Activity[NewAct].Members[mb].SkirtColor = ((RC * 65536) + (GC * 256)) + BC;
Activity[NewAct].Members[mb].SkinColor = SkinColors[1];
Activity[NewAct].Members[mb].HairColor = 2236962 /* 0x222222 */;
} else {
Activity[NewAct].Members[mb].BodyType = 6;
Activity[NewAct].Members[mb].ArmType = 4 + random(3);
Activity[NewAct].Members[mb].LegType = 5;
if (random(2) == 0) {
Activity[NewAct].Members[mb].HeadType = 2;
} else {
Activity[NewAct].Members[mb].HeadType = 4;
}
Activity[NewAct].Members[mb].SkinColor = SkinColors[1];
Activity[NewAct].Members[mb].HairColor = 2236962 /* 0x222222 */;
if (random(3) == 0) {
RC = 255;
GC = (BC = 0);
} else {
if (random(2) == 0) {
RC = 255;
} else {
RC = 0;
}
if (random(2) == 0) {
GC = 255;
} else {
GC = 0;
}
if (random(2) == 0) {
BC = 255;
} else {
BC = 0;
}
}
Activity[NewAct].Members[mb].PantsColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = ((RC * 65536) + (GC * 256)) + BC));
}
}
}
if (Class == 4) {
SColor = (((random(128) + 128) * 65536) + ((random(128) + 128) * 256)) + (random(128) + 128);
JColor = ((random(128) * 65536) + (random(128) * 256)) + random(128);
switch (random(3)) {
case 0 :
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = SColor);
Activity[NewAct].Members[mb].PantsColor = ((random(128) * 65536) + (random(128) * 256)) + random(128);
break;
case 1 :
Activity[NewAct].Members[mb].BodyType = 2;
Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = JColor);
Activity[NewAct].Members[mb].SkirtColor = SColor;
Activity[NewAct].Members[mb].PantsColor = JColor;
break;
case 2 :
Activity[NewAct].Members[mb].BodyType = 2;
Activity[NewAct].Members[mb].SkirtColor = (Activity[NewAct].Members[mb].SleevesColor = SColor);
Activity[NewAct].Members[mb].JacketColor = JColor;
Activity[NewAct].Members[mb].PantsColor = ((random(128) * 65536) + (random(128) * 256)) + random(128);
}
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].HeadType = random(3) + 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
if (random(3) <= 1) {
Activity[NewAct].Members[mb].HatType = 2;
Activity[NewAct].Members[mb].HatColor = ((random(128) * 65536) + (random(128) * 256)) + random(128);
}
}
if (Class == 5) {
JColor = (((random(64) + 64) * 65536) + ((random(64) + 64) * 256)) + (random(64) + 64);
SColor = (((random(64) + 192) * 65536) + ((random(64) + 192) * 256)) + (random(64) + 192);
if (random(3) == 0) {
Activity[NewAct].Members[mb].HeadType = 3;
} else {
Activity[NewAct].Members[mb].HeadType = 1;
}
Activity[NewAct].Members[mb].HairColor = HairColors[random(7)];
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].PantsColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = JColor));
Activity[NewAct].Members[mb].SkirtColor = SColor;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].BodyType = 2;
}
if ((Class == 6) or (Class == 7)) {
RandomAppearance(Activity[NewAct].Members[mb]);
}
}
}
EquipGroup(Activity[NewAct], WpnPat, ArmPat, ArmPer);
DistributeItems(Activity[NewAct]);
DistributeAmmo(Activity[NewAct]);
UpdateGroupParams(Activity[NewAct]);
WaterNeed = Activity[NewAct].Drink * 24;
FuelNeed = Math.round(Activity[NewAct].FuelUse);
while (WaterNeed > 0) {
AddContainer = 66 + random(Class);
Found = false;
for (ci in Activity[NewAct].Inventory) {
if (Activity[NewAct].Inventory[ci].Type == AddContainer) {
Activity[NewAct].Inventory[ci].Amount++;
Found = true;
break;
}
}
if (!Found) {
Activity[NewAct].Inventory.push({Type:AddContainer, Amount:1});
}
WaterNeed = WaterNeed - Items[AddContainer].Capacity;
}
while (FuelNeed > 0) {
AddContainer = 73 + random(3);
Found = false;
for (ci in Activity[NewAct].Inventory) {
if (Activity[NewAct].Inventory[ci].Type == AddContainer) {
Activity[NewAct].Inventory[ci].Amount++;
Found = true;
break;
}
}
if (!Found) {
Activity[NewAct].Inventory.push({Type:AddContainer, Amount:1});
}
FuelNeed = FuelNeed - Items[AddContainer].Capacity;
}
UpdateGroupCargo(Activity[NewAct]);
Activity[NewAct].Water = Math.round((Activity[NewAct].MaxWater * Math.random()) * 0.8);
if (Activity[NewAct].FuelUse > 0) {
Activity[NewAct].Cargo.push({Type:9, Amount:Math.round((Activity[NewAct].MaxFuel * Math.random()) * 0.8)});
}
Activity[NewAct].Cargo.push({Type:1, Amount:Math.round(((Activity[NewAct].Eat * 3) * Math.random()) * 0.8)});
if (Activity[NewAct].ForageUse > 0) {
Activity[NewAct].Cargo.push({Type:2, Amount:Math.round(((Activity[NewAct].ForageUse * 3) * Math.random()) * 0.8)});
}
Activity[NewAct].Money = Class + Math.round(Math.sqrt((Class * random(200000)) * Math.random()));
}
function RandomMember(MClass) {
Ret = new Object();
Ret.Healthiness = 3 + random(MClass);
if (Ret.Healthiness > 10) {
Ret.Healthiness = 10;
}
Ret.Agility = 3 + random(MClass);
if (Ret.Agility > 10) {
Ret.Agility = 10;
}
if (Ret.Agility < 5) {
Ret.Agility = 5;
}
Ret.Accuracy = 3 + random(MClass);
if (Ret.Accuracy > 10) {
Ret.Accuracy = 10;
}
Ret.Intelligence = 3 + random(MClass);
if (Ret.Intelligence > 10) {
Ret.Intelligence = 10;
}
Ret.SniperExperience = (MClass * 5) + random(MClass * 5);
Ret.DoctorExperience = (MClass * 5) + random(MClass * 5);
Ret.VeterinaryExperience = (MClass * 5) + random(MClass * 5);
Ret.MechanicExperience = (MClass * 5) + random(MClass * 5);
Ret.Holding = new Array();
UpdateMemberParams(Ret);
Ret.HP = Math.round((Ret.MaxHP / 2) + (Math.random() * (Ret.MaxHP / 2)));
return(Ret);
}
function UpdateMemberParams(Obj) {
if ((Obj.HP < 0) or (Obj.HP === 0)) {
if (Obj == People[0]) {
GameOverType = 1;
Mus.setVolume(0);
gotoAndStop ("Game Over");
}
if (Obj == People[62]) {
Story.EngineerKilled = true;
}
if (Obj == People[63]) {
Story.HaveSniper = false;
if (PoliceStatus != -1) {
DefaultStages[9] = 46;
}
}
Obj.Dead = true;
if (Mode != 6) {
for (sm in Obj.Group.Members) {
if (Obj.Group.Members[sm] == Obj) {
Obj.Group.Members.splice(sm, 1);
if ((Obj.Group == Group) and (Mode == 1)) {
Messages.push({Type:3, Name:Obj.Name});
}
for (hld in Obj.Holding) {
if (Obj.Holding[hld] instanceof Object) {
for (si in Obj.Group.Inventory) {
if (Obj.Group.Inventory[si].Type == Obj.Holding[hld].Type) {
Obj.Group.Inventory[si].InUse = Obj.Group.Inventory[si].InUse - Obj.Holding[hld].Amount;
break;
}
}
Obj.Holding[hld] = 0;
}
}
UpdateGroupParams(Obj.Group);
break;
}
}
}
} else {
Obj.Dead = false;
if (!isNaN(Obj.HP)) {
Obj.MaxHP = Math.round(Obj.Healthiness * 10);
Grave = Obj.MaxHP / 3;
Middle = Obj.MaxHP * 0.67;
if ((Obj.HP > Grave) and (Obj.HP <= Middle)) {
Obj.HealthState = 3;
Obj.AffectHealthiness = -1;
Obj.AffectAgility = -1;
Obj.AffectAccuracy = 0;
Obj.AffectIntelligence = 0;
}
if (Obj.HP <= Grave) {
Obj.HealthState = 4;
Obj.AffectHealthiness = -2;
Obj.AffectAgility = -2;
Obj.AffectAccuracy = -1;
Obj.AffectIntelligence = -1;
}
if (Obj.HP > Middle) {
if (Obj.HP == Obj.MaxHP) {
Obj.HealthState = 1;
} else {
Obj.HealthState = 2;
}
Obj.AffectHealthiness = 0;
Obj.AffectAgility = 0;
Obj.AffectAccuracy = 0;
Obj.AffectIntelligence = 0;
}
} else {
Obj.AffectHealthiness = 0;
Obj.AffectAgility = 0;
Obj.AffectAccuracy = 0;
Obj.AffectIntelligence = 0;
Obj.HealthState = 1;
}
RealHealthiness = Obj.Healthiness + Obj.AffectHealthiness;
RealAgility = Obj.Agility + Obj.AffectAgility;
RealAccuracy = Obj.Accuracy + Obj.AffectAccuracy;
RealIntelligence = Obj.Intelligence + Obj.AffectIntelligence;
if (RealHealthiness < 0) {
RealHealthiness = 0;
}
if (RealAgility < 0) {
RealAgility = 0;
}
if (RealAccuracy < 0) {
RealAccuracy = 0;
}
if (RealIntelligence < 0) {
RealIntelligence = 0;
}
if ((!Obj.SniperExperience) > 0) {
Obj.SniperExperience = 0;
}
if ((!Obj.DoctorExperience) > 0) {
Obj.DoctorExperience = 0;
}
if ((!Obj.VeterinaryExperience) > 0) {
Obj.VeterinaryExperience = 0;
}
if ((!Obj.MechanicExperience) > 0) {
Obj.MechanicExperience = 0;
}
if (Obj.APExperience > 0) {
AddAP = Math.floor(Math.sqrt(Obj.APExperience / 10));
if (AddAp > 15) {
AddAP = 15;
}
} else {
AddAP = 0;
}
Obj.MaxAP = Math.round(RealAgility * 1.5) + AddAP;
Obj.MaxHP = Math.round(Obj.Healthiness * 10);
if (Obj.StrengthExperience > 0) {
AddStrength = Math.floor(Math.sqrt(Obj.StrengthExperience));
if (AddStrength > 5) {
AddStrength = 5;
}
} else {
AddStrength = 0;
}
Obj.Strength = Math.round(RealHealthiness * 1.5) + AddStrength;
Obj.WalkSpeed = 3 + Math.round((RealAgility / 2.5) + (Obj.AffectAgility / 2));
Obj.Noticeability = Math.round(((15 - RealAgility) * 10) - (RealIntelligence * 2));
Obj.Capacity = Math.round(Obj.Strength * 2);
Obj.Sniper = Math.round((RealAccuracy * 10) + Math.sqrt(Obj.SniperExperience));
Obj.Doctor = Math.round(((RealIntelligence * 1.5) + RealAccuracy) + Math.sqrt(Obj.DoctorExperience));
Obj.Veterinary = Math.round(((RealIntelligence * 2) + (RealAccuracy * 0.5)) + Math.sqrt(Obj.VeterinaryExperience));
Obj.Mechanic = Math.round(((RealIntelligence + RealAccuracy) + (RealAgility * 0.5)) + Math.sqrt(Obj.MechanicExperience));
}
}
function UpdateGroupParams(Obj) {
Obj.Speed = Infinity;
Obj.Noticeability = 0;
Obj.MaxCargo = 0;
Obj.Doctor = 0;
Obj.Veterinary = 0;
Obj.Mechanic = 0;
Obj.ForageUse = 0;
Obj.FuelUse = 0;
Obj.Drink = Obj.Members.length * 0.1;
Obj.Eat = Obj.Members.length * 0.3;
Obj.Animals = 0;
Obj.Carts = 0;
Obj.Cars = 0;
DocArr = new Array();
MechArr = new Array();
VetArr = new Array();
MemArray = new Array();
DoctorIncrease = (VeterinaryIncrease = (MechanicIncrease = (Obj.VisibilityIncrease = 1)));
for (mb in Obj.Members) {
MemArray.push(Obj.Members[mb]);
}
MemArray.sortOn("WalkSpeed", 18);
AvPlaces = 0;
for (trn in Obj.Transport) {
if (Transports[Obj.Transport[trn].Type].Class == 3) {
AvPlaces = AvPlaces + Transports[Obj.Transport[trn].Type].Places;
}
}
sm = 0;
while (sm < MemArray.length) {
if (sm < AvPlaces) {
MemArray[sm].InCar = true;
} else {
MemArray[sm].InCar = false;
}
sm++;
}
for (pp in Obj.Members) {
if ((!Obj.Members[pp].InCar) and (Obj.Members[pp].WalkSpeed < Obj.Speed)) {
Obj.Speed = Obj.Members[pp].WalkSpeed;
}
Obj.Noticeability = Obj.Noticeability + Obj.Members[pp].Noticeability;
Obj.MaxCargo = Obj.MaxCargo + Obj.Members[pp].Capacity;
DocArr.push(Obj.Members[pp].Doctor);
MechArr.push(Obj.Members[pp].Mechanic);
VetArr.push(Obj.Members[pp].Veterinary);
}
DocArr.sort(18);
MechArr.sort(18);
VetArr.sort(18);
cnt = 0;
while (cnt < DocArr.length) {
Obj.Doctor = Obj.Doctor + (DocArr[cnt] / (cnt + 1));
cnt++;
}
cnt = 0;
while (cnt < MechArr.length) {
Obj.Mechanic = Obj.Mechanic + (MechArr[cnt] / (cnt + 1));
cnt++;
}
cnt = 0;
while (cnt < VetArr.length) {
Obj.Veterinary = Obj.Veterinary + (VetArr[cnt] / (cnt + 1));
cnt++;
}
for (inv in Obj.Inventory) {
if (Items[Obj.Inventory[inv].Type].Class == 10) {
switch (Items[Obj.Inventory[inv].Type].IncreaseWhat) {
case 1 :
if (DoctorIncrease < Items[Obj.Inventory[inv].Type].IncreaseHow) {
DoctorIncrease = Items[Obj.Inventory[inv].Type].IncreaseHow;
}
break;
case 2 :
if (VeterinaryIncrease < Items[Obj.Inventory[inv].Type].IncreaseHow) {
VeterinaryIncrease = Items[Obj.Inventory[inv].Type].IncreaseHow;
}
break;
case 3 :
if (MechanicIncrease < Items[Obj.Inventory[inv].Type].IncreaseHow) {
MechanicIncrease = Items[Obj.Inventory[inv].Type].IncreaseHow;
}
break;
case 4 :
if (Obj.VisibilityIncrease >= Items[Obj.Inventory[inv].Type].IncreaseHow) {
break;
}
Obj.VisibilityIncrease = Items[Obj.Inventory[inv].Type].IncreaseHow;
}
}
}
Obj.Doctor = Math.round(Obj.Doctor * DoctorIncrease);
Obj.Veterinary = Math.round(Obj.Veterinary * VeterinaryIncrease);
Obj.Mechanic = Math.round(Obj.Mechanic * MechanicIncrease);
for (pt in Obj.Transport) {
if (Transports[Obj.Transport[pt].Type].Class == 1) {
Obj.ForageUse = Obj.ForageUse + Transports[Obj.Transport[pt].Type].ForageUse;
Obj.Drink = Obj.Drink + Transports[Obj.Transport[pt].Type].WaterUse;
if (Obj.Transport[pt].Attached instanceof Object) {
TotCap = Math.round((Obj.Transport[pt].Capacity * Obj.Transport[pt].Attached.CapacityIncrease) - Transports[Obj.Transport[pt].Attached.Type].Weight);
if (TotCap > Obj.Transport[pt].Attached.MaxCapacity) {
TotCap = Obj.Transport[pt].Attached.MaxCapacity;
}
if (TotCap < 0) {
TotCap = 0;
}
Obj.MaxCargo = Obj.MaxCargo + TotCap;
} else {
Obj.MaxCargo = Obj.MaxCargo + Obj.Transport[pt].Capacity;
}
Obj.Animals++;
}
if (Transports[Obj.Transport[pt].Type].Class == 2) {
Obj.Carts++;
}
if (Transports[Obj.Transport[pt].Type].Class == 3) {
Obj.Cars++;
Obj.FuelUse = Obj.FuelUse + Transports[Obj.Transport[pt].Type].FuelUse;
Obj.MaxCargo = Obj.MaxCargo + Transports[Obj.Transport[pt].Type].Capacity;
}
if (Transports[Obj.Transport[pt].Type].Speed < Obj.Speed) {
Obj.Speed = Transports[Obj.Transport[pt].Type].Speed;
}
Obj.Noticeability = Obj.Noticeability + Transports[Obj.Transport[pt].Type].Noticeability;
}
Obj.Noticeability = Math.round(Math.sqrt(Obj.Noticeability) * 8);
if (Obj.Noticeability > 200) {
Obj.Noticeability = 200;
}
if (Obj.Type == 5) {
Obj.Speed = 15;
}
Obj.MapSpeed = Obj.Speed / 10;
Obj.FreeCargo = Obj.MaxCargo - Obj.CargoWeight;
var _local2;
BestSniper = (BestDoctor = (BestVeterinary = (BestMechanic = (BestKills = (BestExperience = 0)))));
BestSniperMmb = (BestDoctorMmb = (BestVeterinaryMmb = (BestMechanicMmb = (BestKillsMmb = (BestExperienceMmb = undefined)))));
SniperToSecond = (DoctorToSecond = (VeterinaryToSecond = (MechanicToSecond = (KillsToSecond = (ExperienceToSecond = 0)))));
for (_local2 in Obj.Members) {
if (Obj.Members[_local2].Sniper > BestSniper) {
SniperToSecond = Obj.Members[_local2].Sniper - BestSniper;
BestSniper = Obj.Members[_local2].Sniper;
BestSniperMmb = _local2;
}
if (Obj.Members[_local2].Doctor > BestDoctor) {
DoctorToSecond = Obj.Members[_local2].Doctor - BestDoctor;
BestDoctor = Obj.Members[_local2].Doctor;
BestDoctorMmb = _local2;
}
if (Obj.Members[_local2].Veterinary > BestVeterinary) {
VeterinaryToSecond = Obj.Members[_local2].Veterinary - BestVeterinary;
BestVeterinary = Obj.Members[_local2].Veterinary;
BestVeterinaryMmb = _local2;
}
if (Obj.Members[_local2].Mechanic > BestMechanic) {
MechanicToSecond = Obj.Members[_local2].Mechanic - BestMechanic;
BestMechanic = Obj.Members[_local2].Mechanic;
BestMechanicMmb = _local2;
}
if (Obj.Members[_local2].Kills > BestKills) {
KillsToSecond = Obj.Members[_local2].Kills - BestKills;
BestKills = Obj.Members[_local2].Kills;
BestKillsMmb = _local2;
}
TotalExperience = ((((Obj.SniperExperience + Obj.DoctorExpeience) + Obj.VeterineryExperience) + Obj.MechanicExperience) + Obj.APExperience) + Obj.StrengthExperience;
if (TotalExperience > BestExperience) {
ExperienceToSecond = TotalExperience - BestExperience;
BestExperience = TotalExperience;
BestExperienceMmb = _local2;
}
}
for (_local2 in Obj.Members) {
Obj.Members[_local2].BestIn = 0;
Obj.Members[_local2].ToSecond = 0;
}
if (Obj.Members[BestExperienceMmb].ToSecond <= ExperienceToSecond) {
Obj.Members[BestExperienceMmb].BestIn = 6;
Obj.Members[BestExperienceMmb].ToSecond = ExperienceToSecond;
}
if (Obj.Members[BestKillsMmb].ToSecond <= KillsToSecond) {
Obj.Members[BestKillsMmb].BestIn = 5;
Obj.Members[BestKillsMmb].ToSecond = KillsToSecond;
}
if (Obj.Members[BestMechanicMmb].ToSecond <= MechanicToSecond) {
Obj.Members[BestMechanicMmb].BestIn = 4;
Obj.Members[BestMechanicMmb].ToSecond = MechanicToSecond;
}
if (Obj.Members[BestVeterinaryMmb].ToSecond <= VeterinaryToSecond) {
Obj.Members[BestVeterinaryMmb].BestIn = 3;
Obj.Members[BestVeterinaryMmb].ToSecond = VeterinaryToSecond;
}
if (Obj.Members[BestDoctorMmb].ToSecond <= DoctorToSecond) {
Obj.Members[BestDoctorMmb].BestIn = 2;
Obj.Members[BestDoctorMmb].ToSecond = DoctorToSecond;
}
if (Obj.Members[BestSniperMmb].ToSecond <= SniperToSecond) {
Obj.Members[BestSniperMmb].BestIn = 1;
Obj.Members[BestSniperMmb].ToSecond = SniperToSecond;
}
}
function UpdateGroupCargo(Ob) {
Ob.CargoWeight = 0;
Ob.Food = (Ob.Forage = (Ob.Meds = (Ob.Fuel = 0)));
for (gc in Ob.Cargo) {
if (Ob.Cargo[gc].Type == 1) {
Ob.Cargo[gc].Amount = NumberFormat(Ob.Cargo[gc].Amount, 2);
Ob.Food = Ob.Cargo[gc].Amount;
}
if (Ob.Cargo[gc].Type == 2) {
Ob.Cargo[gc].Amount = NumberFormat(Ob.Cargo[gc].Amount, 2);
Ob.Forage = Ob.Cargo[gc].Amount;
}
if (Ob.Cargo[gc].Type == 3) {
Ob.Cargo[gc].Amount = NumberFormat(Ob.Cargo[gc].Amount, 3);
Ob.Meds = Ob.Cargo[gc].Amount;
}
if (Ob.Cargo[gc].Type == 9) {
Ob.Cargo[gc].Amount = NumberFormat(Ob.Cargo[gc].Amount, 3);
Ob.Fuel = Ob.Cargo[gc].Amount;
}
Ob.CargoWeight = Ob.CargoWeight + (Ob.Cargo[gc].Amount * Goods[Ob.Cargo[gc].Type].WeightPerUnit);
}
Ob.MaxFuel = (Ob.MaxWater = 0);
for (gc in Ob.Inventory) {
if (Items[Ob.Inventory[gc].Type].Class == 7) {
Ob.MaxWater = Ob.MaxWater + (Items[Ob.Inventory[gc].Type].Capacity * Ob.Inventory[gc].Amount);
}
if (Items[Ob.Inventory[gc].Type].Class == 8) {
Ob.MaxFuel = Ob.MaxFuel + (Items[Ob.Inventory[gc].Type].Capacity * Ob.Inventory[gc].Amount);
}
Ob.CargoWeight = Ob.CargoWeight + (Ob.Inventory[gc].Amount * Items[Ob.Inventory[gc].Type].Weight);
}
for (tr in Ob.Transport) {
if (Transports[Ob.Transport[tr].Type].Class == 3) {
Ob.MaxFuel = Ob.MaxFuel + Transports[Ob.Transport[tr].Type].FuelTank;
}
}
Ob.Water = NumberFormat(Ob.Water, 2);
Ob.CargoWeight = Ob.CargoWeight + Group.Water;
Ob.CargoWeight = NumberFormat(Ob.CargoWeight, 3);
Ob.FreeCargo = Ob.MaxCargo - Ob.CargoWeight;
}
function AddCargo(Ob, Type, Amount) {
CargoExists = false;
for (crg in Ob.Cargo) {
if (Ob.Cargo[crg].Type == Type) {
Ob.Cargo[crg].Amount = Ob.Cargo[crg].Amount + Amount;
CargoExists = true;
break;
}
}
if (!CargoExists) {
Ob.Cargo.push({Type:Type, Amount:Amount});
}
}
function FindItem(What) {
var _local1 = Number.NaN;
for (si in Group.Inventory) {
if (Group.Inventory[si].Type == What.Type) {
_local1 = si;
break;
}
}
return(_local1);
}
function Dismiss(Who) {
for (mmbr in Group.Members) {
if (Group.Members[mmbr] == Who) {
if (!Who.Special) {
Towns[Group.InTown].Citizens.push(Group.Members[mmbr]);
}
for (hld in Group.Members[mmbr].Holding) {
Itm = FindItem(Group.Members[mmbr].Holding[hld]);
if (!isNaN(Itm)) {
Group.Inventory[Itm].InUse = Group.Inventory[Itm].InUse - Group.Members[mmbr].Holding[hld].Amount;
}
Group.Members[mmbr].Holding[hld] = 0;
}
UpdateCarrying(Group.Members[mmbr]);
Group.Members[mmbr].Salary = Math.round(Group.Members[mmbr].Salary * 1.2);
Group.Members.splice(mmbr, 1);
break;
}
}
SWindow.List2.TheList = SWindow.BattleItemsList();
SWindow.List2.SelectItem(Number.NaN);
UpdateGroupParams(Group);
UpdateGroupCargo(Group);
}
function RemoveDismissed() {
for (mmbr in Group.Members) {
if (Group.Members[mmbr].Status == 2) {
if (!Group.Members[mmbr].Special) {
Towns[Group.InTown].Citizens.push(Group.Members[mmbr]);
}
for (hld in Group.Members[mmbr].Holding) {
Itm = FindItem(Group.Members[mmbr].Holding[hld]);
if (!isNaN(Itm)) {
Group.Inventory[Itm].InUse = Group.Inventory[Itm].InUse - Group.Members[mmbr].Holding[hld].Amount;
}
Group.Members[mmbr].Holding[hld] = 0;
}
UpdateCarrying(Group.Members[mmbr]);
Group.Members[mmbr].Salary = Math.round(Group.Members[mmbr].Salary * 1.2);
Group.Members.splice(mmbr, 1);
}
}
UpdateGroupParams(Group);
UpdateGroupCargo(Group);
}
function RemoveItemsInUse(Obj, ItemType, Amount) {
RItems = new Array();
for (sm in Obj.Members) {
for (sri in Obj.Members[sm].Holding) {
if (Obj.Members[sm].Holding[sri].Type == ItemType) {
RItems.push({Member:Obj.Members[sm], HP:sri, Amount:Obj.Members[sm].Holding[sri].Amount});
}
}
}
RItems.sortOn("Amount");
MaxAmount = RItems[0].Amount - 1;
RemovedAmount = 0;
while (RemovedAmount < Amount) {
ri = 0;
while (ri < RItems.length) {
ToRemove = RItems[ri].Member.Holding[RItems[ri].HP].Amount - MaxAmount;
if (ToRemove > 0) {
RItems[ri].Member.Holding[RItems[ri].HP].Amount = RItems[ri].Member.Holding[RItems[ri].HP].Amount - ToRemove;
UpdateCarrying(RItems[ri].Member);
RemovedAmount = RemovedAmount + ToRemove;
if (RemovedAmount >= Amount) {
break;
}
}
ri++;
}
MaxAmount--;
}
for (ri in RItems) {
if (RItems[ri].Member.Holding[RItems[ri].HP].Amount <= 0) {
RItems[ri].Member.Holding[RItems[ri].HP] = 0;
}
}
for (ri in Obj.Inventory) {
if (Obj.Inventory[ri].Type == ItemType) {
Obj.Inventory[ri].InUse = Obj.Inventory[ri].InUse - Amount;
break;
}
}
}
function UpdateTradeText() {
BMenu.MoneyText = "Money: $" + (Math.round(Group.Money * 100) / 100);
BMenu.CargoText = (("Cargo: " + Math.round(Group.CargoWeight)) + "/") + Group.MaxCargo;
}
function ItemDescription(ItemType) {
Ret = new Array();
Ret[0] = new Object();
Ret[0].Cat = "Category:";
switch (Items[ItemType].Class) {
case 1 :
switch (Items[ItemType].DescCat) {
case 1 :
Ret[0].Val = "Pistol";
break;
case 2 :
Ret[0].Val = "Revolver";
break;
case 3 :
Ret[0].Val = "Rifle";
break;
case 4 :
Ret[0].Val = "SMG";
break;
case 5 :
Ret[0].Val = "Assault Rifle";
break;
case 6 :
Ret[0].Val = "Sniper Rifle";
break;
case 7 :
switch (Items[ItemType].SubCat) {
case 1 :
SGType = "Bolt Action";
break;
case 2 :
SGType = "Slide Action";
break;
case 3 :
SGType = "2 Barrel";
break;
case 4 :
SGType = "1 Barrel";
break;
case 5 :
SGType = "Semiautomatic";
}
Ret[0].Val = SGType + " Shotgun";
break;
case 8 :
Ret[0].Val = "Machine Gun";
break;
case 9 :
Ret[0].Val = "Rocket Launcher";
}
break;
case 2 :
Ret[0].Val = "Ammunition";
break;
case 3 :
Ret[0].Val = "Armor";
break;
case 4 :
Ret[0].Val = "Granade";
break;
case 5 :
Ret[0].Val = "Cold Weapon";
break;
case 7 :
Ret[0].Val = "Water Container";
break;
case 8 :
Ret[0].Val = "Fuel Container";
break;
case 10 :
Ret[0].Val = "Special Item";
}
Ret[1] = {Cat:"Weight:", Val:Items[ItemType].Weight + " Kg"};
if (Items[ItemType].Class == 1) {
Ret.push({Cat:"Ammo:", Val:Items[Items[ItemType].Ammo].Name});
if (Items[ItemType].DescCat == 7) {
Ret.push({Cat:"Damage:", Val:(Items[ItemType].Damage + " - ") + (Items[ItemType].Damage * 12)});
} else if (Items[ItemType].DescCat == 9) {
Ret.push({Cat:"Explosive Power:", Val:Items[ItemType].Damage});
} else {
Ret.push({Cat:"Damage:", Val:Items[ItemType].Damage});
}
Ret.push({Cat:"Accuracy:", Val:Items[ItemType].Accuracy});
Ret.push({Cat:"Eff. Range:", Val:Items[ItemType].Range + " m"});
Lst = Ret.push({Cat:"Re-Cock:"});
Lst--;
switch (Items[ItemType].ReCock) {
case 1 :
Ret[Lst].Val = "None (Single Shot)";
break;
case 2 :
Ret[Lst].Val = "Manual";
break;
case 3 :
Ret[Lst].Val = "Semiautomatic";
break;
case 4 :
Ret[Lst].Val = "Automatic";
}
Ret.push({Cat:"Capacity:", Val:Items[ItemType].Capacity});
}
if (Items[ItemType].Class == 3) {
Ret.push({Cat:"Protection:", Val:Items[ItemType].Protection});
}
if (Items[ItemType].Class == 4) {
Ret.push({Cat:"Explosive Power:", Val:Items[ItemType].Damage});
}
if (Items[ItemType].Class == 5) {
Ret.push({Cat:"Damage:", Val:Items[ItemType].Damage + " + Strength/10"});
}
if ((Items[ItemType].Class == 7) or (Items[ItemType].Class == 8)) {
Ret[2] = {Cat:"Volume:", Val:Items[ItemType].Capacity + " L"};
}
if (Items[ItemType].Class == 10) {
DescWords = Items[ItemType].Description.split(" ");
Line = "";
aw = 0;
while (aw < DescWords.length) {
Line = Line + (DescWords[aw] + " ");
if ((Line.length + DescWords[aw + 1].length) > 20) {
Ret.push({Cat:"", Val:Line});
Line = "";
}
aw++;
}
Ret.push({Cat:"", Val:Line});
Ret[2].Cat = "Description:";
}
return(Ret);
}
function TransportDescription(Trans) {
Ret = new Array();
Ret[0] = {Cat:"Category:"};
switch (Transports[Trans.Type].Class) {
case 1 :
Ret[0].Val = "Animal";
Ret.push({Cat:"Capacity:", Val:Trans.Capacity + " Kg"});
Ret.push({Cat:"Speed:", Val:Trans.Speed + " Kmh"});
Ret.push({Cat:"Forage Consumption:", Val:(Transports[Trans.Type].ForageUse * 3) + " Kg/day"});
Ret.push({Cat:"Water Consumption:", Val:(Transports[Trans.Type].WaterUse * 24) + " L/day"});
if (Transports[Trans.Type].CanHaveCart) {
YN = "Yes";
} else {
YN = "No";
}
Ret.push({Cat:"Can Draw Carts:", Val:YN});
break;
case 2 :
Ret[0].Val = "Cart";
Ret.push({Cat:"Capacity Increasement:", Val:"x" + Trans.CapacityIncrease});
Ret.push({Cat:"Weight:", Val:Transports[Trans.Type].Weight + " Kg"});
Ret.push({Cat:"Max. Capacity:", Val:Trans.MaxCapacity + " Kg"});
break;
case 3 :
Ret[0].Val = "Car";
Ret.push({Cat:"Capacity:", Val:Trans.Capacity + " Kg"});
Ret.push({Cat:"Speed:", Val:Trans.Speed + " Kmh"});
Ret.push({Cat:"Fuel Consumption:", Val:Trans.FuelUse + " L/100Km"});
Ret.push({Cat:"Fuel Tank:", Val:Transports[Trans.Type].FuelTank + " L"});
if (Transports[Trans.Type].Places == 1) {
PlText = "Driver Only";
} else {
PlText = String(Transports[Trans.Type].Places - 1) + " + Driver";
}
Ret.push({Cat:"Places:", Val:PlText});
}
return(Ret);
}
function UpdateTransportParams(Trans) {
if (Trans.HP < 0) {
for (st in Trans.Group.Transport) {
if (Trans.Group.Transport[st] == Trans) {
Trans.Group.Transport.splice(st, 1);
Messages.push({Type:4, Trans:Trans.Type});
UpdateGroupParams(Trans.Group);
}
}
} else {
CriticalPoint = Trans.MaxHP / 2;
if ((Transports[Trans.Type].Class == 1) or (Transports[Trans.Type].Class == 3)) {
if (Trans.HP < CriticalPoint) {
BelowCritical = Trans.HP / CriticalPoint;
Trans.Speed = Math.ceil(Transports[Trans.Type].Speed * BelowCritical);
Trans.Capacity = Math.ceil(Transports[Trans.Type].Capacity * BelowCritical);
if (Transports[Trans.Type].Class == 3) {
Trans.FuelUse = Math.round(Transports[Trans.Type].FuelUse + (Transports[Trans.Type].FuelUse * (1 - BelowCritical)));
}
} else {
Trans.Speed = Transports[Trans.Type].Speed;
Trans.Capacity = Transports[Trans.Type].Capacity;
if (Transports[Trans.Type].Class == 3) {
Trans.FuelUse = Transports[Trans.Type].FuelUse;
}
}
}
if (Transports[Trans.Type].Class == 2) {
if (Trans.HP < CriticalPoint) {
BelowCritical = Trans.HP / CriticalPoint;
Trans.CapacityIncrease = NumberFormat((Transports[Trans.Type].CapacityIncrease - 1) + BelowCritical, 2);
Trans.MaxCapacity = Math.round(Transports[Trans.Type].MaxCapacity * BelowCritical);
} else {
Trans.CapacityIncrease = Transports[Trans.Type].CapacityIncrease;
Trans.MaxCapacity = Transports[Trans.Type].MaxCapacity;
}
}
}
}
function DistributeCarts(Gr) {
FreeCarts = new Array();
FreeAnimals = new Array();
for (at in Gr.Transport) {
if (((Transports[Gr.Transport[at].Type].Class == 1) and Transports[Gr.Transport[at].Type].CanHaveCart) and (!(Gr.Transport[at].Attached instanceof Object))) {
FreeAnimals.push(Gr.Transport[at]);
}
if ((Transports[Gr.Transport[at].Type].Class == 2) and (!(Gr.Transport[at].Attached instanceof Object))) {
FreeCarts.push(Gr.Transport[at]);
}
}
FreeAnimals.sortOn("Capacity", 18);
FreeCarts.sortOn("CapacityIncrease", 18);
Last = Math.min(FreeAnimals.length, FreeCarts.length);
ds = 0;
while (ds < Last) {
FreeAnimals[ds].Attached = FreeCarts[ds];
FreeCarts[ds].Attached = FreeAnimals[ds];
ds++;
}
UpdateGroupParams(Gr);
if (Mode == 3) {
UpdateTradeText();
}
}
function ExitTown() {
HasProblems = false;
DistributeCarts(Group);
TMenu.MB.TitleText = "";
TMenu.InTheBase = false;
if (NumberFormat(Group.CargoWeight, 2) > NumberFormat(Group.MaxCargo, 2)) {
HasProblems = true;
TMenu.MB.MessageText = ((("You have an overweight of " + NumberFormat(Group.CargoWeight - Group.MaxCargo, 3)) + " Kg. and can not leave the town.") + "\r") + "Buy transport, hire people, redistribute carts, heal people and animals, repair carts and cars or get rid of some goods or items.";
}
AllAttached = true;
OverCarts = 0;
for (ct in Group.Transport) {
if ((Transports[Group.Transport[ct].Type].Class == 2) and (!(Group.Transport[ct].Attached instanceof Object))) {
AllAttached = false;
OverCarts++;
}
}
if (!AllAttached) {
HasProblems = true;
if (OverCarts) {
Txt1 = "cart";
Txt2 = "animal";
} else {
Txt1 = "carts";
Txt2 = "animals";
}
TMenu.MB.MessageText = ((((((("You don't have enough animals to draw all your carts.\rBuy " + OverCarts) + " ") + Txt2) + " that can draw carts or get rid of ") + OverCarts) + " ") + Txt1) + " before leaving the town";
}
if ((Group.FuelUse > 0) and (Group.Fuel == 0)) {
HasProblems = true;
if (Group.Cars == 1) {
Txt1 = "car";
} else {
Txt1 = "cars";
}
TMenu.MB.MessageText = ((((("You have " + Group.Cars) + " ") + Txt1) + " and no fuel.") + "\r") + "Buy fuel or get rid of all your cars before leaving the town";
}
if (Group.Members.length < Group.Cars) {
HasProblems = true;
if ((Group.Cars - Group.Members.length) == 1) {
Txt1 = "man";
Txt2 = "car";
} else {
Txt1 = "men";
Txt2 = "cars";
}
TMenu.MB.MessageText = ((((((("You don't have enough men to drive all your cars.\rHire " + (Group.Cars - Group.Members.length)) + " ") + Txt1) + " or get rid of ") + (Group.Cars - Group.Members.length)) + " ") + Txt2) + " before leaving the town";
}
if (HasProblems) {
AllButtons(TMenu, false);
TMenu.MB._visible = true;
TMenu.MB.MBButtons.gotoAndStop(3);
BMenu.gotoAndStop(7);
} else {
SwitchMode(1);
if (((GameMode == 1) and (Group.InTown == 4)) and (TMenu.SDInProgress or TMenu.SDInitiating)) {
TMenu.SDText = "";
TMenu.SpecialAction(10);
TMenu.SDInProgress = false;
TMenu.SDInitiating = false;
Story.PowerOff = true;
}
}
}
function ReverseXY(Arr) {
TA = new Array();
ya = 0;
while (ya < Arr[Arr.length - 1].length) {
TA[ya] = new Array();
ya++;
}
xa = 0;
while (xa < Arr.length) {
ya = 0;
while (ya <= Arr[xa].length) {
TA[ya][xa] = Arr[xa][ya];
ya++;
}
xa++;
}
return(TA);
}
function NumberFormat(Num, AfterComa) {
Div = Math.pow(10, AfterComa);
Rt = Math.round(Num * Div) / Div;
return(Rt);
}
function NextRandomSeed() {
CurrentRS++;
if (isNaN(CurrentRS) or (CurrentRS >= RandomSeed.length)) {
CurrentRS = 0;
}
return(RandomSeed[CurrentRS]);
}
function EnterCurrTown() {
Group._x = (Group.x = eval ("Map.Town" + Group.InTown)._x);
Group._y = (Group.y = eval ("Map.Town" + Group.InTown)._y);
Group.Move = false;
if ((((GameMode == 1) and (Group.InTown == 14)) and Story.RBaseDestroyed) and (!Story.RemovedDPCrew)) {
RemoveDPCrew();
}
if (((GameMode == 1) and (Group.InTown == 14)) and Story.HaveSniper) {
for (mn in Group.Members) {
if (Group.Members[mn] == People[63]) {
Group.Members[mn].Status = 2;
break;
}
}
rpx = 0;
while (rpx < Militia.length) {
rpy = 0;
while (rpy < Militia[rpx].length) {
Militia[rpx][rpy] = 0;
rpy++;
}
rpx++;
}
amx = 0;
while (amx <= 3) {
amy = 4;
while (amy <= 8) {
Police[amx][amy] = Math.round(amy / 2);
amy++;
}
amx++;
}
DefaultStages[9] = 47;
News.unshift({Type:6, Time:FormatedTime(), Title:"JOHN SHEPPARD IS KILLED", Text:"John Sheppard, the leader of the famous Desert Patrol has been killed by a precise shot of a professional sniper. Police has started investigation. Oswald Raff has expressed his condolences over John Sheppard's death and promised the people of Verdammter Platz and Diep Gat to strengthen police control in their area."});
Towns[14].Houses[7].Revealed = false;
Story.HaveSniper = false;
Succeed.gotoAndStop(2);
SwitchMode(8);
}
RemoveDismissed();
if (Mode != 8) {
SwitchMode(3);
}
TMenu.gotoAndStop(2);
}
function InitiateBattle() {
BW.StructuresSample._visible = false;
BW.BunkerMask._visible = false;
if ((RivalGroup.Type == 3) or (RivalGroup.Type == 7)) {
if (PoliceStatus != -1) {
News.unshift({Type:6, Title:People[0].Name.toUpperCase() + " VS. GOVERNMENT", Text:((People[0].Name + "'s caravan has attacked and destroyed a police unit. This certainly means war between ") + People[0].Name) + " and the government"});
}
PoliceStatus = -1;
DefaultStages[9] = 50;
}
if ((RivalGroup.Type == 4) or (RivalGroup.Type == 6)) {
if (MilitiaStatus != -1) {
News.unshift({Type:6, Title:People[0].Name.toUpperCase() + " VS. DESERT PATROL", Text:(("A Desert Patrol unit has been attacked and destroyed by " + People[0]) + "'s caravan. Desert Patrol declares war to ") + People[0].Name});
}
DefaultStages[2] = 28;
MilitiaStatus = -1;
}
if (RivalGroup.Type == 2) {
if (RivalGroup.Route == 6) {
News.unshift({Type:6, Title:"CARAVAN X DESTROYED!", Text:((("The famous Caravan X has been destroyed by " + People[0].Name) + "'s squad. Caravan X was protected by government, which means that ") + People[0].Name) + " has oficcially become one of the worst enemies of the state."});
PoliceStatus = -1;
Story.CaravanXDestroyed = true;
DefaultStages[9] = 50;
} else {
if (MilitiaStatus != -1) {
News.unshift({Type:6, Title:People[0].Name.toUpperCase() + " BECOMES A CRIMINAL", Text:((((People[0].Name + "'s squad has attacked and destroyed a caravan, which converts ") + People[0].Name) + " and his people into criminals. Desert Patrol has promised to find and arrest or kill ") + People[0].Name) + " in the shortest time possible"});
}
MilitiaStatus = -1;
DefaultStages[2] = 28;
}
RivalGroup.Water = RivalGroup.Water - Math.round((RivalGroup.InTheWay * RivalGroup.Drink) / 54);
for (sf in RivalGroup.Cargo) {
if (RivalGroup.Cargo[sf].Type == 9) {
HundredsKm = RivalGroup.CoveredDist / 500;
RivalGroup.Cargo[sf].Amount = RivalGroup.Cargo[sf].Amount - Math.round(RivalGroup.FuelUse * HundredsKm);
if (RivalGroup.Cargo[sf].Amount <= 0) {
RivalGroup.splice(sf, 1);
RivalGroup.Fuel = 0;
} else {
RivalGroup.Fuel = RivalGroup.Cargo[sf].Amount;
}
break;
}
}
for (sf in RivalGroup.Cargo) {
if (RivalGroup.Cargo[sf].Type == 1) {
RivalGroup.Cargo[sf].Amount = RivalGroup.Cargo[sf].Amount - Math.round((RivalGroup.Eat * RivalGroup.InTheWay) / 432);
if (RivalGroup.Cargo[sf].Amount <= 0) {
RivalGroup.splice(sf, 1);
}
break;
}
}
for (sf in RivalGroup.Cargo) {
if (RivalGroup.Cargo[sf].Type == 2) {
RivalGroup.Cargo[sf].Amount = RivalGroup.Cargo[sf].Amount - Math.round((RivalGroup.ForageUse * RivalGroup.InTheWay) / 432);
if (RivalGroup.Cargo[sf].Amount <= 0) {
RivalGroup.splice(sf, 1);
}
break;
}
}
}
MDown = false;
if (BattleLocation == 0) {
BFWidth = 30;
BFHeight = 30;
}
if (BattleLocation == 1) {
BFWidth = 36;
BFHeight = 36;
LoopsCount = 0;
}
BattleField = new Array();
rs = 1;
while (rs <= BFWidth) {
BattleField[rs] = new Array();
rs++;
}
if (BattleLocation == 1) {
BW.StructuresSample._visible = true;
BW.StructuresSample.gotoAndStop(1);
BunkerX = 14;
BunkerY = 14;
BW.BunkerMask._x = (BW.StructuresSample._x = BunkerX * 40);
BW.BunkerMask._y = (BW.StructuresSample._y = BunkerY * 40);
fh = 2;
while (fh <= 9) {
BattleField[BunkerX + fh][BunkerY] = 4000;
BattleField[BunkerX + fh][BunkerY + 9] = 4000;
fh++;
}
fv = 0;
while (fv <= 9) {
BattleField[BunkerX + 2][BunkerY + fv] = 4000;
BattleField[BunkerX + 9][BunkerY + fv] = 4000;
fv++;
}
}
BW.BGI.BGSample._visible = false;
UnP = 1;
while (true) {
if (!(BW.BGI["BG" + UnP] instanceof MovieClip)) {
break;
}
BW.BGI["BG" + UnP].removeMovieClip();
UnP++;
}
LastBG = 0;
fx = 1;
while (fx <= BFWidth) {
fy = 1;
while (fy <= BFHeight) {
if (isNaN(BattleField[fx][fy]) and (random(50) == 0)) {
LastBG++;
duplicateMovieClip (BW.BGI.BGSample, "BG" + LastBG, BW.BGI.getNextHighestDepth());
BW.BGI["BG" + LastBG]._visible = true;
BW.BGI["BG" + LastBG]._x = ((fx * 40) + 10) + random(20);
BW.BGI["BG" + LastBG]._y = ((fy * 40) + 10) + random(20);
BW.BGI["BG" + LastBG].gotoAndStop(1 + random(16));
}
fy++;
}
fx++;
}
ForceThrow = false;
if (BattleLocation == 0) {
GroupDir = CaravanBattleDirection(Group.Direction);
RivalDir = CaravanBattleDirection(RivalGroup.Direction);
if (((GroupDir == 1) or (GroupDir == 3)) and (Group.x < RivalGroup.x)) {
GroupSP = {x:1, y:Math.round(BFHeight / 2)};
}
if (((GroupDir == 1) or (GroupDir == 3)) and (Group.x >= RivalGroup.x)) {
GroupSP = {x:BFWidth, y:Math.round(BFHeight / 2)};
}
if (((GroupDir == 2) or (GroupDir == 4)) and (Group.y < RivalGroup.y)) {
GroupSP = {x:Math.round(BFWidth / 2), y:1};
}
if (((GroupDir == 2) or (GroupDir == 4)) and (Group.y >= RivalGroup.y)) {
GroupSP = {x:Math.round(BFWidth / 2), y:BFHeight};
}
if (((RivalDir == 1) or (RivalDir == 3)) and (RivalGroup.x <= Group.x)) {
RivalSP = {x:1, y:Math.round(BFHeight / 2)};
}
if (((RivalDir == 1) or (RivalDir == 3)) and (RivalGroup.x > Group.x)) {
RivalSP = {x:BFWidth, y:Math.round(BFHeight / 2)};
}
if (((RivalDir == 2) or (RivalDir == 4)) and (RivalGroup.y <= Group.y)) {
RivalSP = {x:Math.round(BFWidth / 2), y:1};
}
if (((RivalDir == 2) or (RivalDir == 4)) and (RivalGroup.y > Group.y)) {
RivalSP = {x:Math.round(BFWidth / 2), y:BFHeight};
}
}
if (BattleLocation == 1) {
GroupDir = CaravanBattleDirection(Group.Direction);
if (((GroupDir == 1) or (GroupDir == 3)) and (Group.x < Map.RBase._x)) {
GroupSP = {x:1, y:Math.round(BFHeight / 2)};
}
if (((GroupDir == 1) or (GroupDir == 3)) and (Group.x >= Map.RBase._x)) {
GroupSP = {x:BFWidth, y:Math.round(BFHeight / 2)};
}
if (((GroupDir == 2) or (GroupDir == 4)) and (Group.y < Map.RBase._y)) {
GroupSP = {x:Math.round(BFWidth / 2), y:1};
}
if (((GroupDir == 2) or (GroupDir == 4)) and (Group.y >= Map.RBase._y)) {
GroupSP = {x:Math.round(BFWidth / 2), y:BFHeight};
}
}
if (GroupDir == 1) {
NextGroupTrans = {x:0, y:1};
}
if (GroupDir == 2) {
NextGroupTrans = {x:-1, y:0};
}
if (GroupDir == 3) {
NextGroupTrans = {x:0, y:-1};
}
if (GroupDir == 4) {
NextGroupTrans = {x:1, y:0};
}
if (RivalDir == 1) {
NextRivalTrans = {x:0, y:1};
}
if (RivalDir == 2) {
NextRivalTrans = {x:-1, y:0};
}
if (RivalDir == 3) {
NextRivalTrans = {x:0, y:-1};
}
if (RivalDir == 4) {
NextRivalTrans = {x:1, y:0};
}
UnP = 1;
BW.TransportSample._visible = false;
while (true) {
if (!(BW["trn" + UnP] instanceof MovieClip)) {
break;
}
BW["trn" + UnP].removeMovieClip();
UnP++;
}
LastTrn = 1;
CurrTransPoint = {x:GroupSP.x, y:GroupSP.y};
if (CurrTransPoint.x == BFWidth) {
CurrTransPoint.x = BFWidth - 1;
}
if (CurrTransPoint.x == 1) {
CurrTransPoint.x = 2;
}
if (CurrTransPoint.y == BFHeight) {
CurrTransPoint.y = BFHeight - 1;
}
if (CurrTransPoint.y == 1) {
CurrTransPoint.y = 2;
}
for (tr in Group.Transport) {
if ((Transports[Group.Transport[tr].Type] instanceof Object) and (Transports[Group.Transport[tr].Type].Class != 2)) {
if ((GroupDir == 1) or (GroupDir == 3)) {
TransYSize = Transports[Group.Transport[tr].Type].Height;
TransXSize = Transports[Group.Transport[tr].Type].Width;
} else {
TransYSize = Transports[Group.Transport[tr].Type].Width;
TransXSize = Transports[Group.Transport[tr].Type].Height;
}
PlaceTransport(Group.Transport[tr], CurrTransPoint.x, CurrTransPoint.y, LastTrn, GroupDir);
fx = Math.min(CurrTransPoint.x, CurrTransPoint.x + (NextGroupTrans.x * (TransXSize - 1)));
while (fx <= Math.max(CurrTransPoint.x, CurrTransPoint.x + (NextGroupTrans.x * (TransXSize - 1)))) {
fy = Math.min(CurrTransPoint.y, CurrTransPoint.y + (NextGroupTrans.y * (TransYSize - 1)));
while (fy <= Math.max(CurrTransPoint.y, CurrTransPoint.y + (NextGroupTrans.y * (TransYSize - 1)))) {
BattleField[fx][fy] = 2000 + Number(tr);
fy++;
}
fx++;
}
if ((Group.Transport[tr].Attached instanceof Object) and (Group.Transport[tr].Attached.Type > 0)) {
CurrTransPoint.x = CurrTransPoint.x + (TransXSize * NextGroupTrans.x);
CurrTransPoint.y = CurrTransPoint.y + (TransYSize * NextGroupTrans.y);
LastTrn++;
if ((GroupDir == 1) or (GroupDir == 3)) {
TransXSize = Transports[Group.Transport[tr].Attached.Type].Height;
TransYSize = Transports[Group.Transport[tr].Attached.Type].Width;
} else {
TransXSize = Transports[Group.Transport[tr].Attached.Type].Width;
TransYSize = Transports[Group.Transport[tr].Attached.Type].Height;
}
PlaceTransport(Group.Transport[tr].Attached, CurrTransPoint.x, CurrTransPoint.y, LastTrn, GroupDir);
TheIndex = Number.NaN;
for (fi in Group.Transport) {
if (Group.Transport[fi] == Group.Transport[tr].Attached) {
TheIndex = fi;
break;
}
}
fx = Math.min(CurrTransPoint.x, CurrTransPoint.x + (NextGroupTrans.x * (TransXSize - 1)));
while (fx <= Math.max(CurrTransPoint.x, CurrTransPoint.x + (NextGroupTrans.x * (TransXSize - 1)))) {
fy = Math.min(CurrTransPoint.y, CurrTransPoint.y + (NextGroupTrans.y * (TransYSize - 1)));
while (fy <= Math.max(CurrTransPoint.y, CurrTransPoint.y + (NextGroupTrans.y * (TransYSize - 1)))) {
BattleField[fx][fy] = 2000 + Number(TheIndex);
fy++;
}
fx++;
}
}
CurrTransPoint.x = CurrTransPoint.x + ((TransXSize + 1) * NextGroupTrans.x);
CurrTransPoint.y = CurrTransPoint.y + ((TransYSize + 1) * NextGroupTrans.y);
if ((((CurrTransPoint.x < 1) or (CurrTransPoint.x > BFWidth)) or (CurrTransPoint.y < 1)) or (CurrTransPoint.y > BFHeight)) {
break;
}
LastTrn++;
}
}
CurrTransPoint = {x:RivalSP.x, y:RivalSP.y};
if (CurrTransPoint.x == BFWidth) {
CurrTransPoint.x = BFWidth - 1;
}
if (CurrTransPoint.x == 1) {
CurrTransPoint.x = 2;
}
if (CurrTransPoint.y == BFHeight) {
CurrTransPoint.y = BFHeight - 1;
}
if (CurrTransPoint.y == 1) {
CurrTransPoint.y = 2;
}
for (tr in RivalGroup.Transport) {
if ((Transports[RivalGroup.Transport[tr].Type] instanceof Object) and (Transports[RivalGroup.Transport[tr].Type].Class != 2)) {
if ((RivalDir == 1) or (RivalDir == 3)) {
TransYSize = Transports[RivalGroup.Transport[tr].Type].Height;
TransXSize = Transports[RivalGroup.Transport[tr].Type].Width;
} else {
TransYSize = Transports[RivalGroup.Transport[tr].Type].Width;
TransXSize = Transports[RivalGroup.Transport[tr].Type].Height;
}
PlaceTransport(RivalGroup.Transport[tr], CurrTransPoint.x, CurrTransPoint.y, LastTrn, RivalDir);
fx = Math.min(CurrTransPoint.x, CurrTransPoint.x + (NextRivalTrans.x * (TransXSize - 1)));
while (fx <= Math.max(CurrTransPoint.x, CurrTransPoint.x + (NextRivalTrans.x * (TransXSize - 1)))) {
fy = Math.min(CurrTransPoint.y, CurrTransPoint.y + (NextRivalTrans.y * (TransYSize - 1)));
while (fy <= Math.max(CurrTransPoint.y, CurrTransPoint.y + (NextRivalTrans.y * (TransYSize - 1)))) {
BattleField[fx][fy] = 3000 + Number(tr);
fy++;
}
fx++;
}
if ((RivalGroup.Transport[tr].Attached instanceof Object) and (RivalGroup.Transport[tr].Attached.Type > 0)) {
CurrTransPoint.x = CurrTransPoint.x + (TransXSize * NextRivalTrans.x);
CurrTransPoint.y = CurrTransPoint.y + (TransYSize * NextRivalTrans.y);
LastTrn++;
if ((RivalDir == 1) or (RivalDir == 3)) {
TransXSize = Transports[RivalGroup.Transport[tr].Attached.Type].Height;
TransYSize = Transports[RivalGroup.Transport[tr].Attached.Type].Width;
} else {
TransXSize = Transports[RivalGroup.Transport[tr].Attached.Type].Width;
TransYSize = Transports[RivalGroup.Transport[tr].Attached.Type].Height;
}
PlaceTransport(RivalGroup.Transport[tr].Attached, CurrTransPoint.x, CurrTransPoint.y, LastTrn, RivalDir);
TheIndex = Number.NaN;
for (fi in RivalGroup.Transport) {
if (RivalGroup.Transport[fi] == RivalGroup.Transport[tr].Attached) {
TheIndex = fi;
break;
}
}
fx = Math.min(CurrTransPoint.x, CurrTransPoint.x + (NextRivalTrans.x * (TransXSize - 1)));
while (fx <= Math.max(CurrTransPoint.x, CurrTransPoint.x + (NextRivalTrans.x * (TransXSize - 1)))) {
fy = Math.min(CurrTransPoint.y, CurrTransPoint.y + (NextRivalTrans.y * (TransYSize - 1)));
while (fy <= Math.max(CurrTransPoint.y, CurrTransPoint.y + (NextRivalTrans.y * (TransYSize - 1)))) {
BattleField[fx][fy] = 3000 + Number(TheIndex);
fy++;
}
fx++;
}
}
CurrTransPoint.x = CurrTransPoint.x + ((TransXSize + 1) * NextRivalTrans.x);
CurrTransPoint.y = CurrTransPoint.y + ((TransYSize + 1) * NextRivalTrans.y);
if ((((CurrTransPoint.x < 1) or (CurrTransPoint.x > BFWidth)) or (CurrTransPoint.y < 1)) or (CurrTransPoint.y > BFHeight)) {
break;
}
LastTrn++;
}
}
BW.CharacterSample._visible = false;
UnP = 1;
while (true) {
if (!(BW["sld" + UnP] instanceof MovieClip)) {
break;
}
BW["sld" + UnP].removeMovieClip();
UnP++;
}
LastSld = 1;
ActList = new Array();
as = 0;
while (as < Group.Members.length) {
duplicateMovieClip (BW.CharacterSample, "sld" + LastSld, BW.getNextHighestDepth());
Group.Members[as].BSquare = FindFreeSlot((GroupSP.x + random(20)) - 10, (GroupSP.y + random(10)) - 5);
Group.Members[as].BattleChar = BW["sld" + LastSld];
BattleField[Group.Members[as].BSquare.x][Group.Members[as].BSquare.y] = as;
BW["sld" + LastSld].Type = 1;
BW["sld" + LastSld].Index = as;
if (GroupDir == 1) {
BW["sld" + LastSld]._rotation = 0;
}
if (GroupDir == 2) {
BW["sld" + LastSld]._rotation = 90;
}
if (GroupDir == 3) {
BW["sld" + LastSld]._rotation = 180;
}
if (GroupDir == 4) {
BW["sld" + LastSld]._rotation = -90;
}
ActList.push(Group.Members[as]);
BW["sld" + LastSld].MemberInstance = Group.Members[as];
LastSld++;
as++;
}
as = 0;
while (as < RivalGroup.Members.length) {
duplicateMovieClip (BW.CharacterSample, "sld" + LastSld, BW.getNextHighestDepth());
if (BattleLocation == 0) {
RivalGroup.Members[as].BSquare = FindFreeSlot((RivalSP.x + random(20)) - 10, (RivalSP.y + random(10)) - 5);
}
if (BattleLocation == 1) {
if ((as % 2) == 0) {
RivalGroup.Members[as].BSquare = FindFreeSlot(BunkerX + 4, BunkerY + 10);
} else {
RivalGroup.Members[as].BSquare = FindFreeSlot(BunkerX + 7, BunkerY + 10);
}
}
RivalGroup.Members[as].BattleChar = BW["sld" + LastSld];
BattleField[RivalGroup.Members[as].BSquare.x][RivalGroup.Members[as].BSquare.y] = 1000 + as;
BW["sld" + LastSld].Type = 2;
BW["sld" + LastSld].Index = as;
if (RivalDir == 1) {
BW["sld" + LastSld]._rotation = 0;
}
if (RivalDir == 2) {
BW["sld" + LastSld]._rotation = 90;
}
if (RivalDir == 3) {
BW["sld" + LastSld]._rotation = 180;
}
if (RivalDir == 4) {
BW["sld" + LastSld]._rotation = -90;
}
ActList.push(RivalGroup.Members[as]);
BW["sld" + LastSld].MemberInstance = RivalGroup.Members[as];
LastSld++;
as++;
}
BW.Granade.swapDepths(BW.getNextHighestDepth());
BW.Granade._visible = false;
BW.Explosion.swapDepths(BW.getNextHighestDepth());
BW.Rocket.swapDepths(BW.getNextHighestDepth());
BW.Rocket._visible = false;
BW.Cursor.swapDepths(BW.getNextHighestDepth());
for (sl in ActList) {
ActList[sl].BattleChar.onEnterFrame = function () {
InitiateSoldier(this.MemberInstance);
this.onEnterFrame = this.SetBody;
};
InitiateSoldier(ActList[sl]);
}
ActList.sortOn("MaxAP", 18);
NowActing = 0;
ActPhase = 0;
BW._x = 245 - (Group.Members[0].BSquare.x * 40);
BW._y = 245 - (Group.Members[0].BSquare.y * 40);
}
function SetSound(Obj) {
if (FXOn) {
var _local2 = {x:Obj._x, y:Obj._y};
Obj.localToGlobal(_local2);
var _local5 = CalcDistance(_local2.x, _local2.y, 245, 245);
var _local4 = Math.round(100 - (_local5 / 50));
if (_local4 < 10) {
_local4 = 10;
}
Obj.Rif.setVolume(_local4);
var _local1 = Math.round((_local2._x - 245) / 5);
if (_local1 < -100) {
_local1 = -100;
}
if (_local1 > 100) {
_local1 = 100;
}
Obj.Rif.setPan(_local1);
} else {
Obj.Rif.setVolume(0);
}
}
function InitiateSoldier(TheSoldier) {
TheSoldier.AP = TheSoldier.MaxAP;
TheSoldier.BattleChar.SkinColor = TheSoldier.SkinColor;
TheSoldier.BattleChar.HairColor = TheSoldier.HairColor;
TheSoldier.BattleChar.ClothColor1 = TheSoldier.JacketColor;
TheSoldier.BattleChar.ClothColor2 = TheSoldier.SleevesColor;
TheSoldier.BattleChar.ClothColor3 = TheSoldier.SkirtColor;
TheSoldier.BattleChar.ShoesColor = TheSoldier.ShoesColor;
TheSoldier.BattleChar.PantsColor = TheSoldier.PantsColor;
TheSoldier.BattleChar.BodyType = TheSoldier.BodyType;
TheSoldier.BattleChar.ArmType = TheSoldier.ArmType;
TheSoldier.BattleChar.LegType = TheSoldier.LegType;
TheSoldier.BattleChar.HeadType = TheSoldier.HeadType;
TheSoldier.BattleChar.HatType = TheSoldier.HatType;
TheSoldier.BattleChar.HatColor = TheSoldier.HatColor;
TheSoldier.BattleChar.SControl = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Pis = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Pis.attachSound("PISTOL");
TheSoldier.BattleChar.Rif = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Rif.attachSound("RIFLE");
TheSoldier.BattleChar.Mac = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Mac.attachSound("MACHINEGUN");
TheSoldier.BattleChar.Roc = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Roc.attachSound("ROCKET LAUNCHER");
TheSoldier.BattleChar.Thr = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Thr.attachSound("THROW GRANADE");
TheSoldier.BattleChar.Pun = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Pun.attachSound("PUNCH");
TheSoldier.BattleChar.Swo = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Swo.attachSound("SWORD");
TheSoldier.BattleChar.Foo1 = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Foo1.attachSound("FOOTSTEP 1");
TheSoldier.BattleChar.Foo2 = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Foo2.attachSound("FOOTSTEP 2");
TheSoldier.BattleChar.Rel = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Rel.attachSound("RELOAD");
TheSoldier.BattleChar.Sho = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Sho.attachSound("SHOTGUN");
TheSoldier.BattleChar.Aut = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Aut.attachSound("AUTO RIFLE");
if (TheSoldier.BattleChar.BodyType < 5) {
TheSoldier.BattleChar.Hit = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Hit.attachSound("MAN HIT");
TheSoldier.BattleChar.Die = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Die.attachSound("MAN DIE");
} else {
TheSoldier.BattleChar.Hit = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Hit.attachSound("WOMAN HIT");
TheSoldier.BattleChar.Die = new Sound(TheSoldier.BattleChar);
TheSoldier.BattleChar.Die.attachSound("WOMAN DIE");
}
TheSoldier.BattleChar._x = (TheSoldier.BSquare.x * 40) + 20;
TheSoldier.BattleChar._y = (TheSoldier.BSquare.y * 40) + 20;
TheSoldier.BattleChar._visible = true;
TheSoldier.BattleChar.gotoAndStop(1);
TheSoldier.BattleChar.Sel._visible = false;
TheSoldier.HitInThisTurn = 0;
w = 0;
while (w <= 1) {
TheSoldier.Holding[w].Modes = new Array();
if (Items[TheSoldier.Holding[w].Type].Class == 1) {
TheSoldier.Holding[w].AmmoSlot = 99;
a = 2;
while (a <= 3) {
if (TheSoldier.Holding[a].Type == Items[TheSoldier.Holding[w].Type].Ammo) {
TheSoldier.Holding[w].AmmoSlot = a;
break;
}
a++;
}
if (TheSoldier.Holding[w].AmmoSlot == 99) {
TheSoldier.Holding[w].Load = 0;
} else {
TheSoldier.Holding[w].Load = Math.min(Items[TheSoldier.Holding[w].Type].Capacity, TheSoldier.Holding[TheSoldier.Holding[w].AmmoSlot].Amount);
}
}
if (Items[TheSoldier.Holding[w].Type].Class == 1) {
if ((Items[TheSoldier.Holding[w].Type].DescCat <= 5) or (Items[TheSoldier.Holding[w].Type].DescCat == 7)) {
TheSoldier.Holding[w].Modes.push({Type:1, AP:2});
}
if (Items[TheSoldier.Holding[w].Type].DescCat <= 6) {
TheSoldier.Holding[w].Modes.push({Type:2, AP:3});
}
if (Items[TheSoldier.Holding[w].Type].ReCock == 4) {
TheSoldier.Holding[w].Modes.push({Type:3, AP:5});
TheSoldier.Holding[w].Modes.push({Type:4, AP:7});
if (Items[TheSoldier.Holding[w].Type].DescCat == 8) {
TheSoldier.Holding[w].Modes.push({Type:5, AP:10});
}
}
if (Items[TheSoldier.Holding[w].Type].DescCat == 9) {
TheSoldier.Holding[w].Modes.push({Type:7, AP:5});
}
if (Items[TheSoldier.Holding[w].Type].ReCock == 2) {
for (md in TheSoldier.Holding[w].Modes) {
TheSoldier.Holding[w].Modes[md].AP = TheSoldier.Holding[w].Modes[md].AP + 2;
}
}
}
if (Items[TheSoldier.Holding[w].Type].Class == 4) {
TheSoldier.Holding[w].Modes.push({Type:6, AP:4});
}
if (Items[TheSoldier.Holding[w].Type].Class == 5) {
TheSoldier.Holding[w].Modes.push({Type:8, AP:4});
}
TheSoldier.Holding[w].CurrentMode = 0;
w++;
}
if (TheSoldier.Holding[4] instanceof Object) {
TheSoldier.BattleChar.ArmorOn = true;
TheSoldier.BattleChar.ArmorCol = Items[TheSoldier.Holding[4].Type].Col;
TheSoldier.Protection = Items[TheSoldier.Holding[4].Type].Protection;
} else {
TheSoldier.BattleChar.ArmorOn = false;
TheSoldier.Protection = 0;
}
TheSoldier.CurrentWpn = 0;
if (!(TheSoldier.Holding[TheSoldier.CurrentWpn] instanceof Object)) {
TheSoldier.BattleChar.Mode = 0;
} else {
TheSoldier.BattleChar.Mode = Items[TheSoldier.Holding[TheSoldier.CurrentWpn].Type].AnimCat;
}
}
function PlaceTransport(TrObj, X, Y, Ind, Dir) {
if (((!isNaN(X)) and (!isNaN(Y))) and (!isNaN(TrObj.Type))) {
duplicateMovieClip (BW.TransportSample, "trn" + Ind, BW.getNextHighestDepth());
BW["trn" + Ind]._x = (X * 40) + 20;
BW["trn" + Ind]._y = (Y * 40) + 20;
BW["trn" + Ind]._visible = true;
BW["trn" + Ind].gotoAndStop(TrObj.Type);
TrObj.BattleChar = BW["trn" + Ind];
if (Dir == 1) {
BW["trn" + Ind]._rotation = 0;
}
if (Dir == 2) {
BW["trn" + Ind]._rotation = 90;
}
if (Dir == 3) {
BW["trn" + Ind]._rotation = 180;
}
if (Dir == 4) {
BW["trn" + Ind]._rotation = 270;
}
if (TrObj.Attached instanceof Object) {
BW["trn" + Ind].Cargo._visible = false;
} else {
BW["trn" + Ind].Cargo._visible = true;
}
}
}
function CaravanBattleDirection(Dir) {
if ((Dir < (Math.PI/4)) or (Dir >= 5.49778714378214)) {
Ret = 1;
}
if ((Dir >= (Math.PI/4)) and (Dir < 2.35619449019234)) {
Ret = 2;
}
if ((Dir >= 2.35619449019234) and (Dir < 3.92699081698724)) {
Ret = 3;
}
if ((Dir >= 3.92699081698724) and (Dir < 5.49778714378214)) {
Ret = 4;
}
return(Ret);
}
function FindFreeSlot(X, Y) {
Ret = {x:X, y:Y};
Phase = 1;
Offset = 1;
Roll = 0;
while (((((!isNaN(BattleField[Ret.x][Ret.y])) or (Ret.x < 1)) or (Ret.x > BFWidth)) or (Ret.y < 1)) or (Ret.y > BFHeight)) {
switch (Phase) {
case 1 :
Ret.x = (X - Offset) + Roll;
Ret.y = Y - Offset;
break;
case 2 :
Ret.x = X + Offset;
Ret.y = (Y - Offset) + Roll;
break;
case 3 :
Ret.x = (X - Offset) + Roll;
Ret.y = Y + Offset;
break;
case 4 :
Ret.x = X - Offset;
Ret.y = (Y - Offset) + Roll;
}
Roll++;
if (Roll >= (Offset * 2)) {
Phase++;
Roll = 0;
if (Phase > 4) {
Phase = 1;
Offset++;
}
}
}
return(Ret);
}
function HideMarkers() {
cm = 1;
while (cm <= MaxMarkers) {
BW["M" + cm]._visible = false;
cm++;
}
}
function FindPath(Obj, X, Y, APLimit, Exact) {
if ((APLimit < 0) or isNaN(APLimit)) {
APLimit = 0;
}
Mask = new Array();
xx = 1;
while (xx <= BFWidth) {
Mask[xx] = new Array();
xx++;
}
CurrPiece = 11;
GoingWell = true;
Cuts = new Array();
XGo = X - Obj.BSquare.x;
YGo = Y - Obj.BSquare.y;
TotalToGo = Math.abs(XGo) + Math.abs(YGo);
if (((((((TotalToGo > APLimit) and Exact) or (!isNaN(BattleField[X][Y]))) or (X < 1)) or (X > BFWidth)) or (Y < 1)) or (Y > BFHeight)) {
Pth = Number.NaN;
} else {
Pth = new Array();
Pth[0] = {x:Obj.BSquare.x, y:Obj.BSquare.y};
Mask[Obj.BSquare.x][Obj.BSquare.y] = 10;
if (XGo == 0) {
XStep = 0;
}
if (XGo > 0) {
XStep = 1;
}
if (XGo < 0) {
XStep = -1;
}
if (YGo == 0) {
YStep = 0;
}
if (YGo > 0) {
YStep = 1;
}
if (YGo < 0) {
YStep = -1;
}
GoYEach = TotalToGo / Math.abs(YGo);
CurrX = Obj.BSquare.x;
CurrY = Obj.BSquare.y;
Steps = 0;
YSteps = 0;
while ((CurrX != X) or (CurrY != Y)) {
Steps++;
if (Steps > 1000) {
Pth = [];
return(Pth);
}
if (((Steps >= GoYEach) and (YSteps < Math.abs(YGo))) or (CurrX == X)) {
CurrY = CurrY + YStep;
Steps = Steps - GoYEach;
YSteps++;
} else {
CurrX = CurrX + XStep;
}
if ((((isNaN(BattleField[CurrX][CurrY]) and (CurrX > 0)) and (CurrX <= BFWidth)) and (CurrY > 0)) and (CurrY <= BFHeight)) {
GoingWell = true;
Pth.push({x:CurrX, y:CurrY});
Mask[CurrX][CurrY] = CurrPiece;
if (((CurrX == X) and (CurrY == Y)) and ((Pth.length - 1) <= APLimit)) {
break;
}
CurrPiece++;
} else if (GoingWell) {
GoingWell = false;
Cuts.push({x:CurrX, y:CurrY});
}
}
}
for (cc in Cuts) {
FillContour(Cuts[cc].x, Cuts[cc].y, Obj.BSquare.x, Obj.BSquare.y);
}
Mask[X][Y] = Pth.length + 9;
Ret = new Array();
LastConnected = -1;
cp = 0;
while (cp < Pth.length) {
if (cp > LastConnected) {
if ((Ret.length - 1) < APLimit) {
Ret.push({x:Pth[cp].x, y:Pth[cp].y});
} else {
break;
}
if (Mask[Pth[cp].x][Pth[cp].y] != (cp + 10)) {
Connections = new Array();
CurrConnection = [{x:Pth[cp].x, y:Pth[cp].y}];
StartIndex = cp + 10;
FindConnections();
if (Connections.length == 0) {
return(Number.NaN);
}
ShortestLength = Infinity;
for (cc in Connections) {
ConLength = Connections[cc].Path.length - Connections[cc].ConnectTo;
if (ConLength < ShortestLength) {
SC = cc;
ShortestLength = ConLength;
}
}
ic = 1;
while (ic < Connections[SC].Path.length) {
Ret.push({x:Connections[SC].Path[ic].x, y:Connections[SC].Path[ic].y});
Ret = ArrangePath(Ret);
if ((Ret.length - 1) >= APLimit) {
break;
}
ic++;
}
LastConnected = Connections[SC].ConnectTo;
}
}
cp++;
}
Ret.shift();
while ((Ret.length > APLimit) and (APLimit > 0)) {
Ret.pop();
}
return(Ret);
}
function FindConnections() {
for (dr in Directions) {
var _local2;
var _local1;
_local2 = CurrConnection[CurrConnection.length - 1].x + Directions[dr].x;
_local1 = CurrConnection[CurrConnection.length - 1].y + Directions[dr].y;
if (Mask[_local2][_local1] > StartIndex) {
NewCon = Connections.length;
Connections[NewCon] = {Path:[], ConnectTo:Mask[_local2][_local1] - 10};
for (ac in CurrConnection) {
Connections[NewCon].Path[ac] = {x:CurrConnection[ac].x, y:CurrConnection[ac].y};
}
Connections[NewCon].Path.push({x:_local2, y:_local1});
} else if (Mask[_local2][_local1] == 1) {
Mask[_local2][_local1] = 3;
CurrConnection.push({x:_local2, y:_local1});
FindConnections();
}
}
Mask[CurrConnection[CurrConnection.length - 1].x][CurrConnection[CurrConnection.length - 1].y] = 1;
CurrConnection.pop();
}
function FillContour(StartX, StartY, CharX, CharY) {
Mask[StartX][StartY] = 2;
for (dr in EightDirs) {
TryX = StartX + EightDirs[dr].x;
TryY = StartY + EightDirs[dr].y;
if (isNaN(BattleField[TryX][TryY]) or ((TryX == CharX) and (TryY == CharY))) {
if ((((TryX > 0) and (TryX <= BFWidth)) and (TryY > 0)) and (TryY <= BFHeight)) {
Mask[TryX][TryY] = 1;
}
} else if (isNaN(Mask[TryX][TryY])) {
FillContour(TryX, TryY);
}
}
}
function ArrangePath(PA) {
NewPath = PA;
LastEl = PA[PA.length - 1];
ap = 0;
while (ap < (PA.length - 2)) {
if ((PA[ap].x == LastEl.x) or (PA[ap].y == LastEl.y)) {
if (PA[ap].x == LastEl.x) {
Xm = 0;
if (PA[ap].y > LastEl.y) {
Ym = 1;
} else {
Ym = -1;
}
}
if (PA[ap].y == LastEl.y) {
Ym = 0;
if (PA[ap].x > LastEl.x) {
Xm = 1;
} else {
Xm = -1;
}
}
CX = LastEl.x + Xm;
CY = LastEl.y + Ym;
FreePath = true;
Connection = new Array();
Counter = 0;
while ((CX != PA[ap].x) or (CY != PA[ap].y)) {
Counter++;
Connection.push({x:CX, y:CY});
if ((((((!isNaN(BattleField[CX][CY])) or (CX < 1)) or (CX > BFWidth)) or (CY < 1)) or (CY > BFWidth)) or (Counter > 1000)) {
FreePath = false;
break;
}
CX = CX + Xm;
CY = CY + Ym;
}
if (FreePath) {
NewPath = new Array();
con = 0;
while (con <= ap) {
NewPath[con] = {x:PA[con].x, y:PA[con].y};
con++;
}
for (con in Connection) {
NewPath.push({x:Connection[con].x, y:Connection[con].y});
}
NewPath.push({x:LastEl.x, y:LastEl.y});
}
}
ap++;
}
return(NewPath);
}
function UpdateCharDisplay() {
BMenu.Pan.Portrait.gotoAndStop(ActChar.Portrait);
BMenu.Pan.NameText = ActChar.Name;
BMenu.Pan.ParamsText = (((("Sni: " + Math.round(ActChar.Sniper)) + " Str: ") + Math.round(ActChar.Strength)) + " Pro: ") + ActChar.Protection;
BMenu.Pan.HealthText = ((("Health: <b>" + Math.ceil(ActChar.HP)) + " / ") + ActChar.MaxHP) + "</b>";
BMenu.Pan.APText = ((("AP: <b>" + ActChar.AP) + " / ") + ActChar.MaxAP) + "</b>";
uap = 1;
while (uap <= 30) {
if (uap <= ActChar.MaxAP) {
BMenu.Pan["A" + uap]._visible = true;
if (uap <= ActChar.AP) {
BMenu.Pan["A" + uap].gotoAndStop(1);
} else {
BMenu.Pan["A" + uap].gotoAndStop(2);
}
} else {
BMenu.Pan["A" + uap]._visible = false;
}
uap++;
}
BMenu.Pan.HB.gotoAndStop(Math.round((ActChar.HP / ActChar.MaxHP) * 100));
}
function UpdateCharWpn() {
WpnSlot = ActChar.Holding[ActChar.CurrentWpn];
WpnType = WpnSlot.Type;
if (isNaN(WpnType)) {
BMenu.Pan.WpnIcon._visible = false;
BMenu.Pan.RButt._visible = false;
BMenu.Pan.WpnName = "Bare Hand";
BMenu.Pan.WpnMode = "Hit (<b>3 AP</b>)";
BMenu.Pan.WpnLoad = "";
BMenu.Pan.WpnAmmo = "";
BMenu.Pan.ForceThrow._visible = false;
BMenu.Pan.xText = "";
} else {
BMenu.Pan.WpnIcon._visible = true;
BMenu.Pan.WpnIcon.gotoAndStop(WpnType);
BMenu.Pan.WpnName = Items[WpnType].Name;
BMenu.Pan.WpnMode = ((WpnModeNames[WpnSlot.Modes[WpnSlot.CurrentMode].Type] + " (<b>") + WpnSlot.Modes[WpnSlot.CurrentMode].AP) + " AP</b>)";
if (Items[WpnType].Class == 1) {
BMenu.Pan.RButt._visible = true;
BMenu.Pan.WpnLoad = ((("Load: <b>" + WpnSlot.Load) + " / ") + Items[WpnType].Capacity) + "</b>";
if (isNaN(WpnSlot.AmmoSlot) or (!(ActChar.Holding[WpnSlot.AmmoSlot] instanceof Object))) {
TAm = 0;
} else {
TAm = ActChar.Holding[WpnSlot.AmmoSlot].Amount;
}
BMenu.Pan.WpnAmmo = ("Total Ammo: <b>" + TAm) + "</b>";
} else {
BMenu.Pan.RButt._visible = false;
BMenu.Pan.WpnLoad = "";
BMenu.Pan.WpnAmmo = "";
}
if (Items[WpnType].Class == 4) {
BMenu.Pan.ForceThrow._visible = true;
BMenu.Pan.xText = "x" + WpnSlot.Amount;
} else {
BMenu.Pan.ForceThrow._visible = false;
BMenu.Pan.xText = "";
}
}
}
function SwitchWpnMode() {
WPN = ActChar.Holding[ActChar.CurrentWpn];
if (WPN instanceof Object) {
WPN.CurrentMode++;
if (WPN.CurrentMode >= WPN.Modes.length) {
WPN.CurrentMode = 0;
}
}
UpdateCharWpn();
}
function SwapWpn() {
if (ActChar.CurrentWpn == 0) {
ActChar.CurrentWpn = 1;
} else {
ActChar.CurrentWpn = 0;
}
UpdateCharWpn();
if (!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object)) {
ActChar.BattleChar.Mode = 0;
} else {
ActChar.BattleChar.Mode = Items[ActChar.Holding[ActChar.CurrentWpn].Type].AnimCat;
}
ForceThrow = false;
}
function Shoot(Target) {
StartPoint = {x:(ActChar.BSquare.x * 40) + 20, y:(ActChar.BSquare.y * 40) + 20};
TargetPoint = {x:(Target.BSquare.x * 40) + 20, y:(Target.BSquare.y * 40) + 20};
FireAngle = CalcAngle(StartPoint.x, StartPoint.y, TargetPoint.x, TargetPoint.y);
AccuracyCo = (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Accuracy * ActChar.Sniper) / 10000;
if (AccuracyCo > 1) {
AccuracyCo = 1;
}
MaxAccuracyError = (1 - AccuracyCo) * 0.02;
AccuracyError = ((Math.random() * MaxAccuracyError) * 2) - MaxAccuracyError;
FireMode = ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode];
if (FireMode.Type == 1) {
AccuracyError = AccuracyError * 1.7;
}
if (FireMode.Type == 3) {
AccuracyError = AccuracyError * 1.8;
}
if (FireMode.Type == 4) {
AccuracyError = AccuracyError * 1.9;
}
if (FireMode.Type == 5) {
SccuracyError = SccuracyError * 2;
}
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 7) {
ShootGap = 0.01;
StartAng = (FireAngle + AccuracyError) - (ShootGap * 5.5);
sp = 0;
while (sp <= 11) {
FireBullet(StartAng + (ShootGap * sp));
sp++;
}
} else {
FireBullet(FireAngle + AccuracyError);
}
UseRound();
}
function UseRound() {
for (rr in ActChar.Group.Inventory) {
if (ActChar.Group.Inventory[rr].Type == ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot].Type) {
ActChar.Group.Inventory[rr].Amount--;
ActChar.Group.Inventory[rr].InUse--;
if (ActChar.Group.Inventory[rr].Amount <= 0) {
ActChar.Group.Inventory.splice(rr, 1);
}
break;
}
}
ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot].Amount--;
UpdateCarrying(ActChar);
if (ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot].Amount <= 0) {
ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot] = 0;
}
ActChar.Holding[ActChar.CurrentWpn].Load--;
}
function Reload() {
if (((ActChar.AP >= 4) and (ActChar.Holding[ActChar.CurrentWpn].Load < Items[ActChar.Holding[ActChar.CurrentWpn].Type].Capacity)) and (ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot].Amount > ActChar.Holding[ActChar.CurrentWpn].Load)) {
if (FXOn) {
SetSound(ActChar.BattleChar);
ActChar.BattleChar.Rel.start();
}
ActChar.AP = ActChar.AP - 4;
ActChar.Holding[ActChar.CurrentWpn].Load = Math.min(Items[ActChar.Holding[ActChar.CurrentWpn].Type].Capacity, ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot].Amount);
UpdateCharDisplay();
ActPhase = 2;
}
}
function FireBullet(FireAng) {
CurrPoint = {x:(ActChar.BSquare.x * 40) + 20, y:(ActChar.BSquare.y * 40) + 20};
MoveX = Math.sin(FireAng) * 5;
MoveY = Math.cos(FireAng) * 5;
ii = 1;
while (ii < 10000) {
CurrPoint.x = CurrPoint.x + MoveX;
CurrPoint.y = CurrPoint.y - MoveY;
CurrSquareX = Math.floor(CurrPoint.x / 40);
CurrSquareY = Math.floor(CurrPoint.y / 40);
if ((((CurrSquareX < 1) or (CurrSquareX > BFWidth)) or (CurrSquareY < 1)) or (CurrSquareY > BFWidth)) {
break;
}
CurrMap = BattleField[CurrSquareX][CurrSquareY];
if ((((CurrSquareX != ActChar.BSquare.x) or (CurrSquareY != ActChar.BSquare.y)) and (!isNaN(CurrMap))) and (CurrMap != 4000)) {
FromCenter = CalcDistance(CurrPoint.x, CurrPoint.y, (CurrSquareX * 40) + 20, (CurrSquareY * 40) + 20);
FlightDistance = ii / 4;
RangeCo = (((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Range * 2) - FlightDistance) / Items[ActChar.Holding[ActChar.CurrentWpn].Type].Range) / 2;
CauseDamage = (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Damage * RangeCo) / (1 + (FromCenter / 5));
if ((CurrMap < 2000) and (FromCenter < 5)) {
if (CurrMap < 1000) {
HitList.push({Subject:Group.Members[CurrMap], Type:1, Damage:CauseDamage});
HitMember(Group.Members[CurrMap], CauseDamage, ActChar.BattleChar._x, ActChar.BattleChar._y);
}
if ((CurrMap >= 1000) and (CurrMap < 2000)) {
HitList.push({Subject:RivalGroup.Members[CurrMap - 1000], Type:1, Damage:CauseDamage});
HitMember(RivalGroup.Members[CurrMap - 1000], CauseDamage, ActChar.BattleChar._x, ActChar.BattleChar._y);
}
break;
}
if ((CurrMap >= 2000) and (CurrMap < 4000)) {
if (CurrMap < 3000) {
HitTrans = Group.Transport[CurrMap - 2000];
} else {
HitTrans = RivalGroup.Transport[CurrMap - 3000];
}
GlobalHTPoint = {x:CurrPoint.x, y:CurrPoint.y};
BW.localToGlobal(GlobalHTPoint);
if ((random(10) < 3) and HitTrans.BattleChar.hitTest(GlobalHTPoint.x, GlobalHTPoint.y, true)) {
HitList.push({Subject:HitTrans, Type:2, Damage:CauseDamage});
break;
}
}
}
ii++;
}
}
function Explode(PosX, PosY, Power) {
BW.Granade._visible = false;
SetSound(BW.Explosion);
BW.Explosion.Rif.start();
BW.Explosion._x = PosX;
BW.Explosion._y = PosY;
BW.Explosion.gotoAndPlay(2);
GSquareX = Math.floor(PosX / 40);
GSquareY = Math.floor(PosY / 40);
ex = GSquareX - 5;
while (ex <= (GSquareX + 5)) {
ey = GSquareY - 3;
while (ey <= (GSquareY + 3)) {
if ((BattleField[ex][ey] >= 0) and (BattleField[ex][ey] < 4000)) {
if (BattleField[ex][ey] < 1000) {
HitChar = Group.Members[BattleField[ex][ey]];
}
if ((BattleField[ex][ey] >= 1000) and (BattleField[ex][ey] < 2000)) {
HitChar = RivalGroup.Members[BattleField[ex][ey] - 1000];
}
if ((BattleField[ex][ey] >= 2000) and (BattleField[ex][ey] < 3000)) {
HitChar = Group.Transport[BattleField[ex][ey] - 2000];
}
if ((BattleField[ex][ey] >= 3000) and (BattleField[ex][ey] < 4000)) {
HitChar = RivalGroup.Transport[BattleField[ex][ey] - 3000];
}
Dm = (Power * 1.5) - (CalcDistance(HitChar.BattleChar._x, HitChar.BattleChar._y, PosX, PosY) / 2);
if (Dm > 0) {
if (BattleField[ex][ey] < 2000) {
HitMember(HitChar, Dm, PosX, PosY);
HitType = 1;
} else {
HitType = 2;
}
HitList.push({Subject:HitChar, Type:HitType, Damage:Dm});
}
}
ey++;
}
ex++;
}
OrganizeHitList();
}
function HitMember(Whom, How, FromX, FromY) {
Whom.BattleChar._rotation = CalcAngle(Whom.BattleChar._x, Whom.BattleChar._y, FromX, FromY) * Rad2Deg;
if (isNaN(Whom.Protection)) {
Whom.Protection = 0;
}
Whom.HitInThisTurn = Whom.HitInThisTurn + (How * (1 - (Whom.Protection / 100)));
if ((Whom.HP - Math.round(Whom.HitInThisTurn)) > 0) {
switch (Whom.BattleChar.Mode) {
case 0 :
Whom.BattleChar.gotoAndPlay(58);
break;
case 1 :
Whom.BattleChar.gotoAndPlay(66);
break;
case 2 :
Whom.BattleChar.gotoAndPlay(75);
break;
case 3 :
Whom.BattleChar.gotoAndPlay(84);
break;
case 4 :
Whom.BattleChar.gotoAndPlay(95);
break;
case 5 :
Whom.BattleChar.gotoAndPlay(109);
break;
case 6 :
Whom.BattleChar.gotoAndPlay(132);
}
} else {
Whom.BattleChar.gotoAndPlay(136);
BattleField[Whom.BSquare.x][Whom.BSquare.y] = Number.NaN;
MinDepth = Infinity;
for (rw in ActList) {
CurrDepth = ActList[rw].BattleChar.getDepth();
if (CurrDepth < MinDepth) {
MinDepth = CurrDepth;
}
}
for (ut in Group.Transport) {
CurrDepth = Group.Transport[ut].BattleChar.getDepth();
if (CurrDepth < MinDepth) {
MinDepth = CurrDepth;
}
}
for (ut in RivalGroup.Transport) {
CurrDepth = RivalGroup.Transport[ut].BattleChar.getDepth();
if (CurrDepth < MinDepth) {
MinDepth = CurrDepth;
}
}
if (MinDepth != Whom.BattleChar.getDepth()) {
Whom.BattleChar.swapDepths(MinDepth);
}
}
}
function OrganizeHitList() {
for (hli in HitList) {
for (shl in HitList) {
if ((shl != hli) and (HitList[hli].Subject == HitList[shl].Subject)) {
HitList[hli].Damage = HitList[hli].Damage + HitList[shl].Damage;
HitList.splice(shl, 1);
}
}
}
for (hli in HitList) {
if (isNaN(HitList[hli].Subject.Protection)) {
HitList[hli].Subject.Protection = 0;
}
HitList[hli].Damage = Math.round(HitList[hli].Damage * (1 - (HitList[hli].Subject.Protection / 100)));
if (HitList[hli].Damage == 0) {
HitList.splice(hli, 1);
}
}
for (hli in HitList) {
if (HitList[hli].Type == 1) {
if (HitList[hli].Subject.Group == Group) {
SubjName = HitList[hli].Subject.Name;
} else {
switch (RivalGroup.Type) {
case 1 :
SubjName = "A robber";
break;
case 2 :
SubjName = "A caravaneer";
break;
default :
SubjName = "An enemy";
}
}
if (HitList[hli].Subject.Group == Group) {
HitText.Inside.TheText = HitText.Inside.TheText + "<font color='#FF0000'>";
} else {
HitText.Inside.TheText = HitText.Inside.TheText + "<font color='#00FF00'>";
}
}
if (HitList[hli].Type == 2) {
SubjName = Transports[HitList[hli].Subject.Type].Name;
HitText.Inside.TheText = HitText.Inside.TheText + "<font color='#FFFFFF'>";
}
HitText.Inside.TheText = HitText.Inside.TheText + (((("<b>" + SubjName) + " is hit ") + HitList[hli].Damage) + " points of damage.</b></font><br>");
HitList[hli].Subject.HP = HitList[hli].Subject.HP - HitList[hli].Damage;
if (HitList[hli].Subject == ActChar) {
UpdateCharDisplay();
}
SetSound(HitList[hli].Subject.BattleChar);
if ((HitList[hli].Type == 1) and (HitList[hli].Subject.HP <= 0)) {
if (HitList[hli].Subject.Group == Group) {
HitText.Inside.TheText = HitText.Inside.TheText + "<font color='#FF0000'>";
} else {
HitText.Inside.TheText = HitText.Inside.TheText + "<font color='#00FF00'>";
}
HitText.Inside.TheText = HitText.Inside.TheText + (("<b>" + SubjName) + " is killed</b></font><br>");
if ((GameMode == 2) and (HitList[hli].Subject.Group == RivalGroup)) {
Competitive.Kills++;
}
ActChar.Kills++;
for (rw in ActList) {
if (ActList[rw] == HitList[hli].Subject) {
ActList.splice(rw, 1);
if (rw <= NowActing) {
NowActing--;
if (NowActing < 0) {
NowActing = ActList.length - 1;
}
}
break;
}
}
HitList[hli].Subject.BattleChar.Die.start();
} else {
HitList[hli].Subject.BattleChar.Hit.start();
}
if (HitList[hli].Type == 1) {
UpdateMemberParams(HitList[hli].Subject);
}
AnyRivalsAlive = false;
for (cm in RivalGroup.Members) {
if (!RivalGroup.Members[cm].Dead) {
AnyRivalsAlive = true;
break;
}
}
if ((BattleLocation == 1) and (!AllOut)) {
AnyRivalsAlive = true;
}
if (!AnyRivalsAlive) {
RivalGroup.Active = false;
Map["A" + RivalGroup.Index]._visible = false;
if ((RivalGroup.Type == 2) and (RivalGroup.Route != 6)) {
LackingCaravans.push(RivalGroup.Route);
}
Trophies = new Array();
if (RivalGroup.Money > 0) {
Trophies.push({Class:4, Amount:RivalGroup.Money, Weight:0});
}
if (RivalGroup.Water > 0) {
Trophies.push({Class:5, Amount:RivalGroup.Water, Weight:RivalGroup.Water});
}
for (at in RivalGroup.Inventory) {
if ((RivalGroup.Inventory[at].Type > 0) and (RivalGroup.Inventory[at].Amount > 0)) {
Trophies.push({Class:1, Type:RivalGroup.Inventory[at].Type, Amount:RivalGroup.Inventory[at].Amount, Weight:Items[RivalGroup.Inventory[at].Type].Weight * RivalGroup.Inventory[at].Amount});
}
}
for (at in RivalGroup.Cargo) {
if ((RivalGroup.Cargo[at].Type > 0) and (RivalGroup.Cargo[at].Amount > 0)) {
Trophies.push({Class:2, Type:RivalGroup.Cargo[at].Type, Amount:RivalGroup.Cargo[at].Amount, Weight:Goods[RivalGroup.Cargo[at].Type].WeightPerUnit * RivalGroup.Cargo[at].Amount});
}
}
for (at in RivalGroup.Transport) {
if ((RivalGroup.Transport[at].HP > 0) and (RivalGroup.Transport[at].Type > 0)) {
Trophies.push({Class:3, Type:RivalGroup.Transport[at].Type, HP:RivalGroup.Transport[at].HP, Weight:0});
}
}
Trophies[Trophies.length - 1].Selected = false;
SwitchMode(7);
}
HitList[hli].Subject.HitInThisTurn = 0;
}
if (HitList.length > 0) {
if (HitText._currentframe == 1) {
HitText.gotoAndPlay(2);
}
if (HitText._currentframe > 20) {
HitText.gotoAndPlay(20);
}
}
}
function ExitBattle() {
for (tt in Trophies) {
if (Trophies[tt].Selected) {
if (Trophies[tt].Class == 1) {
Found = false;
for (fk in Group.Inventory) {
if (Group.Inventory[fk].Type == Trophies[tt].Type) {
Found = true;
Group.Inventory[fk].Amount = Group.Inventory[fk].Amount + Trophies[tt].Amount;
break;
}
}
if (!Found) {
Group.Inventory.push({Type:Trophies[tt].Type, Amount:Trophies[tt].Amount});
}
}
if (Trophies[tt].Class == 2) {
Found = false;
for (fk in Group.Cargo) {
if (Group.Cargo[fk].Type == Trophies[tt].Type) {
Found = true;
Group.Cargo[fk].Amount = Group.Cargo[fk].Amount + Trophies[tt].Amount;
break;
}
}
if (!Found) {
Group.Cargo.push({Type:Trophies[tt].Type, Amount:Trophies[tt].Amount});
}
}
if (Trophies[tt].Class == 3) {
Group.Transport.push({Type:Trophies[tt].Type, HP:Trophies[tt].HP, MaxHP:Transports[Trophies[tt].Type].MaxHP, Group:Group});
UpdateTransportParams(Group.Transport[Group.Transport.length - 1]);
}
if (Trophies[tt].Class == 4) {
Group.Money = Group.Money + Trophies[tt].Amount;
}
if (Trophies[tt].Class == 5) {
Group.Water = Group.Water + Trophies[tt].Amount;
}
}
}
for (mmb in Group.Members) {
UpdateMemberParams(Group.Members[mmb]);
}
for (trn in Group.Transport) {
UpdateTransportParams(Group.Transport[trn]);
}
SwitchMode(1);
UpdateGroupParams(Group);
DistributeCarts(Group);
UpdateGroupCargo(Group);
if (Group.Water > Group.MaxWater) {
Group.Water = Group.MaxWater;
UpdateGroupCargo(Group);
}
if (BattleLocation == 1) {
Story.RBaseVisited = true;
if (Story.SentToBase) {
if ((!EngineerKilled) or (Group.Mechanic >= 100)) {
Messages.push({Type:12});
News.unshift({Type:7, Time:FormatedTime()});
ReduceRobbersNum();
Story.RBaseDestroyed = true;
for (re in Group.Cargo) {
if (Group.Cargo[re].Type == 14) {
Group.Cargo.splice(re, 1);
break;
}
}
} else {
Messages.push({Type:13});
}
} else {
Messages.push({Type:17});
}
}
}
function DistributeShots(APs, Vict) {
if ((APs < 0) or isNaN(APs)) {
APs = 0;
}
AvModes = new Array();
if (ActChar.Holding[ActChar.CurrentWpn] instanceof Object) {
for (md in ActChar.Holding[ActChar.CurrentWpn].Modes) {
AvModes.push({Num:md, AP:ActChar.Holding[ActChar.CurrentWpn].Modes[md].AP});
}
AvModes.sortOn("AP", 18);
} else {
AvModes.push({Num:0, AP:3});
}
MinAP = AvModes[AvModes.length - 1].AP;
AvAPs = APs;
while (((AvAPs >= MinAP) and (!isNaN(AvAPs))) and (!isNaN(MinAP))) {
dm = 0;
while (dm < AvModes.length) {
if (AvModes[dm].AP <= AvAPs) {
ActChar.Schedule.push({Action:2, Mode:AvModes[dm].Num, Target:Vict});
AvAPs = AvAPs - AvModes[dm].AP;
break;
}
dm++;
}
}
}
function SimulateBattle(Group1, Group2) {
Group1Power = 0;
TotalAP1 = 0;
for (ahp in Group1.Members) {
Group1Power = Group1Power + Group1.Members[ahp].HP;
TtoalAP1 = TtoalAP1 + Group1.Members[ahp].MaxAP;
}
AvAP1 = TotalAP1 / Group1.Members.length;
for (agp in Group1.Inventory) {
if (Items[Group1.Inventory[agp].Type].Class == 5) {
Group1Power = Group1Power + (AvAP1 * Items[Group1.Inventory[agp].Type].Damage);
}
if (Items[Group1.Inventory[agp].Type].Class == 1) {
Group1Power = Group1Power + (AvAP1 * Items[Group1.Inventory[agp].Type].Damage);
Group1Power = Group1Power + Math.round(Items[Group1.Inventory[agp].Type].Range / 5);
Group1Power = Group1Power + Math.round(Items[Group1.Inventory[agp].Type].Accuracy / 5);
}
if (Items[Group1.Inventory[agp].Type].Class == 4) {
Group1Power = Group1Power + ((AvAP1 * Items[Group1.Inventory[agp].Type].Damage) * 3);
}
if (Items[Group1.Inventory[agp].Type].Class == 3) {
Group1Power = Group1Power + Items[Group1.Inventory[agp].Type].Protection;
}
}
if (Group2 instanceof Object) {
Group2Power = 0;
TotalAP2 = 0;
AvAP2 = TotalAP2 / Group2.Members.length;
for (ahp in Group2.Members) {
Group2Power = Group2Power + Group2.Members[ahp].HP;
TotalAP2 = TotalAP2 + Group2.Members[ahp].MaxAP;
}
for (agp in Group2.Inventory) {
if (Items[Group2.Inventory[agp].Type].Class == 5) {
Group2Power = Group2Power + (AvAP2 * Items[Group2.Inventory[agp].Type].Damage);
}
if (Items[Group2.Inventory[agp].Type].Class == 1) {
Group2Power = Group2Power + (AvAP2 * Items[Group2.Inventory[agp].Type].Damage);
Group2Power = Group2Power + Math.round(Items[Group2.Inventory[agp].Type].Range / 5);
Group2Power = Group2Power + Math.round(Items[Group2.Inventory[agp].Type].Accuracy / 5);
}
if (Items[Group2.Inventory[agp].Type].Class == 4) {
Group2Power = Group2Power + ((AvAP2 * Items[Group2.Inventory[agp].Type].Damage) * 3);
}
if (Items[Group2.Inventory[agp].Type].Class == 3) {
Group1Power = Group1Power + Items[Group2.Inventory[agp].Type].Protection;
}
}
} else {
Group2Power = Group2;
}
if (Group1Power > Group2Power) {
WinningGroup = Group1;
LosingGroup = Group2;
PowerRelation = Group2Power / Group1Power;
} else {
WinningGroup = Group2;
LosingGroup = Group1;
PowerRelation = Group1Power / Group2Power;
}
PowerRelation = Math.pow(PowerRelation, 2);
LosingGroup.Active = false;
Map["A" + LosingGroup.Index]._visible = false;
if ((LosingGroup.Type == 2) and (LosingGroup.Route != 6)) {
News.unshift({Type:1, Time:FormatedTime(), Route:LosingGroup.Route, ByWhom:1});
LackingCaravans.push(LosingGroup.Route);
}
if (LosingGroup.Type == 6) {
AnyRegimentsAlive = false;
sr = 1;
while (sr <= TotalAct) {
if ((Activity[sr].Type == 6) and Activity[sr].Active) {
AnyRegimentsAlive = true;
break;
}
sr++;
}
if (!AnyRegimentsAlive) {
Messages.push({Type:18});
}
}
for (rhp in WinningGroup.Members) {
WinningGroup.Members[rhp].HP = Math.round(WinningGroup.Members[rhp].HP * (1 - PowerRelation));
if (WinningGroup.Members[rhp].HP < 1) {
WinningGroup.Members[rhp].HP = 1;
}
}
Map["A" + WinningGroup.Index].gotoAndPlay(2);
}
function AddDPConvoy() {
ac = 1;
while (ac <= 2) {
NewAct = AddActivity(Map.Town14._x, Map.Town14._y);
am = 1;
while (am <= 40) {
mb = Activity[NewAct].Members.push({Healthiness:10, Accuracy:10, Agility:10, Intelligence:10, SniperExperience:1000, DoctorExperience:0, MechanicExperience:0, VeterinaryExperience:0});
mb--;
UpdateMemberParams(Activity[NewAct].Members[mb]);
Activity[NewAct].Members[mb].HP = 100;
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HatType = 1;
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].HatColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = (Activity[NewAct].Members[mb].PantsColor = 3377152)));
Activity[NewAct].Members[mb].Holding = new Array();
am++;
}
EquipGroup(Activity[NewAct], [28, 48, 55], [64], 1);
DistributeItems(Activity[NewAct]);
DistributeAmmo(Activity[NewAct]);
Activity[NewAct].Type = 5;
UpdateGroupParams(Activity[NewAct]);
if (ac == 1) {
Activity[NewAct].Angle = halfPI;
Activity[NewAct].Direction = Math.PI;
} else {
Activity[NewAct].Angle = Math.PI + halfPI;
Activity[NewAct].Direction = 0;
}
Activity[NewAct].Distance = 50;
ac++;
}
}
function RemoveDPCrew() {
for (mb in Group.Members) {
if (Group.Members[mb] == People[62]) {
Dismiss(Group.Members[mb]);
break;
}
}
for (act in Activity) {
if ((Activity[act].Type == 5) and Activity[act].Active) {
Activity[act].Active = false;
Map["A" + Activity[act].Index]._visible = false;
}
}
Story.RemovedDPCrew = true;
}
function ReduceRobbersNum() {
rx = 0;
while (rx < RobbersNum.length) {
ry = 0;
while (ry < RobbersNum[rx].length) {
if ((((rx >= 7) and (ry >= 1)) and (ry <= 2)) or ((ry == 1) and (rx >= 8))) {
RobbersNum[rx][ry] = 1;
} else {
RobbersNum[rx][ry] = Maht.round(Math.sqrt(RobbersNum[rx][ry]) * 1.5);
}
ry++;
}
rx++;
}
}
function StartTheFinalBattle() {
ac = 1;
while (ac <= 5) {
NewAct = AddActivity(Map.Town14._x, Map.Town14._y);
am = 1;
while (am <= 40) {
mb = Activity[NewAct].Members.push({Healthiness:6 + random(5), Accuracy:6 + random(5), Agility:6 + random(5), Intelligence:6 + random(5), SniperExperience:1000, DoctorExperience:0, MechanicExperience:0, VeterinaryExperience:0});
mb--;
UpdateMemberParams(Activity[NewAct].Members[mb]);
Activity[NewAct].Members[mb].HP = 100;
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HatType = 1;
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].HatColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = (Activity[NewAct].Members[mb].PantsColor = 3377152)));
Activity[NewAct].Members[mb].Holding = [0, 0, 0, 0];
am++;
}
EquipGroup(Activity[NewAct], [28, 48, 52, 55], [64], 1);
DistributeItems(Activity[NewAct]);
DistributeAmmo(Activity[NewAct]);
Activity[NewAct].Type = 6;
UpdateGroupParams(Activity[NewAct]);
Activity[NewAct].Phase = 1;
Activity[NewAct].Phase1Target = {x:(Map.Town14._x - 300) + (ac * 100), y:Map.Town14._y - 200};
Activity[NewAct].Phase2Target = {x:(Map.Town14._x - 300) + (ac * 100), y:Map.Town6._y + 200};
Activity[NewAct].Direction = 0;
ac++;
}
ac = 1;
while (ac <= 10) {
NewAct = AddActivity(Map.Town4._x, Map.Town4._y);
am = 1;
while (am <= 30) {
mb = Activity[NewAct].Members.push({Healthiness:6 + random(5), Accuracy:6 + random(5), Agility:6 + random(5), Intelligence:6 + random(5), SniperExperience:1000, DoctorExperience:0, MechanicExperience:0, VeterinaryExperience:0});
mb--;
UpdateMemberParams(Activity[NewAct].Members[mb]);
Activity[NewAct].Members[mb].HP = 100;
Activity[NewAct].Members[mb].BodyType = 1;
Activity[NewAct].Members[mb].ArmType = 1;
Activity[NewAct].Members[mb].HeadType = 1;
Activity[NewAct].Members[mb].LegType = 1;
Activity[NewAct].Members[mb].HatType = 1;
Activity[NewAct].Members[mb].SkinColor = SkinColors[random(SkinColors.length)];
Activity[NewAct].Members[mb].HairColor = HairColors[random(HairColors.length)];
Activity[NewAct].Members[mb].HatColor = (Activity[NewAct].Members[mb].JacketColor = (Activity[NewAct].Members[mb].SleevesColor = (Activity[NewAct].Members[mb].PantsColor = 14144186)));
Activity[NewAct].Members[mb].Holding = [0, 0, 0, 0];
am++;
}
EquipGroup(Activity[NewAct], [28, 48, 52, 55], [64], 1);
DistributeItems(Activity[NewAct]);
DistributeAmmo(Activity[NewAct]);
Activity[NewAct].Type = 7;
UpdateGroupParams(Activity[NewAct]);
Activity[NewAct].Phase = 1;
Activity[NewAct].Target = {x:Map.Town6._x + (Math.sin(4.792 - (0.3 * ac)) * 200), y:Map.Town6._y - (Math.cos(4.792 - (0.3 * ac)) * 200)};
Activity[NewAct].Direction = 0;
ac++;
}
rpx = 0;
while (rpx < Police.length) {
rpy = 0;
while (rpy < Police[rpx].length) {
Police[rpx][rpy] = 0;
rpy++;
}
rpx++;
}
rpx = 0;
while (rpx < Militia.length) {
rpy = 0;
while (rpy < Militia[rpx].length) {
Militia[rpx][rpy] = 0;
rpy++;
}
rpx++;
}
}
function CalculateWealth() {
Rt = 0;
Rt = Rt + Group.Money;
for (ai in Group.Inventory) {
if (!isNaN(Items[Group.Inventory[ai].Type].Price)) {
Rt = Rt + (Items[Group.Inventory[ai].Type].Price * Group.Inventory[ai].Amount);
}
}
for (ai in Group.Transport) {
if (!isNaN(Transports[Group.Transport[ai].Type].Price)) {
Rt = Rt + Transports[Group.Transport[ai].Type].Price;
}
}
for (ai in Group.Cargo) {
if (!isNaN(Goods[Group.Cargo[ai].Type].BasicValue)) {
Rt = Rt + (Goods[Group.Cargo[ai].Type].BasicValue * Group.Cargo[ai].Amount);
}
}
for (ai in Group.Members) {
if ((!isNaN(Group.Members[ai].Salary)) and (Group.Members[ai].Status == 1)) {
Rt = Rt + Group.Members[ai].Salary;
}
}
Rt = NumberFormat(Rt, 2);
return(Rt);
}
function UpdateCarrying(Subj) {
Subj.Carrying = 0;
aiw = 0;
while (aiw <= 4) {
if (Subj.Holding[aiw] instanceof Object) {
Subj.Carrying = Subj.Carrying + (Items[Subj.Holding[aiw].Type].Weight * Subj.Holding[aiw].Amount);
}
aiw++;
}
}
function CalcAngle(Xfrom, Yfrom, Xto, Yto) {
if ((Xfrom == Xto) and (Yfrom == Yto)) {
Angle = 0;
} else {
XDis = Math.abs(Xto - Xfrom);
YDis = Math.abs(Yto - Yfrom);
Angle = Math.atan(YDis / XDis);
if (Xto > Xfrom) {
if (Yto < Yfrom) {
Angle = halfPI - Angle;
} else {
Angle = halfPI + Angle;
}
} else if (Yto > Yfrom) {
Angle = (Math.PI + halfPI) - Angle;
} else {
Angle = (Math.PI + halfPI) + Angle;
}
if (Angle < 0) {
Angle = Angle + (Math.PI*2);
}
}
return(Angle);
}
function CalcDistance(Xfrom, Yfrom, Xto, Yto) {
xDistance = Math.abs(Xto - Xfrom);
yDistance = Math.abs(Yto - Yfrom);
LineDistance = Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
return(LineDistance);
}
BW.Explosion.Rif = new Sound(BW.Explosion);
BW.Explosion.Rif.attachSound("EXPLOSION");
MaxMarkers = 30;
cm = 2;
while (cm <= MaxMarkers) {
duplicateMovieClip (BW.M1, "M" + cm, BW.getNextHighestDepth());
cm++;
}
cm = 1;
while (cm <= MaxMarkers) {
BW["M" + cm]._visible = false;
BW["M" + cm].Ind.gotoAndStop(cm);
cm++;
}
MB.OnCancel = function () {
SwitchMode(1);
MDown = false;
};
Map._xscale = (Map._yscale = 100);
Shops = new Array();
for (twn in Towns) {
for (hs in Towns[twn].Houses) {
if (Towns[twn].Houses[hs].Type == 2) {
Shops.push(Towns[twn].Houses[hs]);
Towns[twn].Houses[hs].Index = Shops.length - 1;
if (Towns[twn].Houses[hs].SubType == 2) {
Towns[twn].Houses[hs].Stuff = new Array();
}
for (ass in Towns[twn].Houses[hs].Assortment) {
if (Towns[twn].Houses[hs].SubType == 1) {
Towns[twn].Houses[hs].Assortment[ass].Amount = Math.floor(Towns[twn].Houses[hs].Assortment[ass].MaxAmount / 4);
}
if (Towns[twn].Houses[hs].SubType == 2) {
Towns[twn].Houses[hs].Assortment[ass].Amount = Math.floor(Towns[twn].Houses[hs].Assortment[ass].MaxAmount / 4);
ad = 1;
while (ad <= Math.floor(Towns[twn].Houses[hs].Assortment[ass].Amount)) {
ln = Towns[twn].Houses[hs].Stuff.push({Type:Towns[twn].Houses[hs].Assortment[ass].Type, MaxHP:Transports[Towns[twn].Houses[hs].Assortment[ass].Type].MaxHP, HP:Transports[Towns[twn].Houses[hs].Assortment[ass].Type].MaxHP});
UpdateTransportParams(Towns[twn].Houses[hs].Stuff[ln - 1]);
ad++;
}
}
}
}
}
}
Group = {x:3230, y:3130, Move:true, Direction:0, Transport:[], Members:[People[0]], InTown:0, Cargo:[{Type:1, Amount:1}], Money:0, Water:1, Food:0, Forage:0, Meds:0, Fuel:0, Inventory:[{Type:66, Amount:2}], NoForage:0, NoFood:0, NoWater:0, Type:0};
if (GameMode == 2) {
Group.Money = 5000;
}
BaseGuards = new Object();
BaseGuards.Members = new Array();
BaseGuards.Inventory = [{Type:28, Amount:20}, {Type:6, Amount:1845}, {Type:63, Amount:22}, {Type:1, Amount:250}, {Type:2, Amount:1340}, {Type:3, Amount:625}, {Type:4, Amount:310}, {Type:7, Amount:960}, {Type:8, Amount:320}, {Type:10, Amount:550}, {Type:12, Amount:25}, {Type:13, Amount:34}, {Type:14, Amount:5}, {Type:16, Amount:10}, {Type:15, Amount:2}, {Type:30, Amount:5}, {Type:36, Amount:2}, {Type:38, Amount:7}, {Type:42, Amount:5}, {Type:45, Amount:3}, {Type:48, Amount:6}, {Type:51, Amount:4}, {Type:52, Amount:5}, {Type:53, Amount:65}, {Type:54, Amount:32}, {Type:59, Amount:13}, {Type:60, Amount:24}, {Type:62, Amount:25}, {Type:64, Amount:3}, {Type:69, Amount:4}, {Type:70, Amount:15}, {Type:71, Amount:10}, {Type:74, Amount:5}, {Type:75, Amount:6}];
BaseGuards.Cargo = [{Type:1, Amount:320}, {Type:2, Amount:146}, {Type:3, Amount:1843}, {Type:4, Amount:58}, {Type:5, Amount:73}, {Type:6, Amount:45}, {Type:7, Amount:127}, {Type:8, Amount:34}, {Type:9, Amount:584}, {Type:11, Amount:1340}, {Type:12, Amount:2}, {Type:13, Amount:195}];
BaseGuards.Water = 328;
BaseGuards.Type = 1;
BaseGuards.Active = true;
am = 1;
while (am <= 2) {
BaseGuards.Members.push({Healthiness:8, Agility:7, Accuracy:7, Intelligence:5, Holding:[0, 0, 0, 0], SniperExperience:1000});
UpdateMemberParams(BaseGuards.Members[BaseGuards.Members.length - 1]);
BaseGuards.Members[BaseGuards.Members.length - 1].HP = BaseGuards.Members[BaseGuards.Members.length - 1].MaxHP;
BaseGuards.Members[BaseGuards.Members.length - 1].Group = BaseGuards;
RandomAppearance(BaseGuards.Members[BaseGuards.Members.length - 1]);
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[0] = {Type:28, Amount:1};
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[2] = {Type:6, Amount:50};
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[4] = {Type:63, Amount:1};
am++;
}
for (pl in People) {
UpdateMemberParams(People[pl]);
People[pl].Group = Group;
People[pl].Kills = 0;
People[pl].HP = People[pl].MaxHP;
People[pl].Index = pl;
People[pl].Portrait = Number(pl) + 1;
People[pl].Autopay = false;
People[pl].Holding = [0, 0, 0, 0, 0];
People[pl].Carrying = 0;
People[pl].APExperience = 0;
People[pl].StrengthExperience = 0;
if (pl == 0) {
People[pl].Status = 0;
} else {
People[pl].Status = 1;
}
}
UpdateGroupParams(Group);
UpdateGroupCargo(Group);
for (mm in Group.Members) {
Group.Members[mm].Group = Group;
}
for (iu in Group.Inventory) {
Group.Inventory[iu].InUse = 0;
}
Map.ActivitySample._visible = false;
TotalAct = 0;
Activity = new Array();
var RedFont = new TextFormat();
RedFont.color = 16729156 /* 0xFF4444 */;
var WhiteFont = new TextFormat();
WihiteFont.color = 16777215 /* 0xFFFFFF */;
MDown = false;
ML = new Object();
ML.onMouseDown = function () {
MDown = true;
};
ML.onMouseUp = function () {
MDown = false;
};
ML.onMouseMove = function () {
PointerText._x = _xmouse + 10;
PointerText._y = _ymouse;
};
Mouse.addListener(ML);
tn = 1;
while (tn < Towns.length) {
Towns[tn].SquareX = Math.floor(eval ("Map.Town" + tn)._x / 400);
Towns[tn].SquareY = Math.floor(eval ("Map.Town" + tn)._y / 400);
Towns[tn].UseAmounts = new Array();
Towns[tn].Production = new Array();
for (Ind in Towns[tn].Industries) {
Towns[tn].Industries[Ind].Pointer = Industries[Towns[tn].Industries[Ind].Type];
}
Towns[tn].Stock = new Array();
for (Prp in Towns[tn].Property) {
Towns[tn].Stock[Towns[tn].Property[Prp].Type] = Towns[tn].Property[Prp];
}
n = 1;
while (n < Goods.length) {
if (!(Towns[tn].Stock[n] instanceof Object)) {
lst = Towns[tn].Property.push({Type:n, Amount:0});
Towns[tn].Stock[n] = Towns[tn].Property(lst - 1);
}
n++;
}
for (G in Goods) {
Goods[G].LowPrice = Goods[G].BasicValue / 2;
}
UpdateTownEconomy(Towns[tn]);
tn++;
}
RobbersNum = [[4, 5, 5, 8, 9, 10, 13, 14, 17, 8], [5, 0, 1, 5, 8, 10, 12, 13, 20, 13], [4, 1, 0, 5, 7, 9, 10, 12, 15, 11], [5, 5, 5, 6, 8, 9, 8, 8, 9, 8], [10, 9, 7, 10, 8, 9, 8, 7, 7, 6], [10, 12, 10, 8, 8, 7, 7, 7, 6, 2], [6, 6, 7, 7, 7, 7, 7, 5, 5, 2], [4, 6, 6, 5, 5, 5, 5, 5, 5, 2], [3, 4, 5, 5, 5, 5, 5, 4, 3, 1], [1, 2, 2, 2, 2, 2, 2, 2, 1, 1]];
Police = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 0, 0, 0, 0, 0, 0], [2, 7, 7, 2, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
Militia = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 2, 2, 0, 0, 0, 0, 0, 0], [3, 3, 3, 3, 0, 0, 0, 0, 0, 0], [3, 5, 5, 3, 0, 0, 0, 0, 0, 0], [3, 5, 5, 3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
RobbersLevel = [[4, 4, 4, 4, 4, 5, 5, 5, 6, 5], [4, 5, 5, 4, 4, 5, 5, 6, 7, 6], [4, 5, 5, 4, 3, 5, 5, 5, 6, 5], [4, 4, 4, 4, 3, 3, 3, 3, 2, 2], [4, 4, 4, 3, 3, 3, 3, 2, 2, 2], [4, 4, 4, 3, 3, 2, 2, 2, 2, 2], [4, 4, 4, 3, 2, 2, 1, 1, 1, 1], [4, 4, 4, 3, 2, 2, 1, 1, 1, 1], [4, 4, 4, 3, 2, 2, 1, 1, 1, 1], [4, 4, 4, 3, 2, 2, 1, 1, 1, 1]];
RobbersNum = ReverseXY(RobbersNum);
RobbersLevel = ReverseXY(RobbersLevel);
Police = ReverseXY(Police);
Militia = ReverseXY(Militia);
PTCol = new Color(PointerText);
Min = 50;
Hour = 23;
Day = 5;
Month = 3;
Year = 1;
SwitchMode(1);
i = 1;
while (i < Towns.length) {
if (!Towns[i].Virtual) {
Towns[i].x = eval ("Map.Town" + i)._x;
Towns[i].y = eval ("Map.Town" + i)._y;
duplicateMovieClip (SMap.TownSample, "Town" + i, SMap.getNextHighestDepth());
duplicateMovieClip (SMap.TownNameSample, "TName" + i, SMap.getNextHighestDepth());
eval ("SMap.Town" + i)._x = (Towns[i].x / 10) + 45;
eval ("SMap.Town" + i)._y = (Towns[i].y / 10) + 45;
eval ("SMap.Town" + i)._xscale = (eval ("SMap.Town" + i)._yscale = 50 + (Towns[i].Population / 20));
eval ("Map.Town" + i)._xscale = (eval ("Map.Town" + i)._yscale = 50 + (Towns[i].Population / 10));
eval ("SMap.TName" + i)._x = eval ("SMap.Town" + i)._x;
eval ("SMap.TName" + i)._y = (eval ("SMap.Town" + i)._y + (eval ("SMap.Town" + i)._height / 2)) + 5;
eval ("SMap.TName" + i).Txt = Towns[i].Name;
}
i++;
}
SMap.TownSample._visible = false;
SMap.TownNameSample._visible = false;
SMap.createEmptyMovieClip("Draw", SMap.getNextHighestDepth());
Drawing = false;
halfPI = (Math.PI/2);
dblPI = (Math.PI*2);
Rad2Deg = 360 / dblPI;
if (Loading == undefined) {
ac = 1;
while (ac < Routes.length) {
AddCaravan(ac);
ac++;
}
Group.Direction = CalcAngle(3230, 3130, Map.Town16._x, Map.Town16._y);
}
Map.RBase._x = 3400;
Map.RBase._y = 420;
if (Loading != undefined) {
Load(Loading);
Loading = undefined;
}
if ((GameMode == 2) and OnSite()) {
TryActivate = true;
TryAgainCounter = 0;
AccessDenied = false;
KeepAlive = false;
KeepAliveCounter = 0;
BlockSend = false;
Send = new LoadVars();
Receive = new LoadVars();
this.onEnterFrame = function () {
if (TryActivate and (!BlockSend)) {
TryAgainCounter--;
if (TryAgainCounter <= 0) {
if (OriginalID != undefined) {
Send.D = CompMode + String(OriginalID);
} else {
Send.D = CompMode;
}
TryActivate = false;
Send.sendAndLoad("caravaneer/activate.php", Receive);
Receive.onLoad = function (success) {
if (success) {
if (Receive.S == 0) {
GameIndex = Number(Receive.D.substring(6, Receive.D.length));
GamePass = Receive.D.substring(0, 6);
KeepAlive = true;
} else if (Receive.S == 1) {
BlockSend = true;
} else {
TryActivate = true;
TryAgainCounter = 250;
}
} else {
TryActivate = true;
TryAgainCounter = 250;
}
};
}
}
if (KeepAlive and (!BlockSend)) {
KeepAliveCounter++;
if (KeepAliveCounter >= 1500) {
KeepAliveCounter = 0;
KeepAlive = false;
Send.D = GamePass + String(GameIndex);
Send.sendAndLoad("caravaneer/keepalive.php", Receive);
Receive.onLoad = function (success) {
if (success) {
if (Receive.S == 0) {
KeepAlive = true;
KeepAliveCounter = 0;
}
if (Receive.S == 1) {
BlockSend = true;
}
} else {
KeepAlive = true;
KeepAliveCounter = 0;
}
};
}
}
};
}
Instance of Symbol 3298 MovieClip "TMenu" in Frame 10
onClipEvent (load) {
function DisplayCount(On, Product) {
if (On) {
PWindow._visible = true;
PWindow.Product = Product;
if (Mode == 1) {
PWindow.TitleText = "Buy ";
} else {
PWindow.TitleText = "Sell ";
}
PWindow.TitleText = PWindow.TitleText + _parent.Goods[Product.Type].Name;
PWindow.BSText.gotoAndStop(Mode);
PWindow.UnitsText = 0;
PWindow.UpdatePriceText();
PWindow.UsedNums = false;
if (Mode == 1) {
PWindow.Max = _parent.MaxBuy(_parent.Towns[_parent.Group.InTown], Product, _parent.Group.FreeCargo, _parent.Group.Money);
if (PWindow.Max < 0) {
PWindow.Max = 0;
}
if (Product.Type == 9) {
PWindow.Max = Math.min(PWindow.Max, _parent.Group.MaxFuel - _parent.Group.Fuel);
}
} else {
PWindow.Max = Product.Amount;
}
PrevButtEnabled = MarketList.PrevButt.enabled;
NextButtEnabled = MarketList.NextButt.enabled;
MarketList.PrevButt.enabled = false;
MarketList.NextButt.enabled = false;
BSButt.enabled = false;
} else {
PWindow._visible = false;
if (PrevButtEnabled) {
MarketList.PrevButt.enabled = true;
}
if (NextButtEnabled) {
MarketList.NextButt.enabled = true;
}
BSButt.enabled = true;
}
be = 1;
while (be <= 5) {
eval ("MarketList.Item" + be).ActionButt.enabled = !On;
be++;
}
}
function MissileRange(Pars) {
Rt = new Array();
cp = 0;
while (cp < Pars.length) {
if (Pars[cp].toUpperCase() == "ALL") {
am = 1;
while (am < Missiles.length) {
if (Missiles[am].Exists) {
Rt.push(am);
}
am++;
}
} else if (Pars[cp].indexOf("-") != -1) {
P1 = Number(Pars[cp].substring(0, Pars[cp].indexOf("-")));
P2 = Number(Pars[cp].substring(Pars[cp].indexOf("-") + 1, Pars[cp].length));
if (isNaN(P1) or isNaN(P2)) {
Rt = cp;
break;
}
ap = P1;
while (ap <= P2) {
if ((ap < Missiles.length) and Missiles[ap].Exists) {
Rt.push(ap);
}
ap++;
}
} else if (!isNaN(Pars[cp])) {
if ((Pars[cp] < Missiles.length) and Missiles[Pars[cp]].Exists) {
Rt.push(Pars[cp]);
}
} else {
Rt = cp;
break;
}
cp++;
}
return(Rt);
}
Txt = (PrevTxt = "Welcome to LCon 2.0.\rType your command:\r");
Command = "";
SDInProgress = false;
SDInitiating = false;
CalledAttention = false;
LConMode = 1;
Missiles = new Array();
i = 1;
while (i <= 11) {
if (i < 9) {
WH = "M348-WH58-C";
MR = 1360;
} else {
WH = "M348-CWH-2";
MR = 1521;
}
Missiles[i] = {Status:"C", Heating:0, Selected:false, Warhead:WH, Azimuth:82.5, Range:960, MaxRange:MR, Exists:true};
i++;
}
_parent.KeyListener = new Object();
_parent.KeyListener.onKeyDown = function () {
if (((_currentframe == 12) and (LConMode == 1)) or (LConMode == 2)) {
KeyCode = Key.getAscii();
if ((KeyCode != 8) and (KeyCode != 13)) {
Command = Command + chr(KeyCode);
}
if (KeyCode == 8) {
Command = Command.substring(0, Command.length - 1);
}
if (LConMode == 2) {
PrevTxt = PrevTxt + Command;
if (chr(KeyCode).toUpperCase() == "Y") {
OnConfirm();
} else {
PrevTxt = PrevTxt + "\rCanceled\r\rType your command:\r";
LConMode = 1;
}
Command = "";
}
if ((KeyCode == 13) and (LConMode == 1)) {
ReturnText = "";
SplitCom = Command.split(" ");
Operator = SplitCom[0];
Params = new Array();
sp = 1;
while (sp < SplitCom.length) {
Params.push(SplitCom[sp]);
sp++;
}
switch (Operator.toUpperCase()) {
case "ADD" :
if (Params.length > 0) {
Range = MissileRange(Params);
if (Range instanceof Array) {
ReturnText = "Adding missiles to selection: ";
ms = 0;
while (ms < Range.length) {
Missiles[Range[ms]].Selected = true;
ReturnText = ReturnText + Range[ms];
if (ms < (Range.length - 1)) {
ReturnText = ReturnText + ", ";
}
ms++;
}
} else {
ReturnText = "Error. Invalid parameter: " + Params[Range];
}
} else {
ReturnText = "Error. No parameters specified.";
}
break;
case "SELECT" :
if (Params.length > 0) {
Range = MissileRange(Params);
if (Range instanceof Array) {
ReturnText = "New selected missiles: ";
for (ms in Missiles) {
Missiles[ms].Selected = false;
}
ms = 0;
while (ms < Range.length) {
Missiles[Range[ms]].Selected = true;
ReturnText = ReturnText + Range[ms];
if (ms < (Range.length - 1)) {
ReturnText = ReturnText + ", ";
}
ms++;
}
} else {
ReturnText = "Error. Invalid parameter: " + Params[Range];
}
} else {
ReturnText = "Error. No parameters specified.";
}
break;
case "DESELECT" :
if (Params.length > 0) {
Range = MissileRange(Params);
if (Range instanceof Array) {
ReturnText = "Deselecting missiles: ";
ms = 0;
while (ms < Range.length) {
Missiles[Range[ms]].Selected = false;
ReturnText = ReturnText + Range[ms];
if (ms < (Range.length - 1)) {
ReturnText = ReturnText + ", ";
}
ms++;
}
} else {
ReturnText = "Error. Invalid parameter: " + Params[Range];
}
} else {
ReturnText = "Error. No parameters specified.";
}
break;
case "INVERT" :
for (im in Missiles) {
Missiles[im].Selected = !Missiles[im].Selected;
}
ReturnText = "Inverting selection.";
break;
case "REBOOT" :
PrevTxt = PrevTxt + ((Command + "\r") + "Are you sure you want to reboot? (Y/N): ");
LConMode = 2;
OnConfirm = function () {
Command = "";
ReturnTo1 = true;
LConMode = 3;
LConCounter = 150;
TxtSnapshot = (Txt = "");
Fld.scroll = 0;
WaitText = "Rebooting";
for (dm in Missiles) {
Missiles[dm].Selected = false;
}
OnDone = function () {
Txt = (PrevTxt = "Welcome to LCon 2.0.\rType your command:\r");
};
};
break;
case "CLR" :
Txt = (PrevTxt = "Type your command:\r");
Fld.scroll = 0;
Command = "";
break;
case "LIST" :
ms = 1;
while (ms < Missiles.length) {
if (Missiles[ms].Exists) {
if (Missiles[ms].Selected) {
SelNot = "*";
} else {
SelNot = "";
}
ReturnText = ReturnText + (((((((((("\r" + ms) + SelNot) + " - WH: ") + Missiles[ms].Warhead) + "; ST: ") + Missiles[ms].Status) + "; AZ: ") + Missiles[ms].Azimuth) + "; RNG: ") + Missiles[ms].Range);
}
ms++;
}
break;
case "HEAT" :
ms = 1;
while (ms < Missiles.length) {
if ((Missiles[ms].Exists and Missiles[ms].Selected) and (Missiles[ms].Status != "R")) {
Missiles[ms].Status = "H";
}
ms++;
}
ReturnText = "Heating selected missiles.";
break;
case "COOL" :
ms = 1;
while (ms < Missiles.length) {
if (Missiles[ms].Exists and Missiles[ms].Selected) {
Missiles[ms].Status = "C";
}
ms++;
}
ReturnText = "Cooling selected missiles.";
break;
case "SET" :
switch (Params[0].toUpperCase()) {
case "AZIMUTH" :
if (((!isNaN(Params[1])) and (Params[1] >= 0)) and (Params[1] < 360)) {
SelMissiles = 0;
for (ms in Missiles) {
if (Missiles[ms].Exists and Missiles[ms].Selected) {
Missiles[ms].Azimuth = _parent.NumberFormat(Params[1], 1);
SelMissiles++;
}
}
if (SelMissiles > 0) {
OnDone = Number.NaN;
ReturnTo1 = true;
LConMode = 3;
LConCounter = 150;
Txt = PrevTxt + Command;
TxtSnapshot = Txt;
WaitText = "Setting azimuth";
CalledAttention = true;
} else {
ReturnText = "Error. No missiles selected.";
}
} else {
ReturnText = "Error. Invalid value.";
}
break;
case "RANGE" :
if ((!isNaN(Params[1])) and (Params[1] > 10)) {
SelMissiles = 0;
MaxRange = Infinity;
AboveMax = new Array();
ms = 1;
while (ms < Missiles.length) {
if ((Missiles[ms].Exists and Missiles[ms].Selected) and (Missiles[ms].MaxRange < Params[1])) {
if (Missiles[ms].MaxRange < MaxRange) {
MaxRange = Missiles[ms].MaxRange;
}
AboveMax.push(ms);
}
ms++;
}
if (AboveMax.length > 0) {
PrevTxt = PrevTxt + ((Command + "\r") + "Missiles ");
am = 0;
while (am < AboveMax.length) {
PrevTxt = PrevTxt + AboveMax[am];
if (am < (AboveMax.length - 1)) {
PrevTxt = PrevTxt + ", ";
}
am++;
}
PrevTxt = PrevTxt + ((" can't reach the range you specified.\rDo you want to set range to " + MaxRange) + " Km? (Y/N): ");
LConMode = 2;
Command = "";
OnConfirm = function () {
for (ms in Missiles) {
if (Missiles[ms].Exists and Missiles[ms].Selected) {
Missiles[ms].Range = _parent.NumberFormat(MaxRange, 3);
SelMissiles++;
}
}
OnDone = Number.NaN;
ReturnTo1 = true;
LConMode = 3;
Command = "";
LConCounter = 100;
Txt = PrevTxt + Command;
TxtSnapshot = Txt;
WaitText = "Setting range";
CalledAttention = true;
};
} else {
for (ms in Missiles) {
if (Missiles[ms].Exists and Missiles[ms].Selected) {
Missiles[ms].Range = _parent.NumberFormat(Params[1], 3);
SelMissiles++;
}
}
if (SelMissiles > 0) {
OnDone = Number.NaN;
ReturnTo1 = true;
LConMode = 3;
LConCounter = 100;
Txt = PrevTxt + Command;
TxtSnapshot = Txt;
WaitText = "Setting range";
CalledAttention = true;
} else {
ReturnText = "Error. No missiles selected.";
}
}
} else {
ReturnText = "Error. Invalid value.";
}
break;
default :
ReturnText = "Error. Invalid parameter: " + Params[0];
}
break;
case "TEST" :
NoSel = false;
Testing = 1;
while ((!Missiles[Testing].Exists) or (!Missiles[Testing].Selected)) {
Testing++;
if (Testing >= Missiles.length) {
NoSel = true;
break;
}
}
if (!NoSel) {
OnDone = function () {
Txt = Txt + "OK";
Testing++;
do {
if (!((!Missiles[Testing].Exists) or (!Missiles[Testing].Selected))) {
break;
}
Testing++;
} while (Testing < Missiles.length);
if ((Testing + 1) >= Missiles.length) {
Txt = Txt + "\rTest complete. No problems found.\r\rType your command:\r";
LConMode = 1;
} else {
LConCounter = 100;
TxtSnapShot = Txt;
WaitText = "Testing missile " + Testing;
}
PrevTxt = (TxtSnapshot = Txt);
};
LConMode = 3;
ReturnTo1 = false;
LConCounter = 100;
Txt = PrevTxt + Command;
TxtSnapshot = Txt;
WaitText = "Testing missile " + Testing;
} else {
ReturnText = "Error. No missiles selected";
}
break;
case "LAUNCH" :
SelMis = new Array();
ms = 1;
while (ms < Missiles.length) {
if (Missiles[ms].Exists and Missiles[ms].Selected) {
SelMis.push(ms);
}
ms++;
}
if (SelMis.length > 0) {
NotReady = new Array();
ms = 0;
while (ms < Missiles.length) {
if ((Missiles[ms].Exists and Missiles[ms].Selected) and (Missiles[ms].Status != "R")) {
NotReady.push(ms);
}
ms++;
}
if (NotReady.length == 0) {
PrevTxt = PrevTxt + "\rAre you sure you want to launch missiles ";
ms = 0;
while (ms < SelMis.length) {
PrevTxt = PrevTxt + SelMis[ms];
if (ms < (SelMis.length - 1)) {
PrevTxt = PrevTxt + ", ";
}
ms++;
}
PrevTxt = PrevTxt + " (Y/N): ";
LConMode = 2;
Command = "";
OnConfirm = function () {
Command = "";
ms = 1;
while (ms < Missiles.length) {
if (Missiles[ms].Exists and Missiles[ms].Selected) {
Missiles[ms].Exists = false;
}
ms++;
}
OnDone = Number.NaN;
LConMode = 3;
ReturnTo1 = true;
LConCounter = 70;
Txt = PrevTxt + Command;
TxtSnapshot = Txt;
WaitText = "Launching";
CalledAttention = true;
};
} else {
ReturnText = "Error. Missiles ";
ms = 0;
while (ms < NotReady.length) {
ReturnText = ReturnText + NotReady[ms];
if (ms < (NotReady.length - 1)) {
ReturnText = ReturnText + ", ";
}
ms++;
}
ReturnText = ReturnText + " are not ready";
}
} else {
ReturnText = "Error. No missiles selected.";
}
break;
case "HELP" :
ReturnText = "Error. Help file missing.";
break;
case "EXECUTE" :
switch (Params[0].toUpperCase()) {
case "PROTOCOL37" :
OnConfirm = function () {
PrevTxt = (Txt = "System locked.");
_parent.Story.SystemLocked = true;
Fld.scroll = 0;
Key.removeListener(_parent.KeyListener);
Command = "";
};
PrevTxt = PrevTxt + ((Command + "\r") + "Are you sure you want to execute protocol #37 'System Lock'? (Y/N): ");
LConMode = 2;
Command = "";
break;
case "PROTOCOL8" :
OnConfirm = function () {
_parent.Story.PowerOff = true;
_parent.Story.RestorePower = 3;
PrevTxt = (Txt = "Welcome to LCon 2.0.\rType your command:\r");
LConMode = 1;
Cover._visible = true;
Key.removeListener(_parent.KeyListener);
Command = "";
for (ms in Missiles) {
Missiles[ms].Selected = false;
Missiles[ms].Status = "C";
}
};
PrevTxt = PrevTxt + ((Command + "\r") + "Are you sure you want to execute protocol #8 'Power Shutdown'? (Y/N): ");
LConMode = 2;
Command = "";
break;
case "PROTOCOL41" :
OnConfirm = function () {
PowerOff = true;
Command = "";
OnDone = function () {
Cover._visible = true;
Key.removeListener(_parent.KeyListener);
if (SDInitiating) {
SDInProgress = true;
SDCounter = 4500;
}
};
LConMode = 3;
ReturnTo1 = false;
LConCounter = 150;
Txt = PrevTxt + Command;
TxtSnapshot = Txt;
WaitText = "Initiating self destruction";
_parent.Story.RestorePower = Number.NaN;
SDInitiating = true;
};
PrevTxt = PrevTxt + ((Command + "\r") + "Are you sure you want to execute protocol #41 'Self Destruction'? (Y/N): ");
LConMode = 2;
Command = "";
break;
default :
ReturnText = "Error. No such file or protocol: " + Params[0];
}
break;
default :
ReturnText = "Error. Unknown command: " + Operator.toUpperCase();
}
if ((Command.length > 0) and (LConMode == 1)) {
PrevTxt = PrevTxt + ((((((Command + "\r") + ReturnText) + "\r") + "\r") + "Type your command:") + "\r");
}
Command = "";
}
Txt = PrevTxt + Command;
if ((Fld.textHeight - (Fld.scroll * 15)) > 200) {
Fld.scroll = Fld.scroll + Math.ceil(((Fld.textHeight - (Fld.scroll * 15)) - 200) / 15);
}
}
};
Key.addListener(_parent.KeyListener);
this.createEmptyMovieClip("Clk", this.getNextHighestDepth());
Clk.onEnterFrame = function () {
if (SDInProgress) {
SDCounter--;
if ((SDCounter == 1000) and InTheBase) {
CalledAttention = true;
}
Secs = Math.ceil(SDCounter / 25);
Mins = Math.floor(Secs / 60);
Secs = Secs % 60;
SDText = (("Self Destruction in:\r" + Mins) + ":") + Secs;
if (SDCounter == 0) {
SDText = "";
SpecialAction(10);
SDInProgress = false;
_parent.Story.PowerOff = true;
}
} else {
SDText = "";
if (_currentframe == 12) {
MTxt = "";
dm = 1;
while (dm < Missiles.length) {
if (Missiles[dm].Exists) {
if (Missiles[dm].Selected) {
MTxt = MTxt + "<font color='#000000'><b>";
} else {
MTxt = MTxt + "<font color='#008800'>";
}
MTxt = MTxt + (((dm + "[") + Missiles[dm].Status) + "] ");
if (Missiles[dm].Selected) {
MTxt = MTxt + "</b>";
}
MTxt + "</font>";
}
dm++;
}
}
if (LConMode == 3) {
Dots = "";
ad = 1;
while (ad <= (Math.ceil(LConCounter / 2) % 4)) {
Dots = Dots + ".";
ad++;
}
Txt = ((TxtSnapshot + "\r") + WaitText) + Dots;
if ((Fld.textHeight - (Fld.scroll * 15)) > 200) {
Fld.scroll = Fld.scroll + Math.ceil(((Fld.textHeight - (Fld.scroll * 15)) - 200) / 15);
}
LConCounter--;
if (LConCounter == 0) {
Txt = ((TxtSnapshot + "\r") + WaitText) + "...";
if (ReturnTo1) {
Txt = Txt + "\rDone.\r\rType your command:\r";
LConMode = 1;
}
PrevTxt = Txt;
OnDone();
if ((Fld.textHeight - (Fld.scroll * 15)) > 200) {
Fld.scroll = Fld.scroll + Math.ceil(((Fld.textHeight - (Fld.scroll * 15)) - 200) / 15);
}
}
}
for (msl in Missiles) {
if ((Missiles[msl].Status == "C") and (Missiles[msl].Heating > 0)) {
Missiles[msl].Heating--;
}
if (Missiles[msl].Status == "H") {
Missiles[msl].Heating++;
if (Missiles[msl].Heating >= 1000) {
Missiles[msl].Status = "R";
}
}
}
}
};
}
Instance of Symbol 4282 MovieClip "BMenu" in Frame 10
onClipEvent (load) {
function SelectButton(ButtNum) {
for (sb in this) {
if ((this[sb] instanceof MovieClip) and (Number(sb) == sb)) {
if (sb == ButtNum) {
this[sb]._visible = true;
} else {
this[sb]._visible = false;
}
}
}
}
}
Frame 11
if (!MusicOn) {
Mus.setVolume(0);
} else {
if ((MusicFade > 0) and (Mus.getVolume() < 100)) {
Mus.setVolume(Mus.getVolume() + MusicFade);
}
if ((MusicFade < 0) and (Mus.getVolume() > 0)) {
Mus.setVolume(Mus.getVolume() + MusicFade);
}
}
SoundOn = MusicOn or FXOn;
if (OldSoundOn != SoundOn) {
if (SoundOn) {
Hor.setVolume(100);
} else {
Hor.setVolume(0);
}
}
OldSoundOn = SoundOn;
if (Key.isDown(32) and (!SpacePressed)) {
SpacePressed = true;
}
if (!Key.isDown(32)) {
SpacePressed = false;
}
Group.Money = NumberFormat(Group.Money, 2);
Group.FreeCargo = NumberFormat(Group.FreeCargo, 3);
if (GameMode == 2) {
if ((CompMode == 1) and (Group.Money >= 1000000)) {
gotoAndStop ("Submit Score");
}
if ((CompMode == 2) and (Competitive.PlayTime >= 3880)) {
gotoAndStop ("Submit Score");
}
}
if (Mode == 1) {
if (GameMode == 2) {
Competitive.PlayTime = Competitive.PlayTime + GameSpeed;
}
if ((LackingCaravans.length > 0) and (random(20000) == 0)) {
NewCaravanSlot = random(LackingCaravans.length);
NewCaravan = LackingCaravans[NewCaravanSlot];
LackingCaravans.splice(NewCaravanSlot, 1);
if (NewCaravan != 6) {
AddCaravan(NewCaravan);
}
News.unshift({Type:2, Time:FormatedTime(), Route:NewCaravan});
}
if ((((Group.SquareX == 8) and (Group.SquareY == 1)) and (GameMode == 1)) and (!Story.RBaseDestroyed)) {
RBaseDist = CalcDistance(Map.RBase._x, Map.RBase._y, Group.x, Group.y);
if (RBaseDist < 40) {
Map.RBase._visible = true;
} else {
Map.RBase._visible = false;
}
if (RBaseDist < 10) {
if (!OverBase) {
if (!Story.RBaseVisited) {
Messages.push({Type:11});
} else if (Story.SentToBase) {
if ((Group.Mechanic >= 100) or (!Story.EngineerKilled)) {
Messages.push({Type:14});
} else {
Messages.push({Type:15});
}
} else {
Messages.push({Type:16});
}
}
OverBase = true;
} else {
OverBase = false;
}
} else {
Map.RBase._visible = false;
}
if (GameMode == 1) {
if (Story.SentToBase and Story.RBaseDestroyed) {
DefaultStages[2] = 50;
Story.SentToBase = false;
}
if (Story.EngineerKilled and (!Story.RBaseDestroyed)) {
DefaultStages[2] = 64;
}
if (Story.SentToCaravanX and Story.CaravanXDestroyed) {
Story.SentToCaravanX = false;
DefaultStages[2] = 65;
}
if (Story.SentToDisableMissiles and Story.BeenToTheBase) {
DefaultStages[2] = 79;
Story.SentToDisableMissiles = false;
}
if (Story.SentToDisableMissiles2 and Story.MissilesDisabled) {
DefaultStages[2] = 102;
Story.SentToDisableMissiles2 = false;
}
}
if (Messages.length > 0) {
TheMessage = Messages.shift();
MDown = false;
PointerText.Txt = "";
if (TheMessage.Type == 1) {
TheMem = Group.Members[TheMessage.Member];
TheMem.Status = 3;
if (TheMem.Autopay) {
if (TheMem.Salary <= Group.Money) {
TheMem.Status = 1;
Group.Money = Group.Money - TheMem.Salary;
EnoughMoney = true;
} else {
EnoughMoney = false;
}
} else if (TheMem.Salary <= Group.Money) {
MB.TitleText = "";
MB.MessageText = ((((((((("Today is " + TheMem.Name) + "'s payday.") + "\r") + TheMem.Name) + "'s salay is $") + TheMem.Salary) + "\r") + "Dou you want ro rehire ") + TheMem.Name) + " for another month?";
MB.MBButtons.gotoAndStop(4);
MB.OnOK = function () {
Group.Money = Group.Money - TheMem.Salary;
TheMem.Status = 1;
SwitchMode(1);
MDown = false;
};
MB.OnNo = function () {
if (Group.InTown > 0) {
Dismiss(TheMem);
} else {
TheMem.Status = 2;
}
SwitchMode(1);
MDown = false;
};
EnoughMoney = true;
} else {
EnoughMoney = false;
}
if (!EnoughMoney) {
MB.TitleText = "";
MB.MessageText = (((("You do not have enough money to pay " + TheMem.Name) + "'s salary.") + "\r") + TheMem.Name) + " must be dismissed.";
MB.MBButtons.gotoAndStop(3);
if (Group.InTown > 0) {
Dismiss(TheMem);
} else {
TheMem.Status = 2;
}
}
}
if (TheMessage.Type == 2) {
MB.TitleText == "";
OverWeight = NumberFormat(Group.CargoWeight - Group.MaxCargo, 3);
MB.MessageText = ((("You have " + OverWeight) + " Kg of overweight and can't move any further.") + "\r") + "Go to \"Caravan\" menu and throw away something.";
MB.MBButtons.gotoAndStop(3);
}
if (TheMessage.Type == 3) {
MB.TitleText = "";
MB.MessageText = TheMessage.Name + " has died";
MB.MBButtons.gotoAndStop(3);
}
if (TheMessage.Type == 4) {
MB.TitleText == "";
MB.MBButtons.gotoAndStop(3);
if (Transports[TheMessage.Trans].Class == 1) {
DieText = " has died";
} else {
DieText = " has broken";
}
MB.MessageText = ("A " + Transports[TheMessage.Trans].Name) + DieText;
}
if (TheMessage.Type == 5) {
MB.TitleText = "";
MB.MBButtons.gotoAndStop(3);
if (TheMessage.OverCarts == 1) {
Txt1 = "cart";
} else {
Txt1 = "carts";
}
MB.MessageText = ((("You don't have enough animals to draw all your carts.\rYou must leave " + OverCarts) + " ") + Txt1) + " before you proceed";
}
if (TheMessage.Type == 6) {
MB.TitleText = "";
MB.MBButtons.gotoAndStop(3);
if ((Group.Cars - Group.Members.length) == 1) {
Txt1 = "car";
} else {
Txt1 = "cars";
}
MB.MessageText = ((("You don't have enough people to drive all your cars.\rYou must leave " + (Group.Cars - Group.Members.length)) + " ") + Txt1) + " before you proceed";
}
if (TheMessage.Type == 7) {
MB.TitleText = "";
MB.MBButtons.gotoAndStop(2);
MB.MessageText = "You are out of fuel.\rYou must leave all your cars before you proceed.";
MB.OnOK = function () {
for (rc in Group.Transport) {
if (Transports[Group.Transport[rc].Type].Class == 3) {
Group.Transport.splice(rc, 1);
}
}
UpdateGroupParams(Group);
Group.Move = true;
MDown = false;
SwitchMode(1);
};
}
if ((TheMessage.Type == 8) or (TheMessage.Type == 9)) {
switch (RivalGroup.Type) {
case 1 :
RivalName = "robbers";
break;
case 2 :
RivalName = "a caravan";
break;
case 3 :
RivalName = "a police unit";
break;
case 4 :
RivalName = "a Desert Patrol squad";
break;
case 7 :
RivalName = "an army regiment";
}
}
if (TheMessage.Type == 8) {
MB.MBButtons.gotoAndStop(5);
UnArmed = false;
for (cm in Group.Members) {
if ((!(Group.Members[cm].Holding[0] instanceof Object)) and (!(Group.Members[cm].Holding[1] instanceof Object))) {
UnArmed = true;
break;
}
}
if (!UnArmed) {
MB.TitleText = "";
MB.MessageText = ((("You are attacked by " + RivalName) + ".") + "\r") + "It's recommended to go to Caravan menu and make sure all your men have appropriate weapons and enough ammo.";
} else {
MB.TitleText = "WARNING!";
MB.MessageText = ((("You are attacked by " + RivalName) + " and some of your men are unarmed.") + "\r") + "Go to Caravan menu and try to redistribute your weapons the way everyone will have something to fight with.";
}
MB.OnOK = function () {
BattleLocation = 0;
SwitchMode(6);
};
}
if (TheMessage.Type == 9) {
MB.MBButtons.gotoAndStop(6);
MB.TitleText = "";
MB.MessageText = ((("You have encountered " + RivalName) + "\r") + "Would you like to attack?") + "\r";
if (RivalGroup.Type == 2) {
MB.MessageText = MB.MessageText + "***Remember that attacking a caravan may seriously spoil your reputation.";
}
if (RivalGroup.Type == 3) {
MB.MessageText = MB.MessageText + "***If you attack a police squad, you will become a criminal.";
}
if (RivalGroup.Type == 4) {
MB.MessageText = MB.MessageText + "***If you attack a Desert Patrol squad, you will become Desert Patrol's enemy and other squads will attack you later.";
}
MB.OnOK = function () {
BattleLocation = 0;
SwitchMode(6);
};
}
if (TheMessage.Type == 10) {
MB.MBButtons.gotoAndStop(7);
MB.TitleText = "";
MB.MessageText = "You are on a protected territory and are required to pay $1000\r\rIf you choose to fight, you'll be daclared a criminal";
MB.OnOK = function () {
Group.Money = Group.Money - 1000;
if (Group.Money < 0) {
Group.Money = 0;
}
RivalGroup.Money = RivalGroup.Money + 1000;
RivalGroup.Payed = true;
RivalGroup.OverIt = true;
SwitchMode(1);
MDown = false;
};
MB.OnNo = function () {
BattleLocation = 0;
SwitchMode(6);
};
}
if (TheMessage.Type == 11) {
RivalGroup = BaseGuards;
MB.MBButtons.gotoAndStop(6);
MB.TitleText = "";
MB.MessageText = "You have found the robbers' base. Would you like to attack now?";
MB.OnOK = function () {
BattleLocation = 1;
SwitchMode(6);
};
}
if (TheMessage.Type == 12) {
MB.MBButtons.gotoAndStop(3);
MB.TitleText = "CONGRATULATIONS!";
MB.MessageText = "The robbers' base is destroyed.\rMission complete!";
}
if (TheMessage.Type == 13) {
MB.MBButtons.gotoAndStop(3);
MB.TitleText = "";
MB.MessageText = "The combat engineer has been killed, and you can't deploy the explosives yourself if you don't have 100 or more mechanic skill points.";
}
if (TheMessage.Type == 14) {
MB.MBButtons.gotoAndStop(1);
MB.TitleText = "";
MB.MessageText = "You are at the robbers' base and you have all it takes to destroy it. Would you like to do it now?";
MB.OnOK = function () {
Story.RBaseDestroyed = true;
for (re in Group.Cargo) {
if (Group.Cargo[re].Type == 14) {
Group.Cargo.splice(re, 1);
break;
}
}
News.unshift({Type:7, Time:FormatedTime()});
ReduceRobbersNum();
SwitchMode(1);
};
}
if (TheMessage.Type == 15) {
MB.MBButtons.gotoAndStop(3);
MB.TitleText = "";
MB.MessageText = "You are at the robbers' base, but you don't have enough mechanic skill points to deploy the explosives";
}
if (TheMessage.Type == 16) {
MB.MBButtons.gotoAndStop(3);
MB.TitleText = "";
MB.MessageText = "You are at the robbers' base. If you want to destroy it, you'll need some explosives.";
}
if (TheMessage.Type == 17) {
MB.MBButtons.gotoAndStop(3);
MB.TitleText = "";
MB.MessageText = "You have killed all the guards at the robbers' base. If you want to destroy the base, you'll need some explosives.";
}
if (TheMessage.Type == 18) {
MB.MBButtons.gotoAndStop(3);
MB.TitleText = "MISSION FAILED";
MB.MessageText = "You couldn\u2019t help Desert Patrol win the battle. All Desert Patrol members including John Sheppard were killed in action. Without them the revolt is impossible, and there\u2019s no hope left.";
}
SwitchMode(5);
} else {
Map._x = 245 - Group.x;
Map._y = 245 - Group.y;
if (Map._x > 5) {
Map._x = 5;
}
if (Map._x < -3515) {
Map._x = -3515;
}
if (Map._y > 5) {
Map._y = 5;
}
if (Map._y < -3515) {
Map._y = -3515;
}
Map.Group._x = Group.x;
Map.Group._y = Group.y;
Group.SquareX = Math.floor(Group.x / 400);
Group.SquareY = Math.floor(Group.y / 400);
GroupGlobal = {x:0, y:0};
Map.Group.localToGlobal(GroupGlobal);
if ((((_xmouse > (GroupGlobal.x - 10)) and (_xmouse < (GroupGlobal.x + 10))) and (_ymouse > (GroupGlobal.y - 10))) and (_ymouse < (GroupGlobal.y + 10))) {
Map.Group.Direction._visible = false;
PointerText._visible = true;
if (Group.Move) {
PointerText.Txt = "STOP";
if (MDown) {
Group.Move = false;
}
} else if (Group.InTown > 0) {
PointerText.Txt = "Enter " + Towns[Group.InTown].Name;
if (MDown) {
EnterCurrTown();
}
} else {
PointerText.Txt = "";
}
} else if ((((_xmouse > 5) and (_xmouse < 485)) and (_ymouse > 5)) and (_ymouse < 485)) {
PointerText._visible = true;
Map.Group.Direction._visible = true;
PointDir = CalcAngle(GroupGlobal.x, GroupGlobal.y, _xmouse, _ymouse);
PDDeg = PointDir * Rad2Deg;
Map.Group.Direction._rotation = PDDeg;
PointerText.Txt = Math.round(PDDeg) + "\u00BA";
if (MDown) {
Group.Move = true;
Group.Direction = PointDir;
}
} else {
PointerText._visible = false;
Map.Group.Direction._visible = false;
}
if (Group.Move) {
if (Group.CargoWeight > Group.MaxCargo) {
Group.Move = false;
Messages.push({Type:2});
}
OverCarts = 0;
for (ct in Group.Transport) {
if ((Transports[Group.Transport[ct].Type].Class == 2) and (!(Group.Transport[ct].Attached instanceof Object))) {
OverCarts++;
}
}
if (OverCarts > 0) {
Group.Move = false;
Messages.push({Type:5, OverCarts:OverCarts});
}
if (Group.Members.length < Group.Cars) {
Group.Move = false;
Messages.push({Type:6});
}
if ((Group.FuelUse > 0) and (Group.Fuel <= 0)) {
Group.Move = false;
Messages.push({Type:7});
}
}
if (Group.Move) {
DistributeCarts(Group);
Group.x = Group.x + ((Math.sin(Group.Direction) * Group.MapSpeed) * GameSpeed);
Group.y = Group.y - ((Math.cos(Group.Direction) * Group.MapSpeed) * GameSpeed);
if (Group.x > 3950) {
Group.x = 3950;
Group.Move = false;
}
if (Group.y > 3950) {
Group.y = 3950;
Group.Move = false;
}
if (Group.x < 50) {
Group.x = 50;
Group.Move = false;
}
if (Group.y < 50) {
Group.y = 50;
Group.Move = false;
}
BMenu.Movement.gotoAndStop(2);
BMenu.Movement.Dir = Math.round(Group.Direction * Rad2Deg) + "\u00BA";
BMenu.Movement.Speed = Group.Speed + " Kmh";
CheckTown = 0;
for (tn in Towns) {
if ((Towns[tn].SquareX == Group.SquareX) and (Towns[tn].SquareY == Group.SquareY)) {
if (CalcDistance(eval ("Map.Town" + tn)._x, eval ("Map.Town" + tn)._y, Group.x, Group.y) < eval ("Map.Town" + tn)._width) {
CheckTown = tn;
break;
}
}
}
if (CheckTown != Group.InTown) {
Group.InTown = CheckTown;
if (CheckTown > 0) {
EnterCurrTown();
}
}
Hit = random(1000);
if ((Hit < Group.Transport.length) and (Transports[Group.Transport[Hit].Type].Class > 1)) {
Group.Transport[Hit].HP = Group.Transport[Hit].HP - random(10);
UpdateTransportParams(Group.Transport[Hit]);
}
FuelPlace = Number.NaN;
for (sf in Group.Cargo) {
if (Group.Cargo[sf].Type == 9) {
FuelPlace = sf;
break;
}
}
if (!isNaN(FuelPlace)) {
Group.Cargo[FuelPlace].Amount = Group.Cargo[FuelPlace].Amount - ((Group.FuelUse * (Group.MapSpeed * GameSpeed)) / 500);
if (Group.Cargo[FuelPlace].Amount < 0) {
Group.Cargo[FuelPlace].Amount = 0;
}
Group.Fuel = Group.Cargo[FuelPlace].Amount;
}
} else {
BMenu.Movement.gotoAndStop(1);
}
BMenu.FoodTxt = Math.round(Group.Food);
BMenu.WaterTxt = Math.round(Group.Water);
BMenu.CargoTxt = (Math.round(Group.CargoWeight) + "/") + Group.MaxCargo;
BMenu.ForageTxt = Math.round(Group.Forage);
BMenu.MedsTxt = Math.round(Group.Meds);
BMenu.FuelTxt = Math.round(Group.Fuel);
if (Group.Food < (Group.Eat * 3)) {
BMenu.Food.setTextFormat(RedFont);
} else {
BMenu.Food.setNewTextFormat(WhiteFont);
}
if (Group.Water < (Group.Drink * 24)) {
BMenu.Water.setTextFormat(RedFont);
} else {
BMenu.Water.setNewTextFormat(WhiteFont);
}
if (Group.Forage < (Group.ForageUse * 3)) {
BMenu.Forage.setTextFormat(RedFont);
} else {
BMenu.Forage.setNewTextFormat(WhiteFont);
}
if (Group.Fuel < Group.FuelUse) {
BMenu.Fuel.setTextFormat(RedFont);
} else {
BMenu.Fuel.setNewTextFormat(WhiteFont);
}
if (Group.Move) {
CompareInd = Math.round(Group.Speed / 3);
} else {
CompareInd = 0;
}
if ((RobbersNum[Group.SquareX][Group.SquareY] > 0) and (random(Math.round(2500 / RobbersNum[Group.SquareX][Group.SquareY])) <= CompareInd)) {
AddRandomGroup(1, RobbersLevel[Group.SquareX][Group.SquareY]);
}
if ((Police[Group.SquareX][Group.SquareY] > 0) and (random(Math.round(2500 / Police[Group.SquareX][Group.SquareY])) <= CompareInd)) {
AddRandomGroup(3, 6);
}
if ((Militia[Group.SquareX][Group.SquareY] > 0) and (random(Math.round(2500 / Militia[Group.SquareX][Group.SquareY])) <= CompareInd)) {
AddRandomGroup(4, 6);
}
GroupsInArea = new Array();
a = 1;
while (a <= TotalAct) {
if (Activity[a].Active) {
if (!Activity[a].Stopped) {
Activity[a].x = Activity[a].x + ((Activity[a].MapSpeed * GameSpeed) * Math.sin(Activity[a].Direction));
Activity[a].y = Activity[a].y - ((Activity[a].MapSpeed * GameSpeed) * Math.cos(Activity[a].Direction));
Activity[a].SquareX = Math.floor(Activity[a].x / 400);
Activity[a].SquareY = Math.floor(Activity[a].y / 400);
}
if ((Math.abs(Activity[a].SquareX - Group.SquareX) <= 1) and (Math.abs(Activity[a].SquareY - Group.SquareY) <= 1)) {
GroupsInArea.push(Activity[a]);
Activity[a].GroupDist = CalcDistance(Activity[a].x, Activity[a].y, Group.x, Group.y);
} else {
Activity[a].GroupDist = Infinity;
if (((Activity[a].Type == 1) or (Activity[a].Type == 3)) or (Activity[a].Type == 4)) {
Activity[a].Active = false;
}
if ((Activity[a].Type == 2) and (Activity[a].Route != 6)) {
CompareInd = Math.round(Activity[a].Speed / 3);
AttackersDefenders = (RobbersNum[Activity[a].SquareX][Activity[a].SquareY] - Police[Activity[a].SquareX][Activity[a].SquareY]) - Militia[Activity[a].SquareX][Activity[a].SquareY];
if ((AttackersDefenders > 0) and (random(Math.round(3000 / AttackersDefenders)) <= CompareInd)) {
RobbersPower = (RobbersLevel[Activity[a].SquareX][Activity[a].SquareY] * 100) + random(200);
SimulateBattle(Activity[a], RobbersPower);
}
}
}
if (Activity[a].GroupDist <= (Activity[a].Noticeability * Group.VisibilityIncrease)) {
eval ("Map.A" + a)._visible = true;
if ((((Map._xmouse > (Activity[a].x - 10)) and (Map._xmouse < (Activity[a].x + 10))) and (Map._ymouse > (Activity[a].y - 10))) and (Map._ymouse < (Activity[a].y + 10))) {
OldTxt = PointerText.Txt;
if (Activity[a].Type == 1) {
AddText = ("Robbers (" + Activity[a].Members.length) + " men)";
}
if (Activity[a].Type == 2) {
if (Activity[a].Route == 6) {
AddText = "Caravan X";
} else {
AddText = "Caravan";
}
}
if (Activity[a].Type == 3) {
AddText = ("Police (" + Activity[a].Members.length) + " men)";
}
if (Activity[a].Type == 4) {
AddText = ("Desert Patrol (" + Activity[a].Members.length) + " men)";
}
if (Activity[a].Type == 5) {
AddText = "Desert Patrol Convoy";
}
if (Activity[a].Type == 6) {
AddText = "Desert Patrol Regiment";
}
if (Activity[a].Type == 7) {
AddText = "Army Regiment";
}
PointerText.Txt = (AddText + "\r") + OldTxt;
}
} else {
eval ("Map.A" + a)._visible = false;
}
eval ("Map.A" + a)._x = Activity[a].x;
eval ("Map.A" + a)._y = Activity[a].y;
if (Activity[a].Type == 2) {
if (CalcDistance(Activity[a].x, Activity[a].y, Activity[a].TargetX, Activity[a].TargetY) <= (Activity[a].MapSpeed * GameSpeed)) {
NextCaravanTarget(Activity[a]);
}
Activity[a].InTheWay++;
Activity[a].CoveredDist = Activity[a].CoveredDist + (Activity[a].MapSpeed * GameSpeed);
}
if (Activity[a].Type == 5) {
if (!Activity[a].AttackingRobbers) {
TargetPointX = Group.x + (Math.sin(Group.Direction + Activity[a].Angle) * Activity[a].Distance);
TargetPointY = Group.y - (Math.cos(Group.Direction + Activity[a].Angle) * Activity[a].Distance);
if (CalcDistance(Activity[a].x, Activity[a].y, TargetPointX, TargetPointY) > 5) {
Activity[a].Stopped = false;
Activity[a].MapSpeed = Activity[a].Speed / 10;
Activity[a].Direction = CalcAngle(Activity[a].x, Activity[a].y, TargetPointX, TargetPointY);
} else if (!Group.Move) {
Activity[a].Stopped = true;
} else {
if (Group.MapSpeed < Activity[a].MapSpeed) {
Activity[a].MapSpeed = Group.MapSpeed;
}
Activity[a].Direction = Group.Direction;
}
} else {
Activity[a].Stopped = false;
Activity[a].MapSpeed = Activity[a].Speed / 10;
}
}
if (Activity[a].Type == 6) {
switch (Activity[a].Phase) {
case 1 :
Activity[a].Direction = CalcAngle(Activity[a].x, Activity[a].y, Activity[a].Phase1Target.x, Activity[a].Phase1Target.y);
if (CalcDistance(Activity[a].x, Activity[a].y, Activity[a].Phase1Target.x, Activity[a].Phase1Target.y) < (Activity[a].MapSpeed * GameSpeed)) {
Activity[a].Phase = 2;
}
break;
case 2 :
Activity[a].Direction = CalcAngle(Activity[a].x, Activity[a].y, Activity[a].Phase2Target.x, Activity[a].Phase2Target.y);
if (CalcDistance(Activity[a].x, Activity[a].y, Activity[a].Phase2Target.x, Activity[a].Phase2Target.y) <= (Activity[a].MapSpeed * GameSpeed)) {
Activity[a].Phase = 3;
}
break;
case 3 :
EnemiesAlive = 0;
MinDistance = Infinity;
enm = 1;
while (enm <= TotalAct) {
if ((Activity[enm].Type == 7) and Activity[enm].Active) {
EnemiesAlive++;
EnemyDistance = CalcDistance(Activity[a].x, Activity[a].y, Activity[enm].x, Activity[enm].y);
if (EnemyDistance < MinDistance) {
ChosenAct = enm;
MinDistance = EnemyDistance;
}
}
enm++;
}
if (EnemiesAlive > 0) {
Activity[a].Direction = CalcAngle(Activity[a].x, Activity[a].y, Activity[ChosenAct].x, Activity[ChosenAct].y);
} else {
Activity[a].Phase = 4;
}
break;
case 4 :
Activity[a].Direction = CalcAngle(Activity[a].x, Activity[a].y, Map.Town6._x, Map.Town6._y);
if (CalcDistance(Activity[a].x, Activity[a].y, Map.Town6._x, Map.Town6._y) >= (Activity[a].MapSpeed * GameSpeed)) {
break;
}
Towns[6].Houses[12].Dialogue = 2;
Towns[4].Jouses[8].Revealed = false;
adpx = 0;
while (adpx <= 4) {
adpy = 0;
while (adpy <= 8) {
Militia[adpx][adpy] = 12 - Math.round(Math.abs(adpx - 2) + Math.abs(adpy - 2));
adpy++;
}
adpx++;
}
ReduceRobbersNum();
DefaultStages[2] = 121;
Mus.setVolume(0);
if (SoundOn) {
Hor.start();
}
Succeed.gotoAndStop(1);
Story.AllDone = true;
SwitchMode(8);
rr = 1;
for(;;){
if (rr > TotalAct) {
break;
}
if ((Activity[rr].Type == 6) and Activity[rr].Active) {
Activity[rr].Active = false;
Map["A" + rr]._visible = false;
}
rr++;
};
}
}
if (Activity[a].Type == 7) {
if (!Activity[a].Attacking) {
if (Activity[a].Phase == 1) {
Activity[a].Direction = CalcAngle(Activity[a].x, Activity[a].y, Activity[a].Target.x, Activity[a].Target.y);
if (CalcDistance(Activity[a].x, Activity[a].y, Activity[a].Target.x, Activity[a].Target.y) < (Activity[a].MapSpeed * GameSpeed)) {
Activity[a].Phase = 2;
Activity[a].Stopped = true;
}
}
if (Activity[a].Phase == 2) {
if (CalcDistance(Activity[a].x, Activity[a].y, Activity[a].Target.x, Activity[a].Target.y) > (Activity[a].MapSpeed * GameSpeed)) {
Activity[a].Stopped = false;
Activity[a].Phase = 1;
}
}
} else {
Activity[a].Stopped = false;
}
}
}
a++;
}
for (a in GroupsInArea) {
if (GroupsInArea[a].Active) {
GroupsInArea[a].SeeGroups = new Array();
for (aa in GroupsInArea) {
Hostile = ((((((GroupsInArea[a].Type == 1) and (GroupsInArea[aa].Type == 2)) and (GroupsInArea[aa].Route != 6)) or ((GroupsInArea[a].Type == 3) and (GroupsInArea[aa].Type == 1))) or ((GroupsInArea[a].Type == 4) and (GroupsInArea[aa].Type == 1))) or (((GroupsInArea[a].Type == 5) and (GroupsInArea[aa].Type == 1)) and (GroupsInArea[aa].GroupDist < ((GroupsInArea[aa].MapSpeed * GameSpeed) * 100)))) or ((GroupsInArea[a].Type == 7) and (GroupsInArea[aa].Type == 6));
if (((aa != a) and GroupsInArea[aa].Active) and Hostile) {
dst = CalcDistance(GroupsInArea[aa].x, GroupsInArea[aa].y, GroupsInArea[a].x, GroupsInArea[a].y);
if (dst <= (GroupsInArea[aa].Noticeability * GroupsInArea[a].VisibilityIncrease)) {
GroupsInArea[a].SeeGroups.push({Group:GroupsInArea[aa], Dist:dst});
}
}
}
GroupHostile = ((((GroupsInArea[a].Type == 1) or (((GroupsInArea[a].Type == 3) and (PoliceStatus < 1)) and (!GroupsInArea[a].Payed))) or ((GroupsInArea[a].Type == 3) and (PoliceStatus == -1))) or ((GroupsInArea[a].Type == 4) and (MilitiaStatus == -1))) or (GroupsInArea[a].Type == 7);
if ((GroupHostile and (GroupsInArea[a].GroupDist <= (Group.Noticeability * GroupsInArea[a].VisibilityIncrease))) and (Group.InTown == 0)) {
GroupsInArea[a].SeeGroups.push({Group:Group, Dist:GroupsInArea[a].GroupDist});
GroupsInArea[a].AttackingGroup = true;
}
if (GroupsInArea[a].AttackingGroup and (Group.InTown > 0)) {
GroupsInArea[a].Direction = dblPI * Math.random();
GroupsInArea[a].AttackingGroup = false;
}
if (((((!GroupHostile) and (GroupsInArea[a].GroupDist < 10)) and (!GroupsInArea[a].OverIt)) and (Group.InTown == 0)) and (GroupsInArea[a].Type != 5)) {
RivalGroup = GroupsInArea[a];
Messages.push({Type:9});
GroupsInArea[a].OverIt = true;
}
if (GroupsInArea[a].GroupDist > 10) {
GroupsInArea[a].OverIt = false;
}
if (GroupsInArea[a].SeeGroups.length > 0) {
if (GroupsInArea[a].Type == 5) {
GroupsInArea[a].AttackingRobbers = true;
}
if (GroupsInArea[a].Type == 7) {
GroupsInArea[a].Attacking = true;
}
GroupsInArea[a].SeeGroups.sortOn("Dist", 16);
AttGroup = GroupsInArea[a].SeeGroups[0].Group;
GroupsInArea[a].Direction = CalcAngle(GroupsInArea[a].x, GroupsInArea[a].y, AttGroup.x, AttGroup.y);
if ((AttGroup.Move or (AttGroup.Type > 0)) and (Math.abs(Math.abs(GroupsInArea[a].Direction - AttGroup.Direction) - Math.PI) > 0.1)) {
FramesToReach = GroupsInArea[a].SeeGroups[0].Dist / (GroupsInArea[a].MapSpeed * GameSpeed);
InterPointX = AttGroup.x + (((Math.sin(AttGroup.Direction) * AttGroup.MapSpeed) * GameSpeed) * FramesToReach);
InterPointY = AttGroup.y - (((Math.cos(AttGroup.Direction) * AttGroup.MapSpeed) * GameSpeed) * FramesToReach);
GroupsInArea[a].Direction = CalcAngle(GroupsInArea[a].x, GroupsInArea[a].y, InterPointX, InterPointY);
}
if (GroupsInArea[a].SeeGroups[0].Dist < 10) {
if (GroupsInArea[a].SeeGroups[0].Group.Type == 0) {
RivalGroup = GroupsInArea[a];
if (((GroupsInArea[a].Type == 1) or ((GroupsInArea[a].Type == 3) and (PoliceStatus == -1))) or (GroupsInArea[a].Type == 7)) {
Messages.push({Type:8});
}
if ((GroupsInArea[a].Type == 3) and (PoliceStatus == 0)) {
Messages.push({Type:10});
RivalGroup = GroupsInArea[a];
}
} else {
SimulateBattle(GroupsInArea[a], GroupsInArea[a].SeeGroups[0].Group);
}
}
} else {
if (GroupsInArea[a].Type == 5) {
GroupsInArea[a].AttackingRobbers = false;
}
if (GroupsInArea[a].Type == 7) {
GroupsInArea[a].Attacking = false;
}
}
}
}
Min++;
if (Min == 5) {
for (shp in Shops) {
for (ass in Shops[shp].Assortment) {
if ((random(48) == 0) and (Shops[shp].Assortment[ass].Amount > 0)) {
SellAmount = random(Math.round(Shops[shp].Assortment[ass].Amount / (random(10) + 1)) + 1);
if ((SellAmount > 0) and (Shops[shp].SubType == 2)) {
for (itm in Shops[shp].Stuff) {
if (Shops[shp].Stuff[itm].Type == Shops[shp].Assortment[ass].Type) {
Shops[shp].Stuff.splice(itm, 1);
SellAmount--;
if (SellAmount <= 0) {
break;
}
}
}
}
}
if (Hour == 9) {
if ((random(2) == 0) and (Shops[shp].Assortment[ass].Amount < Shops[shp].Assortment[ass].MaxAmount)) {
AddAmount = random(Math.round((Shops[shp].Assortment[ass].MaxAmount - Shops[shp].Assortment[ass].Amount) / (random(10) + 1)) + 1);
Shops[shp].Assortment[ass].Amount = Shops[shp].Assortment[ass].Amount + AddAmount;
if (Shops[shp].SubType == 2) {
ad = 1;
while (ad <= AddAmount) {
Shops[shp].Stuff.unshift({Type:Shops[shp].Assortment[ass].Type, HP:Transports[Shops[shp].Assortment[ass].Type].MaxHP, MaxHP:Transports[Shops[shp].Assortment[ass].Type].MaxHP});
UpdateTransportParams(Shops[shp].Stuff[0]);
ad++;
}
}
}
}
}
}
}
if (Min >= (54 / GameSpeed)) {
Min = 0;
Hour++;
if (GameMode == 1) {
if (Story.Counter > 0) {
Story.Counter--;
if (Story.Counter == 0) {
switch (Story.CounterFor) {
case 1 :
Story.Counter = 4;
Story.CounterFor = 2;
DefaultStages[4] = 18;
break;
case 2 :
DefaultStages[4] = 32;
break;
case 3 :
if (!Story.PassReturned) {
Towns[4].Houses[7].Revealed = false;
DefaultStages[6] = 6;
News.unshift({Type:6, Time:FormatedTime(), Title:"FORT GOKS SCANDAL", Text:"The Fort Goks local celebrity Francesca Maldini has been arrested by the police. Francesca is accused in espionage and sabotage coollaboration. Colonel Kaminski, the man who is believed to have had romantic connection with Francesca, has resigned. He will face the discipline court and most probably will lose his rank."});
if (!Story.MissilesDisabled) {
DefaultStages[2] = 120;
}
}
break;
case 4 :
DefaultStages[2] = 114;
break;
case 5 :
DefaultStages[9] = 44;
}
}
}
if (Story.CCounter > 0) {
Story.CCounter--;
if (Story.CCounter == 0) {
DefaultStages[5] = 26;
}
}
if (Story.RestorePower > 0) {
Story.RestorePower--;
if ((Story.RestorePower == 0) and (!Story.MissilesDisabled)) {
Story.PowerOff = false;
Key.addListener(KeyListener);
}
}
}
if (Group.Water > 0) {
Group.Water = Group.Water - Group.Drink;
if (Group.Water < 0) {
Group.Water = 0;
}
Group.NoWater = 0;
} else {
Group.NoWater++;
for (gm in Group.Members) {
Group.Members[gm].HP = Group.Members[gm].HP - ((1 - (Group.Members[gm].HP / Group.Members[gm].MaxHP)) + (Group.NoWater / 20));
}
for (tr in Group.Transport) {
if (Transports[Group.Transport[tr].Type].Class == 1) {
Group.Transport[tr].HP = Group.Transport[tr].HP - ((1 - (Group.Transport[tr].HP / Group.Transport[tr].MaxHP)) + (Group.NoWater / 20));
}
}
}
if (((Hour == 8) or (Hour == 14)) or (Hour == 19)) {
if (Group.Food > 0) {
FoodPlace = Number.NaN;
ff = 0;
while (ff < Group.Cargo.length) {
if (Group.Cargo[ff].Type == 1) {
FoodPlace = ff;
break;
}
ff++;
}
Group.NoFood = 0;
Group.Cargo[FoodPlace].Amount = Group.Cargo[FoodPlace].Amount - Group.Eat;
if (Group.Cargo[FoodPlace].Amount <= 0) {
Group.Cargo.splice(FoodPlace, 1);
Group.Food = 0;
}
} else {
Group.NoFood++;
for (gm in Group.Members) {
Group.Members[gm].HP = Group.Members[gm].HP - Group.NoFood;
}
}
if (Group.Forage > 0) {
ForagePlace = Number.NaN;
ff = 0;
while (ff < Group.Cargo.length) {
if (Group.Cargo[ff].Type == 2) {
ForagePlace = ff;
break;
}
ff++;
}
Group.NoForage = 0;
Group.Cargo[ForagePlace].Amount = Group.Cargo[ForagePlace].Amount - Group.ForageUse;
if (Group.Cargo[ForagePlace].Amount <= 0) {
Group.Cargo.splice(ForagePlace, 1);
Group.Forage = 0;
}
} else {
Group.NoForage++;
for (tr in Group.Transport) {
if (Transports[Group.Transport[tr].Type].Class == 1) {
Group.Transport[tr].HP = Group.Transport[tr].HP - Group.NoForage;
}
}
}
}
Wounded = new Array();
for (mb in Group.Members) {
if (Group.Members[mb].HP < Group.Members[mb].MaxHP) {
Wounded.push(Group.Members[mb]);
}
}
HealExp = 0;
MedsPlace = Number.NaN;
sm = 0;
while (sm < Group.Cargo.length) {
if (Group.Cargo[sm].Type == 3) {
MedsPlace = sm;
break;
}
sm++;
}
HealNeeded = 0;
for (wnd in Wounded) {
switch (Wounded[wnd].HealthState) {
case 2 :
HealNeeded = HealNeeded + 1;
break;
case 3 :
HealNeeded = HealNeeded + 2;
break;
case 4 :
HealNeeded = HealNeeded + 3;
}
}
HealUnit = (Group.Doctor / 100) / HealNeeded;
for (wnd in Wounded) {
HealAmount = (HealUnit * Wounded[wnd].MaxHP) / 50;
UseM = 0;
if (Wounded[wnd].HealthState == 4) {
Wounded[wnd].HP = Wounded[wnd].HP - 1;
if (Group.Water > 0) {
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount * 2);
}
if (((!isNaN(MedsPlace)) and (Group.Cargo[MedsPlace].Amount > 0)) and (MedsUse > 0)) {
if (Group.Water > 0) {
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount * 5);
} else {
Wounded[wnd].HP = Wounded[wnd].HP + HealAmount;
}
UseM = 5;
}
HealExp = HealExp + 3;
}
if (Wounded[wnd].HealthState == 3) {
if (Group.Water > 0) {
Wounded[wnd].HP = Wounded[wnd].HP + HealAmount;
}
if (((!isNaN(MedsPlace)) and (Group.Cargo[MedsPlace].Amount > 0)) and (MedsUse > 1)) {
if (Group.Water > 0) {
Wounded[wnd].HP = Wounded[wnd].HP + HealAmount;
} else {
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount / 2);
}
UseM = 2;
}
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount / 2);
HealExp = HealExp + 2;
}
if (Wounded[wnd].HealthState == 2) {
if (Group.Water > 0) {
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount * 3);
}
if (((!isNaN(MedsPlace)) and (Group.Cargo[MedsPlace].Amount > 0)) and (MedsUse > 2)) {
if (Group.Water > 0) {
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount / 2);
} else {
Wounded[wnd].HP = Wounded[wnd].HP + (HealAmount / 4);
}
UseM = 1;
}
HealExp++;
}
if (Wounded[wnd].HP > Wounded[wnd].MaxHP) {
Wounded[wnd].HP = Wounded[wnd].MaxHP;
}
if (!isNaN(MedsPlace)) {
Group.Cargo[MedsPlace].Amount = Group.Cargo[MedsPlace].Amount - UseM;
if (Group.Cargo[MedsPlace].Amount < 0) {
Group.Cargo[MedsPlace].Amount = 0;
}
Group.Meds = Group.Cargo[MedsPlace].Amount;
if (Group.Cargo[MedsPlace].Amount <= 0) {
Group.Cargo.splice(MedsPlace, 1);
}
}
}
FixCars = new Array();
HealAnimals = new Array();
for (tr in Group.Transport) {
if (Group.Transport[tr].HP < Group.Transport[tr].MaxHP) {
if (Transports[Group.Transport[tr].Type].Class == 1) {
HealAnimals.push(Group.Transport[tr]);
} else {
FixCars.push(Group.Transport[tr]);
}
}
}
MechPoint = (Group.Mechanic / FixCars.length) / 100;
VetPoint = (Group.Veterinary / HealAnimals.length) / 100;
for (ha in HealAnimals) {
HealAnimals[ha].HP = HealAnimals[ha].HP + VetPoint;
if (HealAnimals[ha].HP > HealAnimals[ha].MaxHP) {
HealAnimals[ha].HP = HealAnimals[ha].MaxHP;
}
}
for (fv in FixCars) {
FixCars[fv].HP = FixCars[fv].HP + MechPoint;
if (FixCars[fv].HP > FixCars[fv].MaxHP) {
FixCars[fv].HP = FixCars[fv].MaxHP;
}
}
MechExp = FixCars.length;
VetExp = HealAnimals.length;
for (mb in Group.Members) {
if (HealExp > 0) {
Group.Members[mb].DoctorExperience = Group.Members[mb].DoctorExperience + ((HealExp / 100) * Group.Members[mb].Intelligence);
}
if (VetExp > 0) {
Group.Members[mb].VeterinaryExperiance = Group.Members[mb].VeterinaryExperiance + ((VetExp / 100) * Group.Members[mb].Intelligence);
}
if (MechExp > 0) {
Group.Members[mb].MechanicExperience = Group.Members[mb].MechanicExperience + ((MechExp / 100) * Group.Members[mb].Intelligence);
}
UpdateMemberParams(Group.Members[mb]);
}
for (tr in Group.Transport) {
UpdateTransportParams(Group.Transport[tr]);
}
UpdateGroupCargo(Group);
UpdateGroupParams(Group);
T = 1;
while (T < Towns.length) {
if (Math.random() < (Towns[T].BirthRate * Towns[T].Population)) {
Towns[T].Population++;
}
if (Math.random() < (Towns[T].DeathRate * Towns[T].Population)) {
Towns[T].Population--;
}
T++;
}
if (((Hour >= 1) and (Hour < Towns.length)) or FirstTime) {
if (FirstTime) {
StartT = 1;
EndT = Towns.length - 1;
FirstTime = false;
} else {
StartT = Hour;
EndT = Hour;
}
T = StartT;
while (T <= EndT) {
rst = 1;
while (rst < Goods.length) {
Towns[T].Production[rst] = 0;
rst++;
}
for (Ind in Towns[T].Industries) {
TheIndustry = Towns[T].Industries[Ind].Pointer;
Product = TheIndustry.Product;
Production = Towns[T].Industries[Ind].Production;
StockItem = Towns[T].Stock[Product];
Relation = 1;
if (!isNaN(TheIndustry.Raw.Type)) {
RawInStock = Towns[T].Stock[TheIndustry.Raw.Type];
RawUse = TheIndustry.Raw.Amount * Production;
if (RawUse <= RawInStock.Amount) {
RawInStock.Amount = RawInStock.Amount - RawUse;
if (Towns[T].Industries[Ind].HadNoRaw) {
Towns[T].Industries[Ind].HadNoRaw = false;
News.unshift({Type:5, Time:FormatedTime(), Industry:Towns[T].Industries[Ind].Type, Town:T});
}
} else {
Relation = RawInStock.Amount / RawUse;
if (!Towns[T].Industries[Ind].HadNoRaw) {
News.unshift({Type:3, Time:FormatedTime(), Product:TheIndustry.Product, Raw:TheIndustry.Raw.Type, Town:T});
}
Towns[T].Industries[Ind].HadNoRaw = true;
RawInStock.Amount = 0;
}
}
ProduceAmount = Math.round(Production * Relation);
StockItem.Amount = StockItem.Amount + ProduceAmount;
Towns[T].Production[Product] = Towns[T].Production[Product] + (ProduceAmount * 30);
}
for (nd in Towns[T].PeopleNeeds) {
Product = Towns[T].PeopleNeeds[nd].Type;
StockItem = Towns[T].Stock[Product];
RandomSeed = 0.5 + Math.random();
UseAmount = (Towns[T].PeopleNeeds[nd].Amount * Towns[T].Population) * RandomSeed;
WholeNum = Math.floor(UseAmount);
StockItem.Amount = StockItem.Amount - WholeNum;
Remainder = UseAmount - WholeNum;
if (Math.random() < Remainder) {
StockItem.Amount = StockItem.Amount - 1;
}
if (StockItem.Amount < 0) {
StockItem.Amount = 0;
}
}
UpdateTownEconomy(Towns[T]);
T++;
}
}
if (Hour >= 24) {
Hour = 0;
Day++;
if (((GameMode == 2) and (CompMode == 3)) and ((Day % 7) == 0)) {
ax = 0;
while (ax < RobbersNum.length) {
ay = 0;
while (ay < RobbersNum[ax].length) {
RobbersNum[ax][ay]++;
ay++;
}
ax++;
}
}
Towns[6].Money = Towns[6].Money + 50000;
mmb = 0;
while (mmb < Group.Members.length) {
if ((Group.Members[mmb].Status == 1) and (Group.Members[mmb].PayDay == Day)) {
Messages.push({Type:1, Member:mmb});
}
Group.Members[mmb].StrengthExperience = Group.Members[mmb].StrengthExperience + 0.1;
UpdateMemberParams(Group.Members[mmb]);
mmb++;
}
if ((Day > 0) and (Day < Towns.length)) {
T = Day;
if (Towns[T].Money > 0) {
MoneyToInvest = Towns[T].Money / 2;
ri = 0;
while (ri < Towns[T].Import.length) {
UnitPrice = Goods[Towns[T].Import[ri].Type].BasicValue * 100;
if (MoneyToInvest >= UnitPrice) {
for (tin in Towns[T].Industries) {
if (Towns[T].Industries[tin].Pointer.Product == Towns[T].Import[ri].Type) {
ProductIncrease = Math.floor(MoneyToInvest / UnitPrice);
ProductNeed = Math.ceil(Towns[T].Import[ri].Amount / 30);
if (ProductIncrease > ProductNeed) {
ProductIncrease = ProductNeed;
}
Towns[T].Industries[tin].Production = Towns[T].Industries[tin].Production + ProductIncrease;
Towns[T].Money = Towns[T].Money - (ProductIncrease * UnitPrice);
MoneyToInvest = MoneyToInvest - (ProductIncrease * UnitPrice);
break;
}
}
}
ri++;
}
if (MoneyToInvest > 0) {
InvestIndustry = Towns[T].Industries[random(Towns[T].Industries.length)];
ExtraInvest = MoneyToInvest * Math.random();
UnitPrice = Goods[InvestIndustry.Pointer.Product].BasicValue * 100;
ProductIncrease = Math.floor(ExtraInvest / UnitPrice);
InvestIndustry.Production = InvestIndustry.Production + ProductIncrease;
News.unshift({Type:4, Time:FormatedTime(), Town:T, Industry:InvestIndustry.Type, Production:InvestIndustry.Production});
Towns[T].Money = Towns[T].Money - (ProductIncrease * UnitPrice);
}
}
}
if (Day > Months[Month].Days) {
Day = 1;
Month++;
if (Month > 12) {
Month = 1;
Year++;
if (Year > 100) {
Year = Year % 100;
}
if ((Year % 4) == 0) {
Months[2].Days = 29;
} else {
Months[2].Days = 28;
}
}
}
}
}
BMenu.TimeText = FormatedTime();
}
}
if (Mode == 2) {
SMap.Draw.clear();
if (((((_xmouse > 5) and (_xmouse < 485)) and (_ymouse > 5)) and (_ymouse < 485)) and MDown) {
if (!Drawing) {
Drawing = true;
DrawingStart = {x:SMap._xmouse, y:SMap._ymouse};
}
SMap.Draw.lineStyle(0.5, 16711680);
SMap.Draw.moveTo(DrawingStart.x, DrawingStart.y);
SMap.Draw.lineTo(SMap._xmouse, SMap._ymouse);
PointerText._visible = true;
MAng = CalcAngle(DrawingStart.x, DrawingStart.y, SMap._xmouse, SMap._ymouse);
MDist = CalcDistance(DrawingStart.x, DrawingStart.y, SMap._xmouse, SMap._ymouse);
PointerText.Txt = ((Math.round(MAng * Rad2Deg) + "\u00BA, ") + Math.round(MDist * 2)) + "Km";
} else {
Drawing = false;
PointerText._visible = false;
}
}
if (Mode == 3) {
if (TMenu._currentframe == 1) {
if ((((_xmouse > 5) and (_xmouse < 485)) and (_ymouse > 5)) and (_ymouse < 485)) {
if ((Intersecting == 0) or TMenu.MB._visible) {
PointerText._visible = false;
} else {
PointerText._visible = true;
PointerText.Txt = Towns[TMenu.InTown].Houses[Intersecting].Name;
if (MDown) {
BMenu.SelectButton(0);
switch (Towns[TMenu.InTown].Houses[Intersecting].Type) {
case 1 :
TMenu.gotoAndStop(5);
break;
case 2 :
TMenu.gotoAndStop(7);
TMenu.SubType = Towns[TMenu.InTown].Houses[Intersecting].SubType;
TMenu.TheShop = Shops[Towns[TMenu.InTown].Houses[Intersecting].Index];
break;
case 3 :
TMenu.gotoAndStop(9);
TMenu.SubType = Towns[TMenu.InTown].Houses[Intersecting].SubType;
TMenu.ThePlace = Towns[TMenu.InTown].Houses[Intersecting];
break;
case 8 :
TMenu.gotoAndStop(8);
break;
case 5 :
TMenu.CurrentDialogue = Towns[TMenu.InTown].Houses[Intersecting].Dialogue;
TMenu.CurrentStage = DefaultStages[TMenu.CurrentDialogue];
TMenu.gotoAndStop(11);
BMenu.gotoAndStop(7);
break;
case 4 :
TMenu.gotoAndStop(12);
BMenu.gotoAndStop(8);
if (Story.SentToDisableMissiles) {
Story.BeenToTheBase = true;
}
break;
case 6 :
TMenu.InTheBase = false;
TMenu.gotoAndPlay(2);
if (Story.AddSniper) {
nl = Group.Members.push(People[63]);
nl--;
Group.Members[nl].Holding = [{Type:32, Amount:1, Blocked:true}, 0, {Type:8, Amount:20}, 0, 0];
Group.Members[nl].Carrying = Items[32].Weight + (Items[8].Weight * 20);
Found = false;
for (ac in Group.Inventory) {
if (Group.Inventory[ac].Type == 8) {
Group.Inventory[ac].Amount = Group.Inventory[ac].Amount + 8;
if (isNaN(Group.Inventory[ac].InUse)) {
Group.Inventory[ac].InUse = 20;
} else {
Group.Inventory[ac].InUse = Group.Inventory[ac].InUse + 20;
}
Found = true;
break;
}
}
if (!Found) {
Group.Inventory.push({Type:8, Amount:20, InUse:20});
}
UpdateGroupCargo(Group);
Story.AddSniper = false;
Story.HaveSniper = true;
}
if (!TMenu.CalledAttention) {
break;
}
GameOverType = 3;
Mus.setVolume(0);
gotoAndStop ("Game Over");
}
}
}
} else {
PointerText._visible = false;
}
} else {
PointerText._visible = false;
}
}
if (Mode == 6) {
if (((Key.isDown(37) or Key.isDown(38)) or Key.isDown(39)) or Key.isDown(40)) {
MSSpeed = 20;
if (Key.isDown(38)) {
KeyMoveScreen = 1;
}
if (Key.isDown(39)) {
KeyMoveScreen = 2;
}
if (Key.isDown(40)) {
KeyMoveScreen = 3;
}
if (Key.isDown(37)) {
KeyMoveScreen = 4;
}
} else {
KeyMoveScreen = 0;
}
if ((MoveScreen == 1) or (KeyMoveScreen == 1)) {
BW._y = BW._y + MSSpeed;
}
if ((MoveScreen == 2) or (KeyMoveScreen == 2)) {
BW._x = BW._x - MSSpeed;
}
if ((MoveScreen == 3) or (KeyMoveScreen == 3)) {
BW._y = BW._y - MSSpeed;
}
if ((MoveScreen == 4) or (KeyMoveScreen == 4)) {
BW._x = BW._x + MSSpeed;
}
if (Centralizing) {
SAng = CalcAngle(BW._x, BW._y, TSL.x, TSL.y);
BW._x = BW._x + (SwitchCharSpeed * Math.sin(SAng));
BW._y = BW._y - (SwitchCharSpeed * Math.cos(SAng));
if ((((BW._x < (445 - (BFWidth * 40))) or (BW._x > -40)) or (Math.abs(BW._x - TSL.x) < SwitchCharSpeed)) and (((BW._y < (445 - (BFHeight * 40))) or (BW._y > -40)) or (Math.abs(BW._y - TSL.y) < SwitchCharSpeed))) {
BW._x = 245 - (ActChar.BSquare.x * 40);
BW._y = 245 - (ActChar.BSquare.y * 40);
Centralizing = false;
}
}
if (((BattleLocation == 1) and ((ActChar.BSquare.x == (BunkerX + 5)) or (ActChar.BSquare.x == (BunkerX + 6)))) and (ActChar.BSquare.y == (BunkerY + 2))) {
ActChar.BattleChar.setMask(BW.BunkerMask);
} else {
ActChar.BattleChar.setMask(null);
}
if (ActPhase == 0) {
ActChar = ActList[NowActing];
TSL = {x:245 - (ActChar.BSquare.x * 40), y:245 - (ActChar.BSquare.y * 40)};
Centralizing = true;
ActPhase = 1;
PointerText._visible = false;
BW.Cursor._visible = false;
HideMarkers();
Mouse.show();
if (ActChar.Group == Group) {
BMenu.Pan.gotoAndStop(2);
UpdateCharDisplay();
} else {
BMenu.Pan.gotoAndStop(1);
}
}
if (ActPhase == 1) {
if (!Centralizing) {
ActPhase = 2;
}
}
if (ActPhase == 2) {
if ((ActChar.AP > 0) and (ActChar.HP > 0)) {
if (ActChar.Group == Group) {
ActPhase = 3;
ActChar.BattleChar.Sel._visible = true;
BMenu.Pan.gotoAndStop(3);
UpdateCharWpn();
PointerText._visible = true;
} else {
if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 1) and ((ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot].Amount == 0) or (!(ActChar.Holding[ActChar.Holding[ActChar.CurrentWpn].AmmoSlot] instanceof Object)))) {
SwapWpn();
}
if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 1) and (ActChar.Holding[ActChar.CurrentWpn].Load == 0)) {
Reload();
}
if (ActChar.Schedule.length > 0) {
CurrAction = ActChar.Schedule.shift();
if ((CurrAction.Action == 1) and (CurrAction.Path.length > 0)) {
Path = CurrAction.Path;
ActPhase = 4;
ActChar.BattleChar.gotoAndPlay(2);
GoingTo = 0;
ActChar.BFNum = BattleField[ActChar.BSquare.x][ActChar.BSquare.y];
BattleField[ActChar.BSquare.x][ActChar.BSquare.y] = Number.NaN;
ActChar.AP = ActChar.AP - Path.length;
}
Cond1 = CurrAction.Target.HP > 0;
Cond2 = (ActChar.Holding[ActChar.CurrentWpn].Load > 0) or (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class != 1);
Cond3 = (ActChar.AP >= ActChar.Holding[ActChar.CurrentWpn].Modes[CurrAction.Mode].AP) or ((!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object)) and (ActChar.AP >= 3));
if ((((CurrAction.Action == 2) and Cond1) and Cond2) and Cond3) {
ActChar.Holding[ActChar.CurrentWpn].CurrentMode = CurrAction.Mode;
ActChar.BattleChar._rotation = CalcAngle(ActChar.BattleChar._x, ActChar.BattleChar._y, CurrAction.Target.BattleChar._x, CurrAction.Target.BattleChar._y) * Rad2Deg;
TargetChar = CurrAction.Target;
ActPhase = 6;
}
if (CurrAction.Action == 4) {
ThrowTargetX = CurrAction.x;
ThrowTargetY = CurrAction.y;
ActChar.BattleChar._rotation = CalcAngle(ActChar.BattleChar._x, ActChar.BattleChar._y, ThrowTargetX, ThrowTargetY) * Rad2Deg;
ActPhase = 6;
}
if (CurrAction.Action == 3) {
ActPhase = 10;
ActChar.Holding[ActChar.CurrentWpn].CurrentMode = 0;
}
} else {
if ((BattleLocation == 1) and ActChar.ComingOut) {
ActChar.Schedule = new Array();
Column = ActChar.OutIndex % 5;
Row = Math.floor(ActChar.OutIndex / 5);
SldLoc = FindFreeSlot((BunkerX + 2) + (Column * 2), (BunkerY + 13) - (Row * 2));
OutPath = FindPath(ActChar, SldLoc.x, SldLoc.y, 20, false);
if (OutPath.length > 0) {
ln = ActChar.Schedule.push({Action:1, Path:new Array()});
ln--;
for (cp in OutPath) {
ActChar.Schedule[ln].Path[cp] = new Object();
for (prm in OutPath[cp]) {
ActChar.Schedule[ln].Path[cp][prm] = OutPath[cp][prm];
}
}
ActChar.ComingOut = false;
} else {
AlternativeSlot = FindFreeSlot((BunkerX + 3) + Column, (BunkerY + 8) - (Row * 2));
OutPath = FindPath(ActChar, AlternativeSlot.x, AlternativeSlot.y, 20, false);
trace((AlternativeSlot.x + " ") + AlternativeSlot.y);
ln = ActChar.Schedule.push({Action:1, Path:new Array()});
ln--;
for (cp in OutPath) {
ActChar.Schedule[ln].Path[cp] = new Object();
for (prm in OutPath[cp]) {
ActChar.Schedule[ln].Path[cp][prm] = OutPath[cp][prm];
}
}
}
ActChar.Schedule.push({Action:3});
} else if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 4) {
PossibleSquares = new Array();
cx = 1;
while (cx <= BFWidth) {
cy = 1;
while (cy <= BFHeight) {
GroupMen = 0;
RivalMen = 0;
TotDist = 0;
lx = cx - 1;
while (lx <= (cx + 1)) {
ly = cy - 1;
while (ly <= (cy + 1)) {
if ((BattleField[lx][ly] >= 0) and (BattleField[lx][ly] < 1000)) {
GroupMen++;
TotDist = TotDist + (Math.abs(lx - cx) + Math.abs(ly - cy));
}
if ((BattleField[lx][ly] >= 1000) and (BattleField[lx][ly] < 2000)) {
RivalMen++;
}
ly++;
}
lx++;
}
if ((RivalMen == 0) and (GroupMen > 0)) {
AvDist = TotDist / GroupMen;
PossibleSquares.push({x:cx, y:cy, Men:GroupMen, Dist:AvDist});
}
cy++;
}
cx++;
}
if (PossibleSquares.length > 0) {
PossibleSquares.sortOn("Men", 18);
MaxMen = PossibleSquares[0].Men;
sr = 1;
while (sr < PossibleSquares.length) {
if (PossibleSquares[sr].Men < MaxMen) {
PossibleSquares.splice(sr, PossibleSquares.length - sr);
break;
}
sr++;
}
PossibleSquares.sortOn("Dist", 16);
MinDist = PossibleSquares[0].Dist;
sr = 1;
while (sr < PossibleSquares.length) {
if (PossibleSquares[sr].Dist > MinDist) {
PossibleSquares.splice(sr, PossibleSquares.length - sr);
break;
}
sr++;
}
for (cd in PossibleSquares) {
PossibleSquares[cd].DistFromMe = CalcDistance(ActChar.BSquare.x, ActChar.BSquare.y, PossibleSquares[cd].x, PossibleSquares[cd].y);
}
PossibleSquares.sortOn("DistFromMe", 16);
TargetX = (PossibleSquares[0].x * 40) + 20;
TargetY = (PossibleSquares[0].y * 40) + 20;
trace((TargetX + " ") + TargetY);
MaxRange = Math.round((ActChar.Strength * 3) - (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Weight * 10));
DistInMeters = CalcDistance(ActChar.BattleChar._x, ActChar.BattleChar._y, TargetX, TargetY) / 20;
ActChar.Schedule = new Array();
if (DistInMeters <= MaxRange) {
ActChar.Schedule.push({Action:4, x:TargetX, y:TargetY});
} else {
MaxRangeInSquares = Math.floor(MaxRange / 2) - 1;
AngleFromTarget = CalcAngle(PossibleSquares[0].x, PossibleSquares[0].y, ActChar.BSquare.x, ActChar.BSquare.y);
SquareToGo = {x:Math.round(PossibleSquares[0].x + (Math.sin(AngleFromTarget) * MaxRangeInSquares)), y:Math.round(PossibleSquares[0].y - (Math.cos(AngleFromTarget) * MaxRangeInSquares))};
SquareToGo = FindFreeSlot(SquareToGo.x, SquareToGo.y);
PathToGo = FindPath(ActChar, SquareToGo.x, SquareToGo.y, ActChar.AP - 4, false);
DistFromLast = CalcDist((PathToGo[PathToGo.length - 1].x * 40) + 20, (PathToGo[PathToGo.length - 1].y * 40) + 20, TargetX, TargetY);
if ((DistFromLast / 20) > MaxRange) {
PathToGo = FindPath(ActChar, SquareToGo.x, SquareToGo.y, ActChar.AP, false);
}
if (PathToGo.length > 0) {
ActChar.Schedule.push({Action:1, Path:PathToGo});
} else {
ActPhase = 10;
}
}
} else {
ActPhase = 10;
}
} else {
ClosestDist = Infinity;
for (ch in ActList) {
if ((ActList[ch] != ActChar) and (ActList[ch].Group == Group)) {
ChDist = CalcDistance(ActChar.BSquare.x, ActChar.BSquare.y, ActList[ch].BSquare.x, ActList[ch].BSquare.y);
if (ChDist < ClosestDist) {
CanAttack = true;
if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 5) or (!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object))) {
drc = 0;
while (drc <= 3) {
TestSquareX = ActList[ch].BSquare.x + Directions[drc].x;
TestSquareY = ActList[ch].BSquare.y + Directions[drc].y;
FoundFreeSquare = false;
if ((((((TestSquareX > 0) and (TestSquareX <= BFWidth)) and (TestSquareY > 0)) and (TestSquareY <= BFHeight)) and isNaN(BattleField[TestSquareX][TestSquareY])) or ((TestSquareX == ActChar.BSquare.x) and (TestSquareY == ActChar.BSquare.y))) {
FoundFreeSquare = true;
break;
}
drc++;
}
if (!FoundFreeSquare) {
CanAttack = false;
}
}
if (CanAttack) {
ClosestDist = ChDist;
Victim = ActList[ch];
}
}
}
}
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 1) {
if (((Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 1) or (Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 2)) or (Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 7)) {
IdealDistance = 5;
} else {
IdealDistance = 10;
}
if (Items[Victim.Holding[Victim.CurrentWpn].Type].Class == 5) {
DistPolicy = 2;
} else {
DistPolicy = 1;
}
}
if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 5) or (!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object))) {
IdealDistance = 1;
DistPolicy = 2;
}
PresentDistance = CalcDistance(ActChar.BSquare.x, ActChar.BSquare.y, Victim.BSquare.x, Victim.BSquare.y);
PermitWalk = false;
if ((DistPolicy == 1) and (PresentDistance > IdealDistance)) {
PermitWalk = true;
}
if ((DistPolicy == 2) and (PresentDistance != IdealDistance)) {
PermitWalk = true;
}
ActChar.Schedule = new Array();
if (PermitWalk) {
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 1) {
MaxRange = Items[ActChar.Holding[ActChar.CurrentWpn].Type].Range;
}
if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 5) or (!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object))) {
MaxRange = 2;
}
VictimAngle = CalcAngle(Victim.BSquare.x, Victim.BSquare.y, ActChar.BSquare.x, ActChar.BSquare.y);
IdealSquare = {x:Math.round(Victim.BSquare.x + (Math.sin(VictimAngle) * IdealDistance)), y:Math.round(Victim.BSquare.y - (Math.cos(VictimAngle) * IdealDistance))};
if ((MaxRange == 2) and (!isNaN(BattleField[IdealSquare.x][IdealSquare.y]))) {
FoundSquare = false;
dr = 0;
while (dr <= 3) {
Try = {x:Victim.BSquare.x + Directions[dr].x, y:Victim.BSquare.y + Directions[dr].y};
if ((((isNaN(BattleField[Try.x][Try.y]) and (Try.x > 0)) and (Try.x <= BFWidth)) and (Try.y > 0)) and (Try.y <= BFHeight)) {
FoundSquare = true;
IdealSquare = {x:Try.x, y:Try.y};
break;
}
dr++;
}
if (!FoundSquare) {
IdealSquare = FindFreeSlot(Victim.BSquare.x, Victim.BSquare.y);
}
} else {
IdealSquare = FindFreeSlot(IdealSquare.x, IdealSquare.y);
}
APToPreserve = ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].AP;
PathToIdeal = FindPath(ActChar, IdealSquare.x, IdealSquare.y, ActChar.AP - APToPreserve, false);
if (PathToIdeal.length > 0) {
LastInPath = PathToIdeal[PathToIdeal.length - 1];
DistFromLast = CalcDistance(LastInPath.x, LastInPath.y, Victim.BSquare.x, Victim.BSquare.y) * 2;
} else {
DistFromLast = Infinity;
}
if ((DistFromLast <= MaxRange) and (PathToIdeal.length > 0)) {
ActChar.Schedule.push({Action:1, Path:new Array()});
for (cp in PathToIdeal) {
ActChar.Schedule[ActChar.Schedule.length - 1].Path[cp] = {x:PathToIdeal[cp].x, y:PathToIdeal[cp].y};
}
RemainingAP = ActChar.AP - PathToIdeal.length;
DistributeShots(RemainingAP, Victim);
}
if ((DistFromLast > MaxRange) and (PathToIdeal.length > 0)) {
PathToIdeal = FindPath(ActChar, IdealSquare.x, IdealSquare.y, ActChar.AP, false);
ActChar.Schedule.push({Action:1, Path:new Array()});
for (cp in PathToIdeal) {
ActChar.Schedule[ActChar.Schedule.length - 1].Path[cp] = {x:PathToIdeal[cp].x, y:PathToIdeal[cp].y};
}
}
if (PathToIdeal.length == 0) {
DistFromMe = CalcDistance(ActChar.BSquare.x, ActChar.BSquare.y, Victim.BSquare.x, Victim.BSquare.y) * 2;
if (DistFromMe <= MaxRange) {
DistributeShots(ActChar.AP, Victim);
}
}
} else {
DistributeShots(ActChar.AP, Victim);
}
ActChar.Schedule.push({Action:3});
}
if ((!ActChar.Schedule.length) > 0) {
ActPhase = 10;
}
}
}
} else {
ActPhase = 10;
}
}
if (ActPhase == 3) {
if ((((((_xmouse > 5) and (_xmouse < 485)) and (_ymouse > 5)) and (_ymouse < 485)) and (MoveScreen == 0)) and (!MenuOut)) {
Mouse.hide();
BW.Cursor._visible = true;
BW.Cursor._x = BW._xmouse;
BW.Cursor._y = BW._ymouse;
MouseX = Math.floor(BW._xmouse / 40);
MouseY = Math.floor(BW._ymouse / 40);
if ((BattleField[MouseX][MouseY] >= 0) and (BattleField[MouseX][MouseY] < 1000)) {
PTCol.setRGB(16777215);
BW.Cursor.gotoAndStop(1);
HideMarkers();
PointerText.Txt = ((Group.Members[BattleField[MouseX][MouseY]].Name + "\r") + Math.ceil(Group.Members[BattleField[MouseX][MouseY]].HP)) + " HP";
}
if ((BattleField[MouseX][MouseY] >= 2000) and (BattleField[MouseX][MouseY] < 4000)) {
PTCol.setRGB(16777215);
BW.Cursor.gotoAndStop(1);
HideMarkers();
if (BattleField[MouseX][MouseY] < 3000) {
PointerText.Txt = Transports[Group.Transport[BattleField[MouseX][MouseY] - 2000].Type].Name;
} else {
PointerText.Txt = Transports[RivalGroup.Transport[BattleField[MouseX][MouseY] - 3000].Type].Name;
}
}
if (((BattleField[MouseX][MouseY] >= 1000) and (BattleField[MouseX][MouseY] < 2000)) or ForceThrow) {
HideMarkers();
Dist = Math.round(CalcDistance(ActChar.BSquare.x, ActChar.BSquare.y, MouseX, MouseY) * 2);
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 1) {
MaxRange = Items[ActChar.Holding[ActChar.CurrentWpn].Type].Range;
Action = "Shoot";
}
if (!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object)) {
MaxRange = 2;
Action = "Hit";
}
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 5) {
MaxRange = 2;
Action = "Hit";
}
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 4) {
MaxRange = Math.round((ActChar.Strength * 3) - (Items[ActChar.Holding[ActChar.CurrentWpn].Type].Weight * 10));
Action = "Throw";
}
BW.Cursor.gotoAndStop(3);
PTCol.setRGB(16711680);
if (Dist <= MaxRange) {
if ((ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].AP > ActChar.AP) or ((!(ActChar.Holding[ActChar.CurrentWpn] instanceof Object)) and (ActChar.AP < 3))) {
PointerText.Txt = "Not enough AP";
} else if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].Class == 1) and (ActChar.Holding[ActChar.CurrentWpn].Load == 0)) {
PointerText.Txt = "No ammo";
} else {
PTCol.setRGB(65280);
BW.Cursor.gotoAndStop(2);
PointerText.Txt = Action;
ActChar.BattleChar._rotation = CalcAngle(ActChar.BSquare.x, ActChar.BSquare.y, MouseX, MouseY) * Rad2Deg;
if (MDown) {
MDown = false;
if (ActChar.BattleChar.Mode == 5) {
ThrowTargetX = BW._xmouse;
ThrowTargetY = BW._ymouse;
} else {
TargetChar = RivalGroup.Members[BattleField[MouseX][MouseY] - 1000];
}
ActPhase = 6;
}
}
} else {
PointerText.Txt = "Too far";
}
PointerText.Txt = PointerText.Txt + (("\rDistance: " + Dist) + " m");
}
if ((BattleField[MouseX][MouseY] == 4000) and (!ForceThrow)) {
PointerText.Txt = "Can't go here";
BW.Cursor.gotoAndStop(5);
}
if (isNaN(BattleField[MouseX][MouseY]) and (!ForceThrow)) {
PTCol.setRGB(16777215);
Path = FindPath(ActChar, MouseX, MouseY, ActChar.AP, false);
if ((Path.length == 0) or (!(Path instanceof Array))) {
PointerText.Txt = "Can't go here";
BW.Cursor.gotoAndStop(5);
} else {
PointerText.Txt = ("Walk " + Path.length) + " AP";
BW.Cursor.gotoAndStop(4);
if ((Path[Path.length - 1].x != MouseX) or (Path[Path.length - 1].y != MouseY)) {
PointerText.Txt = PointerText.Txt + "\r(not reaching)";
}
if (MDown) {
ActPhase = 4;
ActChar.BattleChar.gotoAndPlay(2);
GoingTo = 0;
ActChar.BFNum = BattleField[ActChar.BSquare.x][ActChar.BSquare.y];
BattleField[ActChar.BSquare.x][ActChar.BSquare.y] = Number.NaN;
ActChar.AP = ActChar.AP - Path.length;
if (ActChar.Group == Group) {
BMenu.Pan.gotoAndStop(2);
UpdateCharDisplay();
}
}
}
pm = 1;
while (pm <= MaxMarkers) {
if ((pm - 1) < Path.length) {
BW["M" + pm]._visible = true;
BW["M" + pm]._x = (Path[pm - 1].x * 40) + 20;
BW["M" + pm]._y = (Path[pm - 1].y * 40) + 20;
} else {
BW["M" + pm]._visible = false;
}
pm++;
}
}
} else {
Mouse.show();
BW.Cursor._visible = false;
PointerText.Txt = "";
HideMarkers();
}
}
if (ActPhase == 4) {
BW.Cursor._visible = false;
PointerText._visible = false;
ActChar.BattleChar.Sel._visible = false;
Mouse.show();
HideMarkers();
if (ActChar.BSquare.x == Path[GoingTo].x) {
Xm = 0;
}
if (ActChar.BSquare.x < Path[GoingTo].x) {
Xm = 1;
}
if (ActChar.BSquare.x > Path[GoingTo].x) {
Xm = -1;
}
if (ActChar.BSquare.y == Path[GoingTo].y) {
Ym = 0;
}
if (ActChar.BSquare.y < Path[GoingTo].y) {
Ym = 1;
}
if (ActChar.BSquare.y > Path[GoingTo].y) {
Ym = -1;
}
if (Xm < 0) {
ActChar.BattleChar._rotation = -90;
}
if (Xm > 0) {
ActChar.BattleChar._rotation = 90;
}
if (Ym < 0) {
ActChar.BattleChar._rotation = 0;
}
if (Ym > 0) {
ActChar.BattleChar._rotation = 180;
}
ActChar.WalkFrame = 1;
ActPhase = 5;
}
if (ActPhase == 5) {
ActChar.BattleChar.gotoAndStop(ActChar.WalkFrame);
ActChar.WalkFrame = ActChar.WalkFrame + BattleSpeed;
if (ActChar.WalkFrame > 16) {
ActChar.WalkFrame = ActChar.WalkFrame % 16;
}
ActChar.BattleChar._x = ActChar.BattleChar._x + ((Xm * 2) * BattleSpeed);
ActChar.BattleChar._y = ActChar.BattleChar._y + ((Ym * 2) * BattleSpeed);
if (ActChar.BattleChar._currentframe == 5) {
SetSound(ActChar.BattleChar);
ActChar.BattleChar.Foo1.start();
}
if (ActChar.BattleChar._currentframe == 13) {
SetSound(ActChar.BattleChar);
ActChar.BattleChar.Foo2.start();
}
if ((Math.abs((ActChar.BattleChar._x - (Path[GoingTo].x * 40)) - 20) < (2 * BattleSpeed)) and (Math.abs((ActChar.BattleChar._y - (Path[GoingTo].y * 40)) - 20) < (2 * BattleSpeed))) {
ActChar.BattleChar._x = (Path[GoingTo].x * 40) + 20;
ActChar.BattleChar._y = (Path[GoingTo].y * 40) + 20;
ActChar.BSquare = {x:Path[GoingTo].x, y:Path[GoingTo].y};
GoingTo++;
if (GoingTo >= Path.length) {
ActChar.BattleChar.gotoAndStop(1);
BattleField[ActChar.BSquare.x][ActChar.BSquare.y] = ActChar.BFNum;
ActPhase = 2;
if ((BattleLocation == 1) and CloseDoor) {
CloseDoor = false;
BW.StructuresSample.Inside.gotoAndPlay(31);
BattleField[BunkerX + 5][BunkerY + 9] = 4000;
BattleField[BunkerX + 6][BunkerY + 9] = 4000;
}
} else {
ActPhase = 4;
}
}
}
if (ActPhase == 6) {
if (ActChar.Group == Group) {
PointerText._visible = false;
BW.Cursor._visible = false;
ActChar.BattleChar.Sel._visible = false;
Mouse.show();
BMenu.Pan.gotoAndStop(2);
}
SetSound(ActChar.BattleChar);
switch (ActChar.BattleChar.Mode) {
case 0 :
ActChar.BattleChar.gotoAndPlay(19);
break;
case 1 :
ActChar.BattleChar.gotoAndPlay(62);
ActChar.BattleChar.Pis.start();
break;
case 2 :
ActChar.BattleChar.gotoAndPlay(70);
if ((Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 3) or (Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 6)) {
ActChar.BattleChar.Rif.start();
}
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].DescCat == 7) {
ActChar.BattleChar.Sho.start();
}
if (Items[ActChar.Holding[ActChar.CurrentWpn].Type].ReCock == 4) {
ActChar.BattleChar.Aut.start();
}
break;
case 3 :
ActChar.BattleChar.gotoAndPlay(79);
ActChar.BattleChar.Mac.start();
break;
case 4 :
ActChar.BattleChar.gotoAndPlay(88);
ActChar.BattleChar.Roc.start();
break;
case 5 :
ActChar.BattleChar.gotoAndPlay(99);
ActChar.BattleChar.Thr.start();
break;
case 6 :
ActChar.BattleChar.gotoAndPlay(113);
}
if (!ActChar.Bursting) {
HitList = new Array();
if (ActChar.Holding[ActChar.CurrentWpn] instanceof Object) {
ActChar.AP = ActChar.AP - ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].AP;
} else {
ActChar.AP = ActChar.AP - 3;
}
if (ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].Type == 2) {
ActChar.SniperExperience = ActChar.SniperExperience + 2;
} else {
ActChar.SniperExperience++;
}
UpdateMemberParams(ActChar);
UpdateCharDisplay();
}
if (((ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].Type >= 3) and (ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].Type <= 5)) and (!ActChar.Bursting)) {
BurstCounter = 3;
if (ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].Type == 3) {
BurstRounds = Math.min(3, ActChar.Holding[ActChar.CurrentWpn].Load);
}
if (ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].Type == 4) {
BurstRounds = Math.min(5, ActChar.Holding[ActChar.CurrentWpn].Load);
}
if (ActChar.Holding[ActChar.CurrentWpn].Modes[ActChar.Holding[ActChar.CurrentWpn].CurrentMode].Type == 5) {
BurstRounds = Math.min(10, ActChar.Holding[ActChar.CurrentWpn].Load);
}
ActChar.Bursting = true;
}
if ((ActChar.BattleChar.Mode >= 1) and (ActChar.BattleChar.Mode <= 3)) {
Shoot(TargetChar);
if (!ActChar.Bursting) {
OrganizeHitList();
}
}
if (ActChar.BattleChar.Mode == 4) {
BW.Rocket._visible = true;
RocketSpeed = 20;
MaxError = 50 / (ActChar.Sniper * Items[ActChar.Holding[ActChar.CurrentWpn].Type].Accuracy);
RocketDirection = CalcAngle(ActChar.BattleChar._x, ActChar.BattleChar._y, TargetChar.BattleChar._x, TargetChar.BattleChar._y);
RocketDirection = (RocketDirection - MaxError) + ((Math.random() * MaxError) * 2);
CurrRocketX = ActChar.BattleChar._x;
CurrRocketY = ActChar.BattleChar._y;
RocketMoveX = RocketSpeed * Math.sin(RocketDirection);
RocketMoveY = RocketSpeed * Math.cos(RocketDirection);
BW.Rocket._rotation = RocketDirection * Rad2Deg;
ActPhase = 9;
UseRound();
} else {
ActPhase = 7;
}
}
if (ActPhase == 7) {
if (ActChar.Bursting) {
BurstCounter--;
if (BurstCounter == 0) {
BurstRounds--;
if (BurstRounds > 0) {
ActPhase = 6;
BurstCounter = 3;
} else {
OrganizeHitList();
ActChar.Bursting = false;
}
}
}
if ((ActChar.BattleChar.Mode == 0) and (ActChar.BattleChar._currentframe == 32)) {
ActChar.BattleChar.Pun.start();
}
if ((ActChar.BattleChar.Mode == 6) and (ActChar.BattleChar._currentframe == 115)) {
ActChar.BattleChar.Swo.start();
}
if ((ActChar.BattleChar.Mode == 0) and (ActChar.BattleChar._currentframe == 35)) {
if (ActChar.Holding[ActChar.CurrentWpn] instanceof Object) {
Dm = Items[ActChar.Holding[ActChar.CurrentWpn].Type].Damage + (ActChar.Strength / 10);
} else {
Dm = ActChar.Strength / 10;
}
SetSound(ActChar.BattleChar);
HitMember(TargetChar, Dm, ActChar.BattleChar._x, ActChar.BattleChar._y);
HitList.push({Subject:TargetChar, Type:1, Damage:Dm});
OrganizeHitList();
}
if ((ActChar.BattleChar.Mode == 6) and (ActChar.BattleChar._currentframe == 121)) {
Dm = Items[ActChar.Holding[ActChar.CurrentWpn].Type].Damage + (ActChar.Strength / 10);
HitMember(TargetChar, Dm, ActChar.BattleChar._x, ActChar.BattleChar._y);
HitList.push({Subject:TargetChar, Type:1, Damage:Dm});
OrganizeHitList();
}
if ((ActChar.BattleChar.Mode == 5) and (ActChar.BattleChar._currentframe == 103)) {
BW.Granade._visible = true;
GranadePosX = ActChar.BattleChar._x;
GranadePosY = ActChar.BattleChar._y;
GranadeSpeed = 10;
ThrowAngle = CalcAngle(GranadePosX, GranadePosY, ThrowTargetX, ThrowTargetY);
MaxThrowError = 0.8 / ActChar.Accuracy;
ThrowAngle = (ThrowAngle - MaxThrowError) + ((Math.random() * MaxThrowError) * 2);
ThrowDistance = CalcDistance(GranadePosX, GranadePosY, ThrowTargetX, ThrowTargetY);
ThrowDistance = (ThrowDistance - (MaxThrowError * 10)) + ((Math.random() * MaxThrowError) * 20);
if (ThrowDistance > (MaxRange * 20)) {
ThrowDistance = MaxRange * 20;
}
if (ThrowDistance < 0) {
ThrowDistance = 0;
}
GranadeMoveX = GranadeSpeed * Math.sin(ThrowAngle);
GranadeMoveY = GranadeSpeed * Math.cos(ThrowAngle);
GranadeFlying = 0;
ActPhase = 8;
}
if (ActChar.BattleChar._currentframe == 1) {
ActPhase = 2;
}
}
if (ActPhase == 8) {
GranadePosX = GranadePosX + GranadeMoveX;
GranadePosY = GranadePosY - GranadeMoveY;
BW.Granade._x = GranadePosX;
BW.Granade._y = GranadePosY;
GranadeFlying = GranadeFlying + GranadeSpeed;
if (GranadeFlying >= ThrowDistance) {
Explode(GranadePosX, GranadePosY, Items[ActChar.Holding[ActChar.CurrentWpn].Type].Damage);
ActPhase = 2;
ActChar.Holding[ActChar.CurrentWpn].Amount--;
for (fg in ActChar.Group.Inventory) {
if (ActChar.Group.Inventory[fg].Type == ActChar.Holding[ActChar.CurrentWpn].Type) {
ActChar.Group.Inventory[fg].Amount--;
ActChar.Group.Inventory[fg].InUse--;
if (ActChar.Group.Inventory[fg].Amount <= 0) {
ActChar.Group.Inventory.splice(fg, 1);
}
break;
}
}
if (ActChar.Holding[ActChar.CurrentWpn].Amount <= 0) {
ActChar.Holding[ActChar.CurrentWpn] = 0;
ActChar.BattleChar.Mode = 0;
}
}
}
if (ActPhase == 9) {
CurrRocketX = CurrRocketX + RocketMoveX;
CurrRocketY = CurrRocketY - RocketMoveY;
BW.Rocket._x = CurrRocketX;
BW.Rocket._y = CurrRocketY;
RocketSquareX = Math.floor(CurrRocketX / 40);
RocketSquareY = Math.floor(CurrRocketY / 40);
if ((((RocketSquareX < 1) or (RocketSquareX > BFWidth)) or (RocketSquareY < 1)) or (RocketSquareY > BFHeight)) {
BW.Rocket._visible = false;
ActPhase = 2;
}
Exp = false;
if (((((ActChar.BSquare.x != RocketSquareX) and (ActChar.BSquare.y != RocketSquareY)) and (BattleField[RocketSquareX][RocketSquareY] >= 0)) and (BattleField[RocketSquareX][RocketSquareY] < 2000)) and (CalcDistance(CurrRocketX, CurrRocketY, (RocketSquareX * 40) + 20, (RocketSquareY * 40) + 20) < 15)) {
Exp = true;
}
if ((BattleField[RocketSquareX][RocketSquareY] >= 2000) and (BattleField[RocketSquareX][RocketSquareY] < 4000)) {
Exp = true;
}
if (Exp) {
BW.Rocket._visible = false;
Explode(CurrRocketX, CurrRocketY, Items[ActChar.Holding[ActChar.CurrentWpn].Type].Damage);
ActPhase = 2;
}
}
if (ActPhase == 10) {
ActChar.APExperience = ActChar.APExperience + ((ActChar.MaxAP - ActChar.AP) / 10);
ActChar.BattleChar.Sel._visible = false;
ActChar.Schedule = [];
if (ActChar.Group != Group) {
ActChar.Holding[ActChar.CurrentWpn].CurrentMode = 0;
}
NowActing++;
if (NowActing >= ActList.length) {
if (BattleLocation == 1) {
if (!LetMenOut) {
LoopsCount++;
}
if (((LoopsCount == 1) or (LoopsCount == 5)) and (!LetMenOut)) {
MenOut = 0;
LetMenOut = true;
if (LoopsCount == 5) {
AllOut = true;
}
}
}
if (((BattleLocation == 1) and (MenOut < 10)) and LetMenOut) {
if (MenOut == 0) {
BW.StructuresSample.Inside.gotoAndPlay(2);
BattleField[BunkerX + 5][BunkerY + 9] = Number.NaN;
BattleField[BunkerX + 6][BunkerY + 9] = Number.NaN;
}
MenOut++;
if (MenOut >= 10) {
CloseDoor = true;
LetMenOut = false;
}
BaseGuards.Members.push({Healthiness:7 + random(3), Agility:7 + random(3), Accuracy:7 + random(3), Intelligence:5, Holding:[0, 0, 0, 0], SniperExperience:random(1000)});
UpdateMemberParams(BaseGuards.Members[BaseGuards.Members.length - 1]);
BaseGuards.Members[BaseGuards.Members.length - 1].HP = BaseGuards.Members[BaseGuards.Members.length - 1].MaxHP;
BaseGuards.Members[BaseGuards.Members.length - 1].Group = BaseGuards;
RandomAppearance(BaseGuards.Members[BaseGuards.Members.length - 1]);
BaseGuards.Inventory[0].Amount++;
BaseGuards.Inventory[1].Amount = BaseGuards.Inventory[1].Amount + 50;
if (random(10) < 5) {
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[0] = {Type:28, Amount:1, AmmoSlot:2, Load:30};
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[2] = {Type:6, Amount:50};
} else if (random(2) == 0) {
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[0] = {Type:14, Amount:1, AmmoSlot:2, Load:7};
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[2] = {Type:1, Amount:30};
} else {
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[0] = {Type:48, Amount:1, AmmoSlot:2, Load:200};
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[2] = {Type:8, Amount:30};
}
if (random(2) == 0) {
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[4] = {Type:63, Amount:1};
} else {
BaseGuards.Members[BaseGuards.Members.length - 1].Holding[4] = {Type:62, Amount:1};
}
BaseGuards.Members[BaseGuards.Members.length - 1].ComingOut = true;
BaseGuards.Members[BaseGuards.Members.length - 1].OutIndex = MenOut - 1;
duplicateMovieClip (BW.CharacterSample, "sld" + LastSld, BW.getNextHighestDepth());
BW["sld" + LastSld].swapDepths(BW.Cursor);
if ((MenOut % 2) == 0) {
AppearX = 5;
} else {
AppearX = 6;
}
BaseGuards.Members[BaseGuards.Members.length - 1].BSquare = {x:BunkerX + AppearX, y:BunkerY + 2};
BaseGuards.Members[BaseGuards.Members.length - 1].BattleChar = BW["sld" + LastSld];
BattleField[BaseGuards.Members[BaseGuards.Members.length - 1].BSquare.x][BaseGuards.Members[BaseGuards.Members.length - 1].BSquare.y] = 999 + BaseGuards.Members.length;
BW["sld" + LastSld].Type = 2;
BW["sld" + LastSld].Index = BaseGuards.Members.length - 1;
BW["sld" + LastSld]._rotation = 180;
BW["sld" + LastSld].setMask(BW.BunkerMask);
ActList.push(BaseGuards.Members[BaseGuards.Members.length - 1]);
InitiateSoldier(BaseGuards.Members[BaseGuards.Members.length - 1]);
LastSld++;
} else {
NowActing = 0;
}
}
if ((ActList[NowActing].ComingOut and (!LetMenOut)) and (!CloseDoor)) {
BW.StructuresSample.Inside.gotoAndPlay(2);
BattleField[BunkerX + 5][BunkerY + 9] = Number.NaN;
BattleField[BunkerX + 6][BunkerY + 9] = Number.NaN;
CloseDoor = true;
}
ActList[NowActing].AP = ActList[NowActing].MaxAP;
ActPhase = 0;
ForceThrow = false;
}
if (BW._x < (445 - (BFWidth * 40))) {
BW._x = 445 - (BFWidth * 40);
}
if (BW._x > -40) {
BW._x = -40;
}
if (BW._y < (445 - (BFHeight * 40))) {
BW._y = 445 - (BFHeight * 40);
}
if (BW._y > -40) {
BW._y = -40;
}
BW.BG._x = Math.floor((-BW._x) / 480) * 480;
BW.BG._y = Math.floor((-BW._y) / 480) * 480;
}
Frame 12
gotoAndPlay ("Cycle");
Frame 13
GOS.gotoAndStop(GameOverType);
Frame 14
gotoAndStop ("Game Over");
Frame 15
if (!OnSite()) {
gotoAndStop ("Main Menu");
}
YourName = People[0].Name;
DataText = (((((((("Wealth: " + CalculateWealth()) + "\r") + "\r") + "Kills: ") + Competitive.Kills) + "\r") + "\r") + "Play Time: ") + TimePeriod(Competitive.PlayTime);
Frame 16
delete onEnterFrame;
if (!OnSite()) {
gotoAndStop ("Main Menu");
}
SL.gotoAndStop(1);
Kills = Competitive.Kills;
Wealth = CalculateWealth();
Time = Competitive.PlayTime;
SubmitName = YourName;
Send = new LoadVars();
Receive = new LoadVars();
TrySending = true;
this.onEnterFrame = function () {
if (TrySending and (!BlockSend)) {
Send.D = GamePass + GameIndex;
Send.N = SubmitName;
Send.K = Kills;
Send.W = Wealth;
Send.T = Time;
TrySending = false;
Send.sendAndLoad("caravaneer/submit.php", Receive);
Receive.onLoad = function (success) {
if (success) {
if (Receive.S == 0) {
Scorers = new Array();
sci = 0;
while (Receive["n" + sci] != undefined) {
Scorers[sci] = {Name:Receive["n" + sci], Wealth:Number(Receive["w" + sci]), Kills:Number(Receive["k" + sci]), Time:Number(Receive["t" + sci])};
if (Receive.I == sci) {
Scorers[sci].You = true;
} else {
Scorers[sci].You = false;
}
sci++;
}
gotoAndStop ("Submit 3");
} else if (Receive.S == 1) {
ScoreText = "Access Denied";
BlockSend = true;
} else {
ScoreText = "Data Error " + Receive.S;
TrySending = true;
}
} else {
ScoreText = "Load Error";
TrySending = true;
}
};
}
};
Instance of Symbol 4317 MovieClip "SL" in Frame 16
onClipEvent (enterFrame) {
if (_parent.BlockSend) {
gotoAndStop (2);
}
}
Frame 17
function FindYourPos() {
sci = 0;
while (sci < Scorers.length) {
if (Scorers[sci].You) {
return(sci);
}
sci++;
}
}
function SetSurvMode(Md) {
if (Md == 1) {
ModeName = "SURVIVIAL: LONGEST TIME";
Scorers.sortOn("Time", 18);
C1 = "Time";
SButtons.Name1 = "WEALTHIEST";
SButtons.Name2 = "MOST KILLS";
SButtons.b1Mode = 2;
SButtons.b2Mode = 3;
}
if (Md == 2) {
ModeName = "SURVIVAL: WEALTHIEST";
Scorers.sortOn("Wealth", 18);
C1 = "Wealth";
SButtons.Name1 = "LONGEST TIME";
SButtons.Name2 = "MOST KILLS";
SButtons.b1Mode = 1;
SButtons.b2Mode = 3;
}
if (Md == 3) {
ModeName = "SURVIVAL: MOST KILLS";
Scorers.sortOn("Kills", 18);
C1 = "Kills";
SButtons.Name1 = "LONGEST TIME";
SButtons.Name2 = "WEALTHIEST";
SButtons.b1Mode = 1;
SButtons.b2Mode = 2;
}
ColName1 = C1.toUpperCase();
}
function UpdateScore() {
if ((ScOffset + 15) >= Scorers.length) {
ScOffset = Scorers.length - 15;
}
if (ScOffset < 0) {
ScOffset = 0;
}
if ((ScOffset + 15) >= Scorers.length) {
butt2.enabled = false;
BC2._visible = true;
} else {
butt2.enabled = true;
BC2._visible = false;
}
if (ScOffset <= 0) {
butt1.enabled = false;
BC1._visible = true;
} else {
butt1.enabled = true;
BC1._visible = false;
}
sci = 0;
while (sci <= 14) {
RealPos = sci + ScOffset;
if (Scorers[RealPos].You) {
this["i" + sci].gotoAndStop(2);
} else {
this["i" + sci].gotoAndStop(1);
}
sci++;
}
sci = 0;
while (sci <= 14) {
RealPos = sci + ScOffset;
if (RealPos < Scorers.length) {
this["i" + sci]._visible = true;
this["i" + sci].Num = (RealPos + 1) + ".";
this["i" + sci].Name = Scorers[RealPos].Name;
if (C1 == "Time") {
Vlu = TimePeriod(Scorers[RealPos][C1]);
} else {
Vlu = Scorers[RealPos][C1];
}
this["i" + sci].Col1 = Vlu;
} else {
this["i" + sci]._visible = false;
}
sci++;
}
}
if (!OnSite()) {
gotoAndStop ("Main Menu");
}
if (CompMode == 1) {
ModeName = "EARN A MILLION HEROES";
Scorers.sortOn("Time", 16);
C1 = "Time";
SButtons._visible = false;
}
if (CompMode == 2) {
ModeName = "KILL'EM ALL HEROES";
Scorers.sortOn("Kills", 18);
C1 = "Kills";
SButtons._visible = false;
}
if (CompMode == 3) {
SButtons._visible = true;
Scorers.sortOn("Time", 18);
TimePos = FindYourPos();
Scorers.sortOn("Wealth", 18);
WealthPos = FindYourPos();
Scorers.sortOn("Kills", 18);
KillsPos = FindYourPos();
if ((KillsPos <= TimePos) and (KillsPos <= WealthPos)) {
SMD = 3;
}
if ((WealthPos <= TimePos) and (WealthPos <= KillsPos)) {
SMD = 2;
}
if ((TimePos <= WealthPos) and (TimePos <= KillsPos)) {
SMD = 1;
}
SetSurvMode(SMD);
}
ColName1 = C1.toUpperCase();
ScOffset = FindYourPos() - 7;
UpdateScore();
Symbol 14 Button
on (press) {
getURL ("http://www.sugar-free-games.com", "_SELF");
}
Symbol 24 MovieClip Frame 112
_parent.gotoAndPlay("Story");
Symbol 39 Button
on (press) {
gotoAndStop ("Main Menu");
}
Symbol 53 Button
on (release) {
gotoAndStop ("CharSetUp");
}
Symbol 57 Button
on (release) {
gotoAndStop ("Mode Select");
}
Symbol 61 Button
on (release) {
AllButtons(this, false);
OptionsMenu._visible = true;
}
Symbol 65 Button
on (release) {
getURL ("http://www.sugar-free-games.com/caravaneertutorial.php", "_blank");
}
Symbol 69 Button
on (release) {
getURL ("http://www.sugar-free-games.com/caravaneertopscore.php", "_blank");
}
Symbol 73 Button
on (release) {
getURL (GamePage, "_blank");
}
Symbol 77 Button
on (release) {
getURL ("http://www.sugar-free-games.com", "_blank");
}
Symbol 87 Button
on (press) {
getURL ("http://www.sugar-free-games.com/caravaneerversion.php?version=" + VersionCode, "_blank");
}
Symbol 88 Button
on (press) {
getURL ("http://www.sugar-free-games.com", "_blank");
}
Symbol 95 Button
on (press) {
CBox.gotoAndStop(5);
_parent.AllButtons(this, false);
CBox._visible = true;
}
Symbol 102 Button
on (press) {
if (_parent.GameSpeed < 3) {
_parent.GameSpeed++;
GSInd.gotoAndStop(_parent.GameSpeed);
}
}
Symbol 103 Button
on (press) {
if (_parent.GameSpeed > 1) {
_parent.GameSpeed--;
GSInd.gotoAndStop(_parent.GameSpeed);
}
}
Symbol 104 Button
on (press) {
gotoAndStop (2);
}
Symbol 105 Button
on (press) {
gotoAndStop (3);
}
Symbol 106 Button
on (press) {
getURL ("http://www.sugar-free-games.com/caravaneertutorial.php", "_blank");
}
Symbol 107 Button
on (press) {
getURL ("http://www.sugar-free-games.com/caravaneerversion.php?version=" + _parent.VersionCode, "_blank");
}
Symbol 108 Button
on (press) {
getURL ("http://www.sugar-free-games.com", "_blank");
}
Symbol 109 Button
on (press) {
_parent.SwitchMode(_parent.OldMode);
_parent.MDown = false;
}
Symbol 112 Button
on (press) {
if (_parent.BattleSpeed < 4) {
_parent.BattleSpeed++;
if (_parent.BattleSpeed == 3) {
_parent.BattleSpeed = 4;
}
BSInd.gotoAndStop(_parent.BattleSpeed);
}
}
Symbol 113 Button
on (press) {
if (_parent.BattleSpeed > 1) {
_parent.BattleSpeed--;
if (_parent.BattleSpeed == 3) {
_parent.BattleSpeed = 2;
}
BSInd.gotoAndStop(_parent.BattleSpeed);
}
}
Symbol 137 Button
on (press) {
_parent._parent.Loading = LoadIndex;
_parent._parent.gotoAndPlay("Initiate");
}
Symbol 138 Button
on (press) {
_parent.ConfirmBox(false);
}
Symbol 143 Button
on (press) {
gotoAndStop (3);
}
Symbol 145 Button
on (press) {
Res = _parent._parent.Save(SaveIndex, NewSlotName);
if (Res === true) {
_parent.ConfirmBox(false);
_parent.UpdateSlots(false);
gotoAndStop (1);
}
if ((Res == "pending") or (Res === false)) {
_parent._parent.Saved.onStatus = function (infoObject) {
trace(infoObject.code);
if (infoObject.level == "error") {
trace("Error");
gotoAndStop (4);
_parent._parent.Saved.data.Slots[SaveIndex] = undefined;
_parent.UpdateSlots(false);
} else {
_parent.ConfirmBox(false);
_parent.UpdateSlots(false);
gotoAndStop (1);
}
};
}
}
Symbol 146 Button
on (press) {
_parent.ConfirmBox(false);
gotoAndStop (1);
}
Symbol 153 Button
on (press) {
_parent._parent.Mus.setVolume(0);
_parent._parent.gotoAndStop("Main Menu");
}
Symbol 154 Button
on (press) {
this._visible = false;
_parent._parent.AllButtons(_parent, true);
}
Symbol 157 MovieClip Frame 1
IText.removeTextField();
stop();
Symbol 157 MovieClip Frame 2
IText.removeTextField();
Symbol 157 MovieClip Frame 3
function SetSelection() {
Selection.setFocus("IText");
Selection.setSelection(0, IText.text.length);
}
var my_fmt = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "Arial";
my_fmt.color = 0;
my_fmt.align = "center";
my_fmt.bold = true;
my_fmt.size = 10;
this.createTextField("IText", this.getNextHighestDepth(), -84.5, -13.9, 169, 17.7);
IText.type = "input";
IText.maxChars = 20;
IText.variable = "NewSlotName";
IText.setNewTextFormat(my_fmt);
IText.text = "SLOT " + (SaveIndex + 1);
this.onEnterFrame = function () {
SetSelection();
delete this.onEnterFrame;
};
Symbol 157 MovieClip Frame 4
IText.removeTextField();
Symbol 157 MovieClip Frame 5
IText.removeTextField();
stop();
Symbol 160 Button
on (press) {
if (FromMainMenu) {
this._visible = false;
_parent.AllButtons(_parent, true);
} else {
gotoAndStop (1);
}
}
Symbol 200 MovieClip Frame 1
function UpdateCB() {
if (_parent.MusicOn) {
MusicCB.gotoAndStop(2);
} else {
MusicCB.gotoAndStop(1);
}
if (_parent.FXOn) {
SFXCB.gotoAndStop(2);
} else {
SFXCB.gotoAndStop(1);
}
}
function UpdateSlots(Load) {
sl = 0;
while (sl <= 4) {
this["S" + sl].Index = sl;
if (Load) {
this["S" + sl].BT.gotoAndStop(1);
} else {
this["S" + sl].BT.gotoAndStop(2);
}
if (_parent.Saved.data.Slots[sl] instanceof Object) {
this["S" + sl].SlotName = _parent.Saved.data.Slots[sl].SlotName;
this["S" + sl].gotoAndStop(1);
this["S" + sl].Name = _parent.Saved.data.Slots[sl].YourChar.Name;
this["S" + sl].Icon.gotoAndStop(_parent.Saved.data.Slots[sl].CharacterPortrait);
this["S" + sl].GameDate = "Game Time: " + _parent.FormatedTime(_parent.Saved.data.Slots[sl].Time.Day, _parent.Saved.data.Slots[sl].Time.Month, _parent.Saved.data.Slots[sl].Time.Year, _parent.Saved.data.Slots[sl].Time.Hour);
DateString = _parent.Saved.data.Slots[sl].SaveTime.toString();
DateString = DateString.slice(0, DateString.indexOf("GMT"));
this["S" + sl].SaveDate = "Save Time: " + DateString;
this["S" + sl].Mode = "Mode: ";
if (_parent.Saved.data.Slots[sl].GameMode == 1) {
this["S" + sl].Mode = this["S" + sl].Mode + "Story";
} else {
switch (_parent.Saved.data.Slots[sl].CompMode) {
case 1 :
this["S" + sl].Mode = this["S" + sl].Mode + "Earn a Million";
break;
case 2 :
this["S" + sl].Mode = this["S" + sl].Mode + "Kill'em All";
break;
case 3 :
this["S" + sl].Mode = this["S" + sl].Mode + "Survival";
}
}
} else {
if (Load) {
this["S" + sl].gotoAndStop(3);
} else {
this["S" + sl].gotoAndStop(2);
}
SlotNum = sl + 1;
this["S" + sl].SlotName = "SLOT " + SlotNum;
}
if (Load) {
if (FromMainMenu) {
this["S" + sl].ActionButt.onPress = function () {
_parent.Loading = this._parent.Index;
_parent.gotoAndPlay("Initiate");
};
} else {
this["S" + sl].ActionButt.onPress = function () {
CBox.Txt = ("If you load a saved game, you will lose all data in your current game.\rAre you sure you want to laod '" + this._parent.SlotName) + "'?";
CBox.LoadIndex = this._parent.Index;
CBox.gotoAndStop(1);
ConfirmBox(true);
};
}
} else {
this["S" + sl].ActionButt.onPress = function () {
CBox.Txt = (((((("Slot '" + this._parent.SlotName) + "' is occupied.") + "\r") + "\r") + "Are you sure you want to overwrite '") + this._parent.SlotName) + "'?";
CBox.SaveIndex = this._parent.Index;
CBox.NewSlotName = "SLOT " + (this._parent.Index + 1);
if (_parent.Saved.data.Slots[this._parent.Index] instanceof Object) {
CBox.gotoAndStop(2);
} else {
CBox.gotoAndStop(3);
}
ConfirmBox(true);
};
}
sl++;
}
}
function ConfirmBox(On) {
CBox._visible = On;
slt = 0;
while (slt <= 4) {
this["S" + slt].ActionButt.enabled = !On;
slt++;
}
}
stop();
this.onEnterFrame = function () {
GSInd.gotoAndStop(_parent.GameSpeed);
BSInd.gotoAndStop(_parent.BattleSpeed);
UpdateCB();
};
CBox._visible = false;
Instance of Symbol 126 MovieClip "MusicCB" in Symbol 200 MovieClip Frame 1
on (press) {
_parent._parent.MusicOn = !_parent._parent.MusicOn;
_parent.UpdateCB();
}
Instance of Symbol 126 MovieClip "SFXCB" in Symbol 200 MovieClip Frame 1
on (press) {
_parent.FXOn = !_parent._parent.FXOn;
_parent.UpdateCB();
}
Symbol 200 MovieClip Frame 2
UpdateSlots(true);
delete onEnterFrame;
Symbol 200 MovieClip Frame 3
UpdateSlots(false);
delete onEnterFrame;
Symbol 211 Button
on (press) {
_parent.GameMode = 2;
_parent.CompMode = 1;
_parent.gotoAndStop("CharSetUp");
}
Symbol 215 Button
on (press) {
_parent.GameMode = 2;
_parent.CompMode = 2;
_parent.gotoAndStop("CharSetUp");
}
Symbol 219 Button
on (press) {
_parent.GameMode = 2;
_parent.CompMode = 3;
_parent.gotoAndStop("CharSetUp");
}
Symbol 222 Button
on (press) {
_parent.gotoAndStop("Main Menu");
}
Symbol 227 Button
on (press) {
getURL (_parent.GamePage, "_blank");
}
Symbol 229 Button
on (press) {
_parent.gotoAndPlay("CharSetUp");
}
Symbol 231 Button
on (press) {
_parent.gotoAndStop("Main Menu");
}
Symbol 236 Button
on (press) {
CurrentPreset++;
if (CurrentPreset >= PreSetChars.length) {
CurrentPreset = 1;
}
PreSetName = PreSetChars[CurrentPreset].Name;
PreSetIcon.gotoAndStop(CurrentPreset);
}
Symbol 237 Button
on (press) {
CurrentPreset--;
if (CurrentPreset < 1) {
CurrentPreset = PreSetChars.length - 1;
}
PreSetName = PreSetChars[CurrentPreset].Name;
PreSetIcon.gotoAndStop(CurrentPreset);
}
Symbol 238 Button
on (press) {
UpdateFromPreset();
}
Symbol 239 Button
on (press) {
CharacterPortrait--;
if (CharacterPortrait < 1) {
CharacterPortrait = PreSetChars.length - 1;
}
Portrait.gotoAndStop(CharacterPortrait);
}
Symbol 240 Button
on (press) {
CharacterPortrait++;
if (CharacterPortrait >= PreSetChars.length) {
CharacterPortrait = 1;
}
Portrait.gotoAndStop(CharacterPortrait);
}
Symbol 256 Button
on (press) {
Done();
}
Symbol 267 Button
on (press) {
gotoAndPlay ("Initiate");
}
Symbol 301 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 30
stop();
Symbol 474 MovieClip Frame 1
_parent.Paint();
Symbol 474 MovieClip Frame 2
_parent.Paint();
Symbol 474 MovieClip Frame 3
_parent.Paint();
Symbol 474 MovieClip Frame 4
_parent.Paint();
Symbol 474 MovieClip Frame 5
_parent.Paint();
Symbol 474 MovieClip Frame 6
_parent.Paint();
Symbol 474 MovieClip Frame 7
_parent.Paint();
Symbol 474 MovieClip Frame 8
_parent.Paint();
Symbol 474 MovieClip Frame 9
_parent.Paint();
Symbol 474 MovieClip Frame 10
_parent.Paint();
Symbol 474 MovieClip Frame 11
_parent.Paint();
Symbol 474 MovieClip Frame 12
_parent.Paint();
Symbol 474 MovieClip Frame 13
_parent.Paint();
Symbol 474 MovieClip Frame 14
_parent.Paint();
Symbol 474 MovieClip Frame 15
_parent.Paint();
Symbol 474 MovieClip Frame 16
_parent.Paint();
Symbol 474 MovieClip Frame 17
_parent.Paint();
Symbol 474 MovieClip Frame 18
_parent.Paint();
Symbol 474 MovieClip Frame 19
_parent.Paint();
Symbol 474 MovieClip Frame 20
_parent.Paint();
Symbol 474 MovieClip Frame 21
_parent.Paint();
Symbol 474 MovieClip Frame 22
_parent.Paint();
Symbol 474 MovieClip Frame 23
_parent.Paint();
Symbol 474 MovieClip Frame 24
_parent.Paint();
Symbol 539 MovieClip Frame 1
_parent.Paint();
Symbol 539 MovieClip Frame 2
_parent.Paint();
Symbol 539 MovieClip Frame 3
_parent.Paint();
Symbol 539 MovieClip Frame 4
_parent.Paint();
Symbol 539 MovieClip Frame 5
_parent.Paint();
Symbol 539 MovieClip Frame 6
_parent.Paint();
Symbol 539 MovieClip Frame 7
_parent.Paint();
Symbol 539 MovieClip Frame 8
_parent.Paint();
Symbol 539 MovieClip Frame 9
_parent.Paint();
Symbol 539 MovieClip Frame 10
_parent.Paint();
Symbol 539 MovieClip Frame 11
_parent.Paint();
Symbol 539 MovieClip Frame 12
_parent.Paint();
Symbol 539 MovieClip Frame 13
_parent.Paint();
Symbol 539 MovieClip Frame 14
_parent.Paint();
Symbol 539 MovieClip Frame 15
_parent.Paint();
Symbol 539 MovieClip Frame 16
_parent.Paint();
Symbol 539 MovieClip Frame 17
_parent.Paint();
Symbol 539 MovieClip Frame 18
_parent.Paint();
Symbol 539 MovieClip Frame 19
_parent.Paint();
Symbol 539 MovieClip Frame 20
_parent.Paint();
Symbol 539 MovieClip Frame 21
_parent.Paint();
Symbol 539 MovieClip Frame 22
_parent.Paint();
Symbol 539 MovieClip Frame 23
_parent.Paint();
Symbol 539 MovieClip Frame 24
_parent.Paint();
Symbol 646 MovieClip Frame 1
_parent.Paint();
Symbol 646 MovieClip Frame 2
_parent.Paint();
Symbol 646 MovieClip Frame 3
_parent.Paint();
Symbol 646 MovieClip Frame 4
_parent.Paint();
Symbol 646 MovieClip Frame 5
_parent.Paint();
Symbol 646 MovieClip Frame 6
_parent.Paint();
Symbol 646 MovieClip Frame 7
_parent.Paint();
Symbol 646 MovieClip Frame 8
_parent.Paint();
Symbol 646 MovieClip Frame 9
_parent.Paint();
Symbol 646 MovieClip Frame 10
_parent.Paint();
Symbol 646 MovieClip Frame 11
_parent.Paint();
Symbol 646 MovieClip Frame 12
_parent.Paint();
Symbol 646 MovieClip Frame 13
_parent.Paint();
Symbol 646 MovieClip Frame 14
_parent.Paint();
Symbol 646 MovieClip Frame 15
_parent.Paint();
Symbol 646 MovieClip Frame 16
_parent.Paint();
Symbol 646 MovieClip Frame 17
_parent.Paint();
Symbol 646 MovieClip Frame 18
_parent.Paint();
Symbol 646 MovieClip Frame 19
_parent.Paint();
Symbol 646 MovieClip Frame 20
_parent.Paint();
Symbol 646 MovieClip Frame 21
_parent.Paint();
Symbol 646 MovieClip Frame 22
_parent.Paint();
Symbol 646 MovieClip Frame 23
_parent.Paint();
Symbol 646 MovieClip Frame 24
_parent.Paint();
Symbol 751 MovieClip Frame 1
_parent.Paint();
Symbol 751 MovieClip Frame 2
_parent.Paint();
Symbol 751 MovieClip Frame 3
_parent.Paint();
Symbol 751 MovieClip Frame 4
_parent.Paint();
Symbol 751 MovieClip Frame 5
_parent.Paint();
Symbol 751 MovieClip Frame 6
_parent.Paint();
Symbol 751 MovieClip Frame 7
_parent.Paint();
Symbol 751 MovieClip Frame 8
_parent.Paint();
Symbol 751 MovieClip Frame 9
_parent.Paint();
Symbol 751 MovieClip Frame 10
_parent.Paint();
Symbol 751 MovieClip Frame 11
_parent.Paint();
Symbol 751 MovieClip Frame 12
_parent.Paint();
Symbol 751 MovieClip Frame 13
_parent.Paint();
Symbol 751 MovieClip Frame 14
_parent.Paint();
Symbol 751 MovieClip Frame 15
_parent.Paint();
Symbol 751 MovieClip Frame 16
_parent.Paint();
Symbol 751 MovieClip Frame 17
_parent.Paint();
Symbol 751 MovieClip Frame 18
_parent.Paint();
Symbol 751 MovieClip Frame 19
_parent.Paint();
Symbol 751 MovieClip Frame 20
_parent.Paint();
Symbol 751 MovieClip Frame 21
_parent.Paint();
Symbol 751 MovieClip Frame 22
_parent.Paint();
Symbol 751 MovieClip Frame 23
_parent.Paint();
Symbol 751 MovieClip Frame 24
_parent.Paint();
Symbol 815 MovieClip Frame 1
_parent.Paint();
Symbol 815 MovieClip Frame 2
_parent.Paint();
Symbol 815 MovieClip Frame 3
_parent.Paint();
Symbol 815 MovieClip Frame 4
_parent.Paint();
Symbol 815 MovieClip Frame 5
_parent.Paint();
Symbol 815 MovieClip Frame 6
_parent.Paint();
Symbol 815 MovieClip Frame 7
_parent.Paint();
Symbol 815 MovieClip Frame 8
_parent.Paint();
Symbol 815 MovieClip Frame 9
_parent.Paint();
Symbol 815 MovieClip Frame 10
_parent.Paint();
Symbol 815 MovieClip Frame 11
_parent.Paint();
Symbol 815 MovieClip Frame 12
_parent.Paint();
Symbol 815 MovieClip Frame 13
_parent.Paint();
Symbol 815 MovieClip Frame 14
_parent.Paint();
Symbol 815 MovieClip Frame 15
_parent.Paint();
Symbol 815 MovieClip Frame 16
_parent.Paint();
Symbol 815 MovieClip Frame 17
_parent.Paint();
Symbol 815 MovieClip Frame 18
_parent.Paint();
Symbol 815 MovieClip Frame 19
_parent.Paint();
Symbol 815 MovieClip Frame 20
_parent.Paint();
Symbol 815 MovieClip Frame 21
_parent.Paint();
Symbol 815 MovieClip Frame 22
_parent.Paint();
Symbol 815 MovieClip Frame 23
_parent.Paint();
Symbol 815 MovieClip Frame 24
_parent.Paint();
Symbol 901 MovieClip Frame 1
_parent.Paint();
Symbol 901 MovieClip Frame 2
_parent.Paint();
Symbol 901 MovieClip Frame 3
_parent.Paint();
Symbol 901 MovieClip Frame 4
_parent.Paint();
Symbol 901 MovieClip Frame 5
_parent.Paint();
Symbol 901 MovieClip Frame 6
_parent.Paint();
Symbol 901 MovieClip Frame 7
_parent.Paint();
Symbol 901 MovieClip Frame 8
_parent.Paint();
Symbol 901 MovieClip Frame 9
_parent.Paint();
Symbol 901 MovieClip Frame 10
_parent.Paint();
Symbol 901 MovieClip Frame 11
_parent.Paint();
Symbol 901 MovieClip Frame 12
_parent.Paint();
Symbol 901 MovieClip Frame 13
_parent.Paint();
Symbol 901 MovieClip Frame 14
_parent.Paint();
Symbol 901 MovieClip Frame 15
_parent.Paint();
Symbol 901 MovieClip Frame 16
_parent.Paint();
Symbol 901 MovieClip Frame 17
_parent.Paint();
Symbol 901 MovieClip Frame 18
_parent.Paint();
Symbol 901 MovieClip Frame 19
_parent.Paint();
Symbol 901 MovieClip Frame 20
_parent.Paint();
Symbol 901 MovieClip Frame 21
_parent.Paint();
Symbol 901 MovieClip Frame 22
_parent.Paint();
Symbol 901 MovieClip Frame 23
_parent.Paint();
Symbol 901 MovieClip Frame 24
_parent.Paint();
Symbol 902 MovieClip Frame 1
function Paint() {
Cloth1 = new Color(Inside.C);
Cloth1.setRGB(_parent.PantsColor);
Skin = new Color(Inside.S);
Skin.setRGB(_parent.SkinColor);
if (!isNaN(_parent.ShoesColor)) {
Shoes = new Color(Inside.s);
Shoes.setRGB(_parent.ShoesColor);
}
}
Symbol 929 MovieClip Frame 1
_parent.Paint();
Symbol 929 MovieClip Frame 2
_parent.Paint();
Symbol 929 MovieClip Frame 3
_parent.Paint();
Symbol 929 MovieClip Frame 4
_parent.Paint();
Symbol 929 MovieClip Frame 5
_parent.Paint();
Symbol 929 MovieClip Frame 6
_parent.Paint();
Symbol 929 MovieClip Frame 7
_parent.Paint();
Symbol 929 MovieClip Frame 8
_parent.Paint();
Symbol 929 MovieClip Frame 9
_parent.Paint();
Symbol 929 MovieClip Frame 10
_parent.Paint();
Symbol 929 MovieClip Frame 11
_parent.Paint();
Symbol 929 MovieClip Frame 12
_parent.Paint();
Symbol 929 MovieClip Frame 13
_parent.Paint();
Symbol 966 MovieClip Frame 1
_parent.Paint();
Symbol 966 MovieClip Frame 2
_parent.Paint();
Symbol 966 MovieClip Frame 3
_parent.Paint();
Symbol 966 MovieClip Frame 4
_parent.Paint();
Symbol 966 MovieClip Frame 5
_parent.Paint();
Symbol 966 MovieClip Frame 6
_parent.Paint();
Symbol 966 MovieClip Frame 7
_parent.Paint();
Symbol 966 MovieClip Frame 8
_parent.Paint();
Symbol 966 MovieClip Frame 9
_parent.Paint();
Symbol 966 MovieClip Frame 10
_parent.Paint();
Symbol 966 MovieClip Frame 11
_parent.Paint();
Symbol 966 MovieClip Frame 12
_parent.Paint();
Symbol 966 MovieClip Frame 13
_parent.Paint();
Symbol 993 MovieClip Frame 1
_parent.Paint();
Symbol 993 MovieClip Frame 2
_parent.Paint();
Symbol 993 MovieClip Frame 3
_parent.Paint();
Symbol 993 MovieClip Frame 4
_parent.Paint();
Symbol 993 MovieClip Frame 5
_parent.Paint();
Symbol 993 MovieClip Frame 6
_parent.Paint();
Symbol 993 MovieClip Frame 7
_parent.Paint();
Symbol 993 MovieClip Frame 8
_parent.Paint();
Symbol 993 MovieClip Frame 9
_parent.Paint();
Symbol 993 MovieClip Frame 10
_parent.Paint();
Symbol 993 MovieClip Frame 11
_parent.Paint();
Symbol 993 MovieClip Frame 12
_parent.Paint();
Symbol 993 MovieClip Frame 13
_parent.Paint();
Symbol 1046 MovieClip Frame 1
_parent.Paint();
Symbol 1046 MovieClip Frame 2
_parent.Paint();
Symbol 1046 MovieClip Frame 3
_parent.Paint();
Symbol 1046 MovieClip Frame 4
_parent.Paint();
Symbol 1046 MovieClip Frame 5
_parent.Paint();
Symbol 1046 MovieClip Frame 6
_parent.Paint();
Symbol 1046 MovieClip Frame 7
_parent.Paint();
Symbol 1046 MovieClip Frame 8
_parent.Paint();
Symbol 1046 MovieClip Frame 9
_parent.Paint();
Symbol 1046 MovieClip Frame 10
_parent.Paint();
Symbol 1046 MovieClip Frame 11
_parent.Paint();
Symbol 1046 MovieClip Frame 12
_parent.Paint();
Symbol 1046 MovieClip Frame 13
_parent.Paint();
Symbol 1076 MovieClip Frame 1
_parent.Paint();
Symbol 1076 MovieClip Frame 2
_parent.Paint();
Symbol 1076 MovieClip Frame 3
_parent.Paint();
Symbol 1076 MovieClip Frame 4
_parent.Paint();
Symbol 1076 MovieClip Frame 5
_parent.Paint();
Symbol 1076 MovieClip Frame 6
_parent.Paint();
Symbol 1076 MovieClip Frame 7
_parent.Paint();
Symbol 1076 MovieClip Frame 8
_parent.Paint();
Symbol 1076 MovieClip Frame 9
_parent.Paint();
Symbol 1076 MovieClip Frame 10
_parent.Paint();
Symbol 1076 MovieClip Frame 11
_parent.Paint();
Symbol 1076 MovieClip Frame 12
_parent.Paint();
Symbol 1076 MovieClip Frame 13
_parent.Paint();
Symbol 1132 MovieClip Frame 1
_parent.Paint();
Symbol 1132 MovieClip Frame 2
_parent.Paint();
Symbol 1132 MovieClip Frame 3
_parent.Paint();
Symbol 1132 MovieClip Frame 4
_parent.Paint();
Symbol 1132 MovieClip Frame 5
_parent.Paint();
Symbol 1132 MovieClip Frame 6
_parent.Paint();
Symbol 1132 MovieClip Frame 7
_parent.Paint();
Symbol 1132 MovieClip Frame 8
_parent.Paint();
Symbol 1132 MovieClip Frame 9
_parent.Paint();
Symbol 1132 MovieClip Frame 10
_parent.Paint();
Symbol 1132 MovieClip Frame 11
_parent.Paint();
Symbol 1132 MovieClip Frame 12
_parent.Paint();
Symbol 1132 MovieClip Frame 13
_parent.Paint();
Symbol 1182 MovieClip Frame 1
_parent.Paint();
Symbol 1182 MovieClip Frame 2
_parent.Paint();
Symbol 1182 MovieClip Frame 3
_parent.Paint();
Symbol 1182 MovieClip Frame 4
_parent.Paint();
Symbol 1182 MovieClip Frame 5
_parent.Paint();
Symbol 1182 MovieClip Frame 6
_parent.Paint();
Symbol 1182 MovieClip Frame 7
_parent.Paint();
Symbol 1182 MovieClip Frame 8
_parent.Paint();
Symbol 1182 MovieClip Frame 9
_parent.Paint();
Symbol 1182 MovieClip Frame 10
_parent.Paint();
Symbol 1182 MovieClip Frame 11
_parent.Paint();
Symbol 1182 MovieClip Frame 12
_parent.Paint();
Symbol 1182 MovieClip Frame 13
_parent.Paint();
Symbol 1238 MovieClip Frame 1
_parent.Paint();
Symbol 1238 MovieClip Frame 2
_parent.Paint();
Symbol 1238 MovieClip Frame 3
_parent.Paint();
Symbol 1238 MovieClip Frame 4
_parent.Paint();
Symbol 1238 MovieClip Frame 5
_parent.Paint();
Symbol 1238 MovieClip Frame 6
_parent.Paint();
Symbol 1238 MovieClip Frame 7
_parent.Paint();
Symbol 1238 MovieClip Frame 8
_parent.Paint();
Symbol 1238 MovieClip Frame 9
_parent.Paint();
Symbol 1238 MovieClip Frame 10
_parent.Paint();
Symbol 1238 MovieClip Frame 11
_parent.Paint();
Symbol 1238 MovieClip Frame 12
_parent.Paint();
Symbol 1238 MovieClip Frame 13
_parent.Paint();
Symbol 1239 MovieClip Frame 1
function Paint() {
Cloth1 = new Color(Inside.C);
if (_parent._parent.ArmorOn) {
Cloth1.setRGB(_parent._parent.ArmorCol);
} else {
Cloth1.setRGB(_parent._parent.ClothColor1);
}
Cloth2 = new Color(Inside.c);
Cloth2.setRGB(_parent._parent.ClothColor3);
Skin = new Color(Inside.S);
Skin.setRGB(_parent._parent.SkinColor);
}
Symbol 1372 MovieClip Frame 1
_parent.Paint();
Symbol 1372 MovieClip Frame 2
_parent.Paint();
Symbol 1372 MovieClip Frame 3
_parent.Paint();
Symbol 1372 MovieClip Frame 4
_parent.Paint();
Symbol 1372 MovieClip Frame 5
_parent.Paint();
Symbol 1372 MovieClip Frame 6
_parent.Paint();
Symbol 1372 MovieClip Frame 7
_parent.Paint();
Symbol 1372 MovieClip Frame 8
_parent.Paint();
Symbol 1372 MovieClip Frame 9
_parent.Paint();
Symbol 1372 MovieClip Frame 10
_parent.Paint();
Symbol 1372 MovieClip Frame 11
_parent.Paint();
Symbol 1372 MovieClip Frame 12
_parent.Paint();
Symbol 1372 MovieClip Frame 13
_parent.Paint();
Symbol 1372 MovieClip Frame 14
_parent.Paint();
Symbol 1372 MovieClip Frame 15
_parent.Paint();
Symbol 1372 MovieClip Frame 16
_parent.Paint();
Symbol 1372 MovieClip Frame 17
_parent.Paint();
Symbol 1372 MovieClip Frame 18
_parent.Paint();
Symbol 1372 MovieClip Frame 19
_parent.Paint();
Symbol 1372 MovieClip Frame 20
_parent.Paint();
Symbol 1372 MovieClip Frame 21
_parent.Paint();
Symbol 1372 MovieClip Frame 22
_parent.Paint();
Symbol 1372 MovieClip Frame 23
_parent.Paint();
Symbol 1372 MovieClip Frame 24
_parent.Paint();
Symbol 1372 MovieClip Frame 25
_parent.Paint();
Symbol 1372 MovieClip Frame 26
_parent.Paint();
Symbol 1372 MovieClip Frame 27
_parent.Paint();
Symbol 1372 MovieClip Frame 28
_parent.Paint();
Symbol 1372 MovieClip Frame 29
_parent.Paint();
Symbol 1372 MovieClip Frame 30
_parent.Paint();
Symbol 1372 MovieClip Frame 31
_parent.Paint();
Symbol 1372 MovieClip Frame 32
_parent.Paint();
Symbol 1372 MovieClip Frame 33
_parent.Paint();
Symbol 1372 MovieClip Frame 34
_parent.Paint();
Symbol 1372 MovieClip Frame 35
_parent.Paint();
Symbol 1372 MovieClip Frame 36
_parent.Paint();
Symbol 1372 MovieClip Frame 37
_parent.Paint();
Symbol 1372 MovieClip Frame 38
_parent.Paint();
Symbol 1372 MovieClip Frame 39
_parent.Paint();
Symbol 1372 MovieClip Frame 40
_parent.Paint();
Symbol 1372 MovieClip Frame 41
_parent.Paint();
Symbol 1372 MovieClip Frame 42
_parent.Paint();
Symbol 1372 MovieClip Frame 43
_parent.Paint();
Symbol 1372 MovieClip Frame 44
_parent.Paint();
Symbol 1372 MovieClip Frame 45
_parent.Paint();
Symbol 1447 MovieClip Frame 1
_parent.Paint();
Symbol 1447 MovieClip Frame 2
_parent.Paint();
Symbol 1447 MovieClip Frame 3
_parent.Paint();
Symbol 1447 MovieClip Frame 4
_parent.Paint();
Symbol 1447 MovieClip Frame 5
_parent.Paint();
Symbol 1447 MovieClip Frame 6
_parent.Paint();
Symbol 1447 MovieClip Frame 7
_parent.Paint();
Symbol 1447 MovieClip Frame 8
_parent.Paint();
Symbol 1447 MovieClip Frame 9
_parent.Paint();
Symbol 1447 MovieClip Frame 10
_parent.Paint();
Symbol 1447 MovieClip Frame 11
_parent.Paint();
Symbol 1447 MovieClip Frame 12
_parent.Paint();
Symbol 1447 MovieClip Frame 13
_parent.Paint();
Symbol 1447 MovieClip Frame 14
_parent.Paint();
Symbol 1447 MovieClip Frame 15
_parent.Paint();
Symbol 1447 MovieClip Frame 16
_parent.Paint();
Symbol 1447 MovieClip Frame 17
_parent.Paint();
Symbol 1447 MovieClip Frame 18
_parent.Paint();
Symbol 1447 MovieClip Frame 19
_parent.Paint();
Symbol 1447 MovieClip Frame 20
_parent.Paint();
Symbol 1447 MovieClip Frame 21
_parent.Paint();
Symbol 1447 MovieClip Frame 22
_parent.Paint();
Symbol 1447 MovieClip Frame 23
_parent.Paint();
Symbol 1447 MovieClip Frame 24
_parent.Paint();
Symbol 1447 MovieClip Frame 25
_parent.Paint();
Symbol 1447 MovieClip Frame 26
_parent.Paint();
Symbol 1447 MovieClip Frame 27
_parent.Paint();
Symbol 1447 MovieClip Frame 28
_parent.Paint();
Symbol 1447 MovieClip Frame 29
_parent.Paint();
Symbol 1447 MovieClip Frame 30
_parent.Paint();
Symbol 1447 MovieClip Frame 31
_parent.Paint();
Symbol 1447 MovieClip Frame 32
_parent.Paint();
Symbol 1447 MovieClip Frame 33
_parent.Paint();
Symbol 1447 MovieClip Frame 34
_parent.Paint();
Symbol 1447 MovieClip Frame 35
_parent.Paint();
Symbol 1447 MovieClip Frame 36
_parent.Paint();
Symbol 1447 MovieClip Frame 37
_parent.Paint();
Symbol 1447 MovieClip Frame 38
_parent.Paint();
Symbol 1447 MovieClip Frame 39
_parent.Paint();
Symbol 1447 MovieClip Frame 40
_parent.Paint();
Symbol 1447 MovieClip Frame 41
_parent.Paint();
Symbol 1447 MovieClip Frame 42
_parent.Paint();
Symbol 1447 MovieClip Frame 43
_parent.Paint();
Symbol 1447 MovieClip Frame 44
_parent.Paint();
Symbol 1447 MovieClip Frame 45
_parent.Paint();
Symbol 1522 MovieClip Frame 1
_parent.Paint();
Symbol 1522 MovieClip Frame 2
_parent.Paint();
Symbol 1522 MovieClip Frame 3
_parent.Paint();
Symbol 1522 MovieClip Frame 4
_parent.Paint();
Symbol 1522 MovieClip Frame 5
_parent.Paint();
Symbol 1522 MovieClip Frame 6
_parent.Paint();
Symbol 1522 MovieClip Frame 7
_parent.Paint();
Symbol 1522 MovieClip Frame 8
_parent.Paint();
Symbol 1522 MovieClip Frame 9
_parent.Paint();
Symbol 1522 MovieClip Frame 10
_parent.Paint();
Symbol 1522 MovieClip Frame 11
_parent.Paint();
Symbol 1522 MovieClip Frame 12
_parent.Paint();
Symbol 1522 MovieClip Frame 13
_parent.Paint();
Symbol 1522 MovieClip Frame 14
_parent.Paint();
Symbol 1522 MovieClip Frame 15
_parent.Paint();
Symbol 1522 MovieClip Frame 16
_parent.Paint();
Symbol 1522 MovieClip Frame 17
_parent.Paint();
Symbol 1522 MovieClip Frame 18
_parent.Paint();
Symbol 1522 MovieClip Frame 19
_parent.Paint();
Symbol 1522 MovieClip Frame 20
_parent.Paint();
Symbol 1522 MovieClip Frame 21
_parent.Paint();
Symbol 1522 MovieClip Frame 22
_parent.Paint();
Symbol 1522 MovieClip Frame 23
_parent.Paint();
Symbol 1522 MovieClip Frame 24
_parent.Paint();
Symbol 1522 MovieClip Frame 25
_parent.Paint();
Symbol 1522 MovieClip Frame 26
_parent.Paint();
Symbol 1522 MovieClip Frame 27
_parent.Paint();
Symbol 1522 MovieClip Frame 28
_parent.Paint();
Symbol 1522 MovieClip Frame 29
_parent.Paint();
Symbol 1522 MovieClip Frame 30
_parent.Paint();
Symbol 1522 MovieClip Frame 31
_parent.Paint();
Symbol 1522 MovieClip Frame 32
_parent.Paint();
Symbol 1522 MovieClip Frame 33
_parent.Paint();
Symbol 1522 MovieClip Frame 34
_parent.Paint();
Symbol 1522 MovieClip Frame 35
_parent.Paint();
Symbol 1522 MovieClip Frame 36
_parent.Paint();
Symbol 1522 MovieClip Frame 37
_parent.Paint();
Symbol 1522 MovieClip Frame 38
_parent.Paint();
Symbol 1522 MovieClip Frame 39
_parent.Paint();
Symbol 1522 MovieClip Frame 40
_parent.Paint();
Symbol 1522 MovieClip Frame 41
_parent.Paint();
Symbol 1522 MovieClip Frame 42
_parent.Paint();
Symbol 1522 MovieClip Frame 43
_parent.Paint();
Symbol 1522 MovieClip Frame 44
_parent.Paint();
Symbol 1522 MovieClip Frame 45
_parent.Paint();
Symbol 1595 MovieClip Frame 1
_parent.Paint();
Symbol 1595 MovieClip Frame 2
_parent.Paint();
Symbol 1595 MovieClip Frame 3
_parent.Paint();
Symbol 1595 MovieClip Frame 4
_parent.Paint();
Symbol 1595 MovieClip Frame 5
_parent.Paint();
Symbol 1595 MovieClip Frame 6
_parent.Paint();
Symbol 1595 MovieClip Frame 7
_parent.Paint();
Symbol 1595 MovieClip Frame 8
_parent.Paint();
Symbol 1595 MovieClip Frame 9
_parent.Paint();
Symbol 1595 MovieClip Frame 10
_parent.Paint();
Symbol 1595 MovieClip Frame 11
_parent.Paint();
Symbol 1595 MovieClip Frame 12
_parent.Paint();
Symbol 1595 MovieClip Frame 13
_parent.Paint();
Symbol 1595 MovieClip Frame 14
_parent.Paint();
Symbol 1595 MovieClip Frame 15
_parent.Paint();
Symbol 1595 MovieClip Frame 16
_parent.Paint();
Symbol 1595 MovieClip Frame 17
_parent.Paint();
Symbol 1595 MovieClip Frame 18
_parent.Paint();
Symbol 1595 MovieClip Frame 19
_parent.Paint();
Symbol 1595 MovieClip Frame 20
_parent.Paint();
Symbol 1595 MovieClip Frame 21
_parent.Paint();
Symbol 1595 MovieClip Frame 22
_parent.Paint();
Symbol 1595 MovieClip Frame 23
_parent.Paint();
Symbol 1595 MovieClip Frame 24
_parent.Paint();
Symbol 1595 MovieClip Frame 25
_parent.Paint();
Symbol 1595 MovieClip Frame 26
_parent.Paint();
Symbol 1595 MovieClip Frame 27
_parent.Paint();
Symbol 1595 MovieClip Frame 28
_parent.Paint();
Symbol 1595 MovieClip Frame 29
_parent.Paint();
Symbol 1595 MovieClip Frame 30
_parent.Paint();
Symbol 1595 MovieClip Frame 31
_parent.Paint();
Symbol 1595 MovieClip Frame 32
_parent.Paint();
Symbol 1595 MovieClip Frame 33
_parent.Paint();
Symbol 1595 MovieClip Frame 34
_parent.Paint();
Symbol 1595 MovieClip Frame 35
_parent.Paint();
Symbol 1595 MovieClip Frame 36
_parent.Paint();
Symbol 1595 MovieClip Frame 37
_parent.Paint();
Symbol 1595 MovieClip Frame 38
_parent.Paint();
Symbol 1595 MovieClip Frame 39
_parent.Paint();
Symbol 1595 MovieClip Frame 40
_parent.Paint();
Symbol 1595 MovieClip Frame 41
_parent.Paint();
Symbol 1595 MovieClip Frame 42
_parent.Paint();
Symbol 1595 MovieClip Frame 43
_parent.Paint();
Symbol 1595 MovieClip Frame 44
_parent.Paint();
Symbol 1595 MovieClip Frame 45
_parent.Paint();
Symbol 1740 MovieClip Frame 1
_parent.Paint();
Symbol 1740 MovieClip Frame 2
_parent.Paint();
Symbol 1740 MovieClip Frame 3
_parent.Paint();
Symbol 1740 MovieClip Frame 4
_parent.Paint();
Symbol 1740 MovieClip Frame 5
_parent.Paint();
Symbol 1740 MovieClip Frame 6
_parent.Paint();
Symbol 1740 MovieClip Frame 7
_parent.Paint();
Symbol 1740 MovieClip Frame 8
_parent.Paint();
Symbol 1740 MovieClip Frame 9
_parent.Paint();
Symbol 1740 MovieClip Frame 10
_parent.Paint();
Symbol 1740 MovieClip Frame 11
_parent.Paint();
Symbol 1740 MovieClip Frame 12
_parent.Paint();
Symbol 1740 MovieClip Frame 13
_parent.Paint();
Symbol 1740 MovieClip Frame 14
_parent.Paint();
Symbol 1740 MovieClip Frame 15
_parent.Paint();
Symbol 1740 MovieClip Frame 16
_parent.Paint();
Symbol 1740 MovieClip Frame 17
_parent.Paint();
Symbol 1740 MovieClip Frame 18
_parent.Paint();
Symbol 1740 MovieClip Frame 19
_parent.Paint();
Symbol 1740 MovieClip Frame 20
_parent.Paint();
Symbol 1740 MovieClip Frame 21
_parent.Paint();
Symbol 1740 MovieClip Frame 22
_parent.Paint();
Symbol 1740 MovieClip Frame 23
_parent.Paint();
Symbol 1740 MovieClip Frame 24
_parent.Paint();
Symbol 1740 MovieClip Frame 25
_parent.Paint();
Symbol 1740 MovieClip Frame 26
_parent.Paint();
Symbol 1740 MovieClip Frame 27
_parent.Paint();
Symbol 1740 MovieClip Frame 28
_parent.Paint();
Symbol 1740 MovieClip Frame 29
_parent.Paint();
Symbol 1740 MovieClip Frame 30
_parent.Paint();
Symbol 1740 MovieClip Frame 31
_parent.Paint();
Symbol 1740 MovieClip Frame 32
_parent.Paint();
Symbol 1740 MovieClip Frame 33
_parent.Paint();
Symbol 1740 MovieClip Frame 34
_parent.Paint();
Symbol 1740 MovieClip Frame 35
_parent.Paint();
Symbol 1740 MovieClip Frame 36
_parent.Paint();
Symbol 1740 MovieClip Frame 37
_parent.Paint();
Symbol 1740 MovieClip Frame 38
_parent.Paint();
Symbol 1740 MovieClip Frame 39
_parent.Paint();
Symbol 1740 MovieClip Frame 40
_parent.Paint();
Symbol 1740 MovieClip Frame 41
_parent.Paint();
Symbol 1740 MovieClip Frame 42
_parent.Paint();
Symbol 1740 MovieClip Frame 43
_parent.Paint();
Symbol 1740 MovieClip Frame 44
_parent.Paint();
Symbol 1740 MovieClip Frame 45
_parent.Paint();
Symbol 1871 MovieClip Frame 1
_parent.Paint();
Symbol 1871 MovieClip Frame 2
_parent.Paint();
Symbol 1871 MovieClip Frame 3
_parent.Paint();
Symbol 1871 MovieClip Frame 4
_parent.Paint();
Symbol 1871 MovieClip Frame 5
_parent.Paint();
Symbol 1871 MovieClip Frame 6
_parent.Paint();
Symbol 1871 MovieClip Frame 7
_parent.Paint();
Symbol 1871 MovieClip Frame 8
_parent.Paint();
Symbol 1871 MovieClip Frame 9
_parent.Paint();
Symbol 1871 MovieClip Frame 10
_parent.Paint();
Symbol 1871 MovieClip Frame 11
_parent.Paint();
Symbol 1871 MovieClip Frame 12
_parent.Paint();
Symbol 1871 MovieClip Frame 13
_parent.Paint();
Symbol 1871 MovieClip Frame 14
_parent.Paint();
Symbol 1871 MovieClip Frame 15
_parent.Paint();
Symbol 1871 MovieClip Frame 16
_parent.Paint();
Symbol 1871 MovieClip Frame 17
_parent.Paint();
Symbol 1871 MovieClip Frame 18
_parent.Paint();
Symbol 1871 MovieClip Frame 19
_parent.Paint();
Symbol 1871 MovieClip Frame 20
_parent.Paint();
Symbol 1871 MovieClip Frame 21
_parent.Paint();
Symbol 1871 MovieClip Frame 22
_parent.Paint();
Symbol 1871 MovieClip Frame 23
_parent.Paint();
Symbol 1871 MovieClip Frame 24
_parent.Paint();
Symbol 1871 MovieClip Frame 25
_parent.Paint();
Symbol 1871 MovieClip Frame 26
_parent.Paint();
Symbol 1871 MovieClip Frame 27
_parent.Paint();
Symbol 1871 MovieClip Frame 28
_parent.Paint();
Symbol 1871 MovieClip Frame 29
_parent.Paint();
Symbol 1871 MovieClip Frame 30
_parent.Paint();
Symbol 1871 MovieClip Frame 31
_parent.Paint();
Symbol 1871 MovieClip Frame 32
_parent.Paint();
Symbol 1871 MovieClip Frame 33
_parent.Paint();
Symbol 1871 MovieClip Frame 34
_parent.Paint();
Symbol 1871 MovieClip Frame 35
_parent.Paint();
Symbol 1871 MovieClip Frame 36
_parent.Paint();
Symbol 1871 MovieClip Frame 37
_parent.Paint();
Symbol 1871 MovieClip Frame 38
_parent.Paint();
Symbol 1871 MovieClip Frame 39
_parent.Paint();
Symbol 1871 MovieClip Frame 40
_parent.Paint();
Symbol 1871 MovieClip Frame 41
_parent.Paint();
Symbol 1871 MovieClip Frame 42
_parent.Paint();
Symbol 1871 MovieClip Frame 43
_parent.Paint();
Symbol 1871 MovieClip Frame 44
_parent.Paint();
Symbol 1871 MovieClip Frame 45
_parent.Paint();
Symbol 1872 MovieClip Frame 1
function Paint() {
Cloth1 = new Color(Inside.C);
Cloth1.setRGB(_parent._parent.ClothColor2);
Skin = new Color(Inside.S);
Skin.setRGB(_parent._parent.SkinColor);
}
Symbol 1886 MovieClip Frame 1
stop();
Body.Inside.gotoAndStop(1);
Arm1.Inside.gotoAndStop(5);
Arm2.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 2
Arm2.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 14
Arm1.Inside.gotoAndStop(10);
Arm2.Inside.gotoAndStop(6);
Symbol 1886 MovieClip Frame 15
Arm1.Inside.gotoAndStop(11);
Arm2.Inside.gotoAndStop(7);
Symbol 1886 MovieClip Frame 16
Arm1.Inside.gotoAndStop(12);
Arm2.Inside.gotoAndStop(8);
Symbol 1886 MovieClip Frame 17
Arm1.Inside.gotoAndStop(13);
Arm2.Inside.gotoAndStop(9);
Symbol 1886 MovieClip Frame 18
Body.Inside.gotoAndStop(10);
Arm1.Inside.gotoAndStop(14);
Arm2.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 19
Body.Inside.gotoAndStop(11);
Arm1.Inside.gotoAndStop(15);
Arm2.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 20
Body.Inside.gotoAndStop(12);
Arm1.Inside.gotoAndStop(16);
Arm2.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 21
Body.Inside.gotoAndStop(13);
Arm1.Inside.gotoAndStop(17);
Arm2.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 22
Body.Inside.gotoAndStop(1);
Arm1.Inside.gotoAndStop(5);
Arm2.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 23
Body.Inside.gotoAndStop(4);
Arm1.Inside.gotoAndStop(8);
Arm2.Inside.gotoAndStop(8);
Symbol 1886 MovieClip Frame 24
Body.Inside.gotoAndStop(3);
Arm1.Inside.gotoAndStop(7);
Arm2.Inside.gotoAndStop(7);
Symbol 1886 MovieClip Frame 25
Body.Inside.gotoAndStop(2);
Arm1.Inside.gotoAndStop(6);
Arm2.Inside.gotoAndStop(6);
Symbol 1886 MovieClip Frame 27
Arm1.Inside.gotoAndStop(22);
Symbol 1886 MovieClip Frame 28
Arm1.Inside.gotoAndStop(24);
Body.Inside.gotoAndStop(3);
Arm2.Inside.gotoAndStop(7);
Symbol 1886 MovieClip Frame 29
Arm1.Inside.gotoAndStop(23);
Body.Inside.gotoAndStop(2);
Arm2.Inside.gotoAndStop(6);
Symbol 1886 MovieClip Frame 30
Arm1.Inside.gotoAndStop(22);
Body.Inside.gotoAndStop(1);
Arm2.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 31
Body.Inside.gotoAndStop(3);
Arm2.Inside.gotoAndStop(7);
Symbol 1886 MovieClip Frame 32
Body.Inside.gotoAndStop(2);
Arm2.Inside.gotoAndStop(6);
Symbol 1886 MovieClip Frame 33
Body.Inside.gotoAndStop(1);
Arm2.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 35
Arm1.Inside.gotoAndStop(26);
Arm2.Inside.gotoAndStop(27);
Symbol 1886 MovieClip Frame 36
Body.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 37
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 38
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 39
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 40
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 41
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 42
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 43
Arm1.Inside.gotoAndStop(13);
Arm2.Inside.gotoAndStop(29);
Symbol 1886 MovieClip Frame 44
Body.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 45
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 46
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 47
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 48
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 49
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 50
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 51
Arm1.Inside.gotoAndStop(26);
Arm2.Inside.gotoAndStop(27);
Symbol 1886 MovieClip Frame 52
Body.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 53
Body.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 54
Body.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 55
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 56
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 57
Arm1.Inside.gotoAndStop(31);
Symbol 1886 MovieClip Frame 58
Body.Inside.gotoAndStop(2);
Arm1.Inside.gotoAndStop(32);
Arm2.Inside.gotoAndStop(6);
Symbol 1886 MovieClip Frame 59
Body.Inside.gotoAndStop(3);
Arm1.Inside.gotoAndStop(33);
Arm2.Inside.gotoAndStop(7);
Symbol 1886 MovieClip Frame 60
Body.Inside.gotoAndStop(4);
Arm1.Inside.gotoAndStop(34);
Arm2.Inside.gotoAndStop(8);
Symbol 1886 MovieClip Frame 61
Body.Inside.gotoAndStop(5);
Arm1.Inside.gotoAndStop(35);
Arm2.Inside.gotoAndStop(9);
Symbol 1886 MovieClip Frame 62
Body.Inside.gotoAndStop(10);
Arm1.Inside.gotoAndStop(14);
Arm2.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 63
Body.Inside.gotoAndStop(11);
Arm1.Inside.gotoAndStop(15);
Arm2.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 64
Body.Inside.gotoAndStop(12);
Arm1.Inside.gotoAndStop(16);
Arm2.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 65
Body.Inside.gotoAndStop(13);
Arm1.Inside.gotoAndStop(17);
Arm2.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 66
Body.Inside.gotoAndStop(1);
Arm1.Inside.gotoAndStop(5);
Arm2.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 67
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 68
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 69
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 70
Arm1.Inside.gotoAndStop(31);
Symbol 1886 MovieClip Frame 71
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 72
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 73
Body.Inside.gotoAndStop(1);
Symbol 1886 MovieClip Frame 74
Arm1.Inside.gotoAndStop(37);
Arm2.Inside.gotoAndStop(37);
Body.Inside.gotoAndStop(2);
Symbol 1886 MovieClip Frame 75
Arm1.Inside.gotoAndStop(39);
Arm2.Inside.gotoAndStop(39);
Body.Inside.gotoAndStop(3);
Symbol 1886 MovieClip Frame 76
Arm1.Inside.gotoAndStop(40);
Arm2.Inside.gotoAndStop(40);
Body.Inside.gotoAndStop(4);
Symbol 1886 MovieClip Frame 77
Arm1.Inside.gotoAndStop(41);
Arm2.Inside.gotoAndStop(41);
Body.Inside.gotoAndStop(5);
Symbol 1886 MovieClip Frame 78
Arm1.Inside.gotoAndStop(42);
Arm2.Inside.gotoAndStop(42);
Body.Inside.gotoAndStop(6);
Symbol 1886 MovieClip Frame 79
Arm1.Inside.gotoAndStop(42);
Arm2.Inside.gotoAndStop(42);
Body.Inside.gotoAndStop(7);
Symbol 1886 MovieClip Frame 80
Arm1.Inside.gotoAndStop(43);
Arm2.Inside.gotoAndStop(43);
Body.Inside.gotoAndStop(8);
Symbol 1886 MovieClip Frame 81
Arm1.Inside.gotoAndStop(44);
Arm2.Inside.gotoAndStop(44);
Body.Inside.gotoAndStop(9);
Symbol 1886 MovieClip Frame 82
Arm1.Inside.gotoAndStop(45);
Arm2.Inside.gotoAndStop(45);
Symbol 1923 MovieClip Frame 1
_parent.Paint();
Symbol 1923 MovieClip Frame 2
_parent.Paint();
Symbol 1923 MovieClip Frame 3
_parent.Paint();
Symbol 1923 MovieClip Frame 4
_parent.Paint();
Symbol 1923 MovieClip Frame 5
_parent.Paint();
Symbol 1923 MovieClip Frame 6
_parent.Paint();
Symbol 1923 MovieClip Frame 7
_parent.Paint();
Symbol 1923 MovieClip Frame 8
_parent.Paint();
Symbol 1923 MovieClip Frame 9
_parent.Paint();
Symbol 1943 MovieClip Frame 1
_parent.Paint();
Symbol 1943 MovieClip Frame 2
_parent.Paint();
Symbol 1943 MovieClip Frame 3
_parent.Paint();
Symbol 1943 MovieClip Frame 4
_parent.Paint();
Symbol 1943 MovieClip Frame 5
_parent.Paint();
Symbol 1943 MovieClip Frame 6
_parent.Paint();
Symbol 1943 MovieClip Frame 7
_parent.Paint();
Symbol 1943 MovieClip Frame 8
_parent.Paint();
Symbol 1943 MovieClip Frame 9
_parent.Paint();
Symbol 1963 MovieClip Frame 1
_parent.Paint();
Symbol 1963 MovieClip Frame 2
_parent.Paint();
Symbol 1963 MovieClip Frame 3
_parent.Paint();
Symbol 1963 MovieClip Frame 4
_parent.Paint();
Symbol 1963 MovieClip Frame 5
_parent.Paint();
Symbol 1963 MovieClip Frame 6
_parent.Paint();
Symbol 1963 MovieClip Frame 7
_parent.Paint();
Symbol 1963 MovieClip Frame 8
_parent.Paint();
Symbol 1963 MovieClip Frame 9
_parent.Paint();
Symbol 1982 MovieClip Frame 1
_parent.Paint();
Symbol 1982 MovieClip Frame 2
_parent.Paint();
Symbol 1982 MovieClip Frame 3
_parent.Paint();
Symbol 1982 MovieClip Frame 4
_parent.Paint();
Symbol 1982 MovieClip Frame 5
_parent.Paint();
Symbol 1982 MovieClip Frame 6
_parent.Paint();
Symbol 1982 MovieClip Frame 7
_parent.Paint();
Symbol 1982 MovieClip Frame 8
_parent.Paint();
Symbol 1982 MovieClip Frame 9
_parent.Paint();
Symbol 1983 MovieClip Frame 1
function Paint() {
Hat = new Color(Inside.H);
Hat.setRGB(_parent._parent.HatColor);
}
Symbol 2020 MovieClip Frame 1
_parent.Paint();
Symbol 2020 MovieClip Frame 2
_parent.Paint();
Symbol 2020 MovieClip Frame 3
_parent.Paint();
Symbol 2020 MovieClip Frame 4
_parent.Paint();
Symbol 2020 MovieClip Frame 5
_parent.Paint();
Symbol 2020 MovieClip Frame 6
_parent.Paint();
Symbol 2020 MovieClip Frame 7
_parent.Paint();
Symbol 2020 MovieClip Frame 8
_parent.Paint();
Symbol 2020 MovieClip Frame 9
_parent.Paint();
Symbol 2038 MovieClip Frame 1
_parent.Paint();
Symbol 2038 MovieClip Frame 2
_parent.Paint();
Symbol 2038 MovieClip Frame 3
_parent.Paint();
Symbol 2038 MovieClip Frame 4
_parent.Paint();
Symbol 2038 MovieClip Frame 5
_parent.Paint();
Symbol 2038 MovieClip Frame 6
_parent.Paint();
Symbol 2038 MovieClip Frame 7
_parent.Paint();
Symbol 2038 MovieClip Frame 8
_parent.Paint();
Symbol 2038 MovieClip Frame 9
_parent.Paint();
Symbol 2073 MovieClip Frame 1
_parent.Paint();
Symbol 2073 MovieClip Frame 2
_parent.Paint();
Symbol 2073 MovieClip Frame 3
_parent.Paint();
Symbol 2073 MovieClip Frame 4
_parent.Paint();
Symbol 2073 MovieClip Frame 5
_parent.Paint();
Symbol 2073 MovieClip Frame 6
_parent.Paint();
Symbol 2073 MovieClip Frame 7
_parent.Paint();
Symbol 2073 MovieClip Frame 8
_parent.Paint();
Symbol 2073 MovieClip Frame 9
_parent.Paint();
Symbol 2110 MovieClip Frame 1
_parent.Paint();
Symbol 2110 MovieClip Frame 2
_parent.Paint();
Symbol 2110 MovieClip Frame 3
_parent.Paint();
Symbol 2110 MovieClip Frame 4
_parent.Paint();
Symbol 2110 MovieClip Frame 5
_parent.Paint();
Symbol 2110 MovieClip Frame 6
_parent.Paint();
Symbol 2110 MovieClip Frame 7
_parent.Paint();
Symbol 2110 MovieClip Frame 8
_parent.Paint();
Symbol 2110 MovieClip Frame 9
_parent.Paint();
Symbol 2145 MovieClip Frame 1
_parent.Paint();
Symbol 2145 MovieClip Frame 2
_parent.Paint();
Symbol 2145 MovieClip Frame 3
_parent.Paint();
Symbol 2145 MovieClip Frame 4
_parent.Paint();
Symbol 2145 MovieClip Frame 5
_parent.Paint();
Symbol 2145 MovieClip Frame 6
_parent.Paint();
Symbol 2145 MovieClip Frame 7
_parent.Paint();
Symbol 2145 MovieClip Frame 8
_parent.Paint();
Symbol 2145 MovieClip Frame 9
_parent.Paint();
Symbol 2182 MovieClip Frame 1
_parent.Paint();
Symbol 2182 MovieClip Frame 2
_parent.Paint();
Symbol 2182 MovieClip Frame 3
_parent.Paint();
Symbol 2182 MovieClip Frame 4
_parent.Paint();
Symbol 2182 MovieClip Frame 5
_parent.Paint();
Symbol 2182 MovieClip Frame 6
_parent.Paint();
Symbol 2182 MovieClip Frame 7
_parent.Paint();
Symbol 2182 MovieClip Frame 8
_parent.Paint();
Symbol 2182 MovieClip Frame 9
_parent.Paint();
Symbol 2183 MovieClip Frame 1
function Paint() {
Hair = new Color(Inside.H);
Hair.setRGB(_parent.HairColor);
Skin = new Color(Inside.S);
Skin.setRGB(_parent.SkinColor);
}
Symbol 2189 MovieClip Frame 50
stop();
Symbol 2190 MovieClip Frame 1
function ActivateSoldier() {
if (Mode == 0) {
MoveLeftArm = true;
MoveRightArm = true;
CorpusFrame = 1;
}
if (Mode == 1) {
MoveRightArm = false;
MoveLeftArm = true;
CorpusFrame = 27;
}
if (Mode == 2) {
MoveRightArm = false;
MoveLeftArm = false;
CorpusFrame = 35;
}
if (Mode == 3) {
MoveRightArm = false;
MoveLeftArm = false;
CorpusFrame = 43;
}
if (Mode == 4) {
MoveRightArm = false;
MoveLeftArm = false;
CorpusFrame = 51;
}
if (Mode == 5) {
MoveRightArm = false;
MoveLeftArm = true;
CorpusFrame = 57;
}
if (Mode == 6) {
MoveRightArm = false;
MoveLeftArm = false;
CorpusFrame = 70;
}
if ((_currentframe > 1) and (_currentframe <= 18)) {
Leg1.Inside.gotoAndStop(_currentframe - 1);
if (_currentframe <= 10) {
Leg2.Inside.gotoAndStop(6 + _currentframe);
} else {
Leg2.Inside.gotoAndStop(_currentframe - 10);
}
if (_currentframe <= 6) {
if (MoveRightArm) {
Corpus.Arm1.Inside.gotoAndStop((_currentframe - 1) + 4);
}
if (MoveLeftArm) {
Corpus.Arm2.Inside.gotoAndStop(6 - (_currentframe - 1));
}
}
if ((_currentframe > 6) and (_currentframe <= 14)) {
if (MoveRightArm) {
Corpus.Arm1.Inside.gotoAndStop(9 - (_currentframe - 6));
}
if (MoveLeftArm) {
Corpus.Arm2.Inside.gotoAndStop(_currentframe - 6);
}
}
if (_currentframe > 14) {
if (MoveRightArm) {
Corpus.Arm1.Inside.gotoAndStop(_currentframe - 14);
}
if (MoveLeftArm) {
Corpus.Arm2.Inside.gotoAndStop(9 - (_currentframe - 14));
}
}
}
if (_currentframe <= 18) {
Corpus.gotoAndStop(CorpusFrame);
}
if ((_currentframe >= 19) and (_currentframe <= 39)) {
Corpus.gotoAndStop(_currentframe - 17);
}
}
function SetBody() {
if (ArmorOn) {
Corpus.Body.gotoAndStop(3);
} else {
Corpus.Body.gotoAndStop(BodyType);
}
Corpus.Arm1.gotoAndStop(ArmType);
Corpus.Arm2.gotoAndStop(ArmType);
Leg1.gotoAndStop(LegType);
Leg2.gotoAndStop(LegType);
Head.gotoAndStop(HeadType);
if (!isNaN(HatType)) {
Head.Hat._visible = true;
Head.Hat.gotoAndStop(HatType);
} else {
Head.Hat._visible = false;
}
if (_currentframe == 1) {
Leg1.Inside.gotoAndStop(1);
Leg2.Inside.gotoAndStop(1);
Head.Inside.gotoAndStop(1);
Head.Hat.Inside.gotoAndStop(1);
if (Corpus.Arm1.Inside._currentframe < 10) {
Corpus.Arm1.Inside.gotoAndStop(5);
}
if (Corpus.Arm2.Inside._currentframe < 10) {
Corpus.Arm2.Inside.gotoAndStop(5);
}
}
}
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 2
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 3
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 4
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 5
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 6
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 7
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 8
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 9
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 10
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 11
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 12
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 13
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 14
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 15
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 16
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 17
SetBody();
ActivateSoldier();
Symbol 2190 MovieClip Frame 18
gotoAndPlay (2);
ActivateSoldier();
Symbol 2190 MovieClip Frame 19
Leg1.Inside.gotoAndStop(2);
Leg2.Inside.gotoAndStop(9);
ActivateSoldier();
Symbol 2190 MovieClip Frame 20
Leg1.Inside.gotoAndStop(3);
Leg2.Inside.gotoAndStop(10);
ActivateSoldier();
Symbol 2190 MovieClip Frame 21
Leg1.Inside.gotoAndStop(4);
Leg2.Inside.gotoAndStop(11);
ActivateSoldier();
Symbol 2190 MovieClip Frame 22
Leg1.Inside.gotoAndStop(5);
Leg2.Inside.gotoAndStop(12);
ActivateSoldier();
Symbol 2190 MovieClip Frame 23
Leg1.Inside.gotoAndStop(6);
Leg2.Inside.gotoAndStop(13);
ActivateSoldier();
Symbol 2190 MovieClip Frame 24
Leg1.Inside.gotoAndStop(7);
Leg2.Inside.gotoAndStop(14);
ActivateSoldier();
Symbol 2190 MovieClip Frame 25
Leg1.Inside.gotoAndStop(8);
Leg2.Inside.gotoAndStop(15);
ActivateSoldier();
Symbol 2190 MovieClip Frame 26
Leg1.Inside.gotoAndStop(9);
Leg2.Inside.gotoAndStop(16);
ActivateSoldier();
Symbol 2190 MovieClip Frame 27
Leg1.Inside.gotoAndStop(10);
Leg2.Inside.gotoAndStop(1);
ActivateSoldier();
Symbol 2190 MovieClip Frame 28
Leg1.Inside.gotoAndStop(11);
Leg2.Inside.gotoAndStop(2);
ActivateSoldier();
Symbol 2190 MovieClip Frame 29
Leg1.Inside.gotoAndStop(12);
Leg2.Inside.gotoAndStop(3);
ActivateSoldier();
Symbol 2190 MovieClip Frame 30
Leg1.Inside.gotoAndStop(13);
Leg2.Inside.gotoAndStop(4);
ActivateSoldier();
Symbol 2190 MovieClip Frame 31
Leg1.Inside.gotoAndStop(14);
Leg2.Inside.gotoAndStop(5);
ActivateSoldier();
Symbol 2190 MovieClip Frame 32
Leg1.Inside.gotoAndStop(15);
Leg2.Inside.gotoAndStop(6);
ActivateSoldier();
Symbol 2190 MovieClip Frame 33
Leg1.Inside.gotoAndStop(16);
Leg2.Inside.gotoAndStop(7);
ActivateSoldier();
Symbol 2190 MovieClip Frame 34
Leg1.Inside.gotoAndStop(1);
Leg2.Inside.gotoAndStop(1);
ActivateSoldier();
Symbol 2190 MovieClip Frame 35
ActivateSoldier();
Symbol 2190 MovieClip Frame 36
ActivateSoldier();
Symbol 2190 MovieClip Frame 37
ActivateSoldier();
Symbol 2190 MovieClip Frame 38
ActivateSoldier();
Symbol 2190 MovieClip Frame 41
Leg1.Inside.gotoAndStop(16);
Leg2.Inside.gotoAndStop(7);
Symbol 2190 MovieClip Frame 42
Leg1.Inside.gotoAndStop(15);
Leg2.Inside.gotoAndStop(6);
Symbol 2190 MovieClip Frame 43
Leg1.Inside.gotoAndStop(14);
Leg2.Inside.gotoAndStop(5);
Symbol 2190 MovieClip Frame 44
Leg1.Inside.gotoAndStop(13);
Leg2.Inside.gotoAndStop(4);
Symbol 2190 MovieClip Frame 45
Leg1.Inside.gotoAndStop(12);
Leg2.Inside.gotoAndStop(3);
Symbol 2190 MovieClip Frame 46
Leg1.Inside.gotoAndStop(11);
Leg2.Inside.gotoAndStop(2);
Symbol 2190 MovieClip Frame 47
Leg1.Inside.gotoAndStop(10);
Leg2.Inside.gotoAndStop(1);
Symbol 2190 MovieClip Frame 48
Leg1.Inside.gotoAndStop(9);
Leg2.Inside.gotoAndStop(16);
Symbol 2190 MovieClip Frame 49
Leg1.Inside.gotoAndStop(8);
Leg2.Inside.gotoAndStop(15);
Symbol 2190 MovieClip Frame 50
Leg1.Inside.gotoAndStop(7);
Leg2.Inside.gotoAndStop(14);
Symbol 2190 MovieClip Frame 51
Leg1.Inside.gotoAndStop(6);
Leg2.Inside.gotoAndStop(13);
Symbol 2190 MovieClip Frame 52
Leg1.Inside.gotoAndStop(5);
Leg2.Inside.gotoAndStop(12);
Symbol 2190 MovieClip Frame 53
Leg1.Inside.gotoAndStop(4);
Leg2.Inside.gotoAndStop(11);
Symbol 2190 MovieClip Frame 54
Leg1.Inside.gotoAndStop(3);
Leg2.Inside.gotoAndStop(10);
Symbol 2190 MovieClip Frame 55
Leg1.Inside.gotoAndStop(2);
Leg2.Inside.gotoAndStop(9);
Symbol 2190 MovieClip Frame 56
Leg1.Inside.gotoAndStop(1);
Leg2.Inside.gotoAndStop(1);
Symbol 2190 MovieClip Frame 57
gotoAndStop (1);
Symbol 2190 MovieClip Frame 58
Corpus.gotoAndStop(23);
Symbol 2190 MovieClip Frame 59
Corpus.gotoAndStop(24);
Symbol 2190 MovieClip Frame 60
Corpus.gotoAndStop(25);
Symbol 2190 MovieClip Frame 61
gotoAndStop (1);
Symbol 2190 MovieClip Frame 62
Corpus.gotoAndStop(28);
Symbol 2190 MovieClip Frame 63
Corpus.gotoAndStop(29);
Symbol 2190 MovieClip Frame 64
Corpus.gotoAndStop(30);
Symbol 2190 MovieClip Frame 65
gotoAndStop (1);
Symbol 2190 MovieClip Frame 66
Corpus.gotoAndStop(31);
Symbol 2190 MovieClip Frame 67
Corpus.gotoAndStop(32);
Symbol 2190 MovieClip Frame 68
Corpus.gotoAndStop(33);
Symbol 2190 MovieClip Frame 69
gotoAndStop (1);
Symbol 2190 MovieClip Frame 70
Corpus.gotoAndStop(36);
Symbol 2190 MovieClip Frame 71
Corpus.gotoAndStop(37);
Symbol 2190 MovieClip Frame 72
Corpus.gotoAndStop(38);
Symbol 2190 MovieClip Frame 73
Corpus.gotoAndStop(39);
Symbol 2190 MovieClip Frame 74
gotoAndStop (1);
Symbol 2190 MovieClip Frame 75
Corpus.gotoAndStop(40);
Symbol 2190 MovieClip Frame 76
Corpus.gotoAndStop(41);
Symbol 2190 MovieClip Frame 77
Corpus.gotoAndStop(42);
Symbol 2190 MovieClip Frame 78
gotoAndStop (1);
Symbol 2190 MovieClip Frame 79
Corpus.gotoAndStop(44);
Symbol 2190 MovieClip Frame 80
Corpus.gotoAndStop(45);
Symbol 2190 MovieClip Frame 81
Corpus.gotoAndStop(46);
Symbol 2190 MovieClip Frame 82
Corpus.gotoAndStop(47);
Symbol 2190 MovieClip Frame 83
gotoAndStop (1);
Symbol 2190 MovieClip Frame 84
Corpus.gotoAndStop(48);
Symbol 2190 MovieClip Frame 85
Corpus.gotoAndStop(49);
Symbol 2190 MovieClip Frame 86
Corpus.gotoAndStop(50);
Symbol 2190 MovieClip Frame 87
gotoAndStop (1);
Symbol 2190 MovieClip Frame 88
Corpus.gotoAndStop(52);
Symbol 2190 MovieClip Frame 90
Corpus.gotoAndStop(53);
Symbol 2190 MovieClip Frame 91
Corpus.gotoAndStop(54);
Symbol 2190 MovieClip Frame 92
Corpus.gotoAndStop(55);
Symbol 2190 MovieClip Frame 93
Corpus.gotoAndStop(56);
Symbol 2190 MovieClip Frame 94
gotoAndStop (1);
Symbol 2190 MovieClip Frame 95
Corpus.gotoAndStop(54);
Symbol 2190 MovieClip Frame 96
Corpus.gotoAndStop(55);
Symbol 2190 MovieClip Frame 97
Corpus.gotoAndStop(56);
Symbol 2190 MovieClip Frame 98
gotoAndStop (1);
Symbol 2190 MovieClip Frame 99
Corpus.gotoAndStop(58);
Symbol 2190 MovieClip Frame 100
Corpus.gotoAndStop(59);
Symbol 2190 MovieClip Frame 101
Corpus.gotoAndStop(60);
Symbol 2190 MovieClip Frame 102
Corpus.gotoAndStop(61);
Symbol 2190 MovieClip Frame 103
Corpus.gotoAndStop(62);
Symbol 2190 MovieClip Frame 104
Corpus.gotoAndStop(63);
Symbol 2190 MovieClip Frame 105
Corpus.gotoAndStop(64);
Symbol 2190 MovieClip Frame 106
Corpus.gotoAndStop(65);
Symbol 2190 MovieClip Frame 107
Corpus.gotoAndStop(66);
Symbol 2190 MovieClip Frame 108
gotoAndStop (1);
Symbol 2190 MovieClip Frame 109
Corpus.gotoAndStop(67);
Symbol 2190 MovieClip Frame 110
Corpus.gotoAndStop(68);
Symbol 2190 MovieClip Frame 111
Corpus.gotoAndStop(69);
Symbol 2190 MovieClip Frame 112
gotoAndStop (1);
Symbol 2190 MovieClip Frame 113
Leg1.Inside.gotoAndStop(2);
Leg2.Inside.gotoAndStop(10);
Symbol 2190 MovieClip Frame 114
Leg1.Inside.gotoAndStop(3);
Leg2.Inside.gotoAndStop(11);
Symbol 2190 MovieClip Frame 115
Leg1.Inside.gotoAndStop(4);
Leg2.Inside.gotoAndStop(12);
Symbol 2190 MovieClip Frame 116
Leg1.Inside.gotoAndStop(5);
Leg2.Inside.gotoAndStop(13);
Symbol 2190 MovieClip Frame 117
Corpus.gotoAndStop(58);
Leg1.Inside.gotoAndStop(6);
Leg2.Inside.gotoAndStop(14);
Symbol 2190 MovieClip Frame 118
Corpus.gotoAndStop(59);
Leg1.Inside.gotoAndStop(7);
Leg2.Inside.gotoAndStop(15);
Symbol 2190 MovieClip Frame 119
Corpus.gotoAndStop(60);
Leg1.Inside.gotoAndStop(8);
Leg2.Inside.gotoAndStop(16);
Symbol 2190 MovieClip Frame 120
Corpus.gotoAndStop(61);
Leg1.Inside.gotoAndStop(9);
Leg2.Inside.gotoAndStop(1);
Symbol 2190 MovieClip Frame 121
Corpus.gotoAndStop(62);
Leg1.Inside.gotoAndStop(10);
Leg2.Inside.gotoAndStop(2);
Symbol 2190 MovieClip Frame 122
Corpus.gotoAndStop(63);
Leg1.Inside.gotoAndStop(9);
Leg2.Inside.gotoAndStop(1);
Symbol 2190 MovieClip Frame 123
Corpus.gotoAndStop(64);
Leg1.Inside.gotoAndStop(8);
Leg2.Inside.gotoAndStop(16);
Symbol 2190 MovieClip Frame 124
Corpus.gotoAndStop(65);
Leg1.Inside.gotoAndStop(7);
Leg2.Inside.gotoAndStop(15);
Symbol 2190 MovieClip Frame 125
Corpus.gotoAndStop(70);
Leg1.Inside.gotoAndStop(6);
Leg2.Inside.gotoAndStop(14);
Symbol 2190 MovieClip Frame 126
Leg1.Inside.gotoAndStop(5);
Leg2.Inside.gotoAndStop(13);
Symbol 2190 MovieClip Frame 127
Leg1.Inside.gotoAndStop(4);
Leg2.Inside.gotoAndStop(12);
Symbol 2190 MovieClip Frame 128
Leg1.Inside.gotoAndStop(3);
Leg2.Inside.gotoAndStop(11);
Symbol 2190 MovieClip Frame 129
Leg1.Inside.gotoAndStop(2);
Leg2.Inside.gotoAndStop(10);
Symbol 2190 MovieClip Frame 130
Leg1.Inside.gotoAndStop(1);
Leg2.Inside.gotoAndStop(9);
Symbol 2190 MovieClip Frame 131
gotoAndStop (1);
Symbol 2190 MovieClip Frame 132
Corpus.gotoAndStop(71);
Symbol 2190 MovieClip Frame 133
Corpus.gotoAndStop(72);
Symbol 2190 MovieClip Frame 134
Corpus.gotoAndStop(73);
Symbol 2190 MovieClip Frame 135
gotoAndStop (1);
Symbol 2190 MovieClip Frame 136
Leg1.Inside.gotoAndStop(17);
Leg2.Inside.gotoAndStop(17);
Corpus.gotoAndStop(74);
Head.Inside.gotoAndStop(2);
Head.Hat.Inside.gotoAndStop(2);
if ((Mode == 0) or (Mode == 5)) {
Wpn._visible = false;
} else {
Wpn._visible = true;
Wpn.gotoAndStop(Mode);
}
Symbol 2190 MovieClip Frame 137
Leg1.Inside.gotoAndStop(18);
Leg2.Inside.gotoAndStop(18);
Corpus.gotoAndStop(75);
Head.Inside.gotoAndStop(3);
Head.Hat.Inside.gotoAndStop(3);
Symbol 2190 MovieClip Frame 138
Leg1.Inside.gotoAndStop(19);
Leg2.Inside.gotoAndStop(19);
Corpus.gotoAndStop(76);
Head.Inside.gotoAndStop(4);
Head.Hat.Inside.gotoAndStop(4);
Symbol 2190 MovieClip Frame 139
Leg1.Inside.gotoAndStop(20);
Leg2.Inside.gotoAndStop(20);
Corpus.gotoAndStop(77);
Head.Inside.gotoAndStop(5);
Head.Hat.Inside.gotoAndStop(5);
Symbol 2190 MovieClip Frame 140
Leg1.Inside.gotoAndStop(21);
Leg2.Inside.gotoAndStop(21);
Corpus.gotoAndStop(78);
Head.Inside.gotoAndStop(6);
Head.Hat.Inside.gotoAndStop(6);
Symbol 2190 MovieClip Frame 141
Leg1.Inside.gotoAndStop(22);
Leg2.Inside.gotoAndStop(22);
Corpus.gotoAndStop(79);
Head.Inside.gotoAndStop(6);
Head.Hat.Inside.gotoAndStop(6);
Symbol 2190 MovieClip Frame 142
Leg1.Inside.gotoAndStop(23);
Leg2.Inside.gotoAndStop(23);
Corpus.gotoAndStop(80);
Head.Inside.gotoAndStop(7);
Head.Hat.Inside.gotoAndStop(7);
Symbol 2190 MovieClip Frame 143
Leg1.Inside.gotoAndStop(24);
Leg2.Inside.gotoAndStop(24);
Corpus.gotoAndStop(81);
Head.Inside.gotoAndStop(8);
Head.Hat.Inside.gotoAndStop(8);
Symbol 2190 MovieClip Frame 144
Corpus.gotoAndStop(82);
Head.Inside.gotoAndStop(9);
Head.Hat.Inside.gotoAndStop(9);
stop();
Symbol 2517 MovieClip Frame 1
Index = 2;
Symbol 2552 Button
on (press) {
_parent.OnOK();
}
Symbol 2553 Button
on (press) {
_parent.OnCancel();
}
Symbol 2555 Button
on (press) {
_parent.OnNo();
}
Symbol 2656 Button
on (press) {
MoveList = -1;
}
on (rollOut, release, releaseOutside) {
MoveList = 0;
}
Symbol 2657 Button
on (press) {
MoveList = 1;
}
on (rollOut, release, releaseOutside) {
MoveList = 0;
}
Symbol 2792 MovieClip Frame 1
MC.gotoAndStop(_root.CharacterPortrait);
Symbol 2798 Button
on (press) {
_parent.SelectItem(Index);
}
Symbol 3006 MovieClip Frame 1
Name = _root.People[0].Name;
Instance of Symbol 183 MovieClip in Symbol 3006 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.CharacterPortrait);
}
Symbol 3051 MovieClip Frame 1
function SetList() {
InTheList = Offset;
i = 1;
while (i <= 5) {
eval ("Item" + i).gotoAndStop(Class);
if (this._rotation == 90) {
eval ("Item" + i)._rotation = -90;
eval ("Item" + i)._xscale = -100;
}
if (InTheList == SelectedItem) {
eval ("Item" + i).BG.gotoAndStop(2);
} else {
eval ("Item" + i).BG.gotoAndStop(1);
}
if (InTheList < TheList.length) {
eval ("Item" + i)._visible = true;
eval ("Item" + i).TheButt.enabled = true;
eval ("Item" + i).Index = InTheList;
if (Class == 1) {
eval ("Item" + i).Inside.gotoAndStop(TheList[InTheList].Portrait);
}
if (Class == 4) {
eval ("Item" + i).Inside.gotoAndStop(TheList[InTheList].Type);
if (TheList[InTheList].Attached instanceof Object) {
eval ("Item" + i).CartAnimal._visible = true;
if (_root.Transports[TheList[InTheList].Type].Class == 1) {
eval ("Item" + i).CartAnimal.gotoAndStop(1);
} else {
eval ("Item" + i).CartAnimal.gotoAndStop(2);
}
} else {
eval ("Item" + i).CartAnimal._visible = false;
}
}
if ((Class == 1) or (Class == 4)) {
eval ("Item" + i).HB.gotoAndStop(Math.ceil((TheList[InTheList].HP / TheList[InTheList].MaxHP) * 100));
} else {
eval ("Item" + i).Inside.gotoAndStop(TheList[InTheList].Type);
if (Class == 3) {
if (TheList[InTheList].Amount == 1) {
eval ("Item" + i).XText = "";
} else {
eval ("Item" + i).XText = "x" + TheList[InTheList].Amount;
}
if (TheList[InTheList].InUse > 0) {
eval ("Item" + i).InUse._visible = true;
} else {
eval ("Item" + i).InUse._visible = false;
}
} else {
eval ("Item" + i).XText = TheList[InTheList].Amount;
}
}
} else {
eval ("Item" + i)._visible = false;
}
LastItem = InTheList;
InTheList++;
i++;
}
if (Offset > 0) {
ButtCover1._visible = false;
Butt1.enabled = true;
} else {
ButtCover1._visible = true;
Butt1.enabled = false;
MoveList = 0;
Moving = false;
}
if (LastItem < (TheList.length - 1)) {
ButtCover2._visible = false;
Butt2.enabled = true;
} else {
ButtCover2._visible = true;
Butt2.enabled = false;
if (MoveList > 0) {
MoveList = 0;
Moving = false;
}
}
}
function SelectItem(Item) {
if ((Item >= TheList.length) and (!isNaN(Item))) {
Item = TheList.length - 1;
}
Selected = TheList[Item];
SelectedItem = Item;
SetList();
if (!isNaN(Item)) {
OnSelect();
}
}
MoveList = 0;
Moving = false;
this.onEnterFrame = function () {
if (MoveList != 0) {
if (!Moving) {
Moving = true;
Counter = 0;
}
if ((Counter % 3) == 0) {
Offset = Offset + MoveList;
SetList();
}
Counter++;
} else {
Moving = false;
}
};
if (!isNaN(SelectedItem)) {
if (SelectedItem >= TheList.length) {
SelectedItem = TheList.length - 1;
}
SelectItem(SelectedItem);
} else {
SetList();
}
Symbol 3082 Button
on (press) {
_parent._parent.HireSelected();
_parent._visible = false;
_parent._parent.Lst.SelectItem(Number.NaN);
}
Symbol 3091 Button
on (press) {
gotoAndStop (1);
_parent.BMenu.SelectButton(1);
}
Symbol 3094 Button
on (press) {
gotoAndStop (6);
}
Symbol 3097 Button
on (press) {
SetList(_parent.CurrentList, CurrentOffset - 5);
}
Symbol 3098 Button
on (press) {
SetList(_parent.CurrentList, CurrentOffset + 5);
}
Symbol 3104 Button
on (press) {
_parent._parent.DisplayCount(true, Product);
}
Symbol 3109 MovieClip Frame 1
function SetList(TheList, Offset) {
InTheList = Offset;
CurrOffset = Offset;
ListLength = TheList.length;
DisplayedItems = 0;
i = 1;
while (i <= 5) {
while ((TheList[InTheList].Amount == 0) and (InTheList < TheList.length)) {
InTheList++;
ListLength--;
}
if (InTheList < TheList.length) {
DisplayedItems++;
eval ("Item" + i)._visible = true;
eval ("Item" + i).Product = TheList[InTheList];
eval ("Item" + i).TBText.gotoAndStop(_parent.Mode);
eval ("Item" + i).NameText = _parent._parent.Goods[TheList[InTheList].Type].Name;
if ((_parent._parent.Goods[TheList[InTheList].Type].Unit == "unit") and (TheList[InTheList].Amount > 1)) {
Ending = "s";
} else {
Ending = "";
}
StartPrice = _parent._parent.CalculatePrice(_parent.Mode, _parent._parent.Group.InTown, TheList[InTheList].Type, 1);
StartPrice = Math.round(StartPrice * 100) / 100;
if (_parent.Mode == 1) {
StartText = "Min. ";
} else {
StartText = "Max. ";
}
eval ("Item" + i).AmountText = ((((((((("Available: " + TheList[InTheList].Amount) + " ") + _parent._parent.Goods[TheList[InTheList].Type].Unit) + Ending) + "; ") + StartText) + " Price: ") + StartPrice) + " $/") + _parent._parent.Goods[TheList[InTheList].Type].Unit;
eval ("Item" + i).GI.gotoAndStop(TheList[InTheList].Type);
} else {
eval ("Item" + i)._visible = false;
}
InTheList++;
i++;
}
if ((ListLength - Offset) > 5) {
NextButt.enabled = true;
ButtCover2._visible = false;
} else {
NextButt.enabled = false;
ButtCover2._visible = true;
}
if (Offset > 0) {
PrevButt.enabled = true;
ButtCover1._visible = false;
} else {
PrevButt.enabled = false;
ButtCover1._visible = true;
}
CurrentOffset = Offset;
if ((Offset > 0) and (DisplayedItems == 0)) {
SetList(_parent.CurrentList, 0);
}
}
SetList(_parent.CurrentList, 0);
Symbol 3112 Button
on (press) {
_parent.DisplayCount(false);
}
Symbol 3113 Button
on (press) {
PressButt(1);
}
Symbol 3114 Button
on (press) {
PressButt(2);
}
Symbol 3115 Button
on (press) {
PressButt(3);
}
Symbol 3116 Button
on (press) {
PressButt(4);
}
Symbol 3117 Button
on (press) {
PressButt(5);
}
Symbol 3118 Button
on (press) {
PressButt(6);
}
Symbol 3119 Button
on (press) {
PressButt(7);
}
Symbol 3120 Button
on (press) {
PressButt(8);
}
Symbol 3121 Button
on (press) {
PressButt(9);
}
Symbol 3122 Button
on (press) {
PressButt(0);
}
Symbol 3123 Button
on (press) {
AddToUnits(-1);
}
Symbol 3124 Button
on (press) {
AddToUnits(-10);
}
Symbol 3125 Button
on (press) {
AddToUnits(-100);
}
Symbol 3126 Button
on (press) {
AddToUnits(-1000);
}
Symbol 3127 Button
on (press) {
AddToUnits(1);
}
Symbol 3128 Button
on (press) {
AddToUnits(10);
}
Symbol 3129 Button
on (press) {
AddToUnits(100);
}
Symbol 3130 Button
on (press) {
AddToUnits(1000);
}
Symbol 3131 Button
on (press) {
PressButt(12);
}
Symbol 3132 Button
on (press) {
PressButt(13);
}
Symbol 3133 Button
on (press) {
PressButt(10);
}
Symbol 3134 Button
on (press) {
DoAction();
}
Symbol 3163 MovieClip Frame 1
function PressButt(Num) {
UnitsText = String(UnitsText);
if (Num < 10) {
if (UnitsText.length < 12) {
if ((Number(UnitsText) == 0) or (!UsedNums)) {
UnitsText = Num;
} else {
UnitsText = UnitsText + String(Num);
}
}
}
if (Num == 10) {
UnitsText = UnitsText.slice(0, UnitsText.length - 1);
if (UnitsText.length == 0) {
UnitsText = 0;
}
}
if (Num == 12) {
UnitsText = 0;
}
if (Num == 13) {
UnitsText = Max;
}
if (Num != 13) {
UsedNums = true;
} else {
UsedNums = false;
}
UpdatePriceText();
}
function AddToUnits(Num) {
UsedNums = false;
UnitsText = Number(UnitsText) + Num;
if (UnitsText < 1) {
UnitsText = 1;
}
UpdatePriceText();
}
function UpdatePriceText() {
UnitsText = Number(UnitsText);
if (UnitsText > 0) {
TotalPrice = _parent._parent.CalculatePrice(_parent.Mode, _parent._parent.Group.InTown, Product.Type, UnitsText);
PricePerUnit = TotalPrice / UnitsText;
PPUText = Math.round(PricePerUnit * 100) / 100;
TPText = Math.round(TotalPrice * 100) / 100;
PriceText = ((((("Price: $" + TPText) + " (") + PPUText) + " $/") + _parent._parent.Goods[Product.Type].Unit) + ")";
if (UnitsText > Max) {
UT.setTextFormat(_parent._parent.RedFont);
ButtCover._visible = true;
ActionButton.enabled = false;
} else {
UT.setTextFormat(_parent._parent.WhiteFont);
ButtCover._visible = false;
ActionButton.enabled = true;
}
} else {
PriceText = "Enter an amount";
ButtCover._visible = true;
ActionButton.enabled = false;
}
TotalWeight = UnitsText * _parent._parent.Goods[Product.Type].WeightPerUnit;
WeightText = ("Weight: " + TotalWeight) + " Kg";
}
function DoAction() {
if (_parent.Mode == 1) {
Product.Amount = Product.Amount - UnitsText;
TheTown.Money = TheTown.Money + TotalPrice;
_parent._parent.AddCargo(_parent._parent.Group, Product.Type, UnitsText);
_parent._parent.Group.Money = _parent._parent.Group.Money - TotalPrice;
}
if (_parent.Mode == 2) {
PropertyExists = false;
sp = 0;
while (sp < TheTown.Property.length) {
if (TheTown.Property[sp].Type == Product.Type) {
TheTown.Property[sp].Amount = TheTown.Property[sp].Amount + UnitsText;
PropertyExists = true;
break;
}
sp++;
}
if (!PropertyExists) {
TheTown.Property.push({Type:Product.Type, Amount:UnitsText});
}
TheTown.Money = TheTown.Money - TotalPrice;
Product.Amount = Product.Amount - UnitsText;
if (Product.Amount <= 0) {
for (sp in _parent._parent.Group.Cargo) {
if (_parent._parent.Group.Cargo[sp] == Product) {
_parent._parent.Group.Cargo.splice(sp, 1);
break;
}
}
}
_parent._parent.Group.Money = _parent._parent.Group.Money + TotalPrice;
}
_parent._parent.UpdateTownEconomy(TheTown);
_parent._parent.UpdateGroupCargo(_parent._parent.Group);
_parent._parent.UpdateTradeText();
_parent.DisplayCount(false);
if (_parent.Mode == 1) {
_parent.CurrentList = _parent.GeneratePropertyList();
}
_parent.MarketList.SetList(_parent.CurrentList, _parent.MarketList.CurrOffset);
}
TheTown = _parent._parent.Towns[_parent._parent.Group.InTown];
Symbol 3165 Button
on (press) {
gotoAndStop (5);
}
Symbol 3190 Button
on (press) {
if (_parent._parent.SubType == 1) {
if (_parent._parent.MaxBuy == 1) {
_parent._parent.BuyItem(_parent._parent.List2.Selected, 1);
} else {
_parent._parent._parent.AllButtons(_parent._parent, false);
_parent._parent.NumWindow._visible = true;
_parent._parent.NumWindow.Max = _parent._parent.MaxBuy;
_parent._parent.NumWindow.UnitsText = 0;
_parent._parent.NumWindow.PricePerUnit = _parent._parent.ItemPrice;
_parent._parent.NumWindow.WeightPerUnit = _parent._parent._parent.Items[_parent._parent.List2.Selected.Type].Weight;
_parent._parent.NumWindow.ActionButton.gotoAndStop(4);
_parent._parent.NumWindow.TitleText = "Buy " + _parent._parent._parent.Items[_parent._parent.List2.Selected.Type].Name;
_parent._parent.NumWindow.UpdatePriceText();
}
}
if (_parent._parent.SubType == 2) {
_parent._parent.BuySelectedTransport();
}
}
Symbol 3194 Button
on (press) {
if (_parent._parent.SubType == 1) {
if (_parent._parent.MaxSell == 1) {
_parent._parent.SellItem(_parent._parent.List1.Selected, 1);
} else {
_parent._parent._parent.AllButtons(_parent._parent, false);
_parent._parent.NumWindow._visible = true;
_parent._parent.NumWindow.Max = _parent._parent.MaxSell;
_parent._parent.NumWindow.UnitsText = 0;
_parent._parent.NumWindow.PricePerUnit = _parent._parent.ItemPrice;
_parent._parent.NumWindow.WeightPerUnit = _parent._parent._parent.Items[_parent._parent.List1.Selected.Type].Weight;
_parent._parent.NumWindow.ActionButton.gotoAndStop(5);
_parent._parent.NumWindow.TitleText = "Sell " + _parent._parent._parent.Items[_parent._parent.List1.Selected.Type].Name;
_parent._parent.NumWindow.UpdatePriceText();
}
}
if (_parent._parent.SubType == 2) {
_parent._parent.SellSelectedTransport();
}
}
Symbol 3208 Button
on (press) {
gotoAndStop (1);
_parent.BMenu.SelectButton(1);
}
Symbol 3209 Button
on (press) {
OnCancel();
}
Symbol 3210 Button
on (press) {
_parent._parent._parent.AllButtons(_parent._parent, true);
_parent._parent.GiveSelectedItem(Number(_parent.UnitsText));
_parent._visible = false;
}
Symbol 3212 Button
on (press) {
_parent._parent._parent.AllButtons(_parent._parent, true);
_parent._parent.RemoveItem(_parent._parent.List1.Selected.Holding[_parent._parent.SelectedSlot], Number(_parent.UnitsText));
_parent._visible = false;
}
Symbol 3214 Button
on (press) {
_parent._visible = false;
if (_parent._parent.CurList == 1) {
_parent._parent.ThrowGoods(_parent._parent.L1.Selected, Number(_parent.UnitsText));
}
if (_parent._parent.CurList == 2) {
_parent._parent.ThrowItems(_parent._parent.L2.Selected, Number(_parent.UnitsText));
}
}
Symbol 3216 Button
on (press) {
_parent._visible = false;
_parent._parent.BuyItem(_parent._parent.List2.Selected, Number(_parent.UnitsText));
_parent._parent._parent.AllButtons(_parent._parent, true);
}
Symbol 3217 Button
on (press) {
_parent._visible = false;
_parent._parent.SellItem(_parent._parent.List1.Selected, Number(_parent.UnitsText));
}
Symbol 3218 Button
on (press) {
_parent._visible = false;
_parent._parent._parent.Group.Water = _parent._parent._parent.Group.Water - Number(_parent.UnitsText);
_parent._parent._parent.UpdateGroupCargo(_parent._parent._parent.Group);
_parent._parent._parent.UpdateTradeText();
_parent._parent.WaterText = ("Water: " + _parent._parent._parent.Group.Water) + " L";
_parent._parent.CargoText = ((("Cargo: " + _parent._parent._parent.Group.CargoWeight) + " / ") + _parent._parent._parent.Group.MaxCargo) + " Kg";
}
Symbol 3220 Button
on (press) {
_parent._parent._parent.Group.Water = _parent._parent._parent.Group.Water + Number(_parent.UnitsText);
_parent._parent._parent.UpdateGroupCargo(_parent._parent._parent.Group);
_parent._parent._parent.UpdateTradeText();
_parent._parent._parent.Group.Money = _parent._parent._parent.Group.Money - (_parent._parent.WaterPrice * Number(_parent.UnitsText));
_parent._parent.MaxWater();
}
Symbol 3227 MovieClip Frame 1
function PressButt(Num) {
UnitsText = String(UnitsText);
if (Num < 10) {
if (UnitsText.length < 12) {
if ((Number(UnitsText) == 0) or (!UsedNums)) {
UnitsText = Num;
} else {
UnitsText = UnitsText + String(Num);
}
}
}
if (Num == 10) {
UnitsText = UnitsText.slice(0, UnitsText.length - 1);
if (UnitsText.length == 0) {
UnitsText = 0;
}
}
if (Num == 12) {
UnitsText = 0;
}
if (Num == 13) {
UnitsText = Max;
}
if (Num != 13) {
UsedNums = true;
} else {
UsedNums = false;
}
UpdatePriceText();
}
function AddToUnits(Num) {
UsedNums = false;
UnitsText = Number(UnitsText) + Num;
if (UnitsText < 1) {
UnitsText = 1;
}
UpdatePriceText();
}
function UpdatePriceText() {
UnitsText = Number(UnitsText);
if (UnitsText > 0) {
if (isNaN(PricePerUnit)) {
PriceText = "";
} else {
PriceText = "Price: $" + (UnitsText * PricePerUnit);
}
if (UnitsText > Max) {
UT.setTextFormat(_parent._parent.RedFont);
ButtCover._visible = true;
ActionButton.Inside.enabled = false;
} else {
UT.setTextFormat(_parent._parent.WhiteFont);
ButtCover._visible = false;
ActionButton.Inside.enabled = true;
}
} else {
PriceText = "Enter an amount";
ButtCover._visible = true;
ActionButton.enabled = false;
}
TotalWeight = UnitsText * WeightPerUnit;
WeightText = ("Weight: " + TotalWeight) + " Kg";
}
TheTown = _parent._parent.Towns[_parent._parent.Group.InTown];
Symbol 3241 Button
on (press) {
OldMouse = _parent._xmouse;
Drag = true;
}
on (release, releaseOutside) {
Drag = false;
}
Symbol 3242 MovieClip Frame 1
_x = ((x = _parent.MaxHeal));
_parent.SetHeal();
Drag = false;
onEnterFrame = function () {
_x = x;
if (Drag) {
MoveX = _parent._xmouse - OldMouse;
x = x + MoveX;
if (x > _parent.MaxHeal) {
x = _parent.MaxHeal;
}
if (x < _parent.HEnd) {
x = _parent.HEnd;
}
_parent.SetHeal();
OldMouse = _parent._xmouse;
}
_parent.HealHP = (x - _parent.HEnd) * _parent.HPperPoint;
if (_parent.HealHP < 0) {
_parent.HealHP = 0;
}
_parent.Price = _parent._parent._parent._parent.NumberFormat(_parent.HealHP * _parent.HealPrice, 2);
_parent.HealText = (((((_parent._parent._parent.Action + " ") + _parent._parent._parent._parent.NumberFormat(_parent.HealHP, 2)) + " ") + _parent._parent._parent.HPText) + "; Price: $") + _parent.Price;
};
Symbol 3244 Button
on (press) {
_parent._parent.Lst.Selected.HP = _parent._parent.Lst.Selected.HP + HealHP;
if (_parent._parent.SubType == 1) {
_parent._parent._parent.UpdateMemberParams(_parent._parent.Lst.Selected);
} else {
_parent._parent._parent.UpdateTransportParams(_parent._parent.Lst.Selected);
}
_parent._parent._parent.UpdateGroupParams(_parent._parent._parent.Group);
_parent._parent._parent.Group.Money = _parent._parent._parent.Group.Money - Price;
_parent._parent._parent.Towns[_parent._parent._parent.Group.InTown].Money = _parent._parent._parent.Towns[_parent._parent._parent.Group.InTown].Money + _parent._parent._parent.NumberFormat(Price, 2);
_parent._parent.Lst.SelectItem(_parent._parent.Lst.SelectedItem);
_parent._parent._parent.UpdateTradeText();
}
Symbol 3248 MovieClip Frame 1
function Init() {
this.createEmptyMovieClip("HealthMask", this.getNextHighestDepth());
this.createEmptyMovieClip("HealMask", this.getNextHighestDepth());
TheBar.setMask(HealthMask);
HealB.setMask(HealMask);
}
function SetHealth(HL) {
HEnd = -116.5 + (233 * HL);
HealthMask.clear();
HealthMask.beginFill(16711680);
HealthMask.moveTo(-116.5, -7.5);
HealthMask.lineTo(-116.5, 7.5);
HealthMask.lineTo(HEnd, 7.5);
HealthMask.lineTo(HEnd, -7.5);
HelathMask.endFill();
Slider._x = (Slider.x = MaxHeal);
}
function SetHeal() {
HealMask.clear();
HealMask.beginFill(65535);
HealMask.moveTo(HEnd, -7.5);
HealMask.lineTo(HEnd, 7.5);
HealMask.lineTo(Slider._x, 7.5);
HealMask.lineTo(Slider._x, -7.5);
HealMask.endFill();
}
Init();
SetHealth(DrawHealth);
DetHeal();
Symbol 3298 MovieClip Frame 1
stop();
if (InTheBase) {
InTown = 17;
} else {
InTown = _parent.Group.InTown;
}
TMap.gotoAndStop(InTown);
_parent.Intersecting = 0;
for (hfc in TMap) {
ApplyEvents = true;
if (hfc.charAt(0) == "h") {
hfc = (TMap[hfc]._name = hfc.substring(1, hfc.length));
}
if (_parent.Towns[InTown].Houses[hfc].Type == 5) {
if ((_parent.GameMode == 2) or (!_parent.Towns[InTown].Houses[hfc].Revealed)) {
TMap[hfc].gotoAndStop(2);
ApplyEvents = false;
} else {
TMap[hfc].gotoAndStop(1);
}
}
if (ApplyEvents) {
TMap[hfc].onRollOver = function () {
_parent.Intersecting = this._name;
};
TMap[hfc].onRollOut = (TMap[hfc].onReleaseOutside = function () {
_parent.Intersecting = 0;
});
}
}
MB.OnCancel = function () {
this._visible = false;
_parent.AllButtons(_parent.TMenu, true);
_parent.BMenu.gotoAndStop(3);
};
Symbol 3298 MovieClip Frame 2
gotoAndStop (1);
Symbol 3298 MovieClip Frame 3
TheTown = _parent.Towns[_parent.Group.InTown];
TName = TheTown.Name;
TPopulation = TheTown.Population;
TWealth = Math.round(TheTown.Wealth) + " $/Citizen";
ind = 0;
while (ind < TheTown.Prod.length) {
WritePlace = ind + 1;
this["Pprod" + WritePlace] = _parent.Goods[TheTown.Prod[ind].Type].Name + ":";
this["Pam" + WritePlace] = ((TheTown.Prod[ind].Amount + " ") + _parent.Goods[TheTown.Prod[ind].Type].Unit) + "/mo";
ind++;
}
clr = TheTown.Prod.length + 1;
while (clr <= 10) {
this["Pprod" + clr] = "";
this["Pam" + clr] = "";
clr++;
}
ind = 0;
while (ind < TheTown.Use.length) {
WritePlace = ind + 1;
this["Uprod" + WritePlace] = _parent.Goods[TheTown.Use[ind].Type].Name + ":";
this["Uam" + WritePlace] = ((Math.round(TheTown.Use[ind].Amount) + " ") + _parent.Goods[TheTown.Use[ind].Type].Unit) + "/mo";
ind++;
}
clr = TheTown.Use.length + 1;
while (clr <= 10) {
this["Uprod" + clr] = "";
this["Uam" + clr] = "";
clr++;
}
ind = 0;
while (ind < TheTown.Export.length) {
WritePlace = ind + 1;
this["Eprod" + WritePlace] = _parent.Goods[TheTown.Export[ind].Type].Name + ":";
this["Eam" + WritePlace] = ((Math.round(TheTown.Export[ind].Amount) + " ") + _parent.Goods[TheTown.Export[ind].Type].Unit) + "/mo";
ind++;
}
clr = TheTown.Export.length + 1;
while (clr <= 10) {
this["Eprod" + clr] = "";
this["Eam" + clr] = "";
clr++;
}
ind = 0;
while (ind < TheTown.Import.length) {
WritePlace = ind + 1;
this["Iprod" + WritePlace] = _parent.Goods[TheTown.Import[ind].Type].Name + ":";
this["Iam" + WritePlace] = ((Math.round(TheTown.Import[ind].Amount) + " ") + _parent.Goods[TheTown.Import[ind].Type].Unit) + "/mo";
ind++;
}
clr = TheTown.Import.length + 1;
while (clr <= 10) {
this["Iprod" + clr] = "";
this["Iam" + clr] = "";
clr++;
}
Symbol 3298 MovieClip Frame 4
function HireSelected() {
Lst.Selected.Status = 1;
Lst.Selected.PayDay = _parent.Day;
Lst.Selected.Autopay = false;
_parent.Group.Money = _parent.Group.Money - Lst.Selected.Salary;
_parent.Group.Members.push(_parent.People[Lst.Selected.Index]);
for (sp in TheTown.Citizens) {
if (TheTown.Citizens[sp].Index == Lst.Selected.Index) {
TheTown.Citizens.splice(sp, 1);
break;
}
}
_parent.UpdateGroupParams(_parent.Group);
_parent.UpdateGroupCargo(_parent.Group);
_parent.UpdateTradeText();
}
TheTown = _parent.Towns[_parent.Group.InTown];
Lst.TheList = TheTown.Citizens;
Lst.Offset = 0;
Lst.Class = 1;
Lst.SelectItem(Number.NaN);
Display._visible = false;
Lst.OnSelect = function () {
Display._visible = true;
Display.Icon.gotoAndStop(Lst.Selected.Portrait);
Display.NameText = Lst.Selected.Name;
Display.Val5 = (Math.ceil(Lst.Selected.HP) + " / ") + Lst.Selected.MaxHP;
Display.Val1 = Lst.Selected.Healthiness;
Display.Val2 = Lst.Selected.Agility;
Display.Val3 = Lst.Selected.Accuracy;
Display.Val4 = Lst.Selected.Intelligence;
if (Lst.Selected.AffectHealthiness != 0) {
Display.Val1 = Display.Val1 + ((" (" + Lst.Selected.AffectHealthiness) + ")");
}
if (Lst.Selected.AffectAgility != 0) {
Display.Val2 = Display.Val2 + ((" (" + Lst.Selected.AffectAgility) + ")");
}
if (Lst.Selected.AffectAccuracy != 0) {
Display.Val3 = Display.Val3 + ((" (" + Lst.Selected.AffectAccuracy) + ")");
}
if (Lst.Selected.AffectIntelligence != 0) {
Display.Val4 = Display.Val4 + ((" (" + Lst.Selected.AffectIntelligence) + ")");
}
Display.Val6 = Lst.Selected.MaxAP;
Display.Val7 = Lst.Selected.Strength;
Display.Val8 = Lst.Selected.WalkSpeed + " Kmh";
Display.Val9 = Lst.Selected.Capacity + " Kg";
Display.Val10 = Lst.Selected.Sniper;
Display.Val11 = Lst.Selected.Doctor;
Display.Val12 = Lst.Selected.Veterinary;
Display.Val13 = Lst.Selected.Mechanic;
Display.SalaryText = ("$" + Lst.Selected.Salary) + " per Month";
if (Lst.Selected.Salary <= _parent.Group.Money) {
Display.HButton.gotoAndStop(1);
} else {
Display.HButton.gotoAndStop(2);
}
};
Symbol 3298 MovieClip Frame 5
function GeneratePropertyList() {
Ret = new Array();
prp = 0;
while (prp < _parent.Towns[_parent.Group.InTown].Property.length) {
if (_parent.Towns[_parent.Group.InTown].Property[prp].Amount > 0) {
Ret.push(_parent.Towns[_parent.Group.InTown].Property[prp]);
}
prp++;
}
Ret.sortOn("Amount", 18);
return(Ret);
}
CurrentList = GeneratePropertyList();
Mode = 1;
MarketList.SetList(CurrentList, 0);
DisplayCount(false);
Symbol 3298 MovieClip Frame 6
function GenerateSellList() {
Ret = new Array();
for (itm in _parent.Group.Cargo) {
if ((_parent.Group.Cargo[itm].Amount > 0) and (!_parent.Goods[_parent.Group.Cargo[itm].Type].Special)) {
Ret.push(_parent.Group.Cargo[itm]);
}
}
Ret.sortOn("Amount", 18);
return(Ret);
}
CurrentList = GenerateSellList();
Mode = 2;
MarketList.SetList(CurrentList, 0);
DisplayCount(false);
Symbol 3298 MovieClip Frame 7
function GenerateAssortmentList() {
Ret = new Array();
for (gl in TheShop.Assortment) {
if (TheShop.Assortment[gl].Amount > 0) {
Ret.push(TheShop.Assortment[gl]);
}
}
return(Ret);
}
function CalcItemPrice(IT) {
TheTown = _parent.Towns[_parent.Group.InTown];
if (SubType == 1) {
ItemClass = _parent.Items[IT.Type].Class;
Ret = _parent.Items[IT.Type].Price;
if (((ItemClass == 1) or (ItemClass == 4)) or (ItemClass == 5)) {
Ret = Ret * TheTown.WpnPrice;
}
if (ItemClass == 2) {
Ret = Ret * TheTown.AmmoPrice;
}
if (ItemClass == 3) {
Ret = Ret * TheTown.ArmPrice;
}
if (ItemClass > 6) {
Ret = Ret * TheTown.OtherPrice;
}
}
if (SubType == 2) {
ItemClass = _parent.Transports[IT.Type].Class;
Ret = _parent.Transports[IT.Type].Price;
Ret = Ret * (IT.HP / IT.MaxHP);
if (ItemClass == 1) {
Ret = Ret * TheTown.AnimalsPrice;
}
if (ItemClass == 2) {
Ret = Ret * TheTown.CartsPrice;
}
if (ItemClass == 3) {
Ret = Ret * TheTown.CarsPrice;
}
}
return(Ret);
}
function DisplayItemParams(IT) {
Display._visible = true;
if (SubType == 1) {
Display.Icon.gotoAndStop(1);
ID = _parent.ItemDescription(IT.Type);
if ((CurList == 1) and (_parent.Items[IT.Type].Class <= 6)) {
if (isNaN(IT.InUse)) {
IT.InUse = 0;
}
ls = ID.push({Cat:"Items in Use:", Val:IT.InUse});
}
Display.NameText = _parent.Items[IT.Type].Name;
Display.AmountText = "Amount: " + IT.Amount;
}
if (SubType == 2) {
Display.Icon.gotoAndStop(2);
Display.NameText = _parent.Transports[IT.Type].Name;
Display.AmountText = "";
ID = _parent.TransportDescription(IT);
if (CurList == 1) {
if ((_parent.Transports[IT.Type].Class == 1) and _parent.Transports[IT.Type].CanHaveCart) {
ID.push({Cat:"Has Cart:"});
}
if (_parent.Transports[IT.Type].Class == 2) {
ID.push({Cat:"Attached to an Animal:"});
}
if (((_parent.Transports[IT.Type].Class == 1) and _parent.Transports[IT.Type].CanHaveCart) or (_parent.Transports[IT.Type].Class == 2)) {
if (IT.Attached instanceof Object) {
ID[ID.length - 1].Val = "Yes";
} else {
ID[ID.length - 1].Val = "No";
}
}
}
if (_parent.Transports[IT.Type].Class == 1) {
CatText = "Health:";
} else {
CatText = "Mechanical State:";
}
ID.push({Cat:CatText, Val:(IT.HP + " / ") + IT.MaxHP});
}
Display.Icon.Inside.gotoAndStop(IT.Type);
dt = 0;
while (dt <= 8) {
if (dt < ID.length) {
_parent.TMenu.Display["Cat" + dt] = ID[dt].Cat;
_parent.TMenu.Display["Val" + dt] = ID[dt].Val;
} else {
_parent.TMenu.Display["Cat" + dt] = "";
_parent.TMenu.Display["Val" + dt] = "";
}
dt++;
}
}
function BuySelectedTransport() {
lng = _parent.Group.Transport.push({});
for (prm in List2.Selected) {
_parent.Group.Transport[lng - 1][prm] = List2.Selected[prm];
}
_parent.Group.Transport[lng - 1].Group = _parent.Group;
_parent.Group.Money = _parent.Group.Money - ItemPrice;
_parent.Towns[_parent.Group.InTown].Money = _parent.Towns[_parent.Group.InTown].Money + _parent.NumberFormat(ItemPrice * 0.1, 2);
if (_parent.Transports[List2.Selected.Type].Class == 3) {
_parent.UpdateGroupCargo(_parent.Group);
}
for (si in TheShop.Assortment) {
if (TheShop.Assortment[si].Type == List2.Selected.Type) {
TheShop.Assortment[si].Amount--;
break;
}
}
TheShop.Stuff.splice(List2.SelectedItem, 1);
_parent.UpdateTradeText();
List1.SelectItem(Number.NaN);
List2.SelectItem(Number.NaN);
_parent.UpdateGroupParams(_parent.Group);
_parent.UpdateTradeText();
Display._visible = false;
}
function SellSelectedTransport() {
MB.OnOK = function () {
_parent.AllButtons(_parent.TMenu, true);
this._visible = false;
if (List1.Selected.Attached instanceof Object) {
List1.Selected.Attached.Attached = Number.NaN;
List1.Selected.Attached = Number.NaN;
}
lng = TheShop.Stuff.push({});
for (prm in List1.Selected) {
TheShop.Stuff[lng - 1][prm] = List1.Selected[prm];
}
_parent.Group.Money = _parent.Group.Money + ItemPrice;
_parent.Towns[_parent.Group.InTown].Money = _parent.Towns[_parent.Group.InTown].Money + _parent.NumberFormat(ItemPrice * 0.1, 2);
for (si in TheShop.Assortment) {
if (TheShop.Assortment[si].Type == List1.Selected.Type) {
TheShop.Assortment[si].Amount++;
break;
}
}
_parent.Group.Transport.splice(List1.SelectedItem, 1);
if ((_parent.Transports[List1.Selected.Type].Class == 3) and (_parent.Group.Fuel > (_parent.Group.MaxFuel - _parent.Transports[List1.Selected.Type].FuelTank))) {
for (ff in _parent.Group.Cargo) {
if (_parent.Group.Cargo[ff].Type == 9) {
_parent.Group.Fuel = (_parent.Group.Cargo[ff].Amount = _parent.Group.MaxFuel - _parent.Transports[List1.Selected.Type].FuelTank);
if (_parent.Group.Cargo[ff].Amount <= 0) {
_parent.Group.Cargo.splice(ff, 1);
}
break;
}
}
_parent.UpdateGroupCargo(_parent.Group);
}
_parent.UpdateTradeText();
List1.SelectItem(Number.NaN);
List2.SelectItem(Number.NaN);
_parent.UpdateGroupParams(_parent.Group);
_parent.UpdateTownEconomy(_parent.Towns[_parent.Group.InTown]);
_parent.UpdateTradeText();
Display._visible = false;
};
if ((_parent.Transports[List1.Selected.Type].Class == 3) and (_parent.Group.Fuel > (_parent.Group.MaxFuel - _parent.Transports[List1.Selected.Type].FuelTank))) {
_parent.AllButtons(this, false);
MB._visible = true;
MB.TitleText = "";
MB.MessageText = ((((("If you sell this Car you will need to leave " + _parent.NumberFormat((_parent.Group.Fuel - _parent.Group.MaxFuel) + _parent.Transports[List1.Selected.Type].FuelTank, 2)) + " L of fuel in its fuel tank due to lack of fuel containers.") + "\r") + "Are you sure you want to sell ") + _parent.Transports[List1.Selected.Type].Name) + "?";
MB.MBButtons.gotoAndStop(1);
} else {
MB.OnOK();
}
}
function BuyItem(IT, Am) {
IT.Amount = IT.Amount - Am;
FoundItem = false;
for (fi in _parent.Group.Inventory) {
if (_parent.Group.Inventory[fi].Type == IT.Type) {
_parent.Group.Inventory[fi].Amount = _parent.Group.Inventory[fi].Amount + Am;
FoundItem = true;
break;
}
}
if (!FoundItem) {
_parent.Group.Inventory.push({Type:IT.Type, Amount:Am});
}
if (_parent.Items[IT.Type].Class == 10) {
_parent.UpdateGroupParams(_parent.Group);
}
if (IT.Amount <= 0) {
List2.SelectItem(Number.NaN);
Display._visible = false;
}
_parent.Group.Money = _parent.Group.Money - (ItemPrice * Am);
_parent.Towns[_parent.Group.InTown].Money = _parent.Towns[_parent.Group.InTown].Money + _parent.NumberFormat((ItemPrice * Am) * 0.1, 2);
_parent.UpdateTownEconomy(_parent.Towns[_parent.Group.InTown]);
_parent.Group.Carrying = _parent.Group.Carrying + (_parent.Items[IT.Type].Weight * Am);
_parent.UpdateGroupCargo(_parent.Group);
_parent.UpdateTradeText();
List2.TheList = GenerateAssortmentList();
List1.SelectItem(Number.NaN);
List2.SelectItem(List2.SelectedItem);
}
function SellItem(IT, Am) {
WarningDisplayed = false;
if ((List1.Selected.Amount - Am) < List1.Selected.InUse) {
WarningDisplayed = true;
IinU = (List1.Selected.InUse - List1.Selected.Amount) + Am;
_parent.AllButtons(this, false);
MB._visible = true;
MB.MBButtons.gotoAndStop(1);
MB.TitleText = "WARNING";
if (IinU == 1) {
ToBe = "is";
} else {
ToBe = "are";
}
MB.MessageText = ((((((((IinU + " of the items you are going to sell ") + ToBe) + " being used by your men.") + "\r") + "Are you sure you want to sell ") + Am) + " units of ") + _parent.Items[IT.Type].Name) + "?";
MB.OnOK = function () {
ActuallySell(IT, Am);
this._visible = false;
_parent.RemoveItemsInUse(_parent.Group, IT.Type, IinU);
_parent.AllButtons(_parent.TMenu, true);
};
}
if ((_parent.Items[IT.Type].Class == 7) and (_parent.Group.Water > (_parent.Group.MaxWater - (_parent.Items[IT.Type].Capacity * Am)))) {
WarningDisplayed = true;
_parent.AllButtons(this, false);
MB._visible = true;
MB.MBButtons.gotoAndStop(1);
MB.TitleText = "WARNING";
if (Am == 1) {
Ending = "";
} else {
Ending = "s";
}
OverWater = _parent.Group.Water - (_parent.Group.MaxWater - (_parent.Items[IT.Type].Capacity * Am));
MB.MessageText = (((((((("If you sell " + Am) + " ") + _parent.Items[IT.Type].Name) + Ending) + ", you will need to pour out ") + OverWater) + " L of water.") + "\r") + "Are you sure you want to do it?";
MB.OnOK = function () {
this._visible = false;
_parent.Group.Water = _parent.Group.Water - OverWater;
ActuallySell(IT, Am);
_parent.AllButtons(_parent.TMenu, true);
};
}
if ((_parent.Items[IT.Type].Class == 8) and (_parent.Group.Fuel > (_parent.Group.MaxFuel - (_parent.Items[IT.Type].Capacity * Am)))) {
WarningDisplayed = true;
_parent.AllButtons(this, false);
MB._visible = true;
MB.MBButtons.gotoAndStop(1);
MB.TitleText = "WARNING";
if (Am == 1) {
Ending = "";
} else {
Ending = "s";
}
OverFuel = _parent.Group.Fuel - (_parent.Group.MaxFuel - (_parent.Items[IT.Type].Capacity * Am));
MB.MessageText = (((((((("If you sell " + Am) + " ") + _parent.Items[IT.Type].Name) + Ending) + ", you will need to pour out ") + OverFuel) + " L of fuel.") + "\r") + "Are you sure you want to do it?";
MB.OnOK = function () {
this._visible = false;
for (ff in _parent.Group.Cargo) {
if (_parent.Group.Cargo[ff].Type == 9) {
_parent.Group.Cargo[ff].Amount = _parent.Group.Cargo[ff].Amount - OverFuel;
if (_parent.Group.Cargo[ff].Amount <= 0) {
_parent.Group.Cargo.splice(ff, 1);
}
break;
}
}
ActuallySell(IT, Am);
_parent.AllButtons(_parent.TMenu, true);
};
}
if (!WarningDisplayed) {
ActuallySell(IT, Am);
_parent.AllButtons(this, true);
}
}
function ActuallySell(IT, Am) {
IT.Amount = IT.Amount - Am;
for (dt in TheShop.Assortment) {
if (TheShop.Assortment[dt].Type == List1.Selected.Type) {
TheShop.Assortment[dt].Amount = TheShop.Assortment[dt].Amount + Am;
break;
}
}
if (IT.Amount <= 0) {
if (SubType == 1) {
for (si in _parent.Group.Inventory) {
if (_parent.Group.Inventory[si] == IT) {
_parent.Group.Inventory.splice(si, 1);
}
}
}
if (SubType == 2) {
for (si in _parent.Group.Transport) {
if (_parent.Group.Transport[si] == IT) {
_parent.Group.Transport.splice(si, 1);
}
}
}
List1.SelectItem(Number.NaN);
Display._visible = false;
}
_parent.Group.Money = _parent.Group.Money + (ItemPrice * Am);
_parent.Towns[_parent.Group.InTown].Money = _parent.Towns[_parent.Group.InTown].Money + _parent.NumberFormat((ItemPrice * Am) * 0.1, 2);
trace((ItemPrice + " ") + _parent.Towns[_parent.Group.InTown].Money);
_parent.UpdateTownEconomy(_parent.Towns[_parent.Group.InTown]);
_parent.Group.Carrying = _parent.Group.Carrying - (_parent.Items[IT.Type].Weight * Am);
_parent.UpdateGroupCargo(_parent.Group);
_parent.UpdateTradeText();
List2.TheList = GenerateAssortmentList();
List1.SelectItem(List1.SelectedItem);
List2.SelectItem(Number.NaN);
}
NumWindow._visible = false;
MB._visible = false;
NumWindow.OnCancel = function () {
this._visible = false;
_parent.AllButtons(_parent.TMenu, true);
};
CurList = 0;
if (SubType == 1) {
List1.TheList = _parent.Group.Inventory;
List1.Class = (List2.Class = 3);
List2.TheList = GenerateAssortmentList();
}
if (SubType == 2) {
List1.TheList = _parent.Group.Transport;
List1.Class = (List2.Class = 4);
List2.TheList = TheShop.Stuff;
}
ShopTitle = ((TheShop.Name + " (") + _parent.Towns[_parent.Group.InTown].Name) + ")";
Display._visible = false;
List1.Offset = (List2.Offset = 0);
List1.SelectItem(Number.NaN);
List2.SelectItem(Number.NaN);
List1.OnSelect = function () {
if (CurList != 1) {
List2.SelectItem(Number.NaN);
CurList = 1;
}
DisplayItemParams(List1.Selected);
ItemPrice = CalcItemPrice(this.Selected);
ItemPrice = ItemPrice * 0.9;
ItemPrice = _parent.NumberFormat(ItemPrice, 2);
if (SubType == 1) {
Display.PriceText = "Price per Unit: $" + ItemPrice;
} else {
Display.PriceText = "Price: $" + ItemPrice;
}
MaxAssortment = 0;
for (fi in TheShop.Assortment) {
if (TheShop.Assortment[fi].Type == List1.Selected.Type) {
MaxAssortment = TheShop.Assortment[fi].MaxAmount - TheShop.Assortment[fi].Amount;
break;
}
}
MaxSell = Math.min(MaxAssortment, this.Selected.Amount);
if (MaxAssortment == 1) {
Ending = "";
} else {
Ending = "s";
}
if (MaxAssortment == 0) {
Display.TheButton.gotoAndStop(5);
Display.MaxText = "";
} else {
Display.MaxText = (((("\"" + TheShop.Name) + "\" is ready to buy ") + MaxAssortment) + " unit") + Ending;
Display.TheButton.gotoAndStop(2);
Display.TheButton.Inside.enabled = true;
}
};
List2.OnSelect = function () {
if (CurList != 2) {
List1.SelectItem(Number.NaN);
CurList = 2;
}
DisplayItemParams(List2.Selected);
ItemPrice = CalcItemPrice(this.Selected);
ItemPrice = ItemPrice * 1.1;
ItemPrice = _parent.NumberFormat(ItemPrice, 2);
if (SubType == 1) {
Display.PriceText = "Price per Unit: $" + ItemPrice;
} else {
Display.PriceText = "Price: $" + ItemPrice;
}
if (SubType == 1) {
MaxBuy = Math.min(List2.Selected.Amount, Math.floor(_parent.Group.Money / ItemPrice));
MaxBuy = Math.min(MaxBuy, Math.floor(_parent.Group.FreeCargo / _parent.Items[List2.Selected.Type].Weight));
if (MaxBuy < 0) {
MaxBuy = 0;
}
if (MaxBuy == 1) {
Ending = "";
} else {
Ending = "s";
}
if (MaxBuy == 0) {
Display.MaxText = "";
if (_parent.Items[List2.Selected.Type].Weight > _parent.Group.FreeCargo) {
Display.TheButton.gotoAndStop(4);
}
if (ItemPrice > _parent.Group.Money) {
Display.TheButton.gotoAndStop(3);
}
} else {
Display.MaxText = (("You can buy the maximum of " + MaxBuy) + " unit") + Ending;
Display.TheButton.gotoAndStop(1);
Display.TheButton.Inside.enabled = true;
}
} else {
Display.MaxText = "";
if (ItemPrice > _parent.Group.Money) {
Display.TheButton.gotoAndStop(3);
} else {
Display.TheButton.gotoAndStop(1);
Display.TheButton.Inside.enabled = true;
}
}
};
Symbol 3298 MovieClip Frame 8
function MaxWater() {
if (WaterPrice == 0) {
MaxFill = _parent.NumberFormat(Math.min(_parent.Group.MaxWater - _parent.Group.Water, _parent.Group.FreeCargo), 2);
} else {
MaxFill = _parent.NumberFormat(Math.min(_parent.Group.MaxWater - _parent.Group.Water, Math.min(_parent.NumberFormat(_parent.Group.Money / WaterPrice, 3), _parent.Group.FreeCargo)), 2);
}
if (MaxFill < 0) {
MaxFill = 0;
}
NumWindow.Max = MaxFill;
NumWindow.UnitsText = MaxFill;
NumWindow.UpdatePriceText();
}
NumWindow.OnCancel = function () {
gotoAndStop (1);
_parent.BMenu.SelectButton(1);
};
NumWindow._visible = true;
NumWindow.TitleText = "Fill Water";
NumWindow.WeightPerUnit = 1;
WaterPrice = _parent.Towns[_parent.Group.InTown].WaterPrice;
NumWindow.PricePerUnit = WaterPrice;
MaxWater();
NumWindow.ActionButton.gotoAndStop(7);
Symbol 3298 MovieClip Frame 9
function GenerateAnimalsList() {
Ret = new Array();
for (tr in _parent.Group.Transport) {
if (_parent.Transports[_parent.Group.Transport[tr].Type].Class == 1) {
Ret.push(_parent.Group.Transport[tr]);
}
}
return(Ret);
}
function GenerateMecList() {
Ret = new Array();
for (tr in _parent.Group.Transport) {
if (_parent.Transports[_parent.Group.Transport[tr].Type].Class > 1) {
Ret.push(_parent.Group.Transport[tr]);
}
}
return(Ret);
}
if (SubType == 1) {
Sign.gotoAndStop(1);
ChooseText = "Choose a man to heal:";
Action = "Heal";
HPText = "HP";
Display.HB.But.gotoAndStop(1);
}
if (SubType == 2) {
Sign.gotoAndStop(2);
ChooseText = "Choose an animal to heal:";
Action = "Heal";
HPText = "HP";
Display.HB.But.gotoAndStop(1);
}
if (SubType == 3) {
Sign.gotoAndStop(3);
ChooseText = "Choose a vehicle to repair:";
Action = "Repair";
HPText = "points";
Display.HB.But.gotoAndStop(2);
}
NameText = ((ThePlace.Name + " (") + _parent.Towns[_parent.Group.InTown].Name) + ")";
if (SubType == 1) {
Lst.TheList = _parent.Group.Members;
Lst.Class = 1;
}
if (SubType == 2) {
Lst.TheList = GenerateAnimalsList();
Lst.Class = 4;
}
if (SubType == 3) {
Lst.TheList = GenerateMecList();
Lst.Class = 4;
}
Lst.Offset = 0;
if (Lst.TheList.length > 0) {
Lst.SelectedItem = 0;
} else {
Lst.SelectedItem = Number.NaN;
}
Lst.SelectItem(Lst.SelectedItem);
Lst.OnSelect = function () {
if (this.Selected instanceof Object) {
Display._visible = true;
if (SubType == 1) {
Display.NameText = this.Selected.Name;
Display.Icon.gotoAndStop(1);
Display.Icon.Inside.gotoAndStop(this.Selected.Portrait);
}
if (SubType > 1) {
Display.NameText == _parent.Transports[this.Selected.Type].Name;
Display.Icon.gotoAndStop(2);
Display.Icon.Inside.gotoAndStop(this.Selected.Type);
}
if (SubType == 3) {
HText = "Mechanical State: ";
} else {
HText = "Current Health: ";
}
Display.HealthText = ((HText + Math.ceil(this.Selected.HP)) + " / ") + this.Selected.MaxHP;
Display.HB.MaxHeal = (Math.min(1, (this.Selected.HP + (_parent.Group.Money / ThePlace.HealPrice)) / this.Selected.MaxHP) * 233) - 116.5;
Display.HB.DrawHealth = this.Selected.HP / this.Selected.MaxHP;
Display.HB.SetHealth(this.Selected.HP / this.Selected.MaxHP);
Display.HB.HPperPoint = this.Selected.MaxHP / 233;
Display.HB.HealPrice = ThePlace.HealPrice;
Display.HB.SetHeal();
} else {
Display._visible = false;
}
};
if (isNaN(Lst.SelectedItem)) {
Lst.OnSelect();
}
Symbol 3298 MovieClip Frame 10
function UpdateNews() {
TheField = F1;
F1.text = "";
F2.text = "";
Titles = new Array();
n = 0;
while (n < _parent.News.length) {
if ((_parent.News[n].Type == 1) or (_parent.News[n].Type == 2)) {
RouteText = "";
at = 0;
while (at < (_parent.Routes[_parent.News[n].Route].length - 1)) {
if (at > 0) {
RouteText = RouteText + " - ";
}
RouteText = RouteText + _parent.Towns[_parent.Routes[_parent.News[n].Route][at].Town].Name;
at++;
}
}
if (_parent.News[n].Type == 1) {
Title = "CARAVAN DESTROYED";
if (_parent.News[n].ByWhom == 1) {
Destroyer = "robbers";
}
if (_parent.News[n].ByWhom == 2) {
Destroyer = People[0].Name;
}
Text = ((("The caravan that used to follow " + RouteText) + " route has been destroyed by ") + Destroyer) + ". Nobody survived.";
}
if (_parent.News[n].Type == 2) {
Title = "NEW CARAVAN FORMED";
Text = ("A new caravan has been formed. The caravan will follow " + RouteText) + " route.";
}
if (_parent.News[n].Type == 3) {
RawName = _parent.Goods[_parent.News[n].Raw].Name.toLowerCase();
Title = (_parent.Towns[_parent.News[n].Town].Name.toUpperCase() + " NEEDS ") + RawName.toUpperCase();
Text = ((((((_parent.Towns[_parent.News[n].Town].Name + " can no longer produce ") + _parent.Goods[_parent.News[n].Product].Name.toLowerCase()) + " because it's out of ") + RawName) + ". An urgent ") + RawName.toLowerCase()) + " supply is needed.";
}
if (_parent.News[n].Type == 5) {
TownName = _parent.Towns[_parent.News[n].Town].Name;
IndustryName = _parent.Industries[_parent.News[n].Industry].Name;
RawName = _parent.Goods[_parent.Industries[_parent.News[n].Industry].Raw.Type].Name;
ProductName = _parent.Goods[_parent.Industries[_parent.News[n].Industry].Product].Name;
Title = (TownName.toUpperCase() + " RESTORES ITS ") + IndustryName.toUpperCase();
Text = ((((TownName + " has received some ") + RawName.toLowerCase()) + " and from now on will produce ") + ProductName.toLowerCase()) + ".";
}
if (_parent.News[n].Type == 4) {
TownName = _parent.Towns[_parent.News[n].Town].Name;
IndustryName = _parent.Industries[_parent.News[n].Industry].Name;
ProductName = _parent.Goods[_parent.Industries[_parent.News[n].Industry].Product].Name;
UnitName = _parent.Goods[_parent.Industries[_parent.News[n].Industry].Product].Unit;
if (UnitName == "unit") {
UnitName = UnitName + "s";
}
if (_parent.Industries[_parent.News[n].Industry].Raw instanceof Object) {
RawName = _parent.Goods[_parent.Industries[_parent.News[n].Industry].Raw.Type].Name;
RawUnit = _parent.Goods[_parent.Industries[_parent.News[n].Industry].Raw.Type].Unit;
if (RawUnit == "unit") {
RawUnit = RawUnit + "s";
}
RawAmount = Math.round((_parent.Industries[_parent.News[n].Industry].Raw.Amount * _parent.News[n].Production) * 30);
RawText = ((((" and will need " + RawAmount) + " ") + RawUnit) + " of ") + RawName.toLowerCase();
} else {
RawText = "";
}
Title = (TownName.toUpperCase() + " DEVELOPS ") + IndustryName.toUpperCase();
Text = (((((((((TownName + " has improved its ") + IndustryName.toLowerCase()) + ". From now on it will produce ") + (_parent.News[n].Production * 30)) + " ") + UnitName) + " of ") + ProductName.toLowerCase()) + RawText) + " a month.";
}
if (_parent.News[n].Type == 6) {
Title = _parent.News[n].Title;
Text = _parent.News[n].Text;
}
if (_parent.News[n].Type == 7) {
Title = "ROBBERS' BASE DESTROYED";
Text = _parent.People[0].Name + "'s caravan helped Desert Patrol to find and destroy robbers' base South-East to Abu Kirdyk, which caused a serious damage to robbers' organization.";
}
if (TheField.textHeight > 260) {
if (TheField == F1) {
TheField = F2;
} else {
break;
}
}
StartTitle = TheField.length;
TheField.text = TheField.text + Title;
Titles.push({Start:StartTitle, End:TheField.length, Field:TheField});
TheField.text = TheField.text + newline;
TooMuch = false;
PrevWord = TheField.text.length;
TheField.text = TheField.text + (("(" + _parent.News[n].Time) + ") ");
TextWords = Text.split(" ");
w = 0;
while (w < TextWords.length) {
TheField.text = TheField.text + (TextWords[w] + " ");
if (TheField.textHeight > 330) {
TheField.text = TheField.text.substring(0, PrevWord);
if (TheField == F1) {
TheField = F2;
w--;
} else {
TooMuch = true;
break;
}
}
PrevWord = TheField.text.length;
w++;
}
if (TooMuch) {
break;
}
TheField.text = TheField.text + "\r\r";
n++;
}
for (st in Titles) {
Titles[st].Field.setTextFormat(Titles[st].Start, Titles[st].End, TitleFormat);
}
_parent.News.splice(n + 1);
}
var GeneralFormat = new TextFormat();
var TitleFormat = new TextFormat();
GeneralFormat.align = "left";
GeneralFormat.font = "Arial";
GeneralFormat.size = 10;
TitleFormat.align = "center";
TitleFormat.bold = true;
TitleFormat.size = 12;
F1.multiline = (F2.multiline = true);
F1.wordWrap = (F2.wordWrap = true);
F1.selectable = (F2.selectable = false);
F1.setNewTextFormat(GeneralFormat);
F2.setNewTextFormat(GeneralFormat);
UpdateNews();
Symbol 3298 MovieClip Frame 11
function RefreshDialogue() {
TheText = _parent.Dialogues[CurrentDialogue][CurrentStage].CharSays;
NameIndex = TheText.indexOf("@name");
if (NameIndex != -1) {
Part1 = TheText.substring(0, NameIndex);
Part2 = TheText.substring(NameIndex + 5, TheText.length);
TheText = (Part1 + _parent.People[0].Name) + Part2;
}
CallYouIndex = TheText.indexOf("@callyou");
if (CallYouIndex != -1) {
Part1 = TheText.substring(0, CallYouIndex);
Part2 = TheText.substring(CallYouIndex + 8, TheText.length);
if (CurrentDialogue == 1) {
if (_parent.People[0].BodyType >= 5) {
CallYou = "gal";
} else {
CallYou = "kid";
}
}
if (CurrentDialogue == 5) {
if (_parent.People[0].BodyType >= 5) {
CallYou = "babe";
} else {
CallYou = "dude";
}
}
if (CurrentDialogue == 6) {
if (_parent.People[0].BodyType >= 5) {
CallYou = "Ma'am";
} else {
CallYou = "Sir";
}
}
TheText = (Part1 + CallYou) + Part2;
}
YouSayOptions = new Array();
sys = 0;
while (sys < _parent.Dialogues[CurrentDialogue][CurrentStage].YouSay.length) {
if ((typeof(_parent.Dialogues[CurrentDialogue][CurrentStage].YouSay[sys].Condition) != "function") or _parent.Dialogues[CurrentDialogue][CurrentStage].YouSay[sys].Condition()) {
YouSayOptions.push({});
for (prm in _parent.Dialogues[CurrentDialogue][CurrentStage].YouSay[sys]) {
YouSayOptions[YouSayOptions.length - 1][prm] = _parent.Dialogues[CurrentDialogue][CurrentStage].YouSay[sys][prm];
}
NameIndex = YouSayOptions[YouSayOptions.length - 1].Text.indexOf("@name");
if (NameIndex != -1) {
Part1 = YouSayOptions[YouSayOptions.length - 1].Text.substring(0, NameIndex);
Part2 = YouSayOptions[YouSayOptions.length - 1].Text.substring(NameIndex + 5, YouSayOptions[YouSayOptions.length - 1].Text.length);
YouSayOptions[YouSayOptions.length - 1].Text = (Part1 + _parent.People[0].Name) + Part2;
}
}
sys++;
}
sy = 0;
while (sy <= 3) {
if (sy < YouSayOptions.length) {
this[sy]._visible = true;
this[sy].Txt = YouSayOptions[sy].Text;
this[sy].onPress = YouSayOptions[sy].Action;
} else {
this[sy]._visible = false;
}
sy++;
}
}
function SetStage(StageNum) {
CurrentStage = StageNum;
RefreshDialogue();
}
function SetDefault(Dialogue, DefaultStage) {
_parent.DefaultStages[Dialogue] = DefaultStage;
}
function Leave() {
_parent.BMenu.gotoAndStop(3);
gotoAndStop (1);
}
function SpecialAction(ActionType) {
switch (ActionType) {
case 1 :
_parent.Group.Money = _parent.Group.Money + 1000;
_parent.Group.Transport.push({Type:1, HP:_parent.Transports[1].MaxHP, MaxHP:_parent.Transports[1].MaxHP});
_parent.UpdateTransportParams(_parent.Group.Transport[_parent.Group.Transport.length - 1]);
FreeSl = Number.NaN;
ffs = 0;
while (ffs <= 1) {
if (!(_parent.People[0].Holding[ffs] instanceof Object)) {
FreeSl = ffs;
break;
}
ffs++;
}
TPos = Number.NaN;
for (st in _parent.Group.Inventory) {
if (_parent.Group.Inventory[st].Type == 33) {
TPos = st;
_parent.Group.Inventory[st].Amount++;
break;
}
}
if (isNaN(TPos)) {
TPos = _parent.Group.Inventory.push({Type:33, Amount:1});
TPos--;
}
if (!isNaN(FreeSl)) {
_parent.Group.Inventory[TPos].InUse = 1;
_parent.People[0].Holding[FreeSl] = {Type:33, Amount:1};
_parent.People[0].Carrying = _parent.People[0].Carrying + _parent.Items[33].Weight;
}
FreeSl = Number.NaN;
ffs = 2;
while (ffs <= 3) {
if (!(_parent.People[0].Holding[ffs] instanceof Object)) {
FreeSl = ffs;
break;
}
ffs++;
}
TPos = Number.NaN;
for (st in _parent.Group.Inventory) {
if (_parent.Group.Inventory[st].Type == 9) {
TPos = st;
_parent.Group.Inventory[st].Amount = _parent.Group.Inventory[st].Amount + 50;
break;
}
}
if (isNaN(TPos)) {
TPos = _parent.Group.Inventory.push({Type:9, Amount:50});
TPos--;
}
if (!isNaN(FreeSl)) {
_parent.Group.Inventory[TPos].InUse = 50;
_parent.People[0].Holding[FreeSl] = {Type:9, Amount:50};
_parent.People[0].Carrying = _parent.People[0].Carrying + (_parent.Items[9].Weight * 50);
}
_parent.UpdateGroupParams(_parent.Group);
_parent.UpdateTradeText();
break;
case 2 :
_parent.Towns[13].Houses[5].Revealed = true;
break;
case 3 :
_parent.Group.Direction = Math.random() * _parent.dblPI;
_parent.Group.Move = true;
_parent.SwitchMode(1);
break;
case 4 :
_parent.AddDPConvoy();
_parent.Group.Direction = 0.628;
_parent.Group.Members.push(_parent.People[62]);
_parent.Group.Cargo.push({Type:14, Amount:20});
_parent.UpdateGroupParams(_parent.Group);
_parent.Story.SentToBase = true;
break;
case 5 :
_parent.Story.Counter = (24 - _parent.Hour) + 8;
_parent.Story.CounterFor = 1;
break;
case 6 :
for (rp in _parent.Group.Inventory) {
if (_parent.Group.Inventory[rp].Type == 84) {
_parent.Group.Inventory.splice(rp, 1);
break;
}
}
break;
case 7 :
_parent.GameOverType = 2;
_parent.Mus.setVolume(0);
_parent.gotoAndStop("Game Over");
break;
case 8 :
InTheBase = false;
for (rp in _parent.Group.Inventory) {
if (_parent.Group.Inventory[rp].Type == 85) {
_parent.Group.Inventory.splice(rp, 1);
break;
}
}
_parent.Story.HavePass = false;
for (rp in _parent.Group.Inventory) {
if (_parent.Group.Inventory[rp].Type == 85) {
_parent.Story.HavePass = true;
break;
}
}
gotoAndStop (1);
break;
case 9 :
_parent.Story.AddSniper = true;
for (rp in _parent.Group.Inventory) {
if (_parent.Group.Inventory[rp].Type == 86) {
_parent.Group.Inventory.splice(rp, 1);
break;
}
}
break;
case 10 :
_parent.Story.MissilesDisabled = true;
_parent.DefaultStages[6] = 6;
_parent.News.unshift({Type:6, Time:_parent.FormatedTime(), Title:"MILITARY FIREWORKS", Text:"The citizens of Fort Goks have been witness to a spectacular show. About 10 missiles were launched simultaneously from Frot Goks military base and exploded in the air. The government refrained from any comments due to security reasons."});
break;
case 11 :
_parent.Story.HaveTheBook = false;
_parent.Story.HaveTheManual = true;
for (itm in _parent.Group.Inventory) {
if (_parent.Group.Inventory[itm].Type == 83) {
_parent.Group.Inventory.splice(itm, 1);
break;
}
}
_parent.Group.Inventory.push({Type:87, Amount:1});
break;
case 12 :
_parent.SwitchMode(1);
_parent.Group.Move = false;
_parent.MDown = false;
_parent.Towns[14].Houses[7].Revealed = false;
_parent.StartTheFinalBattle();
}
}
Name = _parent.DialogueNames[CurrentDialogue];
Portrait.gotoAndStop(CurrentDialogue);
RefreshDialogue();
Symbol 3298 MovieClip Frame 12
if ((Fld.textHeight - (Fld.scroll * 15)) > 200) {
Fld.scroll = Fld.scroll + Math.ceil(((Fld.textHeight - (Fld.scroll * 15)) - 200) / 15);
}
if ((_parent.Story.PowerOff or SDInProgress) or _parent.Story.MissilesDisabled) {
Cover._visible = true;
} else {
Cover._visible = false;
}
if ((_parent.Story.PowerOff or _parent.Story.MissilesDisabled) or _parent.StorySystemLocked) {
Key.removeListener(_parent.KeyListener);
}
if (_parent.Story.SystemLocked) {
Txt = "System locked";
}
Symbol 3341 Button
on (press) {
_parent.SwitchMedsUse(-1);
}
Symbol 3342 Button
on (press) {
_parent.SwitchMedsUse(1);
}
Symbol 3350 Button
on (press) {
_parent.DistributeCarts(_parent.Group);
UpdateInfo();
}
Symbol 3352 Button
on (press) {
_parent.DistributeAmmo(_parent.Group);
}
Symbol 3393 Button
on (press) {
_parent._parent.AllButtons(_parent, false);
_parent.MB._visible = true;
_parent.MB.TitleText = "";
if (_parent._parent.Group.InTown == 0) {
_parent.MB.MessageText = (("You can't leave a person in the desert. If dismissed, " + _parent.List1.Selected.Name) + " will follow you to the next town and will leave the caravan there.") + "\r";
} else {
_parent.MB.MessageText = "";
}
_parent.MB.MBButtons.gotoAndStop(1);
_parent.MB.MessageText = _parent.MB.MessageText + (("Are you sure you want to dismiss " + _parent.List1.Selected.Name) + "?");
_parent.MB.OnOK = function () {
if (_parent._parent.Group.InTown == 0) {
_parent.List1.Selected.Status = 2;
} else {
_parent._parent.Dismiss(_parent.List1.Selected);
_parent.List1.SelectedItem--;
}
_parent.List1.SelectItem(_parent.List1.SelectedItem);
this._visible = false;
_parent._parent.AllButtons(_parent, true);
};
}
Symbol 3396 Button
on (press) {
_parent.SwitchAutopay();
}
Symbol 3397 Button
on (press) {
_parent.List1.Selected.Status = 1;
_parent._parent.Group.Money = _parent._parent.Group.Money - _parent.List1.Selected.Salary;
_parent.List1.SelectItem(_parent.List1.SelectedItem);
}
Symbol 3399 Button
on (press) {
if (_parent._parent.Group.InTown == 0) {
_parent.List1.Selected.Status = 2;
} else {
_parent._parent.Dismiss(_parent.List1.Selected);
_parent.List1.SelectedItem--;
}
_parent.List1.SelectItem(_parent.List1.SelectedItem);
_parent._parent.OldMode = 1;
}
Symbol 3400 Button
on (press) {
_parent.List1.Selected.Status = 1;
_parent._parent.Group.Money = _parent._parent.Group.Money - _parent.List1.Selected.Salary;
_parent._parent.OldMode = 1;
_parent.List1.SelectItem(_parent.List1.SelectedItem);
}
Symbol 3412 Button
on (press) {
Class = _parent._parent._parent.Items[_parent._parent.List2.Selected.Type].Class;
if (((Class == 2) or (Class == 4)) and (_parent._parent.List2.Selected.Amount > 1)) {
_parent._parent._parent.AllButtons(_parent._parent, false);
_parent._parent.NumWindow._visible = true;
_parent._parent.NumWindow.UnitsText = 0;
_parent._parent.NumWindow.ActionButton.gotoAndStop(1);
_parent._parent.NumWindow.Max = Math.min(_parent._parent.List2.Selected.Amount, Math.floor((_parent._parent.List1.Selected.Capacity - _parent._parent.List1.Selected.Carrying) / _parent._parent._parent.Items[_parent._parent.List2.Selected.Type].Weight));
_parent._parent.NumWindow.TitleText = (("Give " + _parent._parent._parent.Items[_parent._parent.List2.Selected.Type].Name) + " to ") + _parent._parent.List1.Selected.Name;
_parent._parent.NumWindow.WeightPerUnit = _parent._parent._parent.Items[_parent._parent.List2.Selected.Type].Weight;
_parent._parent.NumWindow.UpdatePriceText();
_parent._parent.NumWindow.PricePerUnit = Number.NaN;
} else {
_parent._parent.GiveSelectedItem(1);
}
}
Symbol 3414 Button
on (press) {
if (_parent._parent.List1.Selected.Holding[_parent._parent.SelectedSlot].Amount > 1) {
_parent._parent.AllButtons(_parent._parent, false);
_parent._parent.NumWindow._visible = true;
_parent._parent.NumWindow.UnitsText = 0;
_parent._parent.NumWindow.ActionButton.gotoAndStop(2);
_parent._parent.NumWindow.Max = _parent._parent.List1.Selected.Holding[_parent._parent.SelectedSlot].Amount;
_parent._parent.NumWindow.TitleText = (("Take " + _parent._parent._parent.Items[_parent._parent.List1.Selected.Holding[_parent._parent.SelectedSlot].Type].Name) + " from ") + _parent._parent.List1.Selected.Name;
_parent._parent.NumWindow.WeightPerUnit = _parent._parent._parent.Items[_parent._parent.List1.Selected.Holding[_parent._parent.SelectedSlot].Type].Weight;
_parent._parent.NumWindow.UpdatePriceText();
_parent._parent.NumWindow.PricePerUnit = Number.NaN;
} else {
_parent._parent.RemoveItem(_parent._parent.List1.Selected.Holding[_parent._parent.SelectedSlot], 1);
}
}
Symbol 3437 Button
on (press) {
SelectSlot(0);
}
Symbol 3438 Button
on (press) {
SelectSlot(1);
}
Symbol 3439 Button
on (press) {
SelectSlot(2);
}
Symbol 3440 Button
on (press) {
SelectSlot(3);
}
Symbol 3441 Button
on (press) {
SelectSlot(4);
}
Symbol 3443 Button
on (press) {
_parent._parent.AllButtons(_parent, false);
_parent.RM._visible = true;
}
Symbol 3466 Button
on (press) {
if ((!isNaN(L1.SelectedItem)) or (!isNaN(L2.SelectedItem))) {
if (CurList == 1) {
if (_parent.Goods[L1.Selected.Type].Special) {
_parent.AllButtons(this, false);
MB._visible = true;
MB.TitleText = "";
MB.MBButtons.gotoAndStop(3);
MB.MessageText = ("You cannot throw away " + _parent.Goods[L1.Selected.Type].Name) + ". You need it for your mission.";
} else if (L1.Selected.Amount == 1) {
ThrowGoods(L1.Selected, 1);
CheckEmpty();
} else {
_parent.AllButtons(this, false);
NumWindow._visible = true;
NumWindow.UnitsText = 0;
NumWindow.ActionButton.gotoAndStop(3);
NumWindow.TitleText = "Throw " + _parent.Goods[L1.Selected.Type].Name;
NumWindow.WeightPerUnit = _parent.Goods[L1.Selected.Type].WeightPerUnit;
NumWindow.Max = L1.Selected.Amount;
NumWindow.UpdatePriceText();
}
}
if (CurList == 2) {
if (_parent.Items[L2.Selected.Type].Special) {
_parent.AllButtons(this, false);
MB._visible = true;
MB.TitleText = "";
MB.MBButtons.gotoAndStop(3);
MB.MessageText = ("You cannot throw away " + _parent.Items[L2.Selected.Type].Name) + ". You need it for your mission.";
} else if (L2.Selected.Amount == 1) {
ThrowItems(L2.Selected, 1);
CheckEmpty();
} else {
_parent.AllButtons(this, false);
NumWindow._visible = true;
NumWindow.UnitsText = 0;
NumWindow.ActionButton.gotoAndStop(3);
NumWindow.TitleText = "Throw " + _parent.Items[L2.Selected.Type].Name;
NumWindow.WeightPerUnit = _parent.Items[L2.Selected.Type].Weight;
NumWindow.Max = L2.Selected.Amount;
NumWindow.UpdatePriceText();
}
}
}
}
Symbol 3469 Button
on (press) {
NumWindow._visible = true;
NumWindow.UnitsText = 0;
NumWindow.Max = _parent.Group.Water;
NumWindow.PricePerUnit = Number.NaN;
NumWindow.WeightPerUnit = 1;
NumWindow.TitleText = "Pour out Water";
NumWindow.UpdatePriceText();
NumWindow.ActionButton.gotoAndStop(6);
}
Symbol 3476 MovieClip Frame 1
_parent.CheckEmpty();
Symbol 3478 Button
on (press) {
_visible = false;
_parent._parent.AllButtons(_parent, true);
}
Symbol 3479 Button
on (press) {
SB.nextFrame();
BB.nextFrame();
}
Symbol 3480 Button
on (press) {
SB.prevFrame();
BB.prevFrame();
}
Symbol 4072 MovieClip Frame 1
stop();
Symbol 4089 Button
on (press) {
_parent._parent.List1.Selected.Attached.Attached = Number.NaN;
_parent._parent.List1.Selected.Attached = Number.NaN;
_parent._parent.List2.TheList = _parent._parent.GenerateCartsList();
if (!isNaN(_parent._parent.List2.SelectedItem)) {
for (fi in _parent._parent.List2.TheList) {
if (_parent._parent.List2.TheList[fi] == _parent._parent.List2.Selected) {
_parent._parent.List2.SelectedItem = fi;
break;
}
}
}
_parent._parent.List1.SelectItem(_parent._parent.List1.SelectedItem);
_parent._parent.List2.SelectItem(_parent._parent.List2.SelectedItem);
_parent._parent._parent.UpdateGroupParams(_parent._parent._parent.Group);
}
Symbol 4098 Button
on (press) {
if (_parent._parent.List1.Selected.Attached instanceof Object) {
_parent._parent.List1.Selected.Attached.Attached = Number.NaN;
}
_parent._parent.List1.Selected.Attached = _parent._parent.List2.Selected;
_parent._parent.List2.Selected.Attached = _parent._parent.List1.Selected;
_parent._parent.List1.SelectItem(_parent._parent.List1.SelectedItem);
_parent._parent.List2.TheList = _parent._parent.GenerateCartsList();
_parent._parent.List2.SelectItem(Number.NaN);
_parent._parent.CartDisplay._visible = false;
_parent._parent._parent.UpdateGroupParams(_parent._parent._parent.Group);
}
Symbol 4123 Button
on (press) {
_parent.LeaveSelectedTransport();
}
Symbol 4126 MovieClip Frame 1
function UpdateInfo() {
if (_parent.Group.Members.length == 1) {
AddMen = " man";
} else {
AddMen = " men";
}
MenText = _parent.Group.Members.length + AddMen;
if (_parent.Group.Animals == 1) {
AddAnimals = " animal";
} else {
AddAnimals = " animals";
}
AnimalsText = _parent.Group.Animals + AddAnimals;
if (_parent.Group.Carts == 1) {
AddCarts = " cart";
} else {
AddCarts = " carts";
}
CartsText = _parent.Group.Carts + AddCarts;
if (_parent.Group.Cars == 1) {
AddCars = " car";
} else {
AddCars = " cars";
}
CarsText = _parent.Group.Cars + AddCars;
MaxCapText = _parent.Group.MaxCargo + " Kg";
UsedCapText = _parent.Group.CargoWeight + " Kg";
FreeCapText = _parent.Group.FreeCargo + " Kg";
MoneyText = "$" + (Math.round(_parent.Group.Money * 100) / 100);
FoodText = _parent.Group.Food + " Kg";
WaterText = ((_parent.Group.Water + " / ") + _parent.Group.MaxWater) + " L";
MedsText = _parent.Group.Meds + " g";
ForageText = _parent.Group.Forage + " Kg";
FuelText = ((_parent.NumberFormat(_parent.Group.Fuel, 1) + " / ") + _parent.Group.MaxFuel) + " L";
EatText = (_parent.Group.Eat * 3) + " Kg/day";
DrinkText = (_parent.Group.Drink * 24) + " L/day";
UseForageText = (_parent.Group.ForageUse * 3) + " Kg/day";
UseFuelText = _parent.Group.FuelUse + " L/100Km";
DoctorText = _parent.Group.Doctor;
VeterineryText = _parent.Group.Veterinary;
MechanicText = _parent.Group.Mechanic;
SpeedText = _parent.Group.Speed + " Km/h";
MUse.gotoAndStop(_parent.MedsUse + 1);
if (_parent.GameMode == 2) {
if (_parent.CompMode == 1) {
KillsText = "Time Playing: " + _parent.TimePeriod(_parent.Competitive.PlayTime);
TWealthText = "Cash: $" + _parent.Group.Money;
}
if (_parent.CompMode == 2) {
KillsText = "Kills: " + _parent.Competitive.Kills;
TWealthText = "Time Left:" + _parent.TimePeriod(38880 - _parent.Competitive.PlayTime);
}
if (_parent.CompMode == 3) {
KillsText = "Kills: " + _parent.Competitive.Kills;
TWealthText = "Wealth: $" + _parent.CalculateWealth();
}
} else {
KillsText = "";
TWealthText = "";
}
}
function SwitchMedsUse(Shift) {
_parent.MedsUse = _parent.MedsUse + Shift;
if (_parent.MedsUse > 3) {
_parent.MedsUse = 3;
}
if (_parent.MedsUse < 0) {
_parent.MedsUse = 0;
}
MUse.gotoAndStop(_parent.MedsUse + 1);
}
function SwitchAutopay() {
List1.Selected.Autopay = !List1.Selected.Autopay;
List1.OnSelect();
}
function BattleItemsList() {
Rt = new Array();
ch = 0;
while (ch < _parent.Group.Inventory.length) {
if (isNaN(_parent.Group.Inventory[ch].InUse)) {
_parent.Group.Inventory[ch].InUse = 0;
}
if ((_parent.Items[_parent.Group.Inventory[ch].Type].Class <= 6) and (_parent.Group.Inventory[ch].Amount > _parent.Group.Inventory[ch].InUse)) {
Rt.push({Type:_parent.Group.Inventory[ch].Type, Amount:_parent.Group.Inventory[ch].Amount - _parent.Group.Inventory[ch].InUse});
}
ch++;
}
return(Rt);
}
function DisplayItem(Item) {
IWindow.Icon.gotoAndStop(Item.Type);
IWindow.AmountText = "Amount: " + Item.Amount;
IWindow.NameText = _parent.Items[Item.Type].Name;
IWindow.Description = "";
ID = _parent.ItemDescription(Item.Type);
des = 0;
while (des < ID.length) {
IWindow.Description = IWindow.Description + ((((ID[des].Cat + " <b>") + ID[des].Val) + "</b>") + "\r");
des++;
}
}
function GiveSelectedItem(Am) {
switch (_parent.Items[List2.Selected.Type].Class) {
case 1 :
case 4 :
case 5 :
StartPlace = 0;
EndPlace = 1;
break;
case 2 :
StartPlace = 2;
EndPlace = 3;
break;
case 3 :
StartPlace = 4;
EndPlace = 4;
}
switch (_parent.Items[List2.Selected.Type].Class) {
case 1 :
case 3 :
case 5 :
sp = StartPlace;
while (sp <= EndPlace) {
if (List1.Selected.Holding[sp] == 0) {
List1.Selected.Holding[sp] = {Type:List2.Selected.Type, Amount:Am};
break;
}
sp++;
}
break;
case 2 :
case 4 :
Place = Number.NaN;
sp = StartPlace;
while (sp <= EndPlace) {
if (List1.Selected.Holding[sp].Type == List2.Selected.Type) {
Place = sp;
break;
}
sp++;
}
if (!isNaN(Place)) {
List1.Selected.Holding[Place].Amount = List1.Selected.Holding[Place].Amount + Am;
} else {
sp = StartPlace;
for(;;){
if (sp > EndPlace) {
break;
}
if (List1.Selected.Holding[sp] == 0) {
List1.Selected.Holding[sp] = {Type:List2.Selected.Type, Amount:Am};
break;
}
sp++;
};
}
}
_parent.UpdateCarrying(List1.Selected);
ItemIndex = _parent.FindItem(List2.Selected);
_parent.Group.Inventory[ItemIndex].InUse = _parent.Group.Inventory[ItemIndex].InUse + Am;
if (List2.Selected.Amount <= Am) {
List2.SelectedItem = Number.NaN;
}
List2.TheList = BattleItemsList();
List2.SelectItem(List2.SelectedItem);
List1.SelectItem(List1.SelectedItem);
}
function RemoveItem(What, Am) {
PrevSelected = SelectedSlot;
ItemIndex = _parent.FindItem(List1.Selected.Holding[PrevSelected]);
_parent.Group.Inventory[ItemIndex].InUse = _parent.Group.Inventory[ItemIndex].InUse - Am;
if (List1.Selected.Holding[SelectedSlot].Amount <= Am) {
IWindow._visible = false;
List1.Selected.Holding[SelectedSlot] = 0;
DeselectItems();
} else {
List1.Selected.Holding[SelectedSlot].Amount = List1.Selected.Holding[SelectedSlot].Amount - Am;
}
_parent.UpdateCarrying(List1.Selected);
List2.TheList = BattleItemsList();
List2.SetList();
List1.SelectItem(List1.SelectedItem);
if (List1.Selected.Holding[PrevSelected].Amount > 0) {
SelectSlot(PrevSelected);
}
}
function DeselectItems() {
SelectedSlot = Number.NaN;
ds = 0;
while (ds <= 4) {
eval ("SelectBar" + ds)._visible = false;
ds++;
}
}
function SelectSlot(Num) {
List2.SelectItem(Number.NaN);
SelectedSlot = Num;
IWindow._visible = true;
DisplayItem(List1.Selected.Holding[Num]);
IWindow.Arc._visible = true;
if (List1.Selected.Holding[Num].Blocked) {
IWindow.GTButt.gotoAndStop(5);
} else {
IWindow.GTButt.gotoAndStop(2);
}
eval ("SelectBar" + Num)._visible = true;
ds = 0;
while (ds <= 4) {
if (ds != Num) {
eval ("SelectBar" + ds)._visible = false;
}
ds++;
}
}
function ThrowGoods(TheGoods, Am) {
_parent.AllButtons(this, false);
MB._visible = true;
MB.TitleText = "";
MB.MBButtons.gotoAndStop(1);
if ((Am == 1) or (_parent.Goods[TheGoods.Type].Unit != "unit")) {
Ending = "";
} else {
Ending = "s";
}
MB.MessageText = (((((("Are you sure you want to throw away " + Am) + " ") + _parent.Goods[TheGoods.Type].Unit) + Ending) + " of ") + _parent.Goods[TheGoods.Type].Name) + "?";
MB.OnOK = function () {
TheGoods.Amount = TheGoods.Amount - Am;
if (TheGoods.Amount <= 0) {
for (fg in _parent.Group.Cargo) {
if (_parent.Group.Cargo[fg] == TheGoods) {
_parent.Group.Cargo.splice(fg, 1);
break;
}
}
}
L1.SelectItem(L1.SelectedItem);
if (L1.TheList.length == 0) {
L2.SelectItem(0);
} else {
L2.SelectItem(L2.SelectedItem);
}
CheckEmpty();
this._visible = false;
_parent.AllButtons(_parent.SWindow, true);
L1.SetList();
L2.SetList();
_parent.UpdateGroupCargo(_parent.Group);
CargoText = ((("Cargo: " + _parent.Group.CargoWeight) + " / ") + _parent.Group.MaxCargo) + " Kg";
};
}
function ThrowItems(TheItem, Am) {
_parent.AllButtons(this, false);
MB._visible = true;
MB.MBButtons.gotoAndStop(1);
if (Am == 1) {
UT = " unit";
} else {
UT = " units";
}
if ((TheItem.Amount - Am) < TheItem.InUse) {
MB.TitleText = "WARNING!";
OverThrow = TheItem.InUse - (TheItem.Amount - Am);
if (OverThrow == 1) {
ToBe = "is";
} else {
ToBe = "are";
}
MB.MessageText = (((OverThrow + " of the items you are going to throw away ") + ToBe) + " being used by your men.") + "\r";
} else {
MB.TitleText = "";
MB.MessageText = "";
}
if ((_parent.Items[TheItem.Type].Class == 7) and ((_parent.Group.MaxWater - (_parent.Items[TheItem.Type].Capacity * Am)) < _parent.Group.Water)) {
OverWater = _parent.Group.Water - (_parent.Group.MaxWater - (_parent.Items[TheItem.Type].Capacity * Am));
MB.TitleText = "WARNING";
if (Am == 1) {
Ending = "";
} else {
Ending = "s";
}
MB.MessageText = ((((((("If you throw away " + Am) + " ") + _parent.Items[TheItem.Type].Name) + Ending) + ", you will need to pour out ") + OverWater) + " L of water.") + "\r";
}
if ((_parent.Items[TheItem.Type].Class == 8) and ((_parent.Group.MaxFuel - (_parent.Items[TheItem.Type].Capacity * Am)) < _parent.Group.Fuel)) {
OverFuel = _parent.Group.Fuel - (_parent.Group.MaxFuel - (_parent.Items[TheItem.Type].Capacity * Am));
MB.TitleText = "WARNING";
if (Am == 1) {
Ending = "";
} else {
Ending = "s";
}
MB.MessageText = ((((((("If you throw away " + Am) + " ") + _parent.Items[TheItem.Type].Name) + Ending) + ", you will need to pour out ") + OverFuel) + " L of water.") + "\r";
}
if (_parent.Items[TheItem.Type].Class == 10) {
_parent.UpdateGroupParams(_parent.Group);
}
MB.MessageText = MB.MessageText + ((((("Are you sure you want to throw away " + Am) + UT) + " of ") + _parent.Items[TheItem.Type].Name) + "?");
MB.OnOK = function () {
if ((TheItem.Amount - Am) < TheItem.InUse) {
_parent.RemoveItemsInUse(_parent.Group, TheItem.Type, TheItem.InUse - (TheItem.Amount - Am));
}
if ((_parent.Items[TheItem.Type].Class == 7) and ((_parent.Group.MaxWater - (_parent.Items[TheItem.Type].Capacity * Am)) < _parent.Group.Water)) {
_parent.Group.Water = _parent.Group.Water - OverWater;
WaterText = ("Water: " + _parent.Group.Water) + " L";
}
if ((_parent.Items[TheItem.Type].Class == 8) and ((_parent.Group.MaxFuel - (_parent.Items[TheItem.Type].Capacity * Am)) < _parent.Group.Fuel)) {
for (ff in _parent.Group.Cargo) {
if (_parent.Group.Cargo[ff].Type == 9) {
_parent.Group.Cargo[ff].Amount = _parent.Group.Cargo[ff].Amount - OverFuel;
if (_parent.Group.Cargo[ff].Amount <= 0) {
_parent.Group.Cargo.splice(ff, 1);
}
break;
}
}
}
TheItem.Amount = TheItem.Amount - Am;
if (TheItem.Amount <= 0) {
for (fi in _parent.Group.Inventory) {
if (_parent.Group.Inventory[fi] == TheItem) {
_parent.Group.Inventory.splice(fi, 1);
break;
}
}
}
L2.SelectItem(L2.SelectedItem);
if (L2.TheList.length == 0) {
L1.SelectItem(0);
} else {
L1.SelectItem(L1.SelectedItem);
}
CheckEmpty();
this._visible = false;
_parent.AllButtons(_parent.SWindow, true);
L1.SetList();
L2.SetList();
_parent.UpdateGroupCargo(_parent.Group);
CargoText = ((("Cargo: " + _parent.Group.CargoWeight) + " / ") + _parent.Group.MaxCargo) + " Kg";
};
}
function CheckEmpty() {
if ((L1.TheList.length == 0) and (L2.TheList.length == 0)) {
L1.SelectedItem = Number.NaN;
L2.SelectedItem = Number.NaN;
Icon._visible = false;
TitleText = "";
CategoryText = "";
AmountText = "";
r = 1;
while (r <= 6) {
this["Cat" + r] = "";
this["Val" + r] = "";
r++;
}
}
}
stop();
UpdateInfo();
Symbol 4126 MovieClip Frame 2
NumWindow._visible = false;
MB._visible = false;
MB.OnCancel = (NumWindow.OnCancel = function () {
_parent.AllButtons(_parent, true);
List1.SelectItem(List1.SelectedItem);
List2.SelectItem(List2.SelectedItem);
this._visible = false;
});
List1.TheList = _parent.Group.Members;
List1.Class = 1;
List1.Offset = 0;
List1.SelectedItem = 0;
List1.SetList();
List1.OnSelect = function () {
Icon.gotoAndStop(this.Selected.Portrait);
NameText = this.Selected.Name;
PhysicalText = this.Selected.Healthiness;
AgilityText = this.Selected.Agility;
AccuracyText = this.Selected.Accuracy;
IntelligenceText = this.Selected.Intelligence;
if ((!isNaN(this.Selected.AffectHealthiness)) and (this.Selected.AffectHealthiness != 0)) {
PhysicalText = PhysicalText + ((" (" + this.Selected.AffectHealthiness) + ")");
}
if ((!isNaN(this.Selected.AffectAgility)) and (this.Selected.AffectAgility != 0)) {
AgilityText = AgilityText + ((" (" + this.Selected.AffectAgility) + ")");
}
if ((!isNaN(this.Selected.AffectAccuracy)) and (this.Selected.AffectAccuracy != 0)) {
AccuracyText = AccuracyText + ((" (" + this.Selected.AffectAccuracy) + ")");
}
if ((!isNaN(this.Selected.AffectIntelligence)) and (this.Selected.AffectIntelligence != 0)) {
IntelligenceText = IntelligenceText + ((" (" + this.Selected.AffectIntelligence) + ")");
}
APText = this.Selected.MaxAP;
StrengthText = this.Selected.Strength;
SpeedText = this.Selected.WalkSpeed + " Kmh";
CarryingText = (((Math.round(this.Selected.Carrying * 100) / 100) + " / ") + this.Selected.Capacity) + " Kg";
SniperText = this.Selected.Sniper;
DoctorText = this.Selected.Doctor;
VeterinaryText = this.Selected.Veterinary;
MechanicText = this.Selected.Mechanic;
KillsText = this.Selected.Kills;
ExperienceText = Math.round(((((this.Selected.SniperExperience + this.Selected.DoctorExperience) + this.Selected.MechanicExperience) + this.Selected.VeterinaryExperience) + this.Selected.APExperience) + this.Selected.StrengthExperience);
switch (this.Selected.BestIn) {
case 1 :
BestText = "Best sniper";
break;
case 2 :
BestText = "Best Doctor";
break;
case 3 :
BestText = "Best Vet";
break;
case 4 :
BestText = "Best Mechanic";
break;
case 5 :
BestText = "Most Kills";
break;
case 6 :
BestText = "Most Experience";
break;
default :
BestText = "";
}
HealthBar.gotoAndStop(Math.ceil((this.Selected.HP / this.Selected.MaxHP) * 100));
switch (this.Selected.HealthState) {
case 1 :
StateText = "Perfect";
break;
case 2 :
StateText = "Good";
break;
case 3 :
StateText = "Medium";
break;
case 4 :
StateText = "Grave";
}
HealthText = ((((Math.ceil(this.Selected.HP) + " / ") + this.Selected.MaxHP) + " (") + StateText) + ")";
if (this.Selected.Special) {
DButton.gotoAndStop(6);
SalaryText = "";
} else {
if (this.Selected.Status == 0) {
DButton.gotoAndStop(5);
}
if (this.Selected.Status == 1) {
DButton.gotoAndStop(1);
_parent.AllButtons(DButton, true);
if (this.Selected.Autopay) {
DButton.APCheckbox.gotoAndStop(2);
} else {
DButton.APCheckbox.gotoAndStop(1);
}
}
if (this.Selected.Status == 2) {
if (this.Selected.Salary <= _parent.Group.Money) {
DButton.gotoAndStop(2);
} else {
DButton.gotoAndStop(4);
}
}
if (this.Selected.Status == 3) {
DButton.gotoAndStop(3);
}
if (this.Selected.Status == 0) {
SalaryText = "";
}
if (this.Selected.Status == 1) {
SalaryText = (("Salary: $" + this.Selected.Salary) + " Payday: ") + this.Selected.PayDay;
}
if (this.Selected.Status == 2) {
SalaryText = "DISMISSED";
}
if (this.Selected.Status == 3) {
SalaryText = "PAYDAY";
}
}
if (this.Selected.Holding[4] instanceof Object) {
ProtectionText = "Protection: " + _parent.Items[this.Selected.Holding[4].Type].Protection;
} else {
ProtectionText = "Protection: 0";
}
hl = 0;
while (hl <= 5) {
if (this.Selected.Holding[hl] == 0) {
eval ("Item" + hl)._visible = false;
_parent.SWindow["XText" + hl] = "";
eval ("SelButt" + hl).enabled = false;
} else {
eval ("Item" + hl)._visible = true;
eval ("SelButt" + hl).enabled = true;
eval ("Item" + hl).gotoAndStop(this.Selected.Holding[hl].Type);
if (((_parent.Items[this.Selected.Holding[hl].Type].Class == 4) or (_parent.Items[this.Selected.Holding[hl].Type].Class == 2)) and (this.Selected.Holding[hl].Amount > 1)) {
_parent.SWindow["XText" + hl] = "x" + this.Selected.Holding[hl].Amount;
} else {
_parent.SWindow["XText" + hl] = "";
}
}
hl++;
}
DeselectItems();
if (isNaN(List2.SelectedItem)) {
IWindow._visible = false;
} else {
List2.SelectItem(List2.SelectedItem);
}
};
List2.TheList = BattleItemsList();
List2.Class = 3;
List2.Offset = 0;
List2.SelectedItem = Number.NaN;
IWindow._visible = false;
List2.SetList();
List2.OnSelect = function () {
if (!isNaN(this.SelectedItem)) {
IWindow._visible = true;
DisplayItem(this.Selected);
IWindow.Arc._visible = false;
Class = _parent.Items[this.Selected.Type].Class;
Cond1 = ((Class == 1) or (Class == 5)) and ((List1.Selected.Holding[0] == 0) or (List1.Selected.Holding[1] == 0));
Cond2 = (Class == 2) and ((((List1.Selected.Holding[2].Type == this.Selected.Type) or (List1.Selected.Holding[3].Type == this.Selected.Type)) or (List1.Selected.Holding[2] == 0)) or (List1.Selected.Holding[3] == 0));
Cond3 = (Class == 4) and ((((List1.Selected.Holding[0].Type == this.Selected.Type) or (List1.Selected.Holding[1].Type == this.Selected.Type)) or (List1.Selected.Holding[0] == 0)) or (List1.Selected.Holding[1] == 0));
Cond4 = (Class == 3) and (List1.Selected.Holding[4] == 0);
if (((Cond1 or Cond2) or Cond3) or Cond4) {
if (_parent.Items[List2.Selected.Type].Weight <= (List1.Selected.Capacity - List1.Selected.Carrying)) {
IWindow.GTButt.gotoAndStop(1);
} else {
IWindow.GTButt.gotoAndStop(4);
}
} else {
IWindow.GTButt.gotoAndStop(3);
}
} else {
IWindow._visible = false;
}
DeselectItems();
};
Symbol 4126 MovieClip Frame 3
UseIt._visible = false;
MB._visible = false;
RM._visible = false;
MB.OnCancel = (NumWindow.OnCancel = function () {
_parent.AllButtons(_parent.SWindow, true);
L1.SetList();
L2.SetList();
this._visible = false;
});
NumWindow._visible = false;
WaterText = ("Water: " + _parent.Group.Water) + " L";
CargoText = ((("Cargo: " + _parent.Group.CargoWeight) + " / ") + _parent.Group.MaxCargo) + " Kg";
L1.TheList = _parent.Group.Cargo;
L1.Class = 2;
L1.Offset = 0;
L2.TheList = _parent.Group.Inventory;
L2.Class = 3;
L2.Offset = 0;
CurList = 0;
if (L1.TheList.length > 0) {
L1.SelectedItem = 0;
L2.SelectedItem = Number.NaN;
CurList = 1;
} else if (L2.TheList.length > 0) {
L2.SelectedItem = 0;
L1.SelectedItem = Number.NaN;
CurList = 2;
}
L1.OnSelect = function () {
if (CurList == 2) {
L2.SelectItem(Number.NaN);
CurList = 1;
}
Icon._visible = true;
Icon.gotoAndStop(1);
Icon.Inside.gotoAndStop(this.Selected.Type);
if ((_parent.Goods[this.Selected.Type].Unit == "unit") and (this.Selected.Amount != 1)) {
Ending = "s";
} else {
Ending = "";
}
TitleText = _parent.Goods[this.Selected.Type].Name;
AmountText = ((this.Selected.Amount + " ") + _parent.Goods[this.Selected.Type].Unit) + Ending;
ID = new Array();
ID[0] = {Val:"Goods"};
if ((_parent.Goods[this.Selected.Type].Unit != "Kg") and (_parent.Goods[this.Selected.Type].Unit != "g")) {
ID.push({Cat:("Weight per " + _parent.Goods[this.Selected.Type].Unit) + ":", Val:_parent.Goods[this.Selected.Type].WeightPerUnit + " Kg"});
}
ID.push({Cat:"Average price:", Val:(("$" + _parent.Goods[this.Selected.Type].BasicValue) + " per ") + _parent.Goods[this.Selected.Type].Unit});
ini = 0;
while (ini <= 8) {
if (ini < ID.length) {
_parent.SWindow["Cat" + ini] = ID[ini].Cat;
_parent.SWindow["Val" + ini] = ID[ini].Val;
} else {
_parent.SWindow["Cat" + ini] = "";
_parent.SWindow["Val" + ini] = "";
}
ini++;
}
};
L2.OnSelect = function () {
if (CurList == 1) {
L1.SelectItem(Number.NaN);
CurList = 2;
}
Icon._visible = true;
Icon.gotoAndStop(2);
Icon.Inside.gotoAndStop(this.Selected.Type);
TitleText = _parent.Items[this.Selected.Type].Name;
if (this.Selected.Amount == 1) {
UText = " unit";
} else {
UText = " units";
}
AmountText = this.Selected.Amount + UText;
ID = _parent.ItemDescription(this.Selected.Type);
if ((_parent.Items[this.Selected.Type].Class <= 6) and (!isNaN(this.Selected.InUse))) {
ID.push({Cat:"Items in Use:", Val:this.Selected.InUse});
}
st = 0;
while (st <= 8) {
if (st < ID.length) {
_parent.SWindow["Cat" + st] = ID[st].Cat;
_parent.SWindow["Val" + st] = ID[st].Val;
} else {
_parent.SWindow["Cat" + st] = "";
_parent.SWindow["Val" + st] = "";
}
st++;
}
if (_parent.Items[this.Selected.Type].Usable) {
UseIt._visible = true;
} else {
UseIt._visible = false;
}
};
Instance of Symbol 4078 MovieClip "RM" in Symbol 4126 MovieClip Frame 3
onClipEvent (load) {
BB.setMask(ZM);
ZM._x = 300;
ZM._y = 300;
ZT._visible = false;
}
onClipEvent (enterFrame) {
if ((((this._visible and (this._xmouse >= -233)) and (this._xmouse <= 234)) and (this._ymouse >= -163)) and (this._ymouse <= 164)) {
Mouse.hide();
ZT._visible = true;
ZM._x = (ZT._x = this._xmouse);
ZM._y = (ZT._y = this._ymouse);
BB._x = -(_xmouse / 2);
BB._y = -(_ymouse / 2);
} else {
ZM._x = 300;
ZM._y = 300;
ZT._visible = false;
Mouse.show();
}
}
Symbol 4126 MovieClip Frame 4
function GenerateAnimalsList() {
Ret = new Array();
for (tr in _parent.Group.Transport) {
if ((_parent.Transports[_parent.Group.Transport[tr].Type].Class == 1) and _parent.Transports[_parent.Group.Transport[tr].Type].CanHaveCart) {
Ret.push(_parent.Group.Transport[tr]);
}
}
return(Ret);
}
function GenerateCartsList() {
Ret = new Array();
for (tr in _parent.Group.Transport) {
if ((_parent.Transports[_parent.Group.Transport[tr].Type].Class == 2) and (!(_parent.Group.Transport[tr].Attached instanceof Object))) {
Ret.push(_parent.Group.Transport[tr]);
}
}
return(Ret);
}
MB._visible = false;
List1.Offset = (List2.Offset = 0);
List1.Class = (List2.Class = 4);
List1.TheList = GenerateAnimalsList();
List2.TheList = GenerateCartsList();
List1.SelectItem(Number.NaN);
List2.SelectItem(Number.NaN);
Display._visible = false;
CartDisplay._visible = false;
List1.OnSelect = function () {
Display._visible = true;
Display.AnimalIcon.gotoAndStop(this.Selected.Type);
Display.AnimalName = _parent.Transports[this.Selected.Type].Name;
Display.AnimalHealthBar.gotoAndStop(Math.ceil((this.Selected.HP / this.Selected.MaxHP) * 100));
AnID = _parent.TransportDescription(this.Selected);
Display.AnimalParams = "";
Display.CartParams = "";
TotalCapacity = this.Selected.Capacity;
ind = 1;
while (ind < AnID.length) {
if (AnID[ind].Cat.length > 13) {
AnID[ind].Cat = AnID[ind].Cat.substr(0, 10) + ".: ";
}
Display.AnimalParams = Display.AnimalParams + (((AnID[ind].Cat + " ") + AnID[ind].Val) + "\r");
ind++;
}
if (this.Selected.Attached instanceof Object) {
Display.DButton.gotoAndStop(1);
Display.CartIcon.gotoAndStop(1);
Display.CartIcon.Inside.gotoAndStop(this.Selected.Attached.Type);
Display.CartName = _parent.Transports[this.Selected.Attached.Type].Name;
Display.CartHealthBar._visible = true;
Display.CartHealthBar.gotoAndStop(Math.ceil((this.Selected.Attached.HP / this.Selected.Attached.MaxHP) * 100));
CartID = _parent.TransportDescription(this.Selected.Attached);
ind = 1;
while (ind < CartID.length) {
if (CartID[ind].Cat.length > 16) {
CartID[ind].Cat = CartID[ind].Cat.substr(0, 13) + ".: ";
}
Display.CartParams = Display.CartParams + (((CartID[ind].Cat + " ") + CartID[ind].Val) + "\r");
ind++;
}
TotalCapacity = Math.round((this.Selected.Capacity * this.Selected.Attached.CapacityIncrease) - _parent.Transports[this.Selected.Attached.Type].Weight);
if (TotalCapacity > this.Selected.Attached.MaxCapacity) {
TotalCapacity = this.Selected.Attached.MaxCapacity;
}
if (TotalCapacity < 0) {
TotalCapacity = 0;
}
} else {
Display.CartIcon.gotoAndStop(2);
Display.CartName = "";
Display.CartHealthBar._visible = false;
Display.DButton.gotoAndStop(2);
}
Display.TotalCapacityText = ("Total Capacity: " + TotalCapacity) + " Kg";
if (!isNaN(List2.SelectedItem)) {
List2.SelectItem(List2.SelectedItem);
}
};
List2.OnSelect = function () {
CartDisplay._visible = true;
CartDisplay.Icon.gotoAndStop(this.Selected.Type);
CartDisplay.Params = "";
CartPars = _parent.TransportDescription(this.Selected);
CartPars[0] = {Cat:"Name:", Val:_parent.Transports[this.Selected.Type].Name};
CartPars.push({Cat:"Mech. State:", Val:(Math.ceil(this.Selected.HP) + " / ") + this.Selected.MaxHP});
ind = 0;
while (ind < CartPars.length) {
if (CartPars[ind].Cat.length > 16) {
CartPars[ind].Cat = CartPars[ind].Cat.substr(0, 13) + ".: ";
}
CartDisplay.Params = CartDisplay.Params + ((((CartPars[ind].Cat + " <b>") + CartPars[ind].Val) + "</b>") + "\r");
ind++;
}
CartDisplay.HealthBar.gotoAndStop(Math.ceil((this.Selected.HP / this.Selected.MaxHP) * 100));
if (isNaN(List1.SelectedItem)) {
CartDisplay.Butt.gotoAndStop(2);
} else if (_parent.Transports[List1.Selected.Type].CanHaveCart) {
CartDisplay.Butt.gotoAndStop(1);
} else {
CartDisplay.Butt.gotoAndStop(3);
}
};
Symbol 4126 MovieClip Frame 5
function LeaveSelectedTransport() {
if (Lst.Selected.Attached instanceof Object) {
Lst.Selected.Attached.Attached = Number.NaN;
Lst.Selected.Attached = Number.NaN;
}
_parent.AllButtons(this, false);
MB.TitleText = "";
if ((_parent.Transports[Lst.Selected.Type].Class == 3) and (_parent.Group.Fuel > (_parent.Group.MaxFuel - _parent.Transports[Lst.Selected.Type].FuelTank))) {
MB.MessageText = (("If you leave this Car, you will need to leave it with " + _parent.NumberFormat((_parent.Group.Fuel - _parent.Group.MaxFuel) + _parent.Transports[Lst.Selected.Type].FuelTank, 2)) + " L of fuel due to lack of fuel containers.") + "\r";
} else {
MB.MessageText = "";
}
MB.MessageText = MB.MessageText + (("Are you sure you want to leave " + _parent.Transports[Lst.Selected.Type].Name) + "?");
MB.MBButtons.gotoAndStop(1);
MB._visible = true;
MB.OnOK = function () {
_parent.AllButtons(_parent.SWindow, true);
for (st in _parent.Group.Transport) {
if (_parent.Group.Transport[st] == Lst.Selected) {
_parent.Group.Transport.splice(st, 1);
break;
}
}
if ((_parent.Transports[Lst.Selected.Type].Class == 3) and (_parent.Group.Fuel > (_parent.Group.MaxFuel - _parent.Transports[Lst.Selected.Type].FuelTank))) {
for (ff in _parent.Group.Cargo) {
if (_parent.Group.Cargo[ff].Type == 9) {
_parent.Group.Cargo[ff].Amount = _parent.Group.MaxFuel - _parent.Transports[Lst.Selected.Type].FuelTank;
if (_parent.Group.Cargo[ff].Amount <= 0) {
_parent.Group.Cargo.splice(ff, 1);
}
break;
}
}
_parent.UpdateGroupCargo(_parent.Group);
}
Lst.SelectItem(Number.NaN);
Display._visible = false;
this._visible = false;
_parent.UpdateGroupParams(_parent.Group);
};
}
MB._visible = false;
MB.OnCancel = function () {
_parent.AllButtons(_parent.SWindow, true);
this._visible = false;
};
Lst.TheList = _parent.Group.Transport;
Lst.Offset = 0;
Lst.Class = 4;
Lst.SelectItem(Number.NaN);
Display._visible = false;
Lst.OnSelect = function () {
Display._visible = true;
Display.Icon.gotoAndStop(this.Selected.Type);
Display.NameText = _parent.Transports[this.Selected.Type].Name;
if (_parent.Transports[this.Selected.Type].Class == 1) {
Display.HealthText = "Health: ";
} else {
Display.HealthText = "Mechanical State: ";
}
Display.HealthText = Display.HealthText + ((Math.ceil(this.Selected.HP) + " / ") + this.Selected.MaxHP);
Display.HealthBar.gotoAndStop(Math.ceil((this.Selected.HP / this.Selected.MaxHP) * 100));
ID = _parent.TransportDescription(this.Selected);
if ((_parent.Transports[this.Selected.Type].Class == 1) and _parent.Transports[this.Selected.Type].CanHaveCart) {
ID.push({Cat:"Has Cart:"});
}
if (_parent.Transports[this.Selected.Type].Class == 2) {
ID.push({Cat:"Attached to an Animal:"});
}
if (((_parent.Transports[this.Selected.Type].Class == 1) and _parent.Transports[this.Selected.Type].CanHaveCart) or (_parent.Transports[this.Selected.Type].Class == 2)) {
if (this.Selected.Attached instanceof Object) {
ID[ID.length - 1].Val = "Yes";
} else {
ID[ID.length - 1].Val = "No";
}
}
i = 0;
while (i <= 6) {
if (i < ID.length) {
Display["Cat" + i] = ID[i].Cat;
Display["Val" + i] = ID[i].Val;
} else {
Display["Cat" + i] = "";
Display["Val" + i] = "";
}
i++;
}
};
Symbol 4133 Button
on (rollOver) {
_parent.MoveScreen = 4;
_parent.MSSpeed = _parent.MSSpeed1;
}
on (press) {
_parent.MSSpeed = _parent.MSSpeed2;
}
on (release) {
_parent.MSSpeed = _parent.MSSpeed1;
}
on (rollOut, releaseOutside) {
_parent.MoveScreen = 0;
_parent.MSSpeed = _parent.MSSpeed1;
}
Symbol 4134 Button
on (rollOver) {
_parent.MoveScreen = 2;
_parent.MSSpeed = _parent.MSSpeed1;
}
on (press) {
_parent.MSSpeed = _parent.MSSpeed2;
}
on (release) {
_parent.MSSpeed = _parent.MSSpeed1;
}
on (rollOut, releaseOutside) {
_parent.MoveScreen = 0;
_parent.MSSpeed = _parent.MSSpeed1;
}
Symbol 4135 Button
on (rollOver) {
_parent.MoveScreen = 1;
_parent.MSSpeed = _parent.MSSpeed1;
}
on (press) {
_parent.MSSpeed = _parent.MSSpeed2;
}
on (release) {
_parent.MSSpeed = _parent.MSSpeed1;
}
on (rollOut, releaseOutside) {
_parent.MoveScreen = 0;
_parent.MSSpeed = _parent.MSSpeed1;
}
Symbol 4136 Button
on (rollOver) {
_parent.MoveScreen = 3;
_parent.MSSpeed = _parent.MSSpeed1;
}
on (press) {
_parent.MSSpeed = _parent.MSSpeed2;
}
on (release) {
_parent.MSSpeed = _parent.MSSpeed1;
}
on (rollOut, releaseOutside) {
_parent.MoveScreen = 0;
_parent.MSSpeed = _parent.MSSpeed1;
}
Symbol 4140 MovieClip Frame 1
stop();
Inside.TheText = "";
Instance of Symbol 126 MovieClip "CBox" in Symbol 4148 MovieClip Frame 1
on (press) {
if (_currentframe == 1) {
gotoAndStop (2);
_parent._parent._parent.Trophies[_parent.Index].Selected = true;
} else {
gotoAndStop (1);
_parent._parent._parent.Trophies[_parent.Index].Selected = false;
}
_parent._parent.UpdateTotalWeight();
}
Symbol 4149 Button
on (press) {
Offset = Offset - 10;
UpdateTrophies();
}
Symbol 4150 Button
on (press) {
Offset = Offset + 10;
UpdateTrophies();
}
Symbol 4151 Button
on (press) {
for (ind in _parent.Trophies) {
_parent.Trophies[ind].Selected = true;
}
UpdateTrophies();
UpdateTotalWeight();
}
Symbol 4152 Button
on (press) {
for (ind in _parent.Trophies) {
_parent.Trophies[ind].Selected = false;
}
UpdateTrophies();
UpdateTotalWeight();
}
Symbol 4157 MovieClip Frame 1
function UpdateTrophies() {
if (Offset > 0) {
ButtCover1._visible = false;
Butt1.enabled = true;
} else {
ButtCover1._visible = true;
Butt1.enabled = false;
}
if ((Offset + 10) < _parent.Trophies.length) {
ButtCover2._visible = false;
Butt2.enabled = true;
} else {
ButtCover2._visible = true;
Butt2.enabled = false;
}
ct = Offset;
while (ct < (Offset + 10)) {
ItemNum = (ct - Offset) + 1;
this["Item" + ItemNum].Index = ct;
if (ct < _parent.Trophies.length) {
this["Item" + ItemNum]._visible = true;
TheTrophy = _parent.Trophies[ct];
if (TheTrophy.Class == 1) {
if (TheTrophy.Amount == 1) {
TrophyAmount = TheTrophy.Amount + " unit";
} else {
TrophyAmount = TheTrophy.Amount + " units";
}
TrophyName = _parent.Items[TheTrophy.Type].Name;
}
if (TheTrophy.Class == 2) {
if ((_parent.Goods[TheTrophy.Type].Unit == "unit") and (TheTrophy.Amount > 1)) {
Ending = "s";
} else {
Ending = "";
}
TrophyAmount = ((TheTrophy.Amount + " ") + _parent.Goods[TheTrophy.Type].Unit) + Ending;
TrophyName = _parent.Goods[TheTrophy.Type].Name;
}
if (TheTrophy.Class == 3) {
TrophyName = _parent.Transports[TheTrophy.Type].Name;
if (_parent.Transports[TheTrophy.Type].Class == 1) {
HName = "Health: ";
} else {
HName = "Mech. State: ";
}
TrophyAmount = ((HName + TheTrophy.HP) + " / ") + _parent.Transports[TheTrophy.Type].MaxHP;
}
if (TheTrophy.Class == 4) {
TrophyName = "Money";
TrophyAmount = "$" + TheTrophy.Amount;
}
if (TheTrophy.Class == 5) {
TrophyName = "Water";
TrophyAmount = TheTrophy.Amount + " L";
}
this["Item" + ItemNum].NameText = TrophyName;
this["Item" + ItemNum].AmountText = TrophyAmount;
this["Item" + ItemNum].Icon.gotoAndStop(_parent.Trophies[ct].Class);
this["Item" + ItemNum].Icon.Inside.gotoAndStop(_parent.Trophies[ct].Type);
if (_parent.Trophies[ct].Selected) {
this["Item" + ItemNum].CBox.gotoAndStop(2);
} else {
this["Item" + ItemNum].CBox.gotoAndStop(1);
}
} else {
this["Item" + ItemNum]._visible = false;
}
ct++;
}
}
function UpdateTotalWeight() {
TW = 0;
for (ind in _parent.Trophies) {
if (_parent.Trophies[ind].Selected) {
TW = TW + _parent.Trophies[ind].Weight;
}
}
TotalWeight = ("Total Weight: " + TW) + " Kg";
}
Symbol 4181 Button
on (press) {
_parent.SwitchMode(4);
}
Symbol 4183 Button
on (press) {
_parent.SwitchMode(2);
}
Symbol 4186 Button
on (press) {
_parent.SwitchMode(9);
}
Symbol 4189 Button
on (press) {
_parent.SwitchMode(_parent.OldMode);
}
Symbol 4194 Button
on (press) {
_parent.TMenu.gotoAndStop(10);
SelectButton(10);
}
Symbol 4196 Button
on (press) {
_parent.TMenu.gotoAndStop(3);
SelectButton(3);
}
Symbol 4198 Button
on (press) {
_parent.TMenu.gotoAndStop(4);
SelectButton(4);
}
Symbol 4200 Button
on (press) {
_parent.TMenu.gotoAndStop(1);
SelectButton(1);
}
Symbol 4205 Button
on (press) {
_parent.ExitTown();
}
Symbol 4209 Button
on (press) {
_parent.SWindow.gotoAndStop(3);
SelectButton(3);
}
Symbol 4210 Button
on (press) {
_parent.SWindow.gotoAndStop(4);
SelectButton(4);
}
Symbol 4211 Button
on (press) {
if ((_parent.OldMode == 1) or (_parent.OldMode == 5)) {
Cancel = new Array();
Cancel[2] = _parent.Group.CargoWeight <= _parent.Group.MaxCargo;
Cancel[5] = _parent.Group.Carts <= _parent.Group.Animals;
Cancel[6] = _parent.Group.Members.length >= _parent.Group.Cars;
Cancel[7] = (_parent.Group.FuelUse <= 0) or (_parent.Group.Fuel > 0);
for (cm in _parent.Messages) {
if (Cancel[_parent.Messages[cm].Type]) {
_parent.Messages.splice(cm, 1);
}
}
}
_parent.SwitchMode(_parent.OldMode);
}
Symbol 4213 Button
on (press) {
_parent.SWindow.gotoAndStop(2);
SelectButton(2);
}
Symbol 4214 Button
on (press) {
_parent.SWindow.gotoAndStop(1);
SelectButton(1);
}
Symbol 4216 Button
on (press) {
_parent.SWindow.gotoAndStop(5);
SelectButton(5);
}
Symbol 4223 Button
on (press) {
_parent.TSL = {x:245 - (_parent.ActChar.BSquare.x * 40), y:245 - (_parent.ActChar.BSquare.y * 40)};
_parent.Centralizing = true;
}
Symbol 4224 Button
on (rollOver) {
MoveMenu = 1;
MNU.gotoAndStop(1);
}
on (press) {
MoveMenu = 2;
}
Symbol 4247 Button
on (press) {
_parent._parent.SwitchWpnMode();
}
on (rollOver) {
Switch._visible = true;
}
on (rollOut, releaseOutside) {
Switch._visible = false;
}
Symbol 4248 Button
on (press) {
_parent._parent.ActPhase = 10;
}
Symbol 4250 Button
on (press) {
_parent._parent.SwapWpn();
}
on (rollOver) {
Change._visible = true;
}
on (rollOut, releaseOutside) {
Change._visible = false;
}
Symbol 4251 Button
on (rollOver) {
_parent.Reload._visible = true;
}
on (rollOut, releaseOutside) {
_parent.Reload._visible = false;
}
on (press) {
_parent._parent._parent.Reload();
}
Symbol 4261 Button
on (press) {
_parent._parent._parent.ForceThrow = !_parent._parent._parent.ForceThrow;
}
Symbol 4266 MovieClip Frame 3
Change._visible = false;
Switch._visible = false;
Reload._visible = false;
Instance of Symbol 4253 MovieClip "RButt" in Symbol 4266 MovieClip Frame 3
onClipEvent (enterFrame) {
if (!this._visible) {
Reload._visible = false;
}
}
Instance of Symbol 4262 MovieClip "ForceThrow" in Symbol 4266 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_parent._parent._parent.ForceThrow) {
CB.gotoAndStop(2);
} else {
CB.gotoAndStop(1);
}
}
Symbol 4270 Button
on (press) {
if (_root.BattleSpeed < 4) {
_root.BattleSpeed++;
if (_root.BattleSpeed == 3) {
_root.BattleSpeed = 4;
}
}
}
Symbol 4271 Button
on (press) {
if (_root.BattleSpeed > 1) {
_root.BattleSpeed--;
if (_root.BattleSpeed == 3) {
_root.BattleSpeed = 2;
}
}
}
Symbol 4272 Button
on (press) {
gotoAndStop (2);
}
Symbol 4275 Button
on (press) {
_root.gotoAndStop("Main Menu");
}
Symbol 4276 Button
on (press) {
gotoAndStop (1);
}
Symbol 4277 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
BSInd.gotoAndStop(_root.BattleSpeed);
if (_root.FXOn) {
SFXCB.gotoAndStop(2);
} else {
SFXCB.gotoAndStop(1);
}
if (_parent.MoveMenu == 1) {
if (this._y > -81.5) {
this._y = this._y - 20;
} else {
_parent.MoveMenu = 2;
}
}
if (_parent.MoveMenu == 2) {
this._y = -81.5;
if ((_parent._xmouse > 159) or (_parent._ymouse < -157)) {
_parent.MoveMenu = -1;
}
_root.MenuOut = true;
} else {
_root.MenuOut = false;
}
if (_parent.MoveMenu == -1) {
if (this._y < 78.5) {
this._y = this._y + 20;
} else {
this._y = 78.5;
}
}
};
Instance of Symbol 126 MovieClip "SFXCB" in Symbol 4277 MovieClip Frame 1
on (press) {
_root.FXOn = !_root.FXOn;
}
Symbol 4278 Button
on (press) {
_parent.ExitBattle();
}
Symbol 4280 Button
on (press) {
_parent.TMenu.gotoAndStop(1);
gotoAndStop (3);
}
Symbol 4282 MovieClip Frame 3
if (_parent.TMenu._currentframe == 2) {
SelectButton(1);
} else {
SelectButton(_parent.TMenu._currentframe);
}
Symbol 4282 MovieClip Frame 4
SelectButton(_parent.SWindow._currentframe);
Instance of Symbol 4208 MovieClip in Symbol 4282 MovieClip Frame 4
onClipEvent (enterFrame) {
MoneyText = "Money: $" + _parent._parent.Group.Money;
CargoText = ((("Cargo: " + _parent._parent.Group.CargoWeight) + " / ") + _parent._parent.Group.MaxCargo) + " Kg";
}
Symbol 4282 MovieClip Frame 5
MNU._y = 78.5;
MoveMenu = 0;
MNU.gotoAndStop(1);
Symbol 4286 Button
on (press) {
_parent.SwitchMode(1);
}
Symbol 4288 Button
on (press) {
_parent.gotoAndStop("Main Menu");
}
Symbol 4301 Button
on (press) {
if (((GameMode == 2) and ((CompMode == 2) or (CompMode == 3))) and (!BlockSend)) {
gotoAndStop ("Submit Score");
} else {
gotoAndStop ("Main Menu");
}
}
Symbol 4302 Button
on (press) {
gotoAndStop ("Submit 2");
}
Symbol 4303 Button
on (press) {
gotoAndStop ("Main Menu");
}
Symbol 4311 Button
on (press) {
gotoAndStop ("Submit Score");
}
Symbol 4331 Button
on (press) {
ScOffset = ScOffset + 15;
UpdateScore();
}
Symbol 4332 Button
on (press) {
ScOffset = ScOffset - 15;
UpdateScore();
}
Symbol 4333 Button
on (press) {
_parent.SetSurvMode(b1Mode);
_parent.ScOffset = _parent.FindYourPos() - 7;
_parent.UpdateScore();
}
Symbol 4334 Button
on (press) {
_parent.SetSurvMode(b2Mode);
_parent.ScOffset = _parent.FindYourPos() - 7;
_parent.UpdateScore();
}