STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228136
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5122

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/79488069?noj=FRM79488069-17DC" width="1" height="1"></div>

Project Wasteland 0 - turn-based RPG game.swf

This is the info page for
Flash #89386

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 3 { } movieClip 4 adcore { frame 1 { if (_root.blockthebanners != 1) { var adBox = adshell.createEmptyMovieClip('adBox', 1); adshell.adBox._x = 1; adshell.adBox._y = 0; var CPMStarContentSpotID = '3252Q25401FE3'; System.security.allowDomain('server.cpmstar.com'); adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + CPMStarContentSpotID); } } } // unknown tag 88 length 73 movieClip 8 { } movieClip 10 { } movieClip 11 { } movieClip 13 { } movieClip 15 { } movieClip 16 { instance of movieClip 8 { onClipEvent (load) { this._visible = false; } } } movieClip 17 show_quality { frame 2 { if (play_ eq 1) { gotoAndPlay(3); } else { gotoAndPlay(1); } } instance of movieClip 16 { onClipEvent (enterFrame) { if (_root.global_quality eq 1) { gotoAndStop(2); } else { if (_root.global_quality eq 2) { gotoAndStop(3); } else { if (_root.global_quality eq 3) { gotoAndStop(4); } else { if (_root.global_quality eq 4) { gotoAndStop(5); } } } } } } frame 4 { if (play_ eq 1) { gotoAndPlay(3); } else { gotoAndPlay(1); } } } movieClip 20 background_up_14 { } frame 1 { _root.music_on = 1; urla = _url; gtfomycode_bitch_FUCKOFFSRSLY_DONTSTEALMYGAME = 'armorgames.com'; if (urla.indexOf(gtfomycode_bitch_FUCKOFFSRSLY_DONTSTEALMYGAME) != -1) { thisiarmor = 1; } else { thisiarmor = 0; } } frame 1 { if (_root.global_quality) { } else { _root.global_quality = 3; } _root.attachMovie('show_quality', 'show_quality', 99999); _root.show_quality._x = -172; _root.show_quality._y = 60; } frame 1 { stop(); _root.percentage_loaded_rough = 0; gameloaded = 0; Mouse.show(); onEnterFrame = function () { loading = _root.getBytesLoaded() / _root.getBytesTotal(); _root.percentage_loaded_rough = loading * 100; if (_root.percentage_loaded_rough > 99.90000000000001) { _root.percentage_loaded_rough = 100; } gogogo = 1 + Math.floor(_root.percentage_loaded_rough / 2.38); loader.loadingbar.gotoAndStop(gogogo); loader.percent = Math.floor(_root.percentage_loaded_rough) + '%'; game_real_size = 10403840; loader.current_bytes = Math.floor(loading * game_real_size); loader.total_bytes = game_real_size; if (gameloaded eq 0 and _root.percentage_loaded_rough >= 100) { gameloaded = 1; loader.play(); } }; } movieClip 21 { } movieClip 22 { frame 1 { var suka2 = adshell.createEmptyMovieClip('suka1', 2000); ramka.swapDepths(suka2); removeMovieClip(suka2); trace(_root.thisiarmor); if (_root.thisiarmor != 1) { this.attachMovie('adcore', 'adcore', 1); adcore._x = 0; adcore._y = 0; } } instance ramka of movieClip 21 { onClipEvent (load) { _visible = false; } } } movieClip 24 { } movieClip 25 { } movieClip 29 { } movieClip 32 { } movieClip 33 { } movieClip 35 { instance of movieClip 33 { onClipEvent (load) { if (_root.thisiarmor eq 1) { _visible = true; } else { _visible = false; } } } } movieClip 41 { } movieClip 44 { } movieClip 53 { } movieClip 54 { } movieClip 55 { } movieClip 56 { } button 60 { on (release) { _root.blockthebanners = 1; _root.gotoAndPlay(3); } } movieClip 61 { frame 1 { stop(); } frame 3 { stop(); } } movieClip 64 { } button 65 { on (release) { getURL('http://dz2001.newgrounds.com/', '_blank'); } } movieClip 68 { } button 70 { on (release) { getURL('http://requie.deviantart.com/', '_blank'); } } movieClip 72 { } movieClip 74 { } movieClip 75 { } button 77 { on (release) { getURL('http://www.armorgames.com/', '_blank'); } } // unknown tag 88 length 64 // unknown tag 88 length 69 button 87 { on (release) { gotoAndStop(2); } } button 90 { on (release) { gotoAndStop(1); } } movieClip 91 { frame 1 { stop(); } } movieClip 94 { } movieClip 95 { } movieClip 97 { frame 2 { if (_root.global_quality eq 1) { _root._quality = 'low'; } else { if (_root.global_quality eq 2) { _root._quality = 'medium'; } else { if (_root.global_quality eq 3) { _root._quality = 'high'; } else { if (_root.global_quality eq 4) { _root._quality = 'best'; } } } } } } button 100 { on (keyPress 'Q') { gotoAndPlay(2); if (_root.global_quality < 4) { _root.global_quality += 1; } else { if (_root.global_quality eq 4) { _root.global_quality = 1; } } } on (keyPress 'q') { gotoAndPlay(2); if (_root.global_quality < 4) { _root.global_quality += 1; } else { if (_root.global_quality eq 4) { _root.global_quality = 1; } } } } movieClip 101 { frame 1 { stop(); } frame 2 { _root.show_quality.play_ = 1; } frame 35 { _root.show_quality.play_ = 0; } } movieClip 102 { frame 1 { stop(); } } movieClip 2490 __Packages.Astar { #initclip if (!_global.Astar) { var v1 = function (_map) { this.map = _map; }; _global.Astar = v1; var v2 = v1.prototype; v2.isOpen = function (y, x) { return this.mapStatus[y][x].open; }; v2.isClosed = function (y, x) { return this.mapStatus[y][x].closed; }; v2.nearerSquare = function () { var v5 = 999999; var v6 = 0; var v3; var v4; var v2 = this.openList.length; while (v2-- > 0) { v4 = this.mapStatus[this.openList[v2][0]][this.openList[v2][1]]; v3 = v4.heuristic + v4.movementCost; if (v3 <= v5) { v5 = v3; v6 = v2; } } return v6; }; v2.closeSquare = function (y, x) { var v3 = this.openList.length; var v2 = 0; while (v2 < v3) { if (this.openList[v2][0] == y) { if (this.openList[v2][1] == x) { this.openList.splice(v2, 1); break; } } ++v2; } this.mapStatus[y][x].open = false; this.mapStatus[y][x].closed = true; }; v2.openSquare = function (y, x, parent, movementCost, heuristic, replacing) { if (!replacing) { this.openList.push([y, x]); this.mapStatus[y][x] = {'heuristic': heuristic, 'open': true, 'closed': false}; } this.mapStatus[y][x].parent = parent; this.mapStatus[y][x].movementCost = movementCost; }; v2.findPath = function (startX, startY, endX, endY) { this.startFind = ((new Date()).getTime()).valueOf(); if (startY == undefined || startX == undefined) { return null; } if (endY == undefined || endX == undefined) { return null; } if (this.map[startY][startX] == 0 || this.map[endY][endX] == 0) { this.log = 'Closed start/end point: ' + this.map[startY][startX] + ',' + this.map[endY][endX]; return null; } this.mapH = this.map.length; this.mapW = this.map[1].length; this.mapStatus = []; var v8 = 0; while (v8 < this.mapH) { this.mapStatus[v8] = []; var v3 = 0; while (v3 < this.mapW) { this.mapStatus[v8][v3] = {}; ++v3; } ++v8; } this.openList = new Array(); this.openSquare(startY, startX, undefined, 0); for (;;) { if (!(this.openList.length > 0 && !this.isClosed(endY, endX))) break; v8 = this.nearerSquare(); var v6 = this.openList[v8][0] / 1; var v7 = this.openList[v8][1] / 1; this.closeSquare(v6, v7); v3 = v6 - 1; while (v3 < v6 + 2) { var v2 = v7 - 1; while (v2 < v7 + 2) { if (v3 >= 0 && v3 < this.mapH && v2 >= 0 && v2 < this.mapW && this.map[v3][v2] != 0) { if (!this.isClosed(v3, v2)) { var v4 = this.mapStatus[v6][v7].movementCost + ((v3 == v6 || v2 == v7) ? this.HV_COST : this.D_COST) * this.map[v3][v2]; if (this.isOpen(v3, v2)) { if (v4 < this.mapStatus[v3][v2].movementCost) { this.openSquare(v3, v2, [v6, v7], v4, undefined, true); } } else { var v5 = (Math.abs(v3 - endY) + Math.abs(v2 - endX)) * 10; this.openSquare(v3, v2, [v6, v7], v4, v5, false); } } else {} } ++v2; } ++v3; } } var v18 = this.isClosed(endY, endX); if (v18) { var v11 = []; v6 = endY; v7 = endX; var v14 = this.mapStatus[v6][v7].movementCost; for (;;) { if (!(v6 != startY || v7 != startX)) break; v11.push([v7, v6, v14]); var v12 = this.mapStatus[v6][v7].parent[0]; var v13 = this.mapStatus[v6][v7].parent[1]; v6 = v12; v7 = v13; v14 = this.mapStatus[v6][v7].movementCost; } v11.push([startX, startY, 0]); var v17 = []; v8 = v11.length - 1; while (v8 > -1) { v17.push(v11[v8]); --v8; } this.stopFind = ((new Date()).getTime()).valueOf(); this.log = 'finding time:' + (this.stopFind - this.startFind) + '\npath:' + v17.join('|'); return v17; } else { this.log = 'Ended with 0 open squares; ran out of squares, path NOT found'; return null; } }; v2.HV_COST = 10; v2.D_COST = 14; v2.log = ''; ASSetPropFlags(_global.Astar.prototype, null, 1); } #endinitclip } frame 2 { gotoAndStop(1); } // unknown tag 88 length 65 movieClip 105 { frame 11 { _root.Mouse.hide(); } } frame 3 { function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; var pv; mb = '__mochibot__'; mbc = 'mochibot.com'; g = _global ? _global : _level0._root; if (g[mb + swfid]) { return g[mb + swfid]; } s = System.security; x = mc._root.getSWFVersion; fv = x ? mc.getSWFVersion() : (_global ? 6 : 5); if (!s) { s = {}; } sb = s.sandboxType; if (sb == 'localWithFile') { return null; } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } pv = (fv == 5) ? /:$version : System.capabilities.version; u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : ''); lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv); g[mb + 'level'] = lv; if (fv == 5) { res = '_level' + lv; if (!eval(res)) { loadMovieNum(u, lv); } return res; } res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); return res; } if (thisisnotthefirsttime != 1) { thisisnotthefirsttime = 1; __com_mochibot__('5da75e28', this, 10301, true); gotoAndStop(60); } stop(); _root.start_new_character = 0; _root.we_are_returning_from_playing = 0; } movieClip 109 { } movieClip 111 { } movieClip 113 { } movieClip 116 { } button 119 { on (release) { getURL('http://armorgames.com/', '_blank'); } } movieClip 121 { } movieClip 122 { } movieClip 123 { } movieClip 124 { frame 9 { stop(); } frame 9 { stop(); } } button 127 { on (release) { _root.themenu.credits._visible = false; _root.startgame_menu._visible = true; } } movieClip 129 { } button 131 { on (release) { _root.themenu.credits._visible = true; _root.themenu.credits.gotoAndStop(1); _root.startgame_menu._visible = false; } } movieClip 133 { } button 135 { on (release) { getURL('http://armorgames.com/', '_blank'); } } movieClip 136 { frame 24 { stop(); } } movieClip 142 { } // unknown tag 88 length 50 movieClip 145 { } movieClip 147 { } movieClip 149 { } // unknown tag 88 length 50 button 156 { on (release) { getURL('http://justaman78.deviantart.com/', '_blank'); } } movieClip 158 { } button 160 { on (release) { _visible = false; } } button 162 { on (release) { getURL('http://hades.newgrounds.com/audio/', '_blank'); } } button 164 { on (release) { getURL('http://furnation.ru/user/starwinter/', '_blank'); } } button 167 { on (release) { getURL('http://www.furaffinity.net/view/4585268/', '_blank'); } } movieClip 172 { } button 174 { on (release) { _visible = false; } } movieClip 176 { } button 178 { on (release) { if (!a) { a = 1; } else { ++a; } trace(a); if (a > 30) { gotoAndStop(2); } } } movieClip 188 { } // unknown tag 88 length 4 movieClip 194 { } button 198 { on (release) { nextFrame(); } } button 221 { on (release) { gotoAndStop(2); } } movieClip 222 { frame 1 { stop(); } } movieClip 223 { instance credits of movieClip 222 { onClipEvent (load) { _visible = false; } } } movieClip 227 { } movieClip 230 { } button 234 { on (release) { if (doload eq 1) { _root.start_new_character = 0; _root.do_load = 1; } else { _root.start_new_character = 1; _root.do_load = 0; } _root.playingSlot = slot_id; _root.gotoAndStop(5); } } movieClip 237 { } button 248 { on (release) { gotoAndStop(3); } } button 253 { on (release) { doload = 0; saveslot77777 = SharedObject.getLocal('AW0_saveslot_' + slot_id); varlocation7777777 = this.saveslot77777.data; varlocation7777777.save_exists = 'FUCK YOU'; _root.startgame_menu.slotsInitiation(); saveslot000 = SharedObject.getLocal('AW0_saveslot_' + slot_id); varlocation1111 = this.saveslot000.data; varlocation1111.timeSpentPreviously = 0; } } button 257 { on (release) { gotoAndStop(2); } } movieClip 258 { } movieClip 261 { } movieClip 262 { frame 1 { function slotsInitiation() { slotPannel_1.slot_id = 1; slotPannel_2.slot_id = 2; slotPannel_3.slot_id = 3; saveslot000 = SharedObject.getLocal('AW0_saveslot_1'); saveslot001 = SharedObject.getLocal('AW0_saveslot_2'); saveslot002 = SharedObject.getLocal('AW0_saveslot_3'); varlocation1 = this.saveslot000.data; varlocation2 = this.saveslot001.data; varlocation3 = this.saveslot002.data; if (varlocation1.save_exists eq 1) { slotPannel_1.gotoAndStop(2); slotPannel_1.doload = 1; } else { slotPannel_1.gotoAndStop(1); } if (varlocation2.save_exists eq 1) { slotPannel_2.gotoAndStop(2); slotPannel_2.doload = 1; } else { slotPannel_2.gotoAndStop(1); } if (varlocation3.save_exists eq 1) { slotPannel_3.gotoAndStop(2); slotPannel_3.doload = 1; } else { slotPannel_3.gotoAndStop(1); } i = 1; while (i < 4) { temptime1 = this['varlocation' + i].timeSpentPreviously; timevar_hours = Math.floor(temptime1 / 1000 / 3600); timevar_minutes = Math.floor(temptime1 / 1000 / 60 - timevar_hours * 60); timevar_seconds = Math.floor(temptime1 / 1000 - timevar_hours * 3600 - timevar_minutes * 60); if (timevar_hours < 10) { timevar_hours = '0' + timevar_hours; } if (timevar_minutes < 10) { timevar_minutes = '0' + timevar_minutes; } if (timevar_seconds < 10) { timevar_seconds = '0' + timevar_seconds; } show_playtime1 = timevar_hours + ':' + timevar_minutes + ':' + timevar_seconds; this['slotPannel_' + i].show_playtime = 'Play time: ' + show_playtime1; this['slotPannel_' + i].show_kills = 'Enemies killed: N/A (yet)'; this['slotPannel_' + i].show_cash = 'Cash: N/A (yet)'; character_ar1r = this['varlocation' + i].character_arr; str_id = 101; per_id = 102; end_id = 103; cha_id = 104; int_id = 105; agi_id = 106; luk_id = 107; show_str = character_ar1r[str_id]; show_per = character_ar1r[per_id]; show_agi = character_ar1r[agi_id]; show_end = character_ar1r[end_id]; show_luck = character_ar1r[luk_id]; show_int = character_ar1r[int_id]; show_cha = character_ar1r[cha_id]; this['slotPannel_' + i].show_stat1 = 'STR: ' + show_str + ' PER: ' + show_per + ' AGI: ' + show_agi + ' END: ' + show_end; this['slotPannel_' + i].show_stat2 = 'LUK: ' + show_luck + ' INT: ' + show_int + ' CHA: ' + show_cha; ++i; } } stop(); slotsInitiation(); } } instance startgame_menu of movieClip 262 { onClipEvent (load) { _visible = false; } } frame 4 { prevFrame(); } movieClip 267 { } movieClip 269 { } movieClip 271 { } button 273 { on (release) { _root.loadmap_id = 2; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 1; } on (rollOut, dragOut) { _root.describemap = 0; } } button 274 { on (release) { _root.loadmap_id = 11; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 2; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 276 { frame 1 { stop(); } instance of movieClip 269 { onClipEvent (load) { _visible = false; } } instance of movieClip 271 { onClipEvent (load) { _visible = false; } } } button 277 { on (release) { _root.loadmap_id = 12; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 3; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 279 { frame 1 { stop(); } instance of movieClip 269 { onClipEvent (load) { _visible = false; } } instance of movieClip 271 { onClipEvent (load) { _visible = false; } } } button 280 { on (release) { _root.loadmap_id = 13; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 4; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 282 { frame 1 { stop(); } instance of movieClip 269 { onClipEvent (load) { _visible = false; } } instance of movieClip 271 { onClipEvent (load) { _visible = false; } } } button 283 { on (release) { _root.loadmap_id = 14; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 5; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 285 { frame 1 { stop(); } instance of movieClip 269 { onClipEvent (load) { _visible = false; } } instance of movieClip 271 { onClipEvent (load) { _visible = false; } onClipEvent (rollOver, dragOver) { _root.describemap = 5; } onClipEvent (rollOut, dragOut) { play(); } } } movieClip 287 { } movieClip 288 { } button 289 { on (release) { _root.goingtoshop = 1; _root.shop_mode = 1; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 6; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 291 { frame 1 { stop(); } instance of movieClip 288 { onClipEvent (load) { _visible = false; } } } movieClip 292 { } button 293 { on (release) { _root.goingtoshop = 1; _root.shop_mode = 2; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 6; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 294 { frame 1 { stop(); } instance of movieClip 292 { onClipEvent (load) { _visible = false; } } } button 295 { on (release) { _root.goingtoshop = 1; _root.shop_mode = 3; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 6; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 296 { frame 1 { stop(); } instance of movieClip 288 { onClipEvent (load) { _visible = false; } } } button 297 { on (release) { _root.loadmap_id = 100; _root.gotoAndPlay(9); } on (rollOver, dragOver) { _root.describemap = 10; } on (rollOut, dragOut) { _root.describemap = 0; } } movieClip 298 { } movieClip 300 { frame 1 { stop(); } instance of movieClip 298 { onClipEvent (load) { _visible = false; } } } movieClip 302 { } movieClip 309 { } movieClip 311 { } movieClip 313 { } movieClip 314 { } movieClip 315 { instance of movieClip 309 { onClipEvent (load) { _visible = false; } } instance freeplaySigns of movieClip 314 { onClipEvent (enterFrame) { gotoAndStop(_root.freeplay_modo); } } } // unknown tag 88 length 64 movieClip 319 { } movieClip 320 { } // unknown tag 88 length 65 movieClip 342 { frame 1 { stop(); } } button 369 { on (release) { _root.freeplay_modo = 2; } } button 380 { on (release) { _root.freeplay_modo = 3; } } button 391 { on (release) { _root.freeplay_modo = 4; } } movieClip 396 { } movieClip 397 { } button 407 { on (release) { _root.freeplay_modo = 1; } } movieClip 408 { } movieClip 409 { } movieClip 410 { } movieClip 411 { } movieClip 412 { } movieClip 413 { } movieClip 414 { frame 1 { stop(); } } movieClip 416 { } movieClip 418 { } movieClip 420 { } movieClip 422 { } movieClip 423 { } movieClip 424 { } movieClip 425 { } button 428 { on (rollOver, dragOver) { _root.worldmap.NEXTDAYsign.gotoAndStop(2); nexdayglow._visible = false; } on (rollOut, dragOut) { _root.worldmap.NEXTDAYsign.gotoAndStop(1); nexdayglow._visible = true; nexdayglow.gotoAndPlay(1); } on (release) { _root.worldmap.nextDay(); } } movieClip 431 { } movieClip 434 { } movieClip 437 { } movieClip 439 { } movieClip 440 { } movieClip 441 { frame 1 { stop(); } } button 447 { on (release) { _root.gotoAndStop(3); } } movieClip 450 { } movieClip 451 { } movieClip 452 { } movieClip 453 { } movieClip 454 { } movieClip 457 { frame 1 { stop(); } } movieClip 464 { } movieClip 465 { frame 1 { function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; var pv; mb = '__mochibot__'; mbc = 'mochibot.com'; g = _global ? _global : _level0._root; if (g[mb + swfid]) { return g[mb + swfid]; } s = System.security; x = mc._root.getSWFVersion; fv = x ? mc.getSWFVersion() : (_global ? 6 : 5); if (!s) { s = {}; } sb = s.sandboxType; if (sb == 'localWithFile') { return null; } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } pv = (fv == 5) ? /:$version : System.capabilities.version; u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : ''); lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv); g[mb + 'level'] = lv; if (fv == 5) { res = '_level' + lv; if (!eval(res)) { loadMovieNum(u, lv); } return res; } res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); return res; } function worldmapInitiation() { if (_root.do_load eq 1) { CHARINFOSHOW.gotoAndStop(3); } else { CHARINFOSHOW.gotoAndStop(2); } themap.freeplaySigns._visible = false; freeplay_chose._visible = false; NEXTDAYsign._visible = false; nexdayglow._visible = false; nextdayButton._visible = false; themap.star_1._visible = false; themap.star_2._visible = false; themap.star_3._visible = false; themap.star_4._visible = false; themap.star_5._visible = false; themap.star_6._visible = false; saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); varlocation1 = this.saveslot000.data; temptime1 = varlocation1.timeSpentPreviously; timevar_hours = Math.floor(temptime1 / 1000 / 3600); timevar_minutes = Math.floor(temptime1 / 1000 / 60 - timevar_hours * 60); timevar_seconds = Math.floor(temptime1 / 1000 - timevar_hours * 3600 - timevar_minutes * 60); if (timevar_hours < 10) { timevar_hours = '0' + timevar_hours; } if (timevar_minutes < 10) { timevar_minutes = '0' + timevar_minutes; } if (timevar_seconds < 10) { timevar_seconds = '0' + timevar_seconds; } CHARINFOSHOW.show_playtime1 = timevar_hours + ':' + timevar_minutes + ':' + timevar_seconds; character_ar1r = varlocation1.character_arr; str_id = 101; per_id = 102; end_id = 103; cha_id = 104; int_id = 105; agi_id = 106; luk_id = 107; cash_id = 16; kills_id = 17; CHARINFOSHOW.str_show = character_ar1r[str_id]; CHARINFOSHOW.per_show = character_ar1r[per_id]; CHARINFOSHOW.agi_show = character_ar1r[agi_id]; CHARINFOSHOW.end_show = character_ar1r[end_id]; CHARINFOSHOW.luk_show = character_ar1r[luk_id]; CHARINFOSHOW.int_show = character_ar1r[int_id]; CHARINFOSHOW.cha_show = character_ar1r[cha_id]; CHARINFOSHOW.kills_show = 'Kills: ' + character_ar1r[kills_id]; CHARINFOSHOW.cash_show = 'Cash: ' + character_ar1r[cash_id] + '$'; firearms_id = 202; melee_id = 204; merchant_id = 208; medic_id = 214; CHARINFOSHOW.fire_show = character_ar1r[firearms_id] + '%'; CHARINFOSHOW.melee_show = character_ar1r[melee_id] + '%'; CHARINFOSHOW.merc_show = character_ar1r[merchant_id] + '%'; CHARINFOSHOW.medic_show = character_ar1r[medic_id] + '%'; day_id = 250; mission_1_status_id = 251; mission_2_status_id = 252; mission_3_status_id = 253; mission_4_status_id = 254; mission_5_status_id = 255; mission_6_status_id = 256; mis_comp_1 = character_ar1r[mission_1_status_id]; mis_comp_2 = character_ar1r[mission_2_status_id]; mis_comp_3 = character_ar1r[mission_3_status_id]; mis_comp_4 = character_ar1r[mission_4_status_id]; mis_comp_5 = character_ar1r[mission_5_status_id]; mis_comp_6 = character_ar1r[mission_6_status_id]; trace('mis_comp_6 ' + mis_comp_6); today = character_ar1r[day_id]; day_show = 'DAY: ' + today; if (_root.do_load eq 1) { if (today eq 1) { if (mis_comp_1 != 1) { themap.star_1._visible = true; } else { themap.btn_supply_1.gotoAndStop(2); themap.star_1._visible = false; themap.star_2._visible = true; themap.btn_2.gotoAndStop(2); } if (mis_comp_2 eq 1) { themap.star_2._visible = false; themap.btn_3.gotoAndStop(2); themap.star_3._visible = true; } if (mis_comp_3 eq 1) { themap.star_3._visible = false; } today_progress = Math.floor(100 * (mis_comp_2 + mis_comp_1 + mis_comp_3) / 3); progress_bar.gotoAndStop(today_progress); if (today_progress < 1) { progress_bar.gotoAndStop(1); } else { if (today_progress > 99) { __com_mochibot__('ccc17420', this, 10301, true); progress_bar.gotoAndStop(100); NEXTDAYsign._visible = true; nexdayglow._visible = true; nextdayButton._visible = true; } } } if (today eq 2) { themap.btn_supply_1.gotoAndStop(2); themap.btn_2.gotoAndStop(2); themap.btn_3.gotoAndStop(2); if (mis_comp_1 != 1) { themap.star_1._visible = true; } else { themap.star_1._visible = false; } if (mis_comp_2 != 1) { themap.star_2._visible = true; } else { themap.star_2._visible = false; } if (mis_comp_3 != 1) { themap.star_3._visible = true; } else { themap.star_3._visible = false; } today_progress = Math.floor(100 * (mis_comp_2 + mis_comp_1 + mis_comp_3) / 3); progress_bar.gotoAndStop(today_progress); if (today_progress < 1) { progress_bar.gotoAndStop(1); } else { if (today_progress > 99) { __com_mochibot__('0386cd6d', this, 10301, true); progress_bar.gotoAndStop(100); NEXTDAYsign._visible = true; nexdayglow._visible = true; nextdayButton._visible = true; } } } if (today eq 3) { themap.btn_supply_1.gotoAndStop(2); themap.btn_supply_2.gotoAndStop(2); themap.btn_2.gotoAndStop(2); themap.btn_3.gotoAndStop(2); themap.btn_5.gotoAndStop(2); if (mis_comp_1 != 1) { themap.star_1._visible = true; } else { themap.star_1._visible = false; } if (mis_comp_2 != 1) { themap.star_2._visible = true; } else { themap.star_2._visible = false; } if (mis_comp_3 != 1) { themap.star_3._visible = true; } else { themap.star_3._visible = false; } if (mis_comp_5 != 1) { themap.star_5._visible = true; } else { themap.star_5._visible = false; } today_progress = Math.floor(100 * (mis_comp_2 + mis_comp_1 + mis_comp_3 + mis_comp_5) / 4); progress_bar.gotoAndStop(today_progress); if (today_progress < 1) { progress_bar.gotoAndStop(1); } else { if (today_progress > 99) { __com_mochibot__('a11b8f6c', this, 10301, true); progress_bar.gotoAndStop(100); NEXTDAYsign._visible = true; nexdayglow._visible = true; nextdayButton._visible = true; } } } if (today eq 4) { themap.btn_supply_1.gotoAndStop(2); themap.btn_supply_2.gotoAndStop(2); themap.btn_supply_3.gotoAndStop(2); themap.btn_2.gotoAndStop(2); themap.btn_3.gotoAndStop(2); themap.btn_4.gotoAndStop(2); themap.btn_5.gotoAndStop(2); themap.btn_6.gotoAndStop(2); if (mis_comp_1 != 1) { themap.star_1._visible = true; } else { themap.star_1._visible = false; } if (mis_comp_2 != 1) { themap.star_2._visible = true; } else { themap.star_2._visible = false; } if (mis_comp_3 != 1) { themap.star_3._visible = true; } else { themap.star_3._visible = false; } if (mis_comp_4 != 1) { themap.star_4._visible = true; } else { themap.star_4._visible = false; } if (mis_comp_6 != 1) { themap.star_6._visible = true; } else { themap.star_6._visible = false; } themap.star_5._visible = false; today_progress = Math.floor(100 * (mis_comp_2 + mis_comp_1 + mis_comp_3 + mis_comp_4 + mis_comp_6) / 5); progress_bar.gotoAndStop(today_progress); if (today_progress < 1) { progress_bar.gotoAndStop(1); } else { if (today_progress > 99) { progress_bar.gotoAndStop(100); __com_mochibot__('a2d69acc', this, 10301, true); NEXTDAYsign._visible = true; nexdayglow._visible = true; nextdayButton._visible = true; } } } if (today eq 5) { day_show = 'FREEPLAY'; themap.btn_supply_1.gotoAndStop(2); themap.btn_supply_2.gotoAndStop(2); themap.btn_supply_3.gotoAndStop(2); themap.btn_2.gotoAndStop(2); themap.btn_3.gotoAndStop(2); themap.btn_4.gotoAndStop(2); themap.btn_5.gotoAndStop(2); themap.btn_6.gotoAndStop(2); themap.star_1._visible = false; themap.star_2._visible = false; themap.star_3._visible = false; themap.star_4._visible = false; themap.star_5._visible = false; themap.star_6._visible = false; progress_bar._visible = false; nexdayglow._visible = false; if (_root.freeplay_modo > 0 or _root.freeplay_modo < 5) { } else { _root.freeplay_modo = 3; } themap.freeplaySigns._visible = true; freeplay_chose._visible = true; } } if (_root.do_load != 1) { themap.star_1._visible = true; progress_bar.gotoAndStop(1); day_show = 'DAY: 1'; } } function nextDay() { saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); varlocation1 = this.saveslot000.data; day_id = 250; ++varlocation1.character_arr[day_id]; varlocation1.character_arr[mission_1_status_id] = 0; varlocation1.character_arr[mission_2_status_id] = 0; varlocation1.character_arr[mission_3_status_id] = 0; varlocation1.character_arr[mission_4_status_id] = 0; varlocation1.character_arr[mission_5_status_id] = 0; varlocation1.character_arr[mission_6_status_id] = 0; _root.skill_points_id = 13; if (varlocation1.character_arr[day_id] eq 2) { varlocation1.character_arr[_root.skill_points_id] += 8; } if (varlocation1.character_arr[day_id] eq 3) { varlocation1.character_arr[_root.skill_points_id] += 8; } if (varlocation1.character_arr[day_id] eq 4) { varlocation1.character_arr[_root.skill_points_id] += 5; varlocation1.character_arr[_root.stat_points_id] += 1; } if (varlocation1.character_arr[day_id] eq 5) { varlocation1.character_arr[_root.skill_points_id] += 5; varlocation1.character_arr[_root.stat_points_id] += 1; } worldmapInitiation(); } if (_root.we_are_returning_from_playing eq 1) { _root.start_new_character = 0; _root.do_load = 1; } stop(); _root.kursor_depth = 2000; _root.attachMovie('kursor', 'kursor', _root.kursor_depth); startDrag('_root.kursor', true); Mouse.hide(); worldmapInitiation(); } instance freeplay_chose of movieClip 414 { onClipEvent (enterFrame) { gotoAndStop(_root.freeplay_modo); } } instance of movieClip 464 { onClipEvent (enterFrame) { gotoAndStop(_root.describemap + 1); } onClipEvent (load) { _root.describemap = 0; } } } frame 6 { prevFrame(); } frame 7 { function tougherEnemies() { _root.enemy_hp_500 = 70; _root.enemy_movepoints_500 = 5; _root.enemy_actpoints_500 = 4; _root.enemy_hp_501 = 70; _root.enemy_movepoints_501 = 5; _root.enemy_actpoints_501 = 4; _root.enemy_hp_510 = 100; _root.enemy_dmg_min_510 = 5; _root.enemy_dmg_max_510 = 15; _root.enemy_hp_511 = 100; _root.enemy_dmg_min_511 = 5; _root.enemy_dmg_max_511 = 15; _root.enemy_hp_520 = 70; _root.enemy_actpoints_520 = 2; _root.enemy_hp_521 = 70; _root.enemy_actpoints_521 = 2; _root.enemy_hp_530 = 60; _root.enemy_actpoints_530 = 2; _root.enemy_hp_531 = 60; _root.enemy_actpoints_531 = 2; _root.enemy_hp_540 = 70; _root.enemy_actpoints_540 = 4; _root.enemy_hp_541 = 70; _root.enemy_actpoints_541 = 4; _root.enemy_hp_1 = 60; } function cloneItem(item) { trace('cloneitem'); ++object_id; _root['item' + object_id] = {}; newitem = _root['item' + object_id]; newitem.this_object_id = object_id; for (var v3 in item) { newitem[v3] = item[v3]; } return newitem; } function snd_spider_bite() { aaaa = random(2) + 1; _root.trs['spider_bite_' + aaaa].start(); } function snd_scorp_die() { aaaa = random(6) + 1; _root.trs['scorp_die_' + aaaa].start(); } function snd_spider_die() { aaaa = random(6) + 1; _root.trs['spider_die_' + aaaa].start(); } function snd_scorpion_hurt() { aaaa = random(4) + 1; _root.trs['scorpion_hurt_' + aaaa].start(); } function snd_spider_hurt() { aaaa = random(4) + 1; _root.trs['spider_hurt_' + aaaa].start(); } function snd_big_goo() { aaaa = random(2) + 1; _root.trs['big_goo_' + aaaa].start(); } function snd_small_goo() { aaaa = random(2) + 1; _root.trs['small_goo_' + aaaa].start(); } function snd_gunshot_11() { sid = 1 + random(3); trs['gun_shot_11_' + sid].start(); } function snd_melee_1() { sid = 1 + random(2); trs['melee_wpn_1_' + sid].start(); } function snd_blunt_hit() { sid = 1 + random(3); trs['blunt_wpn_' + sid].start(); } function snd_human_die() { sid = 1 + random(3); trs['human_die_' + sid].start(); } function sndAndMusicVolume() { _root.overallsound.setVolume(_root.sound_volume); THEmusic.setVolume(_root.music_volume); if (_root.music_on eq 1 and turningoff != 1) { if (was_it_off != 0) { was_it_off = 0; THEmusic.start(0, 9999); } } if (_root.music_on eq 0) { was_it_off = 1; THEmusic.stop('music'); } if (dosoundrestarttimeryiff eq 1 and _root.music_on eq 1) { dfgfdgdfgiii8888 = 1; dosoundrestarttimeryiff = 0; } if (dfgfdgdfgiii8888 != 0) { ++dfgfdgdfgiii8888; if (dfgfdgdfgiii8888 eq 5) { _root.music_on = 0; } if (dfgfdgdfgiii8888 > 7) { _root.music_on = 1; dfgfdgdfgiii8888 = 0; } } } function create_yiffingField() { this.createEmptyMovieClip('yiff', _root.yiff_depth); yiff._x = game_location_x; yiff._y = game_location_y; this.createEmptyMovieClip('status_layer', _root.status_layer_depth); status_layer._x = game_location_x; status_layer._y = game_location_y; yiff.createEmptyMovieClip('loot_shell', _root.loot_shell_depth); yiff.createEmptyMovieClip('corpse_shell', _root.corpse_shell_depth); yiff.createEmptyMovieClip('shooting_shell', _root.shooting_shell_depth); yiff.corpse_shell.cacheAsBitmap = true; yiff.cacheAsBitmap = true; _root.attachMovie('fps_counter', 'fps_counter', _root.upper_indicators_depth++); _root.fps_counter._x = 765; _root.fps_counter._y = 5; _root.attachMovie('bottommenu', 'bottommenu', _root.bottommenu_depth); _root.bottommenu._x = 0; _root.bottommenu._y = 0; _root.bottommenu.cacheAsBitmap = true; } function spawn_units_at_random_location(id, preset_team) { var v2 = 1; while (v2 <= 100) { celly = 1 + random(_root.field_height); cellx = 2 + random(_root.field_length); checkcell = _root.yiff['cell' + cellx + '_' + celly]; recheck_cell_occupation(); if (checkcell and checkcell._type_ != 1 and checkcell.occupied eq 0) { Spawn_units(id, 0, cellx, celly, preset_team); break; return undefined; } ++v2; } } function Spawn_units(id, base, cellx, celly, preset_team) { if (base eq 0) { respawn_x = _root.yiff['cell' + cellx + '_' + celly]._x; respawn_y = _root.yiff['cell' + cellx + '_' + celly]._y; } else { if (base eq 1 or base eq 'spider') { startcell_x = 1; endcell_x = 8; startcell_y = 15; endcell_y = 21; } else { if (base eq 2 or base eq 'scorpion') { startcell_x = 21; endcell_x = 28; startcell_y = 1; endcell_y = 7; } } arrayofcellstorespawn = createArray_of_Unoccupied_cells(startcell_x, startcell_y, endcell_x, endcell_y); if (arrayofcellstorespawn.length > 0) { destcell = arrayofcellstorespawn[random(arrayofcellstorespawn.length)]; respawn_x = destcell._x; respawn_y = destcell._y; } else { return undefined; } } vacantspace = 'none'; i = 0; while (i < _root.enemy_ammount_map) { if (_root.yiff['enemy_' + i]) { } else { vacantspace = i; break; } ++i; } if (vacantspace eq 'none') { return undefined; } en_id = id; _root.yiff.attachMovie('enemy_type_' + en_id, 'enemy_' + vacantspace, _root.enemy_depth + vacantspace); trgt = _root.yiff['enemy_' + vacantspace]; trgt.serialnum = vacantspace; if (en_id eq 521 or en_id eq 531 or en_id eq 541 or en_id eq 511 or en_id eq 501) { createLootArrayForThisUnit(vacantspace, en_id - 1); } else { createLootArrayForThisUnit(vacantspace, en_id); } if (en_id eq 999) { _root.character_unuit = trgt; } trgt.en_id = en_id; trgt._x = respawn_x; trgt._y = respawn_y; trgt._rotation = random(360); trgt.speed = _root['enemy_speed_' + en_id]; trgt.speed_slow = trgt.speed; trgt.initiative_base = _root['enemy_initiative_' + en_id]; trgt.initiative = trgt.initiative_base + random(9999) / 10000; trgt.movepoints_max_real = _root['enemy_movepoints_' + en_id]; trgt.movepoints_max = trgt.movepoints_max_real; trgt.movepoints = trgt.movepoints_max; trgt.actpoints_max = _root['enemy_actpoints_' + en_id]; trgt.actpoints = trgt.actpoints_max; trgt.visibility_radius = _root['enemy_visibility_radius_' + en_id]; trgt.hp = _root['enemy_hp_' + en_id]; trgt.dmg = 0; trgt.dmg_done_by_character = 0; trgt.name_ = _root['enemy_name_' + en_id]; trgt.accuracy = _root['enemy_accuracy_' + en_id]; trgt.dmg_min = _root['enemy_dmg_min_' + en_id]; trgt.dmg_max = _root['enemy_dmg_max_' + en_id]; trgt.experience = _root['enemy_experience_' + en_id]; if (preset_team > 0) { trgt.team = preset_team; } else { trgt.team = random(99999); if (trgt.en_id eq 510) { trgt.team = 999; } else { if (trgt.en_id eq 999) { trgt.team = 999; } else {} } } trgt.attack_radius = _root['enemy_attack_radius_' + en_id]; trgt.poison_time = _root['enemy_poison_time_' + en_id]; trgt.poison_dmg = _root['enemy_poison_dmg_' + en_id] * _root.hp_modifier; trgt.regeneration_percent = _root['enemy_regeneration_percent_' + en_id]; trgt.command = 2; trgt.forcedtarget = 0; trgt.critical_chance = _root['enemy_critical_chance_' + en_id]; trgt.critical_mod = _root['enemy_critical_mod_' + en_id]; trgt.ranged = _root['enemy_ranged_' + en_id]; if (trgt.en_id > 100) { trgt.stimpaks = 1 + random(4); } if (trgt.ranged eq 1) { trgt.ammoingun = _root['enemy_ammoingun_' + en_id]; trgt.ammoingun_max = _root['enemy_ammoingun_' + en_id]; } _root.enemy_ammoingun_520; trgt.dmg_resist = _root['enemy_dmg_resist_' + en_id]; trgt.armor_class = _root['enemy_armor_class_' + en_id]; trgt.wpn_type = _root['enemy_wpn_type_' + en_id]; trgt.button_shell.trgt = trgt; trgt.button_shell.showradius.trgt = trgt; trgt.destination_area_center = _root.yiff.cell13_12; } function initBackground() { uppr = 'background_up_' + _root.loadmap_id; btmb = 'background_floor_' + _root.loadmap_id; _root.yiff.attachMovie(uppr, 'background_up', _root.background_up_depth); _root.yiff.background_up._x -= game_location_x; _root.yiff.background_up._y -= game_location_y; _root.attachMovie(btmb, 'background_floor', _root.background_floor_depth); _root.yiff.background_up.cacheAsBitmap = true; _root.ackground_floor.cacheAsBitmap = true; } function buildGrid() { var v4 = 1; while (v4 <= _root.field_height) { var v3 = 1; while (v3 <= _root.field_length) { var v2 = 'cell' + v3 + '_' + v4; var v7 = (v3 - 1) * spacing + spacing / 2; var v6 = (v4 - 1) * spacing + spacing / 2; var v5 = map_array_1[v4 - 1][v3 - 1]; if (v5 eq 1) { whichtile = 'tile_block'; } else { whichtile = 'tile_empty'; } _root.yiff.attachMovie(whichtile, v2, ++_root.cells_depth); _root.yiff[v2]._x = v7; _root.yiff[v2]._y = v6; _root.yiff[v2].xx = v7; _root.yiff[v2].yy = v6; _root.yiff[v2].cellname = v2; _root.yiff[v2]._type_ = v5; _root.yiff[v2].clip = _root.yiff[v2]; ++v3; } ++v4; } } function yiffIntegrity() { if (_root.showgrid eq 1 and _root.grid_visible != 1) { _root.showgrid = 0; _root.grid_visible = 1; showhideGrid('show'); } else { if (_root.showgrid eq 1 and _root.grid_visible eq 1) { _root.showgrid = 0; _root.grid_visible = 0; showhideGrid('hide'); } } if (handheld.item eq 'none') { if (_root.ranged_attack_pricel eq 1) { kursor.gotoAndStop(2); } else { if (_root.melee_attack_pricel eq 1) { kursor.gotoAndStop(3); } else { kursor.gotoAndStop(1); } } } else { _root.kursor.gotoAndStop(10); _root.kursor.itembox.gotoAndStop(_root.handheld.item.id); } } function deleteAllDrestroyEverything() { for (var v3 in this) { if (this[v3] instanceof MovieClip) { if (this[v3] != _root.show_quality and this[v3] != _root.knopkaq and this[v3] != _root.music_shell) { removeMovieClip(this[v3]); } } } THEmusic.stop(); _root.gotoAndStop(1); saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); v1arlocation1111 = this.saveslot000.data; if (v1arlocation1111.save_exists eq 1) { _root.we_are_returning_from_playing = 1; _root.gotoAndStop(5); } else { _root.gotoAndStop(3); } } function roundAnnouncement() { if (all_enemies_has_been_exterminated != 1) { _root.attachMovie('round', 'round_', _root.showroundcount_depth); _root.round_.shellmsg.showvar = 'ROUND: ' + _root.currentround; _root.round_._x = 407; _root.round_._y = 284; pushTextToLog('*'); pushTextToLog('**'); pushTextToLog('************** [Round ' + _root.currentround + '] **************'); pushTextToLog('**'); pushTextToLog('*'); } else { all_enemies_has_been_exterminated = 0; _root.attachMovie('round', 'round_', _root.showroundcount_depth); _root.round_.shellmsg.showvar = 'AREA CLEARED'; _root.round_._x = 407; _root.round_._y = 284; pushTextToLog('*'); pushTextToLog('**'); pushTextToLog('************** [AREA CLEARED. REALTIME MODE ACTIVATED] **************'); pushTextToLog('**'); pushTextToLog('*'); } } function otletaniedamaga(xx, yy, msg, type, poisoned) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('otletalka', 'otletalka' + iyiff, iyiff); _root.yiff.shooting_shell['otletalka' + iyiff]._x = xx; _root.yiff.shooting_shell['otletalka' + iyiff]._y = yy; _root.yiff.shooting_shell['otletalka' + iyiff].show_.tehtextfield.text = msg; if (!poisoned) { poisoned = ''; } _root.yiff.shooting_shell['otletalka' + iyiff].show_.poison = poisoned; var v2 = new TextFormat(); v2.size = 10; if (type eq 'dmg') { v2.color = 16711680; } else { if (type eq 'poison') { v2.color = 65280; } else { if (type eq 'regeneration') { v2.color = 52479; } else { if (type eq 'misc') { v2.color = 16777215; } } } } _root.yiff.shooting_shell['otletalka' + iyiff].show_.tehtextfield.setTextFormat(v2); } function shotLineShift(central_target, distance) { c = distance; smeshenie = 180; jopa = central_target; if (jopa._rotation < 0) { aaa = -jopa._rotation + 180; } else { aaa = jopa._rotation; } if (aaa eq 270) { aaa = 269.99; } if (aaa eq 180) { aaa = 179.999; } if (aaa eq 0) { aaa = 0.01; } aaa2 = aaa; if (aaa >= 0 and aaa < 90) { aaa += smeshenie; } else { if (aaa >= 90 and aaa < 180) { aaa = smeshenie + aaa; } else { if (aaa >= 180 and aaa < 270) { aaa = aaa - smeshenie + 180; } else { if (aaa >= 270 and aaa < 360) { aaa -= smeshenie; } } } } tangens = Math.tan(aaa * Math.PI / 180); a = Math.cos(aaa * Math.PI / 180) * c; b = a / tangens; if (aaa2 > 0 and aaa2 <= 180) { xmodo = a / b; ymodo = -1; attachMovie('pipka', 'pipka', 666); the_x = jopa._x + a * xmodo; the_y = jopa._y + a * ymodo; return [the_x, the_y]; } if (aaa2 > 180 and aaa2 <= 270) { xmodo = -a / b; ymodo = -1; attachMovie('pipka', 'pipka', 666); the_x = jopa._x + a * xmodo; the_y = jopa._y + a * ymodo; return [the_x, the_y]; } xmodo = a / b; ymodo = 1; attachMovie('pipka', 'pipka', 666); the_x = jopa._x + a * xmodo; the_y = jopa._y + a * ymodo; return [the_x, the_y]; } function check_for_obstacle_between_2_points(x1, y1, x2, y2) { checkx787878 = x2; checky787878 = y2; cellname665 = (cell_name_calculation(checkx787878, checky787878))[2]; shag = spacing * 0.95; yiffdgdfg = CALC_Dist_Xv_Yv(x2, y2, x1, y1); xmod = yiffdgdfg[1]; ymod = yiffdgdfg[2]; xmod_ = xmod; ymod_ = ymod; distance = yiffdgdfg[0]; aaayiff = distance; if (aaayiff < spacing * 2) { return 0; } var v2 = 1; while (v2 < 990) { checkx = x1 + xmod_ * shag * v2; checky = y1 + ymod_ * shag * v2; cellname = (cell_name_calculation(checkx, checky))[2]; walldetected = 0; if (_root.yiff[cellname]._type_ eq 1) { walldetected = 1; break; } distcheck = (CALC_Dist_Xv_Yv(checkx, checky, x1, y1))[0]; if (aaayiff < distcheck) { break; } if (cellname eq cellname665) { break; } ++v2; } return walldetected; } function cell_name_calculation(xx, yy) { var v2 = Math.ceil(xx / spacing); var v1 = Math.ceil(yy / spacing); cellname = 'cell' + v2 + '_' + v1; return [v2, v1, cellname]; } function traceCell() { trace(cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse)); } function CALC_Dist_Xv_Yv_dispersion(x1, y1, x2, y2, dispersion) { A = {}; B = {}; A.xx = x1; A.yy = y1; B.xx = x2; B.yy = y2; dx = A.xx - B.xx; dy = A.yy - B.yy; distance = Math.sqrt(dx * dx + dy * dy); dx_a = Math.abs(dx); dy_a = Math.abs(dy); if (dx > 0 or dx eq 0) { xmod = 1; } else { xmod = -1; } if (dy > 0 or dy eq 0) { ymod = 1; } else { ymod = -1; } if (dx_a > dy_a) { spdmod = dy_a / dx_a; x_modifier = xmod; y_modifier = ymod * spdmod; xdispersion = (x_modifier / 100) * dispersion; ydispersion = (y_modifier / 100) * dispersion; xdismod = (-1000 + random(3000)) / 1000; ydismod = (-1000 + random(3000)) / 1000; x_modifier += ydispersion * xdismod; y_modifier += xdispersion * ydismod; return [distance, x_modifier, y_modifier, dx, dy]; } if (dx_a < dy_a) { spdmod = dx_a / dy_a; x_modifier = xmod * spdmod; y_modifier = ymod; xdispersion = (x_modifier / 100) * dispersion; ydispersion = (y_modifier / 100) * dispersion; xdismod = (-1000 + random(3000)) / 1000; ydismod = (-1000 + random(3000)) / 1000; x_modifier += ydispersion * xdismod; y_modifier += xdispersion * ydismod; return [distance, x_modifier, y_modifier, dx, dy]; } x_modifier = xmod; y_modifier = ymod; xdispersion = (x_modifier / 100) * dispersion; ydispersion = (y_modifier / 100) * dispersion; xdismod = (-1000 + random(3000)) / 1000; ydismod = (-1000 + random(3000)) / 1000; x_modifier += ydispersion * xdismod; y_modifier += xdispersion * ydismod; return [distance, x_modifier, y_modifier, dx, dy]; } function CALC_Dist_Xv_Yv(x1, y1, x2, y2) { A = {}; B = {}; A.xx = x1; A.yy = y1; B.xx = x2; B.yy = y2; dx = A.xx - B.xx; dy = A.yy - B.yy; distance = Math.sqrt(dx * dx + dy * dy); dx_a = Math.abs(dx); dy_a = Math.abs(dy); if (dx > 0 or dx eq 0) { xmod = 1; } else { xmod = -1; } if (dy > 0 or dy eq 0) { ymod = 1; } else { ymod = -1; } if (dx_a > dy_a) { spdmod = dy_a / dx_a; x_modifier = xmod; y_modifier = ymod * spdmod; return [distance, x_modifier, y_modifier, dx, dy]; } if (dx_a < dy_a) { spdmod = dx_a / dy_a; x_modifier = xmod * spdmod; y_modifier = ymod; return [distance, x_modifier, y_modifier, dx, dy]; } x_modifier = xmod; y_modifier = ymod; return [distance, x_modifier, y_modifier, dx, dy]; } function rotation_towards_movement2(trg, xspeed, yspeed) { speedpovorota = 1; dx = xspeed; dy = yspeed; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_towards_movement(trg, xspeed, yspeed) { if (_root.quickcombat eq 1) { speedpovorota = 1; } else { speedpovorota = 0.4; } dx = xspeed; dy = yspeed; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_face_point2(trgt1, xx2, yy2, slow787945675345) { mewmewmewmewmewmew = CALC_Dist_Xv_Yv(xx2, yy2, trgt1._x, trgt1._y); speedpovorota = 1; if (slow787945675345 eq 1) { speedpovorota = 0.7; slow787945675345 = 0; } trg = trgt1; dx = mewmewmewmewmewmew[3]; dy = mewmewmewmewmewmew[4]; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_face_target(trgt1, trgt2, slow787945675345) { mewmewmewmewmewmew = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); speedpovorota = 1; if (slow787945675345 eq 1) { speedpovorota = 0.7; slow787945675345 = 0; } trg = trgt1; dx = mewmewmewmewmewmew[3]; dy = mewmewmewmewmewmew[4]; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_to_points(trgt, xx, yy) { mewmewmewmewmewmew = CALC_Dist_Xv_Yv(xx, yy, trgt._x, trgt._y); speedpovorota = 1; trg = trgt; dx = mewmewmewmewmewmew[3]; dy = mewmewmewmewmewmew[4]; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function createArray_of_Unoccupied_cells(startcell_x, startcell_y, endcell_x, endcell_y) { recheck_cell_occupation(); var v4 = new Array(); var v3 = startcell_y; while (v3 <= endcell_y) { var v2 = startcell_x; while (v2 <= endcell_x) { cellname = _root.yiff['cell' + v2 + '_' + v3]; if (cellname.occupied eq 0) { v4.push(cellname); } ++v2; } ++v3; } return v4; } function recheck_cell_occupation() { var v2 = 1; while (v2 <= _root.field_height) { var v3 = 1; while (v3 <= _root.field_length) { cellname = _root.yiff['cell' + v3 + '_' + v2]; cellname.occupied = 0; ++v3; } ++v2; } v3 = 0; while (v3 < _root.enemy_ammount_map + 10) { trtrgt = _root.yiff['enemy_' + v3]; if (trtrgt) { sdgsdfg = (cell_name_calculation(trtrgt._x, trtrgt._y))[2]; _root.yiff[sdgsdfg].occupied = trtrgt; } ++v3; } } function checkForBeingSurrounded(who) { recheck_cell_occupation(); cellx1 = (cell_name_calculation(who._x, who._y))[0]; celly1 = (cell_name_calculation(who._x, who._y))[1]; cellx2 = cellx1 - 1; celly2 = celly1 - 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1; celly2 = celly1 - 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 + 1; celly2 = celly1 - 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 - 1; celly2 = celly1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 + 1; celly2 = celly1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 - 1; celly2 = celly1 + 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1; celly2 = celly1 + 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 + 1; celly2 = celly1 + 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } return 'true'; } function create_area_array(center_x, center_y, radius, sector) { areaCellsArray = []; if (sector eq 1) { xstart = center_x; xfinish = center_x + radius; ystart = center_y; yfinish = center_y + radius; } else { if (sector eq 2) { xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y + (radius - 1); yfinish = center_y + radius; } else { if (sector eq 3) { xstart = center_x - radius; xfinish = center_x; ystart = center_y; yfinish = center_y + radius; } else { if (sector eq 4) { xstart = center_x + (radius - 1); xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y + radius; } else { if (sector eq 5) { xstart = center_x - radius; xfinish = center_x - (radius - 1); ystart = center_y - radius; yfinish = center_y + radius; } else { if (sector eq 6) { xstart = center_x; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y; } else { if (sector eq 7) { xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y - (radius - 1); } else { if (sector eq 8) { xstart = center_x - radius; xfinish = center_x; ystart = center_y - radius; yfinish = center_y; } else { if (sector eq 0) { xstart = center_x - 1; xfinish = center_x + 1; ystart = center_y - 1; yfinish = center_y + 1; } else { xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y + radius; } } } } } } } } } i = xstart; while (i <= xfinish) { j = ystart; while (j <= yfinish) { if (i > 0 and j > 0 and i < field_length + 1 and j < field_height + 1) { cellnam6e = _root.yiff['cell' + i + '_' + j]; if (cellnam6e._type_ != 1) { if (cellnam6e.occupied eq 0) { areaCellsArray.push([i, j]); } } } ++j; } ++i; } return areaCellsArray; } function create_area_array2(x_min, x_max, y_min, y_max) { areaCellsArray2 = []; i = x_min; while (i <= x_max) { j = y_min; while (j <= y_max) { if (i > 0 and j > 0 and i < field_length + 1 and j < field_height + 1) { cellnam6e = _root.yiff['cell' + i + '_' + j]; if (cellnam6e._type_ != 1) { if (cellnam6e.occupied eq 0) { areaCellsArray2.push([i, j]); } } } ++j; } ++i; } return areaCellsArray2; } function create_area_array3(center_x, center_y, radius) { areaCellsArray3 = []; xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y + radius; trace(xstart + ' ' + xfinish + ' ' + ystart + ' ' + yfinish); i = xstart; while (i <= xfinish) { j = ystart; while (j <= yfinish) { if (i > 0 and j > 0 and i < field_length + 1 and j < field_height + 1) { areaCellsArray3.push([i, j]); } ++j; } ++i; } return areaCellsArray3; } function doSplashDMGnineCells(cur_dmg, who_fired, center_cell_x, center_cell_y) { recheck_cell_occupation(); cellx = center_cell_x; celly = center_cell_y; cellname = _root.yiff['cell' + cellx + '_' + celly]; cellname.occupied.dmg += cur_dmg; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); cellx = center_cell_x - 1; celly = center_cell_y - 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x; celly = center_cell_y - 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x + 1; celly = center_cell_y - 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x - 1; celly = center_cell_y; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x + 1; celly = center_cell_y; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x - 1; celly = center_cell_y + 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x; celly = center_cell_y + 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x + 1; celly = center_cell_y + 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } } function showhideGrid(what) { if (what eq 'show') { var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; if (cellname._type_ eq 0) { cellname.gotoAndStop(2); } ++v2; } ++v3; } } else { if (what eq 'hide') { var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; cellname.gotoAndStop(1); ++v2; } ++v3; } } } } function maintenancePutDotOnSTage(xx, yy) {} function Click1CellTEST() { trace('Cell: ' + (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[2]); } function enemyHitChance_calculation(shooter, victim) { base_acc = shooter.accuracy; attack_rad = shooter.attack_radius - 2; zomgyiff61666666 = CALC_Dist_Xv_Yv(shooter._x, shooter._y, victim._x, victim._y); distancecheck0 = zomgyiff61666666[0]; distance_spaces = Math.floor(distancecheck0 / spacing); if (distancecheck0 < spacing * 1.5) { base_acc += 50; } else { if (distancecheck0 > spacing * 1.5 and distancecheck0 < spacing * 2.5) { base_acc += 25; } } if (distance_spaces < attack_rad) { acc1 = base_acc; acc2 = Math.floor(acc1); } else { _root.acc_falloff = 10; acc1 = base_acc - (distance_spaces - attack_rad) * _root.acc_falloff; acc2 = Math.floor(acc1); } if (acc2 < 0) { acc2 = 0; } return acc2; } function hitChance_calculation() { if (_root.melee_attack_pricel eq 1) { _root.hitchance = 'x'; base_accuracy = _root.character_arr[melee_id]; yifxxx7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx7 + '_' + yifyyy7]; hc_trgt1 = _root.current_participant; hc_trgt2 = trgtcell; zomgyiff61666666 = CALC_Dist_Xv_Yv(hc_trgt1._x, hc_trgt1._y, hc_trgt2._x, hc_trgt2._y); distancecheck0 = zomgyiff61666666[0]; if (distancecheck0 < spacing * 1.5) { _root.hitchance = base_accuracy; } } else { if (_root.ranged_attack_pricel eq 1 or _root.aimed_shot_menu) { yifxxx7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx7 + '_' + yifyyy7]; if (!trgtcell) { return undefined; } if (previous_cell != trgtcell or _root.aimed_shot_menu) { previous_cell = trgtcell; _root.hitchance = 'x'; if (_root.aimed_shot_menu) { hc_trgt1 = _root.current_participant; hc_trgt2 = _root.aimedTarget; } else { hc_trgt1 = _root.current_participant; recheck_cell_occupation(); if (trgtcell.occupied eq 0) { return undefined; } hc_trgt2 = trgtcell.occupied; } ch1k = check_for_obstacle_between_2_points(hc_trgt1._x, hc_trgt1._y, hc_trgt2._x, hc_trgt2._y); if (ch1k eq 1) { _root.obstackled = 1; } else { _root.obstackled = 0; } base_accuracy = _root.character_arr[firearms_id]; wpn_range = _root.firearms_slot_item.range + perception_range_mod; zomgyiff61666666 = CALC_Dist_Xv_Yv(hc_trgt1._x, hc_trgt1._y, hc_trgt2._x, hc_trgt2._y); distancecheck0 = zomgyiff61666666[0]; distance_spaces = Math.floor(distancecheck0 / spacing); if (distancecheck0 < spacing * 1.5) { base_accuracy += 50; } else { if (distancecheck0 > spacing * 1.5 and distancecheck0 < spacing * 2.5) { base_accuracy += 25; } } if (distance_spaces <= wpn_range) { accuracy1 = base_accuracy - (0.1 / wpn_range) * distance_spaces * base_accuracy; accuracy2 = Math.floor(accuracy1); } else { accuracy1 = base_accuracy - 0.1 * base_accuracy - (distance_spaces - wpn_range) * _root.accuracy_falloff_outofrange; accuracy2 = Math.floor(accuracy1); } _root.hitchance = accuracy2; if (_root.hitchance < 30 and _root.hitchance > 15) { _root.hitchance = 30; } else { if (_root.hitchance < 5) { _root.hitchance = 5; } } if (_root.obstackled eq 1) { _root.hitchance = 'x'; } } } } } function Furry_GettingHurt(byWhom, who) { dmg_min = byWhom.dmg_min; dmg_max = byWhom.dmg_max; trgt = who; dmgresist = trgt.dmg_resist; armorclass = trgt.armor_class; if (who.team != byWhom.team) { trace('Setting Attacker to be victims forced trgt'); who.forcedtarget = byWhom; msg000222 = ''; } else { msg000222 = 'FRIENDLY FIRE '; } criticaldone = 0; if (who eq _root.character_unuit) { thiscriticalchance = byWhom.critical_chance + _root.enemy_critical_plusORminus; } else { thiscriticalchance = byWhom.critical_chance; } if (thiscriticalchance > random(100) and dont_do_criticals != 1) { criticaldone = 1; dmg01 = byWhom.critical_mod * (dmg_max + dmg_min) / 2; } else { dmg01 = dmg_min + random(dmg_max - dmg_min + 1); } dmg02 = dmg01 * ((100 - dmgresist) / 100); trace('DMG 02 ' + dmg02); trace('DMG 01 ' + dmg01); ghghghghjjjyiff = random(100); dmgabsorbed111 = 0; if (armorclass / 2 > ghghghghjjjyiff) { dmg03 = 0; dmgabsorbed111 = 1; } else { if (armorclass > ghghghghjjjyiff) { dmg03 = dmg02 / 2; dmgabsorbed111 = 2; } else { dmg03 = dmg02; } } dmg0 = Math.floor(dmg03); msg = '-' + dmg0; if (criticaldone eq 1) { msg += '*CRITICAL*'; } otletaniedamaga(trgt._x, trgt._y, msg, 'dmg'); trgt.dmg += dmg0; trgt.gotoAndStop(1); trgt.idle.play(); msgadd1111 = ''; msgadd2222 = ''; if (criticaldone eq 1) { msgadd1111 = ' CRITICAL HIT!!! '; } if (dmgabsorbed111 eq 1) { msgadd2222 = ' Damage is fully absorbed by armor (AC Save) '; } else { if (dmgabsorbed111 eq 2) { msgadd2222 = ' Halve the damage is absorbed by armor (1/2AC Save) '; } } pushTextToLog(msg000222 + byWhom.name_ + ' hits ' + trgt.name_ + ' for ' + dmg0 + ' damage. ' + msgadd1111 + msgadd2222); if (trgt.wpn_type eq 'scorpion') { snd_scorpion_hurt(); } else { if (trgt.wpn_type eq 'spider') { snd_spider_hurt(); } } if (byWhom.wpn_type eq 'hammer') { snd_blunt_hit(); } else { if (byWhom.wpn_type eq 'knife') { trs.melee_wpn_hit_1.start(); } } if (criticaldone eq 1) { if (byWhom.wpn_type eq 'scorpion') { trs.critical_scorpion.start(); } else { if (byWhom.wpn_type eq 'spider') { trs.critical_spider.start(); } } } else { if (byWhom.wpn_type eq 'scorpion') { trs.scorpion_bite.start(); } else { if (byWhom.wpn_type eq 'spider') { snd_spider_bite(); } } } } function doDmg(trgt, wpntype) { current_weapon = _root[wpntype + '_slot_item']; skillid = _root[wpntype + '_id']; current_skill = _root.character_arr[skillid]; trace(wpntype + ' ' + current_skill); critical_chance = _root.character_base_critical_chance; dmgresist = trgt.dmg_resist; armorclass = trgt.armor_class; if (trgt.team != current_participant.team) { trace('Setting Attacker to be victims forced trgt'); trgt.forcedtarget = current_participant; msg000222 = ''; } else { msg000222 = ' FRIENDLY FIRE '; } if (wpntype eq 'melee') { current_stat = _root.character_arr[str_id]; } else { current_stat = _root.character_arr[per_id]; } dmg_min = current_weapon.dmg_min; dmg_max = current_weapon.dmg_max; dmg0 = dmg_min + random(dmg_max - dmg_min + 1); if (random(100) < critical_chance) { _root.critical_multiplyer = 3; dmg05 = _root.critical_multiplyer * (dmg_min + dmg_max) / 2; criticaldone = 1; } else { criticaldone = 0; dmg05 = dmg0; } if (dont_do_criticals eq 1) { criticaldone = 0; dmg05 = dmg0; } dmg1 = dmg05 * (1 + (current_stat - 5) * 0.2); if (random(2) eq 1) { dmg_modifier = 1; } else { dmg_modifier = current_skill / 100; } if (current_skill > 100) { dmg_modifier = current_skill / 100; } dmg2 = dmg1 * dmg_modifier; dmg02 = dmg2 * ((100 - dmgresist) / 100); ghghghghjjjyiff = random(100); dmgabsorbed111 = 0; if (armorclass / 2 > ghghghghjjjyiff) { dmg03 = 0; dmgabsorbed111 = 1; } else { if (armorclass > ghghghghjjjyiff) { dmg03 = dmg02 / 2; dmgabsorbed111 = 2; } else { dmg03 = dmg02; } } if (_root.aimed_shot_succeeded eq 1) { _root.aimed_shot_succeeded = 0; if (_root.aimed_bodypart eq 'head') { aimmoddmg = 3; } else { if (_root.aimed_bodypart eq 'torso') { aimmoddmg = 1; } else { aimmoddmg = 1.5; } } trace('AIMED SHOT DMG MOD: ' + aimmoddmg); dmg03 *= aimmoddmg; if (_root.aimed_bodypart eq 'head') { if (dmg03 < dmg_max * 1.2) { dmg03 = dmg_max * 1.5; } } } dmg4 = Math.floor(dmg03); msg = '-' + dmg4; if (criticaldone eq 1) { msg += '*CRITICAL*'; } otletaniedamaga(trgt._x, trgt._y, msg, 'dmg'); trgt.dmg += dmg4; trgt.dmg_done_by_character += dmg4; trgt.idle.play(); if (trgt.dmg > trgt.hp or trgt.dmg eq trgt.hp) { trgt.killedbyfurry = 1; } msgadd1111 = ''; msgadd2222 = ''; if (criticaldone eq 1) { msgadd1111 = ' CRITICAL HIT!!! '; } if (dmgabsorbed111 eq 1) { msgadd2222 = ' Damage is fully absorbed by armor (AC Save) '; } else { if (dmgabsorbed111 eq 2) { msgadd2222 = ' Halve the damage is absorbed by armor (1/2AC Save) '; } } pushTextToLog(msg000222 + 'You hit ' + trgt.name_ + ' for ' + dmg4 + ' damage. ' + msgadd1111 + msgadd2222); if (trgt.wpn_type eq 'scorpion') { snd_scorpion_hurt(); } else { if (trgt.wpn_type eq 'spider') { snd_spider_hurt(); } } } function meleeAttackSequence() { if (_root.mas_step_1 eq 'go') { _root.mas_step_1 = 'done'; yifxxx7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx7 + '_' + yifyyy7]; dontgetnewcoordinates = 0; if (!trgtcell) { _root.melee_attack_pricel = 0; _root.domeleeattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; zomgyiff61666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, ras_tr2._x, ras_tr2._y); distancecheck0 = zomgyiff61666666[0]; if (distancecheck0 > spacing * 1.5) { _root.melee_attack_pricel = 0; _root.domeleeattacksequence = 0; return undefined; } recheck_cell_occupation(); if (ras_tr2.occupied eq 0 or ras_tr2.occupied eq ras_tr1) { _root.domeleeattacksequence = 0; _root.melee_attack_pricel = 0; return undefined; } else { ras_tr2 = ras_tr2.occupied; } ras_tr1.gotoAndStop(_root.melee_slot_item.animation); _root.mas_step_2 = 'go'; } if (_root.mas_step_2 eq 'go') { rotation_face_point2(ras_tr1, ras_tr2._x, ras_tr2._y, 1); if (ras_tr1.animation.dohit eq 1) { ras_tr1.animation.dohit = 0; _root.mas_step_2 = 'done'; _root.mas_step_3 = 'go'; rotation_face_point2(ras_tr1, ras_tr2._x, ras_tr2._y); if (_root.melee_slot_item.id eq 2101) { snd_melee_1(); } else { if (_root.melee_slot_item.id eq 2102 or _root.melee_slot_item.id eq 2103 or _root.melee_slot_item.id eq 2104) { trs.blunt_wpn_vzmah.start(); } } } } if (_root.mas_step_3 eq 'go') { _root.mas_step_3 = 'done'; accuracy2 = _root.character_arr[melee_id]; trace(accuracy2 + ' akk'); --ras_tr1.actpoints; roll20120 = random(100); trace('Melee hit chance = ' + accuracy2); trace('Melee hit roll: ' + roll20120); if (roll20120 < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed!'); } if (do_miss != 1) { if (_root.melee_slot_item.id eq 2101) { trs.melee_wpn_hit_1.start(); } else { if (_root.melee_slot_item.id eq 2102 or _root.melee_slot_item.id eq 2103 or _root.melee_slot_item.id eq 2104) { snd_blunt_hit(); } } doDmg(ras_tr2, 'melee'); _root.domeleeattacksequence = 0; return undefined; } else { _root.domeleeattacksequence = 0; return undefined; } } } function rangedAttackSequence() { if (_root.firearms_slot_item.automatic eq 1) { if (_root.firearm_clickmode eq 1 or _root.firearm_clickmode eq 2) { weapon_mode = 1; } else { trace('MODE 222222222'); weapon_mode = 2; } } else { if (_root.firearms_slot_item.automatic eq -1) { weapon_mode = 3; } else { weapon_mode = 1; } } if (weapon_mode eq 2) { if (_root.ras_step_1 eq 'go') { _root.ras_step_1 = 'done'; if (dontgetnewcoordinates eq 1) { trgtcell = _root.yiff['cell' + yifxxx1117 + '_' + yifyyy1117]; ++shotnumber; } else { shotnumber = 0; yifxxx1117 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy1117 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx1117 + '_' + yifyyy1117]; } dontgetnewcoordinates = 1; if (!trgtcell) { _root.dorangedattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; if (ras_tr1.actpoints > 0) { } else { _root.ranged_attack_pricel = 0; } recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed your target'); } trace('RANGED BATTACK acc ' + accuracy2 + ' DO miss ' + do_miss); dispersion_base = 1; shot_x = ras_tr2._x; shot_y = ras_tr2._y; if (do_miss eq 1) { dispersion = 30; } else { dispersion = dispersion_base + 3 * shotnumber; if (dispersion > 30) { dispersion = 30; } } trace('DISPERSION: ' + dispersion); zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(_root.firearms_slot_item.animation1); _root.ras_step_2 = 'go'; } if (_root.ras_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.shoot eq 1) { ras_tr1.animation.shoot = 0; _root.ras_step_2 = 'done'; _root.ras_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); snd_gunshot_11(); } } if (_root.ras_step_3 eq 'go') { _root.ras_step_3 = 'done'; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 27; otkloneniedula = 8; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } --_root.current_amo_in_gun; if (who_is_being_hit eq 0) { if (ras_tr1.animation.lastshot eq 1 or _root.current_amo_in_gun < 1) { _root.dorangedattacksequence = 0; return undefined; } else { _root.ras_step_1 = 'go'; dontgetnewcoordinates = 1; } } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } doDmg(who_is_being_hit, 'firearms'); if (ras_tr1.animation.lastshot eq 1 or _root.current_amo_in_gun < 1) { _root.dorangedattacksequence = 0; return undefined; } else { _root.ras_step_1 = 'go'; dontgetnewcoordinates = 1; } } } } else { if (weapon_mode eq 1) { if (_root.ras_step_1 eq 'go') { _root.ras_step_1 = 'done'; yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { _root.dorangedattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; if (_root.this_shot_is_aimed eq 1) { chk998 = cell_name_calculation(_root.aimedTarget._x, _root.aimedTarget._y); yifffff6g = chk998[2]; ras_tr2 = _root.yiff[yifffff6g]; } if (ras_tr1.actpoints > 0) { } else { _root.ranged_attack_pricel = 0; } recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; if (_root.this_shot_is_aimed eq 1) { if (random(100) < _root.aimed_accuracy) { do_miss = 0; _root.aimed_shot_succeeded = 1; } else { _root.aimed_shot_succeeded = 0; do_miss = 1; } trace(' RANGED aimed ATTACK acc ' + _root.aimed_accuracy + ' DO miss ' + do_miss); _root.this_shot_is_aimed = 0; } else { if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed your target'); } trace(' RANGED ATTACK acc ' + accuracy2 + ' DO miss ' + do_miss); } dispersion_base = 3; shot_x = ras_tr2._x; shot_y = ras_tr2._y; if (do_miss eq 1) { dispersion = 30; } else { dispersion = dispersion_base; } zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; if (_root.firearm_clickmode eq 1 or _root.firearm_clickmode eq 2) { ras_tr1.gotoAndStop(_root.firearms_slot_item.animation); } else { ras_tr1.gotoAndStop(_root.firearms_slot_item.animation1); } _root.ras_step_2 = 'go'; } if (_root.ras_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.doshoot eq 1) { _root.ras_step_2 = 'done'; _root.ras_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); if (_root.firearms_slot_item.id eq 2511 or _root.firearms_slot_item.id eq 2512) { snd_gunshot_11(); } else { if (_root.firearms_slot_item.id eq 2501 or _root.firearms_slot_item.id eq 2502) { trs.gun_shot_1.start(); } } } } if (_root.ras_step_3 eq 'go') { _root.ras_step_3 = 'done'; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 37; otkloneniedula = 7; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } --_root.current_amo_in_gun; if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } if (who_is_being_hit eq 0) { _root.dorangedattacksequence = 0; return undefined; } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } doDmg(who_is_being_hit, 'firearms'); _root.dorangedattacksequence = 0; return undefined; } } } else { if (weapon_mode eq 3) { if (_root.ras_step_1 eq 'go') { _root.ras_step_1 = 'done'; yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { _root.dorangedattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; if (ras_tr1.actpoints > 0) { } else { _root.ranged_attack_pricel = 0; } recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed your target'); } trace(' RANGED ATTACK acc ' + accuracy2 + ' DO miss ' + do_miss); shot_x = ras_tr2._x; shot_y = ras_tr2._y; dispersion = 20; zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(_root.firearms_slot_item.animation); _root.ras_step_2 = 'go'; } if (_root.ras_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.doshoot eq 1) { _root.ras_step_2 = 'done'; _root.ras_step_3 = 'go'; rotation_face_point2(ras_tr1, shot_x, shot_y); trs.gun_shot_5.start(); } } if (_root.ras_step_3 eq 'go') { _root.ras_step_3 = 'done'; --_root.current_amo_in_gun; var v3 = 0; while (v3 < 8) { if (v3 eq 0 and do_miss eq 0) { zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, 1); } else { zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); } xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 25; otkloneniedula = 4; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } if (who_is_being_hit eq 0) { } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } doDmg(who_is_being_hit, 'firearms'); } ++v3; } _root.dorangedattacksequence = 0; return undefined; } } } } } function ClickCellMakePath() { yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; targetedanimal2009 = 0; if (trgtcell) { if (trgtcell.activatedastarget eq 1) { activate_CHARmovment_function = 1; current_participant.firststep = 1; charmovement_step_12_5 = 'go'; } else { var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; cellname.activatedastarget = 0; ++v2; } ++v3; } recheck_cell_occupation(); if (trgtcell.occupied eq 0 and trgtcell._type_ != 1) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); if (thepath != 'none') { trgtcell.activatedastarget = 1; } tr1.thepath = thepath; } else { if (trgtcell.occupied != 0) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); obstacle_exclude(trgtcell.occupied); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); if (thepath != 'none') { trgtcell.activatedastarget = 1; } thepath.pop(); tr1.thepath = thepath; } } } } } function ClickCellMakePath_peaceMode() { yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (trgtcell._type_ eq 1 or !trgtcell) { return undefined; } recheck_cell_occupation(); if (trgtcell.occupied eq 0) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); } else { if (trgtcell.occupied != 0) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); obstacle_exclude(trgtcell.occupied); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); if (thepath != 'none') { thepath.pop(); } } } if (thepath != 'none') { if (_root.character_encumbered eq 1) { _root.bottommenu.encumbered_message._visible = true; _root.bottommenu.encumbered_message.gotoAndPlay(2); return undefined; } tr1.thepath = thepath; _root.do_peace_walking = 1; peace_charmovement_step_12_5 = 'go'; peace_charmovement_step_13 = 'done'; peace_charmovement_step_13_sidestep1 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; peace_charmovement_step_13_sidestep3_5 = 'done'; peace_charmovement_step_13_sidestep3 = 'done'; peace_charmovement_step_13_sidestep4 = 'done'; removeMovieClip(_root.yiff.shooting_shell.circle); iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('circle', 'circle', iyiff); _root.yiff.shooting_shell.circle._x = _root.yiff._xmouse; _root.yiff.shooting_shell.circle._y = _root.yiff._ymouse; } removeShowPath(); } function CHAR_movement_peace() { if (peace_charmovement_step_12_5 eq 'go') { peace_charmovement_step_12_5 = 'done'; peace_charmovement_step_13 = 'go'; peace_charmovement_step_13_sidestep1 = 'go'; peace_charmovement_step_13_sidestep2 = 'done'; } if (peace_charmovement_step_13 eq 'go') { if (peace_charmovement_step_13_sidestep1 eq 'go') { peace_charmovement_step_13_sidestep1 = 'done'; trgt1 = current_participant; peace_charmovement_step_13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 0) { peace_charmovement_step_13_sidestep2 = 'go'; } else { _root.do_peace_walking = 0; August2008charmovBagfix(); current_participant.gotoAndStop(1); peace_charmovement_step_13 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; } if (peace_charmovement_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; peace_charmovement_step_13 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; peace_charmovement_step_12_5 = 'go'; } else { trgt = current_participant; peace_charmovement_step_13_sidestep3_5 = 'done'; peace_charmovement_step_13_sidestep4 = 'go'; if (peace_charmovement_step_13_sidestep4 eq 'go') { peace_charmovement_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } function August2008charmovBagfix() { if (_root.wehaveclickedsumka != 'none') { tr1 = _root.zalochilis_nasumku; tr2 = _root.character_unuit; yiffdgdfg67867 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg67867[0]; if (distance < spacing * 1.5) { outofrange2010 = 0; } else { outofrange2010 = 1; } if (outofrange2010 != 1) { _root.lootboxmousovered = 'none'; _root.lootBoxOpen(_root.wehaveclickedsumka); } } } function CHAR_movement() { if (charmovement_step_12_5 eq 'go') { charmovement_step_12_5 = 'done'; if (_root.character_encumbered eq 1) { _root.bottommenu.encumbered_message._visible = true; _root.bottommenu.encumbered_message.gotoAndPlay(2); removeShowPath(); activate_CHARmovment_function = 0; August2008charmovBagfix(); current_participant.gotoAndStop(1); return undefined; } if (current_participant.movepoints > 0) { charmovement_step_13 = 'go'; charmovement_step_13_sidestep1 = 'go'; charmovement_step_13_sidestep2 = 'done'; } else { if (current_participant.movepoints <= 0) { removeShowPath(); activate_CHARmovment_function = 0; August2008charmovBagfix(); current_participant.gotoAndStop(1); if (current_participant.actpoints <= 0) { endturnCHeck(); } } } } if (charmovement_step_13 eq 'go') { if (charmovement_step_13_sidestep1 eq 'go') { charmovement_step_13_sidestep1 = 'done'; trgt1 = current_participant; charmovement_step_13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 0) { charmovement_step_13_sidestep2 = 'go'; } else { endturnCHeck(); activate_CHARmovment_function = 0; August2008charmovBagfix(); removeShowPath(); current_participant.gotoAndStop(1); charmovement_step_13 = 'done'; charmovement_step_13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; } if (charmovement_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; if (current_participant.firststep eq 1) { current_participant.firststep = 0; } else { --trgt1.movepoints; } if (do_combat_trace eq 1) { trace('trgt1.movepoints--; Target Cell REACHED'); } charmovement_step_13 = 'done'; charmovement_step_13_sidestep2 = 'done'; charmovement_step_13_sidestep2 = 'done'; charmovement_step_12_5 = 'go'; } else { trgt = current_participant; charmovement_step_13_sidestep3_5 = 'done'; charmovement_step_13_sidestep4 = 'go'; if (charmovement_step_13_sidestep4 eq 'go') { charmovement_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); if (do_combat_trace eq 1) { trace('start walking animation'); } } if (do_combat_trace eq 1) { trace('Moving'); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } function endturnCHeck(forceSkip) { if (current_participant.movepoints eq 0 or forceSkip eq 'true') { if (_root.inventory_menu) { _root.firearm_clickmode = 1; removeMovieClip(_root.inventory_menu); } if (current_participant.actpoints eq 0 or forceSkip eq 'true') { removeShowPath(); manual_controll_on = 0; roundprogress_step2 = 'go'; current_participant.actpoints = 0; current_participant.movepoints = 0; } else { trgt = current_participant; if (do_combat_trace eq 1) { trace('com_att eq 1 - attacking'); } tempvaryiff665 = 'none'; current_participant.current_target = 'none'; tempvaryiff665 = poisk_blijaishei_vidimoi_celi(trgt); current_participant.current_target = tempvaryiff665; if (current_participant.current_target eq 'none') { manual_controll_on = 0; roundprogress_step2 = 'go'; current_participant.actpoints = 0; current_participant.movepoints = 0; } else { endturncheck_DORadiusCHeck = 'go'; } if (endturncheck_DORadiusCHeck eq 'go') { endturncheck_DORadiusCHeck = 'gone'; tr1 = current_participant.current_target; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (distance < tr2.attack_radius) { } else { manual_controll_on = 0; roundprogress_step2 = 'go'; current_participant.actpoints = 0; current_participant.movepoints = 0; } } } } } function CHAR_movement2enemy() { if (mov2trgt_end eq 'go') { mov2trgt_end = 'done'; removeShowPath(); current_participant.gotoAndStop(1); endturnCHeck(); activate_CHARmovment_function2 = 0; } if (mov2trgt_step5 eq 'go') { mov2trgt_step5 = 'done'; tr1 = clicked_target; current_participant.current_target = tr1; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (distance < tr2.attack_radius) { mov2trgt_step8 = 'go'; } else { mov2trgt_step12_5 = 'go'; } } if (mov2trgt_step12_5 eq 'go') { mov2trgt_step12_5 = 'done'; if (current_participant.movepoints > 0) { mov2trgt_step_13 = 'go'; mov2trgt_step_13_sidestep1 = 'go'; mov2trgt_step_13_sidestep2 = 'done'; } else { mov2trgt_end = 'go'; } } if (mov2trgt_step_13 eq 'go') { if (mov2trgt_step_13_sidestep1 eq 'go') { mov2trgt_step_13_sidestep1 = 'done'; trgt1 = current_participant; mov2trgt_step_13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 1) { mov2trgt_step_13_sidestep2 = 'go'; } else { mov2trgt_step_13 = 'done'; mov2trgt_step_13_sidestep2 = 'done'; mov2trgt_step_14 = 'go'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; } if (mov2trgt_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; --trgt1.movepoints; mov2trgt_step_13 = 'done'; mov2trgt_step_13_sidestep2 = 'done'; mov2trgt_step_13_sidestep2 = 'done'; mov2trgt_step5 = 'go'; } else { trgt = current_participant; mov2trgt_step_13_sidestep3_5 = 'done'; mov2trgt_step_13_sidestep4 = 'go'; if (mov2trgt_step_13_sidestep4 eq 'go') { mov2trgt_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } if (mov2trgt_step_14 eq 'go') { mov2trgt_step_14 = 'done'; tr1 = clicked_target; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (distance < tr2.attack_radius) { mov2trgt_step8 = 'go'; } else { mov2trgt_end = 'go'; } } if (mov2trgt_step8 eq 'go') { mov2trgt_step8 = 'done'; if (current_participant.actpoints > 0) { mov2trgt_step9 = 'go'; mov2trgt_step9_part_1 = 'go'; } else { mov2trgt_end = 'go'; } } if (mov2trgt_step9 eq 'go') { trgth = current_participant; if (mov2trgt_step9_part_1 eq 'go') { _root.trigger_1 = 1; mov2trgt_step9_part_1 = 'done'; ranged_att = 'done'; melee_att = 'done'; if (trgth.attack_radius > spacing * 2) { if (do_combat_trace eq 1) { trace('Ranged attack GO!'); } ranged_att = 'go'; ranged_p0 = 'go'; ranged_p_minus1 = 'go'; } else { if (do_combat_trace eq 1) { trace('MELEE attack GO!'); } melee_att = 'go'; melee_att_step_0 = 'go'; trace('mele attack begin'); } } if (ranged_att eq 'go') { if (ranged_p0 eq 'go') { if (ranged_p_minus1 eq 'go') { ranged_p_minus1 eq 'done'; trgth.gotoAndStop(3); if (do_combat_trace eq 1) { trace('Attack animation trgth.gotoAndStop(3);'); } rotation_face_target(current_participant, current_participant.current_target); } if (trgth.animation.shot eq 1) { if (do_combat_trace eq 1) { trace('trgth.animation.shot - true'); } ranged_p0 = 'done'; ranged_p1 = 'go'; returtostop = 'go'; } } if (returtostop eq 'go') { if (trgth.animation.done) { returtostop = 0; trgth.gotoAndStop(1); if (do_combat_trace eq 1) { trace('trgth.gotoAndStop(1);'); } } } if (ranged_p1 eq 'go') { ranged_p1 = 'done'; ranged_p2 = 'go'; trgt1 = trgth; trgt2 = current_participant.current_target; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); xmod = yiffdgdfg[1]; ymod = yiffdgdfg[2]; distancetomuzzle = 11; if (_root.quickcombat eq 1) { bulletspeed = 20; } else { bulletspeed = 10; } if (do_combat_trace eq 1) { trace('Bullet Speed and direction set.'); } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('projectile_1', 'cur_proj', iyiff); trgt3 = _root.yiff.shooting_shell.cur_proj; trgt3._x = trgth._x; trgt3._y = trgth._y; trgt3.xmod = xmod; trgt3.ymod = ymod; trgt3._x += distancetomuzzle * trgt3.xmod; trgt3._y += distancetomuzzle * trgt3.ymod; if (current_participant.insect_type eq 'spider') { trs.spider_ranged_attack.start(); } else { trs.scorp_ranged_attack.start(); } } if (ranged_p2 eq 'go') { trgt2 = current_participant.current_target; yiffdgdf1g = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt3._x, trgt3._y); distance = yiffdgdf1g[0]; if (distance <= bulletspeed) { removeMovieClip(trgt3); ranged_p2 = 'done'; ranged_p3 = 'go'; iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); if (current_participant.en_id eq 3 or current_participant.en_id eq 14) { _root.yiff.shooting_shell.attachMovie('explosion_2', 'cur_expl', iyiff); snd_small_goo(); } else { snd_big_goo(); _root.yiff.shooting_shell.attachMovie('explosion_1', 'cur_expl', iyiff); } _root.yiff.shooting_shell.cur_expl._x = trgt2._x; _root.yiff.shooting_shell.cur_expl._y = trgt2._y; if (do_combat_trace eq 1) { trace('Bullet Remove. Explosion BOOM!'); } } else { if (do_combat_trace eq 1) { trace('Bullet fly'); } xspeed = bulletspeed * trgt3.xmod; yspeed = bulletspeed * trgt3.ymod; trgt3._x += xspeed; trgt3._y += yspeed; } } if (ranged_p3 eq 'go') { if (_root.yiff.shooting_shell.cur_expl) { } else { ranged_p3 = 'done'; ranged_p4 = 'go'; if (do_combat_trace eq 1) { trace('Explosion done'); } } } if (ranged_p4 eq 'go') { ranged_p4 = 'done'; ranged_att = 'done'; mov2trgt_step9 = 'done'; mov2trgt_end = 'go'; current_participant.gotoAndStop(1); --current_participant.actpoints; if (do_combat_trace eq 1) { trace('actpoints--; doSplashDMGnineCells(); (splash ne vsegda)'); } tr1 = current_participant; tr2 = current_participant.current_target; cur_dmg = tr1.dmg_min + 1 + random(tr1.dmg_max - tr1.dmg_min); center_cell_x = (cell_name_calculation(tr2._x, tr2._y))[0]; center_cell_y = (cell_name_calculation(tr2._x, tr2._y))[1]; who_fired = current_participant; if (current_participant.en_id eq 3 or current_participant.en_id eq 14) { tr2.dmg += cur_dmg; msg = '-' + Math.floor(cur_dmg); otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } else { doSplashDMGnineCells(cur_dmg, who_fired, center_cell_x, center_cell_y); } if (do_combat_trace eq 1) { trace('EXP point obtained'); } if (tr1.expp < _root.exp_max) { ++tr1.expp; } } } if (melee_att eq 'go') { if (melee_att_step_0 != 'done') { melee_att_step_0 = 'done'; trgth.current_target.gotoAndStop(1); trgth.current_target.idle.gotoAndPlay(2); trgth.gotoAndStop(3); if (do_combat_trace eq 1) { trace('Start MELEE attack and Target Hurt ANIMATIONS'); } rotation_face_target(current_participant, current_participant.current_target); } if (trgth.animation.ended eq 1) { melee_att = 'done'; mov2trgt_step9 = 'done'; mov2trgt_end = 'go'; current_participant.gotoAndStop(1); --current_participant.actpoints; if (do_combat_trace eq 1) { trace('actpoints--; Melee Attack DOne, dmg scrpt done'); } tr1 = current_participant; tr2 = current_participant.current_target; playsnd = 0; if (random(100) eq _root.miss_chance_percent) { msg = '*MISS*'; otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); playsnd = 1; } else { curdmg444 = tr1.dmg_min + 1 + random(tr1.dmg_max - tr1.dmg_min); tr2.dmg += curdmg444; playsnd = 2; if (random(100) < _root.critical_chance_percent and tr2.en_id != 100 and tr2.en_id != 200) { tr2.dmg += 55000; playsnd = 3; msg = '*CRITICAL HIT*'; otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } else { msg = '-' + Math.floor(curdmg444); if (tr1.poison_time > 0 and tr2.en_id != 100 and tr2.en_id != 200) { otletaniedamaga(tr2._x, tr2._y, msg, 'dmg', '*poisoned*'); } else { otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } } if (playsnd eq 1) { trs.miss.start(); } else { if (playsnd eq 2) { if (tr1.insect_type eq 'spider') { snd_spider_bite(); } else { trs.scorpion_bite.start(); } } else { if (playsnd eq 3) { if (tr1.insect_type eq 'spider') { trs.critical_spider.start(); } else { trs.critical_scorpion.start(); } } } } if (tr2.insect_type eq 'spider') { snd_spider_hurt(); } else { if (tr2.insect_type eq 'scorpion') { snd_scorpion_hurt(); } } if (do_combat_trace eq 1) { trace('EXP point obtained'); } if (tr1.expp < _root.exp_max) { ++tr1.expp; } if (tr1.poison_time > 0 and tr2.poisoned_for_dmg <= tr1.poison_dmg and tr2.en_id != 100 and tr2.en_id != 200) { tr2.poison_time_received = tr1.poison_time; tr2.poisoned_for_dmg = tr1.poison_dmg; if (do_combat_trace eq 1) { trace('Target Poisoned ' + tr2.poison_time_received + ' ' + tr2.poisoned_for_dmg); } } if (tr1.en_id eq 15 and tr2.en_id != 100 and tr2.en_id != 200) { tr2.blackwidowbittten = 1; if (do_combat_trace eq 1) { trace('tr2.blackwidowbittten = 1;'); } } recalcHPindicatoretc(tr2); if (do_combat_trace eq 1) { trace('recalcHPindicatoretc(tr2);'); } } } } } } function character_AP_subtract() { if (_root.firearm_clickmode eq 1) { _root.character_unuit.actpoints -= _root.firearms_slot_item.ap_cost_single; } else { if (_root.firearm_clickmode eq 2) { _root.character_unuit.actpoints -= _root.firearms_slot_item.ap_cost_aim; } else { if (_root.firearm_clickmode eq 3) { _root.character_unuit.actpoints -= _root.firearms_slot_item.ap_cost_burst; } } } } function aimedShotSelectTarget() { _root.ranged_attack_pricel = 0; yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { _root.aimedTarget = 0; return undefined; } recheck_cell_occupation(); if (trgtcell.occupied eq 0) { _root.aimedTarget = 0; return undefined; } _root.aimedTarget = trgtcell.occupied; if (_root.aimedTarget eq _root.character_unuit) { return undefined; } initialiseAimedSHotMenu(); } function characterIntegrity() { characterArmorIntegrity(); _root.character_unuit.armor_class = character_armor_class; _root.character_unuit.dmg_resist = character_dmg_resist; characterStatIntegrity(); characterSkillIntegrity(); } function characterStatIntegrity() { _root.character_arr[str_id] = _root.character_arr[str_base_id]; _root.character_arr[per_id] = _root.character_arr[per_base_id]; _root.character_arr[end_id] = _root.character_arr[end_base_id]; _root.character_arr[cha_id] = _root.character_arr[cha_base_id]; _root.character_arr[int_id] = _root.character_arr[int_base_id]; _root.character_arr[agi_id] = _root.character_arr[agi_base_id]; _root.character_arr[luk_id] = _root.character_arr[luk_base_id]; _root.character_arr[max_weight_id] = 150 + 10 * (_root.character_arr[str_id] - 5); _root.character_unuit.initiative_base = _root.character_arr[agi_id]; charagi = _root.character_arr[agi_id]; if (charagi eq 7) { _root.character_unuit.actpoints_max = 2; } else { if (charagi eq 8) { _root.character_unuit.actpoints_max = 2; } else { if (charagi eq 9) { _root.character_unuit.actpoints_max = 2; } else { if (charagi > 9) { _root.character_unuit.actpoints_max = 2; } else { if (charagi > 4 and charagi < 7) { _root.character_unuit.actpoints_max = 2; } else { if (charagi < 5) { _root.character_unuit.actpoints_max = 2; } } } } } } if (charagi eq 6) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 7) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 8) { _root.character_unuit.movepoints_max = 5; } else { if (charagi > 8) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 5) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 4) { _root.character_unuit.movepoints_max = 5; } else { if (charagi < 4) { _root.character_unuit.movepoints_max = 5; } } } } } } } charend = _root.character_arr[end_id]; charlvl = _root.character_arr[lvl_id]; _root.character_unuit.hp = 70 + charend * 2 + charlvl * charend + (charend - 5) * 8; pr = _root.character_arr[per_id]; if (pr < 5) { perception_range_mod = -1; } else { if (pr eq 5) { perception_range_mod = 0; } else { if (pr eq 6) { perception_range_mod = 1; } else { if (pr eq 7) { perception_range_mod = 1; } else { if (pr eq 8) { perception_range_mod = 2; } else { if (pr eq 9) { perception_range_mod = 2; } else { if (pr eq 10) { perception_range_mod = 3; } else { perception_range_mod = 0; } } } } } } } _root.enemy_critical_plusORminus = 5 - _root.character_arr[luk_id]; _root.character_base_critical_chance = 5 + (5 - _root.character_arr[luk_id]) * 2; if (_root.firearms_slot_item.id eq 2103) { _root.character_base_critical_chance += 10; } if (_root.firearms_slot_item.id eq 2104) { _root.character_base_critical_chance += 5; } } function characterSkillIntegrity() { _root.character_arr[firearms_id] = _root.character_arr[firearms_base_id] + (_root.character_arr[per_id] - 5) * 3; _root.character_arr[melee_id] = _root.character_arr[melee_base_id] + (_root.character_arr[agi_id] - 5) * 3; _root.character_arr[energy_id] = _root.character_arr[energy_base_id] + Math.floor((_root.character_arr[per_id] - 5) * 1.5 + (_root.character_arr[int_id] - 5) * 1.5); _root.character_arr[merchant_id] = _root.character_arr[merchant_base_id] + Math.floor((_root.character_arr[cha_id] - 5) * 5 + (_root.character_arr[int_id] - 5)); _root.character_arr[lockpick_id] = _root.character_arr[lockpick_base_id] + Math.floor((_root.character_arr[per_id] - 5) * 5 + (_root.character_arr[int_id] - 5) * 1.5); _root.character_arr[outdoor_id] = _root.character_arr[outdoor_base_id] + (_root.character_arr[per_id] - 5) * 6; _root.character_arr[medic_id] = _root.character_arr[medic_base_id] + Math.floor((_root.character_arr[per_id] - 5) * 5 + (_root.character_arr[int_id] - 5) * 1.5); _root.character_arr[science_id] = _root.character_arr[science_base_id] + (_root.character_arr[int_id] - 5) * 5; _root.character_stimpackRegenHeal = 20 + 20 * _root.character_arr[medic_id] / 100; } function characterArmorIntegrity() { character_armor_class = 0; character_dmg_resist = 0; if (_root.torso_slot_item and _root.torso_slot_item != 'none' and _root.torso_slot_item != 0) { character_armor_class += _root.torso_slot_item.armor_class; character_dmg_resist += _root.torso_slot_item.dmg_resist; } if (_root.head_slot_item and _root.head_slot_item != 'none' and _root.head_slot_item != 0) { character_armor_class += _root.head_slot_item.armor_class; character_dmg_resist += _root.head_slot_item.dmg_resist; } if (_root.gloves_slot_item and _root.gloves_slot_item != 'none' and _root.gloves_slot_item != 0) { character_armor_class += _root.gloves_slot_item.armor_class; character_dmg_resist += _root.gloves_slot_item.dmg_resist; } if (_root.boots_slot_item and _root.boots_slot_item != 'none' and _root.boots_slot_item != 0) { character_armor_class += _root.boots_slot_item.armor_class; character_dmg_resist += _root.boots_slot_item.dmg_resist; } character_dmg_resist += ((_root.character_arr[end_id] - 5) / 5) * 15; character_armor_class += (_root.character_arr[agi_id] - 5) * 2; if (_root.neck_slot_item.id eq 1501) { character_dmg_resist += 7; } } function savePlayTime() { saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); varlocation1111 = this.saveslot000.data; if (_root.roughtimevar > 0) { } else { _root.roughtimevar = 1; } varlocation1111.timeSpentPreviously = _root.roughtimevar; } function saveCHaracter(dowhat) { saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); trace('AW0_saveslot_' + _root.playingSlot); if (dowhat eq 'save') { pushTextToLog('** Game Saved! **'); varlocation1111 = this.saveslot000.data; varlocation1111.save_exists = 1; varlocation2222 = _root; varlocation1111.inv = {}; trace('character Saved!'); } else { varlocation2222 = this.saveslot000.data; varlocation1111 = _root; } if (dowhat eq 'save') { i = 0; while (i <= 15) { varlocation1111['quick_item_slot_' + i] = varlocation2222['quick_item_slot_' + i]; ++i; } varlocation1111.character_arr = []; arrlength2010 = _root.character_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.character_arr[i] = _root.character_arr[i]; trace(_root.character_arr[i]); ++i; } varlocation1111.general_arr = []; arrlength2010 = _root.inventory_shell.general_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.general_arr[i] = _root.inventory_shell.general_arr[i]; ++i; } varlocation1111.special_arr = []; arrlength2010 = _root.inventory_shell.special_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.special_arr[i] = _root.inventory_shell.special_arr[i]; ++i; } varlocation1111.misc_arr = []; arrlength2010 = _root.inventory_shell.misc_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.misc_arr[i] = _root.inventory_shell.misc_arr[i]; ++i; } } else { _root.character_arr = []; arrlength2010 = varlocation2222.character_arr.length; var i = 0; while (i <= arrlength2010 + 1) { _root.character_arr[i] = varlocation2222.character_arr[i]; ++i; } i = 0; while (i <= 15) { item_to_be_copied = varlocation2222['quick_item_slot_' + i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (var v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } varlocation1111['quick_item_slot_' + i] = newitem; if (newitem.this_object_id > -999) { } else { varlocation1111['quick_item_slot_' + i] = 'none'; } ++i; } _root.inventory_shell.general_arr = []; arrlength2010 = varlocation2222.general_arr.length; var i = 0; while (i <= arrlength2010 + 1) { if (varlocation2222.general_arr[i] eq 'none' or !varlocation2222.general_arr[i]) { _root.inventory_shell.general_arr[i] = 'none'; } else { item_to_be_copied = varlocation2222.general_arr[i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } _root.inventory_shell.general_arr[i] = newitem; } ++i; } _root.inventory_shell.special_arr = []; arrlength2010 = varlocation2222.special_arr.length; var i = 0; while (i <= arrlength2010 + 1) { if (varlocation2222.special_arr[i] eq 'none' or !varlocation2222.special_arr[i]) { _root.inventory_shell.special_arr[i] = 'none'; } else { item_to_be_copied = varlocation2222.special_arr[i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } _root.inventory_shell.special_arr[i] = newitem; } ++i; } _root.inventory_shell.misc_arr = []; arrlength2010 = varlocation2222.misc_arr.length; var i = 0; while (i <= arrlength2010 + 1) { if (varlocation2222.misc_arr[i] eq 'none' or !varlocation2222.misc_arr[i]) { _root.inventory_shell.misc_arr[i] = 'none'; } else { item_to_be_copied = varlocation2222.misc_arr[i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } _root.inventory_shell.misc_arr[i] = newitem; } ++i; } } varlocation1111.object_id = varlocation2222.object_id; varlocation1111.firearms_slot_item = varlocation2222.firearms_slot_item; varlocation1111.melee_slot_item = varlocation2222.melee_slot_item; varlocation1111.torso_slot_item = varlocation2222.torso_slot_item; varlocation1111.ring1_slot_item = varlocation2222.ring1_slot_item; varlocation1111.ring2_slot_item = varlocation2222.ring2_slot_item; varlocation1111.head_slot_item = varlocation2222.head_slot_item; varlocation1111.neck_slot_item = varlocation2222.neck_slot_item; varlocation1111.gloves_slot_item = varlocation2222.gloves_slot_item; varlocation1111.boots_slot_item = varlocation2222.boots_slot_item; } function shootingIntegrity() { if (_root.firearms_slot_item eq 'none') { _root.firearm_clickmode = 1; _root.current_amo_in_gun = 0; } if (_root.current_amo_in_gun < 1) { _root.firearm_clickmode = 4; _root.ranged_attack_pricel = 0; } ammoid = _root.firearms_slot_item.ammo_id; arrayiff777 = inv.misc_arr; _root.current_used_amo_inventory = 0; i = 0; while (i <= 44) { if (arrayiff777[i].id eq ammoid) { _root.current_used_amo_inventory += arrayiff777[i].ammount; } ++i; } } function BTN_rangedAttack() { removeMovieClip(_root.aimed_shot_menu); if (_root.firearm_clickmode eq 1 or _root.firearm_clickmode eq 2 or _root.firearm_clickmode eq 3) { trace(_root.ranged_attack_pricel + ' hhh'); if (_root.ranged_attack_pricel eq 1) { _root.ranged_attack_pricel = 0; trace('desyttttttt'); } else { _root.ranged_attack_pricel = 1; } } else { if (_root.firearm_clickmode eq 4) { if (_root.character_unuit.actpoints > 0) { --_root.character_unuit.actpoints; reloadGun(); _root.firearm_clickmode = 1; } } } } function BTN_firearms_clickmode_up() { ++_root.firearm_clickmode; if (_root.firearm_clickmode > 4) { _root.firearm_clickmode = 1; } if (_root.firearms_slot_item.ap_cost_aim < 0 and _root.firearm_clickmode eq 2) { ++_root.firearm_clickmode; } if (_root.firearms_slot_item.automatic != 1 and _root.firearm_clickmode eq 3) { ++_root.firearm_clickmode; } if (_root.firearms_slot_item.ammo_capacity <= _root.current_amo_in_gun) { if (_root.firearm_clickmode eq 4) { _root.firearm_clickmode = 1; } } } function BTN_firearms_clickmode_down() { --_root.firearm_clickmode; if (_root.firearm_clickmode < 1) { _root.firearm_clickmode = 4; } if (_root.firearms_slot_item.ammo_capacity <= _root.current_amo_in_gun) { if (_root.firearm_clickmode eq 4) { _root.firearm_clickmode = 3; } } if (_root.firearms_slot_item.automatic != 1 and _root.firearm_clickmode eq 3) { --_root.firearm_clickmode; } if (_root.firearms_slot_item.ap_cost_aim < 0 and _root.firearm_clickmode eq 2) { --_root.firearm_clickmode; } } function reloadGun() { trs.reloadwav.start(); shootingIntegrity(); if (_root.current_used_amo_inventory < 1) { trace('reload fail - aut of ammo'); return undefined; } if (_root.firearms_slot_item eq 'none') { return undefined; } ammoid = _root.firearms_slot_item.ammo_id; arrayiff777 = inv.misc_arr; magazin = _root.firearms_slot_item.ammo_capacity; stashfound = -1; i = 0; while (i <= 44) { if (arrayiff777[i].id eq ammoid) { stashfoundID = i; break; } ++i; } if (stashfoundID eq -1) { return undefined; } i = 0; while (i <= 900) { --arrayiff777[stashfoundID].ammount; ++_root.current_amo_in_gun; if (arrayiff777[stashfoundID].ammount < 1) { arrayiff777[stashfoundID] = 'none'; invammshow = arrayiff777[stashfoundID].ammount; if (invammshow eq undefined) { invammshow = 0; } pushTextToLog('Reloading ' + _root.firearms_slot_item.name_ + ': magazine ' + _root.current_amo_in_gun + '/' + magazin + '; inventory ' + invammshow); _root.firearm_clickmode = 1; return undefined; break; } if (_root.current_amo_in_gun >= magazin) { invammshow = arrayiff777[stashfoundID].ammount; if (invammshow eq undefined) { invammshow = 0; } pushTextToLog('Reloading ' + _root.firearms_slot_item.name_ + ': magazine ' + _root.current_amo_in_gun + '/' + magazin + '; inventory ' + invammshow); _root.firearm_clickmode = 1; return undefined; break; } ++i; } } function unloadAmmo() { if (_root.current_amo_in_gun < 1) { return undefined; } ammoid = _root.firearms_slot_item.ammo_id; itrm777 = _root['item' + ammoid]; pushNewItem(itrm777, _root.current_amo_in_gun); pushTextToLog('Unloading ammo from ' + _root.firearms_slot_item.name_ + ': ' + _root.current_amo_in_gun); _root.current_amo_in_gun = 0; } function miscMenuIntegrity() { bottommenu.hpbar.hpmax = _root.character_unuit.hp; if (bottommenu.hpbar.dmg eq 0) { bottommenu.hpbar.gotoAndStop(100); } else { if (bottommenu.hpbar.dmg >= bottommenu.hpbar.hpmax) { bottommenu.hpbar.gotoAndStop(1); } else { hpmax000 = bottommenu.hpbar.hpmax; hp000 = bottommenu.hpbar.hpmax - bottommenu.hpbar.dmg; percent000 = Math.floor((hp000 / hpmax000) * 100); bottommenu.hpbar.gotoAndStop(percent000); } } dmg121 = bottommenu.hpbar.dmg; dmg00000 = _root.character_unuit.dmg; if (dmg121 > dmg00000) { --bottommenu.hpbar.dmg; } else { if (dmg121 < dmg00000) { ++bottommenu.hpbar.dmg; } else { bottommenu.hpbar.dmg = _root.character_unuit.dmg; } } if (_root.character_unuit.actpoints > 0) { bottommenu.ap_indicator._visible = true; bottommenu.ap_indicator.gotoAndStop(_root.character_unuit.actpoints); } else { bottommenu.ap_indicator._visible = false; } if (_root.character_unuit.movepoints > 0) { bottommenu.mp_indicator._visible = true; bottommenu.mp_indicator.gotoAndStop(_root.character_unuit.movepoints); } else { bottommenu.mp_indicator._visible = false; } if (_root.firearms_slot_item.id) { bottommenu.ranged_selector.gotoAndStop(_root.firearms_slot_item.id); } else { bottommenu.ranged_selector.gotoAndStop(1); } if (_root.melee_slot_item.id) { bottommenu.melee_selector.gotoAndStop(_root.melee_slot_item.id); } else { bottommenu.melee_selector.gotoAndStop(1); } i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { bottommenu['quickslot_' + i].id = i; if (_root['quick_item_slot_' + i] and _root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i] != 0) { bottommenu['quickslot_' + i].itembox.gotoAndStop(_root['quick_item_slot_' + i].id); } else { bottommenu['quickslot_' + i].itembox.gotoAndStop(1); } if (_root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i].stackable eq 1) { bottommenu['quickslot_' + i].ammount._visible = true; bottommenu['quickslot_' + i].ammount.showvar = _root['quick_item_slot_' + i].ammount; } else { bottommenu['quickslot_' + i].ammount._visible = false; } if (_root.character_unuit.actpoints < 1) { bottommenu['quickslot_' + i].gotoAndStop(2); } else { bottommenu['quickslot_' + i].gotoAndStop(1); } if (_root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i].quickslotusable != 1) { bottommenu['quickslot_' + i].gotoAndStop(3); } if (_root['quick_item_slot_' + i].ammount < 1) { _root['quick_item_slot_' + i] = 'none'; } } ++i; } if (_root.inventory_menu or _root.character_sheet) { i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { bottommenu['quickslot_' + i]._visible = false; } ++i; } bottommenu.melee_selector._visible = false; bottommenu.ranged_selector._visible = false; } else { i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { bottommenu['quickslot_' + i]._visible = true; } ++i; } bottommenu.melee_selector._visible = true; bottommenu.ranged_selector._visible = true; } } function BTN_quickSlotClick(id) { cur_item = _root['quick_item_slot_' + id]; if (cur_item.id > 2100 and cur_item.id < 3100) { swapWeapons(id); } else { if (cur_item.id eq 3501) { useStimpack(_root['quick_item_slot_' + id]); } else { if (cur_item.id eq 3502) { useLightning(_root['quick_item_slot_' + id]); } else { if (cur_item.id eq 3503) { useFlash(_root['quick_item_slot_' + id]); } else { if (cur_item.id eq 3504) { useSuperStimpack(_root['quick_item_slot_' + id]); } } } } } } function BTN_ROLLOVER_quickslot(id) { cur_item = _root['quick_item_slot_' + id]; if (cur_item.id > 2100 and cur_item.id < 3100) { _root.bottommenu.showinfo = 'Swap weapons? (-1AP)'; } else { if (cur_item.id eq 3501) { _root.bottommenu.showinfo = 'Use stimpack (-1AP)'; } else { if (cur_item.id eq 3502) { _root.bottommenu.showinfo = 'Lightning Drug: AP +1, 30% chance of instand death!'; } else { if (cur_item.id eq 3503) { _root.bottommenu.showinfo = 'Flash Drug: MP +3, 30% chance of instand death!'; } else { if (cur_item.id eq 3504) { _root.bottommenu.showinfo = 'Use super stimpack (-1AP)'; } } } } } } function useSuperStimpack(itemslot) { --_root.character_unuit.actpoints; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; regenheal = Math.floor(_root.character_stimpackRegenHeal); dmgwas11 = trgt.dmg; trgt.dmg = 0; showheal11 = dmgwas11; msg = '+' + Math.floor(showheal11); otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have used a Super Stimpack. ' + Math.floor(showheal11) + ' hit points restored!'); } function useStimpack(itemslot) { --_root.character_unuit.actpoints; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; regenheal = Math.floor(_root.character_stimpackRegenHeal); dmgwas11 = trgt.dmg; trgt.dmg -= regenheal; if (dmgwas11 > regenheal) { showheal11 = regenheal; } else { showheal11 = dmgwas11; } if (trgt.dmg < 0) { trgt.dmg = 0; } msg = '+' + Math.floor(showheal11); otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have used a Stimpack. ' + Math.floor(showheal11) + ' hit points restored!'); } function useLightning(itemslot) { ++_root.character_unuit.actpoints; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; if (random(100) < 30) { trgt.dmg += 9999999; character_has_died_manually = 1; msg = 'AAArhpgghgrrr'; otletaniedamaga(trgt._x, trgt._y, msg, 'DMG'); pushTextToLog('You have died of a heart attack!'); return undefined; } msg = '+1 AP'; otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have succesfuly used Lightning Drug. AP +1.'); } function useFlash(itemslot) { _root.character_unuit.movepoints += 3; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; if (random(100) < 30) { trgt.dmg += 9999999; character_has_died_manually = 1; msg = 'AAArhpgghgrrr'; otletaniedamaga(trgt._x, trgt._y, msg, 'DMG'); pushTextToLog('You have died of a heart attack!'); return undefined; } msg = '+3 MP'; otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have succesfuly used Flash Drug. AP +3.'); } function swapWeapons(quickslot_id) { --_root.character_unuit.actpoints; cur_item = _root['quick_item_slot_' + quickslot_id]; if (cur_item.kuklaslot eq 'firearms') { if (_root.firearms_slot_item != 'none') { unloadAmmo(); } buffer111 = _root.firearms_slot_item; _root.firearms_slot_item = _root['quick_item_slot_' + quickslot_id]; _root['quick_item_slot_' + quickslot_id] = buffer111; buffer111 = 'none'; reloadGun(); } else { if (cur_item.kuklaslot eq 'melee') { trs.meleeinstall.start(); buffer111 = _root.melee_slot_item; _root.melee_slot_item = _root['quick_item_slot_' + quickslot_id]; _root['quick_item_slot_' + quickslot_id] = buffer111; buffer111 = 'none'; } } } function showQueue() { quelength = _root.queue_array.length; nn = 0; while (nn < 120) { removeMovieClip(_root.bottommenu.queyeshell.queue['chibik' + nn]); ++nn; } nn = 0; while (nn < quelength) { if (nn > 16) { return undefined; } chibik = _root.queue_array[nn]; chibik1 = chibik.id; chibik = _root.yiff[chibik1].en_id; if (chibik and chibik != 100 and chibik != 200) { _root.bottommenu.queyeshell.queue.attachMovie('chibiunits_shell', 'chibik' + nn, nn); trgt = _root.bottommenu.queyeshell.queue['chibik' + nn]; trgt._width *= 0.7; trgt._height *= 0.7; trgt._x = nn * 25; trgt._y = 0; trgt.gotoAndStop(chibik + 1); trgt.cacheAsBitmap = true; } ++nn; } } function openCloseInventoryButton() { if (_root.inventory_menu) { _root.firearm_clickmode = 1; removeMovieClip(_root.inventory_menu); } else { _root.character_unuit.actpoints -= 1; _root.inventoryshowyifftimerbbbbb = 999; _root.ranged_attack_pricel = 0; _root.attachMovie('inventory_menu', 'inventory_menu', _root.inventory_menu_depth); _root.inventory_menu._x = 395; _root.inventory_menu._y = 290; i = 0; while (i <= 44) { _root.inventory_menu['inv_slot_' + i].id = i; _root.inventory_menu['inv_slot_' + i].cacheAsBitmap = true; ++i; } } } function initialiseInventory() { _root.inventoryshowyifftimerbbbbb = 99999999; _root.handheld = {}; _root.handheld.item = 'none'; _root.which_arr = inv.general_arr; } function returnEmptySlot(pushwhere) { i = 0; while (i <= 44) { if (pushwhere[i] eq 'none') { return i; } ++i; } return 'none'; } function kuklaslots_maintenance(slot) { if (_root[slot + '_slot_item'].id) { _root.inventory_menu['slot_' + slot].gotoAndStop(_root[slot + '_slot_item'].id); } else { _root.inventory_menu['slot_' + slot].gotoAndStop(1); } } function encumberanceCheck() { if (_root.carrying_weight > _root.character_arr[max_weight_id]) { _root.character_encumbered = 1; } else { _root.character_encumbered = 0; } } function inventoryIntegrity() { _root.inventory_menu.show_cash = 'Cash: ' + _root.character_arr[cash_id] + '$'; carry_weight_calculation(); if (!_root.inventory_menu) { if (!_root.inventory_pickloot) { returnItemFromHand(); } _root.yiff._visible = true; _root.inventory_opened = 0; } else { _root.inventory_menu.show_lvl = 'lvl ' + _root.character_arr[day_id]; _root.yiff._visible = false; if (_root.inventoryshowyifftimerbbbbb > 1) { _root.inventoryshowyifftimerbbbbb = 0; _root.inventory_menu.show_dmgresist = 'DMG Resist: ' + character_dmg_resist + '%'; _root.inventory_menu.show_ac = 'AC: ' + character_armor_class; if (_root.showkukla != 1) { _root.inventory_menu.show_dmgresist = ' '; _root.inventory_menu.show_ac = ' '; } chrk = _root.character_unuit; _root.inventory_menu.statspanel.show_hp = chrk.hp - chrk.dmg + '/' + chrk.hp; _root.inventory_menu.statspanel.show_ap = chrk.actpoints + '/' + chrk.actpoints_max; _root.inventory_menu.statspanel.show_mp = chrk.movepoints + '/' + chrk.movepoints_max; _root.inventory_menu.statspanel.show_ac = character_armor_class; _root.inventory_menu.statspanel.show_dr = character_dmg_resist; _root.inventory_menu.statspanel.show_str = _root.character_arr[str_id]; _root.inventory_menu.statspanel.show_per = _root.character_arr[per_id]; _root.inventory_menu.statspanel.show_end = _root.character_arr[end_id]; _root.inventory_menu.statspanel.show_cha = _root.character_arr[cha_id]; _root.inventory_menu.statspanel.show_int = _root.character_arr[int_id]; _root.inventory_menu.statspanel.show_agi = _root.character_arr[agi_id]; _root.inventory_menu.statspanel.show_luck = _root.character_arr[luk_id]; _root.inventory_menu.statspanel.firearms_show = _root.character_arr[firearms_id] + '%'; _root.inventory_menu.statspanel.melee_show = _root.character_arr[melee_id] + '%'; _root.inventory_menu.statspanel.energy_show = _root.character_arr[energy_id] + '%'; _root.inventory_menu.statspanel.merchant_show = _root.character_arr[merchant_id] + '%'; _root.inventory_menu.statspanel.lockpick_show = _root.character_arr[lockpick_id] + '%'; _root.inventory_menu.statspanel.outdoor_show = _root.character_arr[outdoor_id] + '%'; _root.inventory_menu.statspanel.medic_show = _root.character_arr[medic_id] + '%'; _root.inventory_menu.statspanel.science_show = _root.character_arr[science_id] + '%'; _root.inventory_menu.show_weight = 'Weight: ' + Math.floor(_root.carrying_weight * 10) / 10 + '/' + _root.character_arr[max_weight_id]; } else { _root.inventoryshowyifftimerbbbbb += 0.03333333333333333; } _root.inventory_opened = 1; itemDescription(); kuklaIntegrity(); if (_root.doselect_array eq 1) { _root.which_arr = inv.general_arr; } else { if (_root.doselect_array eq 2) { _root.which_arr = inv.misc_arr; } else { if (_root.doselect_array eq 3) { _root.which_arr = inv.special_arr; } } } kuklaslots_maintenance('torso'); kuklaslots_maintenance('melee'); kuklaslots_maintenance('firearms'); kuklaslots_maintenance('ring1'); kuklaslots_maintenance('ring2'); kuklaslots_maintenance('head'); kuklaslots_maintenance('neck'); kuklaslots_maintenance('gloves'); kuklaslots_maintenance('boots'); if (_root.showkukla eq 0) { _root['quick_item_slot_' + i].ammount._visible = false; i = 0; while (i <= 15) { if (_root.inventory_menu.kuklaANDquick['inv_quickslot_' + i]) { if (_root['quick_item_slot_' + i] and _root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i] != 0) { _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].itembox.gotoAndStop(_root['quick_item_slot_' + i].id); } else { _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].itembox.gotoAndStop(1); _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].ammount._visible = false; } if (_root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i].stackable eq 1) { _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].ammount._visible = true; _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].ammount.showvar = _root['quick_item_slot_' + i].ammount; } else { _root['quick_item_slot_' + i].ammount._visible = false; } } ++i; } } i = 0; while (i <= 44) { if (_root.which_arr[i] eq 'none') { _root.inventory_menu['inv_slot_' + i].itembox.gotoAndStop(1); } else { _root.inventory_menu['inv_slot_' + i].itembox.gotoAndStop(_root.which_arr[i].id); } if (_root.which_arr[i] != 'none' and _root.which_arr[i].stackable eq 1) { _root.inventory_menu['inv_slot_' + i].ammount._visible = true; _root.inventory_menu['inv_slot_' + i].ammount.showvar = _root.which_arr[i].ammount; } else { _root.inventory_menu['inv_slot_' + i].ammount._visible = false; } ++i; } } } function increaseStat(STAT1) { _root.inventoryshowyifftimerbbbbb = 999; if (_root.character_arr[stat_points_id] > 0) { } else { return undefined; } if (_root.character_arr[_root[STAT1 + '_base_id']] > 9) { return undefined; } --_root.character_arr[stat_points_id]; ++_root[STAT1 + '_tempoSHeet']; ++_root.character_arr[_root[STAT1 + '_base_id']]; } function increaseSkill(SKILL1) { _root.inventoryshowyifftimerbbbbb = 999; if (_root.character_arr[skill_points_id] > 0) { } else { return undefined; } if (_root.character_arr[_root[SKILL1 + '_base_id']] > 149) { return undefined; } --_root.character_arr[skill_points_id]; ++_root[SKILL1 + '_tempoSHeet']; ++_root.character_arr[_root[SKILL1 + '_base_id']]; } function charSHeetLVLUPcancel() { _root.inventoryshowyifftimerbbbbb = 999; _root.character_arr[stat_points_id] += _root.str_tempoSHeet; _root.character_arr[stat_points_id] += _root.per_tempoSHeet; _root.character_arr[stat_points_id] += _root.end_tempoSHeet; _root.character_arr[stat_points_id] += _root.cha_tempoSHeet; _root.character_arr[stat_points_id] += _root.int_tempoSHeet; _root.character_arr[stat_points_id] += _root.agi_tempoSHeet; _root.character_arr[stat_points_id] += _root.luk_tempoSHeet; _root.character_arr[str_base_id] -= _root.str_tempoSHeet; _root.character_arr[per_base_id] -= _root.per_tempoSHeet; _root.character_arr[end_base_id] -= _root.end_tempoSHeet; _root.character_arr[cha_base_id] -= _root.cha_tempoSHeet; _root.character_arr[int_base_id] -= _root.int_tempoSHeet; _root.character_arr[agi_base_id] -= _root.agi_tempoSHeet; _root.character_arr[luk_base_id] -= _root.luk_tempoSHeet; _root.character_arr[skill_points_id] += _root.firearms_tempoSHeet; _root.character_arr[skill_points_id] += _root.melee_tempoSHeet; _root.character_arr[skill_points_id] += _root.energy_tempoSHeet; _root.character_arr[skill_points_id] += _root.merchant_tempoSHeet; _root.character_arr[skill_points_id] += _root.lockpick_tempoSHeet; _root.character_arr[skill_points_id] += _root.outdoor_tempoSHeet; _root.character_arr[skill_points_id] += _root.medic_tempoSHeet; _root.character_arr[skill_points_id] += _root.science_tempoSHeet; _root.character_arr[firearms_base_id] -= _root.firearms_tempoSHeet; _root.character_arr[melee_base_id] -= _root.melee_tempoSHeet; _root.character_arr[energy_base_id] -= _root.energy_tempoSHeet; _root.character_arr[lockpick_base_id] -= _root.lockpick_tempoSHeet; _root.character_arr[outdoor_base_id] -= _root.outdoor_tempoSHeet; _root.character_arr[medic_base_id] -= _root.medic_tempoSHeet; _root.character_arr[science_base_id] -= _root.science_tempoSHeet; _root.character_arr[merchant_base_id] -= _root.merchant_tempoSHeet; _root.firearms_tempoSHeet = 0; _root.melee_tempoSHeet = 0; _root.energy_tempoSHeet = 0; _root.merchant_tempoSHeet = 0; _root.lockpick_tempoSHeet = 0; _root.outdoor_tempoSHeet = 0; _root.medic_tempoSHeet = 0; _root.science_tempoSHeet = 0; _root.str_tempoSHeet = 0; _root.per_tempoSHeet = 0; _root.end_tempoSHeet = 0; _root.cha_tempoSHeet = 0; _root.int_tempoSHeet = 0; _root.agi_tempoSHeet = 0; _root.luk_tempoSHeet = 0; } function openCloseCHarsheetButton() { if (_root.character_sheet) { charSHeetLVLUPcancel(); removeMovieClip(_root.character_sheet); } else { _root.str_tempoSHeet = 0; _root.per_tempoSHeet = 0; _root.end_tempoSHeet = 0; _root.cha_tempoSHeet = 0; _root.int_tempoSHeet = 0; _root.agi_tempoSHeet = 0; _root.luk_tempoSHeet = 0; _root.firearms_tempoSHeet = 0; _root.melee_tempoSHeet = 0; _root.energy_tempoSHeet = 0; _root.merchant_tempoSHeet = 0; _root.lockpick_tempoSHeet = 0; _root.outdoor_tempoSHeet = 0; _root.medic_tempoSHeet = 0; _root.science_tempoSHeet = 0; _root.inventoryshowyifftimerbbbbb = 999999; _root.ranged_attack_pricel = 0; _root.attachMovie('character_sheet', 'character_sheet', _root.inventory_menu_depth); _root.character_sheet._x = 0; _root.character_sheet._y = 15; } } function charSHeetIntegrity() { if (!_root.character_sheet) { _root.yiff._visible = true; } else { _root.character_sheet.show_lvl = 'lvl ' + _root.character_arr[day_id]; _root.character_sheet.descriprion.gotoAndStop(1); i = 0; while (i < 20) { hittest2010 = _root.character_sheet['poloska_' + i].hitTest(_root._xmouse, _root._ymouse, true); if (hittest2010 eq true) { _root.character_sheet.descriprion.gotoAndStop(i + 1); break; } ++i; } _root.yiff._visible = false; if (_root.inventoryshowyifftimerbbbbb > 1) { _root.inventoryshowyifftimerbbbbb = 0; if (_root.character_arr[stat_points_id] > 0) { _root.character_sheet.statButtons.gotoAndStop(2); } else { _root.character_sheet.statButtons.gotoAndStop(1); } if (_root.character_arr[skill_points_id] > 0) { _root.character_sheet.skillButtons.gotoAndStop(2); } else { _root.character_sheet.skillButtons.gotoAndStop(1); } if (_root.str_tempoSHeet > 0 or _root.per_tempoSHeet > 0 or _root.end_tempoSHeet > 0 or _root.cha_tempoSHeet > 0 or _root.int_tempoSHeet > 0 or _root.agi_tempoSHeet > 0 or _root.luk_tempoSHeet > 0 or _root.firearms_tempoSHeet > 0 or _root.melee_tempoSHeet > 0 or _root.energy_tempoSHeet > 0 or _root.merchant_tempoSHeet > 0 or _root.lockpick_tempoSHeet > 0 or _root.outdoor_tempoSHeet > 0 or _root.medic_tempoSHeet > 0 or _root.science_tempoSHeet > 0) { _root.character_sheet.cancelSHell.gotoAndStop(2); } else { _root.character_sheet.cancelSHell.gotoAndStop(1); } chrk = _root.character_unuit; _root.character_sheet.show_hp = chrk.hp - chrk.dmg + '/' + chrk.hp; _root.character_sheet.show_ap = chrk.actpoints + '/' + chrk.actpoints_max; _root.character_sheet.show_mp = chrk.movepoints + '/' + chrk.movepoints_max; _root.character_sheet.show_ac = character_armor_class; _root.character_sheet.show_dr = character_dmg_resist; _root.character_sheet.show_str = _root.character_arr[str_id]; _root.character_sheet.show_per = _root.character_arr[per_id]; _root.character_sheet.show_end = _root.character_arr[end_id]; _root.character_sheet.show_cha = _root.character_arr[cha_id]; _root.character_sheet.show_int = _root.character_arr[int_id]; _root.character_sheet.show_agi = _root.character_arr[agi_id]; _root.character_sheet.show_luk = _root.character_arr[luk_id]; _root.character_sheet.d_str.gotoAndStop(_root.character_arr[str_id]); _root.character_sheet.d_per.gotoAndStop(_root.character_arr[per_id]); _root.character_sheet.d_end.gotoAndStop(_root.character_arr[end_id]); _root.character_sheet.d_cha.gotoAndStop(_root.character_arr[cha_id]); _root.character_sheet.d_agi.gotoAndStop(_root.character_arr[agi_id]); _root.character_sheet.d_luk.gotoAndStop(_root.character_arr[luk_id]); _root.character_sheet.d_int.gotoAndStop(_root.character_arr[int_id]); _root.character_sheet.show_fire = _root.character_arr[firearms_id] + '%'; _root.character_sheet.show_melee = _root.character_arr[melee_id] + '%'; _root.character_sheet.show_energy = _root.character_arr[energy_id] + '%'; _root.character_sheet.show_merch = _root.character_arr[merchant_id] + '%'; _root.character_sheet.show_lock = _root.character_arr[lockpick_id] + '%'; _root.character_sheet.show_outdoor = _root.character_arr[outdoor_id] + '%'; _root.character_sheet.show_medic = _root.character_arr[medic_id] + '%'; _root.character_sheet.show_sci = _root.character_arr[science_id] + '%'; _root.character_sheet.points_stat = _root.character_arr[stat_points_id]; _root.character_sheet.points_skill = _root.character_arr[skill_points_id]; _root.character_sheet.points_perk = _root.character_arr[perk_points_id]; } else { _root.inventoryshowyifftimerbbbbb += 0.03333333333333333; } } } function pickUpAllLoot() { if (_root.carrying_weight > _root.character_arr[max_weight_id]) { return undefined; } thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; ik = 0; while (ik < 16) { if (thiscurrentArray77[ik] != 'none') { mitem87871 = thiscurrentArray77[ik]; pushNewItem(mitem87871); if (_root.pushnewitem_failed eq 0) { thiscurrentArray77[ik] = 'none'; } if (_root.carrying_weight > _root.character_arr[max_weight_id]) { break; return undefined; } } ++ik; } } function inventorySLotsIntegrity() { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { return undefined; } if (_root.handheld.item.id < 3000) { _root.doselect_array = 1; } else { if (_root.handheld.item.id > 3000 and _root.handheld.item.id < 5000) { _root.doselect_array = 2; } else { _root.doselect_array = 3; } } } function btn_exit_shop() { unloadAmmo(); saveCHaracter('save'); gotoAndStop(5); } function returnItemFromHand() { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { return undefined; } item = _root.handheld.item; _root.handheld.item = 'none'; if (item.id < 3000) { pushwhere = inv.general_arr; } else { if (item.id > 3000 and item.id < 5000) { pushwhere = inv.misc_arr; } else { pushwhere = inv.special_arr; } } if (item.stackable eq 1) { i = 0; while (i <= 44) { if (pushwhere[i].id eq item.id) { if (custom_ammount > 0) { pushwhere[i].ammount += custom_ammount; } else { pushwhere[i].ammount += item.ammount; } return undefined; } ++i; } } emptyslot = returnEmptySlot(pushwhere); if (emptyslot eq 'none') { return undefined; } newiterm888123 = item; pushwhere[emptyslot] = newiterm888123; } function pushNewItem(item, custom_ammount) { _root.pushnewitem_failed = 0; if (item.id < 3000) { pushwhere = inv.general_arr; } else { if (item.id > 3000 and item.id < 5000) { pushwhere = inv.misc_arr; } else { pushwhere = inv.special_arr; } } if (item.stackable eq 1) { i = 0; while (i <= 44) { if (pushwhere[i].id eq item.id) { if (custom_ammount > 0) { pushwhere[i].ammount += custom_ammount; } else { pushwhere[i].ammount += item.ammount; } return undefined; } ++i; } } emptyslot = returnEmptySlot(pushwhere); if (emptyslot eq 'none') { _root.pushnewitem_failed = 1; return undefined; } newiterm88823 = cloneItem(item); if (custom_ammount > 0) { newiterm88823.ammount = custom_ammount; } pushwhere[emptyslot] = newiterm88823; } function slotClick(id) { _root.inventoryshowyifftimerbbbbb = 9999; if (_root.which_arr[id].ammount > 1 and _root.handheld.item eq 'none') { trs.pickupwav.start(); ammountDispenserSpawn(id); return undefined; } if (id eq 'torso' or id eq 'melee' or id eq 'firearms' or id eq 'head' or id eq 'neck' or id eq 'boots' or id eq 'gloves') { if (_root[id + '_slot_item'] != 'none' and id eq 'firearms') { unloadAmmo(); } if (_root.handheld.item eq 'none') { if (_root[id + '_slot_item'] eq 'none') { } else { trs.pickupwav.start(); _root.handheld.item = _root[id + '_slot_item']; _root[id + '_slot_item'] = 'none'; } } else { if (_root.handheld.item.kuklaslot eq id) { if (id eq 'melee') { trs.meleeinstall.start(); } if (id != 'melee' and id != 'firearms') { trs.passwav.start(); } if (_root[id + '_slot_item'] eq 'none') { _root[id + '_slot_item'] = _root.handheld.item; if (id eq 'firearms') { reloadGun(); } _root.handheld.item = 'none'; } else { buffer = _root[id + '_slot_item']; _root[id + '_slot_item'] = _root.handheld.item; if (id eq 'firearms') { trace('RELOAD'); reloadGun(); } _root.handheld.item = buffer; } } } } else { if (id eq 'ring1' or id eq 'ring2') { if (_root.handheld.item eq 'none') { if (_root[id + '_slot_item'] eq 'none') { } else { trs.pickupwav.start(); _root.handheld.item = _root[id + '_slot_item']; _root[id + '_slot_item'] = 'none'; } } else { if (_root.handheld.item.kuklaslot eq 'ring') { trs.ringwav.start(); if (_root[id + '_slot_item'] eq 'none') { _root[id + '_slot_item'] = _root.handheld.item; _root.handheld.item = 'none'; } else { buffer = _root[id + '_slot_item']; _root[id + '_slot_item'] = _root.handheld.item; _root.handheld.item = buffer; } } } } else { if (id > 99999 and id < 110000) { id_real = id - 100000; thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; trace(thiscurrentArray77[id_real]); if (_root.handheld.item eq 'none') { if (thiscurrentArray77[id_real] eq 'none') { } else { _root.handheld.item = thiscurrentArray77[id_real]; thiscurrentArray77[id_real] = 'none'; trs.pickupwav.start(); } } else { if (thiscurrentArray77[id_real] eq 'none') { thiscurrentArray77[id_real] = _root.handheld.item; _root.handheld.item = 'none'; trs.passwav.start(); } else { trs.pickupwav.start(); if (thiscurrentArray77[id_real].id eq _root.handheld.item.id and _root.handheld.item.stackable eq 1) { thiscurrentArray77[id_real].ammount += _root.handheld.item.ammount; _root.handheld.item = 'none'; return undefined; } else { buffer = thiscurrentArray77[id_real]; thiscurrentArray77[id_real] = _root.handheld.item; _root.handheld.item = buffer; } } } } else { if (id > 199999 and id < 210000) { id_real = id - 200000; if (_root.handheld.item eq 'none') { if (_root['quick_item_slot_' + id_real] eq 'none') { } else { _root.handheld.item = _root['quick_item_slot_' + id_real]; _root['quick_item_slot_' + id_real] = 'none'; trs.pickupwav.start(); } } else { if (_root['quick_item_slot_' + id_real] eq 'none') { _root['quick_item_slot_' + id_real] = _root.handheld.item; _root.handheld.item = 'none'; trs.passwav.start(); } else { trs.pickupwav.start(); if (_root['quick_item_slot_' + id_real].id eq _root.handheld.item.id and _root.handheld.item.stackable eq 1) { _root['quick_item_slot_' + id_real].ammount += _root.handheld.item.ammount; _root.handheld.item = 'none'; return undefined; } else { buffer = _root['quick_item_slot_' + id_real]; _root['quick_item_slot_' + id_real] = _root.handheld.item; _root.handheld.item = buffer; } } } } else { if (_root.handheld.item eq 'none') { if (_root.which_arr[id] eq 'none') { } else { _root.handheld.item = _root.which_arr[id]; _root.which_arr[id] = 'none'; trs.pickupwav.start(); } } else { if (_root.which_arr[id] eq 'none') { _root.which_arr[id] = _root.handheld.item; _root.handheld.item = 'none'; trs.passwav.start(); } else { trs.pickupwav.start(); if (_root.which_arr[id].id eq _root.handheld.item.id and _root.handheld.item.stackable eq 1) { _root.which_arr[id].ammount += _root.handheld.item.ammount; _root.handheld.item = 'none'; return undefined; } else { buffer = _root.which_arr[id]; _root.which_arr[id] = _root.handheld.item; _root.handheld.item = buffer; } } } } } } } } function sortArray() { _root.which_arr.sortOn('id', Array.NUMERIC); } function itemDescription() { if (_root.handheld.item != 'none') { describeitem = _root.handheld.item; } else { describeitem = _root.mousoceritem; } } function kuklaIntegrity_(id) { _root.inventory_menu['slot_' + id].indicator._visible = false; if (describeitem.kuklaslot eq id) { _root.inventory_menu['slot_' + id].indicator._visible = true; } if (_root.showkukla != 1) { _root.inventory_menu['slot_' + id]._visible = false; } else { _root.inventory_menu['slot_' + id]._visible = true; } } function kuklaIntegrity() { kuklaIntegrity_('torso'); kuklaIntegrity_('firearms'); kuklaIntegrity_('melee'); kuklaIntegrity_('head'); kuklaIntegrity_('boots'); kuklaIntegrity_('gloves'); kuklaIntegrity_('neck'); kuklaIntegrity_('ring2'); kuklaIntegrity_('ring1'); _root.inventory_menu.slot_ring1.indicator._visible = false; _root.inventory_menu.slot_ring2.indicator._visible = false; if (describeitem.kuklaslot eq 'ring') { _root.inventory_menu.slot_ring1.indicator._visible = true; _root.inventory_menu.slot_ring2.indicator._visible = true; } } function ammountDispenserIntegrity() { if (_root.ammountDispenser) { if (_root.ammountDispenser.startdrag eq 1) { _root.ammountDispenser._x = _xmouse; _root.ammountDispenser._y = _ymouse; } if (_root.ammountDispenser.plusisdown eq 1 or _root.ammountDispenser.minusisdown eq 1) { modifiertimeryiff += 0.03333333333333333; } else { yiffdone4564561 = 0; modifiertimeryiff = 0; } _root.ammountDispenser.show_moveammount = _root.taking_ammount; if (modifiertimeryiff < 1) { yiff987 = 1; } else { if (modifiertimeryiff >= 1 and modifiertimeryiff < 2) { yiff987 = 2; } else { if (modifiertimeryiff >= 3 and modifiertimeryiff < 5) { yiff987 = 5; } else { if (modifiertimeryiff >= 5) { yiff987 = 10; } } } } if (yiffdone4564561 != 1) { if (_root.ammountDispenser.plusisdown eq 1) { if (itemammount > 0) { itemammount -= yiff987; _root.taking_ammount += yiff987; if (itemammount < 0) { itemammount = 0; _root.taking_ammount = item__.ammount; } } } if (_root.ammountDispenser.minusisdown eq 1) { if (_root.taking_ammount > 0) { itemammount += yiff987; _root.taking_ammount -= yiff987; if (_root.taking_ammount < 0) { _root.taking_ammount = 0; itemammount = item__.ammount; } } } } if (_root.ammountDispenser.plusisdown eq 1 or _root.ammountDispenser.minusisdown eq 1) { if (modifiertimeryiff < 0.5) { yiffdone4564561 = 1; } else { yiffdone4564561 = 0; } } } } function ammountDispenserSpawn(id) { dispensensingslotid = id; item__ = _root.which_arr[id]; itemammount = item__.ammount; modifiertimeryiff = 0; _root.taking_ammount = 0; yiffdone4564561 = 0; _root.attachMovie('ammountDispenser', 'ammountDispenser', _root.ammountDispenser_depth); if (_root.inventory_menu and _root.inventory_menu.thisisshop != 1) { _root.ammountDispenser._x = _root.inventory_menu['inv_slot_' + id]._x + 420; _root.ammountDispenser._y = _root.inventory_menu['inv_slot_' + id]._y + 260; } else { if (_root.inventory_menu and _root.inventory_menu.thisisshop eq 1) { _root.ammountDispenser._x = _root.inventory_menu['inv_slot_' + id]._x + 737; _root.ammountDispenser._y = _root.inventory_menu['inv_slot_' + id]._y + 252; } else { if (_root.inventory_pickloot) { if (id > 99999) { realid = id - 100000; _root.ammountDispenser._x = _root.inventory_pickloot['container_slot_' + realid]._x + 420; _root.ammountDispenser._y = _root.inventory_pickloot['container_slot_' + realid]._y + 260; } else { _root.ammountDispenser._x = _root.inventory_pickloot['inv_slot_' + id]._x + 420; _root.ammountDispenser._y = _root.inventory_pickloot['inv_slot_' + id]._y + 260; } } } } if (_root.ammountDispenser._x > 715) { _root.ammountDispenser._x = 715; } if (_root.ammountDispenser._y > 490) { _root.ammountDispenser._y = 490; } } function BTN_ammountDispenser_ok() { removeMovieClip(_root.ammountDispenser); if (_root.taking_ammount > 0) { _root.handheld.item = cloneItem(item__); _root.handheld.item.ammount = _root.taking_ammount; item__.ammount -= _root.taking_ammount; if (item__.ammount < 1) { _root.which_arr[dispensensingslotid] = 'none'; } } } function BTN_ammountDispenser_takeall() { itemammount = 0; _root.taking_ammount = item__.ammount; } function initialiseAimedSHotMenu() { _root.attachMovie('aimed_shot_menu', 'aimed_shot_menu', _root.inventory_menu_depth); _root.aimed_shot_menu._x = _root.aimedTarget._x + 50; _root.aimed_shot_menu._y = _root.aimedTarget._y; if (_root.aimed_shot_menu._x < 200) { _root.aimed_shot_menu._x = 200; } if (_root.aimed_shot_menu._x > 670) { _root.aimed_shot_menu._x = 670; } if (_root.aimed_shot_menu._y < 105) { _root.aimed_shot_menu._y = 105; } if (_root.aimed_shot_menu._y > 445) { _root.aimed_shot_menu._y = 445; } } function aimedSHotMenu_Integrity() { if (_root.aimed_shot_menu) { acc_head = accuracy2 - 50; if (acc_head < 0) { acc_head = 0; } acc_torso = accuracy2 + 20; if (acc_torso < 0) { acc_torso = 0; } acc_miscbodypart = accuracy2; if (acc_miscbodypart < 0) { acc_miscbodypart = 0; } acc_leg1 = acc_miscbodypart; acc_leg2 = acc_miscbodypart; acc_arm1 = acc_miscbodypart; acc_arm2 = acc_miscbodypart; _root.aimed_shot_menu.show_arm1 = acc_arm1 + '%'; _root.aimed_shot_menu.show_arm2 = acc_arm2 + '%'; _root.aimed_shot_menu.show_leg1 = acc_leg1 + '%'; _root.aimed_shot_menu.show_leg2 = acc_leg2 + '%'; _root.aimed_shot_menu.show_head = acc_head + '%'; _root.aimed_shot_menu.show_torso = acc_torso + '%'; } } function BTN_aim(bodypart) { character_AP_subtract(); _root.this_shot_is_aimed = 1; _root.aimed_bodypart = bodypart; if (bodypart eq 'head') { _root.aimed_accuracy = acc_head; } else { if (bodypart eq 'torso') { _root.aimed_accuracy = acc_torso; } else { _root.aimed_accuracy = acc_miscbodypart; } } dontgetnewcoordinates = 0; _root.start_ranged_attack_delay_timer = 1; _root.dorangedattacksequence = 1; _root.ras_step_1 = 'go'; removeMovieClip(_root.aimed_shot_menu); } function playTimeMonitor() { if (!timertrigger6) { timertrigger6 = 999; } if (timertrigger6 > 0.2) { dotimemon = 1; timertrigger6 = 0; } else { timertrigger6 += 0.03333333333333333; } if (dotimemon eq 1) { dotimemon = 0; roughtimevar = getTimer() - _root.gameStarted_time + _root.timeSpentPreviously; if (roughtimevar < 0) { roughtimevar = 1; } timevar_hours = Math.floor(roughtimevar / 1000 / 3600); timevar_minutes = Math.floor(roughtimevar / 1000 / 60 - timevar_hours * 60); timevar_seconds = Math.floor(roughtimevar / 1000 - timevar_hours * 3600 - timevar_minutes * 60); if (timevar_hours < 10) { timevar_hours = '0' + timevar_hours; } if (timevar_minutes < 10) { timevar_minutes = '0' + timevar_minutes; } if (timevar_seconds < 10) { timevar_seconds = '0' + timevar_seconds; } playtime_formated = timevar_hours + ':' + timevar_minutes + ':' + timevar_seconds; } } function pushTextToLog(txt) { txt2 = _root.playtime_formated + '[' + _root.logcount + ']: ' + txt; txt = txt2; if (_root.logcount < _root.maxEntriesInLOg) { _root.logtextarray[_root.logcount] = txt; } else { _root.temp_text_arr = _root.logtextarray; i = 0; while (i <= _root.maxEntriesInLOg) { _root.logtextarray[i] = _root.temp_text_arr[i + 1]; ++i; } _root.logtextarray[_root.maxEntriesInLOg] = txt; } ++_root.logcount; _root.logendposition = _root.logcount + 10; if (_root.logendposition > _root.logendposition_max) { _root.logendposition = _root.logendposition_max - 5; } if (_root.logcount > _root.maxEntriesInLOg) { _root.logendposition = _root.logendposition_max; } } function logIntegrity() { trgt = _root.logscreen; if (trgt) { if (_root.logendposition > _root.logendposition_max) { _root.logendposition = _root.logendposition_max - 5; } if (!YIFFYIFFTIMESHOWTIMER) { YIFFYIFFTIMESHOWTIMER = 99999; } else { YIFFYIFFTIMESHOWTIMER += 0.03333333333333333; } if (YIFFYIFFTIMESHOWTIMER > 1) { YIFFYIFFTIMESHOWTIMER = 0; trgt.ggghhh.hhhggg.showtime = playtime_formated; } logposmnoj = 352 / _root.logendposition_max; if (polzunok_dragged != 1) { trgt.polzunok._y = _root.logendposition * logposmnoj - 176; } else { _root.logendposition = Math.floor((trgt.polzunok._y + 176) / logposmnoj); trace('FFF' + _root.logendposition); } if (polzunok_dragged eq 1 or dorefreshlog eq 1) { dorefreshlog = 0; txtvar = ''; istart = _root.logendposition - 25; if (istart < 0) { istart = 0; } if (_root.logendposition < 25) { iend = 25; } else { iend = _root.logendposition; } i = istart; while (i <= iend) { if (!logtextarray[i]) { txtvar += ' \n'; } else { txtvar += logtextarray[i] + '\n'; } ++i; } trgt.logTextField.text = txtvar; } if (!logtimertrigger) { logtimertrigger = 999; } if (logtimertrigger > 1) { dorefreshlog = 1; logtimertrigger = 0; } else { logtimertrigger += 0.03333333333333333; } } } function openCloseLog() { if (_root.logscreen) { removeMovieClip(_root.logscreen); } else { _root.attachMovie('logscreen', 'logscreen', _root.logscreen_depth); _root.logscreen._x = 350; _root.logscreen._y = 250; _root.logendposition = _root.logcount + 10; } } function carry_weight_calculation() { yiff7602856210 = 0; yiff76739511 = 0; yiff6767673340 = 0; yiff7602856210 = inventory_weight(inv.general_arr); yiff76739511 = inventory_weight(inv.misc_arr); yiff6767673340 = inventory_weight(inv.special_arr); inventory_weight_result = yiff7602856210 + yiff76739511 + yiff6767673340; slots_weight = 0; if (_root.torso_slot_item.weight > 0) { slots_weight += _root.torso_slot_item.weight; } if (_root.head_slot_item.weight > 0) { slots_weight += _root.head_slot_item.weight; } if (_root.firearms_slot_item.weight > 0) { slots_weight += _root.firearms_slot_item.weight; } if (_root.melee_slot_item.weight > 0) { slots_weight += _root.melee_slot_item.weight; } if (_root.boots_slot_item.weight > 0) { slots_weight += _root.boots_slot_item.weight; } if (_root.gloves_slot_item.weight > 0) { slots_weight += _root.gloves_slot_item.weight; } if (_root.ring2_slot_item.weight > 0) { slots_weight += _root.ring2_slot_item.weight; } if (_root.ring1_slot_item.weight > 0) { slots_weight += _root.ring1_slot_item.weight; } if (_root.neck_slot_item.weight > 0) { slots_weight += _root.neck_slot_item.weight; } quickslotsweight = 0; i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { if (_root['quick_item_slot_' + i] and _root['quick_item_slot_' + i] != 'none') { if (_root['quick_item_slot_' + i].ammount > 1) { quickslotsweight += _root['quick_item_slot_' + i].weight * _root['quick_item_slot_' + i].ammount; } else { quickslotsweight += _root['quick_item_slot_' + i].weight; } } } ++i; } _root.carrying_weight = inventory_weight_result + slots_weight + quickslotsweight; } function inventory_weight(array_) { curweight66 = 0; i = 0; while (i <= 44) { curchk_itm = array_[i]; if (curchk_itm != 0 and curchk_itm != 'none' and curchk_itm.weight > 0) { if (curchk_itm.stackable eq 1) { curweight66 += curchk_itm.weight * curchk_itm.ammount; } else { curweight66 += curchk_itm.weight; } } ++i; } return curweight66; } function createLootArrayForThisUnit(serialnumber, enemyid) { _root['lootArray_' + serialnumber] = []; nabivaemiiMassiv = _root['lootArray_' + serialnumber]; var v2 = 0; while (v2 < 16) { newItemToBeCloned = _root['unit_' + enemyid + '_item_' + v2]; if (newItemToBeCloned and newItemToBeCloned != 'none' and newItemToBeCloned != 0) { chance565671 = _root['unit_' + enemyid + '_chance_' + v2]; if (random(99) < chance565671) { nabivaemiiMassiv[v2] = cloneItem(newItemToBeCloned); ammountmin898 = _root['unit_' + enemyid + '_amm_min_' + v2]; ammountmax898 = _root['unit_' + enemyid + '_amm_max_' + v2]; if (ammountmin898 != ammountmax898) { nabivaemiiMassiv[v2].ammount = ammountmin898 + random(ammountmax898 - ammountmin898 + 1); } } else { nabivaemiiMassiv[v2] = 'none'; } } else { nabivaemiiMassiv[v2] = 'none'; } ++v2; } _root.nabivaemiiMassiv.sortOn('id', Array.NUMERIC); } function lootBoxOpen(serialnunmer) { _root.attachMovie('inventory_pickloot', 'inventory_pickloot', _root.inventory_menu_depth); _root.inventory_pickloot._x = 400; _root.inventory_pickloot._y = 300; _root.inventory_pickloot.serialnunmer = serialnunmer; jk = 0; while (jk < 16) { _root.inventory_pickloot['container_slot_' + jk].id = 100000 + jk; ++jk; } i = 0; while (i <= 44) { _root.inventory_pickloot['inv_slot_' + i].id = i; _root.inventory_pickloot['inv_slot_' + i].cacheAsBitmap = true; ++i; } } function inventoryPickloot_integrity() { if (_root.inventory_pickloot) { _root.inventory_pickloot.show_weight = 'Weight: ' + Math.floor(_root.carrying_weight * 10) / 10 + '/' + _root.character_arr[max_weight_id]; if (_root.carrying_weight > _root.character_arr[max_weight_id]) { _root.inventory_pickloot.encumsign._visible = true; } else { _root.inventory_pickloot.encumsign._visible = false; } _root.lootboxmousovered = 'none'; thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; ik = 0; while (ik < 16) { if (thiscurrentArray77[ik] eq 'none') { _root.inventory_pickloot['container_slot_' + ik].itembox.gotoAndStop(1); } else { _root.inventory_pickloot['container_slot_' + ik].itembox.gotoAndStop(thiscurrentArray77[ik].id); } if (thiscurrentArray77[ik] != 'none' and thiscurrentArray77[ik].stackable eq 1) { _root.inventory_pickloot['container_slot_' + ik].ammount._visible = true; _root.inventory_pickloot['container_slot_' + ik].ammount.showvar = thiscurrentArray77[ik].ammount; } else { _root.inventory_pickloot['container_slot_' + ik].ammount._visible = false; } ++ik; } itemDescription(); kuklaIntegrity(); if (_root.doselect_array eq 1) { _root.which_arr = inv.general_arr; } else { if (_root.doselect_array eq 2) { _root.which_arr = inv.misc_arr; } else { if (_root.doselect_array eq 3) { _root.which_arr = inv.special_arr; } } } i = 0; while (i <= 44) { if (_root.which_arr[i] eq 'none') { _root.inventory_pickloot['inv_slot_' + i].itembox.gotoAndStop(1); } else { _root.inventory_pickloot['inv_slot_' + i].itembox.gotoAndStop(_root.which_arr[i].id); } if (_root.which_arr[i] != 'none' and _root.which_arr[i].stackable eq 1) { _root.inventory_pickloot['inv_slot_' + i].ammount._visible = true; _root.inventory_pickloot['inv_slot_' + i].ammount.showvar = _root.which_arr[i].ammount; } else { _root.inventory_pickloot['inv_slot_' + i].ammount._visible = false; } ++i; } } } function loot_meshki_integrity() { if (_root.lootboxmousovered and _root.lootboxmousovered != 'none') { tr1 = _root.lootboxmousovered; tr2 = _root.character_unuit; yiffdgdfg67867 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg67867[0]; if (distance < spacing * 1.5) { tr1.outofrange = 0; } else { tr1.outofrange = 1; } } i = 0; while (i < _root.enemy_ammount_map) { trgtmeshok = _root.yiff.loot_shell['lootbox' + i]; if (trgtmeshok) { checkMeshokForRemoval(i); tr1 = _root.lootboxmousovered; if (trgtmeshok eq _root.lootboxmousovered) { if (tr1.outofrange eq 1) { tr1.red_highlight._visible = true; tr1.green_highlight._visible = false; _root.bottommenu.showinfo = 'Items on the ground. YOU ARE TO FAR AWAY TO PICK UP. COME CLOSER'; } else { if (tr1.outofrange eq 0) { tr1.red_highlight._visible = false; tr1.green_highlight._visible = true; _root.bottommenu.showinfo = 'Items on the ground. Click to pick up.'; } } } else { trgtmeshok.red_highlight._visible = false; trgtmeshok.green_highlight._visible = false; } } ++i; } i = 99901; while (i < 99951) { trgtmeshok = _root.yiff.loot_shell['lootbox' + i]; if (trgtmeshok) { checkMeshokForRemoval(i); tr1 = _root.lootboxmousovered; if (trgtmeshok eq _root.lootboxmousovered) { if (tr1.outofrange eq 1) { tr1.red_highlight._visible = true; tr1.green_highlight._visible = false; _root.bottommenu.showinfo = 'Items on the ground. YOU ARE TO FAR AWAY TO PICK UP. COME CLOSER'; } else { if (tr1.outofrange eq 0) { tr1.red_highlight._visible = false; tr1.green_highlight._visible = true; _root.bottommenu.showinfo = 'Items on the ground. Click to pick up.'; } } if (_root.lootboxmousovered.serialnum eq 99906) { _root.bottommenu.showinfo = '?'; } } else { trgtmeshok.red_highlight._visible = false; trgtmeshok.green_highlight._visible = false; } } ++i; } } function checkMeshokForRemoval(meshokid) { tcurArr65563 = _root['lootArray_' + meshokid]; trgtmeshok = _root.yiff.loot_shell['lootbox' + meshokid]; if (_root.inventory_pickloot and _root.inventory_pickloot.serialnunmer eq meshokid) { return undefined; } uk = 0; while (uk < 16) { if (tcurArr65563[uk] and tcurArr65563[uk] != 'none' and tcurArr65563[uk] != 0) { return undefined; } ++uk; } removeMovieClip(trgtmeshok); } function shop_description_integrity() { if (!_root.inventory_menu and !_root.inventory_pickloot) { return undefined; } _root.inventory_menu.showvar_sellfor = ''; describeitemid = 1; if (_root.handheld.item != 'none' and _root.handheld.item) { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.handheld.item.price * _root.character_arr[merchant_id] / 100); describeitemid = _root.handheld.item.id; if (_root.handheld.item.stackable eq 1) { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.handheld.item.price * _root.character_arr[merchant_id] / 100) * _root.handheld.item.ammount; } } else { if (_root.mousoceritem and _root.mousoceritem != '' and _root.mousoceritem != 'none') { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.mousoceritem.price * _root.character_arr[merchant_id] / 100); describeitemid = _root.mousoceritem.id; if (_root.mousoceritem.stackable eq 1) { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.mousoceritem.price * _root.character_arr[merchant_id] / 100) * _root.mousoceritem.ammount; } } else { if (_root.showthispriceinscreen > 0 and _root.showthispriceinscreen != '') { _root.inventory_menu.showvar_sellfor = 'PURCHASE FOR: ' + _root.showthispriceinscreen + '$'; describeitemid = _root.shopitemmousoverid; } } } if (describeitemid eq 5001) { _root.inventory_menu.showvar_sellfor = ''; } _root.inventory_menu.description.gotoAndStop(describeitemid); _root.inventory_pickloot.description.gotoAndStop(describeitemid); } function sellItem() { if (_root.handheld.item != 'none' and _root.handheld.item) { } else { return undefined; } trs.cashreg.start(); your_price = Math.floor(_root.handheld.item.price * _root.character_arr[merchant_id] / 100); if (_root.handheld.item.stackable eq 1) { your_price *= _root.handheld.item.ammount; } _root.character_arr[cash_id] += your_price; _root.handheld.item = 'none'; _root.inventory_menu.seller.cash_fly.play(); _root.inventory_menu.seller.cash_fly.textcore.showvar = '+' + your_price + '$'; } function showprice(id, ammount, discount) { _root.shopitemmousoverid = id; basic_price = _root['item' + id].price; mercskill = _root.character_arr[merchant_id]; nadbavka_k_cene = 0.95; actual_ptice = (basic_price + nadbavka_k_cene * basic_price * ((100 - mercskill) / 100)) * ammount; actual_ptice -= actual_ptice * discount / 100; actual_ptice = Math.floor(actual_ptice); return actual_ptice; } function buy_item(id, ammount, discount) { if (_root.handheld.item != 'none' and _root.handheld.item) { return undefined; } actual_ptice = showprice(id, ammount, discount); wehavecash = _root.character_arr[cash_id]; if (wehavecash < actual_ptice) { trs.tudut.start(); _root.inventory_menu.flash_no_cash.play(); return undefined; } _root.character_arr[cash_id] -= actual_ptice; item = _root['item' + id]; newiterm87723 = cloneItem(item); newiterm87723.ammount = ammount; _root.handheld.item = newiterm87723; _root.inventory_menu.cash_fly.textcore.showvar = '-' + actual_ptice + '$'; _root.inventory_menu.cash_fly.play(); trs.cashreg.start(); } function spawn_tutorial_menu() { bottommenu.tutbut._visible = false; _root.attachMovie('tutorial_menu', 'tutorial_menu', _root.tutorial_menu_depth); _root.tutorial_menu.cacheAsBitmap = true; _root.tutorial_menu._x = 242.9; _root.tutorial_menu._y = 133.4; } function openRemoveMainMenu() { if (_root.main_menu) { removeMovieClip(_root.main_menu); } else { _root.attachMovie('main_menu', 'main_menu', _root.main_menu_depth); _root.main_menu.cacheAsBitmap = true; _root.main_menu._x = 79; _root.main_menu._y = 22; } } function checkIfNoEnemiesEndRound() { if (_root.currentround > 1 and _root.currentround < 999999 and manual_controll_on eq 1 and _root.peaqce_mode != 1 and all_enemies_has_been_exterminated != 1) { } else { return undefined; } check2010_participants = []; i = 0; while (i < enemy_ammount) { trgt2010 = _root.yiff['enemy_' + i]; if (trgt2010 and trgt2010.dmg < trgt2010.hp and trgt2010.en_id != 999) { _root.check2010_participants.push(this['enemy_identificator' + i]); } ++i; } if (_root.check2010_participants.length eq 0) { all_enemies_has_been_exterminated = 1; _root.endturnCHeck('true'); } } function endMission() { if (_root.loadmap_id eq 2) { _root.character_arr[mission_1_status_id] = 1; } if (_root.loadmap_id eq 11) { _root.character_arr[mission_2_status_id] = 1; } if (_root.loadmap_id eq 12) { _root.character_arr[mission_3_status_id] = 1; } if (_root.loadmap_id eq 13) { _root.character_arr[mission_4_status_id] = 1; } if (_root.loadmap_id eq 14) { _root.character_arr[mission_5_status_id] = 1; } if (_root.loadmap_id eq 100) { _root.character_arr[mission_6_status_id] = 1; } } function map12_insectcheck_gopnikiatack() { allinsectskilled = 1; i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id eq 4 or trgtt2010.en_id eq 7) { allinsectskilled = 0; break; } ++i; } if (allinsectskilled != 1) { return undefined; } i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id != 999) { trgtt2010.team = 666; } ++i; } } function map12_insectcheck_gopnikiatack2() { allinsectskilled = 1; i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id < 30) { allinsectskilled = 0; break; } ++i; } if (allinsectskilled != 1) { return undefined; } i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id != 999) { trgtt2010.team = 666; } ++i; } } function map14_insectcheck_gopnikiatack() { allinsectskilled = 1; i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id eq 4 or trgtt2010.en_id eq 7) { allinsectskilled = 0; break; } ++i; } if (allinsectskilled != 1) { return undefined; } i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id != 999) { trgtt2010.team = 666; } ++i; } } function death_integrity() { check2010_participants = []; i = 0; while (i < enemy_ammount) { trgt2010 = _root.yiff['enemy_' + i]; if (trgt2010.en_id eq 999) { if (character_has_died_manually != 1) { return undefined; } } ++i; } if (!_root.death_menu and character_has_died_manually eq 1) { _root.attachMovie('death_menu', 'death_menu', _root.death_menu_depth); _root.death_menu.cacheAsBitmap = true; _root.death_menu._x = 413.8; _root.death_menu._y = 217; } if (!_root.death_menu and _root.currentround > 1) { _root.attachMovie('death_menu', 'death_menu', _root.death_menu_depth); _root.death_menu.cacheAsBitmap = true; _root.death_menu._x = 413.8; _root.death_menu._y = 217; } if (_root.currentround > 1 or character_has_died_manually eq 1) { if (characterIsDead != 1) { characterIsDead = 1; trace('pizdos'); current_participant.actpoints = 0; current_participant.movepoints = 0; _root.firearms_slot_item = 'none'; _root.melee_slot_item = 'none'; _root.quick_item_slot_0 = 'none'; _root.quick_item_slot_1 = 'none'; _root.quick_item_slot_2 = 'none'; _root.quick_item_slot_3 = 'none'; if (_root.peaqce_mode != 1) { if (_root.manual_controll_on eq 1 and _root.activate_CHARmovment_function != 1 and _root.activate_CHARmovment_function2 != 1) { _root.endturnCHeck('true'); } } } } character_has_died_manually = 0; } function exit_after_death_button() { characterIsDead = 0; _root.savePlayTime(); _root.deleteAllDrestroyEverything(); } if (_root.start_new_character eq 1) { object_id = 0; } _root.current_amo_in_gun = 0; _root.peaqce_mode = 0; spacing = 26; shag = spacing / 3; field_length = 28; field_height = 21; _root.accuracy_falloff_outofrange = 7; _root.bulletDOhitradius = spacing * 0.8; _root.ranged_attack_pricel = 0; _root.dorangedattacksequence = 0; _root.ras_step_1 = 0; _root.do_peace_walking = 0; step_4R = 'yiff'; shotnumberredefine = 1; _root.logtextarray = []; _root.temp_text_arr = []; _root.logcount = 0; _root.logendposition_max = 1000; logendposition = _root.logendposition_max - 1; _root.maxEntriesInLOg = _root.logendposition_max - 17; _root.doselect_array = 1; _root.torso_slot_item = 'none'; _root.head_slot_item = 'none'; _root.neck_slot_item = 'none'; _root.ring1_slot_item = 'none'; _root.ring2_slot_item = 'none'; _root.gloves_slot_item = 'none'; _root.boots_slot_item = 'none'; _root.melee_slot_item = 'none'; _root.firearms_slot_item = 'none'; _root.quick_item_slot_0 = 'none'; _root.quick_item_slot_1 = 'none'; _root.quick_item_slot_2 = 'none'; _root.quick_item_slot_3 = 'none'; _root.quick_item_slot_4 = 'none'; _root.quick_item_slot_5 = 'none'; _root.quick_item_slot_6 = 'none'; _root.quick_item_slot_7 = 'none'; _root.quick_item_slot_8 = 'none'; _root.quick_item_slot_9 = 'none'; _root.quick_item_slot_10 = 'none'; sloc = _root; _root.global_acceleration = 2; doshowpath = false; do_combat_trace = 1; _root.dononstop = 0; _root.hp_modifier = 1; spacing = 26; field_length = 28; field_height = 21; _root.idlingmode = 1; _root.do_surrounded_check = 0; game_location_x = 65; game_location_y = 5; _root.cells_depth = 1; _root.corpse_shell_depth = 998; _root.loot_shell_depth = 999; _root.destination_depth = 1000; _root.pathpointer_depth = 1500; _root.scorpion_base_depth = 3300; _root.spider_base_depth = 3350; _root.enemy_depth = 4000; _root.character_depth = 5200; _root.background_up_depth = 9000; _root.shooting_shell_depth = 12000; _root.base_showhp_depth = 13000; _root.sound_shell_depth = 3000; _root.kursor_depth = 2000; _root.main_menu_depth = 986; _root.death_menu_depth = 985; _root.upper_indicators_depth = 992; _root.tutorial_menu_depth = 990; _root.ammountDispenser_depth = 980; _root.logscreen_depth = 960; _root.inventory_menu_depth = 950; _root.showroundcount_depth = 850; _root.bottommenu_depth = 600; _root.status_layer_depth = 300; _root.yiff_depth = 100; _root.background_floor_depth = 1; _root.idle_time_max = 0.34; _root.lootboxmousovered = 'none'; dotrace = 0; _root.enemy_name_999 = 'Nathaniel'; _root.enemy_hp_999 = 100; _root.enemy_speed_999 = 1.9; _root.enemy_initiative_999 = 5999; _root.enemy_movepoints_999 = 5; _root.enemy_actpoints_999 = 2; _root.enemy_visibility_radius_999 = 200; _root.enemy_team_999 = 999; _root.enemy_attack_radius_999 = 1.6 * spacing; _root.enemy_dmg_min_999 = 60; _root.enemy_dmg_max_999 = 110; _root.enemy_fogreduce_radius_999 = 2; _root.enemy_poison_dmg_999 = 0; _root.enemy_poison_time_999 = 0; _root.enemy_regeneration_percent_999 = 5; _root.enemy_control_999 = 1; _root.enemy_cost_999 = 3; _root.enemy_dmg_resist_999 = 0; _root.enemy_armor_class_999 = 0; _root.enemy_name_500 = 'Black Team Raider (Pistol)'; _root.enemy_hp_500 = 50; _root.enemy_speed_500 = 1.4; _root.enemy_initiative_500 = 5; _root.enemy_movepoints_500 = 4; _root.enemy_actpoints_500 = 2; _root.enemy_visibility_radius_500 = 400; _root.enemy_team_500 = 500; _root.enemy_attack_radius_500 = 8 * spacing; _root.enemy_poison_dmg_500 = 0; _root.enemy_poison_time_500 = 0; _root.enemy_regeneration_percent_500 = 5; _root.enemy_dmg_min_500 = 5; _root.enemy_dmg_max_500 = 15; _root.enemy_critical_chance_500 = 5; _root.enemy_critical_mod_500 = 3; _root.enemy_ranged_500 = 1; _root.enemy_accuracy_500 = 70; _root.enemy_wpn_type_500 = 'gun1'; _root.enemy_ammoingun_500 = 10; _root.enemy_dmg_resist_500 = 10; _root.enemy_armor_class_500 = 5; _root.enemy_experience_500 = 100; _root.enemy_name_501 = 'Blue Team Raider (Pistol)'; _root.enemy_hp_501 = 50; _root.enemy_speed_501 = 1.4; _root.enemy_initiative_501 = 5; _root.enemy_movepoints_501 = 4; _root.enemy_actpoints_501 = 2; _root.enemy_visibility_radius_501 = 400; _root.enemy_team_501 = 500; _root.enemy_attack_radius_501 = 8 * spacing; _root.enemy_poison_dmg_501 = 0; _root.enemy_poison_time_501 = 0; _root.enemy_regeneration_percent_501 = 5; _root.enemy_dmg_min_501 = 5; _root.enemy_dmg_max_501 = 15; _root.enemy_critical_chance_501 = 5; _root.enemy_critical_mod_501 = 3; _root.enemy_ranged_501 = 1; _root.enemy_accuracy_501 = 70; _root.enemy_wpn_type_501 = 'gun1'; _root.enemy_ammoingun_501 = 10; _root.enemy_dmg_resist_501 = 10; _root.enemy_armor_class_501 = 5; _root.enemy_experience_501 = 100; _root.enemy_name_510 = 'Black Team Raider (Assault Rifle)'; _root.enemy_hp_510 = 70; _root.enemy_speed_510 = 1.4; _root.enemy_initiative_510 = 5; _root.enemy_movepoints_510 = 5; _root.enemy_actpoints_510 = 1; _root.enemy_visibility_radius_510 = 400; _root.enemy_team_510 = 500; _root.enemy_attack_radius_510 = 8 * spacing; _root.enemy_poison_dmg_510 = 0; _root.enemy_poison_time_510 = 0; _root.enemy_regeneration_percent_510 = 5; _root.enemy_dmg_min_510 = 5; _root.enemy_dmg_max_510 = 12; _root.enemy_critical_chance_510 = 5; _root.enemy_critical_mod_510 = 3; _root.enemy_ranged_510 = 1; _root.enemy_accuracy_510 = 50; _root.enemy_wpn_type_510 = 'gun2'; _root.enemy_ammoingun_510 = 30; _root.enemy_dmg_resist_510 = 5; _root.enemy_armor_class_510 = 7; _root.enemy_experience_510 = 100; _root.enemy_name_511 = 'Blue Team Raider (Assault Rifle)'; _root.enemy_hp_511 = 70; _root.enemy_speed_511 = 1.4; _root.enemy_initiative_511 = 5; _root.enemy_movepoints_511 = 5; _root.enemy_actpoints_511 = 1; _root.enemy_visibility_radius_511 = 400; _root.enemy_team_511 = 500; _root.enemy_attack_radius_511 = 8 * spacing; _root.enemy_poison_dmg_511 = 0; _root.enemy_poison_time_511 = 0; _root.enemy_regeneration_percent_511 = 5; _root.enemy_dmg_min_511 = 5; _root.enemy_dmg_max_511 = 12; _root.enemy_critical_chance_511 = 5; _root.enemy_critical_mod_511 = 3; _root.enemy_ranged_511 = 1; _root.enemy_accuracy_511 = 50; _root.enemy_wpn_type_511 = 'gun2'; _root.enemy_ammoingun_511 = 30; _root.enemy_dmg_resist_511 = 5; _root.enemy_armor_class_511 = 7; _root.enemy_experience_511 = 100; _root.enemy_name_520 = 'Black Team Raider (Shotgun)'; _root.enemy_hp_520 = 50; _root.enemy_speed_520 = 1.4; _root.enemy_initiative_520 = 5; _root.enemy_movepoints_520 = 5; _root.enemy_actpoints_520 = 1; _root.enemy_visibility_radius_520 = 400; _root.enemy_team_520 = 500; _root.enemy_attack_radius_520 = 8 * spacing; _root.enemy_poison_dmg_520 = 0; _root.enemy_poison_time_520 = 0; _root.enemy_regeneration_percent_520 = 5; _root.enemy_dmg_min_520 = 1; _root.enemy_dmg_max_520 = 10; _root.enemy_critical_chance_520 = 5; _root.enemy_critical_mod_520 = 3; _root.enemy_ranged_520 = 1; _root.enemy_accuracy_520 = 70; _root.enemy_wpn_type_520 = 'gun3'; _root.enemy_ammoingun_520 = 2; _root.enemy_dmg_resist_520 = 10; _root.enemy_armor_class_520 = 5; _root.enemy_experience_520 = 100; _root.enemy_name_521 = 'Blue Team Raider (Shotgun)'; _root.enemy_hp_521 = 50; _root.enemy_speed_521 = 1.4; _root.enemy_initiative_521 = 5; _root.enemy_movepoints_521 = 5; _root.enemy_actpoints_521 = 1; _root.enemy_visibility_radius_521 = 400; _root.enemy_team_521 = 500; _root.enemy_attack_radius_521 = 8 * spacing; _root.enemy_poison_dmg_521 = 0; _root.enemy_poison_time_521 = 0; _root.enemy_regeneration_percent_521 = 5; _root.enemy_dmg_min_521 = 1; _root.enemy_dmg_max_521 = 10; _root.enemy_critical_chance_521 = 5; _root.enemy_critical_mod_521 = 3; _root.enemy_ranged_521 = 1; _root.enemy_accuracy_521 = 70; _root.enemy_wpn_type_521 = 'gun3'; _root.enemy_ammoingun_521 = 2; _root.enemy_dmg_resist_521 = 10; _root.enemy_armor_class_521 = 5; _root.enemy_experience_521 = 100; _root.enemy_name_530 = 'Black Team Raider (Sledgehammer)'; _root.enemy_hp_530 = 50; _root.enemy_speed_530 = 1.4; _root.enemy_initiative_530 = 5; _root.enemy_movepoints_530 = 5; _root.enemy_actpoints_530 = 1; _root.enemy_visibility_radius_530 = 700; _root.enemy_team_530 = 500; _root.enemy_attack_radius_530 = 2 * spacing; _root.enemy_poison_dmg_530 = 0; _root.enemy_poison_time_530 = 0; _root.enemy_regeneration_percent_530 = 5; _root.enemy_dmg_min_530 = 15; _root.enemy_dmg_max_530 = 25; _root.enemy_critical_chance_530 = 5; _root.enemy_critical_mod_530 = 3; _root.enemy_ranged_530 = 0; _root.enemy_accuracy_530 = 55; _root.enemy_wpn_type_530 = 'hammer'; _root.enemy_dmg_resist_530 = 10; _root.enemy_armor_class_530 = 5; _root.enemy_experience_530 = 100; _root.enemy_name_531 = 'Blue Team Raider (Sledgehammer)'; _root.enemy_hp_531 = 50; _root.enemy_speed_531 = 1.4; _root.enemy_initiative_531 = 5; _root.enemy_movepoints_531 = 5; _root.enemy_actpoints_531 = 1; _root.enemy_visibility_radius_531 = 700; _root.enemy_team_531 = 500; _root.enemy_attack_radius_531 = 2 * spacing; _root.enemy_poison_dmg_531 = 0; _root.enemy_poison_time_531 = 0; _root.enemy_regeneration_percent_531 = 5; _root.enemy_dmg_min_531 = 15; _root.enemy_dmg_max_531 = 25; _root.enemy_critical_chance_531 = 5; _root.enemy_critical_mod_531 = 3; _root.enemy_ranged_531 = 0; _root.enemy_accuracy_531 = 55; _root.enemy_wpn_type_531 = 'hammer'; _root.enemy_dmg_resist_531 = 10; _root.enemy_armor_class_531 = 5; _root.enemy_experience_531 = 100; _root.enemy_name_540 = 'Black Team Raider (Knife)'; _root.enemy_hp_540 = 50; _root.enemy_speed_540 = 1.4; _root.enemy_initiative_540 = 5; _root.enemy_movepoints_540 = 5; _root.enemy_actpoints_540 = 1; _root.enemy_visibility_radius_540 = 700; _root.enemy_team_540 = 500; _root.enemy_attack_radius_540 = 2 * spacing; _root.enemy_poison_dmg_540 = 0; _root.enemy_poison_time_540 = 0; _root.enemy_regeneration_percent_540 = 5; _root.enemy_dmg_min_540 = 5; _root.enemy_dmg_max_540 = 25; _root.enemy_critical_chance_540 = 3; _root.enemy_critical_mod_540 = 3; _root.enemy_ranged_540 = 0; _root.enemy_accuracy_540 = 55; _root.enemy_wpn_type_540 = 'knife'; _root.enemy_dmg_resist_540 = 10; _root.enemy_armor_class_540 = 5; _root.enemy_experience_540 = 100; _root.enemy_name_541 = 'Blue Team Raider (Knife)'; _root.enemy_hp_541 = 50; _root.enemy_speed_541 = 1.4; _root.enemy_initiative_541 = 5; _root.enemy_movepoints_541 = 5; _root.enemy_actpoints_541 = 1; _root.enemy_visibility_radius_541 = 700; _root.enemy_team_541 = 500; _root.enemy_attack_radius_541 = 2 * spacing; _root.enemy_poison_dmg_541 = 0; _root.enemy_poison_time_541 = 0; _root.enemy_regeneration_percent_541 = 5; _root.enemy_dmg_min_541 = 5; _root.enemy_dmg_max_541 = 25; _root.enemy_critical_chance_541 = 3; _root.enemy_critical_mod_541 = 3; _root.enemy_ranged_541 = 0; _root.enemy_accuracy_541 = 55; _root.enemy_wpn_type_541 = 'knife'; _root.enemy_dmg_resist_541 = 10; _root.enemy_armor_class_541 = 5; _root.enemy_experience_541 = 100; _root.enemy_name_1 = 'Black Scorpion'; _root.enemy_hp_1 = 50; _root.enemy_speed_1 = 1.3; _root.enemy_initiative_1 = 5; _root.enemy_movepoints_1 = 3; _root.enemy_actpoints_1 = 1; _root.enemy_visibility_radius_1 = 200; _root.enemy_team_1 = 2; _root.enemy_attack_radius_1 = 1.6 * spacing; _root.enemy_dmg_min_1 = 5; _root.enemy_dmg_max_1 = 15; _root.enemy_fogreduce_radius_1 = 2; _root.enemy_poison_dmg_1 = 0; _root.enemy_poison_time_1 = 0; _root.enemy_regeneration_percent_1 = 5; _root.enemy_critical_chance_1 = 50; _root.enemy_critical_mod_1 = 3; _root.enemy_wpn_type_1 = 'scorpion'; _root.enemy_accuracy_1 = 55; _root.enemy_dmg_resist_1 = 30; _root.enemy_armor_class_1 = 20; _root.enemy_experience_1 = 100; _root.enemy_name_3 = 'Blue Spider'; _root.enemy_hp_3 = 55; _root.enemy_speed_3 = 2; _root.enemy_initiative_3 = 7; _root.enemy_movepoints_3 = 7; _root.enemy_actpoints_3 = 2; _root.enemy_visibility_radius_3 = 300; _root.enemy_team_3 = 1; _root.enemy_attack_radius_3 = 1.6 * spacing; _root.enemy_dmg_min_3 = 15; _root.enemy_dmg_max_3 = 30; _root.enemy_critical_chance_3 = 5; _root.enemy_critical_mod_3 = 2; _root.enemy_wpn_type_3 = 'spider'; _root.enemy_accuracy_3 = 55; _root.enemy_dmg_resist_3 = 3; _root.enemy_armor_class_3 = 3; _root.enemy_experience_3 = 100; _root.enemy_name_4 = 'Giant Spider'; _root.enemy_hp_4 = 60; _root.enemy_speed_4 = 1.7; _root.enemy_initiative_4 = 6; _root.enemy_movepoints_4 = 5; _root.enemy_actpoints_4 = 2; _root.enemy_visibility_radius_4 = 200; _root.enemy_team_4 = 1; _root.enemy_attack_radius_4 = 1.6 * spacing; _root.enemy_dmg_min_4 = 15; _root.enemy_dmg_max_4 = 25; _root.enemy_fogreduce_radius_4 = 2; _root.enemy_poison_dmg_4 = 0; _root.enemy_poison_time_4 = 0; _root.enemy_regeneration_percent_4 = 5; _root.enemy_critical_chance_4 = 5; _root.enemy_critical_mod_4 = 2; _root.enemy_wpn_type_4 = 'spider'; _root.enemy_accuracy_4 = 55; _root.enemy_dmg_resist_4 = 3; _root.enemy_armor_class_4 = 3; _root.enemy_experience_4 = 100; _root.enemy_name_5 = 'Red Spider'; _root.enemy_hp_5 = 80; _root.enemy_speed_5 = 1.7; _root.enemy_initiative_5 = 5; _root.enemy_movepoints_5 = 5; _root.enemy_actpoints_5 = 1; _root.enemy_visibility_radius_5 = 300; _root.enemy_team_5 = 1; _root.enemy_attack_radius_5 = 1.6 * spacing; _root.enemy_dmg_min_5 = 30; _root.enemy_dmg_max_5 = 40; _root.enemy_critical_chance_5 = 15; _root.enemy_critical_mod_5 = 2; _root.enemy_wpn_type_5 = 'spider'; _root.enemy_accuracy_5 = 70; _root.enemy_dmg_resist_5 = 3; _root.enemy_armor_class_5 = 3; _root.enemy_experience_5 = 100; _root.enemy_name_6 = 'Matriarch Spider'; _root.enemy_hp_6 = 120; _root.enemy_speed_6 = 1.7; _root.enemy_initiative_6 = 5; _root.enemy_movepoints_6 = 5; _root.enemy_actpoints_6 = 4; _root.enemy_visibility_radius_6 = 300; _root.enemy_team_6 = 1; _root.enemy_attack_radius_6 = 1.6 * spacing; _root.enemy_dmg_min_6 = 20; _root.enemy_dmg_max_6 = 35; _root.enemy_critical_chance_6 = 10; _root.enemy_critical_mod_6 = 2; _root.enemy_wpn_type_6 = 'spider'; _root.enemy_accuracy_6 = 85; _root.enemy_dmg_resist_6 = 20; _root.enemy_armor_class_6 = 30; _root.enemy_experience_6 = 500; _root.enemy_name_7 = 'Giant Scorpion'; _root.enemy_hp_7 = 30; _root.enemy_speed_7 = 1.3; _root.enemy_initiative_7 = 6; _root.enemy_movepoints_7 = 5; _root.enemy_actpoints_7 = 1; _root.enemy_visibility_radius_7 = 200; _root.enemy_team_7 = 2; _root.enemy_attack_radius_7 = 1.6 * spacing; _root.enemy_dmg_min_7 = 5; _root.enemy_dmg_max_7 = 20; _root.enemy_fogreduce_radius_7 = 2; _root.enemy_poison_dmg_7 = 0; _root.enemy_poison_time_7 = 0; _root.enemy_regeneration_percent_7 = 10; _root.enemy_critical_chance_7 = 5; _root.enemy_critical_mod_7 = 3; _root.enemy_wpn_type_7 = 'scorpion'; _root.enemy_accuracy_7 = 55; _root.enemy_dmg_resist_7 = 3; _root.enemy_armor_class_7 = 10; _root.enemy_experience_7 = 100; _root.enemy_name_8 = 'King Scorpion'; _root.enemy_hp_8 = 100; _root.enemy_speed_8 = 1.3; _root.enemy_initiative_8 = 3; _root.enemy_movepoints_8 = 4; _root.enemy_actpoints_8 = 1; _root.enemy_visibility_radius_8 = 200; _root.enemy_team_8 = 2; _root.enemy_attack_radius_8 = 1.6 * spacing; _root.enemy_dmg_min_8 = 30; _root.enemy_dmg_max_8 = 60; _root.enemy_critical_chance_8 = 5; _root.enemy_critical_mod_8 = 2; _root.enemy_wpn_type_8 = 'scorpion'; _root.enemy_accuracy_8 = 65; _root.enemy_dmg_resist_8 = 30; _root.enemy_armor_class_8 = 30; _root.enemy_experience_8 = 100; _root.enemy_name_9 = 'Deadly Scorpion'; _root.enemy_hp_9 = 60; _root.enemy_speed_9 = 1.7; _root.enemy_initiative_9 = 6; _root.enemy_movepoints_9 = 8; _root.enemy_actpoints_9 = 5; _root.enemy_visibility_radius_9 = 300; _root.enemy_team_9 = 1; _root.enemy_attack_radius_9 = 1.6 * spacing; _root.enemy_dmg_min_9 = 1; _root.enemy_dmg_max_9 = 13; _root.enemy_critical_chance_9 = 50; _root.enemy_critical_mod_9 = 3; _root.enemy_wpn_type_9 = 'spider'; _root.enemy_accuracy_9 = 66; _root.enemy_dmg_resist_9 = 3; _root.enemy_armor_class_9 = 8; _root.enemy_experience_9 = 100; _root.game_paused = 0; _root.quickcombat = 0; _root.docharactermovement = 0; _root.lockcharcontrolz = 1; _root.currentround = 1; _root.game_on_hold = 1; _root.trgtdfrprprts = 0; _root.hprc1 = 1; _root.hprc2 = 0; _root.kursor_timer = 0; _root.globalshowhp = 0; spider_base_dead = 0; _root.playmovesndradnomiser = 30; scorpion_base_dead = 0; _root.enemy_kills = 0; _root.your_kills = 0; _root.yiffyifftimer569311 = 999; _root.yiffyifftimer666777 = 999; _root.yiffyifftimer666777yiff = 999; _root.yiffyifftimergtgsef6 = 9999; _root.free_psi_points = 4; _root.tutorial_step = 0; asasasayiff = 0; yiff555666777timer = 0; yiff555666777timer2 = 0; all_enemies_has_been_exterminated = 0; dosoundrestarttimeryiff = 1; dfgfdgdfgiii8888 = 0; if (!_root.sound_volume) { _root.sound_volume = 70; } if (!_root.music_volume) { _root.music_volume = 30; } if (!_root.music_on) { _root.music_on = 1; } i = 0; while (i < 20) { _root['trigger_' + i] = 0; ++i; } roundprogress_step1 = 'done'; manual_controll_on = 0; activate_CHARmovment_function = 0; _root.mouseoverunit = 0; clicked_target = 0; _root.question_mode = 0; _root.showgrid = 0; item1101 = {}; ti = item1101; ti.id = 1101; ti.kuklaslot = 'head'; ti.name_ = 'Zeleniy Shlem'; ti.armor_class = 1; ti.dmg_resist = 3; ti.stackable = 0; ti.weight = 3; ti.quickslotusable = 0; ti.price = 100; item1201 = {}; ti = item1201; ti.id = 1201; ti.kuklaslot = 'torso'; ti.name_ = 'Leather Jacket'; ti.armor_class = 5; ti.dmg_resist = 10; ti.stackable = 0; ti.weight = 4; ti.quickslotusable = 0; ti.price = 300; item1202 = {}; ti = item1202; ti.id = 1202; ti.kuklaslot = 'torso'; ti.name_ = 'Military Armor'; ti.armor_class = 10; ti.dmg_resist = 30; ti.stackable = 0; ti.weight = 15; ti.quickslotusable = 0; ti.price = 1900; item1203 = {}; ti = item1203; ti.id = 1203; ti.kuklaslot = 'torso'; ti.name_ = 'Military Armor MK2'; ti.armor_class = 15; ti.dmg_resist = 50; ti.stackable = 0; ti.weight = 15; ti.quickslotusable = 0; ti.price = 6000; item1204 = {}; ti = item1204; ti.id = 1204; ti.kuklaslot = 'torso'; ti.name_ = 'Exceptional Leather Jacket'; ti.armor_class = 5; ti.dmg_resist = 20; ti.stackable = 0; ti.weight = 4; ti.quickslotusable = 0; ti.price = 600; item1301 = {}; ti = item1301; ti.id = 1301; ti.kuklaslot = 'gloves'; ti.name_ = 'Half Finger Gloves'; ti.armor_class = 0; ti.dmg_resist = 5; ti.stackable = 0; ti.weight = 0.5; ti.quickslotusable = 0; ti.price = 100; item1302 = {}; ti = item1302; ti.id = 1302; ti.kuklaslot = 'gloves'; ti.name_ = 'Heavy Gloves'; ti.armor_class = 2; ti.dmg_resist = 6; ti.stackable = 0; ti.weight = 0.5; ti.quickslotusable = 0; ti.price = 300; item1401 = {}; ti = item1401; ti.id = 1401; ti.kuklaslot = 'boots'; ti.name_ = 'Leather Boots'; ti.armor_class = 1; ti.dmg_resist = 5; ti.stackable = 0; ti.weight = 5; ti.quickslotusable = 0; ti.price = 200; item1501 = {}; ti = item1501; ti.id = 1501; ti.kuklaslot = 'neck'; ti.name_ = 'Kinetic Shield Generator'; ti.stackable = 0; ti.weight = 5; ti.quickslotusable = 0; ti.price = 1000; item1502 = {}; ti = item1502; ti.id = 1502; ti.kuklaslot = 'neck'; ti.name_ = 'Teeth Mecklace'; ti.stackable = 0; ti.weight = 1; ti.quickslotusable = 0; ti.price = 300; item1601 = {}; ti = item1601; ti.id = 1601; ti.kuklaslot = 'ring'; ti.name_ = 'Bronze Ring'; ti.stackable = 0; ti.weight = 0; ti.quickslotusable = 0; ti.price = 100; item1602 = {}; ti = item1602; ti.id = 1602; ti.kuklaslot = 'ring'; ti.name_ = 'Silver Ring'; ti.stackable = 0; ti.weight = 0; ti.quickslotusable = 0; ti.price = 200; item1603 = {}; ti = item1603; ti.id = 1603; ti.kuklaslot = 'ring'; ti.name_ = 'Gold Ring'; ti.stackable = 0; ti.weight = 0; ti.quickslotusable = 0; ti.price = 400; item2101 = {}; ti = item2101; ti.id = 2101; ti.kuklaslot = 'melee'; ti.name_ = 'Knife'; ti.dmg_min = 15; ti.dmg_max = 20; ti.animation = 5; ti.stackable = 0; ti.weight = 1; ti.quickslotusable = 1; ti.price = 150; item2102 = {}; ti = item2102; ti.id = 2102; ti.kuklaslot = 'melee'; ti.name_ = 'Sledgehammer'; ti.dmg_min = 20; ti.dmg_max = 40; ti.animation = 6; ti.stackable = 0; ti.weight = 20; ti.quickslotusable = 1; ti.price = 200; item2103 = {}; ti = item2103; ti.id = 2103; ti.kuklaslot = 'melee'; ti.name_ = 'Thor'; ti.dmg_min = 25; ti.dmg_max = 45; ti.animation = 6; ti.stackable = 0; ti.weight = 10; ti.quickslotusable = 1; ti.price = 55; item2104 = {}; ti = item2104; ti.id = 2104; ti.kuklaslot = 'melee'; ti.name_ = 'Bloody Axe'; ti.dmg_min = 15; ti.dmg_max = 45; ti.animation = 6; ti.stackable = 0; ti.weight = 10; ti.quickslotusable = 1; ti.price = 200; item2501 = {}; ti = item2501; ti.id = 2501; ti.kuklaslot = 'firearms'; ti.name_ = 'Urban Rat'; ti.dmg_min = 5; ti.dmg_max = 20; ti.range = 6; ti.animation = 3; ti.automatic = 0; ti.stackable = 0; ti.ammo_capacity = 12; ti.ammo_id = 3101; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 3; ti.quickslotusable = 1; ti.price = 300; item2502 = {}; ti = item2502; ti.id = 2502; ti.kuklaslot = 'firearms'; ti.name_ = 'Urban Rat [EX]'; ti.dmg_min = 7; ti.dmg_max = 25; ti.range = 7; ti.animation = 3; ti.automatic = 0; ti.stackable = 0; ti.ammo_capacity = 12; ti.ammo_id = 3101; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 5; ti.quickslotusable = 1; ti.price = 4500; item2505 = {}; ti = item2505; ti.id = 2505; ti.kuklaslot = 'firearms'; ti.name_ = 'Sawed-off shotgun'; ti.dmg_min = 1; ti.dmg_max = 10; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 2; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 4; ti.quickslotusable = 1; ti.price = 500; item2506 = {}; ti = item2506; ti.id = 2506; ti.kuklaslot = 'firearms'; ti.name_ = 'Sawed-off shotgun [EX]'; ti.dmg_min = 2; ti.dmg_max = 12; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 8; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 5; ti.quickslotusable = 1; ti.price = 3000; item2507 = {}; ti = item2507; ti.id = 2507; ti.kuklaslot = 'firearms'; ti.name_ = 'Combat Shotgun'; ti.dmg_min = 2; ti.dmg_max = 12; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 8; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 8; ti.quickslotusable = 1; ti.price = 4000; item2508 = {}; ti = item2508; ti.id = 2508; ti.kuklaslot = 'firearms'; ti.name_ = 'Combat Shotgun [EX]'; ti.dmg_min = 2; ti.dmg_max = 14; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 8; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 8; ti.quickslotusable = 1; ti.price = 7000; item2511 = {}; ti = item2511; ti.id = 2511; ti.kuklaslot = 'firearms'; ti.name_ = 'FL-26 Riffle'; ti.dmg_min = 5; ti.dmg_max = 15; ti.range = 6; ti.animation = 8; ti.animation1 = 4; ti.automatic = 1; ti.stackable = 0; ti.ammo_capacity = 30; ti.ammo_id = 3102; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 6; ti.quickslotusable = 1; ti.price = 600; item2512 = {}; ti = item2512; ti.id = 2512; ti.kuklaslot = 'firearms'; ti.name_ = 'FL-26 Riffle [EX]'; ti.dmg_min = 5; ti.dmg_max = 25; ti.range = 6; ti.animation = 8; ti.animation1 = 4; ti.automatic = 1; ti.stackable = 0; ti.ammo_capacity = 30; ti.ammo_id = 3102; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 6; ti.quickslotusable = 1; ti.price = 8000; item2513 = {}; ti = item2513; ti.id = 2513; ti.kuklaslot = 'firearms'; ti.name_ = 'OverKill Gun'; ti.dmg_min = 20; ti.dmg_max = 30; ti.range = 9; ti.animation = 8; ti.animation1 = 4; ti.automatic = 1; ti.stackable = 0; ti.ammo_capacity = 60; ti.ammo_id = 3102; ti.ap_cost_single = 1; ti.ap_cost_aim = 1; ti.ap_cost_burst = 1; ti.weight = 16; ti.quickslotusable = 1; ti.price = 80000; item3101 = {}; ti = item3101; ti.id = 3101; ti.name_ = 'ammo1 pistolet'; ti.ammount = 10; ti.stackable = 1; ti.weight = 0.05; ti.quickslotusable = 0; ti.price = 50; item3102 = {}; ti = item3102; ti.id = 3102; ti.name_ = 'ammo2 pulemet'; ti.ammount = 50; ti.stackable = 1; ti.weight = 0.05; ti.quickslotusable = 0; ti.price = 90; item3103 = {}; ti = item3103; ti.id = 3103; ti.name_ = 'ammo3 shotgun'; ti.ammount = 10; ti.stackable = 1; ti.weight = 0.08; ti.quickslotusable = 0; ti.price = 80; item3501 = {}; ti = item3501; ti.id = 3501; ti.name_ = 'Stimpack'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.1; ti.quickslotusable = 1; ti.price = 100; item3502 = {}; ti = item3502; ti.id = 3502; ti.name_ = 'Lightning'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.1; ti.quickslotusable = 1; ti.price = 800; item3503 = {}; ti = item3503; ti.id = 3503; ti.name_ = 'Flash'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.1; ti.quickslotusable = 1; ti.price = 800; item3504 = {}; ti = item3504; ti.id = 3504; ti.name_ = 'Super Stimpack'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.5; ti.quickslotusable = 1; ti.price = 1000; item3601 = {}; ti = item3601; ti.id = 3601; ti.name_ = 'Scorpion Tail'; ti.ammount = 1; ti.stackable = 1; ti.weight = 10; ti.quickslotusable = 0; ti.price = 200; item3602 = {}; ti = item3602; ti.id = 3602; ti.name_ = 'Spider Meat'; ti.ammount = 1; ti.stackable = 1; ti.weight = 8; ti.quickslotusable = 0; ti.price = 200; item3603 = {}; ti = item3603; ti.id = 3603; ti.name_ = 'Scorpion King Tail'; ti.ammount = 1; ti.stackable = 1; ti.weight = 15; ti.quickslotusable = 0; ti.price = 600; item3604 = {}; ti = item3604; ti.id = 3604; ti.name_ = 'Giant Spider Egg'; ti.ammount = 1; ti.stackable = 1; ti.weight = 15; ti.quickslotusable = 0; ti.price = 600; item5001 = {}; ti = item5001; ti.id = 5001; ti.name_ = 'PDA#1'; ti.ammount = 1; ti.stackable = 0; ti.weight = 1; ti.quickslotusable = 0; ti.price = 700; unit_3_item_0 = item3602; unit_3_amm_min_0 = 1; unit_3_amm_max_0 = 1; unit_3_chance_0 = 50; unit_4_item_0 = item3602; unit_4_amm_min_0 = 1; unit_4_amm_max_0 = 1; unit_4_chance_0 = 50; unit_5_item_0 = item3602; unit_5_amm_min_0 = 1; unit_5_amm_max_0 = 1; unit_5_chance_0 = 70; unit_6_item_0 = item3602; unit_6_amm_min_0 = 1; unit_6_amm_max_0 = 5; unit_6_chance_0 = 100; unit_6_item_1 = item3604; unit_6_amm_min_1 = 1; unit_6_amm_max_1 = 1; unit_6_chance_1 = 100; unit_7_item_0 = item3601; unit_7_amm_min_0 = 1; unit_7_amm_max_0 = 1; unit_7_chance_0 = 50; unit_8_item_0 = item3603; unit_8_amm_min_0 = 1; unit_8_amm_max_0 = 1; unit_8_chance_0 = 100; unit_1_item_0 = item3601; unit_1_amm_min_0 = 1; unit_1_amm_max_0 = 1; unit_1_chance_0 = 50; unit_510_item_0 = item2511; unit_510_amm_min_0 = 1; unit_510_amm_max_0 = 1; unit_510_chance_0 = 100; unit_510_item_1 = item3102; unit_510_amm_min_1 = 8; unit_510_amm_max_1 = 18; unit_510_chance_1 = 100; unit_510_item_2 = item3501; unit_510_amm_min_2 = 1; unit_510_amm_max_2 = 2; unit_510_chance_2 = 70; unit_510_item_3 = item1301; unit_510_amm_min_3 = 1; unit_510_amm_max_3 = 1; unit_510_chance_3 = 30; unit_510_item_4 = item1401; unit_510_amm_min_4 = 1; unit_510_amm_max_4 = 1; unit_510_chance_4 = 30; unit_510_item_5 = item1601; unit_510_amm_min_5 = 1; unit_510_amm_max_5 = 1; unit_510_chance_5 = 30; unit_510_item_6 = item3502; unit_510_amm_min_6 = 1; unit_510_amm_max_6 = 1; unit_510_chance_6 = 3; unit_510_item_7 = item3503; unit_510_amm_min_7 = 1; unit_510_amm_max_7 = 1; unit_510_chance_7 = 3; unit_510_item_8 = item1204; unit_510_amm_min_8 = 1; unit_510_amm_max_8 = 1; unit_510_chance_8 = 5; unit_510_item_9 = item1602; unit_510_amm_min_9 = 1; unit_510_amm_max_9 = 1; unit_510_chance_9 = 10; unit_510_item_10 = item1603; unit_510_amm_min_10 = 1; unit_510_amm_max_10 = 1; unit_510_chance_10 = 5; unit_510_item_11 = item3504; unit_510_amm_min_11 = 1; unit_510_amm_max_11 = 1; unit_510_chance_11 = 4; unit_510_item_12 = item5001; unit_510_amm_min_12 = 1; unit_510_amm_max_12 = 1; unit_510_chance_12 = 3; unit_510_item_13 = item1501; unit_510_amm_min_13 = 1; unit_510_amm_max_13 = 1; unit_510_chance_13 = 3; unit_510_item_14 = item1502; unit_510_amm_min_14 = 1; unit_510_amm_max_14 = 1; unit_510_chance_14 = 5; unit_500_item_0 = item2501; unit_500_amm_min_0 = 1; unit_500_amm_max_0 = 1; unit_500_chance_0 = 100; unit_500_item_1 = item3101; unit_500_amm_min_1 = 10; unit_500_amm_max_1 = 30; unit_500_chance_1 = 100; unit_500_item_2 = item3501; unit_500_amm_min_2 = 1; unit_500_amm_max_2 = 2; unit_500_chance_2 = 70; unit_500_item_3 = item1301; unit_500_amm_min_3 = 1; unit_500_amm_max_3 = 1; unit_500_chance_3 = 30; unit_500_item_4 = item1401; unit_500_amm_min_4 = 1; unit_500_amm_max_4 = 1; unit_500_chance_4 = 30; unit_500_item_5 = item1601; unit_500_amm_min_5 = 1; unit_500_amm_max_5 = 1; unit_500_chance_5 = 30; unit_500_item_6 = item3502; unit_500_amm_min_6 = 1; unit_500_amm_max_6 = 1; unit_500_chance_6 = 4; unit_500_item_7 = item3503; unit_500_amm_min_7 = 1; unit_500_amm_max_7 = 1; unit_500_chance_7 = 3; unit_500_item_8 = item1204; unit_500_amm_min_8 = 1; unit_500_amm_max_8 = 1; unit_500_chance_8 = 5; unit_500_item_9 = item1602; unit_500_amm_min_9 = 1; unit_500_amm_max_9 = 1; unit_500_chance_9 = 10; unit_500_item_10 = item1603; unit_500_amm_min_10 = 1; unit_500_amm_max_10 = 1; unit_500_chance_10 = 5; unit_500_item_11 = item3504; unit_500_amm_min_11 = 1; unit_500_amm_max_11 = 1; unit_500_chance_11 = 4; unit_520_item_0 = item3103; unit_520_amm_min_0 = 8; unit_520_amm_max_0 = 10; unit_520_chance_0 = 100; unit_520_item_1 = item2505; unit_520_amm_min_1 = 1; unit_520_amm_max_1 = 1; unit_520_chance_1 = 100; unit_520_item_2 = item3501; unit_520_amm_min_2 = 1; unit_520_amm_max_2 = 2; unit_520_chance_2 = 70; unit_520_item_3 = item1301; unit_520_amm_min_3 = 1; unit_520_amm_max_3 = 1; unit_520_chance_3 = 30; unit_520_item_4 = item1401; unit_520_amm_min_4 = 1; unit_520_amm_max_4 = 1; unit_520_chance_4 = 30; unit_520_item_5 = item1601; unit_520_amm_min_5 = 1; unit_520_amm_max_5 = 1; unit_520_chance_5 = 30; unit_520_item_6 = item3502; unit_520_amm_min_6 = 1; unit_520_amm_max_6 = 1; unit_520_chance_6 = 4; unit_520_item_7 = item3503; unit_520_amm_min_7 = 1; unit_520_amm_max_7 = 1; unit_520_chance_7 = 3; unit_520_item_8 = item2506; unit_520_amm_min_8 = 1; unit_520_amm_max_8 = 1; unit_520_chance_8 = 3; unit_520_item_8 = item1204; unit_520_amm_min_8 = 1; unit_520_amm_max_8 = 1; unit_520_chance_8 = 5; unit_520_item_9 = item1602; unit_520_amm_min_9 = 1; unit_520_amm_max_9 = 1; unit_520_chance_9 = 10; unit_520_item_10 = item1603; unit_520_amm_min_10 = 1; unit_520_amm_max_10 = 1; unit_520_chance_10 = 5; unit_520_item_11 = item3504; unit_520_amm_min_11 = 1; unit_520_amm_max_11 = 1; unit_520_chance_11 = 3; unit_520_item_12 = item1501; unit_520_amm_min_12 = 1; unit_520_amm_max_12 = 1; unit_520_chance_12 = 4; unit_520_item_13 = item1502; unit_520_amm_min_13 = 1; unit_520_amm_max_13 = 1; unit_520_chance_13 = 5; unit_530_item_0 = item2102; unit_530_amm_min_0 = 1; unit_530_amm_max_0 = 1; unit_530_chance_0 = 100; unit_530_item_2 = item3501; unit_530_amm_min_2 = 1; unit_530_amm_max_2 = 3; unit_530_chance_2 = 70; unit_530_item_3 = item1301; unit_530_amm_min_3 = 1; unit_530_amm_max_3 = 1; unit_530_chance_3 = 30; unit_530_item_4 = item1401; unit_530_amm_min_4 = 1; unit_530_amm_max_4 = 1; unit_530_chance_4 = 30; unit_530_item_5 = item1601; unit_530_amm_min_5 = 1; unit_530_amm_max_5 = 1; unit_530_chance_5 = 30; unit_530_item_6 = item3502; unit_530_amm_min_6 = 1; unit_530_amm_max_6 = 1; unit_530_chance_6 = 3; unit_530_item_7 = item3503; unit_530_amm_min_7 = 1; unit_530_amm_max_7 = 1; unit_530_chance_7 = 2; unit_530_item_8 = item3504; unit_530_amm_min_8 = 1; unit_530_amm_max_8 = 1; unit_530_chance_8 = 3; unit_530_item_9 = item2104; unit_530_amm_min_9 = 1; unit_530_amm_max_9 = 1; unit_530_chance_9 = 5; unit_530_item_10 = item1502; unit_530_amm_min_10 = 1; unit_530_amm_max_10 = 1; unit_530_chance_10 = 8; unit_540_item_0 = item2101; unit_540_amm_min_0 = 1; unit_540_amm_max_0 = 1; unit_540_chance_0 = 100; unit_540_item_2 = item3501; unit_540_amm_min_2 = 1; unit_540_amm_max_2 = 2; unit_540_chance_2 = 70; unit_540_item_3 = item1301; unit_540_amm_min_3 = 1; unit_540_amm_max_3 = 1; unit_540_chance_3 = 30; unit_540_item_4 = item1401; unit_540_amm_min_4 = 1; unit_540_amm_max_4 = 1; unit_540_chance_4 = 30; unit_540_item_5 = item1601; unit_540_amm_min_5 = 1; unit_540_amm_max_5 = 1; unit_540_chance_5 = 30; unit_540_item_6 = item3502; unit_540_amm_min_6 = 1; unit_540_amm_max_6 = 1; unit_540_chance_6 = 3; unit_540_item_7 = item3503; unit_540_amm_min_7 = 1; unit_540_amm_max_7 = 1; unit_540_chance_7 = 3; unit_99901_item_0 = item2101; unit_99901_amm_min_0 = 1; unit_99901_amm_max_0 = 1; unit_99901_chance_0 = 100; unit_99901_item_2 = item2501; unit_99901_amm_min_2 = 1; unit_99901_amm_max_2 = 1; unit_99901_chance_2 = 100; unit_99901_item_3 = item3101; unit_99901_amm_min_3 = 14; unit_99901_amm_max_3 = 15; unit_99901_chance_3 = 100; unit_99901_item_1 = item3501; unit_99901_amm_min_1 = 5; unit_99901_amm_max_1 = 6; unit_99901_chance_1 = 100; unit_99902_item_0 = item3101; unit_99902_amm_min_0 = 14; unit_99902_amm_max_0 = 15; unit_99902_chance_0 = 100; unit_99903_item_0 = item2505; unit_99903_amm_min_0 = 1; unit_99903_amm_max_0 = 1; unit_99903_chance_0 = 100; unit_99904_item_0 = item3101; unit_99904_amm_min_0 = 9; unit_99904_amm_max_0 = 10; unit_99904_chance_0 = 100; unit_99905_item_0 = item3101; unit_99905_amm_min_0 = 25; unit_99905_amm_max_0 = 30; unit_99905_chance_0 = 100; unit_99905_item_1 = item3103; unit_99905_amm_min_1 = 4; unit_99905_amm_max_1 = 5; unit_99905_chance_1 = 100; unit_99905_item_2 = item3501; unit_99905_amm_min_2 = 4; unit_99905_amm_max_2 = 5; unit_99905_chance_2 = 100; unit_99905_item_3 = item2505; unit_99905_amm_min_3 = 1; unit_99905_amm_max_3 = 1; unit_99905_chance_3 = 100; unit_99906_item_0 = item2103; unit_99906_amm_min_0 = 1; unit_99906_amm_max_0 = 1; unit_99906_chance_0 = 100; _root.overallsound = new Sound(); _root.createEmptyMovieClip('sound_shell', _root.sound_shell_depth); trs = sound_shell; _root.createEmptyMovieClip('music_shell', _root.sound_shell_depth + 1); trs.volumesnd = new Sound(); trs.critical_scorpion = new Sound(); trs.critical_scorpion.attachSound('critical_scorpion'); trs.critical_spider = new Sound(); trs.critical_spider.attachSound('critical_spider'); trs.miss = new Sound(); trs.miss.attachSound('miss'); trs.scorpion_bite = new Sound(); trs.scorpion_bite.attachSound('scorpion_bite'); trs.spider_bite_1 = new Sound(); trs.spider_bite_1.attachSound('spider_bite_1'); trs.spider_bite_2 = new Sound(); trs.spider_bite_2.attachSound('spider_bite_2'); trs.scorp_die_1 = new Sound(); trs.scorp_die_1.attachSound('scorp_die_1'); trs.scorp_die_2 = new Sound(); trs.scorp_die_2.attachSound('scorp_die_2'); trs.scorp_die_3 = new Sound(); trs.scorp_die_3.attachSound('scorp_die_3'); trs.scorp_die_4 = new Sound(); trs.scorp_die_4.attachSound('scorp_die_4'); trs.scorp_die_5 = new Sound(); trs.scorp_die_5.attachSound('scorp_die_5'); trs.scorp_die_6 = new Sound(); trs.scorp_die_6.attachSound('scorp_die_6'); trs.spider_die_1 = new Sound(); trs.spider_die_1.attachSound('spider_die_1'); trs.spider_die_2 = new Sound(); trs.spider_die_2.attachSound('spider_die_2'); trs.spider_die_3 = new Sound(); trs.spider_die_3.attachSound('spider_die_3'); trs.spider_die_4 = new Sound(); trs.spider_die_4.attachSound('spider_die_4'); trs.spider_die_5 = new Sound(); trs.spider_die_5.attachSound('spider_die_5'); trs.spider_die_6 = new Sound(); trs.spider_die_6.attachSound('spider_die_6'); trs.scorpion_hurt_1 = new Sound(); trs.scorpion_hurt_1.attachSound('scorpion_hurt_1'); trs.scorpion_hurt_2 = new Sound(); trs.scorpion_hurt_2.attachSound('scorpion_hurt_2'); trs.scorpion_hurt_3 = new Sound(); trs.scorpion_hurt_3.attachSound('scorpion_hurt_3'); trs.scorpion_hurt_4 = new Sound(); trs.scorpion_hurt_4.attachSound('scorpion_hurt_4'); trs.spider_hurt_1 = new Sound(); trs.spider_hurt_1.attachSound('spider_hurt_1'); trs.spider_hurt_2 = new Sound(); trs.spider_hurt_2.attachSound('spider_hurt_2'); trs.spider_hurt_3 = new Sound(); trs.spider_hurt_3.attachSound('spider_hurt_3'); trs.spider_hurt_4 = new Sound(); trs.spider_hurt_4.attachSound('spider_hurt_4'); trs.spider_move = new Sound(); trs.spider_move.attachSound('spider_move'); trs.scorpion_move = new Sound(); trs.scorpion_move.attachSound('scorpion_move'); trs.big_goo_1 = new Sound(); trs.big_goo_1.attachSound('big_goo_1'); trs.big_goo_2 = new Sound(); trs.big_goo_2.attachSound('big_goo_2'); trs.small_goo_1 = new Sound(); trs.small_goo_1.attachSound('small_goo_1'); trs.small_goo_2 = new Sound(); trs.small_goo_2.attachSound('small_goo_2'); trs.scorp_ranged_attack = new Sound(); trs.scorp_ranged_attack.attachSound('scorp_ranged_attack'); trs.spider_ranged_attack = new Sound(); trs.spider_ranged_attack.attachSound('spider_ranged_attack'); trs.goo_sound = new Sound(); trs.goo_sound.attachSound('goo'); trs.queendeath_sound = new Sound(); trs.queendeath_sound.attachSound('queendeath'); trs.gun_shot_1 = new Sound(); trs.gun_shot_1.attachSound('gun_shot_1'); trs.gun_shot_5 = new Sound(); trs.gun_shot_5.attachSound('gun_shot_5'); trs.gun_shot_11_1 = new Sound(); trs.gun_shot_11_1.attachSound('gun_shot_11_1'); trs.gun_shot_11_2 = new Sound(); trs.gun_shot_11_2.attachSound('gun_shot_11_2'); trs.gun_shot_11_3 = new Sound(); trs.gun_shot_11_3.attachSound('gun_shot_11_3'); trs.melee_wpn_hit_1 = new Sound(); trs.melee_wpn_hit_1.attachSound('melee_wpn_hit_1'); trs.melee_wpn_1_1 = new Sound(); trs.melee_wpn_1_1.attachSound('melee_wpn_1_1'); trs.melee_wpn_1_2 = new Sound(); trs.melee_wpn_1_2.attachSound('melee_wpn_1_2'); trs.blunt_wpn_vzmah = new Sound(); trs.blunt_wpn_vzmah.attachSound('blunt_wpn_vzmah'); trs.blunt_wpn_1 = new Sound(); trs.blunt_wpn_1.attachSound('blunt_wpn_1'); trs.blunt_wpn_2 = new Sound(); trs.blunt_wpn_2.attachSound('blunt_wpn_2'); trs.blunt_wpn_3 = new Sound(); trs.blunt_wpn_3.attachSound('blunt_wpn_3'); trs.human_die_1 = new Sound(); trs.human_die_1.attachSound('human_die_1'); trs.human_die_2 = new Sound(); trs.human_die_2.attachSound('human_die_2'); trs.human_die_3 = new Sound(); trs.human_die_3.attachSound('human_die_3'); trs.reloadwav = new Sound(); trs.reloadwav.attachSound('reloadwav'); trs.meleeinstall = new Sound(); trs.meleeinstall.attachSound('meleeinstall'); trs.passwav = new Sound(); trs.passwav.attachSound('passwav'); trs.pickupwav = new Sound(); trs.pickupwav.attachSound('pickupwav'); trs.ringwav = new Sound(); trs.ringwav.attachSound('ringwav'); trs.stimwav = new Sound(); trs.stimwav.attachSound('stimwav'); THEmusic = new Sound(music_shell); THEmusic.attachSound('music'); trs.cashreg = new Sound(); trs.cashreg.attachSound('cashreg'); trs.tudut = new Sound(); trs.tudut.attachSound('tudut'); _root.str_base_id = 91; _root.per_base_id = 92; _root.end_base_id = 93; _root.cha_base_id = 94; _root.int_base_id = 95; _root.agi_base_id = 96; _root.luk_base_id = 97; _root.str_id = 101; _root.per_id = 102; _root.end_id = 103; _root.cha_id = 104; _root.int_id = 105; _root.agi_id = 106; _root.luk_id = 107; _root.experience_id = 10; _root.lvl_id = 11; _root.max_weight_id = 12; _root.skill_points_id = 13; _root.stat_points_id = 14; _root.perk_points_id = 15; _root.cash_id = 16; _root.kills_id = 17; _root.firearms_base_id = 201; _root.firearms_id = 202; _root.melee_base_id = 203; _root.melee_id = 204; _root.energy_base_id = 205; _root.energy_id = 206; _root.merchant_base_id = 207; _root.merchant_id = 208; _root.lockpick_base_id = 209; _root.lockpick_id = 210; _root.outdoor_base_id = 211; _root.outdoor_id = 212; _root.medic_base_id = 213; _root.medic_id = 214; _root.science_base_id = 215; _root.science_id = 216; _root.day_id = 250; _root.mission_1_status_id = 251; _root.mission_2_status_id = 252; _root.mission_3_status_id = 253; _root.mission_4_status_id = 254; _root.mission_5_status_id = 255; _root.mission_6_status_id = 256; _root.character_arr = new Array(); _root.character_arr[cash_id] = 0; _root.character_arr[kills_id] = 0; _root.character_arr[str_base_id] = 5; _root.character_arr[per_base_id] = 5; _root.character_arr[end_base_id] = 5; _root.character_arr[cha_base_id] = 6; _root.character_arr[int_base_id] = 7; _root.character_arr[agi_base_id] = 5; _root.character_arr[luk_base_id] = 5; _root.character_arr[firearms_base_id] = 50 + random(5); _root.character_arr[melee_base_id] = 60 + random(5); _root.character_arr[energy_base_id] = 5 + random(10); _root.character_arr[merchant_base_id] = 45 + random(10); _root.character_arr[lockpick_base_id] = 30 + random(10); _root.character_arr[outdoor_base_id] = 30 + random(10); _root.character_arr[medic_base_id] = 30 + random(10); _root.character_arr[science_base_id] = 10 + random(10); _root.character_arr[experience_id] = 0; _root.character_arr[lvl_id] = 1; _root.character_arr[skill_points_id] = 10; _root.character_arr[stat_points_id] = 2; _root.character_arr[perk_points_id] = 0; _root.character_arr[day_id] = 1; _root.character_arr[mission_1_status_id] = 0; _root.character_arr[mission_2_status_id] = 0; _root.character_arr[mission_3_status_id] = 0; _root.character_arr[mission_4_status_id] = 0; _root.character_arr[mission_5_status_id] = 0; _root.inventory_shell = {}; inv = _root.inventory_shell; inv.general_arr = new Array(); inv.misc_arr = new Array(); inv.special_arr = new Array(); i = 0; while (i <= 44) { inv.general_arr[i] = 'none'; inv.misc_arr[i] = 'none'; inv.special_arr[i] = 'none'; ++i; } i = 0; while (i <= 44) { _root.inventory_menu['inv_slot_' + i].id = i; ++i; } if (_root.do_load eq 1) { saveCHaracter('load'); } initialiseInventory(); onMouseDown = function () { if (_root.ammountDispenser) { hittest665 = _root.ammountDispenser.hitTest(_root._xmouse, _root._ymouse, true); trace(hittest665); if (hittest665 eq false) { removeMovieClip(_root.ammountDispenser); } } }; _root.attachMovie('kursor', 'kursor', _root.kursor_depth); startDrag('_root.kursor', true); Mouse.hide(); onEnterFrame = function () { _root.kursor._x = _xmouse; _root.kursor._y = _ymouse; characterIntegrity(); charSHeetIntegrity(); inventoryIntegrity(); shootingIntegrity(); inventorySLotsIntegrity(); inventoryPickloot_integrity(); yiffIntegrity(); shop_description_integrity(); ammountDispenserIntegrity(); miscMenuIntegrity(); primaryMenusIntegrity(); _root.kursor_timer += 0.03333333333333333; if (_root.kursor_timer > 1) { _root.kursor_timer = 0; Mouse.hide(); } }; } button 476 { on (release) { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { _root.doselect_array = 2; } } } button 482 { on (release) { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { _root.doselect_array = 3; } } } movieClip 485 { } button 493 { on (release) { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { _root.doselect_array = 1; } } } movieClip 495 { } button 498 { on (release) { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { _root.doselect_array = 2; } } } movieClip 500 { } movieClip 501 { frame 1 { stop(); } } button 511 { on (release) { _root.sortArray(); } } button 517 { on (release) { if (_root.handheld.item eq 'none' or !_root.handheld.item) { _root.btn_exit_shop(); } } } movieClip 522 { } movieClip 525 { } movieClip 527 { } movieClip 529 { } movieClip 530 { frame 1 { stop(); } frame 19 { textcore.showvar = ''; } } button 532 { on (release) { _root.sellItem(); } } movieClip 533 { frame 2 { if (_root.handheld.item eq 'none') { gotoAndPlay(1); } } frame 10 { if (_root.handheld.item != 'none') { gotoAndPlay(9); } } } movieClip 537 { } movieClip 540 { } movieClip 541 { } movieClip 542 { } movieClip 545 { } movieClip 546 { } movieClip 547 { } movieClip 548 { } movieClip 549 { } movieClip 550 { } movieClip 553 { } movieClip 554 { } movieClip 555 { } movieClip 558 { } movieClip 559 { } movieClip 560 { } movieClip 563 { } movieClip 564 { } movieClip 567 { } movieClip 568 { } // unknown tag 88 length 63 movieClip 571 { } movieClip 573 { } movieClip 575 { } movieClip 577 { } movieClip 580 { } movieClip 581 { } movieClip 582 { } movieClip 584 { } movieClip 585 { } movieClip 587 { } movieClip 589 { } button 590 { on (release) { _root.buy_item(2501, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2501, 1, 0); _root.shopitemmousoverid = 2501; } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 591 { on (release) { _root.buy_item(2102, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2102, 1, 0); _root.shopitemmousoverid = 2102; } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 592 { on (release) { _root.buy_item(1302, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(1302, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 593 { on (release) { _root.buy_item(2101, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2101, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 594 { on (release) { _root.buy_item(3101, 5, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 5, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 595 { on (release) { _root.buy_item(3101, 10, 20); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 10, 20); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 596 { on (release) { _root.buy_item(3101, 50, 30); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 50, 30); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 597 { on (release) { _root.buy_item(3101, 100, 35); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 100, 35); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 598 { on (release) { _root.buy_item(3501, 1, 20); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 1, 20); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 599 { on (release) { _root.buy_item(3501, 5, 25); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 5, 25); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 600 { on (release) { _root.buy_item(3501, 20, 30); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 20, 30); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 601 { on (release) { _root.buy_item(3501, 50, 40); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 50, 40); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 602 { on (release) { _root.buy_item(1201, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(1201, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } movieClip 605 { } movieClip 608 { } movieClip 609 { } button 610 { on (release) { _root.buy_item(3101, 10, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 10, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 611 { on (release) { _root.buy_item(3101, 50, 10); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 50, 10); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 612 { on (release) { _root.buy_item(3101, 100, 15); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3101, 100, 15); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 613 { on (release) { _root.buy_item(3501, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 614 { on (release) { _root.buy_item(3501, 5, 5); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 5, 5); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 615 { on (release) { _root.buy_item(3501, 20, 10); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3501, 20, 10); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } movieClip 618 { } movieClip 619 { } movieClip 622 { } button 623 { on (release) { _root.buy_item(3103, 10, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3103, 10, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 624 { on (release) { _root.buy_item(3103, 20, 10); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3103, 20, 10); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 625 { on (release) { _root.buy_item(3103, 50, 10); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3103, 50, 10); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 626 { on (release) { _root.buy_item(3103, 100, 20); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3103, 100, 20); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 627 { on (release) { _root.buy_item(1202, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(1202, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 628 { on (release) { _root.buy_item(1401, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(1401, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 629 { on (release) { _root.buy_item(2505, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2505, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } movieClip 632 { } movieClip 635 { } movieClip 639 { } movieClip 640 { } movieClip 641 { } movieClip 642 { } movieClip 645 { } movieClip 648 { } movieClip 651 { } movieClip 654 { } movieClip 655 { } movieClip 658 { } movieClip 661 { } movieClip 664 { } movieClip 665 { } button 666 { on (release) { _root.buy_item(1203, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(1203, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 667 { on (release) { _root.buy_item(2502, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2502, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 668 { on (release) { _root.buy_item(2506, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2506, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 669 { on (release) { _root.buy_item(2512, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2512, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 670 { on (release) { _root.buy_item(2511, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2511, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 671 { on (release) { _root.buy_item(3102, 30, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3102, 30, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 672 { on (release) { _root.buy_item(3102, 90, 20); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3102, 90, 20); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 673 { on (release) { _root.buy_item(3502, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3502, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 674 { on (release) { _root.buy_item(3503, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3503, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 675 { on (release) { _root.buy_item(2508, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2508, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 676 { on (release) { _root.buy_item(2507, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2507, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 677 { on (release) { _root.buy_item(3504, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(3504, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } button 678 { on (release) { _root.buy_item(2513, 1, 0); } on (rollOver, dragOver) { _root.showthispriceinscreen = _root.showprice(2513, 1, 0); } on (rollOut, dragOut) { _root.showthispriceinscreen = ''; } } movieClip 679 { frame 1 { if (_root.shop_mode eq 1) { gotoAndStop(2); } else { if (_root.shop_mode eq 3) { gotoAndStop(4); } else { gotoAndStop(3); } } } } movieClip 683 { frame 1 { stop(); } } movieClip 686 { } movieClip 692 { } movieClip 695 { } movieClip 698 { } button 700 { on (release) { gotoAndStop(2); } } movieClip 703 { } button 705 { on (release) { _root.slotClick(id); } on (rollOver, dragOver) { _root.mousoceritem = _root.which_arr[id]; if (id > 9000) { thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; _root.mousoceritem = thiscurrentArray77[thisislootbox]; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 707 { } movieClip 710 { } movieClip 713 { } movieClip 716 { } movieClip 719 { } movieClip 720 { } movieClip 725 { } movieClip 728 { } movieClip 731 { } movieClip 733 { } movieClip 734 { } movieClip 738 { } movieClip 739 { } movieClip 740 { } movieClip 741 { } movieClip 744 { } movieClip 746 { } movieClip 747 { } movieClip 749 { } movieClip 750 { } movieClip 754 { } movieClip 755 { } movieClip 758 { } movieClip 759 { } movieClip 760 { } movieClip 763 { } movieClip 764 { } movieClip 765 { } movieClip 768 { } movieClip 769 { } movieClip 772 { } movieClip 774 { } movieClip 775 { } movieClip 776 { } movieClip 778 { } movieClip 779 { instance ammount of movieClip 778 { onClipEvent (load) { _visible = false; } } } movieClip 782 { } button 784 { on (release) { gotoAndStop(1); } } movieClip 785 { frame 1 { _root.showkukla = 1; _root.inventoryshowyifftimerbbbbb = 9999; stop(); } frame 2 { _root.showkukla = 0; _root.inventoryshowyifftimerbbbbb = 9999; } instance inv_quickslot_0 of movieClip 779 { onClipEvent (load) { id = 200000; } } instance inv_quickslot_1 of movieClip 779 { onClipEvent (load) { id = 200001; } } instance inv_quickslot_2 of movieClip 779 { onClipEvent (load) { id = 200002; } } } movieClip 787 { } movieClip 812 { } movieClip 816 { } movieClip 817 { } movieClip 820 { } movieClip 821 { } movieClip 824 { } movieClip 827 { } movieClip 828 { } movieClip 846 { } movieClip 847 { } movieClip 848 { } movieClip 849 { frame 1 { stop(); } instance of movieClip 787 { onClipEvent (load) { _visible = false; } } } button 851 { on (release) { _root.slotClick('torso'); } on (rollOver, dragOver) { if (_root.torso_slot_item and _root.torso_slot_item != 'none') { _root.mousoceritem = _root.torso_slot_item; trace(_root.torso_slot_item.price); } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 854 { } movieClip 855 { } movieClip 856 { instance indicator of movieClip 855 { onClipEvent (load) { _visible = false; } } } movieClip 858 { } button 860 { on (release) { _root.slotClick('melee'); } on (rollOver, dragOver) { if (_root.melee_slot_item and _root.melee_slot_item != 'none') { _root.mousoceritem = _root.melee_slot_item; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 861 { instance indicator of movieClip 858 { onClipEvent (load) { _visible = false; } } } button 862 { on (release) { _root.slotClick('firearms'); } on (rollOver, dragOver) { if (_root.firearms_slot_item and _root.firearms_slot_item != 'none') { _root.mousoceritem = _root.firearms_slot_item; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 863 { instance indicator of movieClip 858 { onClipEvent (load) { _visible = false; } } } button 865 { on (release) { _root.slotClick(whichslotisit); } on (rollOver, dragOver) { if (_root[whichslotisit + '_slot_item'] and _root[whichslotisit + '_slot_item'] != 'none') { _root.mousoceritem = _root[whichslotisit + '_slot_item']; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 867 { } movieClip 868 { } button 870 { on (release) { _root.slotClick('head'); } on (rollOver, dragOver) { if (_root.head_slot_item and _root.head_slot_item != 'none') { _root.mousoceritem = _root.head_slot_item; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 872 { } movieClip 873 { } button 874 { on (release) { _root.slotClick('gloves'); } on (rollOver, dragOver) { if (_root.gloves_slot_item and _root.gloves_slot_item != 'none') { _root.mousoceritem = _root.gloves_slot_item; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 875 { } button 876 { on (release) { _root.slotClick('boots'); } on (rollOver, dragOver) { if (_root.boots_slot_item and _root.boots_slot_item != 'none') { _root.mousoceritem = _root.boots_slot_item; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 877 { } button 879 { on (release) { _root.slotClick('neck'); } on (rollOver, dragOver) { if (_root.neck_slot_item and _root.neck_slot_item != 'none') { _root.mousoceritem = _root.neck_slot_item; } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } } movieClip 881 { } movieClip 883 { } movieClip 887 { } movieClip 890 { frame 1 { thisisshop = 1; } instance of movieClip 501 { onClipEvent (enterFrame) { gotoAndStop(_root.doselect_array); } onClipEvent (load) { cacheAsBitmap = true; } } instance seller of movieClip 533 { onClipEvent (enterFrame) { if (_root.handheld.item eq 'none') { if (_currentframe < 8) { gotoAndStop(1); } } else { play(); } } } instance slot_ring1 of movieClip 868 { onClipEvent (load) { whichslotisit = 'ring1'; } } instance slot_ring2 of movieClip 868 { onClipEvent (load) { whichslotisit = 'ring2'; } } instance ammoSHow of movieClip 887 { onClipEvent (load) { yifftimer = 9999; } onClipEvent (enterFrame) { yifftimer += 0.03333333333333333; if (!_root.firearms_slot_item.ammo_capacity or _root.showkukla != 1) { yifftimer = 9999; } if (yifftimer > 0.5) { yifftimer = 0; magazin = _root.firearms_slot_item.ammo_capacity; showvar1 = _root.current_used_amo_inventory; if (showvar1 eq undefined) { showvar1 = ''; } showvar2 = _root.current_amo_in_gun + '/' + magazin; if (!_root.firearms_slot_item.ammo_capacity or _root.showkukla != 1) { _visible = false; } else { _visible = true; } } } } } frame 8 { prevFrame(); } frame 10 { gotoAndPlay(35); } frame 15 { function initialize_obstacles() { recalculate_map_arrays(); i = 0; while (i < enemy_ammount) { trgt0001 = _root.yiff['enemy_' + i]; if (trgt0001) { xx = (cell_name_calculation(trgt0001._x, trgt0001._y))[0]; yy = (cell_name_calculation(trgt0001._x, trgt0001._y))[1]; iArr[yy - 1][xx - 1] = 0; } ++i; } } function obstacle_exclude(trgt1) { xx = (cell_name_calculation(trgt1._x, trgt1._y))[0]; yy = (cell_name_calculation(trgt1._x, trgt1._y))[1]; iArr[yy - 1][xx - 1] = 1; } function delete_shownpath() { var v2 = 0; while (v2 <= 500) { trgt = _root.yiff['pathpointer' + v2]; if (trgt) { removeMovieClip(trgt); } ++v2; } } function showpath(path_array) { delete_shownpath(); pathlength = path_array.length; _root.pathpointer_depth_local = _root.pathpointer_depth; nowstopdrawingpath = 0; var v2 = 0; while (v2 <= pathlength) { xx = path_array[v2][0]; yy = path_array[v2][1]; var v4 = (xx - 1) * spacing + spacing / 2; var v3 = (yy - 1) * spacing + spacing / 2; if (targetedanimal2009 != 0) { tr19 = targetedanimal2009; tr29 = current_participant; distance = (CALC_Dist_Xv_Yv(tr19._x, tr19._y, tr29._x, tr29._y))[0]; if (distance <= current_participant.attack_radius) { nowstopdrawingpath = 1; } } if (v4 and v3) { _root.yiff.attachMovie('pathpointer', 'pathpointer' + v2, ++_root.pathpointer_depth_local); _root.yiff['pathpointer' + v2]._x = v4; _root.yiff['pathpointer' + v2]._y = v3; if (v2 < current_participant.movepoints + 1) { _root.yiff['pathpointer' + v2].gotoAndStop(2); } if (nowstopdrawingpath eq 1) { removeMovieClip(_root.yiff['pathpointer' + v2]); } } if (targetedanimal2009 != 0) { tr19 = targetedanimal2009; tr29 = _root.yiff['pathpointer' + v2]; distance = (CALC_Dist_Xv_Yv(tr19._x, tr19._y, tr29._x, tr29._y))[0]; if (distance <= current_participant.attack_radius) { nowstopdrawingpath = 1; } } ++v2; } nowstopdrawingpath = 0; } function astarCalcAndShowPath(start_x, start_y, end_x, end_y, doshowpath) { startXX = (cell_name_calculation(start_x, start_y))[0]; startYY = (cell_name_calculation(start_x, start_y))[1]; endXX = (cell_name_calculation(end_x, end_y))[0]; endYY = (cell_name_calculation(end_x, end_y))[1]; exclusion_1 = _root.yiff['cell' + startXX + '_' + startYY]; if (exclusion_1._type_ != 1) { obstacle_exclude(exclusion_1); } if (exclusion_2._type_ != 1) { } var v4 = new Astar(iArr); zuzuka = []; startX = startXX - 1; startY = startYY - 1; endX = endXX - 1; endY = endYY - 1; trace(startX + ' ' + startY + ' ' + endX + ' ' + endY); var v3 = v4.findPath(startX, startY, endX, endY); var v2 = 0; while (v2 < v3.length) { zuzuka[v2] = [v3[v2][0] + 1, v3[v2][1] + 1]; ++v2; } _root.astarfailed = 0; if (!v3[0] or v3[0] eq null or v3[0] eq '') { _root.astarfailed = 1; } thepath = zuzuka; if (_root.astarfailed != 1 and doshowpath eq 'true') { showpath(thepath); } if (_root.astarfailed eq 1) { thepath = 'none'; } if (!thepath or thepath eq undefined or thepath eq null or thepath eq '') { thepath = 'none'; } return thepath; } function removeShowPath() { var v2 = 0; while (v2 <= 100) { if (_root.yiff['pathpointer' + v2]) { removeMovieClip(_root.yiff['pathpointer' + v2]); } ++v2; } } } frame 15 { function tougherEnemies() { _root.enemy_hp_500 = 70; _root.enemy_movepoints_500 = 5; _root.enemy_actpoints_500 = 4; _root.enemy_hp_501 = 70; _root.enemy_movepoints_501 = 5; _root.enemy_actpoints_501 = 4; _root.enemy_hp_510 = 100; _root.enemy_dmg_min_510 = 5; _root.enemy_dmg_max_510 = 15; _root.enemy_hp_511 = 100; _root.enemy_dmg_min_511 = 5; _root.enemy_dmg_max_511 = 15; _root.enemy_hp_520 = 70; _root.enemy_actpoints_520 = 2; _root.enemy_hp_521 = 70; _root.enemy_actpoints_521 = 2; _root.enemy_hp_530 = 60; _root.enemy_actpoints_530 = 2; _root.enemy_hp_531 = 60; _root.enemy_actpoints_531 = 2; _root.enemy_hp_540 = 70; _root.enemy_actpoints_540 = 4; _root.enemy_hp_541 = 70; _root.enemy_actpoints_541 = 4; _root.enemy_hp_1 = 60; } function cloneItem(item) { trace('cloneitem'); ++object_id; _root['item' + object_id] = {}; newitem = _root['item' + object_id]; newitem.this_object_id = object_id; for (var v3 in item) { newitem[v3] = item[v3]; } return newitem; } function snd_spider_bite() { aaaa = random(2) + 1; _root.trs['spider_bite_' + aaaa].start(); } function snd_scorp_die() { aaaa = random(6) + 1; _root.trs['scorp_die_' + aaaa].start(); } function snd_spider_die() { aaaa = random(6) + 1; _root.trs['spider_die_' + aaaa].start(); } function snd_scorpion_hurt() { aaaa = random(4) + 1; _root.trs['scorpion_hurt_' + aaaa].start(); } function snd_spider_hurt() { aaaa = random(4) + 1; _root.trs['spider_hurt_' + aaaa].start(); } function snd_big_goo() { aaaa = random(2) + 1; _root.trs['big_goo_' + aaaa].start(); } function snd_small_goo() { aaaa = random(2) + 1; _root.trs['small_goo_' + aaaa].start(); } function snd_gunshot_11() { sid = 1 + random(3); trs['gun_shot_11_' + sid].start(); } function snd_melee_1() { sid = 1 + random(2); trs['melee_wpn_1_' + sid].start(); } function snd_blunt_hit() { sid = 1 + random(3); trs['blunt_wpn_' + sid].start(); } function snd_human_die() { sid = 1 + random(3); trs['human_die_' + sid].start(); } function sndAndMusicVolume() { _root.overallsound.setVolume(_root.sound_volume); THEmusic.setVolume(_root.music_volume); if (_root.music_on eq 1 and turningoff != 1) { if (was_it_off != 0) { was_it_off = 0; THEmusic.start(0, 9999); } } if (_root.music_on eq 0) { was_it_off = 1; THEmusic.stop('music'); } if (dosoundrestarttimeryiff eq 1 and _root.music_on eq 1) { dfgfdgdfgiii8888 = 1; dosoundrestarttimeryiff = 0; } if (dfgfdgdfgiii8888 != 0) { ++dfgfdgdfgiii8888; if (dfgfdgdfgiii8888 eq 5) { _root.music_on = 0; } if (dfgfdgdfgiii8888 > 7) { _root.music_on = 1; dfgfdgdfgiii8888 = 0; } } } function recalculate_map_arrays() { _root.map_array_1 = new Array(); _root.iArr = new Array(); i = 1; while (i <= field_height) { map_array_1.push(this['row' + i]); iArr.push([0]); ++i; } i = 0; while (i < 21) { j = 0; while (j < 28) { iArr[i][j] = map_array_1[i][j]; ++j; } ++i; } i = 0; while (i < 21) { j = 0; while (j < 28) { adasd = iArr[i][j]; if (adasd eq 0) { iArr[i][j] = 'xx'; } else { if (adasd eq 1) { iArr[i][j] = 'zz'; } } ++j; } ++i; } i = 0; while (i < 21) { j = 0; while (j < 28) { adasd = iArr[i][j]; if (adasd eq 'xx') { iArr[i][j] = 1; } else { if (adasd eq 'zz') { iArr[i][j] = 0; } } ++j; } ++i; } } function create_yiffingField() { this.createEmptyMovieClip('yiff', _root.yiff_depth); yiff._x = game_location_x; yiff._y = game_location_y; this.createEmptyMovieClip('status_layer', _root.status_layer_depth); status_layer._x = game_location_x; status_layer._y = game_location_y; yiff.createEmptyMovieClip('loot_shell', _root.loot_shell_depth); yiff.createEmptyMovieClip('corpse_shell', _root.corpse_shell_depth); yiff.createEmptyMovieClip('shooting_shell', _root.shooting_shell_depth); yiff.corpse_shell.cacheAsBitmap = true; yiff.cacheAsBitmap = true; _root.attachMovie('fps_counter', 'fps_counter', _root.upper_indicators_depth++); _root.fps_counter._x = 765; _root.fps_counter._y = 5; _root.attachMovie('bottommenu', 'bottommenu', _root.bottommenu_depth); _root.bottommenu._x = 0; _root.bottommenu._y = 0; _root.bottommenu.cacheAsBitmap = true; } function spawn_units_at_random_location(id, preset_team) { var v2 = 1; while (v2 <= 100) { celly = 1 + random(_root.field_height); cellx = 2 + random(_root.field_length); checkcell = _root.yiff['cell' + cellx + '_' + celly]; recheck_cell_occupation(); if (checkcell and checkcell._type_ != 1 and checkcell.occupied eq 0) { Spawn_units(id, 0, cellx, celly, preset_team); break; return undefined; } ++v2; } } function Spawn_units(id, base, cellx, celly, preset_team) { if (base eq 0) { respawn_x = _root.yiff['cell' + cellx + '_' + celly]._x; respawn_y = _root.yiff['cell' + cellx + '_' + celly]._y; } else { if (base eq 1 or base eq 'spider') { startcell_x = 1; endcell_x = 8; startcell_y = 15; endcell_y = 21; } else { if (base eq 2 or base eq 'scorpion') { startcell_x = 21; endcell_x = 28; startcell_y = 1; endcell_y = 7; } } arrayofcellstorespawn = createArray_of_Unoccupied_cells(startcell_x, startcell_y, endcell_x, endcell_y); if (arrayofcellstorespawn.length > 0) { destcell = arrayofcellstorespawn[random(arrayofcellstorespawn.length)]; respawn_x = destcell._x; respawn_y = destcell._y; } else { return undefined; } } vacantspace = 'none'; i = 0; while (i < _root.enemy_ammount_map) { if (_root.yiff['enemy_' + i]) { } else { vacantspace = i; break; } ++i; } if (vacantspace eq 'none') { return undefined; } en_id = id; _root.yiff.attachMovie('enemy_type_' + en_id, 'enemy_' + vacantspace, _root.enemy_depth + vacantspace); trgt = _root.yiff['enemy_' + vacantspace]; trgt.serialnum = vacantspace; if (en_id eq 521 or en_id eq 531 or en_id eq 541 or en_id eq 511 or en_id eq 501) { createLootArrayForThisUnit(vacantspace, en_id - 1); } else { createLootArrayForThisUnit(vacantspace, en_id); } if (en_id eq 999) { _root.character_unuit = trgt; } trgt.en_id = en_id; trgt._x = respawn_x; trgt._y = respawn_y; trgt._rotation = random(360); trgt.speed = _root['enemy_speed_' + en_id]; trgt.speed_slow = trgt.speed; trgt.initiative_base = _root['enemy_initiative_' + en_id]; trgt.initiative = trgt.initiative_base + random(9999) / 10000; trgt.movepoints_max_real = _root['enemy_movepoints_' + en_id]; trgt.movepoints_max = trgt.movepoints_max_real; trgt.movepoints = trgt.movepoints_max; trgt.actpoints_max = _root['enemy_actpoints_' + en_id]; trgt.actpoints = trgt.actpoints_max; trgt.visibility_radius = _root['enemy_visibility_radius_' + en_id]; trgt.hp = _root['enemy_hp_' + en_id]; trgt.dmg = 0; trgt.dmg_done_by_character = 0; trgt.name_ = _root['enemy_name_' + en_id]; trgt.accuracy = _root['enemy_accuracy_' + en_id]; trgt.dmg_min = _root['enemy_dmg_min_' + en_id]; trgt.dmg_max = _root['enemy_dmg_max_' + en_id]; trgt.experience = _root['enemy_experience_' + en_id]; if (preset_team > 0) { trgt.team = preset_team; } else { trgt.team = random(99999); if (trgt.en_id eq 510) { trgt.team = 999; } else { if (trgt.en_id eq 999) { trgt.team = 999; } else {} } } trgt.attack_radius = _root['enemy_attack_radius_' + en_id]; trgt.poison_time = _root['enemy_poison_time_' + en_id]; trgt.poison_dmg = _root['enemy_poison_dmg_' + en_id] * _root.hp_modifier; trgt.regeneration_percent = _root['enemy_regeneration_percent_' + en_id]; trgt.command = 2; trgt.forcedtarget = 0; trgt.critical_chance = _root['enemy_critical_chance_' + en_id]; trgt.critical_mod = _root['enemy_critical_mod_' + en_id]; trgt.ranged = _root['enemy_ranged_' + en_id]; if (trgt.en_id > 100) { trgt.stimpaks = 1 + random(4); } if (trgt.ranged eq 1) { trgt.ammoingun = _root['enemy_ammoingun_' + en_id]; trgt.ammoingun_max = _root['enemy_ammoingun_' + en_id]; } _root.enemy_ammoingun_520; trgt.dmg_resist = _root['enemy_dmg_resist_' + en_id]; trgt.armor_class = _root['enemy_armor_class_' + en_id]; trgt.wpn_type = _root['enemy_wpn_type_' + en_id]; trgt.button_shell.trgt = trgt; trgt.button_shell.showradius.trgt = trgt; trgt.destination_area_center = _root.yiff.cell13_12; } function initBackground() { uppr = 'background_up_' + _root.loadmap_id; btmb = 'background_floor_' + _root.loadmap_id; _root.yiff.attachMovie(uppr, 'background_up', _root.background_up_depth); _root.yiff.background_up._x -= game_location_x; _root.yiff.background_up._y -= game_location_y; _root.attachMovie(btmb, 'background_floor', _root.background_floor_depth); _root.yiff.background_up.cacheAsBitmap = true; _root.ackground_floor.cacheAsBitmap = true; } function buildGrid() { var v4 = 1; while (v4 <= _root.field_height) { var v3 = 1; while (v3 <= _root.field_length) { var v2 = 'cell' + v3 + '_' + v4; var v7 = (v3 - 1) * spacing + spacing / 2; var v6 = (v4 - 1) * spacing + spacing / 2; var v5 = map_array_1[v4 - 1][v3 - 1]; if (v5 eq 1) { whichtile = 'tile_block'; } else { whichtile = 'tile_empty'; } _root.yiff.attachMovie(whichtile, v2, ++_root.cells_depth); _root.yiff[v2]._x = v7; _root.yiff[v2]._y = v6; _root.yiff[v2].xx = v7; _root.yiff[v2].yy = v6; _root.yiff[v2].cellname = v2; _root.yiff[v2]._type_ = v5; _root.yiff[v2].clip = _root.yiff[v2]; ++v3; } ++v4; } } function yiffIntegrity() { if (_root.showgrid eq 1 and _root.grid_visible != 1) { _root.showgrid = 0; _root.grid_visible = 1; showhideGrid('show'); } else { if (_root.showgrid eq 1 and _root.grid_visible eq 1) { _root.showgrid = 0; _root.grid_visible = 0; showhideGrid('hide'); } } if (handheld.item eq 'none') { if (_root.ranged_attack_pricel eq 1) { kursor.gotoAndStop(2); } else { if (_root.melee_attack_pricel eq 1) { kursor.gotoAndStop(3); } else { kursor.gotoAndStop(1); } } } else { _root.kursor.gotoAndStop(10); _root.kursor.itembox.gotoAndStop(_root.handheld.item.id); } } function deleteAllDrestroyEverything() { for (var v3 in this) { if (this[v3] instanceof MovieClip) { if (this[v3] != _root.show_quality and this[v3] != _root.knopkaq and this[v3] != _root.music_shell) { removeMovieClip(this[v3]); } } } THEmusic.stop(); _root.gotoAndStop(1); saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); v1arlocation1111 = this.saveslot000.data; if (v1arlocation1111.save_exists eq 1) { _root.we_are_returning_from_playing = 1; _root.gotoAndStop(5); } else { _root.gotoAndStop(3); } } function roundAnnouncement() { if (all_enemies_has_been_exterminated != 1) { _root.attachMovie('round', 'round_', _root.showroundcount_depth); _root.round_.shellmsg.showvar = 'ROUND: ' + _root.currentround; _root.round_._x = 407; _root.round_._y = 284; pushTextToLog('*'); pushTextToLog('**'); pushTextToLog('************** [Round ' + _root.currentround + '] **************'); pushTextToLog('**'); pushTextToLog('*'); } else { all_enemies_has_been_exterminated = 0; _root.attachMovie('round', 'round_', _root.showroundcount_depth); _root.round_.shellmsg.showvar = 'AREA CLEARED'; _root.round_._x = 407; _root.round_._y = 284; pushTextToLog('*'); pushTextToLog('**'); pushTextToLog('************** [AREA CLEARED. REALTIME MODE ACTIVATED] **************'); pushTextToLog('**'); pushTextToLog('*'); } } function enemyIntegrity() { i = 0; while (i < enemy_ammount) { trgten = _root.yiff['enemy_' + i]; if (trgten and trgten.en_id != 100 and trgten.en_id != 200) { if (trgten.animation.ended eq 1 and trgten.en_id eq 999) { trgten.gotoAndStop(1); } if (trgten.animation.animation_has_ended_for_real eq 1) { trgten.gotoAndStop(1); } trgten.speed = trgten.speed_slow * _root.global_acceleration; if (_root.global_acceleration > 8) { _root.quickcombat = 1; } else { _root.quickcombat = 0; } trgten.selection_._visible = false; if (current_participant eq trgten and trgten eq _root.character_unuit) { trgten.selection_._visible = true; trgten.selection_._rotation += 5; } recalcHPindicatoretcFXD2(trgten); if (_root.globalshowhp eq 1 or trgten.button_shell.showstatus eq 1) { if (trgten.hpbar._visible eq false) { trgten.hpbar._visible = true; } } else { if (trgten.hpbar._visible eq true) { trgten.hpbar._visible = false; } } curpoislableid = trgten.getDepth(); curpoislable = _root.status_layer['poisonedlable' + curpoislableid]; if (trgten.button_shell.showstatus eq 1 and trgten.poison_time_received > 0) { if (curpoislable) { } else { _root.status_layer.attachMovie('poisoned_lable', 'poisonedlable' + curpoislableid, curpoislableid + 1); curpoislable = _root.status_layer['poisonedlable' + curpoislableid]; curpoislable._x = trgten._x; curpoislable._y = trgten._y; } } else { if (curpoislable) { removeMovieClip(curpoislable); } } with (trgten) { if (gfgfg != 1) { gfgfg = 1; widthres = hpbar._width; timeryiff1 = 0; timeryiff2 = 0; } hhh.gotoAndStop(command + 1); timeryiff2 += 0.03333333333333333; if (timeryiff2 > 0.1 + random(9999) / 100000) { timeryiff2 = 0; hhh._rotation = -_rotation; } } if (_root.do_really_kill_them_all eq 1 and trgten != _root.character_unuit) { trgten.dmg = 999999999999.0; } if (trgten.dmg > trgten.hp or trgten.dmg eq trgten.hp) { iyiff = _root.yiff.corpse_shell.getNextHighestDepth(); corpsetype = trgten.en_id; if (corpsetype eq 520 or corpsetype eq 530 or corpsetype eq 540) { corpsetype = 500; } if (corpsetype eq 521 or corpsetype eq 531 or corpsetype eq 541 or corpsetype eq 511) { corpsetype = 501; } _root.yiff.corpse_shell.attachMovie('dead_enemy_type_' + corpsetype, 'enemy_' + iyiff, iyiff); trgtrtrt = _root.yiff.corpse_shell['enemy_' + iyiff]; trgtrtrt._x = trgten._x; trgtrtrt._y = trgten._y; trgtrtrt.cacheAsBitmap = true; trgtrtrt._rotation = trgten._rotation; statusid2 = trgten.getDepth(); curstatus2 = _root.status_layer['statusicons' + statusid]; removeMovieClip(curstatus2); if (trgten.en_id eq 1 or trgten.en_id eq 7 or trgten.en_id eq 8) { snd_scorp_die(); } if (trgten.en_id eq 4) { snd_spider_die(); } if (trgten.en_id eq 500 or trgten.en_id eq 510 or trgten.en_id eq 530) { snd_human_die(); } if (_root.mouseoverunit eq trgten) { _root.mouseoverunit = 0; } if (trgten.killedbyfurry eq 1) { experience_received = Math.floor(trgten.experience * (trgten.dmg_done_by_character / trgten.hp)); if (experience_received > trgten.experience) { experience_received = trgten.experience; } _root.character_arr[experience_id] += experience_received; ++_root.character_arr[kills_id]; pushTextToLog('You\'ve killed ' + trgten.name_); } else { pushTextToLog(trgten.name_ + ' dies.'); } _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox' + trgten.serialnum, trgten.serialnum); trgt666667771234 = _root.yiff.loot_shell['lootbox' + trgten.serialnum]; trgt666667771234._x = trgten._x; trgt666667771234._y = trgten._y; trgt666667771234.serialnum = trgten.serialnum; removeMovieClip(trgten); } } ++i; } } function recalcHPindicatoretcFXD2(trgten) { if (trgten.hpbar.dmg != trgten.dmg and trgten.hpbar._visible eq true) { trgten.hpbar.dmg = 0; trgten.hpbar.dmg = trgten.dmg; trgten.rememberrotation = hpbar._rotation; trgten.hpbar._rotation = 0; trgten.hpbar._width = _root.hpbarwidthres * ((trgten.hp - trgten.dmg) / trgten.hp); trace(_root.hpbarwidthres + ' HPBARWIDTHRES'); trgten.hpbar._rotation = trgten.rememberrotation; } if (trgten.hpbar._rotation != -trgten._rotation) { trgten.hpbar._rotation = -trgten._rotation; } } function otletaniedamaga(xx, yy, msg, type, poisoned) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('otletalka', 'otletalka' + iyiff, iyiff); _root.yiff.shooting_shell['otletalka' + iyiff]._x = xx; _root.yiff.shooting_shell['otletalka' + iyiff]._y = yy; _root.yiff.shooting_shell['otletalka' + iyiff].show_.tehtextfield.text = msg; if (!poisoned) { poisoned = ''; } _root.yiff.shooting_shell['otletalka' + iyiff].show_.poison = poisoned; var v2 = new TextFormat(); v2.size = 10; if (type eq 'dmg') { v2.color = 16711680; } else { if (type eq 'poison') { v2.color = 65280; } else { if (type eq 'regeneration') { v2.color = 52479; } else { if (type eq 'misc') { v2.color = 16777215; } } } } _root.yiff.shooting_shell['otletalka' + iyiff].show_.tehtextfield.setTextFormat(v2); } function shotLineShift(central_target, distance) { c = distance; smeshenie = 180; jopa = central_target; if (jopa._rotation < 0) { aaa = -jopa._rotation + 180; } else { aaa = jopa._rotation; } if (aaa eq 270) { aaa = 269.99; } if (aaa eq 180) { aaa = 179.999; } if (aaa eq 0) { aaa = 0.01; } aaa2 = aaa; if (aaa >= 0 and aaa < 90) { aaa += smeshenie; } else { if (aaa >= 90 and aaa < 180) { aaa = smeshenie + aaa; } else { if (aaa >= 180 and aaa < 270) { aaa = aaa - smeshenie + 180; } else { if (aaa >= 270 and aaa < 360) { aaa -= smeshenie; } } } } tangens = Math.tan(aaa * Math.PI / 180); a = Math.cos(aaa * Math.PI / 180) * c; b = a / tangens; if (aaa2 > 0 and aaa2 <= 180) { xmodo = a / b; ymodo = -1; attachMovie('pipka', 'pipka', 666); the_x = jopa._x + a * xmodo; the_y = jopa._y + a * ymodo; return [the_x, the_y]; } if (aaa2 > 180 and aaa2 <= 270) { xmodo = -a / b; ymodo = -1; attachMovie('pipka', 'pipka', 666); the_x = jopa._x + a * xmodo; the_y = jopa._y + a * ymodo; return [the_x, the_y]; } xmodo = a / b; ymodo = 1; attachMovie('pipka', 'pipka', 666); the_x = jopa._x + a * xmodo; the_y = jopa._y + a * ymodo; return [the_x, the_y]; } function check_for_obstacle_between_2_points(x1, y1, x2, y2) { checkx787878 = x2; checky787878 = y2; cellname665 = (cell_name_calculation(checkx787878, checky787878))[2]; shag = spacing * 0.95; yiffdgdfg = CALC_Dist_Xv_Yv(x2, y2, x1, y1); xmod = yiffdgdfg[1]; ymod = yiffdgdfg[2]; xmod_ = xmod; ymod_ = ymod; distance = yiffdgdfg[0]; aaayiff = distance; if (aaayiff < spacing * 2) { return 0; } var v2 = 1; while (v2 < 990) { checkx = x1 + xmod_ * shag * v2; checky = y1 + ymod_ * shag * v2; cellname = (cell_name_calculation(checkx, checky))[2]; walldetected = 0; if (_root.yiff[cellname]._type_ eq 1) { walldetected = 1; break; } distcheck = (CALC_Dist_Xv_Yv(checkx, checky, x1, y1))[0]; if (aaayiff < distcheck) { break; } if (cellname eq cellname665) { break; } ++v2; } return walldetected; } function cell_name_calculation(xx, yy) { var v2 = Math.ceil(xx / spacing); var v1 = Math.ceil(yy / spacing); cellname = 'cell' + v2 + '_' + v1; return [v2, v1, cellname]; } function traceCell() { trace(cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse)); } function CALC_Dist_Xv_Yv_dispersion(x1, y1, x2, y2, dispersion) { A = {}; B = {}; A.xx = x1; A.yy = y1; B.xx = x2; B.yy = y2; dx = A.xx - B.xx; dy = A.yy - B.yy; distance = Math.sqrt(dx * dx + dy * dy); dx_a = Math.abs(dx); dy_a = Math.abs(dy); if (dx > 0 or dx eq 0) { xmod = 1; } else { xmod = -1; } if (dy > 0 or dy eq 0) { ymod = 1; } else { ymod = -1; } if (dx_a > dy_a) { spdmod = dy_a / dx_a; x_modifier = xmod; y_modifier = ymod * spdmod; xdispersion = (x_modifier / 100) * dispersion; ydispersion = (y_modifier / 100) * dispersion; xdismod = (-1000 + random(3000)) / 1000; ydismod = (-1000 + random(3000)) / 1000; x_modifier += ydispersion * xdismod; y_modifier += xdispersion * ydismod; return [distance, x_modifier, y_modifier, dx, dy]; } if (dx_a < dy_a) { spdmod = dx_a / dy_a; x_modifier = xmod * spdmod; y_modifier = ymod; xdispersion = (x_modifier / 100) * dispersion; ydispersion = (y_modifier / 100) * dispersion; xdismod = (-1000 + random(3000)) / 1000; ydismod = (-1000 + random(3000)) / 1000; x_modifier += ydispersion * xdismod; y_modifier += xdispersion * ydismod; return [distance, x_modifier, y_modifier, dx, dy]; } x_modifier = xmod; y_modifier = ymod; xdispersion = (x_modifier / 100) * dispersion; ydispersion = (y_modifier / 100) * dispersion; xdismod = (-1000 + random(3000)) / 1000; ydismod = (-1000 + random(3000)) / 1000; x_modifier += ydispersion * xdismod; y_modifier += xdispersion * ydismod; return [distance, x_modifier, y_modifier, dx, dy]; } function CALC_Dist_Xv_Yv(x1, y1, x2, y2) { A = {}; B = {}; A.xx = x1; A.yy = y1; B.xx = x2; B.yy = y2; dx = A.xx - B.xx; dy = A.yy - B.yy; distance = Math.sqrt(dx * dx + dy * dy); dx_a = Math.abs(dx); dy_a = Math.abs(dy); if (dx > 0 or dx eq 0) { xmod = 1; } else { xmod = -1; } if (dy > 0 or dy eq 0) { ymod = 1; } else { ymod = -1; } if (dx_a > dy_a) { spdmod = dy_a / dx_a; x_modifier = xmod; y_modifier = ymod * spdmod; return [distance, x_modifier, y_modifier, dx, dy]; } if (dx_a < dy_a) { spdmod = dx_a / dy_a; x_modifier = xmod * spdmod; y_modifier = ymod; return [distance, x_modifier, y_modifier, dx, dy]; } x_modifier = xmod; y_modifier = ymod; return [distance, x_modifier, y_modifier, dx, dy]; } function rotation_towards_movement2(trg, xspeed, yspeed) { speedpovorota = 1; dx = xspeed; dy = yspeed; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_towards_movement(trg, xspeed, yspeed) { if (_root.quickcombat eq 1) { speedpovorota = 1; } else { speedpovorota = 0.4; } dx = xspeed; dy = yspeed; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_face_point2(trgt1, xx2, yy2, slow787945675345) { mewmewmewmewmewmew = CALC_Dist_Xv_Yv(xx2, yy2, trgt1._x, trgt1._y); speedpovorota = 1; if (slow787945675345 eq 1) { speedpovorota = 0.7; slow787945675345 = 0; } trg = trgt1; dx = mewmewmewmewmewmew[3]; dy = mewmewmewmewmewmew[4]; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_face_target(trgt1, trgt2, slow787945675345) { mewmewmewmewmewmew = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); speedpovorota = 1; if (slow787945675345 eq 1) { speedpovorota = 0.7; slow787945675345 = 0; } trg = trgt1; dx = mewmewmewmewmewmew[3]; dy = mewmewmewmewmewmew[4]; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function rotation_to_points(trgt, xx, yy) { mewmewmewmewmewmew = CALC_Dist_Xv_Yv(xx, yy, trgt._x, trgt._y); speedpovorota = 1; trg = trgt; dx = mewmewmewmewmewmew[3]; dy = mewmewmewmewmewmew[4]; angle1 = Math.atan2(dy, dx) * 57.29577951308232; angle2 = trg._rotation; if (angle2 < 0) { angle2 += 360; } if (angle1 < 0) { angle1 += 360; } aa = angle2 - angle1; if (aa > 180) { aa -= 360; } else { if (aa < -180) { aa += 360; } } aa *= speedpovorota; if (Math.abs(aa) > 0.01) { trg._rotation -= aa; } else { trg._rotation = angle1; } } function createArray_of_Unoccupied_cells(startcell_x, startcell_y, endcell_x, endcell_y) { recheck_cell_occupation(); var v4 = new Array(); var v3 = startcell_y; while (v3 <= endcell_y) { var v2 = startcell_x; while (v2 <= endcell_x) { cellname = _root.yiff['cell' + v2 + '_' + v3]; if (cellname.occupied eq 0) { v4.push(cellname); } ++v2; } ++v3; } return v4; } function recheck_cell_occupation() { var v2 = 1; while (v2 <= _root.field_height) { var v3 = 1; while (v3 <= _root.field_length) { cellname = _root.yiff['cell' + v3 + '_' + v2]; cellname.occupied = 0; ++v3; } ++v2; } v3 = 0; while (v3 < _root.enemy_ammount_map + 10) { trtrgt = _root.yiff['enemy_' + v3]; if (trtrgt) { sdgsdfg = (cell_name_calculation(trtrgt._x, trtrgt._y))[2]; _root.yiff[sdgsdfg].occupied = trtrgt; } ++v3; } } function checkForBeingSurrounded(who) { recheck_cell_occupation(); cellx1 = (cell_name_calculation(who._x, who._y))[0]; celly1 = (cell_name_calculation(who._x, who._y))[1]; cellx2 = cellx1 - 1; celly2 = celly1 - 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1; celly2 = celly1 - 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 + 1; celly2 = celly1 - 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 - 1; celly2 = celly1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 + 1; celly2 = celly1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 - 1; celly2 = celly1 + 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1; celly2 = celly1 + 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } cellx2 = cellx1 + 1; celly2 = celly1 + 1; checkcell = _root.yiff['cell' + cellx2 + '_' + celly2]; if (checkcell.occupied.team != who.team and checkcell._type_ != 1) { return 'not surrounded'; } return 'true'; } function create_area_array(center_x, center_y, radius, sector) { areaCellsArray = []; if (sector eq 1) { xstart = center_x; xfinish = center_x + radius; ystart = center_y; yfinish = center_y + radius; } else { if (sector eq 2) { xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y + (radius - 1); yfinish = center_y + radius; } else { if (sector eq 3) { xstart = center_x - radius; xfinish = center_x; ystart = center_y; yfinish = center_y + radius; } else { if (sector eq 4) { xstart = center_x + (radius - 1); xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y + radius; } else { if (sector eq 5) { xstart = center_x - radius; xfinish = center_x - (radius - 1); ystart = center_y - radius; yfinish = center_y + radius; } else { if (sector eq 6) { xstart = center_x; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y; } else { if (sector eq 7) { xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y - (radius - 1); } else { if (sector eq 8) { xstart = center_x - radius; xfinish = center_x; ystart = center_y - radius; yfinish = center_y; } else { if (sector eq 0) { xstart = center_x - 1; xfinish = center_x + 1; ystart = center_y - 1; yfinish = center_y + 1; } else { xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y + radius; } } } } } } } } } i = xstart; while (i <= xfinish) { j = ystart; while (j <= yfinish) { if (i > 0 and j > 0 and i < field_length + 1 and j < field_height + 1) { cellnam6e = _root.yiff['cell' + i + '_' + j]; if (cellnam6e._type_ != 1) { if (cellnam6e.occupied eq 0) { areaCellsArray.push([i, j]); } } } ++j; } ++i; } return areaCellsArray; } function create_area_array2(x_min, x_max, y_min, y_max) { areaCellsArray2 = []; i = x_min; while (i <= x_max) { j = y_min; while (j <= y_max) { if (i > 0 and j > 0 and i < field_length + 1 and j < field_height + 1) { cellnam6e = _root.yiff['cell' + i + '_' + j]; if (cellnam6e._type_ != 1) { if (cellnam6e.occupied eq 0) { areaCellsArray2.push([i, j]); } } } ++j; } ++i; } return areaCellsArray2; } function create_area_array3(center_x, center_y, radius) { areaCellsArray3 = []; xstart = center_x - radius; xfinish = center_x + radius; ystart = center_y - radius; yfinish = center_y + radius; trace(xstart + ' ' + xfinish + ' ' + ystart + ' ' + yfinish); i = xstart; while (i <= xfinish) { j = ystart; while (j <= yfinish) { if (i > 0 and j > 0 and i < field_length + 1 and j < field_height + 1) { areaCellsArray3.push([i, j]); } ++j; } ++i; } return areaCellsArray3; } function doSplashDMGnineCells(cur_dmg, who_fired, center_cell_x, center_cell_y) { recheck_cell_occupation(); cellx = center_cell_x; celly = center_cell_y; cellname = _root.yiff['cell' + cellx + '_' + celly]; cellname.occupied.dmg += cur_dmg; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); cellx = center_cell_x - 1; celly = center_cell_y - 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x; celly = center_cell_y - 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x + 1; celly = center_cell_y - 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x - 1; celly = center_cell_y; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x + 1; celly = center_cell_y; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x - 1; celly = center_cell_y + 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x; celly = center_cell_y + 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } cellx = center_cell_x + 1; celly = center_cell_y + 1; cellname = _root.yiff['cell' + cellx + '_' + celly]; if (cellname.occupied != who_fired) { cellname.occupied.dmg += cur_dmg * 0.5; recalcHPindicatoretc(cellname.occupied); msg = '-' + Math.floor(cur_dmg * 0.5); otletaniedamaga(cellname.occupied._x, cellname.occupied._y, msg, 'dmg'); } } function showhideGrid(what) { if (what eq 'show') { var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; if (cellname._type_ eq 0) { cellname.gotoAndStop(2); } ++v2; } ++v3; } } else { if (what eq 'hide') { var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; cellname.gotoAndStop(1); ++v2; } ++v3; } } } } function maintenancePutDotOnSTage(xx, yy) {} function Click1CellTEST() { trace('Cell: ' + (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[2]); } function enemyHitChance_calculation(shooter, victim) { base_acc = shooter.accuracy; attack_rad = shooter.attack_radius - 2; zomgyiff61666666 = CALC_Dist_Xv_Yv(shooter._x, shooter._y, victim._x, victim._y); distancecheck0 = zomgyiff61666666[0]; distance_spaces = Math.floor(distancecheck0 / spacing); if (distancecheck0 < spacing * 1.5) { base_acc += 50; } else { if (distancecheck0 > spacing * 1.5 and distancecheck0 < spacing * 2.5) { base_acc += 25; } } if (distance_spaces < attack_rad) { acc1 = base_acc; acc2 = Math.floor(acc1); } else { _root.acc_falloff = 10; acc1 = base_acc - (distance_spaces - attack_rad) * _root.acc_falloff; acc2 = Math.floor(acc1); } if (acc2 < 0) { acc2 = 0; } return acc2; } function hitChance_calculation() { if (_root.melee_attack_pricel eq 1) { _root.hitchance = 'x'; base_accuracy = _root.character_arr[melee_id]; yifxxx7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx7 + '_' + yifyyy7]; hc_trgt1 = _root.current_participant; hc_trgt2 = trgtcell; zomgyiff61666666 = CALC_Dist_Xv_Yv(hc_trgt1._x, hc_trgt1._y, hc_trgt2._x, hc_trgt2._y); distancecheck0 = zomgyiff61666666[0]; if (distancecheck0 < spacing * 1.5) { _root.hitchance = base_accuracy; } } else { if (_root.ranged_attack_pricel eq 1 or _root.aimed_shot_menu) { yifxxx7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx7 + '_' + yifyyy7]; if (!trgtcell) { return undefined; } if (previous_cell != trgtcell or _root.aimed_shot_menu) { previous_cell = trgtcell; _root.hitchance = 'x'; if (_root.aimed_shot_menu) { hc_trgt1 = _root.current_participant; hc_trgt2 = _root.aimedTarget; } else { hc_trgt1 = _root.current_participant; recheck_cell_occupation(); if (trgtcell.occupied eq 0) { return undefined; } hc_trgt2 = trgtcell.occupied; } ch1k = check_for_obstacle_between_2_points(hc_trgt1._x, hc_trgt1._y, hc_trgt2._x, hc_trgt2._y); if (ch1k eq 1) { _root.obstackled = 1; } else { _root.obstackled = 0; } base_accuracy = _root.character_arr[firearms_id]; wpn_range = _root.firearms_slot_item.range + perception_range_mod; zomgyiff61666666 = CALC_Dist_Xv_Yv(hc_trgt1._x, hc_trgt1._y, hc_trgt2._x, hc_trgt2._y); distancecheck0 = zomgyiff61666666[0]; distance_spaces = Math.floor(distancecheck0 / spacing); if (distancecheck0 < spacing * 1.5) { base_accuracy += 50; } else { if (distancecheck0 > spacing * 1.5 and distancecheck0 < spacing * 2.5) { base_accuracy += 25; } } if (distance_spaces <= wpn_range) { accuracy1 = base_accuracy - (0.1 / wpn_range) * distance_spaces * base_accuracy; accuracy2 = Math.floor(accuracy1); } else { accuracy1 = base_accuracy - 0.1 * base_accuracy - (distance_spaces - wpn_range) * _root.accuracy_falloff_outofrange; accuracy2 = Math.floor(accuracy1); } _root.hitchance = accuracy2; if (_root.hitchance < 30 and _root.hitchance > 15) { _root.hitchance = 30; } else { if (_root.hitchance < 5) { _root.hitchance = 5; } } if (_root.obstackled eq 1) { _root.hitchance = 'x'; } } } } } function Furry_GettingHurt(byWhom, who) { dmg_min = byWhom.dmg_min; dmg_max = byWhom.dmg_max; trgt = who; dmgresist = trgt.dmg_resist; armorclass = trgt.armor_class; if (who.team != byWhom.team) { trace('Setting Attacker to be victims forced trgt'); who.forcedtarget = byWhom; msg000222 = ''; } else { msg000222 = 'FRIENDLY FIRE '; } criticaldone = 0; if (who eq _root.character_unuit) { thiscriticalchance = byWhom.critical_chance + _root.enemy_critical_plusORminus; } else { thiscriticalchance = byWhom.critical_chance; } if (thiscriticalchance > random(100) and dont_do_criticals != 1) { criticaldone = 1; dmg01 = byWhom.critical_mod * (dmg_max + dmg_min) / 2; } else { dmg01 = dmg_min + random(dmg_max - dmg_min + 1); } dmg02 = dmg01 * ((100 - dmgresist) / 100); trace('DMG 02 ' + dmg02); trace('DMG 01 ' + dmg01); ghghghghjjjyiff = random(100); dmgabsorbed111 = 0; if (armorclass / 2 > ghghghghjjjyiff) { dmg03 = 0; dmgabsorbed111 = 1; } else { if (armorclass > ghghghghjjjyiff) { dmg03 = dmg02 / 2; dmgabsorbed111 = 2; } else { dmg03 = dmg02; } } dmg0 = Math.floor(dmg03); msg = '-' + dmg0; if (criticaldone eq 1) { msg += '*CRITICAL*'; } otletaniedamaga(trgt._x, trgt._y, msg, 'dmg'); trgt.dmg += dmg0; trgt.gotoAndStop(1); trgt.idle.play(); msgadd1111 = ''; msgadd2222 = ''; if (criticaldone eq 1) { msgadd1111 = ' CRITICAL HIT!!! '; } if (dmgabsorbed111 eq 1) { msgadd2222 = ' Damage is fully absorbed by armor (AC Save) '; } else { if (dmgabsorbed111 eq 2) { msgadd2222 = ' Halve the damage is absorbed by armor (1/2AC Save) '; } } pushTextToLog(msg000222 + byWhom.name_ + ' hits ' + trgt.name_ + ' for ' + dmg0 + ' damage. ' + msgadd1111 + msgadd2222); if (trgt.wpn_type eq 'scorpion') { snd_scorpion_hurt(); } else { if (trgt.wpn_type eq 'spider') { snd_spider_hurt(); } } if (byWhom.wpn_type eq 'hammer') { snd_blunt_hit(); } else { if (byWhom.wpn_type eq 'knife') { trs.melee_wpn_hit_1.start(); } } if (criticaldone eq 1) { if (byWhom.wpn_type eq 'scorpion') { trs.critical_scorpion.start(); } else { if (byWhom.wpn_type eq 'spider') { trs.critical_spider.start(); } } } else { if (byWhom.wpn_type eq 'scorpion') { trs.scorpion_bite.start(); } else { if (byWhom.wpn_type eq 'spider') { snd_spider_bite(); } } } } function doDmg(trgt, wpntype) { current_weapon = _root[wpntype + '_slot_item']; skillid = _root[wpntype + '_id']; current_skill = _root.character_arr[skillid]; trace(wpntype + ' ' + current_skill); critical_chance = _root.character_base_critical_chance; dmgresist = trgt.dmg_resist; armorclass = trgt.armor_class; if (trgt.team != current_participant.team) { trace('Setting Attacker to be victims forced trgt'); trgt.forcedtarget = current_participant; msg000222 = ''; } else { msg000222 = ' FRIENDLY FIRE '; } if (wpntype eq 'melee') { current_stat = _root.character_arr[str_id]; } else { current_stat = _root.character_arr[per_id]; } dmg_min = current_weapon.dmg_min; dmg_max = current_weapon.dmg_max; dmg0 = dmg_min + random(dmg_max - dmg_min + 1); if (random(100) < critical_chance) { _root.critical_multiplyer = 3; dmg05 = _root.critical_multiplyer * (dmg_min + dmg_max) / 2; criticaldone = 1; } else { criticaldone = 0; dmg05 = dmg0; } if (dont_do_criticals eq 1) { criticaldone = 0; dmg05 = dmg0; } dmg1 = dmg05 * (1 + (current_stat - 5) * 0.2); if (random(2) eq 1) { dmg_modifier = 1; } else { dmg_modifier = current_skill / 100; } if (current_skill > 100) { dmg_modifier = current_skill / 100; } dmg2 = dmg1 * dmg_modifier; dmg02 = dmg2 * ((100 - dmgresist) / 100); ghghghghjjjyiff = random(100); dmgabsorbed111 = 0; if (armorclass / 2 > ghghghghjjjyiff) { dmg03 = 0; dmgabsorbed111 = 1; } else { if (armorclass > ghghghghjjjyiff) { dmg03 = dmg02 / 2; dmgabsorbed111 = 2; } else { dmg03 = dmg02; } } if (_root.aimed_shot_succeeded eq 1) { _root.aimed_shot_succeeded = 0; if (_root.aimed_bodypart eq 'head') { aimmoddmg = 3; } else { if (_root.aimed_bodypart eq 'torso') { aimmoddmg = 1; } else { aimmoddmg = 1.5; } } trace('AIMED SHOT DMG MOD: ' + aimmoddmg); dmg03 *= aimmoddmg; if (_root.aimed_bodypart eq 'head') { if (dmg03 < dmg_max * 1.2) { dmg03 = dmg_max * 1.5; } } } dmg4 = Math.floor(dmg03); msg = '-' + dmg4; if (criticaldone eq 1) { msg += '*CRITICAL*'; } otletaniedamaga(trgt._x, trgt._y, msg, 'dmg'); trgt.dmg += dmg4; trgt.dmg_done_by_character += dmg4; trgt.idle.play(); if (trgt.dmg > trgt.hp or trgt.dmg eq trgt.hp) { trgt.killedbyfurry = 1; } msgadd1111 = ''; msgadd2222 = ''; if (criticaldone eq 1) { msgadd1111 = ' CRITICAL HIT!!! '; } if (dmgabsorbed111 eq 1) { msgadd2222 = ' Damage is fully absorbed by armor (AC Save) '; } else { if (dmgabsorbed111 eq 2) { msgadd2222 = ' Halve the damage is absorbed by armor (1/2AC Save) '; } } pushTextToLog(msg000222 + 'You hit ' + trgt.name_ + ' for ' + dmg4 + ' damage. ' + msgadd1111 + msgadd2222); if (trgt.wpn_type eq 'scorpion') { snd_scorpion_hurt(); } else { if (trgt.wpn_type eq 'spider') { snd_spider_hurt(); } } } function meleeAttackSequence() { if (_root.mas_step_1 eq 'go') { _root.mas_step_1 = 'done'; yifxxx7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy7 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx7 + '_' + yifyyy7]; dontgetnewcoordinates = 0; if (!trgtcell) { _root.melee_attack_pricel = 0; _root.domeleeattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; zomgyiff61666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, ras_tr2._x, ras_tr2._y); distancecheck0 = zomgyiff61666666[0]; if (distancecheck0 > spacing * 1.5) { _root.melee_attack_pricel = 0; _root.domeleeattacksequence = 0; return undefined; } recheck_cell_occupation(); if (ras_tr2.occupied eq 0 or ras_tr2.occupied eq ras_tr1) { _root.domeleeattacksequence = 0; _root.melee_attack_pricel = 0; return undefined; } else { ras_tr2 = ras_tr2.occupied; } ras_tr1.gotoAndStop(_root.melee_slot_item.animation); _root.mas_step_2 = 'go'; } if (_root.mas_step_2 eq 'go') { rotation_face_point2(ras_tr1, ras_tr2._x, ras_tr2._y, 1); if (ras_tr1.animation.dohit eq 1) { ras_tr1.animation.dohit = 0; _root.mas_step_2 = 'done'; _root.mas_step_3 = 'go'; rotation_face_point2(ras_tr1, ras_tr2._x, ras_tr2._y); if (_root.melee_slot_item.id eq 2101) { snd_melee_1(); } else { if (_root.melee_slot_item.id eq 2102 or _root.melee_slot_item.id eq 2103 or _root.melee_slot_item.id eq 2104) { trs.blunt_wpn_vzmah.start(); } } } } if (_root.mas_step_3 eq 'go') { _root.mas_step_3 = 'done'; accuracy2 = _root.character_arr[melee_id]; trace(accuracy2 + ' akk'); --ras_tr1.actpoints; roll20120 = random(100); trace('Melee hit chance = ' + accuracy2); trace('Melee hit roll: ' + roll20120); if (roll20120 < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed!'); } if (do_miss != 1) { if (_root.melee_slot_item.id eq 2101) { trs.melee_wpn_hit_1.start(); } else { if (_root.melee_slot_item.id eq 2102 or _root.melee_slot_item.id eq 2103 or _root.melee_slot_item.id eq 2104) { snd_blunt_hit(); } } doDmg(ras_tr2, 'melee'); _root.domeleeattacksequence = 0; return undefined; } else { _root.domeleeattacksequence = 0; return undefined; } } } function rangedAttackSequence() { if (_root.firearms_slot_item.automatic eq 1) { if (_root.firearm_clickmode eq 1 or _root.firearm_clickmode eq 2) { weapon_mode = 1; } else { trace('MODE 222222222'); weapon_mode = 2; } } else { if (_root.firearms_slot_item.automatic eq -1) { weapon_mode = 3; } else { weapon_mode = 1; } } if (weapon_mode eq 2) { if (_root.ras_step_1 eq 'go') { _root.ras_step_1 = 'done'; if (dontgetnewcoordinates eq 1) { trgtcell = _root.yiff['cell' + yifxxx1117 + '_' + yifyyy1117]; ++shotnumber; } else { shotnumber = 0; yifxxx1117 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy1117 = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx1117 + '_' + yifyyy1117]; } dontgetnewcoordinates = 1; if (!trgtcell) { _root.dorangedattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; if (ras_tr1.actpoints > 0) { } else { _root.ranged_attack_pricel = 0; } recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed your target'); } trace('RANGED BATTACK acc ' + accuracy2 + ' DO miss ' + do_miss); dispersion_base = 1; shot_x = ras_tr2._x; shot_y = ras_tr2._y; if (do_miss eq 1) { dispersion = 30; } else { dispersion = dispersion_base + 3 * shotnumber; if (dispersion > 30) { dispersion = 30; } } trace('DISPERSION: ' + dispersion); zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(_root.firearms_slot_item.animation1); _root.ras_step_2 = 'go'; } if (_root.ras_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.shoot eq 1) { ras_tr1.animation.shoot = 0; _root.ras_step_2 = 'done'; _root.ras_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); snd_gunshot_11(); } } if (_root.ras_step_3 eq 'go') { _root.ras_step_3 = 'done'; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 27; otkloneniedula = 8; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } --_root.current_amo_in_gun; if (who_is_being_hit eq 0) { if (ras_tr1.animation.lastshot eq 1 or _root.current_amo_in_gun < 1) { _root.dorangedattacksequence = 0; return undefined; } else { _root.ras_step_1 = 'go'; dontgetnewcoordinates = 1; } } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } doDmg(who_is_being_hit, 'firearms'); if (ras_tr1.animation.lastshot eq 1 or _root.current_amo_in_gun < 1) { _root.dorangedattacksequence = 0; return undefined; } else { _root.ras_step_1 = 'go'; dontgetnewcoordinates = 1; } } } } else { if (weapon_mode eq 1) { if (_root.ras_step_1 eq 'go') { _root.ras_step_1 = 'done'; yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { _root.dorangedattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; if (_root.this_shot_is_aimed eq 1) { chk998 = cell_name_calculation(_root.aimedTarget._x, _root.aimedTarget._y); yifffff6g = chk998[2]; ras_tr2 = _root.yiff[yifffff6g]; } if (ras_tr1.actpoints > 0) { } else { _root.ranged_attack_pricel = 0; } recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; if (_root.this_shot_is_aimed eq 1) { if (random(100) < _root.aimed_accuracy) { do_miss = 0; _root.aimed_shot_succeeded = 1; } else { _root.aimed_shot_succeeded = 0; do_miss = 1; } trace(' RANGED aimed ATTACK acc ' + _root.aimed_accuracy + ' DO miss ' + do_miss); _root.this_shot_is_aimed = 0; } else { if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed your target'); } trace(' RANGED ATTACK acc ' + accuracy2 + ' DO miss ' + do_miss); } dispersion_base = 3; shot_x = ras_tr2._x; shot_y = ras_tr2._y; if (do_miss eq 1) { dispersion = 30; } else { dispersion = dispersion_base; } zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; if (_root.firearm_clickmode eq 1 or _root.firearm_clickmode eq 2) { ras_tr1.gotoAndStop(_root.firearms_slot_item.animation); } else { ras_tr1.gotoAndStop(_root.firearms_slot_item.animation1); } _root.ras_step_2 = 'go'; } if (_root.ras_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.doshoot eq 1) { _root.ras_step_2 = 'done'; _root.ras_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); if (_root.firearms_slot_item.id eq 2511 or _root.firearms_slot_item.id eq 2512) { snd_gunshot_11(); } else { if (_root.firearms_slot_item.id eq 2501 or _root.firearms_slot_item.id eq 2502) { trs.gun_shot_1.start(); } } } } if (_root.ras_step_3 eq 'go') { _root.ras_step_3 = 'done'; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 37; otkloneniedula = 7; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } --_root.current_amo_in_gun; if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } if (who_is_being_hit eq 0) { _root.dorangedattacksequence = 0; return undefined; } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } doDmg(who_is_being_hit, 'firearms'); _root.dorangedattacksequence = 0; return undefined; } } } else { if (weapon_mode eq 3) { if (_root.ras_step_1 eq 'go') { _root.ras_step_1 = 'done'; yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { _root.dorangedattacksequence = 0; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; if (ras_tr1.actpoints > 0) { } else { _root.ranged_attack_pricel = 0; } recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog('You have missed your target'); } trace(' RANGED ATTACK acc ' + accuracy2 + ' DO miss ' + do_miss); shot_x = ras_tr2._x; shot_y = ras_tr2._y; dispersion = 20; zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(_root.firearms_slot_item.animation); _root.ras_step_2 = 'go'; } if (_root.ras_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.doshoot eq 1) { _root.ras_step_2 = 'done'; _root.ras_step_3 = 'go'; rotation_face_point2(ras_tr1, shot_x, shot_y); trs.gun_shot_5.start(); } } if (_root.ras_step_3 eq 'go') { _root.ras_step_3 = 'done'; --_root.current_amo_in_gun; var v3 = 0; while (v3 < 8) { if (v3 eq 0 and do_miss eq 0) { zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, 1); } else { zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); } xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 25; otkloneniedula = 4; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } if (who_is_being_hit eq 0) { } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } doDmg(who_is_being_hit, 'firearms'); } ++v3; } _root.dorangedattacksequence = 0; return undefined; } } } } } function ClickCellMakePath() { yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; targetedanimal2009 = 0; if (trgtcell) { if (trgtcell.activatedastarget eq 1) { activate_CHARmovment_function = 1; current_participant.firststep = 1; charmovement_step_12_5 = 'go'; } else { var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; cellname.activatedastarget = 0; ++v2; } ++v3; } recheck_cell_occupation(); if (trgtcell.occupied eq 0 and trgtcell._type_ != 1) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); if (thepath != 'none') { trgtcell.activatedastarget = 1; } tr1.thepath = thepath; } else { if (trgtcell.occupied != 0) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); obstacle_exclude(trgtcell.occupied); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); if (thepath != 'none') { trgtcell.activatedastarget = 1; } thepath.pop(); tr1.thepath = thepath; } } } } } function ClickCellMakePath_peaceMode() { yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (trgtcell._type_ eq 1 or !trgtcell) { return undefined; } recheck_cell_occupation(); if (trgtcell.occupied eq 0) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); } else { if (trgtcell.occupied != 0) { thepath = 'none'; tr1 = _root.current_participant; initialize_obstacles(); obstacle_exclude(trgtcell.occupied); thepath = astarCalcAndShowPath(tr1._x, tr1._y, trgtcell._x, trgtcell._y, 'true'); if (thepath != 'none') { thepath.pop(); } } } if (thepath != 'none') { if (_root.character_encumbered eq 1) { _root.bottommenu.encumbered_message._visible = true; _root.bottommenu.encumbered_message.gotoAndPlay(2); return undefined; } tr1.thepath = thepath; _root.do_peace_walking = 1; peace_charmovement_step_12_5 = 'go'; peace_charmovement_step_13 = 'done'; peace_charmovement_step_13_sidestep1 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; peace_charmovement_step_13_sidestep3_5 = 'done'; peace_charmovement_step_13_sidestep3 = 'done'; peace_charmovement_step_13_sidestep4 = 'done'; removeMovieClip(_root.yiff.shooting_shell.circle); iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('circle', 'circle', iyiff); _root.yiff.shooting_shell.circle._x = _root.yiff._xmouse; _root.yiff.shooting_shell.circle._y = _root.yiff._ymouse; } removeShowPath(); } function CHAR_movement_peace() { if (peace_charmovement_step_12_5 eq 'go') { peace_charmovement_step_12_5 = 'done'; peace_charmovement_step_13 = 'go'; peace_charmovement_step_13_sidestep1 = 'go'; peace_charmovement_step_13_sidestep2 = 'done'; } if (peace_charmovement_step_13 eq 'go') { if (peace_charmovement_step_13_sidestep1 eq 'go') { peace_charmovement_step_13_sidestep1 = 'done'; trgt1 = current_participant; peace_charmovement_step_13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 0) { peace_charmovement_step_13_sidestep2 = 'go'; } else { _root.do_peace_walking = 0; August2008charmovBagfix(); current_participant.gotoAndStop(1); peace_charmovement_step_13 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; } if (peace_charmovement_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; peace_charmovement_step_13 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; peace_charmovement_step_13_sidestep2 = 'done'; peace_charmovement_step_12_5 = 'go'; } else { trgt = current_participant; peace_charmovement_step_13_sidestep3_5 = 'done'; peace_charmovement_step_13_sidestep4 = 'go'; if (peace_charmovement_step_13_sidestep4 eq 'go') { peace_charmovement_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } function August2008charmovBagfix() { if (_root.wehaveclickedsumka != 'none') { tr1 = _root.zalochilis_nasumku; tr2 = _root.character_unuit; yiffdgdfg67867 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg67867[0]; if (distance < spacing * 1.5) { outofrange2010 = 0; } else { outofrange2010 = 1; } if (outofrange2010 != 1) { _root.lootboxmousovered = 'none'; _root.lootBoxOpen(_root.wehaveclickedsumka); } } } function CHAR_movement() { if (charmovement_step_12_5 eq 'go') { charmovement_step_12_5 = 'done'; if (_root.character_encumbered eq 1) { _root.bottommenu.encumbered_message._visible = true; _root.bottommenu.encumbered_message.gotoAndPlay(2); removeShowPath(); activate_CHARmovment_function = 0; August2008charmovBagfix(); current_participant.gotoAndStop(1); return undefined; } if (current_participant.movepoints > 0) { charmovement_step_13 = 'go'; charmovement_step_13_sidestep1 = 'go'; charmovement_step_13_sidestep2 = 'done'; } else { if (current_participant.movepoints <= 0) { removeShowPath(); activate_CHARmovment_function = 0; August2008charmovBagfix(); current_participant.gotoAndStop(1); if (current_participant.actpoints <= 0) { endturnCHeck(); } } } } if (charmovement_step_13 eq 'go') { if (charmovement_step_13_sidestep1 eq 'go') { charmovement_step_13_sidestep1 = 'done'; trgt1 = current_participant; charmovement_step_13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 0) { charmovement_step_13_sidestep2 = 'go'; } else { endturnCHeck(); activate_CHARmovment_function = 0; August2008charmovBagfix(); removeShowPath(); current_participant.gotoAndStop(1); charmovement_step_13 = 'done'; charmovement_step_13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; } if (charmovement_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; if (current_participant.firststep eq 1) { current_participant.firststep = 0; } else { --trgt1.movepoints; } if (do_combat_trace eq 1) { trace('trgt1.movepoints--; Target Cell REACHED'); } charmovement_step_13 = 'done'; charmovement_step_13_sidestep2 = 'done'; charmovement_step_13_sidestep2 = 'done'; charmovement_step_12_5 = 'go'; } else { trgt = current_participant; charmovement_step_13_sidestep3_5 = 'done'; charmovement_step_13_sidestep4 = 'go'; if (charmovement_step_13_sidestep4 eq 'go') { charmovement_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); if (do_combat_trace eq 1) { trace('start walking animation'); } } if (do_combat_trace eq 1) { trace('Moving'); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } function endturnCHeck(forceSkip) { if (current_participant.movepoints eq 0 or forceSkip eq 'true') { if (_root.inventory_menu) { _root.firearm_clickmode = 1; removeMovieClip(_root.inventory_menu); } if (current_participant.actpoints eq 0 or forceSkip eq 'true') { removeShowPath(); manual_controll_on = 0; roundprogress_step2 = 'go'; current_participant.actpoints = 0; current_participant.movepoints = 0; } else { trgt = current_participant; if (do_combat_trace eq 1) { trace('com_att eq 1 - attacking'); } tempvaryiff665 = 'none'; current_participant.current_target = 'none'; tempvaryiff665 = poisk_blijaishei_vidimoi_celi(trgt); current_participant.current_target = tempvaryiff665; if (current_participant.current_target eq 'none') { manual_controll_on = 0; roundprogress_step2 = 'go'; current_participant.actpoints = 0; current_participant.movepoints = 0; } else { endturncheck_DORadiusCHeck = 'go'; } if (endturncheck_DORadiusCHeck eq 'go') { endturncheck_DORadiusCHeck = 'gone'; tr1 = current_participant.current_target; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (distance < tr2.attack_radius) { } else { manual_controll_on = 0; roundprogress_step2 = 'go'; current_participant.actpoints = 0; current_participant.movepoints = 0; } } } } } function CHAR_movement2enemy() { if (mov2trgt_end eq 'go') { mov2trgt_end = 'done'; removeShowPath(); current_participant.gotoAndStop(1); endturnCHeck(); activate_CHARmovment_function2 = 0; } if (mov2trgt_step5 eq 'go') { mov2trgt_step5 = 'done'; tr1 = clicked_target; current_participant.current_target = tr1; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (distance < tr2.attack_radius) { mov2trgt_step8 = 'go'; } else { mov2trgt_step12_5 = 'go'; } } if (mov2trgt_step12_5 eq 'go') { mov2trgt_step12_5 = 'done'; if (current_participant.movepoints > 0) { mov2trgt_step_13 = 'go'; mov2trgt_step_13_sidestep1 = 'go'; mov2trgt_step_13_sidestep2 = 'done'; } else { mov2trgt_end = 'go'; } } if (mov2trgt_step_13 eq 'go') { if (mov2trgt_step_13_sidestep1 eq 'go') { mov2trgt_step_13_sidestep1 = 'done'; trgt1 = current_participant; mov2trgt_step_13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 1) { mov2trgt_step_13_sidestep2 = 'go'; } else { mov2trgt_step_13 = 'done'; mov2trgt_step_13_sidestep2 = 'done'; mov2trgt_step_14 = 'go'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; } if (mov2trgt_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; --trgt1.movepoints; mov2trgt_step_13 = 'done'; mov2trgt_step_13_sidestep2 = 'done'; mov2trgt_step_13_sidestep2 = 'done'; mov2trgt_step5 = 'go'; } else { trgt = current_participant; mov2trgt_step_13_sidestep3_5 = 'done'; mov2trgt_step_13_sidestep4 = 'go'; if (mov2trgt_step_13_sidestep4 eq 'go') { mov2trgt_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } if (mov2trgt_step_14 eq 'go') { mov2trgt_step_14 = 'done'; tr1 = clicked_target; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (distance < tr2.attack_radius) { mov2trgt_step8 = 'go'; } else { mov2trgt_end = 'go'; } } if (mov2trgt_step8 eq 'go') { mov2trgt_step8 = 'done'; if (current_participant.actpoints > 0) { mov2trgt_step9 = 'go'; mov2trgt_step9_part_1 = 'go'; } else { mov2trgt_end = 'go'; } } if (mov2trgt_step9 eq 'go') { trgth = current_participant; if (mov2trgt_step9_part_1 eq 'go') { _root.trigger_1 = 1; mov2trgt_step9_part_1 = 'done'; ranged_att = 'done'; melee_att = 'done'; if (trgth.attack_radius > spacing * 2) { if (do_combat_trace eq 1) { trace('Ranged attack GO!'); } ranged_att = 'go'; ranged_p0 = 'go'; ranged_p_minus1 = 'go'; } else { if (do_combat_trace eq 1) { trace('MELEE attack GO!'); } melee_att = 'go'; melee_att_step_0 = 'go'; trace('mele attack begin'); } } if (ranged_att eq 'go') { if (ranged_p0 eq 'go') { if (ranged_p_minus1 eq 'go') { ranged_p_minus1 eq 'done'; trgth.gotoAndStop(3); if (do_combat_trace eq 1) { trace('Attack animation trgth.gotoAndStop(3);'); } rotation_face_target(current_participant, current_participant.current_target); } if (trgth.animation.shot eq 1) { if (do_combat_trace eq 1) { trace('trgth.animation.shot - true'); } ranged_p0 = 'done'; ranged_p1 = 'go'; returtostop = 'go'; } } if (returtostop eq 'go') { if (trgth.animation.done) { returtostop = 0; trgth.gotoAndStop(1); if (do_combat_trace eq 1) { trace('trgth.gotoAndStop(1);'); } } } if (ranged_p1 eq 'go') { ranged_p1 = 'done'; ranged_p2 = 'go'; trgt1 = trgth; trgt2 = current_participant.current_target; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); xmod = yiffdgdfg[1]; ymod = yiffdgdfg[2]; distancetomuzzle = 11; if (_root.quickcombat eq 1) { bulletspeed = 20; } else { bulletspeed = 10; } if (do_combat_trace eq 1) { trace('Bullet Speed and direction set.'); } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('projectile_1', 'cur_proj', iyiff); trgt3 = _root.yiff.shooting_shell.cur_proj; trgt3._x = trgth._x; trgt3._y = trgth._y; trgt3.xmod = xmod; trgt3.ymod = ymod; trgt3._x += distancetomuzzle * trgt3.xmod; trgt3._y += distancetomuzzle * trgt3.ymod; if (current_participant.insect_type eq 'spider') { trs.spider_ranged_attack.start(); } else { trs.scorp_ranged_attack.start(); } } if (ranged_p2 eq 'go') { trgt2 = current_participant.current_target; yiffdgdf1g = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt3._x, trgt3._y); distance = yiffdgdf1g[0]; if (distance <= bulletspeed) { removeMovieClip(trgt3); ranged_p2 = 'done'; ranged_p3 = 'go'; iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); if (current_participant.en_id eq 3 or current_participant.en_id eq 14) { _root.yiff.shooting_shell.attachMovie('explosion_2', 'cur_expl', iyiff); snd_small_goo(); } else { snd_big_goo(); _root.yiff.shooting_shell.attachMovie('explosion_1', 'cur_expl', iyiff); } _root.yiff.shooting_shell.cur_expl._x = trgt2._x; _root.yiff.shooting_shell.cur_expl._y = trgt2._y; if (do_combat_trace eq 1) { trace('Bullet Remove. Explosion BOOM!'); } } else { if (do_combat_trace eq 1) { trace('Bullet fly'); } xspeed = bulletspeed * trgt3.xmod; yspeed = bulletspeed * trgt3.ymod; trgt3._x += xspeed; trgt3._y += yspeed; } } if (ranged_p3 eq 'go') { if (_root.yiff.shooting_shell.cur_expl) { } else { ranged_p3 = 'done'; ranged_p4 = 'go'; if (do_combat_trace eq 1) { trace('Explosion done'); } } } if (ranged_p4 eq 'go') { ranged_p4 = 'done'; ranged_att = 'done'; mov2trgt_step9 = 'done'; mov2trgt_end = 'go'; current_participant.gotoAndStop(1); --current_participant.actpoints; if (do_combat_trace eq 1) { trace('actpoints--; doSplashDMGnineCells(); (splash ne vsegda)'); } tr1 = current_participant; tr2 = current_participant.current_target; cur_dmg = tr1.dmg_min + 1 + random(tr1.dmg_max - tr1.dmg_min); center_cell_x = (cell_name_calculation(tr2._x, tr2._y))[0]; center_cell_y = (cell_name_calculation(tr2._x, tr2._y))[1]; who_fired = current_participant; if (current_participant.en_id eq 3 or current_participant.en_id eq 14) { tr2.dmg += cur_dmg; msg = '-' + Math.floor(cur_dmg); otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } else { doSplashDMGnineCells(cur_dmg, who_fired, center_cell_x, center_cell_y); } if (do_combat_trace eq 1) { trace('EXP point obtained'); } if (tr1.expp < _root.exp_max) { ++tr1.expp; } } } if (melee_att eq 'go') { if (melee_att_step_0 != 'done') { melee_att_step_0 = 'done'; trgth.current_target.gotoAndStop(1); trgth.current_target.idle.gotoAndPlay(2); trgth.gotoAndStop(3); if (do_combat_trace eq 1) { trace('Start MELEE attack and Target Hurt ANIMATIONS'); } rotation_face_target(current_participant, current_participant.current_target); } if (trgth.animation.ended eq 1) { melee_att = 'done'; mov2trgt_step9 = 'done'; mov2trgt_end = 'go'; current_participant.gotoAndStop(1); --current_participant.actpoints; if (do_combat_trace eq 1) { trace('actpoints--; Melee Attack DOne, dmg scrpt done'); } tr1 = current_participant; tr2 = current_participant.current_target; playsnd = 0; if (random(100) eq _root.miss_chance_percent) { msg = '*MISS*'; otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); playsnd = 1; } else { curdmg444 = tr1.dmg_min + 1 + random(tr1.dmg_max - tr1.dmg_min); tr2.dmg += curdmg444; playsnd = 2; if (random(100) < _root.critical_chance_percent and tr2.en_id != 100 and tr2.en_id != 200) { tr2.dmg += 55000; playsnd = 3; msg = '*CRITICAL HIT*'; otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } else { msg = '-' + Math.floor(curdmg444); if (tr1.poison_time > 0 and tr2.en_id != 100 and tr2.en_id != 200) { otletaniedamaga(tr2._x, tr2._y, msg, 'dmg', '*poisoned*'); } else { otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } } if (playsnd eq 1) { trs.miss.start(); } else { if (playsnd eq 2) { if (tr1.insect_type eq 'spider') { snd_spider_bite(); } else { trs.scorpion_bite.start(); } } else { if (playsnd eq 3) { if (tr1.insect_type eq 'spider') { trs.critical_spider.start(); } else { trs.critical_scorpion.start(); } } } } if (tr2.insect_type eq 'spider') { snd_spider_hurt(); } else { if (tr2.insect_type eq 'scorpion') { snd_scorpion_hurt(); } } if (do_combat_trace eq 1) { trace('EXP point obtained'); } if (tr1.expp < _root.exp_max) { ++tr1.expp; } if (tr1.poison_time > 0 and tr2.poisoned_for_dmg <= tr1.poison_dmg and tr2.en_id != 100 and tr2.en_id != 200) { tr2.poison_time_received = tr1.poison_time; tr2.poisoned_for_dmg = tr1.poison_dmg; if (do_combat_trace eq 1) { trace('Target Poisoned ' + tr2.poison_time_received + ' ' + tr2.poisoned_for_dmg); } } if (tr1.en_id eq 15 and tr2.en_id != 100 and tr2.en_id != 200) { tr2.blackwidowbittten = 1; if (do_combat_trace eq 1) { trace('tr2.blackwidowbittten = 1;'); } } recalcHPindicatoretc(tr2); if (do_combat_trace eq 1) { trace('recalcHPindicatoretc(tr2);'); } } } } } } function character_AP_subtract() { if (_root.firearm_clickmode eq 1) { _root.character_unuit.actpoints -= _root.firearms_slot_item.ap_cost_single; } else { if (_root.firearm_clickmode eq 2) { _root.character_unuit.actpoints -= _root.firearms_slot_item.ap_cost_aim; } else { if (_root.firearm_clickmode eq 3) { _root.character_unuit.actpoints -= _root.firearms_slot_item.ap_cost_burst; } } } } function aimedShotSelectTarget() { _root.ranged_attack_pricel = 0; yifxxx = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[0]; yifyyy = (cell_name_calculation(_root.yiff._xmouse, _root.yiff._ymouse))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { _root.aimedTarget = 0; return undefined; } recheck_cell_occupation(); if (trgtcell.occupied eq 0) { _root.aimedTarget = 0; return undefined; } _root.aimedTarget = trgtcell.occupied; if (_root.aimedTarget eq _root.character_unuit) { return undefined; } initialiseAimedSHotMenu(); } function do_poison_dmg_and_regeneration() { i = 0; while (i < _root.enemy_ammount_map) { trgten = _root.yiff['enemy_' + i]; if (trgten and trgten.en_id != 100 and trgten.en_id != 200) { if (trgten.poison_time_received > 0) { --trgten.poison_time_received; trgten.dmg += trgten.poisoned_for_dmg; msg = '-' + Math.floor(trgten.poisoned_for_dmg); otletaniedamaga(trgten._x, trgten._y, msg, 'poison'); } else {} } ++i; } } function poisk_blijaishei_vidimoi_celi(watcher) { skolko_bragov = _root.enemy_ammount_map; var v4 = new Array(); i = 0; while (i < skolko_bragov) { trgt = _root.yiff['enemy_' + i]; if (trgt and trgt != watcher and trgt.team != watcher.team) { if (do_combat_trace eq 1) { trace('All enemies on the map (different team): ' + trgt); } tr1 = trgt; tr2 = watcher; distance = (CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y))[0]; tr1.tempvar_distance = distance; if (distance < watcher.visibility_radius and tr1.team != tr2.team) { if (trgt.blackwidowbittten eq 1 and tr2.en_id eq 15) { } else { v4.push(trgt); } } } ++i; } if (v4.length eq 0) { return 'none'; } thelengthyiff666 = v4.length; var v5 = new Array(); i = 0; while (i < thelengthyiff666) { trgt1 = v4[i]; this['targetobj' + i] = {}; this['targetobj' + i].distance = trgt1.tempvar_distance; this['targetobj' + i].id_absolute = trgt1; v5.push(this['targetobj' + i]); ++i; } v5.sortOn('distance', Array.NUMERIC); thelengthyiff666 = v5.length; returnresult = 'none'; i = 0; while (i < thelengthyiff666) { trgt1 = v5[i]; chk = check_for_obstacle_between_2_points(watcher._x, watcher._y, trgt1.id_absolute._x, trgt1.id_absolute._y); if (chk eq 0) { returnresult = trgt1.id_absolute; break; } ++i; } if (watcher eq returnresult) { returnresult = 'none'; } if (do_combat_trace eq 1) { } return returnresult; } function AIdonefn() { if (do_combat_trace eq 1) { trace('**[AI DOne]**'); } shotnumberredefine = 1; _root.current_ating_unit.gotoAndStop(1); _root.current_ating_unit = 0; alreadyIdled = 1; roundprogress_AIdone = 'done'; roundprogress_step2 = 'go'; roundprogress_step1 = 'done'; roundprogress_step3 = 'done'; roundprogress_step4 = 'done'; roundprogress_step5 = 'done'; roundprogress_step6 = 'done'; roundprogress_step7 = 'done'; roundprogress_step8 = 'done'; roundprogress_step9 = 'done'; roundprogress_step10 = 'done'; roundprogress_step11 = 'done'; roundprogress_step12 = 'done'; roundprogress_step12_5 = 'done'; roundprogress_step13 = 'done'; roundprogress_step14 = 'done'; roundprogress_step15 = 'done'; roundprogress_step16 = 'done'; } function roundProgressing_integrity() { if (roundprogress_RoundEnd eq 'go') { trace('ROUND END'); yiffffiyuurtu = 0; i = 0; while (i < enemy_ammount) { trgten = _root.yiff['enemy_' + i]; if (trgten) { ++yiffffiyuurtu; } ++i; } if (yiffffiyuurtu < 2) { _root.peaqce_mode = 1; _root.ranged_attack_pricel = 0; _root.melee_attack_pricel = 0; } if (do_combat_trace eq 1) { trace('*****[ROUND END]*****'); } do_poison_dmg_and_regeneration(); i = 0; while (i < enemy_ammount) { trgten = _root.yiff['enemy_' + i]; if (trgten) { trgten.initiative = trgten.initiative_base + random(9999) / 10000; } ++i; } _root.current_ating_unit.gotoAndStop(1); _root.current_ating_unit = 0; ++_root.currentround; roundAnnouncement(); roundprogress_RoundEnd = 'done'; _root.game_on_hold = 0; roundprogress_step1 = 'go'; roundprogress_step2 = 'done'; roundprogress_step2_5 = 'done'; roundprogress_step3 = 'done'; roundprogress_step4 = 'done'; roundprogress_step5 = 'done'; roundprogress_step6 = 'done'; roundprogress_step6_5 = 'done'; roundprogress_step7 = 'done'; roundprogress_step8 = 'done'; roundprogress_step9 = 'done'; roundprogress_step10 = 'done'; roundprogress_step11 = 'done'; roundprogress_step12 = 'done'; roundprogress_step12_5 = 'done'; roundprogress_step13 = 'done'; roundprogress_step13_5 = 'done'; roundprogress_step14 = 'done'; roundprogress_step15 = 'done'; roundprogress_step16 = 'done'; if (spawn_points_1 < spawn_points_max) { spawn_points_1 += spawn_points_surplus_1; } else { spawn_points_1 = spawn_points_max; } if (spawn_points_2 < spawn_points_max2) { spawn_points_2 += spawn_points_surplus_2; } else { spawn_points_2 = spawn_points_max2; } _root.free_psi_points += 2; if (_root.free_psi_points > 4) { _root.free_psi_points = 4; } } if (roundprogress_AIdone eq 'go') { AIdonefn(); trace('AIDONE'); } if (roundprogress_step1 eq 'go') { ai_step_1(); } if (roundprogress_step2 eq 'go') { ai_step_2(); } if (roundprogress_step2_4 eq 'go') { ai_step_2_4(); } if (roundprogress_step2_5 eq 'go') { ai_step_2_5(); } if (roundprogress_step3 eq 'go') { ai_step_3(); } if (roundprogress_step4 eq 'go') { ai_step_4(); } if (roundprogress_step5 eq 'go') { ai_step_5(); } if (roundprogress_step6 eq 'go') { ai_step_6(); } if (roundprogress_step6_5 eq 'go') { ai_step_6_5(); } if (roundprogress_step7 eq 'go') { ai_step_7(); } if (roundprogress_step8 eq 'go') { ai_step_8(); } if (roundprogress_step9 eq 'go') { ai_step_9(); } ai_step_10(); ai_step_12(); ai_step_12_5(); ai_step_13(); ai_step_13_5(); step4r(); } function step4R6_ranged_attack_1() { if (_root.ras1_step_1 eq 'go') { trace('!!!!!!!!!!!!step4R6_ranged_attack_1'); _root.ras1_step_1 = 'done'; trace('ras1_step_1 '); tr1 = current_participant.current_target; tr2 = current_participant; yifxxx = (cell_name_calculation(tr1._x, tr1._y))[0]; yifyyy = (cell_name_calculation(tr1._x, tr1._y))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { step_4R_6 = 'yiffon'; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; accuracy2 = enemyHitChance_calculation(ras_tr1, ras_tr2); if (random(100) < accuracy2) { do_miss = 0; } else { do_miss = 1; pushTextToLog(ras_tr1.name_ + ' missed.'); } dispersion_base = 3; shot_x = ras_tr2._x; shot_y = ras_tr2._y; if (do_miss eq 1) { dispersion = 30; } else { dispersion = dispersion_base; } zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(3); _root.ras1_step_2 = 'go'; } if (_root.ras1_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.doshoot eq 1) { _root.ras1_step_2 = 'done'; _root.ras1_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); trs.gun_shot_1.start(); } } if (_root.ras1_step_3 eq 'go') { _root.ras1_step_3 = 'done'; who_is_being_hit = 0; --ras_tr1.ammoingun; zomgyiff6666666 = CALC_Dist_Xv_Yv(shot_x, shot_y, ras_tr1._x, ras_tr1._y); distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 37; otkloneniedula = 7; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } _root.ras1_step_4 = 'go'; shottimer133234 = 0; } if (_root.ras1_step_4 eq 'go') { ++shottimer133234; if (shottimer133234 > 10) { _root.ras1_step_4 = 'done'; shottimer133234 = 0; if (who_is_being_hit eq 0) { shooting_has_ended = 1; return undefined; } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } Furry_GettingHurt(ras_tr1, who_is_being_hit); shooting_has_ended = 1; return undefined; } } } } function step4R6_ranged_attack_2() { trace('_root.ras1_step_1 EQ ' + _root.ras1_step_1); if (_root.ras1_step_1 eq 'go') { if (shotnumberredefine != 0) { shotnumber = -1; shotnumberredefine = 0; } _root.ras1_step_1 = 'done'; trace('step4R6_ranged_attack_2 STEP 1'); if (shotnumber eq -1) { tr1 = current_participant.current_target; tr2 = current_participant; yifxxx = (cell_name_calculation(tr1._x, tr1._y))[0]; yifyyy = (cell_name_calculation(tr1._x, tr1._y))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; trgtcell_zapomneno = trgtcell; } else { trgtcell = trgtcell_zapomneno; } ++shotnumber; trace('SHOTNUMBER ' + shotnumber); if (!trgtcell) { step_4R_6 = 'yiffon'; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; accuracy2 = enemyHitChance_calculation(ras_tr1, ras_tr2); if (random(100) < accuracy2) { do_miss = 0; } else { pushTextToLog(ras_tr1.name_ + ' missed.'); do_miss = 1; } dispersion_base = 1; shot_x = ras_tr2._x; shot_y = ras_tr2._y; if (do_miss eq 1) { dispersion = 30; } else { dispersion = dispersion_base + 3 * shotnumber; if (dispersion > 30) { dispersion = 30; } } trace('DISPERSION: ' + dispersion); zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(3); _root.ras1_step_2 = 'go'; } if (_root.ras1_step_2 eq 'go') { trace('ras1_step_2'); rotation_face_point2(ras_tr1, shot_x, shot_y, 1); trace('ras_tr1 ' + ras_tr1); trace('ras_tr1.animation.shoot ' + ras_tr1.animation.shoot); if (ras_tr1.animation.shoot eq 1) { trace('_root.ras1_step_2 = done;'); ras_tr1.animation.shoot = 0; _root.ras1_step_2 = 'done'; _root.ras1_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); snd_gunshot_11(); } } if (_root.ras1_step_3 eq 'go') { _root.ras1_step_3 = 'done'; trace('ras1_step_3'); --ras_tr1.ammoingun; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 27; otkloneniedula = 8; trace('drawing line of fire'); line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } if (who_is_being_hit eq 0) { trace('who_is_being_hit eq 0'); if (ras_tr1.animation.lastshot eq 1) { trace('ras_tr1.animation.lastshot eq 1, _root.ras1_step_4 = go '); _root.ras1_step_4 = 'go'; shottimer133234 = 0; } else { _root.ras1_step_1 = 'go'; } } else { trace('who_is_being_hit ' + who_is_being_hit); dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } Furry_GettingHurt(ras_tr1, who_is_being_hit); if (ras_tr1.animation.lastshot eq 1) { trace('ras_tr1.animation.lastshot eq 1, _root.ras1_step_4 = go '); _root.ras1_step_4 = 'go'; shottimer133234 = 0; } else { _root.ras1_step_1 = 'go'; } } } if (_root.ras1_step_4 eq 'go') { trace('ras1_step_4 !!!!!!!!'); shotnumberredefine = 1; ++shottimer133234; if (shottimer133234 > 10) { _root.ras1_step_4 = 'done'; shottimer133234 = 0; if (who_is_being_hit eq 0) { shooting_has_ended = 1; return undefined; } else { shooting_has_ended = 1; return undefined; } } } } function step4R6_ranged_attack_3() { if (_root.ras1_step_1 eq 'go') { trace('!!!!!!!!!!!!step4R6_ranged_attack_1'); _root.ras1_step_1 = 'done'; trace('ras1_step_1 '); tr1 = current_participant.current_target; tr2 = current_participant; yifxxx = (cell_name_calculation(tr1._x, tr1._y))[0]; yifyyy = (cell_name_calculation(tr1._x, tr1._y))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (!trgtcell) { step_4R_6 = 'yiffon'; return undefined; } ras_tr1 = _root.current_participant; ras_tr2 = trgtcell; recheck_cell_occupation(); obstacle_exclude(ras_tr1); targeted_unit = 0; targeted_unit = ras_tr2.occupied; accuracy2 = enemyHitChance_calculation(ras_tr1, ras_tr2); if (random(100) < accuracy2) { do_miss = 0; } else { pushTextToLog(ras_tr1.name_ + ' missed.'); do_miss = 1; } dispersion_base = 3; shot_x = ras_tr2._x; shot_y = ras_tr2._y; dispersion = 20; zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; ras_tr1.gotoAndStop(3); _root.ras1_step_2 = 'go'; } if (_root.ras1_step_2 eq 'go') { rotation_face_point2(ras_tr1, shot_x, shot_y, 1); if (ras_tr1.animation.doshoot eq 1) { _root.ras1_step_2 = 'done'; _root.ras1_step_3 = 'go'; rotation_towards_movement2(ras_tr1, xmod11, ymod11); trs.gun_shot_5.start(); } } if (_root.ras1_step_3 eq 'go') { _root.ras1_step_3 = 'done'; --ras_tr1.ammoingun; var v3 = 0; while (v3 < 8) { if (v3 eq 0 and do_miss eq 0) { zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, 1); } else { zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(shot_x, shot_y, ras_tr1._x, ras_tr1._y, dispersion); } xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; who_is_being_hit = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = ras_tr1._x + shag * xmod11 * v2; check_y = ras_tr1._y + shag * ymod11 * v2; zomgyiff6666666 = CALC_Dist_Xv_Yv(ras_tr1._x, ras_tr1._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != ras_tr1) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius) { if (targeted_unit eq temptr and do_miss eq 1) { } else { who_is_being_hit = temptr; break; } } } if (cellname._type_ eq 1) { break; } ++v2; } iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); _root.yiff.shooting_shell.attachMovie('shot_line_1', 'shot_line' + iyiff, iyiff); trgt000 = _root.yiff.shooting_shell['shot_line' + iyiff]; gundistance = 25; otkloneniedula = 4; line_x = (shotLineShift(ras_tr1, otkloneniedula))[0]; line_y = (shotLineShift(ras_tr1, otkloneniedula))[1]; zo61 = CALC_Dist_Xv_Yv(line_x, line_y, check_x, check_y); distance_check3 = zo61[0]; trgt000._width = distance_check3 - gundistance; trgt000._x = line_x + gundistance * xmod11; trgt000._y = line_y + gundistance * ymod11; rotation_to_points(trgt000, check_x, check_y); if (distance_check3 < spacing * 3) { removeMovieClip(trgt000); } if (who_is_being_hit eq ras_tr1) { who_is_being_hit = 0; } if (targeted_unit eq who_is_being_hit and do_miss eq 1) { who_is_being_hit = 0; } if (who_is_being_hit eq 0) { iyiff = _root.yiff.shooting_shell.getNextHighestDepth(); opopo = random(3) + 1; _root.yiff.shooting_shell.attachMovie('ground_hit_' + opopo, 'ground_hit_' + iyiff, iyiff); _root.yiff.shooting_shell['ground_hit_' + iyiff]._x = check_x; _root.yiff.shooting_shell['ground_hit_' + iyiff]._y = check_y; } shottimer133234 = 0; if (who_is_being_hit eq 0) { } else { dont_do_criticals = 0; if (do_miss eq 1) { dont_do_criticals = 1; } Furry_GettingHurt(ras_tr1, who_is_being_hit); } ++v3; } _root.ras1_step_4 = 'go'; } if (_root.ras1_step_4 eq 'go') { ++shottimer133234; if (shottimer133234 > 10) { _root.ras1_step_4 = 'done'; shottimer133234 = 0; shooting_has_ended = 1; return undefined; } } } function step4R_fix1() { recheck_cell_occupation(); shooterguy = current_participant; victimguy = current_participant.current_target; zomgyiff6666666 = CALC_Dist_Xv_Yv_dispersion(victimguy._x, victimguy._y, shooterguy._x, shooterguy._y, 1); xmod11 = zomgyiff6666666[1]; ymod11 = zomgyiff6666666[2]; friendlies_in_line_of_sight = 0; distance = zomgyiff6666666[0]; var v2 = 1; while (v2 <= 200) { check_x = shooterguy._x + shag * xmod11 * v2; check_y = shooterguy._y + shag * ymod11 * v2; maintenancePutDotOnSTage(check_x, check_y); zomgyiff6666666 = CALC_Dist_Xv_Yv(shooterguy._x, shooterguy._y, check_x, check_y); distance_check = zomgyiff6666666[0]; if (distance_check > distance) { break; } chk87878 = cell_name_calculation(check_x, check_y); cellx = chk87878[0]; celly = chk87878[1]; kjkjkjk6660900 = chk87878[2]; cellname = _root.yiff[kjkjkjk6660900]; if (cellname.occupied != 0 and cellname.occupied != shooterguy) { temptr = cellname.occupied; zo6 = CALC_Dist_Xv_Yv(temptr._x, temptr._y, check_x, check_y); distance_check2 = zo6[0]; if (distance_check2 < _root.bulletDOhitradius * 2) { if (temptr.team eq shooterguy.team) { friendlies_in_line_of_sight = 1; break; } } } if (cellname._type_ != 0) { break; } ++v2; } trace('FRIENDLIES IN LINE OF SIGHT!!! ' + friendlies_in_line_of_sight); return friendlies_in_line_of_sight; } function ai_step_1() { if (roundprogress_step1 eq 'go') { do_combat_trace = 1; if (do_combat_trace eq 1) { trace('[Step 1]'); } _root.game_on_hold = 0; roundprogress_step1 = 'done'; enemy_ammount = _root.enemy_ammount_map_1; initial_participants = []; enemyarray2010 = []; i = 0; while (i < enemy_ammount) { trgt1 = _root.yiff['enemy_' + i]; if (trgt1 and trgt1.dmg < trgt1.hp) { enemyarray2010.push(trgt1); this['enemy_identificator' + i] = {}; this['enemy_identificator' + i].initiative = trgt1.initiative; this['enemy_identificator' + i].id = 'enemy_' + i; _root.initial_participants.push(this['enemy_identificator' + i]); } ++i; } today = _root.character_arr[day_id]; if (_root.loadmap_id eq 12 and today < 3) { map12_insectcheck_gopnikiatack(); } if (_root.loadmap_id eq 12 and today eq 4) { map12_insectcheck_gopnikiatack2(); } if (_root.loadmap_id eq 14 and today eq 3) { map14_insectcheck_gopnikiatack(); } if (today > 4) { if (_root.loadmap_id eq 12) { map12_insectcheck_gopnikiatack2(); } if (_root.loadmap_id eq 14) { map14_insectcheck_gopnikiatack(); } } _root.initial_participants.sortOn('initiative', Array.NUMERIC); _root.initial_participants.reverse(); roundprogress_step2 = 'go'; } } function ai_step_2() { if (roundprogress_step2 eq 'go') { roundprogress_step2 = 'done'; if (do_combat_trace eq 1) { trace('[Step 2]'); } if (_root.initial_participants.length > 0) { _root.queue_array = _root.initial_participants; showQueue(); current_participant = _root.initial_participants.shift(); } else { roundprogress_RoundEnd = 'go'; } current_participant = current_participant.id; trtrgt = _root.yiff[current_participant]; current_participant = trtrgt; manual_controll_on = 0; if (trtrgt.en_id eq 999 and trtrgt.en_id != 100) { trtrgt.actpoints = trtrgt.actpoints_max; trtrgt.movepoints = trtrgt.movepoints_max; pushTextToLog('It\'s your turn!'); var v3 = 1; while (v3 <= _root.field_height) { var v2 = 1; while (v2 <= _root.field_length) { cellname = _root.yiff['cell' + v2 + '_' + v3]; cellname.activatedastarget = 0; ++v2; } ++v3; } manual_controll_on = 1; if (do_combat_trace eq 1) { trace('************CHARACTER SELECTED*************'); } } else { trtrgt = current_participant; if (trtrgt.dmg < trtrgt.hp) { roundprogress_step2_4 = 'go'; } else { roundprogress_step2 = 'go'; } if (trtrgt.en_id eq 100 or trtrgt.en_id eq 200) { roundprogress_step2_4 = 'dontgo'; roundprogress_step2 = 'go'; } _root.current_ating_unit = trtrgt; if (do_combat_trace eq 1) { trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('[][][][] Unit Chosen: ' + trtrgt + ' [][][][][][]'); trace('Unit team: ' + trtrgt.team); trace('Unit ID: ' + trtrgt.en_id); } } } } function ai_step_2_4() { if (roundprogress_step2_4 eq 'go') { roundprogress_step2_4 = 'done'; roundprogress_step2_5 = 'go'; } } function ai_step_2_5() { if (roundprogress_step2_5 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 2_5]'); } roundprogress_step2_5 = 'done'; trtrgt.actpoints = trtrgt.actpoints_max; trtrgt.movepoints = trtrgt.movepoints_max; if (do_combat_trace eq 1) { trace('Combat and action points RESET'); } roundprogress_step3 = 'go'; roundprogress_step3_p1 = 'go'; } } function ai_step_3() { if (roundprogress_step3 eq 'go') { if (roundprogress_step3_p1 eq 'go') { trgt.ring._visible = false; if (do_combat_trace eq 1) { trace('[Step 3]'); } trtrgt = _root.current_participant; trgt = trtrgt; if (!trgt.idletime) { trgt.idletime = 0; } trgt.idletime += 0.03333333333333333; if (_root.quickcombat eq 1) { trgt.idletime = 999999999; } if (do_combat_trace eq 1) { trace('Idling'); } if (trgt.idletime > _root.idle_time_max) { trgt.idletime = 0; roundprogress_step3_p1 = 'done'; if (trgt.ranged eq 1) { roundprogress_step3_p2 = 'go'; } else { roundprogress_step3_p4 = 'go'; } trgt.ring._visible = false; } else { trgt.ring._visible = true; } } if (roundprogress_step3_p2 eq 'go') { trace('step 3 - p 2'); trgt.ring._visible = false; if (trgt.actpoints > 0 and trgt.ammoingun < 1) { trgt.gotoAndStop(4); roundprogress_step3_p2 = 'done'; roundprogress_step3_p3 = 'go'; trgt.asdasdyiddone = 1; trs.reloadwav.start(); --trgt.actpoints; pushTextToLog(trgt.name_ + ' is reloading.'); trgt.ammoingun = trgt.ammoingun_max; msg = '*reloading*'; otletaniedamaga(trgt._x, trgt._y, msg, 'misc'); trgt = _root.current_participant; } else { roundprogress_step3_p2 = 'done'; roundprogress_step3_p4 = 'go'; } } if (roundprogress_step3_p3 eq 'go') { trace('step 3 - p 3'); trgt = _root.current_participant; if (trgt.animation.done eq 1) { trgt.animation.done = 0; roundprogress_step3_p3 = 'done'; roundprogress_step3_p4 = 'go'; trgt.gotoAndStop(1); } } if (roundprogress_step3_p4 eq 'go') { trace('step 3 - p 4'); trgt = _root.current_participant; trgt.ring._visible = false; hp_max0045 = trgt.hp; hp0045 = trgt.hp - trgt.dmg; percent = hp0045 / hp_max0045; if (trgt.actpoints > 0 and trgt.stimpaks > 0 and percent < 0.3) { trgt.asdasdyiddone = 1; --trgt.actpoints; --trgt.stimpaks; trgt.gotoAndStop(4); trs.stimwav.start(); regenheal = 30; dmgwas11 = trgt.dmg; trgt.dmg -= regenheal; if (dmgwas11 > regenheal) { showheal11 = regenheal; } else { showheal11 = dmgwas11; } if (trgt.dmg < 0) { trgt.dmg = 0; } if (dmgwas11 != 0) { msg = '+' + Math.floor(showheal11); otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); } pushTextToLog(trgt.name_ + ' is using a stimpack. ' + Math.floor(showheal11) + ' hit points restored!'); roundprogress_step3_p4 = 'done'; roundprogress_step3_p5 = 'go'; } else { roundprogress_step3_p4 = 'done'; roundprogress_step3_p5 = 'done'; if (trgt.asdasdyiddone eq 1) { trgt.idletime = 0; } else { trgt.idletime = 9999; } roundprogress_step3_p_end = 'go'; } } if (roundprogress_step3_p5 eq 'go') { trace('step 3 - p 5'); trgt = _root.current_participant; if (trgt.animation.done eq 1) { trgt.animation.done = 0; roundprogress_step3_p5 = 'done'; if (trgt.asdasdyiddone eq 1) { trgt.idletime = 0; } else { trgt.idletime = 9999; } roundprogress_step3_p_end = 'go'; trgt.gotoAndStop(1); } } if (roundprogress_step3_p_end eq 'go') { trace('step 3 - p end'); trgt = _root.current_participant; trgt.idletime += 0.03333333333333333; if (trgt.idletime > 0.5) { trgt.asdasdyiddone = 0; trgt.idletime = 0; roundprogress_step3_p_end = 'done'; roundprogress_step3_p4 = 'done'; roundprogress_step3 = 'done'; roundprogress_step4 = 'go'; } } } } function ai_step_4() { if (roundprogress_step4 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 4]'); } roundprogress_step4 = 'done'; trgt = _root.current_ating_unit; current_participant = trgt; step_4R = 'g55555o'; step_4R_1 = 'g5555o'; if (trgt.ranged eq 1) { step_4R = 'go'; step_4R_1 = 'go'; } else { if (do_combat_trace eq 1) { trace('Unit.gotoand stop 1 - stop animation'); } _root.current_ating_unit.gotoAndStop(1); if (nevermindthis eq 'forgetaboutit') { } else { if (do_combat_trace eq 1) { trace('com_att eq 1 - attacking'); } tempvaryiff665 = 'none'; current_participant.current_target = 'none'; tempvaryiff665 = poisk_blijaishei_vidimoi_celi(trgt); current_participant.current_target = tempvaryiff665; if (do_combat_trace eq 1) { trace('Closest Target Search. Victim found: ' + current_participant.current_target + ' Attacker: ' + current_participant); } if (current_participant.current_target eq 'none') { roundprogress_step12 = 'go'; } else { roundprogress_step5 = 'go'; } } } } } function ai_step_5() { if (roundprogress_step5 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 5]'); } roundprogress_step5 = 'done'; tr1 = current_participant.current_target; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; if (do_combat_trace eq 1) { trace('check distance to target'); } if (distance < tr2.attack_radius) { _root.current_ating_unit.gotoAndStop(1); roundprogress_step8 = 'go'; if (do_combat_trace eq 1) { trace('Target IN ATTACK RADIUS'); } } else { if (do_combat_trace eq 1) { trace('Target TOO FAR TO ATTACK'); } roundprogress_step6 = 'go'; } } } function ai_step_6() { if (roundprogress_step6 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 6]'); } roundprogress_step6 = 'done'; if (current_participant.movepoints > 0) { roundprogress_step6_5 = 'go'; if (do_combat_trace eq 1) { trace('Movement points > 0 OK!'); } } else { if (do_combat_trace eq 1) { trace('Movement points < 0 :('); trace('Movement points set to maximum'); } roundprogress_AIdone = 'go'; current_participant.movepoints = current_participant.movepoints_max; } } } function ai_step_6_5() { if (roundprogress_step6_5 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 6_5]'); } roundprogress_step6_5 = 'done'; ourtrg = current_participant.current_target; trace('OUR TARGET: ' + ourtrg); yifxxx = (cell_name_calculation(ourtrg._x, ourtrg._y))[0]; yifyyy = (cell_name_calculation(ourtrg._x, ourtrg._y))[1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; if (do_combat_trace eq 1) { trace('Finding cell where our target is. RESULT: ' + trgtcell); } initialize_obstacles(); obstacle_exclude(current_participant); obstacle_exclude(ourtrg); tr1 = current_participant; tr2 = trgtcell; thepath = 'none'; thepath = astarCalcAndShowPath(tr1._x, tr1._y, tr2._x, tr2._y, doshowpath); if (thepath != 'none' and tr1.ranged eq 1) { thepath.pop(); } current_participant.thepath = thepath; if (do_combat_trace eq 1) { trace('ASTAR'); trace('RESULT: current_participant.thepath = ' + current_participant.thepath); } if (thepath eq 'none') { roundprogress_step12 = 'go'; } else { roundprogress_step7 = 'go'; rndstep7_sidestep1 = 'go'; } } } function ai_step_7() { if (roundprogress_step7 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 7]'); } if (rndstep7_sidestep1 eq 'go') { rndstep7_sidestep1 = 'done'; if (do_combat_trace eq 1) { trace('[Step 7_side1]'); } trgt1 = current_participant; rndstep7_sidestep4 = 'go'; rndstep7_sidestep2 = 'done'; if (trgt1.thepath.length > 0) { rndstep7_sidestep2 = 'go'; } else { rndstep7_sidestep2 = 'done'; roundprogress_step7 = 'done'; roundprogress_step4 = 'go'; } cellarray = trgt1.thepath.shift(); if (do_combat_trace eq 1) { trace('cellarray = trgt1.thepath.shift() RESULT: ' + cellarray); } trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; yiffdgdfg = CALC_Dist_Xv_Yv(trgt1.gowhere._x, trgt1.gowhere._y, trgt1._x, trgt1._y); ooooodistance = yiffdgdfg[0]; if (ooooodistance < 0.1) { cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; } trgt2 = trgt1.gowhere; trace('GO WHERE: ' + trgt2); yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; recheck_cell_occupation(); if (trgt1.gowhere.occupied != 0 and trgt1.gowhere.occupied != trgt1) { trace('TARGET CELL OCCUPIED - NOT GOING THERE/MOVEMENT STOP'); rndstep7_sidestep2 = 'done'; roundprogress_step7 = 'done'; roundprogress_step4 = 'go'; maintenancePutDotOnSTage(trgt1.gowhere._x, trgt1.gowhere._y); } else { trace('TARGET CELL UNOCCUPIED - FREE TO GO THERE'); } } if (rndstep7_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (do_combat_trace eq 1) { trace('[Step 7_side2]'); } trace('target 1: ' + trgt1 + ' target 2: ' + trgt2 + ' distance: ' + trgt1.distance); if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; --trgt1.movepoints; if (do_combat_trace eq 1) { trace('Cell reached: movepoints--'); } roundprogress_step7 = 'done'; rndstep7_sidestep2 = 'done'; roundprogress_step5 = 'go'; } else { if (rndstep7_sidestep4 eq 'go') { rndstep7_sidestep4 = 'done'; trgt1.gotoAndStop(2); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; if (do_combat_trace eq 1) { trace('moving to next cell'); } rotation_towards_movement(trgt1, xspeed, yspeed); } } } } function ai_step_8() { if (roundprogress_step8 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 8]'); } roundprogress_step8 = 'done'; if (current_participant.actpoints > 0) { if (do_combat_trace eq 1) { trace('roundprogress_step9 = go;'); } roundprogress_step9 = 'go'; step9_part_1 = 'go'; if (do_combat_trace eq 1) { trace('Action points: ' + current_participant.actpoints); } } else { if (do_combat_trace eq 1) { trace('Action points: 0'); trace('Set action points to maximum'); } current_participant.actpoints = current_participant.actpoints_max; roundprogress_AIdone = 'go'; } } } function ai_step_9() { if (roundprogress_step9 eq 'go') { trgth = current_participant; if (step9_part_1 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 9]'); } _root.trigger_1 = 1; step9_part_1 = 'done'; ranged_att = 'done'; melee_att = 'done'; if (trgth.ranged eq 1) { if (do_combat_trace eq 1) { trace('Ranged attack GO!'); } roundprogress_step9 = 'done'; ranged_att = 'done'; step_4R = 'go'; step_4R_1 = 'go'; } else { if (do_combat_trace eq 1) { trace('MELEE attack GO!'); } melee_att = 'go'; melee_att_step_minus1 = 'go'; trgth.gotoAndStop(3); trace('mele attack begin'); if (trgth.wpn_type eq 'hammer') { trs.blunt_wpn_vzmah.start(); } else { if (trgth.wpn_type eq 'knife') { snd_melee_1(); } } } } if (melee_att eq 'go') { if (melee_att_step_minus1 != 'done') { if (trgth.animation.dodmg eq 1) { melee_att_step_minus1 = 'done'; melee_att_step_0 = 'go'; } } if (melee_att_step_0 != 'done') { melee_att_step_0 = 'done'; if (do_combat_trace eq 1) { trace('Start MELEE attack and Target Hurt ANIMATIONS'); } rotation_face_target(current_participant, current_participant.current_target); tr1 = current_participant; tr2 = current_participant.current_target; missed000 = 0; if (random(100) > tr1.accuracy) { pushTextToLog(tr1.name_ + ' missed.'); missed000 = 1; msg = '*MISS*'; otletaniedamaga(tr2._x, tr2._y, msg, 'dmg'); } else { Furry_GettingHurt(tr1, tr2); recalcHPindicatoretc(tr2); if (do_combat_trace eq 1) { trace('recalcHPindicatoretc(tr2);'); } } if (missed000 eq 1) { if (tr1.wpn_type eq 'scorpion' or tr1.wpn_type eq 'spider') { trs.miss.start(); } } else {} } if (trgth.animation.ended eq 1) { melee_att = 'done'; roundprogress_step9 = 'done'; roundprogress_step10 = 'go'; current_participant.gotoAndStop(1); --current_participant.actpoints; if (do_combat_trace eq 1) { trace('actpoints--; Melee Attack DOne, dmg scrpt done'); } } } } } function ai_step_10() { if (roundprogress_step10 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 10]'); } roundprogress_step10 = 'done'; ttrtr = current_participant.current_target; if (ttrtr.dmg < ttrtr.hp) { if (do_combat_trace eq 1) { trace('ttrtr.dmg<ttrtr.hp'); } roundprogress_step5 = 'go'; } else { if (do_combat_trace eq 1) { trace('FALSE: ttrtr.dmg<ttrtr.hp'); } roundprogress_step4 = 'go'; } } } function ai_step_12() { if (roundprogress_step12 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 12]'); } roundprogress_step12 = 'done'; gttr = current_participant; _root.current_ating_unit.gotoAndStop(1); if (do_combat_trace eq 1) { trace('Stop animation: unit.gotoAndStop(1);'); } step12_p0 = 'go'; if (step12_p0 eq 'go') { step12_p0 = 'done'; if (gttr.forcedtarget != 0 and gttr.forcedtarget and gttr.forcedtarget.en_id > -10) { } else { gttr.forcedtarget = 0; } if (gttr.forcedtarget != 0) { step12_p1 = 'go'; } else { step12_p2 = 'go'; } } if (step12_p1 eq 'go') { step12_p1 = 'done'; if (do_combat_trace eq 1) { trace('step12_p1'); } targetedenemy = gttr.forcedtarget; zuzuzyiff = (cell_name_calculation(targetedenemy._x, targetedenemy._y))[2]; trgtcell = _root.yiff[zuzuzyiff]; initialize_obstacles(); obstacle_exclude(current_participant); obstacle_exclude(targetedenemy); if (do_combat_trace eq 1) { trace('recalculate_map_obstacles();astar.initialize();initialize_obstacles();obstacle_exclude(current_participant);'); } tr1 = current_participant; tr2 = trgtcell; thepath = 'none'; thepath = astarCalcAndShowPath(tr1._x, tr1._y, tr2._x, tr2._y, doshowpath); current_participant.thepath = thepath; if (do_combat_trace eq 1) { trace('****current_participant.thepath = ' + current_participant.thepath); } if (thepath eq 'none') { step12_p3 = 'go'; } else { roundprogress_step12_5 = 'go'; } } if (step12_p3 eq 'go') { if (do_combat_trace eq 1) { trace('step12_p3'); } step12_p3 = 'done'; xxx = (cell_name_calculation(gttr._x, gttr._y))[0]; yyy = (cell_name_calculation(gttr._x, gttr._y))[1]; dest_loc_xmin = (cell_name_calculation(targetedenemy._x, targetedenemy._y))[0] - 1; dest_loc_xmax = (cell_name_calculation(targetedenemy._x, targetedenemy._y))[0] + 1; dest_loc_ymin = (cell_name_calculation(targetedenemy._x, targetedenemy._y))[1] - 1; dest_loc_ymax = (cell_name_calculation(targetedenemy._x, targetedenemy._y))[1] + 1; if (xxx < dest_loc_xmin and yyy < dest_loc_ymin) { sector = 1; } else { if (xxx > dest_loc_xmin and xxx < dest_loc_xmax and yyy < dest_loc_ymin) { sector = 2; } else { if (xxx > dest_loc_xmax and yyy < dest_loc_ymin) { sector = 3; } else { if (xxx < dest_loc_xmin and yyy > dest_loc_ymin and yyy < dest_loc_ymax) { sector = 4; } else { if (xxx > dest_loc_xmax and yyy > dest_loc_ymin and yyy < dest_loc_ymax) { sector = 5; } else { if (xxx < dest_loc_xmin and yyy > dest_loc_ymax) { sector = 6; } else { if (xxx > dest_loc_xmin and xxx < dest_loc_xmax and yyy > dest_loc_ymax) { sector = 7; } else { if (xxx > dest_loc_xmax and yyy > dest_loc_ymax) { sector = 8; if (do_combat_trace eq 1) { trace('Destlock => SECTOR: ' + sector); } } else { if (do_combat_trace eq 1) { trace('sector = 0; Unit inside the targeted area, movepoints set to 1;'); } gttr.movepoints = 1; sector = 0; } } } } } } } } recheck_cell_occupation(); ycellarrayzz = create_area_array(xxx, yyy, gttr.movepoints_max, sector); if (do_combat_trace eq 1) { trace('recheck_cell_occupation();'); trace('ycellarrayzz = create_area_array(xxx, yyy, gttr.movepoints_max, sector);'); } ylength = ycellarrayzz.length; randomcellu = random(ylength); yifxxx = ycellarrayzz[randomcellu][0]; yifyyy = ycellarrayzz[randomcellu][1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; initialize_obstacles(); obstacle_exclude(current_participant); if (starttrace eq 1) { trace(current_participant); } tr1 = current_participant; tr2 = trgtcell; thepath = 'none'; thepath = astarCalcAndShowPath(tr1._x, tr1._y, tr2._x, tr2._y, doshowpath); if (thepath != 'none' and tr1.ranged eq 1) { thepath.pop(); } current_participant.thepath = thepath; if (do_combat_trace eq 1) { trace('recalculate_map_obstacles();astar.initialize();initialize_obstacles();obstacle_exclude(current_participant);'); trace('THE PATH: ' + current_participant.thepath); } if (thepath eq 'none') { roundprogress_AIdone = 'go'; } else { roundprogress_step12_5 = 'go'; } } if (step12_p2 eq 'go') { step12_p2 = 'done'; if (do_combat_trace eq 1) { trace('step12_p2);'); trace('FINDING PATH TO RANDOM CELL WITHIN MOVEPOINTS'); } if (!current_participant.destination_area_center) { xxx = (cell_name_calculation(gttr._x, gttr._y))[0]; yyy = (cell_name_calculation(gttr._x, gttr._y))[1]; recheck_cell_occupation(); ycellarrayzz = create_area_array(xxx, yyy, gttr.movepoints_max, 'none'); } else { area_radius444 = 3; dac444 = current_participant.destination_area_center; xxx = (cell_name_calculation(dac444._x, dac444._y))[0]; yyy = (cell_name_calculation(dac444._x, dac444._y))[1]; recheck_cell_occupation(); ycellarrayzz = create_area_array(xxx, yyy, area_radius444, 'none'); } ylength = ycellarrayzz.length; randomcellu = random(ylength); yifxxx = ycellarrayzz[randomcellu][0]; yifyyy = ycellarrayzz[randomcellu][1]; trgtcell = _root.yiff['cell' + yifxxx + '_' + yifyyy]; initialize_obstacles(); obstacle_exclude(current_participant); tr1 = current_participant; tr2 = trgtcell; thepath = 'none'; thepath = astarCalcAndShowPath(tr1._x, tr1._y, tr2._x, tr2._y, doshowpath); current_participant.thepath = thepath; if (do_combat_trace eq 1) { trace('recalculate_map_obstacles();astar.initialize();initialize_obstacles();obstacle_exclude(current_participant);'); trace('THE PATH: ' + current_participant.thepath); } if (thepath eq 'none') { roundprogress_AIdone = 'go'; } else { roundprogress_step12_5 = 'go'; } } } } function ai_step_12_5() { if (roundprogress_step12_5 eq 'go') { roundprogress_step12_5 = 'done'; if (do_combat_trace eq 1) { trace('[Step 12_5]'); } if (current_participant.movepoints > 0) { roundprogress_step13 = 'go'; rndstep13_sidestep1 = 'go'; rndstep13_sidestep2 = 'done'; if (do_combat_trace eq 1) { trace('movepoints>0 - true'); } } else { trace('movepoints = 0 - true; SET movepoints to maximum'); current_participant.movepoints = current_participant.movepoints_max; roundprogress_AIdone = 'go'; } } } function ai_step_13() { if (roundprogress_step13 eq 'go') { roundprogress_step12_5 = 'done'; roundprogress_step12 = 'done'; if (rndstep13_sidestep1 eq 'go') { if (do_combat_trace eq 1) { trace('[Step 13]'); } if (random(_root.playmovesndradnomiser) eq 1) { if (current_participant.wpn_type eq 'spider') { trs.spider_move.start(); } else { if (current_participant.wpn_type eq 'spider') { trs.scorpion_move.start(); } } } rndstep13_sidestep1 = 'done'; trgt1 = current_participant; rndstep13_sidestep3_5 = 'go'; if (trgt1.thepath.length > 0) { rndstep13_sidestep2 = 'go'; } else { roundprogress_step12 = 'go'; rndstep13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; if (do_combat_trace eq 1) { trace('Target Cell set; cellarray = trgt1.thepath.shift();'); } recheck_cell_occupation(); if (trgt1.gowhere.occupied != 0 and trgt1.gowhere.occupied != trgt1) { trace('TARGET CELL OCCUPIED - NOT GOING THERE/MOVEMENT STOP'); roundprogress_step12 = 'go'; rndstep13_sidestep2 = 'done'; maintenancePutDotOnSTage(trgt1.gowhere._x, trgt1.gowhere._y); } else { trace('TARGET CELL UNOCCUPIED - FREE TO GO THERE'); } } if (rndstep13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; --trgt1.movepoints; if (do_combat_trace eq 1) { trace('trgt1.movepoints--; Target Cell REACHED'); } roundprogress_step13 = 'done'; st13_5_p1 = 'go'; roundprogress_step13_5 = 'go'; rndstep13_sidestep2 = 'done'; } else { trgt = current_participant; rndstep13_sidestep3_5 = 'done'; rndstep13_sidestep4 = 'go'; if (rndstep13_sidestep4 eq 'go') { rndstep13_sidestep4 = 'done'; trgt1.gotoAndStop(2); if (do_combat_trace eq 1) { trace('start walking animation'); } } if (do_combat_trace eq 1) { trace('Moving'); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } function ai_step_13_5() { if (roundprogress_step13_5 eq 'go') { trgt1 = current_participant; if (do_combat_trace eq 1) { trace('[Step 13_5]'); } if (st13_5_p1 eq 'go') { st13_5_p1 eq 'done'; if (trgt1.actpoints > 0) { st13_5_p2 = 'go'; if (do_combat_trace eq 1) { trace('Action points: ' + trgt1.actpoints); } } else { if (do_combat_trace eq 1) { trace('Action points: 0 '); } roundprogress_step13_5 = 'done'; roundprogress_step12_5 = 'go'; } } if (st13_5_p2 eq 'go') { st13_5_p2 eq 'done'; roundprogress_step13_5 = 'done'; tempvaryiff78787 = poisk_blijaishei_vidimoi_celi(trgt1); current_participant.current_target = tempvaryiff78787; if (do_combat_trace eq 1) { trace('poisk_blijaishei_vidimoi_celi(trgt1)'); trace('TARGET FOUND: ' + current_participant.current_target); } if (current_participant.current_target eq 'none') { roundprogress_step12_5 = 'go'; } else { roundprogress_step5 = 'go'; } } } } function step4r() { if (step_4R eq 'go') { if (step_4R_1 eq 'go') { step_4R_1 = 'yiffed'; trace('step_4R_1'); trgt = current_participant; trgt.current_target = 'none'; trace('FORCED TARGET AT THE BEGGINING IS: ' + trgt.forcedtarget); if (trgt.forcedtarget != 0 and trgt.forcedtarget and trgt.forcedtarget.en_id > -10) { trace('we have a forced target'); trgt.current_target = trgt.forcedtarget; } else { trace('DOnt have forced target,trgt.forcedtarget = 0, finding NEW TARGET '); trgt.forcedtarget = 0; tempvaryiff665 = 'none'; trgt.current_target = 'none'; tempvaryiff665 = poisk_blijaishei_vidimoi_celi(trgt); trace('resultat poiska blijaishei celi: ' + tempvaryiff665); trgt = current_participant; trgt.current_target = tempvaryiff665; if (trgt.current_target and trgt.current_target != 'none') { trace('setting new forced target'); trgt.forcedtarget = trgt.current_target; } } trace('TARGET FOUND: trgt.current_target - ' + trgt.current_target); if (trgt.current_target eq 'none') { roundprogress_step12 = 'go'; step_4R = 'done'; } else { step_4R_2 = 'go'; } } if (step_4R_2 eq 'go') { trace('step_4R_2'); step_4R_2 = 'yiffed'; tr1 = current_participant.current_target; tr2 = current_participant; yiffdgdfg6786 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg6786[0]; chk = check_for_obstacle_between_2_points(tr2._x, tr2._y, tr1._x, tr1._y); if (distance < tr2.attack_radius and chk eq 0) { tr2.gotoAndStop(1); step_4R_3 = 'go'; trace('step_4R_2 GOTO 4R3'); } else { step_4R = 'done'; trace('step_4R_2 GOTO STEP 6'); roundprogress_step6 = 'go'; } } if (step_4R_3 eq 'go') { trace('step_4R_3'); step_4R_3 = 'yiffed'; trgt = current_participant; areaofmovement = trgt.movepoints; trgt_X = (cell_name_calculation(trgt._x, trgt._y))[0]; trgt_Y = (cell_name_calculation(trgt._x, trgt._y))[1]; Xmin = trgt_X - areaofmovement; Xmax = trgt_X + areaofmovement; Ymin = trgt_Y - areaofmovement; Ymax = trgt_Y + areaofmovement; initialize_obstacles(); obstacle_exclude(current_participant); dobreak546456 = 0; hiding_found = 0; trace('FOR START'); i = Xmin; while (i <= Xmax) { if (dobreak546456 eq 1) { break; } j = Ymin; while (j <= Ymax) { if (dobreak546456 eq 1) { break; } checkcell = _root.yiff['cell' + i + '_' + j]; realno_spratalsya = 0; if (checkcell and checkcell._type_ != 1) { tr1 = current_participant.current_target; chk = check_for_obstacle_between_2_points(checkcell._x, checkcell._y, tr1._x, tr1._y); if (chk eq 1) { realno_spratalsya = 1; } } if (checkcell and realno_spratalsya eq 1) { tr1 = current_participant; tr2 = checkcell; initialize_obstacles(); thepath = 'none'; thepath = astarCalcAndShowPath(tr1._x, tr1._y, tr2._x, tr2._y, doshowpath); removeShowPath(); if (thepath != 'none' and thepath.length >= areaofmovement) { dobreak546456 = 1; current_participant.hiding_path = thepath; hiding_found = 1; break; } } ++j; } ++i; } trace('FOR END'); if (hiding_found eq 1) { if (trgt.actpoints <= 0) { step_4R_7 = 'go'; step_4R_7_1 = 'go'; } else { friendliesinsight = step4R_fix1(); if (friendliesinsight eq 1) { step_4R_5 = 'go'; step_4R_5_1 = 'go'; } else { step_4R_4 = 'go'; _root.ras1_step_1 = 'go'; } } } else { step_4R_5 = 'go'; step_4R_5_1 = 'go'; } } if (step_4R_4 eq 'go') { trace('step_4R_4'); trgt = current_participant; trace('trgt.en_id ' + trgt.en_id); shooting_has_ended = 0; if (trgt.wpn_type eq 'gun1') { step4R6_ranged_attack_1(); } else { if (trgt.wpn_type eq 'gun2') { step4R6_ranged_attack_2(); } else { if (trgt.wpn_type eq 'gun3') { step4R6_ranged_attack_3(); } } } if (shooting_has_ended eq 1) { trgt = current_participant; if (trgt.en_id eq 502) { --trgt.actpoints; --trgt.actpoints; } else { --trgt.actpoints; } step_4R_6 = 'doneo'; if (trgt.actpoints > 0) { step_4R = 'go'; step_4R_1 = 'go'; } else { step_4R_7 = 'go'; step_4R_7_1 = 'go'; } } } if (step_4R_5 eq 'go') { trace('step_4R_5'); if (step_4R_5_1 eq 'go') { trace('step_4R_5_1'); step_4R_5_1 = 'done'; tr1 = current_participant.current_target; tr2 = current_participant; initialize_obstacles(); obstacle_exclude(tr1); obstacle_exclude(tr2); thepath = 'none'; thepath = astarCalcAndShowPath(tr2._x, tr2._y, tr1._x, tr1._y, doshowpath); removeShowPath(); trace('thepath ' + thepath); if (thepath eq 'none') { trace('step_4R = done;'); step_4R = 'done'; step_4R_5_1 = 'done'; roundprogress_AIdone = 'go'; } else { step_4R_5_2 = 'go'; charmovement1_step_12_5 = 'go'; thepath.pop(); thepath.pop(); current_participant.thepath = thepath; } } if (step_4R_5_2 eq 'go') { trace('step_4R_5_2'); if (charmovement1_step_12_5 eq 'go') { charmovement1_step_12_5 = 'done'; if (current_participant.movepoints > 0) { charmovement1_step_13 = 'go'; charmovement1_step_13_sidestep1 = 'go'; charmovement1_step_13_sidestep2 = 'done'; trace('movepoints > 0'); } else { trace('movepoints < 0'); current_participant.gotoAndStop(1); friendliesinsight = step4R_fix1(); if (friendliesinsight eq 1) { step_4R_5_2 = 'done'; step_4R_5 = 'done'; charmovement1_step_13 = 'done'; step_4R = 'done'; roundprogress_AIdone = 'go'; } else { step_4R_5_2 = 'done'; step_4R_5 = 'done'; step_4R_6 = 'go'; _root.ras1_step_1 = 'go'; charmovement1_step_13 = 'done'; } } } if (charmovement1_step_13 eq 'go') { trace('charmovement1_step_13'); if (charmovement1_step_13_sidestep1 eq 'go') { charmovement1_step_13_sidestep1 = 'done'; trgt1 = current_participant; trace('trgt1zyzyzy ' + trgt1); charmovement1_step_13_sidestep3_5 = 'go'; trace('trgt1.thepath.length ' + trgt1.thepath.length); if (trgt1.thepath.length > 0) { charmovement1_step_13_sidestep2 = 'go'; } else { friendliesinsight = step4R_fix1(); if (friendliesinsight eq 1) { step_4R_5_2 = 'done'; step_4R_5 = 'done'; charmovement1_step_13 = 'done'; step_4R = 'done'; roundprogress_AIdone = 'go'; } else { step_4R_5_2 = 'done'; step_4R_5 = 'done'; step_4R_6 = 'go'; _root.ras1_step_1 = 'go'; charmovement1_step_13 = 'done'; } current_participant.gotoAndStop(1); charmovement1_step_13 = 'done'; charmovement1_step_13_sidestep3_5 = 'done'; charmovement1_step_13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trace('go where ' + trgt1.gowhere); trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; recheck_cell_occupation(); if (trgt1.gowhere.occupied != 0 and trgt1.gowhere.occupied != trgt1) { maintenancePutDotOnSTage(trgt1.gowhere._x, trgt1.gowhere._y); trace('TARGET CELL OCCUPIED - NOT GOING THERE/MOVEMENT STOP'); friendliesinsight = step4R_fix1(); if (friendliesinsight eq 1) { step_4R_5_2 = 'done'; step_4R_5 = 'done'; charmovement1_step_13 = 'done'; step_4R = 'done'; roundprogress_AIdone = 'go'; } else { step_4R_5_2 = 'done'; step_4R_5 = 'done'; step_4R_6 = 'go'; _root.ras1_step_1 = 'go'; charmovement1_step_13 = 'done'; } current_participant.gotoAndStop(1); charmovement1_step_13 = 'done'; charmovement1_step_13_sidestep3_5 = 'done'; charmovement1_step_13_sidestep2 = 'done'; } else { trace('TARGET CELL UNOCCUPIED - FREE TO GO THERE'); } } if (charmovement1_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; --trgt1.movepoints; charmovement1_step_13 = 'done'; charmovement1_step_13_sidestep2 = 'done'; charmovement1_step_13_sidestep2 = 'done'; charmovement1_step_12_5 = 'go'; } else { trgt = current_participant; charmovement1_step_13_sidestep3_5 = 'done'; charmovement1_step_13_sidestep4 = 'go'; if (charmovement1_step_13_sidestep4 eq 'go') { charmovement1_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); } if (do_combat_trace eq 1) { trace('Moving'); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } } if (step_4R_6 eq 'go') { trgt = current_participant; trace('step_4R_6'); shooting_has_ended = 0; if (trgt.wpn_type eq 'gun1') { step4R6_ranged_attack_1(); } else { if (trgt.wpn_type eq 'gun2') { step4R6_ranged_attack_2(); } else { if (trgt.wpn_type eq 'gun3') { step4R6_ranged_attack_3(); } } } if (shooting_has_ended eq 1) { trgt = current_participant; if (trgt.en_id eq 502) { --trgt.actpoints; --trgt.actpoints; } else { --trgt.actpoints; } step_4R_6 = 'doneo'; if (trgt.actpoints > 0) { step_4R = 'go'; step_4R_1 = 'go'; } else { step_4R = 'doneo'; roundprogress_AIdone = 'go'; trgt1 = current_participant; trgt2 = trgt.forcedtarget; if (trgt.forcedtarget != 0) { rotation_face_target(trgt1, trgt2); } } } } if (step_4R_7 eq 'go') { trace('step_4R_7'); if (step_4R_7_1 eq 'go') { trace('step_4R_7_1'); step_4R_7_1 = 'done'; current_participant.thepath = current_participant.hiding_path; step_4R_7_2 = 'go'; charmovement2_step_12_5 = 'go'; } if (step_4R_7_2 eq 'go') { trace('step_4R_7_2'); if (charmovement2_step_12_5 eq 'go') { charmovement2_step_12_5 = 'done'; if (current_participant.movepoints > 0) { charmovement2_step_13 = 'go'; charmovement2_step_13_sidestep1 = 'go'; charmovement2_step_13_sidestep2 = 'done'; trace('movepoints > 0'); } else { trace('movepoints < 0'); current_participant.gotoAndStop(1); step_4R_7_2 = 'done'; step_4R_7 = 'done'; step_4R = 'doneo'; roundprogress_AIdone = 'go'; charmovement2_step_13 = 'done'; trgt1 = current_participant; trgt2 = trgt.forcedtarget; if (trgt.forcedtarget != 0) { rotation_face_target(trgt1, trgt2); } } } if (charmovement2_step_13 eq 'go') { trace('charmovement2_step_13'); if (charmovement2_step_13_sidestep1 eq 'go') { charmovement2_step_13_sidestep1 = 'done'; trgt1 = current_participant; trace('trgt1zyzyzy ' + trgt1); charmovement2_step_13_sidestep3_5 = 'go'; trace('trgt1.thepath.length ' + trgt1.thepath.length); if (trgt1.thepath.length > 0) { charmovement2_step_13_sidestep2 = 'go'; } else { step_4R_7_2 = 'done'; step_4R_7 = 'done'; step_4R_7_2 = 'done'; step_4R_7 = 'done'; step_4R = 'doneo'; roundprogress_AIdone = 'go'; trgt1 = current_participant; trgt2 = trgt.forcedtarget; if (trgt.forcedtarget != 0) { rotation_face_target(trgt1, trgt2); } charmovement2_step_13 = 'done'; _root.ras1_step_1 = 'go'; current_participant.gotoAndStop(1); charmovement2_step_13 = 'done'; charmovement2_step_13_sidestep3_5 = 'done'; charmovement2_step_13_sidestep2 = 'done'; } cellarray = trgt1.thepath.shift(); trgt1.gowhere = _root.yiff['cell' + cellarray[0] + '_' + cellarray[1]]; trace('go where ' + trgt1.gowhere); trgt2 = trgt1.gowhere; yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.xmod = yiffdgdfg[1]; trgt1.ymod = yiffdgdfg[2]; recheck_cell_occupation(); if (trgt1.gowhere.occupied != 0 and trgt1.gowhere.occupied != trgt1) { maintenancePutDotOnSTage(trgt1.gowhere._x, trgt1.gowhere._y); trace('TARGET CELL OCCUPIED - NOT GOING THERE/MOVEMENT STOP'); step_4R_7_2 = 'done'; step_4R_7 = 'done'; step_4R_7_2 = 'done'; step_4R_7 = 'done'; step_4R = 'doneo'; roundprogress_AIdone = 'go'; trgt1 = current_participant; trgt2 = trgt.forcedtarget; if (trgt.forcedtarget != 0) { rotation_face_target(trgt1, trgt2); } charmovement2_step_13 = 'done'; _root.ras1_step_1 = 'go'; current_participant.gotoAndStop(1); charmovement2_step_13 = 'done'; charmovement2_step_13_sidestep3_5 = 'done'; charmovement2_step_13_sidestep2 = 'done'; } else { trace('TARGET CELL UNOCCUPIED - FREE TO GO THERE'); } } if (charmovement2_step_13_sidestep2 eq 'go') { yiffdgdfg = CALC_Dist_Xv_Yv(trgt2._x, trgt2._y, trgt1._x, trgt1._y); trgt1.distance = yiffdgdfg[0]; if (trgt1.distance <= trgt1.speed) { trgt1._x = trgt2._x; trgt1._y = trgt2._y; --trgt1.movepoints; charmovement2_step_13 = 'done'; charmovement2_step_13_sidestep2 = 'done'; charmovement2_step_13_sidestep2 = 'done'; charmovement2_step_12_5 = 'go'; } else { trgt = current_participant; charmovement2_step_13_sidestep3_5 = 'done'; charmovement2_step_13_sidestep4 = 'go'; if (charmovement2_step_13_sidestep4 eq 'go') { charmovement2_step_13_sidestep4 = 'done'; trgt1.gotoAndStop(2); } if (do_combat_trace eq 1) { trace('Moving'); } xspeed = trgt1.speed * trgt1.xmod; yspeed = trgt1.speed * trgt1.ymod; trgt1._x += xspeed; trgt1._y += yspeed; rotation_towards_movement(trgt1, xspeed, yspeed); } } } } } } } function characterIntegrity() { characterArmorIntegrity(); _root.character_unuit.armor_class = character_armor_class; _root.character_unuit.dmg_resist = character_dmg_resist; characterStatIntegrity(); characterSkillIntegrity(); } function characterStatIntegrity() { _root.character_arr[str_id] = _root.character_arr[str_base_id]; _root.character_arr[per_id] = _root.character_arr[per_base_id]; _root.character_arr[end_id] = _root.character_arr[end_base_id]; _root.character_arr[cha_id] = _root.character_arr[cha_base_id]; _root.character_arr[int_id] = _root.character_arr[int_base_id]; _root.character_arr[agi_id] = _root.character_arr[agi_base_id]; _root.character_arr[luk_id] = _root.character_arr[luk_base_id]; _root.character_arr[max_weight_id] = 150 + 10 * (_root.character_arr[str_id] - 5); _root.character_unuit.initiative_base = _root.character_arr[agi_id]; charagi = _root.character_arr[agi_id]; if (charagi eq 7) { _root.character_unuit.actpoints_max = 2; } else { if (charagi eq 8) { _root.character_unuit.actpoints_max = 2; } else { if (charagi eq 9) { _root.character_unuit.actpoints_max = 2; } else { if (charagi > 9) { _root.character_unuit.actpoints_max = 2; } else { if (charagi > 4 and charagi < 7) { _root.character_unuit.actpoints_max = 2; } else { if (charagi < 5) { _root.character_unuit.actpoints_max = 2; } } } } } } if (charagi eq 6) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 7) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 8) { _root.character_unuit.movepoints_max = 5; } else { if (charagi > 8) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 5) { _root.character_unuit.movepoints_max = 5; } else { if (charagi eq 4) { _root.character_unuit.movepoints_max = 5; } else { if (charagi < 4) { _root.character_unuit.movepoints_max = 5; } } } } } } } charend = _root.character_arr[end_id]; charlvl = _root.character_arr[lvl_id]; _root.character_unuit.hp = 70 + charend * 2 + charlvl * charend + (charend - 5) * 8; pr = _root.character_arr[per_id]; if (pr < 5) { perception_range_mod = -1; } else { if (pr eq 5) { perception_range_mod = 0; } else { if (pr eq 6) { perception_range_mod = 1; } else { if (pr eq 7) { perception_range_mod = 1; } else { if (pr eq 8) { perception_range_mod = 2; } else { if (pr eq 9) { perception_range_mod = 2; } else { if (pr eq 10) { perception_range_mod = 3; } else { perception_range_mod = 0; } } } } } } } _root.enemy_critical_plusORminus = 5 - _root.character_arr[luk_id]; _root.character_base_critical_chance = 5 + (5 - _root.character_arr[luk_id]) * 2; if (_root.firearms_slot_item.id eq 2103) { _root.character_base_critical_chance += 10; } if (_root.firearms_slot_item.id eq 2104) { _root.character_base_critical_chance += 5; } } function characterSkillIntegrity() { _root.character_arr[firearms_id] = _root.character_arr[firearms_base_id] + (_root.character_arr[per_id] - 5) * 3; _root.character_arr[melee_id] = _root.character_arr[melee_base_id] + (_root.character_arr[agi_id] - 5) * 3; _root.character_arr[energy_id] = _root.character_arr[energy_base_id] + Math.floor((_root.character_arr[per_id] - 5) * 1.5 + (_root.character_arr[int_id] - 5) * 1.5); _root.character_arr[merchant_id] = _root.character_arr[merchant_base_id] + Math.floor((_root.character_arr[cha_id] - 5) * 5 + (_root.character_arr[int_id] - 5)); _root.character_arr[lockpick_id] = _root.character_arr[lockpick_base_id] + Math.floor((_root.character_arr[per_id] - 5) * 5 + (_root.character_arr[int_id] - 5) * 1.5); _root.character_arr[outdoor_id] = _root.character_arr[outdoor_base_id] + (_root.character_arr[per_id] - 5) * 6; _root.character_arr[medic_id] = _root.character_arr[medic_base_id] + Math.floor((_root.character_arr[per_id] - 5) * 5 + (_root.character_arr[int_id] - 5) * 1.5); _root.character_arr[science_id] = _root.character_arr[science_base_id] + (_root.character_arr[int_id] - 5) * 5; _root.character_stimpackRegenHeal = 20 + 20 * _root.character_arr[medic_id] / 100; } function characterArmorIntegrity() { character_armor_class = 0; character_dmg_resist = 0; if (_root.torso_slot_item and _root.torso_slot_item != 'none' and _root.torso_slot_item != 0) { character_armor_class += _root.torso_slot_item.armor_class; character_dmg_resist += _root.torso_slot_item.dmg_resist; } if (_root.head_slot_item and _root.head_slot_item != 'none' and _root.head_slot_item != 0) { character_armor_class += _root.head_slot_item.armor_class; character_dmg_resist += _root.head_slot_item.dmg_resist; } if (_root.gloves_slot_item and _root.gloves_slot_item != 'none' and _root.gloves_slot_item != 0) { character_armor_class += _root.gloves_slot_item.armor_class; character_dmg_resist += _root.gloves_slot_item.dmg_resist; } if (_root.boots_slot_item and _root.boots_slot_item != 'none' and _root.boots_slot_item != 0) { character_armor_class += _root.boots_slot_item.armor_class; character_dmg_resist += _root.boots_slot_item.dmg_resist; } character_dmg_resist += ((_root.character_arr[end_id] - 5) / 5) * 15; character_armor_class += (_root.character_arr[agi_id] - 5) * 2; if (_root.neck_slot_item.id eq 1501) { character_dmg_resist += 7; } } function savePlayTime() { saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); varlocation1111 = this.saveslot000.data; if (_root.roughtimevar > 0) { } else { _root.roughtimevar = 1; } varlocation1111.timeSpentPreviously = _root.roughtimevar; } function saveCHaracter(dowhat) { saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); trace('AW0_saveslot_' + _root.playingSlot); if (dowhat eq 'save') { pushTextToLog('** Game Saved! **'); varlocation1111 = this.saveslot000.data; varlocation1111.save_exists = 1; varlocation2222 = _root; varlocation1111.inv = {}; trace('character Saved!'); } else { varlocation2222 = this.saveslot000.data; varlocation1111 = _root; } if (dowhat eq 'save') { i = 0; while (i <= 15) { varlocation1111['quick_item_slot_' + i] = varlocation2222['quick_item_slot_' + i]; ++i; } varlocation1111.character_arr = []; arrlength2010 = _root.character_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.character_arr[i] = _root.character_arr[i]; trace(_root.character_arr[i]); ++i; } varlocation1111.general_arr = []; arrlength2010 = _root.inventory_shell.general_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.general_arr[i] = _root.inventory_shell.general_arr[i]; ++i; } varlocation1111.special_arr = []; arrlength2010 = _root.inventory_shell.special_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.special_arr[i] = _root.inventory_shell.special_arr[i]; ++i; } varlocation1111.misc_arr = []; arrlength2010 = _root.inventory_shell.misc_arr.length; var i = 0; while (i <= arrlength2010 + 1) { varlocation1111.misc_arr[i] = _root.inventory_shell.misc_arr[i]; ++i; } } else { _root.character_arr = []; arrlength2010 = varlocation2222.character_arr.length; var i = 0; while (i <= arrlength2010 + 1) { _root.character_arr[i] = varlocation2222.character_arr[i]; ++i; } i = 0; while (i <= 15) { item_to_be_copied = varlocation2222['quick_item_slot_' + i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (var v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } varlocation1111['quick_item_slot_' + i] = newitem; if (newitem.this_object_id > -999) { } else { varlocation1111['quick_item_slot_' + i] = 'none'; } ++i; } _root.inventory_shell.general_arr = []; arrlength2010 = varlocation2222.general_arr.length; var i = 0; while (i <= arrlength2010 + 1) { if (varlocation2222.general_arr[i] eq 'none' or !varlocation2222.general_arr[i]) { _root.inventory_shell.general_arr[i] = 'none'; } else { item_to_be_copied = varlocation2222.general_arr[i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } _root.inventory_shell.general_arr[i] = newitem; } ++i; } _root.inventory_shell.special_arr = []; arrlength2010 = varlocation2222.special_arr.length; var i = 0; while (i <= arrlength2010 + 1) { if (varlocation2222.special_arr[i] eq 'none' or !varlocation2222.special_arr[i]) { _root.inventory_shell.special_arr[i] = 'none'; } else { item_to_be_copied = varlocation2222.special_arr[i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } _root.inventory_shell.special_arr[i] = newitem; } ++i; } _root.inventory_shell.misc_arr = []; arrlength2010 = varlocation2222.misc_arr.length; var i = 0; while (i <= arrlength2010 + 1) { if (varlocation2222.misc_arr[i] eq 'none' or !varlocation2222.misc_arr[i]) { _root.inventory_shell.misc_arr[i] = 'none'; } else { item_to_be_copied = varlocation2222.misc_arr[i]; _root['item' + item_to_be_copied.this_object_id] = {}; newitem = _root['item' + item_to_be_copied.this_object_id]; for (v3 in item_to_be_copied) { newitem[v3] = item_to_be_copied[v3]; } _root.inventory_shell.misc_arr[i] = newitem; } ++i; } } varlocation1111.object_id = varlocation2222.object_id; varlocation1111.firearms_slot_item = varlocation2222.firearms_slot_item; varlocation1111.melee_slot_item = varlocation2222.melee_slot_item; varlocation1111.torso_slot_item = varlocation2222.torso_slot_item; varlocation1111.ring1_slot_item = varlocation2222.ring1_slot_item; varlocation1111.ring2_slot_item = varlocation2222.ring2_slot_item; varlocation1111.head_slot_item = varlocation2222.head_slot_item; varlocation1111.neck_slot_item = varlocation2222.neck_slot_item; varlocation1111.gloves_slot_item = varlocation2222.gloves_slot_item; varlocation1111.boots_slot_item = varlocation2222.boots_slot_item; } function FP_randomSpawn() { spawn_units_at_random_location(999, 1); i = 0; while (i <= 20) { tougherEnemies(); if (random(2) eq 1) { spawn_units_at_random_location(500, 2); } if (random(2) eq 1) { spawn_units_at_random_location(510, 2); } if (random(2) eq 1) { spawn_units_at_random_location(520, 2); } if (random(2) eq 1) { spawn_units_at_random_location(530, 2); } if (random(2) eq 1) { spawn_units_at_random_location(540, 2); } if (random(2) eq 1) { spawn_units_at_random_location(501, 3); } if (random(2) eq 1) { spawn_units_at_random_location(511, 3); } if (random(2) eq 1) { spawn_units_at_random_location(521, 3); } if (random(2) eq 1) { spawn_units_at_random_location(531, 3); } if (random(2) eq 1) { spawn_units_at_random_location(541, 3); } if (random(2) eq 1) { spawn_units_at_random_location(3, 4); } if (random(2) eq 1) { spawn_units_at_random_location(4, 4); } if (random(2) eq 1) { spawn_units_at_random_location(5, 4); } if (random(2) eq 1) { spawn_units_at_random_location(6, 4); } if (random(2) eq 1) { spawn_units_at_random_location(7, 5); } if (random(2) eq 1) { spawn_units_at_random_location(8, 5); } if (random(2) eq 1) { spawn_units_at_random_location(9, 5); } if (random(2) eq 1) { spawn_units_at_random_location(1, 5); } if (random(6) eq 0) { break; } ++i; } } function FP_hellSpawn() { spawn_units_at_random_location(999, 1); i = 0; while (i <= 20) { tougherEnemies(); spawn_units_at_random_location(500, 2); spawn_units_at_random_location(510, 2); spawn_units_at_random_location(520, 2); spawn_units_at_random_location(530, 2); spawn_units_at_random_location(540, 2); spawn_units_at_random_location(501, 3); spawn_units_at_random_location(511, 3); spawn_units_at_random_location(521, 3); spawn_units_at_random_location(531, 3); spawn_units_at_random_location(541, 3); spawn_units_at_random_location(3, 4); spawn_units_at_random_location(4, 4); spawn_units_at_random_location(5, 4); spawn_units_at_random_location(6, 4); spawn_units_at_random_location(7, 5); spawn_units_at_random_location(8, 5); spawn_units_at_random_location(9, 5); spawn_units_at_random_location(1, 5); ++i; } } function FP_ChaosSpawn() { spawn_units_at_random_location(999, random(900)); i = 0; while (i <= 20) { tougherEnemies(); spawn_units_at_random_location(500, random(100)); spawn_units_at_random_location(510, random(100)); spawn_units_at_random_location(520, random(100)); spawn_units_at_random_location(530, random(100)); spawn_units_at_random_location(540, random(100)); spawn_units_at_random_location(501, random(100)); spawn_units_at_random_location(511, random(100)); spawn_units_at_random_location(521, random(100)); spawn_units_at_random_location(531, random(100)); spawn_units_at_random_location(541, random(100)); spawn_units_at_random_location(3, random(100)); spawn_units_at_random_location(4, random(100)); spawn_units_at_random_location(5, random(100)); spawn_units_at_random_location(6, random(100)); spawn_units_at_random_location(7, random(100)); spawn_units_at_random_location(8, random(100)); spawn_units_at_random_location(9, random(100)); spawn_units_at_random_location(1, random(100)); ++i; } } function shootingIntegrity() { if (_root.firearms_slot_item eq 'none') { _root.firearm_clickmode = 1; _root.current_amo_in_gun = 0; } if (_root.current_amo_in_gun < 1) { _root.firearm_clickmode = 4; _root.ranged_attack_pricel = 0; } ammoid = _root.firearms_slot_item.ammo_id; arrayiff777 = inv.misc_arr; _root.current_used_amo_inventory = 0; i = 0; while (i <= 44) { if (arrayiff777[i].id eq ammoid) { _root.current_used_amo_inventory += arrayiff777[i].ammount; } ++i; } } function BTN_rangedAttack() { removeMovieClip(_root.aimed_shot_menu); if (_root.firearm_clickmode eq 1 or _root.firearm_clickmode eq 2 or _root.firearm_clickmode eq 3) { trace(_root.ranged_attack_pricel + ' hhh'); if (_root.ranged_attack_pricel eq 1) { _root.ranged_attack_pricel = 0; trace('desyttttttt'); } else { _root.ranged_attack_pricel = 1; } } else { if (_root.firearm_clickmode eq 4) { if (_root.character_unuit.actpoints > 0) { --_root.character_unuit.actpoints; reloadGun(); _root.firearm_clickmode = 1; } } } } function BTN_firearms_clickmode_up() { ++_root.firearm_clickmode; if (_root.firearm_clickmode > 4) { _root.firearm_clickmode = 1; } if (_root.firearms_slot_item.ap_cost_aim < 0 and _root.firearm_clickmode eq 2) { ++_root.firearm_clickmode; } if (_root.firearms_slot_item.automatic != 1 and _root.firearm_clickmode eq 3) { ++_root.firearm_clickmode; } if (_root.firearms_slot_item.ammo_capacity <= _root.current_amo_in_gun) { if (_root.firearm_clickmode eq 4) { _root.firearm_clickmode = 1; } } } function BTN_firearms_clickmode_down() { --_root.firearm_clickmode; if (_root.firearm_clickmode < 1) { _root.firearm_clickmode = 4; } if (_root.firearms_slot_item.ammo_capacity <= _root.current_amo_in_gun) { if (_root.firearm_clickmode eq 4) { _root.firearm_clickmode = 3; } } if (_root.firearms_slot_item.automatic != 1 and _root.firearm_clickmode eq 3) { --_root.firearm_clickmode; } if (_root.firearms_slot_item.ap_cost_aim < 0 and _root.firearm_clickmode eq 2) { --_root.firearm_clickmode; } } function reloadGun() { trs.reloadwav.start(); shootingIntegrity(); if (_root.current_used_amo_inventory < 1) { trace('reload fail - aut of ammo'); return undefined; } if (_root.firearms_slot_item eq 'none') { return undefined; } ammoid = _root.firearms_slot_item.ammo_id; arrayiff777 = inv.misc_arr; magazin = _root.firearms_slot_item.ammo_capacity; stashfound = -1; i = 0; while (i <= 44) { if (arrayiff777[i].id eq ammoid) { stashfoundID = i; break; } ++i; } if (stashfoundID eq -1) { return undefined; } i = 0; while (i <= 900) { --arrayiff777[stashfoundID].ammount; ++_root.current_amo_in_gun; if (arrayiff777[stashfoundID].ammount < 1) { arrayiff777[stashfoundID] = 'none'; invammshow = arrayiff777[stashfoundID].ammount; if (invammshow eq undefined) { invammshow = 0; } pushTextToLog('Reloading ' + _root.firearms_slot_item.name_ + ': magazine ' + _root.current_amo_in_gun + '/' + magazin + '; inventory ' + invammshow); _root.firearm_clickmode = 1; return undefined; break; } if (_root.current_amo_in_gun >= magazin) { invammshow = arrayiff777[stashfoundID].ammount; if (invammshow eq undefined) { invammshow = 0; } pushTextToLog('Reloading ' + _root.firearms_slot_item.name_ + ': magazine ' + _root.current_amo_in_gun + '/' + magazin + '; inventory ' + invammshow); _root.firearm_clickmode = 1; return undefined; break; } ++i; } } function unloadAmmo() { if (_root.current_amo_in_gun < 1) { return undefined; } ammoid = _root.firearms_slot_item.ammo_id; itrm777 = _root['item' + ammoid]; pushNewItem(itrm777, _root.current_amo_in_gun); pushTextToLog('Unloading ammo from ' + _root.firearms_slot_item.name_ + ': ' + _root.current_amo_in_gun); _root.current_amo_in_gun = 0; } function miscMenuIntegrity() { bottommenu.hpbar.hpmax = _root.character_unuit.hp; if (bottommenu.hpbar.dmg eq 0) { bottommenu.hpbar.gotoAndStop(100); } else { if (bottommenu.hpbar.dmg >= bottommenu.hpbar.hpmax) { bottommenu.hpbar.gotoAndStop(1); } else { hpmax000 = bottommenu.hpbar.hpmax; hp000 = bottommenu.hpbar.hpmax - bottommenu.hpbar.dmg; percent000 = Math.floor((hp000 / hpmax000) * 100); bottommenu.hpbar.gotoAndStop(percent000); } } dmg121 = bottommenu.hpbar.dmg; dmg00000 = _root.character_unuit.dmg; if (dmg121 > dmg00000) { --bottommenu.hpbar.dmg; } else { if (dmg121 < dmg00000) { ++bottommenu.hpbar.dmg; } else { bottommenu.hpbar.dmg = _root.character_unuit.dmg; } } if (_root.character_unuit.actpoints > 0) { bottommenu.ap_indicator._visible = true; bottommenu.ap_indicator.gotoAndStop(_root.character_unuit.actpoints); } else { bottommenu.ap_indicator._visible = false; } if (_root.character_unuit.movepoints > 0) { bottommenu.mp_indicator._visible = true; bottommenu.mp_indicator.gotoAndStop(_root.character_unuit.movepoints); } else { bottommenu.mp_indicator._visible = false; } if (_root.firearms_slot_item.id) { bottommenu.ranged_selector.gotoAndStop(_root.firearms_slot_item.id); } else { bottommenu.ranged_selector.gotoAndStop(1); } if (_root.melee_slot_item.id) { bottommenu.melee_selector.gotoAndStop(_root.melee_slot_item.id); } else { bottommenu.melee_selector.gotoAndStop(1); } i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { bottommenu['quickslot_' + i].id = i; if (_root['quick_item_slot_' + i] and _root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i] != 0) { bottommenu['quickslot_' + i].itembox.gotoAndStop(_root['quick_item_slot_' + i].id); } else { bottommenu['quickslot_' + i].itembox.gotoAndStop(1); } if (_root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i].stackable eq 1) { bottommenu['quickslot_' + i].ammount._visible = true; bottommenu['quickslot_' + i].ammount.showvar = _root['quick_item_slot_' + i].ammount; } else { bottommenu['quickslot_' + i].ammount._visible = false; } if (_root.character_unuit.actpoints < 1) { bottommenu['quickslot_' + i].gotoAndStop(2); } else { bottommenu['quickslot_' + i].gotoAndStop(1); } if (_root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i].quickslotusable != 1) { bottommenu['quickslot_' + i].gotoAndStop(3); } if (_root['quick_item_slot_' + i].ammount < 1) { _root['quick_item_slot_' + i] = 'none'; } } ++i; } if (_root.inventory_menu or _root.character_sheet) { i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { bottommenu['quickslot_' + i]._visible = false; } ++i; } bottommenu.melee_selector._visible = false; bottommenu.ranged_selector._visible = false; } else { i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { bottommenu['quickslot_' + i]._visible = true; } ++i; } bottommenu.melee_selector._visible = true; bottommenu.ranged_selector._visible = true; } } function BTN_quickSlotClick(id) { cur_item = _root['quick_item_slot_' + id]; if (cur_item.id > 2100 and cur_item.id < 3100) { swapWeapons(id); } else { if (cur_item.id eq 3501) { useStimpack(_root['quick_item_slot_' + id]); } else { if (cur_item.id eq 3502) { useLightning(_root['quick_item_slot_' + id]); } else { if (cur_item.id eq 3503) { useFlash(_root['quick_item_slot_' + id]); } else { if (cur_item.id eq 3504) { useSuperStimpack(_root['quick_item_slot_' + id]); } } } } } } function BTN_ROLLOVER_quickslot(id) { cur_item = _root['quick_item_slot_' + id]; if (cur_item.id > 2100 and cur_item.id < 3100) { _root.bottommenu.showinfo = 'Swap weapons? (-1AP)'; } else { if (cur_item.id eq 3501) { _root.bottommenu.showinfo = 'Use stimpack (-1AP)'; } else { if (cur_item.id eq 3502) { _root.bottommenu.showinfo = 'Lightning Drug: AP +1, 30% chance of instand death!'; } else { if (cur_item.id eq 3503) { _root.bottommenu.showinfo = 'Flash Drug: MP +3, 30% chance of instand death!'; } else { if (cur_item.id eq 3504) { _root.bottommenu.showinfo = 'Use super stimpack (-1AP)'; } } } } } } function useSuperStimpack(itemslot) { --_root.character_unuit.actpoints; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; regenheal = Math.floor(_root.character_stimpackRegenHeal); dmgwas11 = trgt.dmg; trgt.dmg = 0; showheal11 = dmgwas11; msg = '+' + Math.floor(showheal11); otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have used a Super Stimpack. ' + Math.floor(showheal11) + ' hit points restored!'); } function useStimpack(itemslot) { --_root.character_unuit.actpoints; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; regenheal = Math.floor(_root.character_stimpackRegenHeal); dmgwas11 = trgt.dmg; trgt.dmg -= regenheal; if (dmgwas11 > regenheal) { showheal11 = regenheal; } else { showheal11 = dmgwas11; } if (trgt.dmg < 0) { trgt.dmg = 0; } msg = '+' + Math.floor(showheal11); otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have used a Stimpack. ' + Math.floor(showheal11) + ' hit points restored!'); } function useLightning(itemslot) { ++_root.character_unuit.actpoints; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; if (random(100) < 30) { trgt.dmg += 9999999; character_has_died_manually = 1; msg = 'AAArhpgghgrrr'; otletaniedamaga(trgt._x, trgt._y, msg, 'DMG'); pushTextToLog('You have died of a heart attack!'); return undefined; } msg = '+1 AP'; otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have succesfuly used Lightning Drug. AP +1.'); } function useFlash(itemslot) { _root.character_unuit.movepoints += 3; trs.stimwav.start(); --itemslot.ammount; if (itemslot.ammount < 0) { itemslot = 'none'; } trgt = _root.character_unuit; if (random(100) < 30) { trgt.dmg += 9999999; character_has_died_manually = 1; msg = 'AAArhpgghgrrr'; otletaniedamaga(trgt._x, trgt._y, msg, 'DMG'); pushTextToLog('You have died of a heart attack!'); return undefined; } msg = '+3 MP'; otletaniedamaga(trgt._x, trgt._y, msg, 'regeneration'); pushTextToLog('You have succesfuly used Flash Drug. AP +3.'); } function swapWeapons(quickslot_id) { --_root.character_unuit.actpoints; cur_item = _root['quick_item_slot_' + quickslot_id]; if (cur_item.kuklaslot eq 'firearms') { if (_root.firearms_slot_item != 'none') { unloadAmmo(); } buffer111 = _root.firearms_slot_item; _root.firearms_slot_item = _root['quick_item_slot_' + quickslot_id]; _root['quick_item_slot_' + quickslot_id] = buffer111; buffer111 = 'none'; reloadGun(); } else { if (cur_item.kuklaslot eq 'melee') { trs.meleeinstall.start(); buffer111 = _root.melee_slot_item; _root.melee_slot_item = _root['quick_item_slot_' + quickslot_id]; _root['quick_item_slot_' + quickslot_id] = buffer111; buffer111 = 'none'; } } } function showQueue() { quelength = _root.queue_array.length; nn = 0; while (nn < 120) { removeMovieClip(_root.bottommenu.queyeshell.queue['chibik' + nn]); ++nn; } nn = 0; while (nn < quelength) { if (nn > 16) { return undefined; } chibik = _root.queue_array[nn]; chibik1 = chibik.id; chibik = _root.yiff[chibik1].en_id; if (chibik and chibik != 100 and chibik != 200) { _root.bottommenu.queyeshell.queue.attachMovie('chibiunits_shell', 'chibik' + nn, nn); trgt = _root.bottommenu.queyeshell.queue['chibik' + nn]; trgt._width *= 0.7; trgt._height *= 0.7; trgt._x = nn * 25; trgt._y = 0; trgt.gotoAndStop(chibik + 1); trgt.cacheAsBitmap = true; } ++nn; } } function openCloseInventoryButton() { if (_root.inventory_menu) { _root.firearm_clickmode = 1; removeMovieClip(_root.inventory_menu); } else { _root.character_unuit.actpoints -= 1; _root.inventoryshowyifftimerbbbbb = 999; _root.ranged_attack_pricel = 0; _root.attachMovie('inventory_menu', 'inventory_menu', _root.inventory_menu_depth); _root.inventory_menu._x = 395; _root.inventory_menu._y = 290; i = 0; while (i <= 44) { _root.inventory_menu['inv_slot_' + i].id = i; _root.inventory_menu['inv_slot_' + i].cacheAsBitmap = true; ++i; } } } function initialiseInventory() { _root.inventoryshowyifftimerbbbbb = 99999999; _root.handheld = {}; _root.handheld.item = 'none'; _root.which_arr = inv.general_arr; } function returnEmptySlot(pushwhere) { i = 0; while (i <= 44) { if (pushwhere[i] eq 'none') { return i; } ++i; } return 'none'; } function kuklaslots_maintenance(slot) { if (_root[slot + '_slot_item'].id) { _root.inventory_menu['slot_' + slot].gotoAndStop(_root[slot + '_slot_item'].id); } else { _root.inventory_menu['slot_' + slot].gotoAndStop(1); } } function encumberanceCheck() { if (_root.carrying_weight > _root.character_arr[max_weight_id]) { _root.character_encumbered = 1; } else { _root.character_encumbered = 0; } } function inventoryIntegrity() { _root.inventory_menu.show_cash = 'Cash: ' + _root.character_arr[cash_id] + '$'; carry_weight_calculation(); if (!_root.inventory_menu) { if (!_root.inventory_pickloot) { returnItemFromHand(); } _root.yiff._visible = true; _root.inventory_opened = 0; } else { _root.inventory_menu.show_lvl = 'lvl ' + _root.character_arr[day_id]; _root.yiff._visible = false; if (_root.inventoryshowyifftimerbbbbb > 1) { _root.inventoryshowyifftimerbbbbb = 0; _root.inventory_menu.show_dmgresist = 'DMG Resist: ' + character_dmg_resist + '%'; _root.inventory_menu.show_ac = 'AC: ' + character_armor_class; if (_root.showkukla != 1) { _root.inventory_menu.show_dmgresist = ' '; _root.inventory_menu.show_ac = ' '; } chrk = _root.character_unuit; _root.inventory_menu.statspanel.show_hp = chrk.hp - chrk.dmg + '/' + chrk.hp; _root.inventory_menu.statspanel.show_ap = chrk.actpoints + '/' + chrk.actpoints_max; _root.inventory_menu.statspanel.show_mp = chrk.movepoints + '/' + chrk.movepoints_max; _root.inventory_menu.statspanel.show_ac = character_armor_class; _root.inventory_menu.statspanel.show_dr = character_dmg_resist; _root.inventory_menu.statspanel.show_str = _root.character_arr[str_id]; _root.inventory_menu.statspanel.show_per = _root.character_arr[per_id]; _root.inventory_menu.statspanel.show_end = _root.character_arr[end_id]; _root.inventory_menu.statspanel.show_cha = _root.character_arr[cha_id]; _root.inventory_menu.statspanel.show_int = _root.character_arr[int_id]; _root.inventory_menu.statspanel.show_agi = _root.character_arr[agi_id]; _root.inventory_menu.statspanel.show_luck = _root.character_arr[luk_id]; _root.inventory_menu.statspanel.firearms_show = _root.character_arr[firearms_id] + '%'; _root.inventory_menu.statspanel.melee_show = _root.character_arr[melee_id] + '%'; _root.inventory_menu.statspanel.energy_show = _root.character_arr[energy_id] + '%'; _root.inventory_menu.statspanel.merchant_show = _root.character_arr[merchant_id] + '%'; _root.inventory_menu.statspanel.lockpick_show = _root.character_arr[lockpick_id] + '%'; _root.inventory_menu.statspanel.outdoor_show = _root.character_arr[outdoor_id] + '%'; _root.inventory_menu.statspanel.medic_show = _root.character_arr[medic_id] + '%'; _root.inventory_menu.statspanel.science_show = _root.character_arr[science_id] + '%'; _root.inventory_menu.show_weight = 'Weight: ' + Math.floor(_root.carrying_weight * 10) / 10 + '/' + _root.character_arr[max_weight_id]; } else { _root.inventoryshowyifftimerbbbbb += 0.03333333333333333; } _root.inventory_opened = 1; itemDescription(); kuklaIntegrity(); if (_root.doselect_array eq 1) { _root.which_arr = inv.general_arr; } else { if (_root.doselect_array eq 2) { _root.which_arr = inv.misc_arr; } else { if (_root.doselect_array eq 3) { _root.which_arr = inv.special_arr; } } } kuklaslots_maintenance('torso'); kuklaslots_maintenance('melee'); kuklaslots_maintenance('firearms'); kuklaslots_maintenance('ring1'); kuklaslots_maintenance('ring2'); kuklaslots_maintenance('head'); kuklaslots_maintenance('neck'); kuklaslots_maintenance('gloves'); kuklaslots_maintenance('boots'); if (_root.showkukla eq 0) { _root['quick_item_slot_' + i].ammount._visible = false; i = 0; while (i <= 15) { if (_root.inventory_menu.kuklaANDquick['inv_quickslot_' + i]) { if (_root['quick_item_slot_' + i] and _root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i] != 0) { _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].itembox.gotoAndStop(_root['quick_item_slot_' + i].id); } else { _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].itembox.gotoAndStop(1); _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].ammount._visible = false; } if (_root['quick_item_slot_' + i] != 'none' and _root['quick_item_slot_' + i].stackable eq 1) { _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].ammount._visible = true; _root.inventory_menu.kuklaANDquick['inv_quickslot_' + i].ammount.showvar = _root['quick_item_slot_' + i].ammount; } else { _root['quick_item_slot_' + i].ammount._visible = false; } } ++i; } } i = 0; while (i <= 44) { if (_root.which_arr[i] eq 'none') { _root.inventory_menu['inv_slot_' + i].itembox.gotoAndStop(1); } else { _root.inventory_menu['inv_slot_' + i].itembox.gotoAndStop(_root.which_arr[i].id); } if (_root.which_arr[i] != 'none' and _root.which_arr[i].stackable eq 1) { _root.inventory_menu['inv_slot_' + i].ammount._visible = true; _root.inventory_menu['inv_slot_' + i].ammount.showvar = _root.which_arr[i].ammount; } else { _root.inventory_menu['inv_slot_' + i].ammount._visible = false; } ++i; } } } function increaseStat(STAT1) { _root.inventoryshowyifftimerbbbbb = 999; if (_root.character_arr[stat_points_id] > 0) { } else { return undefined; } if (_root.character_arr[_root[STAT1 + '_base_id']] > 9) { return undefined; } --_root.character_arr[stat_points_id]; ++_root[STAT1 + '_tempoSHeet']; ++_root.character_arr[_root[STAT1 + '_base_id']]; } function increaseSkill(SKILL1) { _root.inventoryshowyifftimerbbbbb = 999; if (_root.character_arr[skill_points_id] > 0) { } else { return undefined; } if (_root.character_arr[_root[SKILL1 + '_base_id']] > 149) { return undefined; } --_root.character_arr[skill_points_id]; ++_root[SKILL1 + '_tempoSHeet']; ++_root.character_arr[_root[SKILL1 + '_base_id']]; } function charSHeetLVLUPcancel() { _root.inventoryshowyifftimerbbbbb = 999; _root.character_arr[stat_points_id] += _root.str_tempoSHeet; _root.character_arr[stat_points_id] += _root.per_tempoSHeet; _root.character_arr[stat_points_id] += _root.end_tempoSHeet; _root.character_arr[stat_points_id] += _root.cha_tempoSHeet; _root.character_arr[stat_points_id] += _root.int_tempoSHeet; _root.character_arr[stat_points_id] += _root.agi_tempoSHeet; _root.character_arr[stat_points_id] += _root.luk_tempoSHeet; _root.character_arr[str_base_id] -= _root.str_tempoSHeet; _root.character_arr[per_base_id] -= _root.per_tempoSHeet; _root.character_arr[end_base_id] -= _root.end_tempoSHeet; _root.character_arr[cha_base_id] -= _root.cha_tempoSHeet; _root.character_arr[int_base_id] -= _root.int_tempoSHeet; _root.character_arr[agi_base_id] -= _root.agi_tempoSHeet; _root.character_arr[luk_base_id] -= _root.luk_tempoSHeet; _root.character_arr[skill_points_id] += _root.firearms_tempoSHeet; _root.character_arr[skill_points_id] += _root.melee_tempoSHeet; _root.character_arr[skill_points_id] += _root.energy_tempoSHeet; _root.character_arr[skill_points_id] += _root.merchant_tempoSHeet; _root.character_arr[skill_points_id] += _root.lockpick_tempoSHeet; _root.character_arr[skill_points_id] += _root.outdoor_tempoSHeet; _root.character_arr[skill_points_id] += _root.medic_tempoSHeet; _root.character_arr[skill_points_id] += _root.science_tempoSHeet; _root.character_arr[firearms_base_id] -= _root.firearms_tempoSHeet; _root.character_arr[melee_base_id] -= _root.melee_tempoSHeet; _root.character_arr[energy_base_id] -= _root.energy_tempoSHeet; _root.character_arr[lockpick_base_id] -= _root.lockpick_tempoSHeet; _root.character_arr[outdoor_base_id] -= _root.outdoor_tempoSHeet; _root.character_arr[medic_base_id] -= _root.medic_tempoSHeet; _root.character_arr[science_base_id] -= _root.science_tempoSHeet; _root.character_arr[merchant_base_id] -= _root.merchant_tempoSHeet; _root.firearms_tempoSHeet = 0; _root.melee_tempoSHeet = 0; _root.energy_tempoSHeet = 0; _root.merchant_tempoSHeet = 0; _root.lockpick_tempoSHeet = 0; _root.outdoor_tempoSHeet = 0; _root.medic_tempoSHeet = 0; _root.science_tempoSHeet = 0; _root.str_tempoSHeet = 0; _root.per_tempoSHeet = 0; _root.end_tempoSHeet = 0; _root.cha_tempoSHeet = 0; _root.int_tempoSHeet = 0; _root.agi_tempoSHeet = 0; _root.luk_tempoSHeet = 0; } function openCloseCHarsheetButton() { if (_root.character_sheet) { charSHeetLVLUPcancel(); removeMovieClip(_root.character_sheet); } else { _root.str_tempoSHeet = 0; _root.per_tempoSHeet = 0; _root.end_tempoSHeet = 0; _root.cha_tempoSHeet = 0; _root.int_tempoSHeet = 0; _root.agi_tempoSHeet = 0; _root.luk_tempoSHeet = 0; _root.firearms_tempoSHeet = 0; _root.melee_tempoSHeet = 0; _root.energy_tempoSHeet = 0; _root.merchant_tempoSHeet = 0; _root.lockpick_tempoSHeet = 0; _root.outdoor_tempoSHeet = 0; _root.medic_tempoSHeet = 0; _root.science_tempoSHeet = 0; _root.inventoryshowyifftimerbbbbb = 999999; _root.ranged_attack_pricel = 0; _root.attachMovie('character_sheet', 'character_sheet', _root.inventory_menu_depth); _root.character_sheet._x = 0; _root.character_sheet._y = 15; } } function charSHeetIntegrity() { if (!_root.character_sheet) { _root.yiff._visible = true; } else { _root.character_sheet.show_lvl = 'lvl ' + _root.character_arr[day_id]; _root.character_sheet.descriprion.gotoAndStop(1); i = 0; while (i < 20) { hittest2010 = _root.character_sheet['poloska_' + i].hitTest(_root._xmouse, _root._ymouse, true); if (hittest2010 eq true) { _root.character_sheet.descriprion.gotoAndStop(i + 1); break; } ++i; } _root.yiff._visible = false; if (_root.inventoryshowyifftimerbbbbb > 1) { _root.inventoryshowyifftimerbbbbb = 0; if (_root.character_arr[stat_points_id] > 0) { _root.character_sheet.statButtons.gotoAndStop(2); } else { _root.character_sheet.statButtons.gotoAndStop(1); } if (_root.character_arr[skill_points_id] > 0) { _root.character_sheet.skillButtons.gotoAndStop(2); } else { _root.character_sheet.skillButtons.gotoAndStop(1); } if (_root.str_tempoSHeet > 0 or _root.per_tempoSHeet > 0 or _root.end_tempoSHeet > 0 or _root.cha_tempoSHeet > 0 or _root.int_tempoSHeet > 0 or _root.agi_tempoSHeet > 0 or _root.luk_tempoSHeet > 0 or _root.firearms_tempoSHeet > 0 or _root.melee_tempoSHeet > 0 or _root.energy_tempoSHeet > 0 or _root.merchant_tempoSHeet > 0 or _root.lockpick_tempoSHeet > 0 or _root.outdoor_tempoSHeet > 0 or _root.medic_tempoSHeet > 0 or _root.science_tempoSHeet > 0) { _root.character_sheet.cancelSHell.gotoAndStop(2); } else { _root.character_sheet.cancelSHell.gotoAndStop(1); } chrk = _root.character_unuit; _root.character_sheet.show_hp = chrk.hp - chrk.dmg + '/' + chrk.hp; _root.character_sheet.show_ap = chrk.actpoints + '/' + chrk.actpoints_max; _root.character_sheet.show_mp = chrk.movepoints + '/' + chrk.movepoints_max; _root.character_sheet.show_ac = character_armor_class; _root.character_sheet.show_dr = character_dmg_resist; _root.character_sheet.show_str = _root.character_arr[str_id]; _root.character_sheet.show_per = _root.character_arr[per_id]; _root.character_sheet.show_end = _root.character_arr[end_id]; _root.character_sheet.show_cha = _root.character_arr[cha_id]; _root.character_sheet.show_int = _root.character_arr[int_id]; _root.character_sheet.show_agi = _root.character_arr[agi_id]; _root.character_sheet.show_luk = _root.character_arr[luk_id]; _root.character_sheet.d_str.gotoAndStop(_root.character_arr[str_id]); _root.character_sheet.d_per.gotoAndStop(_root.character_arr[per_id]); _root.character_sheet.d_end.gotoAndStop(_root.character_arr[end_id]); _root.character_sheet.d_cha.gotoAndStop(_root.character_arr[cha_id]); _root.character_sheet.d_agi.gotoAndStop(_root.character_arr[agi_id]); _root.character_sheet.d_luk.gotoAndStop(_root.character_arr[luk_id]); _root.character_sheet.d_int.gotoAndStop(_root.character_arr[int_id]); _root.character_sheet.show_fire = _root.character_arr[firearms_id] + '%'; _root.character_sheet.show_melee = _root.character_arr[melee_id] + '%'; _root.character_sheet.show_energy = _root.character_arr[energy_id] + '%'; _root.character_sheet.show_merch = _root.character_arr[merchant_id] + '%'; _root.character_sheet.show_lock = _root.character_arr[lockpick_id] + '%'; _root.character_sheet.show_outdoor = _root.character_arr[outdoor_id] + '%'; _root.character_sheet.show_medic = _root.character_arr[medic_id] + '%'; _root.character_sheet.show_sci = _root.character_arr[science_id] + '%'; _root.character_sheet.points_stat = _root.character_arr[stat_points_id]; _root.character_sheet.points_skill = _root.character_arr[skill_points_id]; _root.character_sheet.points_perk = _root.character_arr[perk_points_id]; } else { _root.inventoryshowyifftimerbbbbb += 0.03333333333333333; } } } function pickUpAllLoot() { if (_root.carrying_weight > _root.character_arr[max_weight_id]) { return undefined; } thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; ik = 0; while (ik < 16) { if (thiscurrentArray77[ik] != 'none') { mitem87871 = thiscurrentArray77[ik]; pushNewItem(mitem87871); if (_root.pushnewitem_failed eq 0) { thiscurrentArray77[ik] = 'none'; } if (_root.carrying_weight > _root.character_arr[max_weight_id]) { break; return undefined; } } ++ik; } } function inventorySLotsIntegrity() { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { return undefined; } if (_root.handheld.item.id < 3000) { _root.doselect_array = 1; } else { if (_root.handheld.item.id > 3000 and _root.handheld.item.id < 5000) { _root.doselect_array = 2; } else { _root.doselect_array = 3; } } } function btn_exit_shop() { unloadAmmo(); saveCHaracter('save'); gotoAndStop(5); } function returnItemFromHand() { if (_root.handheld.item eq 'none' or _root.handheld.item eq '' or !_root.handheld.item) { return undefined; } item = _root.handheld.item; _root.handheld.item = 'none'; if (item.id < 3000) { pushwhere = inv.general_arr; } else { if (item.id > 3000 and item.id < 5000) { pushwhere = inv.misc_arr; } else { pushwhere = inv.special_arr; } } if (item.stackable eq 1) { i = 0; while (i <= 44) { if (pushwhere[i].id eq item.id) { if (custom_ammount > 0) { pushwhere[i].ammount += custom_ammount; } else { pushwhere[i].ammount += item.ammount; } return undefined; } ++i; } } emptyslot = returnEmptySlot(pushwhere); if (emptyslot eq 'none') { return undefined; } newiterm888123 = item; pushwhere[emptyslot] = newiterm888123; } function pushNewItem(item, custom_ammount) { _root.pushnewitem_failed = 0; if (item.id < 3000) { pushwhere = inv.general_arr; } else { if (item.id > 3000 and item.id < 5000) { pushwhere = inv.misc_arr; } else { pushwhere = inv.special_arr; } } if (item.stackable eq 1) { i = 0; while (i <= 44) { if (pushwhere[i].id eq item.id) { if (custom_ammount > 0) { pushwhere[i].ammount += custom_ammount; } else { pushwhere[i].ammount += item.ammount; } return undefined; } ++i; } } emptyslot = returnEmptySlot(pushwhere); if (emptyslot eq 'none') { _root.pushnewitem_failed = 1; return undefined; } newiterm88823 = cloneItem(item); if (custom_ammount > 0) { newiterm88823.ammount = custom_ammount; } pushwhere[emptyslot] = newiterm88823; } function slotClick(id) { _root.inventoryshowyifftimerbbbbb = 9999; if (_root.which_arr[id].ammount > 1 and _root.handheld.item eq 'none') { trs.pickupwav.start(); ammountDispenserSpawn(id); return undefined; } if (id eq 'torso' or id eq 'melee' or id eq 'firearms' or id eq 'head' or id eq 'neck' or id eq 'boots' or id eq 'gloves') { if (_root[id + '_slot_item'] != 'none' and id eq 'firearms') { unloadAmmo(); } if (_root.handheld.item eq 'none') { if (_root[id + '_slot_item'] eq 'none') { } else { trs.pickupwav.start(); _root.handheld.item = _root[id + '_slot_item']; _root[id + '_slot_item'] = 'none'; } } else { if (_root.handheld.item.kuklaslot eq id) { if (id eq 'melee') { trs.meleeinstall.start(); } if (id != 'melee' and id != 'firearms') { trs.passwav.start(); } if (_root[id + '_slot_item'] eq 'none') { _root[id + '_slot_item'] = _root.handheld.item; if (id eq 'firearms') { reloadGun(); } _root.handheld.item = 'none'; } else { buffer = _root[id + '_slot_item']; _root[id + '_slot_item'] = _root.handheld.item; if (id eq 'firearms') { trace('RELOAD'); reloadGun(); } _root.handheld.item = buffer; } } } } else { if (id eq 'ring1' or id eq 'ring2') { if (_root.handheld.item eq 'none') { if (_root[id + '_slot_item'] eq 'none') { } else { trs.pickupwav.start(); _root.handheld.item = _root[id + '_slot_item']; _root[id + '_slot_item'] = 'none'; } } else { if (_root.handheld.item.kuklaslot eq 'ring') { trs.ringwav.start(); if (_root[id + '_slot_item'] eq 'none') { _root[id + '_slot_item'] = _root.handheld.item; _root.handheld.item = 'none'; } else { buffer = _root[id + '_slot_item']; _root[id + '_slot_item'] = _root.handheld.item; _root.handheld.item = buffer; } } } } else { if (id > 99999 and id < 110000) { id_real = id - 100000; thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; trace(thiscurrentArray77[id_real]); if (_root.handheld.item eq 'none') { if (thiscurrentArray77[id_real] eq 'none') { } else { _root.handheld.item = thiscurrentArray77[id_real]; thiscurrentArray77[id_real] = 'none'; trs.pickupwav.start(); } } else { if (thiscurrentArray77[id_real] eq 'none') { thiscurrentArray77[id_real] = _root.handheld.item; _root.handheld.item = 'none'; trs.passwav.start(); } else { trs.pickupwav.start(); if (thiscurrentArray77[id_real].id eq _root.handheld.item.id and _root.handheld.item.stackable eq 1) { thiscurrentArray77[id_real].ammount += _root.handheld.item.ammount; _root.handheld.item = 'none'; return undefined; } else { buffer = thiscurrentArray77[id_real]; thiscurrentArray77[id_real] = _root.handheld.item; _root.handheld.item = buffer; } } } } else { if (id > 199999 and id < 210000) { id_real = id - 200000; if (_root.handheld.item eq 'none') { if (_root['quick_item_slot_' + id_real] eq 'none') { } else { _root.handheld.item = _root['quick_item_slot_' + id_real]; _root['quick_item_slot_' + id_real] = 'none'; trs.pickupwav.start(); } } else { if (_root['quick_item_slot_' + id_real] eq 'none') { _root['quick_item_slot_' + id_real] = _root.handheld.item; _root.handheld.item = 'none'; trs.passwav.start(); } else { trs.pickupwav.start(); if (_root['quick_item_slot_' + id_real].id eq _root.handheld.item.id and _root.handheld.item.stackable eq 1) { _root['quick_item_slot_' + id_real].ammount += _root.handheld.item.ammount; _root.handheld.item = 'none'; return undefined; } else { buffer = _root['quick_item_slot_' + id_real]; _root['quick_item_slot_' + id_real] = _root.handheld.item; _root.handheld.item = buffer; } } } } else { if (_root.handheld.item eq 'none') { if (_root.which_arr[id] eq 'none') { } else { _root.handheld.item = _root.which_arr[id]; _root.which_arr[id] = 'none'; trs.pickupwav.start(); } } else { if (_root.which_arr[id] eq 'none') { _root.which_arr[id] = _root.handheld.item; _root.handheld.item = 'none'; trs.passwav.start(); } else { trs.pickupwav.start(); if (_root.which_arr[id].id eq _root.handheld.item.id and _root.handheld.item.stackable eq 1) { _root.which_arr[id].ammount += _root.handheld.item.ammount; _root.handheld.item = 'none'; return undefined; } else { buffer = _root.which_arr[id]; _root.which_arr[id] = _root.handheld.item; _root.handheld.item = buffer; } } } } } } } } function sortArray() { _root.which_arr.sortOn('id', Array.NUMERIC); } function itemDescription() { if (_root.handheld.item != 'none') { describeitem = _root.handheld.item; } else { describeitem = _root.mousoceritem; } } function kuklaIntegrity_(id) { _root.inventory_menu['slot_' + id].indicator._visible = false; if (describeitem.kuklaslot eq id) { _root.inventory_menu['slot_' + id].indicator._visible = true; } if (_root.showkukla != 1) { _root.inventory_menu['slot_' + id]._visible = false; } else { _root.inventory_menu['slot_' + id]._visible = true; } } function kuklaIntegrity() { kuklaIntegrity_('torso'); kuklaIntegrity_('firearms'); kuklaIntegrity_('melee'); kuklaIntegrity_('head'); kuklaIntegrity_('boots'); kuklaIntegrity_('gloves'); kuklaIntegrity_('neck'); kuklaIntegrity_('ring2'); kuklaIntegrity_('ring1'); _root.inventory_menu.slot_ring1.indicator._visible = false; _root.inventory_menu.slot_ring2.indicator._visible = false; if (describeitem.kuklaslot eq 'ring') { _root.inventory_menu.slot_ring1.indicator._visible = true; _root.inventory_menu.slot_ring2.indicator._visible = true; } } function ammountDispenserIntegrity() { if (_root.ammountDispenser) { if (_root.ammountDispenser.startdrag eq 1) { _root.ammountDispenser._x = _xmouse; _root.ammountDispenser._y = _ymouse; } if (_root.ammountDispenser.plusisdown eq 1 or _root.ammountDispenser.minusisdown eq 1) { modifiertimeryiff += 0.03333333333333333; } else { yiffdone4564561 = 0; modifiertimeryiff = 0; } _root.ammountDispenser.show_moveammount = _root.taking_ammount; if (modifiertimeryiff < 1) { yiff987 = 1; } else { if (modifiertimeryiff >= 1 and modifiertimeryiff < 2) { yiff987 = 2; } else { if (modifiertimeryiff >= 3 and modifiertimeryiff < 5) { yiff987 = 5; } else { if (modifiertimeryiff >= 5) { yiff987 = 10; } } } } if (yiffdone4564561 != 1) { if (_root.ammountDispenser.plusisdown eq 1) { if (itemammount > 0) { itemammount -= yiff987; _root.taking_ammount += yiff987; if (itemammount < 0) { itemammount = 0; _root.taking_ammount = item__.ammount; } } } if (_root.ammountDispenser.minusisdown eq 1) { if (_root.taking_ammount > 0) { itemammount += yiff987; _root.taking_ammount -= yiff987; if (_root.taking_ammount < 0) { _root.taking_ammount = 0; itemammount = item__.ammount; } } } } if (_root.ammountDispenser.plusisdown eq 1 or _root.ammountDispenser.minusisdown eq 1) { if (modifiertimeryiff < 0.5) { yiffdone4564561 = 1; } else { yiffdone4564561 = 0; } } } } function ammountDispenserSpawn(id) { dispensensingslotid = id; item__ = _root.which_arr[id]; itemammount = item__.ammount; modifiertimeryiff = 0; _root.taking_ammount = 0; yiffdone4564561 = 0; _root.attachMovie('ammountDispenser', 'ammountDispenser', _root.ammountDispenser_depth); if (_root.inventory_menu and _root.inventory_menu.thisisshop != 1) { _root.ammountDispenser._x = _root.inventory_menu['inv_slot_' + id]._x + 420; _root.ammountDispenser._y = _root.inventory_menu['inv_slot_' + id]._y + 260; } else { if (_root.inventory_menu and _root.inventory_menu.thisisshop eq 1) { _root.ammountDispenser._x = _root.inventory_menu['inv_slot_' + id]._x + 737; _root.ammountDispenser._y = _root.inventory_menu['inv_slot_' + id]._y + 252; } else { if (_root.inventory_pickloot) { if (id > 99999) { realid = id - 100000; _root.ammountDispenser._x = _root.inventory_pickloot['container_slot_' + realid]._x + 420; _root.ammountDispenser._y = _root.inventory_pickloot['container_slot_' + realid]._y + 260; } else { _root.ammountDispenser._x = _root.inventory_pickloot['inv_slot_' + id]._x + 420; _root.ammountDispenser._y = _root.inventory_pickloot['inv_slot_' + id]._y + 260; } } } } if (_root.ammountDispenser._x > 715) { _root.ammountDispenser._x = 715; } if (_root.ammountDispenser._y > 490) { _root.ammountDispenser._y = 490; } } function BTN_ammountDispenser_ok() { removeMovieClip(_root.ammountDispenser); if (_root.taking_ammount > 0) { _root.handheld.item = cloneItem(item__); _root.handheld.item.ammount = _root.taking_ammount; item__.ammount -= _root.taking_ammount; if (item__.ammount < 1) { _root.which_arr[dispensensingslotid] = 'none'; } } } function BTN_ammountDispenser_takeall() { itemammount = 0; _root.taking_ammount = item__.ammount; } function initialiseAimedSHotMenu() { _root.attachMovie('aimed_shot_menu', 'aimed_shot_menu', _root.inventory_menu_depth); _root.aimed_shot_menu._x = _root.aimedTarget._x + 50; _root.aimed_shot_menu._y = _root.aimedTarget._y; if (_root.aimed_shot_menu._x < 200) { _root.aimed_shot_menu._x = 200; } if (_root.aimed_shot_menu._x > 670) { _root.aimed_shot_menu._x = 670; } if (_root.aimed_shot_menu._y < 105) { _root.aimed_shot_menu._y = 105; } if (_root.aimed_shot_menu._y > 445) { _root.aimed_shot_menu._y = 445; } } function aimedSHotMenu_Integrity() { if (_root.aimed_shot_menu) { acc_head = accuracy2 - 50; if (acc_head < 0) { acc_head = 0; } acc_torso = accuracy2 + 20; if (acc_torso < 0) { acc_torso = 0; } acc_miscbodypart = accuracy2; if (acc_miscbodypart < 0) { acc_miscbodypart = 0; } acc_leg1 = acc_miscbodypart; acc_leg2 = acc_miscbodypart; acc_arm1 = acc_miscbodypart; acc_arm2 = acc_miscbodypart; _root.aimed_shot_menu.show_arm1 = acc_arm1 + '%'; _root.aimed_shot_menu.show_arm2 = acc_arm2 + '%'; _root.aimed_shot_menu.show_leg1 = acc_leg1 + '%'; _root.aimed_shot_menu.show_leg2 = acc_leg2 + '%'; _root.aimed_shot_menu.show_head = acc_head + '%'; _root.aimed_shot_menu.show_torso = acc_torso + '%'; } } function BTN_aim(bodypart) { character_AP_subtract(); _root.this_shot_is_aimed = 1; _root.aimed_bodypart = bodypart; if (bodypart eq 'head') { _root.aimed_accuracy = acc_head; } else { if (bodypart eq 'torso') { _root.aimed_accuracy = acc_torso; } else { _root.aimed_accuracy = acc_miscbodypart; } } dontgetnewcoordinates = 0; _root.start_ranged_attack_delay_timer = 1; _root.dorangedattacksequence = 1; _root.ras_step_1 = 'go'; removeMovieClip(_root.aimed_shot_menu); } function playTimeMonitor() { if (!timertrigger6) { timertrigger6 = 999; } if (timertrigger6 > 0.2) { dotimemon = 1; timertrigger6 = 0; } else { timertrigger6 += 0.03333333333333333; } if (dotimemon eq 1) { dotimemon = 0; roughtimevar = getTimer() - _root.gameStarted_time + _root.timeSpentPreviously; if (roughtimevar < 0) { roughtimevar = 1; } timevar_hours = Math.floor(roughtimevar / 1000 / 3600); timevar_minutes = Math.floor(roughtimevar / 1000 / 60 - timevar_hours * 60); timevar_seconds = Math.floor(roughtimevar / 1000 - timevar_hours * 3600 - timevar_minutes * 60); if (timevar_hours < 10) { timevar_hours = '0' + timevar_hours; } if (timevar_minutes < 10) { timevar_minutes = '0' + timevar_minutes; } if (timevar_seconds < 10) { timevar_seconds = '0' + timevar_seconds; } playtime_formated = timevar_hours + ':' + timevar_minutes + ':' + timevar_seconds; } } function pushTextToLog(txt) { txt2 = _root.playtime_formated + '[' + _root.logcount + ']: ' + txt; txt = txt2; if (_root.logcount < _root.maxEntriesInLOg) { _root.logtextarray[_root.logcount] = txt; } else { _root.temp_text_arr = _root.logtextarray; i = 0; while (i <= _root.maxEntriesInLOg) { _root.logtextarray[i] = _root.temp_text_arr[i + 1]; ++i; } _root.logtextarray[_root.maxEntriesInLOg] = txt; } ++_root.logcount; _root.logendposition = _root.logcount + 10; if (_root.logendposition > _root.logendposition_max) { _root.logendposition = _root.logendposition_max - 5; } if (_root.logcount > _root.maxEntriesInLOg) { _root.logendposition = _root.logendposition_max; } } function logIntegrity() { trgt = _root.logscreen; if (trgt) { if (_root.logendposition > _root.logendposition_max) { _root.logendposition = _root.logendposition_max - 5; } if (!YIFFYIFFTIMESHOWTIMER) { YIFFYIFFTIMESHOWTIMER = 99999; } else { YIFFYIFFTIMESHOWTIMER += 0.03333333333333333; } if (YIFFYIFFTIMESHOWTIMER > 1) { YIFFYIFFTIMESHOWTIMER = 0; trgt.ggghhh.hhhggg.showtime = playtime_formated; } logposmnoj = 352 / _root.logendposition_max; if (polzunok_dragged != 1) { trgt.polzunok._y = _root.logendposition * logposmnoj - 176; } else { _root.logendposition = Math.floor((trgt.polzunok._y + 176) / logposmnoj); trace('FFF' + _root.logendposition); } if (polzunok_dragged eq 1 or dorefreshlog eq 1) { dorefreshlog = 0; txtvar = ''; istart = _root.logendposition - 25; if (istart < 0) { istart = 0; } if (_root.logendposition < 25) { iend = 25; } else { iend = _root.logendposition; } i = istart; while (i <= iend) { if (!logtextarray[i]) { txtvar += ' \n'; } else { txtvar += logtextarray[i] + '\n'; } ++i; } trgt.logTextField.text = txtvar; } if (!logtimertrigger) { logtimertrigger = 999; } if (logtimertrigger > 1) { dorefreshlog = 1; logtimertrigger = 0; } else { logtimertrigger += 0.03333333333333333; } } } function openCloseLog() { if (_root.logscreen) { removeMovieClip(_root.logscreen); } else { _root.attachMovie('logscreen', 'logscreen', _root.logscreen_depth); _root.logscreen._x = 350; _root.logscreen._y = 250; _root.logendposition = _root.logcount + 10; } } function carry_weight_calculation() { yiff7602856210 = 0; yiff76739511 = 0; yiff6767673340 = 0; yiff7602856210 = inventory_weight(inv.general_arr); yiff76739511 = inventory_weight(inv.misc_arr); yiff6767673340 = inventory_weight(inv.special_arr); inventory_weight_result = yiff7602856210 + yiff76739511 + yiff6767673340; slots_weight = 0; if (_root.torso_slot_item.weight > 0) { slots_weight += _root.torso_slot_item.weight; } if (_root.head_slot_item.weight > 0) { slots_weight += _root.head_slot_item.weight; } if (_root.firearms_slot_item.weight > 0) { slots_weight += _root.firearms_slot_item.weight; } if (_root.melee_slot_item.weight > 0) { slots_weight += _root.melee_slot_item.weight; } if (_root.boots_slot_item.weight > 0) { slots_weight += _root.boots_slot_item.weight; } if (_root.gloves_slot_item.weight > 0) { slots_weight += _root.gloves_slot_item.weight; } if (_root.ring2_slot_item.weight > 0) { slots_weight += _root.ring2_slot_item.weight; } if (_root.ring1_slot_item.weight > 0) { slots_weight += _root.ring1_slot_item.weight; } if (_root.neck_slot_item.weight > 0) { slots_weight += _root.neck_slot_item.weight; } quickslotsweight = 0; i = 0; while (i <= 15) { if (bottommenu['quickslot_' + i]) { if (_root['quick_item_slot_' + i] and _root['quick_item_slot_' + i] != 'none') { if (_root['quick_item_slot_' + i].ammount > 1) { quickslotsweight += _root['quick_item_slot_' + i].weight * _root['quick_item_slot_' + i].ammount; } else { quickslotsweight += _root['quick_item_slot_' + i].weight; } } } ++i; } _root.carrying_weight = inventory_weight_result + slots_weight + quickslotsweight; } function inventory_weight(array_) { curweight66 = 0; i = 0; while (i <= 44) { curchk_itm = array_[i]; if (curchk_itm != 0 and curchk_itm != 'none' and curchk_itm.weight > 0) { if (curchk_itm.stackable eq 1) { curweight66 += curchk_itm.weight * curchk_itm.ammount; } else { curweight66 += curchk_itm.weight; } } ++i; } return curweight66; } function createLootArrayForThisUnit(serialnumber, enemyid) { _root['lootArray_' + serialnumber] = []; nabivaemiiMassiv = _root['lootArray_' + serialnumber]; var v2 = 0; while (v2 < 16) { newItemToBeCloned = _root['unit_' + enemyid + '_item_' + v2]; if (newItemToBeCloned and newItemToBeCloned != 'none' and newItemToBeCloned != 0) { chance565671 = _root['unit_' + enemyid + '_chance_' + v2]; if (random(99) < chance565671) { nabivaemiiMassiv[v2] = cloneItem(newItemToBeCloned); ammountmin898 = _root['unit_' + enemyid + '_amm_min_' + v2]; ammountmax898 = _root['unit_' + enemyid + '_amm_max_' + v2]; if (ammountmin898 != ammountmax898) { nabivaemiiMassiv[v2].ammount = ammountmin898 + random(ammountmax898 - ammountmin898 + 1); } } else { nabivaemiiMassiv[v2] = 'none'; } } else { nabivaemiiMassiv[v2] = 'none'; } ++v2; } _root.nabivaemiiMassiv.sortOn('id', Array.NUMERIC); } function lootBoxOpen(serialnunmer) { _root.attachMovie('inventory_pickloot', 'inventory_pickloot', _root.inventory_menu_depth); _root.inventory_pickloot._x = 400; _root.inventory_pickloot._y = 300; _root.inventory_pickloot.serialnunmer = serialnunmer; jk = 0; while (jk < 16) { _root.inventory_pickloot['container_slot_' + jk].id = 100000 + jk; ++jk; } i = 0; while (i <= 44) { _root.inventory_pickloot['inv_slot_' + i].id = i; _root.inventory_pickloot['inv_slot_' + i].cacheAsBitmap = true; ++i; } } function inventoryPickloot_integrity() { if (_root.inventory_pickloot) { _root.inventory_pickloot.show_weight = 'Weight: ' + Math.floor(_root.carrying_weight * 10) / 10 + '/' + _root.character_arr[max_weight_id]; if (_root.carrying_weight > _root.character_arr[max_weight_id]) { _root.inventory_pickloot.encumsign._visible = true; } else { _root.inventory_pickloot.encumsign._visible = false; } _root.lootboxmousovered = 'none'; thiscurrentArray77 = _root['lootArray_' + _root.inventory_pickloot.serialnunmer]; ik = 0; while (ik < 16) { if (thiscurrentArray77[ik] eq 'none') { _root.inventory_pickloot['container_slot_' + ik].itembox.gotoAndStop(1); } else { _root.inventory_pickloot['container_slot_' + ik].itembox.gotoAndStop(thiscurrentArray77[ik].id); } if (thiscurrentArray77[ik] != 'none' and thiscurrentArray77[ik].stackable eq 1) { _root.inventory_pickloot['container_slot_' + ik].ammount._visible = true; _root.inventory_pickloot['container_slot_' + ik].ammount.showvar = thiscurrentArray77[ik].ammount; } else { _root.inventory_pickloot['container_slot_' + ik].ammount._visible = false; } ++ik; } itemDescription(); kuklaIntegrity(); if (_root.doselect_array eq 1) { _root.which_arr = inv.general_arr; } else { if (_root.doselect_array eq 2) { _root.which_arr = inv.misc_arr; } else { if (_root.doselect_array eq 3) { _root.which_arr = inv.special_arr; } } } i = 0; while (i <= 44) { if (_root.which_arr[i] eq 'none') { _root.inventory_pickloot['inv_slot_' + i].itembox.gotoAndStop(1); } else { _root.inventory_pickloot['inv_slot_' + i].itembox.gotoAndStop(_root.which_arr[i].id); } if (_root.which_arr[i] != 'none' and _root.which_arr[i].stackable eq 1) { _root.inventory_pickloot['inv_slot_' + i].ammount._visible = true; _root.inventory_pickloot['inv_slot_' + i].ammount.showvar = _root.which_arr[i].ammount; } else { _root.inventory_pickloot['inv_slot_' + i].ammount._visible = false; } ++i; } } } function loot_meshki_integrity() { if (_root.lootboxmousovered and _root.lootboxmousovered != 'none') { tr1 = _root.lootboxmousovered; tr2 = _root.character_unuit; yiffdgdfg67867 = CALC_Dist_Xv_Yv(tr1._x, tr1._y, tr2._x, tr2._y); distance = yiffdgdfg67867[0]; if (distance < spacing * 1.5) { tr1.outofrange = 0; } else { tr1.outofrange = 1; } } i = 0; while (i < _root.enemy_ammount_map) { trgtmeshok = _root.yiff.loot_shell['lootbox' + i]; if (trgtmeshok) { checkMeshokForRemoval(i); tr1 = _root.lootboxmousovered; if (trgtmeshok eq _root.lootboxmousovered) { if (tr1.outofrange eq 1) { tr1.red_highlight._visible = true; tr1.green_highlight._visible = false; _root.bottommenu.showinfo = 'Items on the ground. YOU ARE TO FAR AWAY TO PICK UP. COME CLOSER'; } else { if (tr1.outofrange eq 0) { tr1.red_highlight._visible = false; tr1.green_highlight._visible = true; _root.bottommenu.showinfo = 'Items on the ground. Click to pick up.'; } } } else { trgtmeshok.red_highlight._visible = false; trgtmeshok.green_highlight._visible = false; } } ++i; } i = 99901; while (i < 99951) { trgtmeshok = _root.yiff.loot_shell['lootbox' + i]; if (trgtmeshok) { checkMeshokForRemoval(i); tr1 = _root.lootboxmousovered; if (trgtmeshok eq _root.lootboxmousovered) { if (tr1.outofrange eq 1) { tr1.red_highlight._visible = true; tr1.green_highlight._visible = false; _root.bottommenu.showinfo = 'Items on the ground. YOU ARE TO FAR AWAY TO PICK UP. COME CLOSER'; } else { if (tr1.outofrange eq 0) { tr1.red_highlight._visible = false; tr1.green_highlight._visible = true; _root.bottommenu.showinfo = 'Items on the ground. Click to pick up.'; } } if (_root.lootboxmousovered.serialnum eq 99906) { _root.bottommenu.showinfo = '?'; } } else { trgtmeshok.red_highlight._visible = false; trgtmeshok.green_highlight._visible = false; } } ++i; } } function checkMeshokForRemoval(meshokid) { tcurArr65563 = _root['lootArray_' + meshokid]; trgtmeshok = _root.yiff.loot_shell['lootbox' + meshokid]; if (_root.inventory_pickloot and _root.inventory_pickloot.serialnunmer eq meshokid) { return undefined; } uk = 0; while (uk < 16) { if (tcurArr65563[uk] and tcurArr65563[uk] != 'none' and tcurArr65563[uk] != 0) { return undefined; } ++uk; } removeMovieClip(trgtmeshok); } function shop_description_integrity() { if (!_root.inventory_menu and !_root.inventory_pickloot) { return undefined; } _root.inventory_menu.showvar_sellfor = ''; describeitemid = 1; if (_root.handheld.item != 'none' and _root.handheld.item) { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.handheld.item.price * _root.character_arr[merchant_id] / 100); describeitemid = _root.handheld.item.id; if (_root.handheld.item.stackable eq 1) { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.handheld.item.price * _root.character_arr[merchant_id] / 100) * _root.handheld.item.ammount; } } else { if (_root.mousoceritem and _root.mousoceritem != '' and _root.mousoceritem != 'none') { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.mousoceritem.price * _root.character_arr[merchant_id] / 100); describeitemid = _root.mousoceritem.id; if (_root.mousoceritem.stackable eq 1) { _root.inventory_menu.showvar_sellfor = 'SELL FOR: ' + Math.floor(_root.mousoceritem.price * _root.character_arr[merchant_id] / 100) * _root.mousoceritem.ammount; } } else { if (_root.showthispriceinscreen > 0 and _root.showthispriceinscreen != '') { _root.inventory_menu.showvar_sellfor = 'PURCHASE FOR: ' + _root.showthispriceinscreen + '$'; describeitemid = _root.shopitemmousoverid; } } } if (describeitemid eq 5001) { _root.inventory_menu.showvar_sellfor = ''; } _root.inventory_menu.description.gotoAndStop(describeitemid); _root.inventory_pickloot.description.gotoAndStop(describeitemid); } function sellItem() { if (_root.handheld.item != 'none' and _root.handheld.item) { } else { return undefined; } trs.cashreg.start(); your_price = Math.floor(_root.handheld.item.price * _root.character_arr[merchant_id] / 100); if (_root.handheld.item.stackable eq 1) { your_price *= _root.handheld.item.ammount; } _root.character_arr[cash_id] += your_price; _root.handheld.item = 'none'; _root.inventory_menu.seller.cash_fly.play(); _root.inventory_menu.seller.cash_fly.textcore.showvar = '+' + your_price + '$'; } function showprice(id, ammount, discount) { _root.shopitemmousoverid = id; basic_price = _root['item' + id].price; mercskill = _root.character_arr[merchant_id]; nadbavka_k_cene = 0.95; actual_ptice = (basic_price + nadbavka_k_cene * basic_price * ((100 - mercskill) / 100)) * ammount; actual_ptice -= actual_ptice * discount / 100; actual_ptice = Math.floor(actual_ptice); return actual_ptice; } function buy_item(id, ammount, discount) { if (_root.handheld.item != 'none' and _root.handheld.item) { return undefined; } actual_ptice = showprice(id, ammount, discount); wehavecash = _root.character_arr[cash_id]; if (wehavecash < actual_ptice) { trs.tudut.start(); _root.inventory_menu.flash_no_cash.play(); return undefined; } _root.character_arr[cash_id] -= actual_ptice; item = _root['item' + id]; newiterm87723 = cloneItem(item); newiterm87723.ammount = ammount; _root.handheld.item = newiterm87723; _root.inventory_menu.cash_fly.textcore.showvar = '-' + actual_ptice + '$'; _root.inventory_menu.cash_fly.play(); trs.cashreg.start(); } function spawn_tutorial_menu() { bottommenu.tutbut._visible = false; _root.attachMovie('tutorial_menu', 'tutorial_menu', _root.tutorial_menu_depth); _root.tutorial_menu.cacheAsBitmap = true; _root.tutorial_menu._x = 242.9; _root.tutorial_menu._y = 133.4; } function openRemoveMainMenu() { if (_root.main_menu) { removeMovieClip(_root.main_menu); } else { _root.attachMovie('main_menu', 'main_menu', _root.main_menu_depth); _root.main_menu.cacheAsBitmap = true; _root.main_menu._x = 79; _root.main_menu._y = 22; } } function checkIfNoEnemiesEndRound() { if (_root.currentround > 1 and _root.currentround < 999999 and manual_controll_on eq 1 and _root.peaqce_mode != 1 and all_enemies_has_been_exterminated != 1) { } else { return undefined; } check2010_participants = []; i = 0; while (i < enemy_ammount) { trgt2010 = _root.yiff['enemy_' + i]; if (trgt2010 and trgt2010.dmg < trgt2010.hp and trgt2010.en_id != 999) { _root.check2010_participants.push(this['enemy_identificator' + i]); } ++i; } if (_root.check2010_participants.length eq 0) { all_enemies_has_been_exterminated = 1; _root.endturnCHeck('true'); } } function endMission() { if (_root.loadmap_id eq 2) { _root.character_arr[mission_1_status_id] = 1; } if (_root.loadmap_id eq 11) { _root.character_arr[mission_2_status_id] = 1; } if (_root.loadmap_id eq 12) { _root.character_arr[mission_3_status_id] = 1; } if (_root.loadmap_id eq 13) { _root.character_arr[mission_4_status_id] = 1; } if (_root.loadmap_id eq 14) { _root.character_arr[mission_5_status_id] = 1; } if (_root.loadmap_id eq 100) { _root.character_arr[mission_6_status_id] = 1; } } function map12_insectcheck_gopnikiatack() { allinsectskilled = 1; i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id eq 4 or trgtt2010.en_id eq 7) { allinsectskilled = 0; break; } ++i; } if (allinsectskilled != 1) { return undefined; } i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id != 999) { trgtt2010.team = 666; } ++i; } } function map12_insectcheck_gopnikiatack2() { allinsectskilled = 1; i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id < 30) { allinsectskilled = 0; break; } ++i; } if (allinsectskilled != 1) { return undefined; } i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id != 999) { trgtt2010.team = 666; } ++i; } } function map14_insectcheck_gopnikiatack() { allinsectskilled = 1; i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id eq 4 or trgtt2010.en_id eq 7) { allinsectskilled = 0; break; } ++i; } if (allinsectskilled != 1) { return undefined; } i = 0; while (i < _root.enemyarray2010.length) { trgtt2010 = _root.enemyarray2010[i]; if (trgtt2010.en_id != 999) { trgtt2010.team = 666; } ++i; } } function death_integrity() { check2010_participants = []; i = 0; while (i < enemy_ammount) { trgt2010 = _root.yiff['enemy_' + i]; if (trgt2010.en_id eq 999) { if (character_has_died_manually != 1) { return undefined; } } ++i; } if (!_root.death_menu and character_has_died_manually eq 1) { _root.attachMovie('death_menu', 'death_menu', _root.death_menu_depth); _root.death_menu.cacheAsBitmap = true; _root.death_menu._x = 413.8; _root.death_menu._y = 217; } if (!_root.death_menu and _root.currentround > 1) { _root.attachMovie('death_menu', 'death_menu', _root.death_menu_depth); _root.death_menu.cacheAsBitmap = true; _root.death_menu._x = 413.8; _root.death_menu._y = 217; } if (_root.currentround > 1 or character_has_died_manually eq 1) { if (characterIsDead != 1) { characterIsDead = 1; trace('pizdos'); current_participant.actpoints = 0; current_participant.movepoints = 0; _root.firearms_slot_item = 'none'; _root.melee_slot_item = 'none'; _root.quick_item_slot_0 = 'none'; _root.quick_item_slot_1 = 'none'; _root.quick_item_slot_2 = 'none'; _root.quick_item_slot_3 = 'none'; if (_root.peaqce_mode != 1) { if (_root.manual_controll_on eq 1 and _root.activate_CHARmovment_function != 1 and _root.activate_CHARmovment_function2 != 1) { _root.endturnCHeck('true'); } } } } character_has_died_manually = 0; } function exit_after_death_button() { characterIsDead = 0; _root.savePlayTime(); _root.deleteAllDrestroyEverything(); } if (_root.start_new_character eq 1) { object_id = 0; } _root.current_amo_in_gun = 0; _root.peaqce_mode = 0; spacing = 26; shag = spacing / 3; field_length = 28; field_height = 21; _root.accuracy_falloff_outofrange = 7; _root.bulletDOhitradius = spacing * 0.8; _root.ranged_attack_pricel = 0; _root.dorangedattacksequence = 0; _root.ras_step_1 = 0; _root.do_peace_walking = 0; step_4R = 'yiff'; shotnumberredefine = 1; _root.logtextarray = []; _root.temp_text_arr = []; _root.logcount = 0; _root.logendposition_max = 1000; logendposition = _root.logendposition_max - 1; _root.maxEntriesInLOg = _root.logendposition_max - 17; _root.doselect_array = 1; _root.torso_slot_item = 'none'; _root.head_slot_item = 'none'; _root.neck_slot_item = 'none'; _root.ring1_slot_item = 'none'; _root.ring2_slot_item = 'none'; _root.gloves_slot_item = 'none'; _root.boots_slot_item = 'none'; _root.melee_slot_item = 'none'; _root.firearms_slot_item = 'none'; _root.quick_item_slot_0 = 'none'; _root.quick_item_slot_1 = 'none'; _root.quick_item_slot_2 = 'none'; _root.quick_item_slot_3 = 'none'; _root.quick_item_slot_4 = 'none'; _root.quick_item_slot_5 = 'none'; _root.quick_item_slot_6 = 'none'; _root.quick_item_slot_7 = 'none'; _root.quick_item_slot_8 = 'none'; _root.quick_item_slot_9 = 'none'; _root.quick_item_slot_10 = 'none'; sloc = _root; _root.global_acceleration = 2; doshowpath = false; do_combat_trace = 1; _root.dononstop = 0; _root.hp_modifier = 1; spacing = 26; field_length = 28; field_height = 21; _root.idlingmode = 1; _root.do_surrounded_check = 0; game_location_x = 65; game_location_y = 5; _root.cells_depth = 1; _root.corpse_shell_depth = 998; _root.loot_shell_depth = 999; _root.destination_depth = 1000; _root.pathpointer_depth = 1500; _root.scorpion_base_depth = 3300; _root.spider_base_depth = 3350; _root.enemy_depth = 4000; _root.character_depth = 5200; _root.background_up_depth = 9000; _root.shooting_shell_depth = 12000; _root.base_showhp_depth = 13000; _root.sound_shell_depth = 3000; _root.kursor_depth = 2000; _root.main_menu_depth = 986; _root.death_menu_depth = 985; _root.upper_indicators_depth = 992; _root.tutorial_menu_depth = 990; _root.ammountDispenser_depth = 980; _root.logscreen_depth = 960; _root.inventory_menu_depth = 950; _root.showroundcount_depth = 850; _root.bottommenu_depth = 600; _root.status_layer_depth = 300; _root.yiff_depth = 100; _root.background_floor_depth = 1; _root.idle_time_max = 0.34; _root.lootboxmousovered = 'none'; dotrace = 0; _root.enemy_name_999 = 'Nathaniel'; _root.enemy_hp_999 = 100; _root.enemy_speed_999 = 1.9; _root.enemy_initiative_999 = 5999; _root.enemy_movepoints_999 = 5; _root.enemy_actpoints_999 = 2; _root.enemy_visibility_radius_999 = 200; _root.enemy_team_999 = 999; _root.enemy_attack_radius_999 = 1.6 * spacing; _root.enemy_dmg_min_999 = 60; _root.enemy_dmg_max_999 = 110; _root.enemy_fogreduce_radius_999 = 2; _root.enemy_poison_dmg_999 = 0; _root.enemy_poison_time_999 = 0; _root.enemy_regeneration_percent_999 = 5; _root.enemy_control_999 = 1; _root.enemy_cost_999 = 3; _root.enemy_dmg_resist_999 = 0; _root.enemy_armor_class_999 = 0; _root.enemy_name_500 = 'Black Team Raider (Pistol)'; _root.enemy_hp_500 = 50; _root.enemy_speed_500 = 1.4; _root.enemy_initiative_500 = 5; _root.enemy_movepoints_500 = 4; _root.enemy_actpoints_500 = 2; _root.enemy_visibility_radius_500 = 400; _root.enemy_team_500 = 500; _root.enemy_attack_radius_500 = 8 * spacing; _root.enemy_poison_dmg_500 = 0; _root.enemy_poison_time_500 = 0; _root.enemy_regeneration_percent_500 = 5; _root.enemy_dmg_min_500 = 5; _root.enemy_dmg_max_500 = 15; _root.enemy_critical_chance_500 = 5; _root.enemy_critical_mod_500 = 3; _root.enemy_ranged_500 = 1; _root.enemy_accuracy_500 = 70; _root.enemy_wpn_type_500 = 'gun1'; _root.enemy_ammoingun_500 = 10; _root.enemy_dmg_resist_500 = 10; _root.enemy_armor_class_500 = 5; _root.enemy_experience_500 = 100; _root.enemy_name_501 = 'Blue Team Raider (Pistol)'; _root.enemy_hp_501 = 50; _root.enemy_speed_501 = 1.4; _root.enemy_initiative_501 = 5; _root.enemy_movepoints_501 = 4; _root.enemy_actpoints_501 = 2; _root.enemy_visibility_radius_501 = 400; _root.enemy_team_501 = 500; _root.enemy_attack_radius_501 = 8 * spacing; _root.enemy_poison_dmg_501 = 0; _root.enemy_poison_time_501 = 0; _root.enemy_regeneration_percent_501 = 5; _root.enemy_dmg_min_501 = 5; _root.enemy_dmg_max_501 = 15; _root.enemy_critical_chance_501 = 5; _root.enemy_critical_mod_501 = 3; _root.enemy_ranged_501 = 1; _root.enemy_accuracy_501 = 70; _root.enemy_wpn_type_501 = 'gun1'; _root.enemy_ammoingun_501 = 10; _root.enemy_dmg_resist_501 = 10; _root.enemy_armor_class_501 = 5; _root.enemy_experience_501 = 100; _root.enemy_name_510 = 'Black Team Raider (Assault Rifle)'; _root.enemy_hp_510 = 70; _root.enemy_speed_510 = 1.4; _root.enemy_initiative_510 = 5; _root.enemy_movepoints_510 = 5; _root.enemy_actpoints_510 = 1; _root.enemy_visibility_radius_510 = 400; _root.enemy_team_510 = 500; _root.enemy_attack_radius_510 = 8 * spacing; _root.enemy_poison_dmg_510 = 0; _root.enemy_poison_time_510 = 0; _root.enemy_regeneration_percent_510 = 5; _root.enemy_dmg_min_510 = 5; _root.enemy_dmg_max_510 = 12; _root.enemy_critical_chance_510 = 5; _root.enemy_critical_mod_510 = 3; _root.enemy_ranged_510 = 1; _root.enemy_accuracy_510 = 50; _root.enemy_wpn_type_510 = 'gun2'; _root.enemy_ammoingun_510 = 30; _root.enemy_dmg_resist_510 = 5; _root.enemy_armor_class_510 = 7; _root.enemy_experience_510 = 100; _root.enemy_name_511 = 'Blue Team Raider (Assault Rifle)'; _root.enemy_hp_511 = 70; _root.enemy_speed_511 = 1.4; _root.enemy_initiative_511 = 5; _root.enemy_movepoints_511 = 5; _root.enemy_actpoints_511 = 1; _root.enemy_visibility_radius_511 = 400; _root.enemy_team_511 = 500; _root.enemy_attack_radius_511 = 8 * spacing; _root.enemy_poison_dmg_511 = 0; _root.enemy_poison_time_511 = 0; _root.enemy_regeneration_percent_511 = 5; _root.enemy_dmg_min_511 = 5; _root.enemy_dmg_max_511 = 12; _root.enemy_critical_chance_511 = 5; _root.enemy_critical_mod_511 = 3; _root.enemy_ranged_511 = 1; _root.enemy_accuracy_511 = 50; _root.enemy_wpn_type_511 = 'gun2'; _root.enemy_ammoingun_511 = 30; _root.enemy_dmg_resist_511 = 5; _root.enemy_armor_class_511 = 7; _root.enemy_experience_511 = 100; _root.enemy_name_520 = 'Black Team Raider (Shotgun)'; _root.enemy_hp_520 = 50; _root.enemy_speed_520 = 1.4; _root.enemy_initiative_520 = 5; _root.enemy_movepoints_520 = 5; _root.enemy_actpoints_520 = 1; _root.enemy_visibility_radius_520 = 400; _root.enemy_team_520 = 500; _root.enemy_attack_radius_520 = 8 * spacing; _root.enemy_poison_dmg_520 = 0; _root.enemy_poison_time_520 = 0; _root.enemy_regeneration_percent_520 = 5; _root.enemy_dmg_min_520 = 1; _root.enemy_dmg_max_520 = 10; _root.enemy_critical_chance_520 = 5; _root.enemy_critical_mod_520 = 3; _root.enemy_ranged_520 = 1; _root.enemy_accuracy_520 = 70; _root.enemy_wpn_type_520 = 'gun3'; _root.enemy_ammoingun_520 = 2; _root.enemy_dmg_resist_520 = 10; _root.enemy_armor_class_520 = 5; _root.enemy_experience_520 = 100; _root.enemy_name_521 = 'Blue Team Raider (Shotgun)'; _root.enemy_hp_521 = 50; _root.enemy_speed_521 = 1.4; _root.enemy_initiative_521 = 5; _root.enemy_movepoints_521 = 5; _root.enemy_actpoints_521 = 1; _root.enemy_visibility_radius_521 = 400; _root.enemy_team_521 = 500; _root.enemy_attack_radius_521 = 8 * spacing; _root.enemy_poison_dmg_521 = 0; _root.enemy_poison_time_521 = 0; _root.enemy_regeneration_percent_521 = 5; _root.enemy_dmg_min_521 = 1; _root.enemy_dmg_max_521 = 10; _root.enemy_critical_chance_521 = 5; _root.enemy_critical_mod_521 = 3; _root.enemy_ranged_521 = 1; _root.enemy_accuracy_521 = 70; _root.enemy_wpn_type_521 = 'gun3'; _root.enemy_ammoingun_521 = 2; _root.enemy_dmg_resist_521 = 10; _root.enemy_armor_class_521 = 5; _root.enemy_experience_521 = 100; _root.enemy_name_530 = 'Black Team Raider (Sledgehammer)'; _root.enemy_hp_530 = 50; _root.enemy_speed_530 = 1.4; _root.enemy_initiative_530 = 5; _root.enemy_movepoints_530 = 5; _root.enemy_actpoints_530 = 1; _root.enemy_visibility_radius_530 = 700; _root.enemy_team_530 = 500; _root.enemy_attack_radius_530 = 2 * spacing; _root.enemy_poison_dmg_530 = 0; _root.enemy_poison_time_530 = 0; _root.enemy_regeneration_percent_530 = 5; _root.enemy_dmg_min_530 = 15; _root.enemy_dmg_max_530 = 25; _root.enemy_critical_chance_530 = 5; _root.enemy_critical_mod_530 = 3; _root.enemy_ranged_530 = 0; _root.enemy_accuracy_530 = 55; _root.enemy_wpn_type_530 = 'hammer'; _root.enemy_dmg_resist_530 = 10; _root.enemy_armor_class_530 = 5; _root.enemy_experience_530 = 100; _root.enemy_name_531 = 'Blue Team Raider (Sledgehammer)'; _root.enemy_hp_531 = 50; _root.enemy_speed_531 = 1.4; _root.enemy_initiative_531 = 5; _root.enemy_movepoints_531 = 5; _root.enemy_actpoints_531 = 1; _root.enemy_visibility_radius_531 = 700; _root.enemy_team_531 = 500; _root.enemy_attack_radius_531 = 2 * spacing; _root.enemy_poison_dmg_531 = 0; _root.enemy_poison_time_531 = 0; _root.enemy_regeneration_percent_531 = 5; _root.enemy_dmg_min_531 = 15; _root.enemy_dmg_max_531 = 25; _root.enemy_critical_chance_531 = 5; _root.enemy_critical_mod_531 = 3; _root.enemy_ranged_531 = 0; _root.enemy_accuracy_531 = 55; _root.enemy_wpn_type_531 = 'hammer'; _root.enemy_dmg_resist_531 = 10; _root.enemy_armor_class_531 = 5; _root.enemy_experience_531 = 100; _root.enemy_name_540 = 'Black Team Raider (Knife)'; _root.enemy_hp_540 = 50; _root.enemy_speed_540 = 1.4; _root.enemy_initiative_540 = 5; _root.enemy_movepoints_540 = 5; _root.enemy_actpoints_540 = 1; _root.enemy_visibility_radius_540 = 700; _root.enemy_team_540 = 500; _root.enemy_attack_radius_540 = 2 * spacing; _root.enemy_poison_dmg_540 = 0; _root.enemy_poison_time_540 = 0; _root.enemy_regeneration_percent_540 = 5; _root.enemy_dmg_min_540 = 5; _root.enemy_dmg_max_540 = 25; _root.enemy_critical_chance_540 = 3; _root.enemy_critical_mod_540 = 3; _root.enemy_ranged_540 = 0; _root.enemy_accuracy_540 = 55; _root.enemy_wpn_type_540 = 'knife'; _root.enemy_dmg_resist_540 = 10; _root.enemy_armor_class_540 = 5; _root.enemy_experience_540 = 100; _root.enemy_name_541 = 'Blue Team Raider (Knife)'; _root.enemy_hp_541 = 50; _root.enemy_speed_541 = 1.4; _root.enemy_initiative_541 = 5; _root.enemy_movepoints_541 = 5; _root.enemy_actpoints_541 = 1; _root.enemy_visibility_radius_541 = 700; _root.enemy_team_541 = 500; _root.enemy_attack_radius_541 = 2 * spacing; _root.enemy_poison_dmg_541 = 0; _root.enemy_poison_time_541 = 0; _root.enemy_regeneration_percent_541 = 5; _root.enemy_dmg_min_541 = 5; _root.enemy_dmg_max_541 = 25; _root.enemy_critical_chance_541 = 3; _root.enemy_critical_mod_541 = 3; _root.enemy_ranged_541 = 0; _root.enemy_accuracy_541 = 55; _root.enemy_wpn_type_541 = 'knife'; _root.enemy_dmg_resist_541 = 10; _root.enemy_armor_class_541 = 5; _root.enemy_experience_541 = 100; _root.enemy_name_1 = 'Black Scorpion'; _root.enemy_hp_1 = 50; _root.enemy_speed_1 = 1.3; _root.enemy_initiative_1 = 5; _root.enemy_movepoints_1 = 3; _root.enemy_actpoints_1 = 1; _root.enemy_visibility_radius_1 = 200; _root.enemy_team_1 = 2; _root.enemy_attack_radius_1 = 1.6 * spacing; _root.enemy_dmg_min_1 = 5; _root.enemy_dmg_max_1 = 15; _root.enemy_fogreduce_radius_1 = 2; _root.enemy_poison_dmg_1 = 0; _root.enemy_poison_time_1 = 0; _root.enemy_regeneration_percent_1 = 5; _root.enemy_critical_chance_1 = 50; _root.enemy_critical_mod_1 = 3; _root.enemy_wpn_type_1 = 'scorpion'; _root.enemy_accuracy_1 = 55; _root.enemy_dmg_resist_1 = 30; _root.enemy_armor_class_1 = 20; _root.enemy_experience_1 = 100; _root.enemy_name_3 = 'Blue Spider'; _root.enemy_hp_3 = 55; _root.enemy_speed_3 = 2; _root.enemy_initiative_3 = 7; _root.enemy_movepoints_3 = 7; _root.enemy_actpoints_3 = 2; _root.enemy_visibility_radius_3 = 300; _root.enemy_team_3 = 1; _root.enemy_attack_radius_3 = 1.6 * spacing; _root.enemy_dmg_min_3 = 15; _root.enemy_dmg_max_3 = 30; _root.enemy_critical_chance_3 = 5; _root.enemy_critical_mod_3 = 2; _root.enemy_wpn_type_3 = 'spider'; _root.enemy_accuracy_3 = 55; _root.enemy_dmg_resist_3 = 3; _root.enemy_armor_class_3 = 3; _root.enemy_experience_3 = 100; _root.enemy_name_4 = 'Giant Spider'; _root.enemy_hp_4 = 60; _root.enemy_speed_4 = 1.7; _root.enemy_initiative_4 = 6; _root.enemy_movepoints_4 = 5; _root.enemy_actpoints_4 = 2; _root.enemy_visibility_radius_4 = 200; _root.enemy_team_4 = 1; _root.enemy_attack_radius_4 = 1.6 * spacing; _root.enemy_dmg_min_4 = 15; _root.enemy_dmg_max_4 = 25; _root.enemy_fogreduce_radius_4 = 2; _root.enemy_poison_dmg_4 = 0; _root.enemy_poison_time_4 = 0; _root.enemy_regeneration_percent_4 = 5; _root.enemy_critical_chance_4 = 5; _root.enemy_critical_mod_4 = 2; _root.enemy_wpn_type_4 = 'spider'; _root.enemy_accuracy_4 = 55; _root.enemy_dmg_resist_4 = 3; _root.enemy_armor_class_4 = 3; _root.enemy_experience_4 = 100; _root.enemy_name_5 = 'Red Spider'; _root.enemy_hp_5 = 80; _root.enemy_speed_5 = 1.7; _root.enemy_initiative_5 = 5; _root.enemy_movepoints_5 = 5; _root.enemy_actpoints_5 = 1; _root.enemy_visibility_radius_5 = 300; _root.enemy_team_5 = 1; _root.enemy_attack_radius_5 = 1.6 * spacing; _root.enemy_dmg_min_5 = 30; _root.enemy_dmg_max_5 = 40; _root.enemy_critical_chance_5 = 15; _root.enemy_critical_mod_5 = 2; _root.enemy_wpn_type_5 = 'spider'; _root.enemy_accuracy_5 = 70; _root.enemy_dmg_resist_5 = 3; _root.enemy_armor_class_5 = 3; _root.enemy_experience_5 = 100; _root.enemy_name_6 = 'Matriarch Spider'; _root.enemy_hp_6 = 120; _root.enemy_speed_6 = 1.7; _root.enemy_initiative_6 = 5; _root.enemy_movepoints_6 = 5; _root.enemy_actpoints_6 = 4; _root.enemy_visibility_radius_6 = 300; _root.enemy_team_6 = 1; _root.enemy_attack_radius_6 = 1.6 * spacing; _root.enemy_dmg_min_6 = 20; _root.enemy_dmg_max_6 = 35; _root.enemy_critical_chance_6 = 10; _root.enemy_critical_mod_6 = 2; _root.enemy_wpn_type_6 = 'spider'; _root.enemy_accuracy_6 = 85; _root.enemy_dmg_resist_6 = 20; _root.enemy_armor_class_6 = 30; _root.enemy_experience_6 = 500; _root.enemy_name_7 = 'Giant Scorpion'; _root.enemy_hp_7 = 30; _root.enemy_speed_7 = 1.3; _root.enemy_initiative_7 = 6; _root.enemy_movepoints_7 = 5; _root.enemy_actpoints_7 = 1; _root.enemy_visibility_radius_7 = 200; _root.enemy_team_7 = 2; _root.enemy_attack_radius_7 = 1.6 * spacing; _root.enemy_dmg_min_7 = 5; _root.enemy_dmg_max_7 = 20; _root.enemy_fogreduce_radius_7 = 2; _root.enemy_poison_dmg_7 = 0; _root.enemy_poison_time_7 = 0; _root.enemy_regeneration_percent_7 = 10; _root.enemy_critical_chance_7 = 5; _root.enemy_critical_mod_7 = 3; _root.enemy_wpn_type_7 = 'scorpion'; _root.enemy_accuracy_7 = 55; _root.enemy_dmg_resist_7 = 3; _root.enemy_armor_class_7 = 10; _root.enemy_experience_7 = 100; _root.enemy_name_8 = 'King Scorpion'; _root.enemy_hp_8 = 100; _root.enemy_speed_8 = 1.3; _root.enemy_initiative_8 = 3; _root.enemy_movepoints_8 = 4; _root.enemy_actpoints_8 = 1; _root.enemy_visibility_radius_8 = 200; _root.enemy_team_8 = 2; _root.enemy_attack_radius_8 = 1.6 * spacing; _root.enemy_dmg_min_8 = 30; _root.enemy_dmg_max_8 = 60; _root.enemy_critical_chance_8 = 5; _root.enemy_critical_mod_8 = 2; _root.enemy_wpn_type_8 = 'scorpion'; _root.enemy_accuracy_8 = 65; _root.enemy_dmg_resist_8 = 30; _root.enemy_armor_class_8 = 30; _root.enemy_experience_8 = 100; _root.enemy_name_9 = 'Deadly Scorpion'; _root.enemy_hp_9 = 60; _root.enemy_speed_9 = 1.7; _root.enemy_initiative_9 = 6; _root.enemy_movepoints_9 = 8; _root.enemy_actpoints_9 = 5; _root.enemy_visibility_radius_9 = 300; _root.enemy_team_9 = 1; _root.enemy_attack_radius_9 = 1.6 * spacing; _root.enemy_dmg_min_9 = 1; _root.enemy_dmg_max_9 = 13; _root.enemy_critical_chance_9 = 50; _root.enemy_critical_mod_9 = 3; _root.enemy_wpn_type_9 = 'spider'; _root.enemy_accuracy_9 = 66; _root.enemy_dmg_resist_9 = 3; _root.enemy_armor_class_9 = 8; _root.enemy_experience_9 = 100; _root.game_paused = 0; _root.quickcombat = 0; _root.docharactermovement = 0; _root.lockcharcontrolz = 1; _root.currentround = 1; _root.game_on_hold = 1; _root.trgtdfrprprts = 0; _root.hprc1 = 1; _root.hprc2 = 0; _root.kursor_timer = 0; _root.globalshowhp = 0; spider_base_dead = 0; _root.playmovesndradnomiser = 30; scorpion_base_dead = 0; _root.enemy_kills = 0; _root.your_kills = 0; _root.yiffyifftimer569311 = 999; _root.yiffyifftimer666777 = 999; _root.yiffyifftimer666777yiff = 999; _root.yiffyifftimergtgsef6 = 9999; _root.free_psi_points = 4; _root.tutorial_step = 0; asasasayiff = 0; yiff555666777timer = 0; yiff555666777timer2 = 0; all_enemies_has_been_exterminated = 0; dosoundrestarttimeryiff = 1; dfgfdgdfgiii8888 = 0; if (!_root.sound_volume) { _root.sound_volume = 70; } if (!_root.music_volume) { _root.music_volume = 30; } if (!_root.music_on) { _root.music_on = 1; } i = 0; while (i < 20) { _root['trigger_' + i] = 0; ++i; } roundprogress_step1 = 'done'; manual_controll_on = 0; activate_CHARmovment_function = 0; _root.mouseoverunit = 0; clicked_target = 0; _root.question_mode = 0; _root.showgrid = 0; item1101 = {}; ti = item1101; ti.id = 1101; ti.kuklaslot = 'head'; ti.name_ = 'Zeleniy Shlem'; ti.armor_class = 1; ti.dmg_resist = 3; ti.stackable = 0; ti.weight = 3; ti.quickslotusable = 0; ti.price = 100; item1201 = {}; ti = item1201; ti.id = 1201; ti.kuklaslot = 'torso'; ti.name_ = 'Leather Jacket'; ti.armor_class = 5; ti.dmg_resist = 10; ti.stackable = 0; ti.weight = 4; ti.quickslotusable = 0; ti.price = 300; item1202 = {}; ti = item1202; ti.id = 1202; ti.kuklaslot = 'torso'; ti.name_ = 'Military Armor'; ti.armor_class = 10; ti.dmg_resist = 30; ti.stackable = 0; ti.weight = 15; ti.quickslotusable = 0; ti.price = 1900; item1203 = {}; ti = item1203; ti.id = 1203; ti.kuklaslot = 'torso'; ti.name_ = 'Military Armor MK2'; ti.armor_class = 15; ti.dmg_resist = 50; ti.stackable = 0; ti.weight = 15; ti.quickslotusable = 0; ti.price = 6000; item1204 = {}; ti = item1204; ti.id = 1204; ti.kuklaslot = 'torso'; ti.name_ = 'Exceptional Leather Jacket'; ti.armor_class = 5; ti.dmg_resist = 20; ti.stackable = 0; ti.weight = 4; ti.quickslotusable = 0; ti.price = 600; item1301 = {}; ti = item1301; ti.id = 1301; ti.kuklaslot = 'gloves'; ti.name_ = 'Half Finger Gloves'; ti.armor_class = 0; ti.dmg_resist = 5; ti.stackable = 0; ti.weight = 0.5; ti.quickslotusable = 0; ti.price = 100; item1302 = {}; ti = item1302; ti.id = 1302; ti.kuklaslot = 'gloves'; ti.name_ = 'Heavy Gloves'; ti.armor_class = 2; ti.dmg_resist = 6; ti.stackable = 0; ti.weight = 0.5; ti.quickslotusable = 0; ti.price = 300; item1401 = {}; ti = item1401; ti.id = 1401; ti.kuklaslot = 'boots'; ti.name_ = 'Leather Boots'; ti.armor_class = 1; ti.dmg_resist = 5; ti.stackable = 0; ti.weight = 5; ti.quickslotusable = 0; ti.price = 200; item1501 = {}; ti = item1501; ti.id = 1501; ti.kuklaslot = 'neck'; ti.name_ = 'Kinetic Shield Generator'; ti.stackable = 0; ti.weight = 5; ti.quickslotusable = 0; ti.price = 1000; item1502 = {}; ti = item1502; ti.id = 1502; ti.kuklaslot = 'neck'; ti.name_ = 'Teeth Mecklace'; ti.stackable = 0; ti.weight = 1; ti.quickslotusable = 0; ti.price = 300; item1601 = {}; ti = item1601; ti.id = 1601; ti.kuklaslot = 'ring'; ti.name_ = 'Bronze Ring'; ti.stackable = 0; ti.weight = 0; ti.quickslotusable = 0; ti.price = 100; item1602 = {}; ti = item1602; ti.id = 1602; ti.kuklaslot = 'ring'; ti.name_ = 'Silver Ring'; ti.stackable = 0; ti.weight = 0; ti.quickslotusable = 0; ti.price = 200; item1603 = {}; ti = item1603; ti.id = 1603; ti.kuklaslot = 'ring'; ti.name_ = 'Gold Ring'; ti.stackable = 0; ti.weight = 0; ti.quickslotusable = 0; ti.price = 400; item2101 = {}; ti = item2101; ti.id = 2101; ti.kuklaslot = 'melee'; ti.name_ = 'Knife'; ti.dmg_min = 15; ti.dmg_max = 20; ti.animation = 5; ti.stackable = 0; ti.weight = 1; ti.quickslotusable = 1; ti.price = 150; item2102 = {}; ti = item2102; ti.id = 2102; ti.kuklaslot = 'melee'; ti.name_ = 'Sledgehammer'; ti.dmg_min = 20; ti.dmg_max = 40; ti.animation = 6; ti.stackable = 0; ti.weight = 20; ti.quickslotusable = 1; ti.price = 200; item2103 = {}; ti = item2103; ti.id = 2103; ti.kuklaslot = 'melee'; ti.name_ = 'Thor'; ti.dmg_min = 25; ti.dmg_max = 45; ti.animation = 6; ti.stackable = 0; ti.weight = 10; ti.quickslotusable = 1; ti.price = 55; item2104 = {}; ti = item2104; ti.id = 2104; ti.kuklaslot = 'melee'; ti.name_ = 'Bloody Axe'; ti.dmg_min = 15; ti.dmg_max = 45; ti.animation = 6; ti.stackable = 0; ti.weight = 10; ti.quickslotusable = 1; ti.price = 200; item2501 = {}; ti = item2501; ti.id = 2501; ti.kuklaslot = 'firearms'; ti.name_ = 'Urban Rat'; ti.dmg_min = 5; ti.dmg_max = 20; ti.range = 6; ti.animation = 3; ti.automatic = 0; ti.stackable = 0; ti.ammo_capacity = 12; ti.ammo_id = 3101; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 3; ti.quickslotusable = 1; ti.price = 300; item2502 = {}; ti = item2502; ti.id = 2502; ti.kuklaslot = 'firearms'; ti.name_ = 'Urban Rat [EX]'; ti.dmg_min = 7; ti.dmg_max = 25; ti.range = 7; ti.animation = 3; ti.automatic = 0; ti.stackable = 0; ti.ammo_capacity = 12; ti.ammo_id = 3101; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 5; ti.quickslotusable = 1; ti.price = 4500; item2505 = {}; ti = item2505; ti.id = 2505; ti.kuklaslot = 'firearms'; ti.name_ = 'Sawed-off shotgun'; ti.dmg_min = 1; ti.dmg_max = 10; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 2; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 4; ti.quickslotusable = 1; ti.price = 500; item2506 = {}; ti = item2506; ti.id = 2506; ti.kuklaslot = 'firearms'; ti.name_ = 'Sawed-off shotgun [EX]'; ti.dmg_min = 2; ti.dmg_max = 12; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 8; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 5; ti.quickslotusable = 1; ti.price = 3000; item2507 = {}; ti = item2507; ti.id = 2507; ti.kuklaslot = 'firearms'; ti.name_ = 'Combat Shotgun'; ti.dmg_min = 2; ti.dmg_max = 12; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 8; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 8; ti.quickslotusable = 1; ti.price = 4000; item2508 = {}; ti = item2508; ti.id = 2508; ti.kuklaslot = 'firearms'; ti.name_ = 'Combat Shotgun [EX]'; ti.dmg_min = 2; ti.dmg_max = 14; ti.range = 5; ti.animation = 7; ti.automatic = -1; ti.stackable = 0; ti.ammo_capacity = 8; ti.ammo_id = 3103; ti.ap_cost_single = 1; ti.ap_cost_aim = -1; ti.ap_cost_burst = 2; ti.weight = 8; ti.quickslotusable = 1; ti.price = 7000; item2511 = {}; ti = item2511; ti.id = 2511; ti.kuklaslot = 'firearms'; ti.name_ = 'FL-26 Riffle'; ti.dmg_min = 5; ti.dmg_max = 15; ti.range = 6; ti.animation = 8; ti.animation1 = 4; ti.automatic = 1; ti.stackable = 0; ti.ammo_capacity = 30; ti.ammo_id = 3102; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 6; ti.quickslotusable = 1; ti.price = 600; item2512 = {}; ti = item2512; ti.id = 2512; ti.kuklaslot = 'firearms'; ti.name_ = 'FL-26 Riffle [EX]'; ti.dmg_min = 5; ti.dmg_max = 25; ti.range = 6; ti.animation = 8; ti.animation1 = 4; ti.automatic = 1; ti.stackable = 0; ti.ammo_capacity = 30; ti.ammo_id = 3102; ti.ap_cost_single = 1; ti.ap_cost_aim = 2; ti.ap_cost_burst = 2; ti.weight = 6; ti.quickslotusable = 1; ti.price = 8000; item2513 = {}; ti = item2513; ti.id = 2513; ti.kuklaslot = 'firearms'; ti.name_ = 'OverKill Gun'; ti.dmg_min = 20; ti.dmg_max = 30; ti.range = 9; ti.animation = 8; ti.animation1 = 4; ti.automatic = 1; ti.stackable = 0; ti.ammo_capacity = 60; ti.ammo_id = 3102; ti.ap_cost_single = 1; ti.ap_cost_aim = 1; ti.ap_cost_burst = 1; ti.weight = 16; ti.quickslotusable = 1; ti.price = 80000; item3101 = {}; ti = item3101; ti.id = 3101; ti.name_ = 'ammo1 pistolet'; ti.ammount = 10; ti.stackable = 1; ti.weight = 0.05; ti.quickslotusable = 0; ti.price = 50; item3102 = {}; ti = item3102; ti.id = 3102; ti.name_ = 'ammo2 pulemet'; ti.ammount = 50; ti.stackable = 1; ti.weight = 0.05; ti.quickslotusable = 0; ti.price = 90; item3103 = {}; ti = item3103; ti.id = 3103; ti.name_ = 'ammo3 shotgun'; ti.ammount = 10; ti.stackable = 1; ti.weight = 0.08; ti.quickslotusable = 0; ti.price = 80; item3501 = {}; ti = item3501; ti.id = 3501; ti.name_ = 'Stimpack'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.1; ti.quickslotusable = 1; ti.price = 100; item3502 = {}; ti = item3502; ti.id = 3502; ti.name_ = 'Lightning'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.1; ti.quickslotusable = 1; ti.price = 800; item3503 = {}; ti = item3503; ti.id = 3503; ti.name_ = 'Flash'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.1; ti.quickslotusable = 1; ti.price = 800; item3504 = {}; ti = item3504; ti.id = 3504; ti.name_ = 'Super Stimpack'; ti.ammount = 1; ti.stackable = 1; ti.weight = 0.5; ti.quickslotusable = 1; ti.price = 1000; item3601 = {}; ti = item3601; ti.id = 3601; ti.name_ = 'Scorpion Tail'; ti.ammount = 1; ti.stackable = 1; ti.weight = 10; ti.quickslotusable = 0; ti.price = 200; item3602 = {}; ti = item3602; ti.id = 3602; ti.name_ = 'Spider Meat'; ti.ammount = 1; ti.stackable = 1; ti.weight = 8; ti.quickslotusable = 0; ti.price = 200; item3603 = {}; ti = item3603; ti.id = 3603; ti.name_ = 'Scorpion King Tail'; ti.ammount = 1; ti.stackable = 1; ti.weight = 15; ti.quickslotusable = 0; ti.price = 600; item3604 = {}; ti = item3604; ti.id = 3604; ti.name_ = 'Giant Spider Egg'; ti.ammount = 1; ti.stackable = 1; ti.weight = 15; ti.quickslotusable = 0; ti.price = 600; item5001 = {}; ti = item5001; ti.id = 5001; ti.name_ = 'PDA#1'; ti.ammount = 1; ti.stackable = 0; ti.weight = 1; ti.quickslotusable = 0; ti.price = 700; unit_3_item_0 = item3602; unit_3_amm_min_0 = 1; unit_3_amm_max_0 = 1; unit_3_chance_0 = 50; unit_4_item_0 = item3602; unit_4_amm_min_0 = 1; unit_4_amm_max_0 = 1; unit_4_chance_0 = 50; unit_5_item_0 = item3602; unit_5_amm_min_0 = 1; unit_5_amm_max_0 = 1; unit_5_chance_0 = 70; unit_6_item_0 = item3602; unit_6_amm_min_0 = 1; unit_6_amm_max_0 = 5; unit_6_chance_0 = 100; unit_6_item_1 = item3604; unit_6_amm_min_1 = 1; unit_6_amm_max_1 = 1; unit_6_chance_1 = 100; unit_7_item_0 = item3601; unit_7_amm_min_0 = 1; unit_7_amm_max_0 = 1; unit_7_chance_0 = 50; unit_8_item_0 = item3603; unit_8_amm_min_0 = 1; unit_8_amm_max_0 = 1; unit_8_chance_0 = 100; unit_1_item_0 = item3601; unit_1_amm_min_0 = 1; unit_1_amm_max_0 = 1; unit_1_chance_0 = 50; unit_510_item_0 = item2511; unit_510_amm_min_0 = 1; unit_510_amm_max_0 = 1; unit_510_chance_0 = 100; unit_510_item_1 = item3102; unit_510_amm_min_1 = 8; unit_510_amm_max_1 = 18; unit_510_chance_1 = 100; unit_510_item_2 = item3501; unit_510_amm_min_2 = 1; unit_510_amm_max_2 = 2; unit_510_chance_2 = 70; unit_510_item_3 = item1301; unit_510_amm_min_3 = 1; unit_510_amm_max_3 = 1; unit_510_chance_3 = 30; unit_510_item_4 = item1401; unit_510_amm_min_4 = 1; unit_510_amm_max_4 = 1; unit_510_chance_4 = 30; unit_510_item_5 = item1601; unit_510_amm_min_5 = 1; unit_510_amm_max_5 = 1; unit_510_chance_5 = 30; unit_510_item_6 = item3502; unit_510_amm_min_6 = 1; unit_510_amm_max_6 = 1; unit_510_chance_6 = 3; unit_510_item_7 = item3503; unit_510_amm_min_7 = 1; unit_510_amm_max_7 = 1; unit_510_chance_7 = 3; unit_510_item_8 = item1204; unit_510_amm_min_8 = 1; unit_510_amm_max_8 = 1; unit_510_chance_8 = 5; unit_510_item_9 = item1602; unit_510_amm_min_9 = 1; unit_510_amm_max_9 = 1; unit_510_chance_9 = 10; unit_510_item_10 = item1603; unit_510_amm_min_10 = 1; unit_510_amm_max_10 = 1; unit_510_chance_10 = 5; unit_510_item_11 = item3504; unit_510_amm_min_11 = 1; unit_510_amm_max_11 = 1; unit_510_chance_11 = 4; unit_510_item_12 = item5001; unit_510_amm_min_12 = 1; unit_510_amm_max_12 = 1; unit_510_chance_12 = 3; unit_510_item_13 = item1501; unit_510_amm_min_13 = 1; unit_510_amm_max_13 = 1; unit_510_chance_13 = 3; unit_510_item_14 = item1502; unit_510_amm_min_14 = 1; unit_510_amm_max_14 = 1; unit_510_chance_14 = 5; unit_500_item_0 = item2501; unit_500_amm_min_0 = 1; unit_500_amm_max_0 = 1; unit_500_chance_0 = 100; unit_500_item_1 = item3101; unit_500_amm_min_1 = 10; unit_500_amm_max_1 = 30; unit_500_chance_1 = 100; unit_500_item_2 = item3501; unit_500_amm_min_2 = 1; unit_500_amm_max_2 = 2; unit_500_chance_2 = 70; unit_500_item_3 = item1301; unit_500_amm_min_3 = 1; unit_500_amm_max_3 = 1; unit_500_chance_3 = 30; unit_500_item_4 = item1401; unit_500_amm_min_4 = 1; unit_500_amm_max_4 = 1; unit_500_chance_4 = 30; unit_500_item_5 = item1601; unit_500_amm_min_5 = 1; unit_500_amm_max_5 = 1; unit_500_chance_5 = 30; unit_500_item_6 = item3502; unit_500_amm_min_6 = 1; unit_500_amm_max_6 = 1; unit_500_chance_6 = 4; unit_500_item_7 = item3503; unit_500_amm_min_7 = 1; unit_500_amm_max_7 = 1; unit_500_chance_7 = 3; unit_500_item_8 = item1204; unit_500_amm_min_8 = 1; unit_500_amm_max_8 = 1; unit_500_chance_8 = 5; unit_500_item_9 = item1602; unit_500_amm_min_9 = 1; unit_500_amm_max_9 = 1; unit_500_chance_9 = 10; unit_500_item_10 = item1603; unit_500_amm_min_10 = 1; unit_500_amm_max_10 = 1; unit_500_chance_10 = 5; unit_500_item_11 = item3504; unit_500_amm_min_11 = 1; unit_500_amm_max_11 = 1; unit_500_chance_11 = 4; unit_520_item_0 = item3103; unit_520_amm_min_0 = 8; unit_520_amm_max_0 = 10; unit_520_chance_0 = 100; unit_520_item_1 = item2505; unit_520_amm_min_1 = 1; unit_520_amm_max_1 = 1; unit_520_chance_1 = 100; unit_520_item_2 = item3501; unit_520_amm_min_2 = 1; unit_520_amm_max_2 = 2; unit_520_chance_2 = 70; unit_520_item_3 = item1301; unit_520_amm_min_3 = 1; unit_520_amm_max_3 = 1; unit_520_chance_3 = 30; unit_520_item_4 = item1401; unit_520_amm_min_4 = 1; unit_520_amm_max_4 = 1; unit_520_chance_4 = 30; unit_520_item_5 = item1601; unit_520_amm_min_5 = 1; unit_520_amm_max_5 = 1; unit_520_chance_5 = 30; unit_520_item_6 = item3502; unit_520_amm_min_6 = 1; unit_520_amm_max_6 = 1; unit_520_chance_6 = 4; unit_520_item_7 = item3503; unit_520_amm_min_7 = 1; unit_520_amm_max_7 = 1; unit_520_chance_7 = 3; unit_520_item_8 = item2506; unit_520_amm_min_8 = 1; unit_520_amm_max_8 = 1; unit_520_chance_8 = 3; unit_520_item_8 = item1204; unit_520_amm_min_8 = 1; unit_520_amm_max_8 = 1; unit_520_chance_8 = 5; unit_520_item_9 = item1602; unit_520_amm_min_9 = 1; unit_520_amm_max_9 = 1; unit_520_chance_9 = 10; unit_520_item_10 = item1603; unit_520_amm_min_10 = 1; unit_520_amm_max_10 = 1; unit_520_chance_10 = 5; unit_520_item_11 = item3504; unit_520_amm_min_11 = 1; unit_520_amm_max_11 = 1; unit_520_chance_11 = 3; unit_520_item_12 = item1501; unit_520_amm_min_12 = 1; unit_520_amm_max_12 = 1; unit_520_chance_12 = 4; unit_520_item_13 = item1502; unit_520_amm_min_13 = 1; unit_520_amm_max_13 = 1; unit_520_chance_13 = 5; unit_530_item_0 = item2102; unit_530_amm_min_0 = 1; unit_530_amm_max_0 = 1; unit_530_chance_0 = 100; unit_530_item_2 = item3501; unit_530_amm_min_2 = 1; unit_530_amm_max_2 = 3; unit_530_chance_2 = 70; unit_530_item_3 = item1301; unit_530_amm_min_3 = 1; unit_530_amm_max_3 = 1; unit_530_chance_3 = 30; unit_530_item_4 = item1401; unit_530_amm_min_4 = 1; unit_530_amm_max_4 = 1; unit_530_chance_4 = 30; unit_530_item_5 = item1601; unit_530_amm_min_5 = 1; unit_530_amm_max_5 = 1; unit_530_chance_5 = 30; unit_530_item_6 = item3502; unit_530_amm_min_6 = 1; unit_530_amm_max_6 = 1; unit_530_chance_6 = 3; unit_530_item_7 = item3503; unit_530_amm_min_7 = 1; unit_530_amm_max_7 = 1; unit_530_chance_7 = 2; unit_530_item_8 = item3504; unit_530_amm_min_8 = 1; unit_530_amm_max_8 = 1; unit_530_chance_8 = 3; unit_530_item_9 = item2104; unit_530_amm_min_9 = 1; unit_530_amm_max_9 = 1; unit_530_chance_9 = 5; unit_530_item_10 = item1502; unit_530_amm_min_10 = 1; unit_530_amm_max_10 = 1; unit_530_chance_10 = 8; unit_540_item_0 = item2101; unit_540_amm_min_0 = 1; unit_540_amm_max_0 = 1; unit_540_chance_0 = 100; unit_540_item_2 = item3501; unit_540_amm_min_2 = 1; unit_540_amm_max_2 = 2; unit_540_chance_2 = 70; unit_540_item_3 = item1301; unit_540_amm_min_3 = 1; unit_540_amm_max_3 = 1; unit_540_chance_3 = 30; unit_540_item_4 = item1401; unit_540_amm_min_4 = 1; unit_540_amm_max_4 = 1; unit_540_chance_4 = 30; unit_540_item_5 = item1601; unit_540_amm_min_5 = 1; unit_540_amm_max_5 = 1; unit_540_chance_5 = 30; unit_540_item_6 = item3502; unit_540_amm_min_6 = 1; unit_540_amm_max_6 = 1; unit_540_chance_6 = 3; unit_540_item_7 = item3503; unit_540_amm_min_7 = 1; unit_540_amm_max_7 = 1; unit_540_chance_7 = 3; unit_99901_item_0 = item2101; unit_99901_amm_min_0 = 1; unit_99901_amm_max_0 = 1; unit_99901_chance_0 = 100; unit_99901_item_2 = item2501; unit_99901_amm_min_2 = 1; unit_99901_amm_max_2 = 1; unit_99901_chance_2 = 100; unit_99901_item_3 = item3101; unit_99901_amm_min_3 = 14; unit_99901_amm_max_3 = 15; unit_99901_chance_3 = 100; unit_99901_item_1 = item3501; unit_99901_amm_min_1 = 5; unit_99901_amm_max_1 = 6; unit_99901_chance_1 = 100; unit_99902_item_0 = item3101; unit_99902_amm_min_0 = 14; unit_99902_amm_max_0 = 15; unit_99902_chance_0 = 100; unit_99903_item_0 = item2505; unit_99903_amm_min_0 = 1; unit_99903_amm_max_0 = 1; unit_99903_chance_0 = 100; unit_99904_item_0 = item3101; unit_99904_amm_min_0 = 9; unit_99904_amm_max_0 = 10; unit_99904_chance_0 = 100; unit_99905_item_0 = item3101; unit_99905_amm_min_0 = 25; unit_99905_amm_max_0 = 30; unit_99905_chance_0 = 100; unit_99905_item_1 = item3103; unit_99905_amm_min_1 = 4; unit_99905_amm_max_1 = 5; unit_99905_chance_1 = 100; unit_99905_item_2 = item3501; unit_99905_amm_min_2 = 4; unit_99905_amm_max_2 = 5; unit_99905_chance_2 = 100; unit_99905_item_3 = item2505; unit_99905_amm_min_3 = 1; unit_99905_amm_max_3 = 1; unit_99905_chance_3 = 100; unit_99906_item_0 = item2103; unit_99906_amm_min_0 = 1; unit_99906_amm_max_0 = 1; unit_99906_chance_0 = 100; _root.overallsound = new Sound(); _root.createEmptyMovieClip('sound_shell', _root.sound_shell_depth); trs = sound_shell; _root.createEmptyMovieClip('music_shell', _root.sound_shell_depth + 1); trs.volumesnd = new Sound(); trs.critical_scorpion = new Sound(); trs.critical_scorpion.attachSound('critical_scorpion'); trs.critical_spider = new Sound(); trs.critical_spider.attachSound('critical_spider'); trs.miss = new Sound(); trs.miss.attachSound('miss'); trs.scorpion_bite = new Sound(); trs.scorpion_bite.attachSound('scorpion_bite'); trs.spider_bite_1 = new Sound(); trs.spider_bite_1.attachSound('spider_bite_1'); trs.spider_bite_2 = new Sound(); trs.spider_bite_2.attachSound('spider_bite_2'); trs.scorp_die_1 = new Sound(); trs.scorp_die_1.attachSound('scorp_die_1'); trs.scorp_die_2 = new Sound(); trs.scorp_die_2.attachSound('scorp_die_2'); trs.scorp_die_3 = new Sound(); trs.scorp_die_3.attachSound('scorp_die_3'); trs.scorp_die_4 = new Sound(); trs.scorp_die_4.attachSound('scorp_die_4'); trs.scorp_die_5 = new Sound(); trs.scorp_die_5.attachSound('scorp_die_5'); trs.scorp_die_6 = new Sound(); trs.scorp_die_6.attachSound('scorp_die_6'); trs.spider_die_1 = new Sound(); trs.spider_die_1.attachSound('spider_die_1'); trs.spider_die_2 = new Sound(); trs.spider_die_2.attachSound('spider_die_2'); trs.spider_die_3 = new Sound(); trs.spider_die_3.attachSound('spider_die_3'); trs.spider_die_4 = new Sound(); trs.spider_die_4.attachSound('spider_die_4'); trs.spider_die_5 = new Sound(); trs.spider_die_5.attachSound('spider_die_5'); trs.spider_die_6 = new Sound(); trs.spider_die_6.attachSound('spider_die_6'); trs.scorpion_hurt_1 = new Sound(); trs.scorpion_hurt_1.attachSound('scorpion_hurt_1'); trs.scorpion_hurt_2 = new Sound(); trs.scorpion_hurt_2.attachSound('scorpion_hurt_2'); trs.scorpion_hurt_3 = new Sound(); trs.scorpion_hurt_3.attachSound('scorpion_hurt_3'); trs.scorpion_hurt_4 = new Sound(); trs.scorpion_hurt_4.attachSound('scorpion_hurt_4'); trs.spider_hurt_1 = new Sound(); trs.spider_hurt_1.attachSound('spider_hurt_1'); trs.spider_hurt_2 = new Sound(); trs.spider_hurt_2.attachSound('spider_hurt_2'); trs.spider_hurt_3 = new Sound(); trs.spider_hurt_3.attachSound('spider_hurt_3'); trs.spider_hurt_4 = new Sound(); trs.spider_hurt_4.attachSound('spider_hurt_4'); trs.spider_move = new Sound(); trs.spider_move.attachSound('spider_move'); trs.scorpion_move = new Sound(); trs.scorpion_move.attachSound('scorpion_move'); trs.big_goo_1 = new Sound(); trs.big_goo_1.attachSound('big_goo_1'); trs.big_goo_2 = new Sound(); trs.big_goo_2.attachSound('big_goo_2'); trs.small_goo_1 = new Sound(); trs.small_goo_1.attachSound('small_goo_1'); trs.small_goo_2 = new Sound(); trs.small_goo_2.attachSound('small_goo_2'); trs.scorp_ranged_attack = new Sound(); trs.scorp_ranged_attack.attachSound('scorp_ranged_attack'); trs.spider_ranged_attack = new Sound(); trs.spider_ranged_attack.attachSound('spider_ranged_attack'); trs.goo_sound = new Sound(); trs.goo_sound.attachSound('goo'); trs.queendeath_sound = new Sound(); trs.queendeath_sound.attachSound('queendeath'); trs.gun_shot_1 = new Sound(); trs.gun_shot_1.attachSound('gun_shot_1'); trs.gun_shot_5 = new Sound(); trs.gun_shot_5.attachSound('gun_shot_5'); trs.gun_shot_11_1 = new Sound(); trs.gun_shot_11_1.attachSound('gun_shot_11_1'); trs.gun_shot_11_2 = new Sound(); trs.gun_shot_11_2.attachSound('gun_shot_11_2'); trs.gun_shot_11_3 = new Sound(); trs.gun_shot_11_3.attachSound('gun_shot_11_3'); trs.melee_wpn_hit_1 = new Sound(); trs.melee_wpn_hit_1.attachSound('melee_wpn_hit_1'); trs.melee_wpn_1_1 = new Sound(); trs.melee_wpn_1_1.attachSound('melee_wpn_1_1'); trs.melee_wpn_1_2 = new Sound(); trs.melee_wpn_1_2.attachSound('melee_wpn_1_2'); trs.blunt_wpn_vzmah = new Sound(); trs.blunt_wpn_vzmah.attachSound('blunt_wpn_vzmah'); trs.blunt_wpn_1 = new Sound(); trs.blunt_wpn_1.attachSound('blunt_wpn_1'); trs.blunt_wpn_2 = new Sound(); trs.blunt_wpn_2.attachSound('blunt_wpn_2'); trs.blunt_wpn_3 = new Sound(); trs.blunt_wpn_3.attachSound('blunt_wpn_3'); trs.human_die_1 = new Sound(); trs.human_die_1.attachSound('human_die_1'); trs.human_die_2 = new Sound(); trs.human_die_2.attachSound('human_die_2'); trs.human_die_3 = new Sound(); trs.human_die_3.attachSound('human_die_3'); trs.reloadwav = new Sound(); trs.reloadwav.attachSound('reloadwav'); trs.meleeinstall = new Sound(); trs.meleeinstall.attachSound('meleeinstall'); trs.passwav = new Sound(); trs.passwav.attachSound('passwav'); trs.pickupwav = new Sound(); trs.pickupwav.attachSound('pickupwav'); trs.ringwav = new Sound(); trs.ringwav.attachSound('ringwav'); trs.stimwav = new Sound(); trs.stimwav.attachSound('stimwav'); THEmusic = new Sound(music_shell); THEmusic.attachSound('music'); trs.cashreg = new Sound(); trs.cashreg.attachSound('cashreg'); trs.tudut = new Sound(); trs.tudut.attachSound('tudut'); if (_root.loadmap_id eq 2) { row1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]; row2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0]; row3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row4 = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; row5 = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1]; row6 = [0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1]; row7 = [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1]; row8 = [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row9 = [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]; row10 = [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]; row11 = [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]; row12 = [0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]; row13 = [0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]; row14 = [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1]; row15 = [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; row16 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1]; row17 = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1]; row18 = [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]; row19 = [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1]; row20 = [1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row21 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; } if (_root.loadmap_id eq 11) { row1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]; row2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0]; row3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; row5 = [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, 1, 1]; row6 = [0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row7 = [0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row8 = [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row9 = [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]; row10 = [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]; row11 = [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1]; row12 = [1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1]; row13 = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1]; row14 = [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1]; row15 = [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row16 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; row17 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]; row18 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0]; row19 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0]; row20 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row21 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; } if (_root.loadmap_id eq 12) { row1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0]; row3 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0]; row4 = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0]; row5 = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row6 = [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]; row7 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0]; row8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0]; row9 = [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0]; row10 = [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]; row11 = [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0]; row12 = [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0]; row13 = [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0]; row14 = [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0]; row15 = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0]; row16 = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0]; row17 = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; row18 = [0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0]; row19 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0]; row20 = [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]; row21 = [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]; } if (_root.loadmap_id eq 13) { row1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0]; row3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0]; row4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0]; row5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0]; row6 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0]; row7 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0]; row8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0]; row9 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0]; row10 = [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]; row11 = [1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0]; row12 = [0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0]; row13 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0]; row14 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]; row15 = [0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row16 = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0]; row17 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row18 = [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; row19 = [0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row20 = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row21 = [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]; } if (_root.loadmap_id eq 14) { row1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row2 = [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0]; row3 = [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0]; row4 = [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]; row5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row6 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row7 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0]; row8 = [0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0]; row9 = [0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0]; row10 = [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, 1, 1, 0]; row11 = [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]; row12 = [0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row13 = [0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0]; row14 = [1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0]; row15 = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row16 = [1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; row17 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0]; row18 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0]; row19 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0]; row20 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0]; row21 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; } if (_root.loadmap_id eq 100) { row1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; row2 = [1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; row3 = [1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0]; row4 = [1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0]; row5 = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; row6 = [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; row7 = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0]; row8 = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0]; row9 = [1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0]; row10 = [1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]; row11 = [1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]; row12 = [1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0]; row13 = [1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0]; row14 = [1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0]; row15 = [1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0]; row16 = [1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0]; row17 = [1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; row18 = [1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row19 = [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]; row20 = [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1]; row21 = [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1]; } recalculate_map_arrays(); var map_enemy_array_1 = new Array(); _root.enemy_ammount_map_1 = 100; _root.enemy_ammount_map = _root.enemy_ammount_map_1; var base_array_1 = new Array(); i = 1; while (i <= 8) { j = 15; while (j <= 21) { base_array_1.push([i, j]); ++j; } ++i; } var base_array_2 = new Array(); i = 21; while (i <= 28) { j = 1; while (j <= 7) { base_array_2.push([i, j]); ++j; } ++i; } spawn_points_easy_bonus_map_5 = 3; spawn_points_max_map_5 = 45; spawn_points_max2_map_5 = 45; if (_root.hardcore_mode eq 1) { max_control_2_map_5 = 30; } else { max_control_2_map_5 = 25; } starting_int_map_5 = 20; int_limit_map_5 = 35; base_1_hp_map_5 = 1000; base_2_hp_map_5 = 2000; var startingEnemies_forMap_1 = new Array(); _root.str_base_id = 91; _root.per_base_id = 92; _root.end_base_id = 93; _root.cha_base_id = 94; _root.int_base_id = 95; _root.agi_base_id = 96; _root.luk_base_id = 97; _root.str_id = 101; _root.per_id = 102; _root.end_id = 103; _root.cha_id = 104; _root.int_id = 105; _root.agi_id = 106; _root.luk_id = 107; _root.experience_id = 10; _root.lvl_id = 11; _root.max_weight_id = 12; _root.skill_points_id = 13; _root.stat_points_id = 14; _root.perk_points_id = 15; _root.cash_id = 16; _root.kills_id = 17; _root.firearms_base_id = 201; _root.firearms_id = 202; _root.melee_base_id = 203; _root.melee_id = 204; _root.energy_base_id = 205; _root.energy_id = 206; _root.merchant_base_id = 207; _root.merchant_id = 208; _root.lockpick_base_id = 209; _root.lockpick_id = 210; _root.outdoor_base_id = 211; _root.outdoor_id = 212; _root.medic_base_id = 213; _root.medic_id = 214; _root.science_base_id = 215; _root.science_id = 216; _root.day_id = 250; _root.mission_1_status_id = 251; _root.mission_2_status_id = 252; _root.mission_3_status_id = 253; _root.mission_4_status_id = 254; _root.mission_5_status_id = 255; _root.mission_6_status_id = 256; _root.character_arr = new Array(); _root.character_arr[cash_id] = 0; _root.character_arr[kills_id] = 0; _root.character_arr[str_base_id] = 5; _root.character_arr[per_base_id] = 5; _root.character_arr[end_base_id] = 5; _root.character_arr[cha_base_id] = 6; _root.character_arr[int_base_id] = 7; _root.character_arr[agi_base_id] = 5; _root.character_arr[luk_base_id] = 5; _root.character_arr[firearms_base_id] = 50 + random(5); _root.character_arr[melee_base_id] = 60 + random(5); _root.character_arr[energy_base_id] = 5 + random(10); _root.character_arr[merchant_base_id] = 45 + random(10); _root.character_arr[lockpick_base_id] = 30 + random(10); _root.character_arr[outdoor_base_id] = 30 + random(10); _root.character_arr[medic_base_id] = 30 + random(10); _root.character_arr[science_base_id] = 10 + random(10); _root.character_arr[experience_id] = 0; _root.character_arr[lvl_id] = 1; _root.character_arr[skill_points_id] = 10; _root.character_arr[stat_points_id] = 2; _root.character_arr[perk_points_id] = 0; _root.character_arr[day_id] = 1; _root.character_arr[mission_1_status_id] = 0; _root.character_arr[mission_2_status_id] = 0; _root.character_arr[mission_3_status_id] = 0; _root.character_arr[mission_4_status_id] = 0; _root.character_arr[mission_5_status_id] = 0; _root.inventory_shell = {}; inv = _root.inventory_shell; inv.general_arr = new Array(); inv.misc_arr = new Array(); inv.special_arr = new Array(); i = 0; while (i <= 44) { inv.general_arr[i] = 'none'; inv.misc_arr[i] = 'none'; inv.special_arr[i] = 'none'; ++i; } i = 0; while (i <= 44) { _root.inventory_menu['inv_slot_' + i].id = i; ++i; } if (_root.do_load eq 1) { saveCHaracter('load'); } create_yiffingField(); buildGrid(); initBackground(); astar.initialize(); initialize_walls(); initialiseInventory(); onMouseDown = function () { if (_root.do_peace_walking != 1 and _root.mouseoverSUMKA != 1 and _root.peaqce_mode eq 1) { _root.wehaveclickedsumka = 'none'; } if (activate_CHARmovment_function != 1 and _root.mouseoverSUMKA != 1) { _root.wehaveclickedsumka = 'none'; } trace(_xmouse + ' ' + _ymouse); Click1CellTEST(); _root.bottommenu.showinfo = ''; _root.inventoryshowyifftimerbbbbb = 999999; trace('mouseclick'); if (!_root.tutorial_menu and !_root.character_sheet and !_root.inventory_pickloot and !_root.logscreen and !_root.aimed_shot_menu and current_participant.en_id eq 999 and _root.inventory_opened != 1 and activate_CHARmovment_function != 1 and activate_CHARmovment_function2 != 1 and _root.dorangedattacksequence != 1 and _root.domeleeattacksequence != 1) { trace('attack click worked'); if (_root.peaqce_mode eq 1) { bottommenu.saveButtonandQueue.play(); ClickCellMakePath_peaceMode(); } else { if (_root.ranged_attack_pricel eq 1 and _root.firearm_clickmode != 2) { if (_root.mouseoverunit != 0 and _root.mouseoverunit != _root.character_unuit) { if (_root.dorangedattacksequence != 1 and _root.start_ranged_attack_delay_timer != 1) { character_AP_subtract(); dontgetnewcoordinates = 0; _root.start_ranged_attack_delay_timer = 1; _root.dorangedattacksequence = 1; _root.ras_step_1 = 'go'; } } else { if (_xmouse > 65 and _xmouse < 282 and _ymouse > 548 and _ymouse < 598) { } else { _root.ranged_attack_pricel = 0; } } } else { if (_root.ranged_attack_pricel eq 1 and _root.firearm_clickmode eq 2) { if (_xmouse > 65 and _xmouse < 282 and _ymouse > 548 and _ymouse < 598) { } else { aimedShotSelectTarget(); } } else { if (_root.melee_attack_pricel eq 1) { if (_xmouse > 65 and _xmouse < 282 and _ymouse > 548 and _ymouse < 598) { } else { _root.melee_attack_pricel = 0; } if (_root.mouseoverunit != 0 and _root.mouseoverunit != _root.character_unuit) { if (_root.domeleeattacksequence != 1 and _root.start_melee_attack_delay_timer != 1) { _root.start_melee_attack_delay_timer = 1; _root.domeleeattacksequence = 1; _root.mas_step_1 = 'go'; } } } else { if (manual_controll_on eq 1) { if (!_root.main_menu and !_root.intel_info and !_root.unit_settings and !_root.upgradesMenu and !_root.spawnMenu) { if (_root.question_mode != 1) { ClickCellMakePath(); } } } } } } } } if (_root.ammountDispenser) { hittest665 = _root.ammountDispenser.hitTest(_root._xmouse, _root._ymouse, true); trace(hittest665); if (hittest665 eq false) { removeMovieClip(_root.ammountDispenser); } } }; onMouseUp = function () {}; _root.attachMovie('kursor', 'kursor', _root.kursor_depth); startDrag('_root.kursor', true); Mouse.hide(); onEnterFrame = function () { if (_root.character_unuit.actpoints < 1 and _root.character_unuit.movepoints < 1 and _root.currentround > 1) { if (current_participant.en_id eq 999) { if (!_root.inventory_menu and manual_controll_on eq 1 and activate_CHARmovment_function != 1 and activate_CHARmovment_function2 != 1) { if (_root.dorangedattacksequence != 1 and _root.domeleeattacksequence != 1) { ++zuzukatimerukasukaebuka; if (zuzukatimerukasukaebuka > 5) { zuzukatimerukasukaebuka = 0; if (_root.space_is_down != 1) { _root.space_is_down = 1; endturnCHeck('true'); } } } } } } else { zuzukatimerukasukaebuka = 0; } _root.kursor._x = _xmouse; _root.kursor._y = _ymouse; if (_root.peaqce_mode eq 1) { _root.character_unuit.actpoints = _root.character_unuit.actpoints_max; } if (_root.start_ranged_attack_delay_timer eq 1) { ++yiff555666777timer; if (yiff555666777timer > 45) { _root.start_ranged_attack_delay_timer = 0; } } else { yiff555666777timer = 0; } if (_root.start_melee_attack_delay_timer eq 1) { ++yiff555666777timer2; if (yiff555666777timer2 > 45) { _root.start_melee_attack_delay_timer = 0; } } else { yiff555666777timer2 = 0; } if (current_participant.en_id != 999) { _root.melee_attack_pricel = 0; _root.ranged_attack_pricel = 0; } if (_root.character_unuit.actpoints <= 0) { _root.character_unuit.actpoints = 0; _root.melee_attack_pricel = 0; _root.ranged_attack_pricel = 0; } playTimeMonitor(); logIntegrity(); death_integrity(); shop_description_integrity(); characterIntegrity(); shootingIntegrity(); charSHeetIntegrity(); inventoryIntegrity(); inventorySLotsIntegrity(); inventoryPickloot_integrity(); loot_meshki_integrity(); hitChance_calculation(); encumberanceCheck(); if (Key.isDown(32)) { if (manual_controll_on eq 1 and activate_CHARmovment_function != 1 and activate_CHARmovment_function2 != 1 and current_participant.en_id eq 999) { if (_root.space_is_down != 1) { _root.space_is_down = 1; endturnCHeck('true'); } } } else { _root.space_is_down = 0; } if (_root.dorangedattacksequence eq 1) { rangedAttackSequence(); } if (_root.domeleeattacksequence eq 1) { meleeAttackSequence(); } if (_root.do_peace_walking eq 1) { CHAR_movement_peace(); } if (activate_CHARmovment_function eq 1) { CHAR_movement(); } if (activate_CHARmovment_function2 eq 1) { CHAR_movement2enemy(); } enemy_ammount = enemy_ammount_map_1; sndAndMusicVolume(); ammountDispenserIntegrity(); yiffIntegrity(); miscMenuIntegrity(); primaryMenusIntegrity(); unPropMenuIntegrity(); enemyIntegrity(); aimedSHotMenu_Integrity(); if (_root.game_paused != 1 and manual_controll_on != 1) { roundProgressing_integrity(); } _root.kursor_timer += 0.03333333333333333; if (_root.kursor_timer > 1) { _root.kursor_timer = 0; Mouse.hide(); } if (_root.game_on_hold eq 1 and _root.dononstop eq 1) { _root.roundprogress_step1 = 'go'; if (_root.game_paused eq 1) { _root.quickcombat = 0; _root.game_paused = 0; } } checkIfNoEnemiesEndRound(); }; mapid = _root.loadmap_id; starting_enemies_number = _root['startingEnemies_forMap_' + mapid].length; _root.roundprogress_step1 = 'go'; _root.game_on_hold = 0; today = _root.character_arr[day_id]; trace('today ' + today); if (today eq 1) { if (_root.loadmap_id eq 2) { if (_root.character_arr[mission_1_status_id] != 1) { _root.enemy_hp_7 = 15; _root.enemy_dmg_min_7 = 5; _root.enemy_dmg_max_7 = 10; _root.enemy_critical_chance_7 = 1; Spawn_units(999, 0, 3, 19, 1); Spawn_units(7, 0, 27, 2, 5); Spawn_units(7, 0, 2, 2, 5); createLootArrayForThisUnit(99901, 99901); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99901', 99901); trgt666667771234 = _root.yiff.loot_shell.lootbox99901; trgt666667771234._x = _root.yiff.cell7_19._x; trgt666667771234._y = _root.yiff.cell7_19._y; trgt666667771234.serialnum = 99901; } else { Spawn_units(999, 0, 14, 12, 1); createLootArrayForThisUnit(99904, 99904); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99904', 99904); trgt666667771234 = _root.yiff.loot_shell.lootbox99904; trgt666667771234.serialnum = 99904; asdasdasjjj = random(3); if (asdasdasjjj eq 0) { trgt666667771234._x = _root.yiff.cell3_18._x; trgt666667771234._y = _root.yiff.cell3_18._y; } else { if (asdasdasjjj eq 1) { trgt666667771234._x = _root.yiff.cell15_15._x; trgt666667771234._y = _root.yiff.cell15_15._y; } else { if (asdasdasjjj eq 2) { trgt666667771234._x = _root.yiff.cell5_3._x; trgt666667771234._y = _root.yiff.cell5_3._y; } } } asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(7, 0, 5, 2, 5); } else { if (asdasdasjjj eq 1) { Spawn_units(7, 0, 7, 13, 5); } else { if (asdasdasjjj eq 2) { Spawn_units(7, 0, 23, 8, 5); } } } asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(7, 0, 7, 19, 5); } else { if (asdasdasjjj eq 1) { Spawn_units(7, 0, 23, 19, 5); } else { if (asdasdasjjj eq 2) { Spawn_units(7, 0, 9, 10, 5); } } } } } else { if (_root.loadmap_id eq 11) { if (_root.character_arr[mission_2_status_id] != 1) { Spawn_units(999, 0, 3, 19, 1); Spawn_units(500, 0, 14, 12, 2); Spawn_units(530, 0, 13, 12, 2); Spawn_units(4, 0, 15, 14, 3); Spawn_units(4, 0, 22, 3, 3); Spawn_units(7, 0, 22, 19, 4); createLootArrayForThisUnit(99902, 99902); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99902', 99902); trgt666667771234 = _root.yiff.loot_shell.lootbox99902; trgt666667771234._x = _root.yiff.cell12_18._x; trgt666667771234._y = _root.yiff.cell12_18._y; trgt666667771234.serialnum = 99902; createLootArrayForThisUnit(99903, 99903); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99903', 99903); trgt666667771234 = _root.yiff.loot_shell.lootbox99903; trgt666667771234._x = _root.yiff.cell1_7._x; trgt666667771234._y = _root.yiff.cell1_7._y; trgt666667771234.serialnum = 99903; } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 3, 19, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 5, 11, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 2, 2, 1); } } } asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(4, 0, 7, 11, 3); } else { if (asdasdasjjj eq 1) { Spawn_units(4, 0, 4, 6, 3); } else { if (asdasdasjjj eq 2) { Spawn_units(4, 0, 5, 17, 3); } } } asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(7, 0, 20, 12, 4); } else { if (asdasdasjjj eq 1) { Spawn_units(7, 0, 6, 14, 4); } else { if (asdasdasjjj eq 2) { Spawn_units(7, 0, 7, 9, 4); } } } createLootArrayForThisUnit(99904, 99904); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99904', 99904); trgt666667771234 = _root.yiff.loot_shell.lootbox99904; trgt666667771234.serialnum = 99904; asdasdasjjj = random(3); if (asdasdasjjj eq 0) { trgt666667771234._x = _root.yiff.cell9_20._x; trgt666667771234._y = _root.yiff.cell9_20._y; } else { if (asdasdasjjj eq 1) { trgt666667771234._x = _root.yiff.cell14_10._x; trgt666667771234._y = _root.yiff.cell14_10._y; } else { if (asdasdasjjj eq 2) { trgt666667771234._x = _root.yiff.cell24_11._x; trgt666667771234._y = _root.yiff.cell24_11._y; } } } } } else { if (_root.loadmap_id eq 12) { if (_root.character_arr[mission_3_status_id] != 1) { Spawn_units(999, 0, 14, 11, 1); Spawn_units(500, 0, 12, 11, 1); Spawn_units(530, 0, 14, 9, 1); Spawn_units(530, 0, 16, 12, 1); _root.enemy_hp_4 = 40; Spawn_units(4, 0, 24, 16, 2); Spawn_units(4, 0, 25, 19, 2); Spawn_units(4, 0, 21, 20, 2); Spawn_units(7, 0, 2, 10, 3); Spawn_units(7, 0, 3, 14, 3); Spawn_units(7, 0, 1, 18, 3); createLootArrayForThisUnit(99905, 99905); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99905', 99905); trgt666667771234 = _root.yiff.loot_shell.lootbox99905; trgt666667771234._x = _root.yiff.cell14_12._x; trgt666667771234._y = _root.yiff.cell14_12._y; trgt666667771234.serialnum = 99905; } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 14, 11, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 24, 19, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 4, 18, 1); } } } spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); } } } } } if (today eq 2) { if (_root.loadmap_id eq 2) { if (_root.character_arr[mission_1_status_id] != 1) { Spawn_units(999, 0, 23, 19, 1); Spawn_units(7, 0, 11, 10, 5); Spawn_units(7, 0, 16, 8, 5); Spawn_units(7, 0, 12, 11, 5); Spawn_units(7, 0, 14, 14, 5); Spawn_units(7, 0, 13, 12, 5); Spawn_units(7, 0, 8, 12, 5); Spawn_units(520, 0, 10, 17, 6); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 17, 18, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 14, 15, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 20, 10, 1); } } } spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); } } else { if (_root.loadmap_id eq 11) { if (_root.character_arr[mission_2_status_id] != 1) { Spawn_units(999, 0, 18, 16, 1); _root.enemy_hp_7 = 50; _root.enemy_accuracy_7 = 70; Spawn_units(4, 0, 6, 16, 3); Spawn_units(4, 0, 6, 17, 3); Spawn_units(4, 0, 10, 17, 3); Spawn_units(4, 0, 9, 15, 3); Spawn_units(7, 0, 20, 9, 4); Spawn_units(7, 0, 13, 8, 4); Spawn_units(7, 0, 18, 9, 4); Spawn_units(7, 0, 15, 6, 4); Spawn_units(7, 0, 16, 6, 4); Spawn_units(7, 0, 19, 7, 4); Spawn_units(7, 0, 25, 20, 4); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 3, 19, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 5, 11, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 2, 2, 1); } } } spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); } } else { if (_root.loadmap_id eq 12) { if (_root.character_arr[mission_3_status_id] != 1) { _root.enemy_actpoints_500 = 3; _root.enemy_actpoints_520 = 2; _root.enemy_hp_4 = 45; Spawn_units(999, 0, 16, 2, 1); Spawn_units(520, 0, 13, 10, 3); Spawn_units(500, 0, 14, 11, 3); Spawn_units(530, 0, 7, 12, 3); Spawn_units(530, 0, 8, 12, 3); Spawn_units(4, 0, 4, 5, 2); Spawn_units(4, 0, 6, 7, 2); Spawn_units(4, 0, 7, 8, 2); Spawn_units(4, 0, 25, 18, 2); Spawn_units(4, 0, 17, 7, 2); Spawn_units(7, 0, 11, 20, 4); Spawn_units(7, 0, 13, 20, 4); Spawn_units(7, 0, 24, 18, 4); Spawn_units(7, 0, 25, 17, 4); Spawn_units(7, 0, 26, 16, 4); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 14, 11, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 24, 19, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 4, 18, 1); } } } spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); } } } } } if (today eq 3) { if (_root.loadmap_id eq 2) { if (_root.character_arr[mission_1_status_id] != 1) { Spawn_units(999, 0, 17, 13, 1); Spawn_units(4, 0, 20, 12, 2); Spawn_units(4, 0, 20, 13, 2); _root.enemy_hp_1 = 30; Spawn_units(7, 0, 11, 10, 5); Spawn_units(7, 0, 16, 8, 5); Spawn_units(1, 0, 12, 11, 5); Spawn_units(1, 0, 14, 14, 5); Spawn_units(7, 0, 13, 12, 5); Spawn_units(7, 0, 8, 12, 5); _root.enemy_actpoints_530 = 2; _root.enemy_actpoints_540 = 3; Spawn_units(540, 0, 10, 8, 6); Spawn_units(530, 0, 12, 16, 6); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 17, 18, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 14, 15, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 20, 10, 1); } } } spawn_units_at_random_location(540, 7); spawn_units_at_random_location(500, 8); spawn_units_at_random_location(531, 8); spawn_units_at_random_location(501, 8); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(1, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); } } else { if (_root.loadmap_id eq 11) { if (_root.character_arr[mission_2_status_id] != 1) { Spawn_units(999, 0, 13, 12, 1); _root.enemy_hp_7 = 50; _root.enemy_accuracy_7 = 70; Spawn_units(4, 0, 6, 16, 3); Spawn_units(4, 0, 6, 17, 3); Spawn_units(4, 0, 10, 17, 3); Spawn_units(4, 0, 9, 15, 3); Spawn_units(1, 0, 15, 18, 4); Spawn_units(1, 0, 6, 11, 4); Spawn_units(1, 0, 4, 20, 4); Spawn_units(7, 0, 15, 8, 4); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 3, 19, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 5, 11, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 2, 2, 1); } } } _root.enemy_actpoints_531 = 2; _root.enemy_actpoints_530 = 2; spawn_units_at_random_location(531, 8); spawn_units_at_random_location(531, 8); spawn_units_at_random_location(530, 7); spawn_units_at_random_location(530, 7); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); } } else { if (_root.loadmap_id eq 12) { if (_root.character_arr[mission_3_status_id] != 1) { Spawn_units(999, 0, 16, 2, 1); Spawn_units(4, 0, 22, 1, 4); Spawn_units(4, 0, 23, 1, 4); Spawn_units(4, 0, 26, 3, 4); Spawn_units(1, 0, 2, 11, 5); Spawn_units(1, 0, 3, 13, 5); Spawn_units(1, 0, 4, 14, 5); Spawn_units(510, 0, 9, 9, 6); Spawn_units(520, 0, 11, 10, 6); Spawn_units(520, 0, 13, 10, 6); Spawn_units(520, 0, 15, 10, 6); Spawn_units(530, 0, 13, 12, 6); Spawn_units(530, 0, 15, 12, 6); Spawn_units(511, 0, 18, 14, 8); Spawn_units(521, 0, 13, 15, 8); Spawn_units(521, 0, 15, 15, 8); Spawn_units(521, 0, 17, 15, 8); Spawn_units(531, 0, 14, 14, 8); Spawn_units(531, 0, 15, 14, 8); } else { Spawn_units(999, 0, 14, 12, 1); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); _root.enemy_actpoints_501 = 2; _root.enemy_actpoints_500 = 2; spawn_units_at_random_location(500, 5); spawn_units_at_random_location(500, 5); spawn_units_at_random_location(501, 6); spawn_units_at_random_location(501, 6); } } else { if (_root.loadmap_id eq 14) { if (_root.character_arr[mission_5_status_id] != 1) { _root.enemy_actpoints_500 = 2; _root.enemy_actpoints_540 = 3; _root.enemy_actpoints_520 = 2; _root.enemy_actpoints_530 = 2; Spawn_units(999, 0, 14, 10, 1); Spawn_units(530, 0, 11, 9, 1); Spawn_units(530, 0, 11, 12, 1); Spawn_units(530, 0, 11, 13, 1); Spawn_units(530, 0, 10, 12, 1); Spawn_units(540, 0, 17, 9, 1); Spawn_units(540, 0, 17, 12, 1); Spawn_units(500, 0, 13, 8, 1); Spawn_units(520, 0, 13, 12, 1); Spawn_units(510, 0, 15, 10, 1); Spawn_units(4, 0, 4, 5, 2); Spawn_units(4, 0, 3, 3, 2); Spawn_units(4, 0, 9, 2, 2); Spawn_units(4, 0, 11, 4, 2); Spawn_units(4, 0, 17, 2, 2); Spawn_units(4, 0, 4, 19, 2); Spawn_units(4, 0, 8, 20, 2); Spawn_units(4, 0, 24, 14, 2); Spawn_units(4, 0, 26, 11, 2); Spawn_units(4, 0, 23, 12, 2); Spawn_units(7, 0, 2, 9, 4); Spawn_units(7, 0, 2, 12, 4); Spawn_units(7, 0, 7, 15, 4); Spawn_units(1, 0, 8, 13, 4); Spawn_units(1, 0, 7, 11, 4); Spawn_units(1, 0, 6, 11, 4); Spawn_units(1, 0, 5, 11, 4); } else { spawn_units_at_random_location(999, 1); spawn_units_at_random_location(1, 4); spawn_units_at_random_location(1, 4); spawn_units_at_random_location(1, 4); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); } } } } } } if (today eq 4) { if (_root.loadmap_id eq 2) { if (_root.character_arr[mission_1_status_id] != 1) { _root.enemy_hp_500 = 70; _root.enemy_actpoints_500 = 2; _root.enemy_hp_540 = 70; _root.enemy_actpoints_540 = 3; _root.enemy_hp_521 = 70; _root.enemy_actpoints_521 = 2; _root.enemy_hp_531 = 70; _root.enemy_actpoints_531 = 2; _root.enemy_dmg_min_500 = 8; _root.enemy_dmg_max_500 = 25; _root.enemy_critical_chance_501 = 15; Spawn_units(999, 0, 13, 12, 1); Spawn_units(8, 0, 13, 11, 2); Spawn_units(7, 0, 15, 14, 2); Spawn_units(531, 0, 4, 19, 3); Spawn_units(521, 0, 3, 17, 3); Spawn_units(1, 0, 7, 19, 2); Spawn_units(9, 0, 4, 16, 2); Spawn_units(531, 0, 2, 2, 3); Spawn_units(7, 0, 2, 1, 2); Spawn_units(7, 0, 7, 2, 2); Spawn_units(7, 0, 6, 5, 2); Spawn_units(500, 0, 24, 3, 4); Spawn_units(540, 0, 26, 6, 4); Spawn_units(9, 0, 26, 4, 2); Spawn_units(9, 0, 23, 7, 2); Spawn_units(510, 0, 24, 20, 4); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 17, 18, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 14, 15, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 20, 10, 1); } } } spawn_units_at_random_location(7, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(1, 2); spawn_units_at_random_location(1, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(9, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(1, 2); spawn_units_at_random_location(7, 2); spawn_units_at_random_location(9, 2); } } else { if (_root.loadmap_id eq 11) { if (_root.character_arr[mission_2_status_id] != 1) { Spawn_units(999, 0, 14, 11, 1); Spawn_units(7, 0, 13, 6, 4); Spawn_units(1, 0, 15, 7, 4); Spawn_units(7, 0, 16, 9, 4); Spawn_units(1, 0, 18, 9, 4); Spawn_units(7, 0, 19, 11, 4); Spawn_units(1, 0, 18, 12, 4); Spawn_units(7, 0, 20, 14, 4); Spawn_units(9, 0, 23, 19, 4); Spawn_units(9, 0, 24, 18, 4); Spawn_units(9, 0, 3, 4, 4); Spawn_units(9, 0, 3, 2, 4); Spawn_units(9, 0, 16, 5, 4); Spawn_units(9, 0, 18, 6, 4); Spawn_units(9, 0, 21, 13, 4); Spawn_units(9, 0, 22, 11, 4); Spawn_units(9, 0, 21, 6, 4); Spawn_units(9, 0, 22, 7, 4); Spawn_units(8, 0, 19, 7, 4); Spawn_units(8, 0, 21, 9, 4); Spawn_units(5, 0, 1, 4, 3); Spawn_units(5, 0, 2, 2, 3); Spawn_units(5, 0, 4, 17, 3); Spawn_units(5, 0, 5, 19, 3); Spawn_units(5, 0, 7, 19, 3); Spawn_units(4, 0, 24, 20, 3); Spawn_units(4, 0, 25, 19, 3); Spawn_units(4, 0, 10, 15, 3); Spawn_units(4, 0, 9, 17, 3); Spawn_units(4, 0, 10, 17, 3); Spawn_units(4, 0, 8, 15, 3); Spawn_units(3, 0, 12, 18, 3); Spawn_units(3, 0, 14, 17, 3); Spawn_units(3, 0, 5, 13, 3); Spawn_units(3, 0, 7, 13, 3); Spawn_units(6, 0, 6, 16, 3); Spawn_units(6, 0, 9, 18, 3); } else { asdasdasjjj = random(3); if (asdasdasjjj eq 0) { Spawn_units(999, 0, 3, 19, 1); } else { if (asdasdasjjj eq 1) { Spawn_units(999, 0, 5, 11, 1); } else { if (asdasdasjjj eq 2) { Spawn_units(999, 0, 2, 2, 1); } } } _root.enemy_hp_521 = 70; _root.enemy_hp_520 = 70; spawn_units_at_random_location(521, 111); spawn_units_at_random_location(520, 111); spawn_units_at_random_location(4, 666); spawn_units_at_random_location(4, 666); spawn_units_at_random_location(4, 666); spawn_units_at_random_location(3, 666); spawn_units_at_random_location(3, 666); spawn_units_at_random_location(5, 666); spawn_units_at_random_location(5, 666); spawn_units_at_random_location(6, 666); spawn_units_at_random_location(6, 666); } } else { if (_root.loadmap_id eq 12) { if (_root.character_arr[mission_3_status_id] != 1) { _root.enemy_hp_511 = 120; _root.enemy_dmg_min_511 = 5; _root.enemy_dmg_max_511 = 18; _root.enemy_dmg_resist_511 = 30; _root.enemy_armor_class_511 = 15; Spawn_units(999, 0, 14, 12, 1); Spawn_units(511, 0, 13, 11, 1); Spawn_units(511, 0, 15, 11, 1); Spawn_units(511, 0, 14, 13, 1); Spawn_units(5, 0, 3, 9, 2); Spawn_units(3, 0, 4, 8, 2); Spawn_units(3, 0, 2, 8, 2); Spawn_units(3, 0, 3, 11, 2); Spawn_units(3, 0, 2, 13, 2); Spawn_units(3, 0, 3, 14, 2); Spawn_units(5, 0, 2, 18, 2); Spawn_units(5, 0, 4, 19, 2); Spawn_units(5, 0, 3, 20, 2); Spawn_units(9, 0, 24, 20, 3); Spawn_units(9, 0, 25, 20, 3); Spawn_units(9, 0, 25, 19, 3); Spawn_units(9, 0, 24, 18, 3); Spawn_units(7, 0, 22, 7, 3); Spawn_units(1, 0, 20, 7, 3); Spawn_units(7, 0, 23, 4, 3); Spawn_units(1, 0, 24, 5, 3); Spawn_units(7, 0, 22, 9, 3); } else { Spawn_units(999, 0, 14, 12, 1); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(4, 2); spawn_units_at_random_location(3, 2); spawn_units_at_random_location(3, 2); spawn_units_at_random_location(3, 2); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(7, 3); spawn_units_at_random_location(9, 3); spawn_units_at_random_location(9, 3); _root.enemy_actpoints_501 = 2; _root.enemy_actpoints_500 = 2; _root.enemy_actpoints_520 = 2; spawn_units_at_random_location(500, 5); spawn_units_at_random_location(520, 5); spawn_units_at_random_location(521, 6); spawn_units_at_random_location(501, 6); } } else { if (_root.loadmap_id eq 14) { Spawn_units(999, 0, 14, 10, 1); _root.enemy_dmg_min_510 = 5; _root.enemy_dmg_max_510 = 15; _root.enemy_actpoints_500 = 3; _root.enemy_actpoints_530 = 2; _root.enemy_actpoints_540 = 4; _root.enemy_dmg_min_520 = 2; _root.enemy_dmg_max_520 = 12; spawn_units_at_random_location(500, 4); spawn_units_at_random_location(510, 4); spawn_units_at_random_location(520, 4); spawn_units_at_random_location(530, 4); spawn_units_at_random_location(540, 4); spawn_units_at_random_location(500, 4); spawn_units_at_random_location(510, 4); spawn_units_at_random_location(520, 4); spawn_units_at_random_location(530, 4); spawn_units_at_random_location(540, 4); } else { if (_root.loadmap_id eq 13) { if (_root.character_arr[mission_4_status_id] != 1) { Spawn_units(999, 0, 14, 10, 1); tougherEnemies(); Spawn_units(510, 0, 5, 12, 2); Spawn_units(510, 0, 6, 12, 2); Spawn_units(510, 0, 10, 15, 2); Spawn_units(520, 0, 2, 14, 2); Spawn_units(520, 0, 4, 17, 2); Spawn_units(520, 0, 6, 19, 2); Spawn_units(520, 0, 8, 20, 2); Spawn_units(540, 0, 4, 6, 2); Spawn_units(500, 0, 5, 7, 2); Spawn_units(530, 0, 6, 5, 2); Spawn_units(500, 0, 5, 5, 2); Spawn_units(540, 0, 8, 5, 2); Spawn_units(500, 0, 8, 4, 2); Spawn_units(530, 0, 9, 3, 2); Spawn_units(511, 0, 19, 6, 3); Spawn_units(511, 0, 20, 8, 3); Spawn_units(511, 0, 24, 11, 3); Spawn_units(521, 0, 21, 4, 3); Spawn_units(521, 0, 25, 3, 3); Spawn_units(521, 0, 27, 6, 3); Spawn_units(521, 0, 16, 4, 3); Spawn_units(541, 0, 24, 16, 3); Spawn_units(501, 0, 23, 17, 3); Spawn_units(531, 0, 22, 17, 3); Spawn_units(501, 0, 22, 18, 3); Spawn_units(541, 0, 21, 19, 3); Spawn_units(501, 0, 20, 20, 3); Spawn_units(531, 0, 15, 19, 3); } else { Spawn_units(999, 0, 14, 10, 1); tougherEnemies(); _root.enemy_dmg_min_510 = 5; _root.enemy_dmg_max_510 = 15; _root.enemy_actpoints_500 = 3; _root.enemy_actpoints_530 = 2; _root.enemy_actpoints_540 = 4; _root.enemy_dmg_min_520 = 2; _root.enemy_dmg_max_520 = 12; spawn_units_at_random_location(500, 4); spawn_units_at_random_location(510, 4); spawn_units_at_random_location(520, 4); spawn_units_at_random_location(530, 4); spawn_units_at_random_location(540, 4); spawn_units_at_random_location(500, 4); spawn_units_at_random_location(510, 4); spawn_units_at_random_location(520, 4); spawn_units_at_random_location(530, 4); spawn_units_at_random_location(540, 4); } } else { if (_root.loadmap_id eq 100) { if (_root.character_arr[mission_6_status_id] != 1) { Spawn_units(999, 0, 14, 6, 1); tougherEnemies(); _root.enemy_hp_6 = 100; Spawn_units(510, 0, 2, 5, 2); Spawn_units(510, 0, 4, 5, 2); Spawn_units(510, 0, 6, 5, 2); Spawn_units(511, 0, 25, 5, 3); Spawn_units(511, 0, 26, 5, 3); Spawn_units(511, 0, 28, 5, 3); Spawn_units(6, 0, 12, 4, 4); Spawn_units(6, 0, 16, 4, 4); Spawn_units(6, 0, 14, 8, 4); Spawn_units(5, 0, 4, 11, 4); Spawn_units(3, 0, 5, 11, 4); Spawn_units(3, 0, 4, 13, 4); Spawn_units(5, 0, 7, 20, 4); Spawn_units(5, 0, 26, 7, 4); Spawn_units(5, 0, 27, 9, 4); Spawn_units(5, 0, 28, 10, 4); Spawn_units(5, 0, 27, 11, 4); Spawn_units(3, 0, 28, 15, 4); } else { Spawn_units(999, 0, 14, 10, 1); tougherEnemies(); spawn_units_at_random_location(6, 4); spawn_units_at_random_location(6, 4); spawn_units_at_random_location(6, 4); spawn_units_at_random_location(5, 4); spawn_units_at_random_location(5, 4); spawn_units_at_random_location(5, 4); spawn_units_at_random_location(4, 4); spawn_units_at_random_location(4, 4); spawn_units_at_random_location(4, 4); spawn_units_at_random_location(4, 4); spawn_units_at_random_location(3, 4); spawn_units_at_random_location(3, 4); spawn_units_at_random_location(3, 4); } } } } } } } } if (today > 4) { if (_root.loadmap_id eq 2) { if (_root.freeplay_modo eq 1) { tougherEnemies(); _root.enemy_dmg_min_500 = 8; _root.enemy_dmg_max_500 = 25; _root.enemy_critical_chance_501 = 25; Spawn_units(999, 0, 13, 12, 1); Spawn_units(8, 0, 13, 11, 2); Spawn_units(8, 0, 12, 10, 2); Spawn_units(7, 0, 15, 14, 2); Spawn_units(531, 0, 4, 19, 3); Spawn_units(521, 0, 3, 17, 3); Spawn_units(1, 0, 7, 19, 2); Spawn_units(531, 0, 2, 2, 3); Spawn_units(7, 0, 2, 1, 2); Spawn_units(7, 0, 7, 2, 2); Spawn_units(7, 0, 6, 5, 2); Spawn_units(500, 0, 24, 3, 4); Spawn_units(540, 0, 26, 6, 4); Spawn_units(9, 0, 26, 4, 2); Spawn_units(9, 0, 23, 7, 2); Spawn_units(510, 0, 24, 20, 4); } else { if (_root.freeplay_modo eq 2) { FP_randomSpawn(); } else { if (_root.freeplay_modo eq 3) { FP_hellSpawn(); } else { if (_root.freeplay_modo eq 4) { FP_ChaosSpawn(); } } } } } else { if (_root.loadmap_id eq 11) { if (_root.freeplay_modo eq 1) { Spawn_units(999, 0, 14, 11, 1); tougherEnemies(); Spawn_units(7, 0, 13, 6, 4); Spawn_units(1, 0, 15, 7, 4); Spawn_units(7, 0, 16, 9, 4); Spawn_units(1, 0, 18, 9, 4); Spawn_units(7, 0, 19, 11, 4); Spawn_units(1, 0, 18, 12, 4); Spawn_units(7, 0, 20, 14, 4); Spawn_units(9, 0, 23, 19, 4); Spawn_units(9, 0, 24, 18, 4); Spawn_units(9, 0, 3, 4, 4); Spawn_units(9, 0, 3, 2, 4); Spawn_units(9, 0, 16, 5, 4); Spawn_units(9, 0, 18, 6, 4); Spawn_units(9, 0, 21, 13, 4); Spawn_units(9, 0, 22, 11, 4); Spawn_units(9, 0, 21, 6, 4); Spawn_units(9, 0, 22, 7, 4); Spawn_units(8, 0, 19, 7, 4); Spawn_units(8, 0, 21, 9, 4); Spawn_units(5, 0, 1, 4, 3); Spawn_units(5, 0, 2, 2, 3); Spawn_units(5, 0, 4, 17, 3); Spawn_units(5, 0, 5, 19, 3); Spawn_units(5, 0, 7, 19, 3); Spawn_units(4, 0, 24, 20, 3); Spawn_units(4, 0, 25, 19, 3); Spawn_units(4, 0, 10, 15, 3); Spawn_units(4, 0, 9, 17, 3); Spawn_units(4, 0, 10, 17, 3); Spawn_units(4, 0, 8, 15, 3); Spawn_units(3, 0, 12, 18, 3); Spawn_units(3, 0, 14, 17, 3); Spawn_units(3, 0, 5, 13, 3); Spawn_units(3, 0, 7, 13, 3); Spawn_units(6, 0, 6, 16, 3); Spawn_units(6, 0, 9, 18, 3); } else { if (_root.freeplay_modo eq 2) { FP_randomSpawn(); } else { if (_root.freeplay_modo eq 3) { FP_hellSpawn(); } else { if (_root.freeplay_modo eq 4) { FP_ChaosSpawn(); } } } } } else { if (_root.loadmap_id eq 12) { if (_root.freeplay_modo eq 1) { tougherEnemies(); _root.enemy_hp_511 = 200; Spawn_units(999, 0, 14, 12, 1); Spawn_units(511, 0, 13, 11, 1); Spawn_units(511, 0, 15, 11, 1); Spawn_units(511, 0, 14, 13, 1); Spawn_units(5, 0, 3, 9, 2); Spawn_units(3, 0, 4, 8, 2); Spawn_units(3, 0, 2, 8, 2); Spawn_units(3, 0, 3, 11, 2); Spawn_units(3, 0, 2, 13, 2); Spawn_units(3, 0, 3, 14, 2); Spawn_units(5, 0, 2, 18, 2); Spawn_units(5, 0, 4, 19, 2); Spawn_units(5, 0, 3, 20, 2); Spawn_units(6, 0, 12, 7, 2); Spawn_units(6, 0, 14, 7, 2); Spawn_units(6, 0, 16, 7, 2); Spawn_units(9, 0, 24, 20, 3); Spawn_units(9, 0, 25, 20, 3); Spawn_units(9, 0, 25, 19, 3); Spawn_units(9, 0, 24, 18, 3); Spawn_units(8, 0, 13, 17, 3); Spawn_units(8, 0, 15, 17, 3); Spawn_units(8, 0, 17, 17, 3); Spawn_units(7, 0, 22, 7, 3); Spawn_units(1, 0, 20, 7, 3); Spawn_units(7, 0, 23, 4, 3); Spawn_units(1, 0, 24, 5, 3); Spawn_units(7, 0, 22, 9, 3); } else { if (_root.freeplay_modo eq 2) { FP_randomSpawn(); } else { if (_root.freeplay_modo eq 3) { FP_hellSpawn(); } else { if (_root.freeplay_modo eq 4) { FP_ChaosSpawn(); } } } } } else { if (_root.loadmap_id eq 14) { if (_root.freeplay_modo eq 1) { tougherEnemies(); Spawn_units(999, 0, 14, 10, 1); Spawn_units(531, 0, 11, 9, 1); Spawn_units(531, 0, 11, 12, 1); Spawn_units(531, 0, 11, 13, 1); Spawn_units(531, 0, 10, 12, 1); Spawn_units(541, 0, 17, 9, 1); Spawn_units(541, 0, 17, 12, 1); Spawn_units(501, 0, 13, 8, 1); Spawn_units(510, 0, 13, 12, 1); Spawn_units(510, 0, 15, 10, 1); Spawn_units(4, 0, 4, 5, 2); Spawn_units(6, 0, 3, 3, 2); Spawn_units(4, 0, 9, 2, 2); Spawn_units(4, 0, 11, 4, 2); Spawn_units(6, 0, 17, 2, 2); Spawn_units(4, 0, 4, 19, 2); Spawn_units(4, 0, 8, 20, 2); Spawn_units(6, 0, 24, 14, 2); Spawn_units(4, 0, 26, 11, 2); Spawn_units(4, 0, 23, 12, 2); Spawn_units(7, 0, 2, 9, 4); Spawn_units(7, 0, 2, 12, 4); Spawn_units(7, 0, 7, 15, 4); Spawn_units(1, 0, 8, 13, 4); Spawn_units(1, 0, 7, 11, 4); Spawn_units(1, 0, 6, 11, 4); Spawn_units(1, 0, 5, 11, 4); } else { if (_root.freeplay_modo eq 2) { FP_randomSpawn(); } else { if (_root.freeplay_modo eq 3) { FP_hellSpawn(); } else { if (_root.freeplay_modo eq 4) { FP_ChaosSpawn(); } } } } } else { if (_root.loadmap_id eq 13) { if (_root.freeplay_modo eq 1) { Spawn_units(999, 0, 14, 10, 1); tougherEnemies(); Spawn_units(510, 0, 5, 12, 2); Spawn_units(510, 0, 6, 12, 2); Spawn_units(510, 0, 10, 15, 2); Spawn_units(520, 0, 2, 14, 2); Spawn_units(520, 0, 4, 17, 2); Spawn_units(520, 0, 6, 19, 2); Spawn_units(520, 0, 8, 20, 2); Spawn_units(540, 0, 4, 6, 2); Spawn_units(500, 0, 5, 7, 2); Spawn_units(530, 0, 6, 5, 2); Spawn_units(500, 0, 5, 5, 2); Spawn_units(540, 0, 8, 5, 2); Spawn_units(500, 0, 8, 4, 2); Spawn_units(530, 0, 9, 3, 2); Spawn_units(511, 0, 19, 6, 3); Spawn_units(511, 0, 20, 8, 3); Spawn_units(511, 0, 24, 11, 3); Spawn_units(521, 0, 21, 4, 3); Spawn_units(521, 0, 25, 3, 3); Spawn_units(521, 0, 27, 6, 3); Spawn_units(521, 0, 16, 4, 3); Spawn_units(541, 0, 24, 16, 3); Spawn_units(501, 0, 23, 17, 3); Spawn_units(531, 0, 22, 17, 3); Spawn_units(501, 0, 22, 18, 3); Spawn_units(541, 0, 21, 19, 3); Spawn_units(501, 0, 20, 20, 3); Spawn_units(531, 0, 15, 19, 3); } else { if (_root.freeplay_modo eq 2) { FP_randomSpawn(); } else { if (_root.freeplay_modo eq 3) { FP_hellSpawn(); } else { if (_root.freeplay_modo eq 4) { FP_ChaosSpawn(); } } } } } else { if (_root.loadmap_id eq 100) { if (_root.freeplay_modo eq 1) { Spawn_units(999, 0, 14, 6, 1); tougherEnemies(); Spawn_units(510, 0, 2, 5, 2); Spawn_units(510, 0, 4, 5, 2); Spawn_units(510, 0, 6, 5, 2); Spawn_units(511, 0, 25, 5, 3); Spawn_units(511, 0, 26, 5, 3); Spawn_units(511, 0, 28, 5, 3); Spawn_units(6, 0, 12, 4, 4); Spawn_units(6, 0, 16, 4, 4); Spawn_units(6, 0, 14, 8, 4); Spawn_units(5, 0, 4, 11, 4); Spawn_units(3, 0, 5, 11, 4); Spawn_units(3, 0, 4, 13, 4); Spawn_units(5, 0, 7, 20, 4); Spawn_units(5, 0, 26, 7, 4); Spawn_units(5, 0, 27, 9, 4); Spawn_units(5, 0, 28, 10, 4); Spawn_units(5, 0, 27, 11, 4); Spawn_units(3, 0, 28, 15, 4); } else { if (_root.freeplay_modo eq 2) { FP_randomSpawn(); } else { if (_root.freeplay_modo eq 3) { FP_hellSpawn(); } else { if (_root.freeplay_modo eq 4) { FP_ChaosSpawn(); } } } } } } } } } } } if (_root.loadmap_id eq 2) { createLootArrayForThisUnit(99906, 99906); _root.yiff.loot_shell.attachMovie('lootbox', 'lootbox99906', 99906); trgt666667771234 = _root.yiff.loot_shell.lootbox99906; trgt666667771234._x = _root.yiff.cell1_13._x; trgt666667771234._y = _root.yiff.cell1_13._y; trgt666667771234.serialnum = 99906; } if (_root.start_new_character eq 1) { pushNewItem(item1201); spawn_tutorial_menu(); pushNewItem(item3101, 5); newiterm88823 = cloneItem(item3501); newiterm88823.ammount = 3; _root.quick_item_slot_1 = newiterm88823; newiterm88823 = cloneItem(item2501); _root.firearms_slot_item = newiterm88823; newiterm88823 = cloneItem(item2101); _root.melee_slot_item = newiterm88823; } _root.gameStarted_time = getTimer(); saveslot000 = SharedObject.getLocal('AW0_saveslot_' + _root.playingSlot); varlocation1111 = this.saveslot000.data; _root.timeSpentPreviously = varlocation1111.timeSpentPreviously; if (_root.timeSpentPreviously > 0) { } else { _root.timeSpentPreviously = 1; } reloadGun(); if (fucked eq 1) { gotoAndPlay(1); } } frame 15 { stop(); } frame 15 { } frame 25 { stop(); Mouse.hide(); startDrag('jursor', true); } movieClip 916 { } movieClip 918 { } movieClip 919 { } movieClip 921 { } movieClip 924 { } movieClip 925 { } movieClip 926 { } movieClip 928 { } movieClip 929 { } movieClip 930 { } movieClip 931 kursor { frame 1 { stop(); } instance of movieClip 919 { onClipEvent (enterFrame) { if (_root.start_ranged_attack_delay_timer eq 1) { gotoAndStop(1); } else { gotoAndStop(2); } } } instance of movieClip 921 { onClipEvent (enterFrame) { if (_root.mouseoverunit eq 0 or _root.mouseoverunit eq _root.character_unuit) { showvar = ' '; } else { if (_root.hitchance eq 'x') { showvar = 'x'; } else { if (_root.hitchance and _root.hitchance != '') { if (_root.hitchance > 0) { showvar = _root.hitchance + '%'; } else { showvar = '0%'; } } else { showvar = ' '; } } } } } frame 4 { stop(); } frame 10 { stop(); } } frame 30 { stop(); } frame 31 { stop(); } frame 32 { stop(); } frame 33 { gotoAndPlay(24); } movieClip 934 { frame 1 { stop(); } } movieClip 936 { } movieClip 937 { } movieClip 938 { } movieClip 940 { } movieClip 942 { } movieClip 943 { } movieClip 945 { } movieClip 946 { } movieClip 947 { } movieClip 949 { } movieClip 950 { } movieClip 951 { } movieClip 953 { } movieClip 955 { } movieClip 956 { } movieClip 957 { } movieClip 958 { } movieClip 959 { } movieClip 961 { } movieClip 963 { } movieClip 964 { } movieClip 965 { frame 1 { stop(); } frame 2 { stop(); } } button 967 { on (rollOver, dragOver) { showstatus = 1; _root.mouseoverunit = trgt; if (trgt.team != _root.character_unuit.team) { red_selection._visible = true; _root.bottommenu.showinfo = '[HOSTILE] ' + trgt.name_; } else { _root.bottommenu.showinfo = '[ALLY] ' + trgt.name_; blue_selection._visible = true; } } on (rollOut, dragOut) { showstatus = 0; _root.mouseoverunit = 0; red_selection._visible = false; blue_selection._visible = false; _root.bottommenu.showinfo = ''; } } movieClip 969 { } movieClip 970 { instance red_selection of movieClip 969 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_visible eq true) { _rotation = _rotation + 5; } } } instance blue_selection of movieClip 969 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_visible eq true) { _rotation = _rotation + 5; } } } } movieClip 972 { } movieClip 973 { } movieClip 974 { } movieClip 975 { } movieClip 976 { frame 2 { ended = 0; } frame 6 { ended = 1; } } movieClip 977 enemy_type_18 { frame 1 { stop(); } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 981 background_floor_2 { } movieClip 984 background_up_2 { } button 991 { on (release) { if (_root.peaqce_mode != 1) { if (_root.manual_controll_on eq 1 and _root.activate_CHARmovment_function != 1 and _root.activate_CHARmovment_function2 != 1) { _root.endturnCHeck('true'); } } } on (rollOver, dragOver) { if (_root.peaqce_mode != 1) { if (_root.manual_controll_on eq 1 and _root.activate_CHARmovment_function != 1 and _root.activate_CHARmovment_function2 != 1) { _root.bottommenu.showinfo = 'End round. Hotkey: \'SPACE\''; } } } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 998 { frame 21 { stop(); } frame 42 { stop(); } } movieClip 1001 { } movieClip 1002 { frame 1 { stop(); } } movieClip 1004 { } movieClip 1011 { } button 1015 { on (release) { _root.unloadAmmo(); _root.endMission(); _root.saveCHaracter('save'); _root.savePlayTime(); _root.deleteAllDrestroyEverything(); } } movieClip 1016 { } movieClip 1017 { } movieClip 1018 { frame 1 { stop(); } frame 2 { _root.bottommenu.queyeshell._visible = false; } frame 15 { gotoAndPlay(13); } } movieClip 1021 { } movieClip 1025 { frame 14 { stop(); } } movieClip 1026 { frame 1 { stop(); } } movieClip 1028 { } button 1030 { on (release) { if (_root.showgrid eq 1) { _root.showgrid = 0; } else { _root.showgrid = 1; } } on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Show grid'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1034 { } button 1036 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Melee weapon slot. Go to Inventory to equip Melee Weapon.'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1038 { } button 1039 { on (press) { _root.ranged_attack_pricel = 0; if (_root.peaqce_mode != 1 and _root.melee_attack_pricel != 1) { _root.melee_attack_pricel = 1; } else { if (_root.melee_attack_pricel eq 1) { _root.melee_attack_pricel = 0; } } _root.bottommenu.showinfo = 'Melee Attack. (-1 AP)'; } on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Melee Attack. (-1 AP)'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1041 { } movieClip 1042 { } movieClip 1044 { } movieClip 1045 { } movieClip 1047 { } movieClip 1048 { instance of movieClip 1038 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_root.melee_attack_pricel eq 0) { _visible = false; } else { _visible = true; } } } instance of movieClip 1045 { onClipEvent (load) { cacheAsBitmap = true; _visible = false; } onClipEvent (enterFrame) { if (_root.character_unuit.actpoints > 0) { _visible = false; } else { _visible = true; } } } instance of movieClip 1047 { onClipEvent (load) { cacheAsBitmap = true; _visible = false; } onClipEvent (enterFrame) { if (_root.peaqce_mode != 1) { _visible = false; } else { _visible = true; } } } } button 1050 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Ranged weapon slot. Go to Inventory to equip Ranged Weapon.'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1054 { } button 1055 { on (press) { _root.melee_attack_pricel = 0; if (_root.peaqce_mode != 1) { _root.BTN_rangedAttack(); } _root.bottommenu.showinfo = 'Ranged Attack.'; } on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Ranged Attack.'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1059 { } movieClip 1062 { } button 1068 { on (release) { _root.ranged_attack_pricel = 0; if (_root.melee_attack_pricel eq 1) { _root.melee_attack_pricel = 0; } _root.BTN_firearms_clickmode_up(); } } button 1073 { on (release) { _root.ranged_attack_pricel = 0; if (_root.melee_attack_pricel eq 1) { _root.melee_attack_pricel = 0; } _root.BTN_firearms_clickmode_down(); } } movieClip 1075 { } movieClip 1076 { } movieClip 1077 { instance of movieClip 1038 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_root.ranged_attack_pricel eq 0) { _visible = false; } else { _visible = true; } } } instance of movieClip 1062 { onClipEvent (enterFrame) { gotoAndStop(_root.firearm_clickmode); } } instance of movieClip 887 { onClipEvent (load) { yifftimer = 9999; } onClipEvent (enterFrame) { yifftimer += 0.03333333333333333; if (yifftimer > 0.5) { yifftimer = 0; magazin = _root.firearms_slot_item.ammo_capacity; showvar1 = _root.current_used_amo_inventory; showvar2 = _root.current_amo_in_gun + '/' + magazin; } } } instance of movieClip 1045 { onClipEvent (load) { cacheAsBitmap = true; _visible = false; } onClipEvent (enterFrame) { if (_root.character_unuit.actpoints > 0) { _visible = false; } else { _visible = true; } } } instance of movieClip 1076 { onClipEvent (load) { cacheAsBitmap = true; _visible = false; } onClipEvent (enterFrame) { if (_root.firearm_clickmode eq 4 and _root.current_used_amo_inventory eq 0) { _visible = true; } else { _visible = false; } } } instance of movieClip 1047 { onClipEvent (load) { cacheAsBitmap = true; _visible = false; } onClipEvent (enterFrame) { if (_root.peaqce_mode != 1) { _visible = false; } else { _visible = true; } } } } button 1078 { on (release) { _root.BTN_quickSlotClick(id); } on (rollOver, dragOver) { _root.BTN_ROLLOVER_quickslot(id); } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1080 { } movieClip 1081 { } button 1082 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'This item can not be used in a quickslot.'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1083 { frame 1 { stop(); } instance ammount of movieClip 778 { onClipEvent (load) { _visible = false; } } } movieClip 1085 { } button 1087 { on (release) { _root.do_really_kill_them_all = 1; } } movieClip 1089 { } button 1091 { on (release) { _root.spawn_tutorial_menu(); } } movieClip 1092 { } movieClip 1097 { } button 1100 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Main Menu'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } on (release) { _root.openRemoveMainMenu(); } } movieClip 1103 { } movieClip 1104 { } button 1105 { on (release) { if (_root.character_unuit.actpoints > 0) { _root.openCloseInventoryButton(); } else { _root.bottommenu.neap.play(); } } on (rollOver, dragOver) { if (_root.character_unuit.actpoints > 0) { _root.bottommenu.showinfo = 'Open Inventory (-1 AP)'; } else { _root.bottommenu.showinfo = 'Not Enough AP to open Inventory!'; } } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } button 1106 { on (release) { _root.openCloseInventoryButton(); } } movieClip 1107 { } movieClip 1111 { } button 1112 { on (release) { _root.openCloseLog(); } on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Open Log'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } button 1113 { on (release) { _root.openCloseLog(); } } movieClip 1114 { } button 1116 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Your Movement Points'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } button 1118 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Your Action Points'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } button 1120 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Your Hit Points: ' + (_root.character_unuit.hp - _root.character_unuit.dmg) + '/' + _root.character_unuit.hp; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } } movieClip 1123 { } button 1124 { on (rollOver, dragOver) { _root.bottommenu.showinfo = 'Open Character Sheet'; } on (rollOut, dragOut) { _root.bottommenu.showinfo = ''; } on (release) { _root.openCloseCHarsheetButton(); } } movieClip 1126 { } movieClip 1127 { } movieClip 1128 { instance of movieClip 1127 { onClipEvent (load) { _visible = false; } onClipEvent (enterFrame) { if (_root.character_arr[_root.skill_points_id] > 0 or _root.character_arr[_root.stat_points_id] > 0 or _root.character_arr[_root.perk_points_id] > 0) { _visible = true; } else { _visible = false; } } } } movieClip 1129 { } movieClip 1130 { instance of movieClip 1128 { onClipEvent (enterFrame) { if (_root.character_sheet) { gotoAndStop(2); } else { gotoAndStop(1); } } } } button 1131 { on (release) { getURL('http://armorgames.com/', '_blank'); } } movieClip 1133 { } movieClip 1134 { frame 1 { stop(); } } movieClip 1136 { } movieClip 1137 { } movieClip 1139 { frame 1 { stop(); } frame 33 { _visible = false; } } movieClip 1142 queue { } movieClip 1143 { } movieClip 1144 bottommenu { frame 1 { showinfo = ''; } instance of movieClip 998 { onClipEvent (enterFrame) { if (_root.manual_controll_on eq 1 and _root.activate_CHARmovment_function != 1 and _root.activate_CHARmovment_function2 != 1 and _root.peaqce_mode != 1) { if (_currentframe > 21) { gotoAndPlay(1); } } else { if (_currentframe <= 21) { gotoAndPlay(22); } } } } instance hpbar of movieClip 1002 { onClipEvent (load) { dmg = 10; } } instance mp_indicator of movieClip 1026 { onClipEvent (load) { cacheAsBitmap = true; } } instance ap_indicator of movieClip 1026 { onClipEvent (load) { cacheAsBitmap = true; } } instance of movieClip 1107 { onClipEvent (enterFrame) { if (_root.current_participant eq _root.character_unuit) { if (_root.inventory_menu) { gotoAndStop(3); } else { gotoAndStop(2); } } else { gotoAndStop(1); } } } instance of movieClip 1114 { onClipEvent (enterFrame) { if (_root.logscreen) { gotoAndStop(2); } else { gotoAndStop(1); } } } instance of movieClip 1130 { onClipEvent (enterFrame) { if (_root.characterIsDead eq 1) { gotoAndStop(2); } else { gotoAndStop(1); } } } instance encumbered_message of movieClip 1139 { onClipEvent (load) { _visible = false; } } instance queyeshell of movieClip 1143 { onClipEvent (load) { cacheAsBitmap = true; } } } movieClip 1147 { } button 1159 { on (release) { _root.BTN_aim('torso'); } } button 1160 { on (release) { _root.BTN_aim('arm2'); } } button 1161 { on (release) { _root.BTN_aim('leg2'); } } button 1162 { on (release) { _root.BTN_aim('head'); } } button 1163 { on (release) { _root.BTN_aim('arm1'); } } button 1164 { on (release) { _root.BTN_aim('leg1'); } } movieClip 1167 { } movieClip 1172 { } button 1175 { on (release) { removeMovieClip(this); } } movieClip 1178 { } movieClip 1181 { } movieClip 1182 { } movieClip 1185 { } movieClip 1187 { } movieClip 1190 { } movieClip 1191 { } movieClip 1193 { } movieClip 1194 { } movieClip 1195 aimed_shot_menu { instance of movieClip 1194 { onClipEvent (load) { if (_root.aimedTarget.wpn_type eq 'scorpion') { gotoAndStop(3); } else { if (_root.aimedTarget.wpn_type eq 'spider') { gotoAndStop(4); } else { if (_root.aimedTarget.en_id > 499) { gotoAndStop(2); } } } } } } movieClip 1196 { } movieClip 1197 { } movieClip 1199 { } movieClip 1202 { } button 1204 { on (release) { _root.exit_after_death_button(); } } movieClip 1207 { } button 1209 { on (release) { _visible = false; } } movieClip 1211 { } button 1213 { on (release) { getURL('http://armorgames.com/', '_blank'); } } movieClip 1215 { } movieClip 1218 { } movieClip 1220 { } movieClip 1221 { } movieClip 1222 { } movieClip 1223 { } movieClip 1224 death_menu { instance of movieClip 1197 { onClipEvent (load) { cacheAsBitmap = true; } } instance of movieClip 1223 { onClipEvent (load) { cacheAsBitmap = true; } } } movieClip 1227 { } movieClip 1229 { } movieClip 1231 { } button 1233 { on (press) { startDrag(this, false, 220.8, -176, 220.8, 176); _root.polzunok_dragged = 1; } on (release, releaseOutside) { stopDrag(); _root.polzunok_dragged = 0; } } movieClip 1234 { } movieClip 1236 { } movieClip 1238 { } movieClip 1240 { } button 1241 { on (release) { if (_root.logendposition < 99) { ++_root.logendposition; } } } button 1242 { on (release) { if (_root.logendposition > 0) { --_root.logendposition; } _root.dorefreshlog = 1; } } button 1244 { on (release) { removeMovieClip(this); } } button 1250 { on (release) { _root.pushTextToLog(random(9999999999.0) + 'loltext'); } } button 1251 { on (release) { _root.pushTextToLog(random(9999999999.0) + 'YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff YIFF yiff '); } } button 1252 { on (release) { _root.pushTextToLog(random(10) + 1); } } movieClip 1254 { } movieClip 1255 { } movieClip 1258 { } button 1262 { on (release) { removeMovieClip(this); } } movieClip 1263 logscreen { } movieClip 1268 { } movieClip 1270 { } movieClip 1272 { } movieClip 1276 { } movieClip 1281 { } movieClip 1286 { } movieClip 1291 { } movieClip 1293 { } movieClip 1296 { } button 1301 { on (release) { gotoAndPlay(20); } } button 1303 { on (release) { nextFrame(); } } button 1304 { on (release) { gotoAndStop(9); } } movieClip 1309 { } movieClip 1311 { } movieClip 1320 { } button 1323 { on (release) { prevFrame(); } } movieClip 1328 { } movieClip 1332 { } movieClip 1336 { } movieClip 1342 { } movieClip 1343 { } movieClip 1345 { } movieClip 1348 { } movieClip 1352 { } movieClip 1356 { } movieClip 1358 { } movieClip 1372 { } movieClip 1374 { } movieClip 1380 { } movieClip 1385 { } movieClip 1387 { } movieClip 1397 { } movieClip 1399 { } movieClip 1405 { } button 1408 { on (release) { gotoAndStop(1); } } movieClip 1411 { } movieClip 1412 tutorial_menu { frame 1 { stop(); } frame 45 { _root.bottommenu.tutbut._visible = true; removeMovieClip(this); } } movieClip 1415 { } movieClip 1420 { } button 1422 { on (press) { pluspressed = 1; if (aaa < a_max) { if (deltavar eq 5) { aaa += 5; } else { ++aaa; } } } on (release) { pluspressed = 0; } } button 1423 { on (press) { minuspressed = 1; if (aaa > a_min) { if (deltavar eq 5) { aaa -= 5; } else { --aaa; } } } on (release) { minuspressed = 0; } } movieClip 1424 { } movieClip 1425 { instance sndset of movieClip 1424 { onClipEvent (enterFrame) { deltavar = 5; a_min = 0; a_max = 100; if (yiffffffff != 'fhtagn') { yiffffffff = 'fhtagn'; aaa = _root.music_volume; } else { _root.music_volume = aaa; } display_var = aaa + '%'; if (pluspressed eq 1) { zutimer += 0.03333333333333333; if (zutimer > 0.3) { if (aaa < a_max) { if (deltavar eq 5) { aaa += 5; } else { ++aaa; } } } } else { zutimer = 0; } if (minuspressed eq 1) { zutimer2 += 0.03333333333333333; if (zutimer2 > 0.3) { if (aaa > a_min) { if (deltavar eq 5) { aaa -= 5; } else { --aaa; } } } } else { zutimer2 = 0; } } } } movieClip 1426 { } movieClip 1428 { } button 1429 { on (press) { pluspressed = 1; if (aaa < a_max) { if (deltavar eq 5) { aaa += 5; } else { ++aaa; } } } on (release) { pluspressed = 0; } } button 1430 { on (press) { minuspressed = 1; if (aaa > a_min) { if (deltavar eq 5) { aaa -= 5; } else { --aaa; } } } on (release) { minuspressed = 0; } } movieClip 1431 { } movieClip 1432 { instance sndset of movieClip 1431 { onClipEvent (enterFrame) { deltavar = 5; a_min = 0; a_max = 100; if (yiffffffff != 'fhtagn') { yiffffffff = 'fhtagn'; aaa = _root.sound_volume; } else { _root.sound_volume = aaa; } display_var = aaa + '%'; if (pluspressed eq 1) { zutimer += 0.03333333333333333; if (zutimer > 0.3) { if (aaa < a_max) { if (deltavar eq 5) { aaa += 5; } else { ++aaa; } } } } else { zutimer = 0; } if (minuspressed eq 1) { zutimer2 += 0.03333333333333333; if (zutimer2 > 0.3) { if (aaa > a_min) { if (deltavar eq 5) { aaa -= 5; } else { --aaa; } } } } else { zutimer2 = 0; } } } } movieClip 1434 { } movieClip 1436 { } button 1437 { on (release) { removeMovieClip(this); } } movieClip 1439 { } button 1440 { on (release) { _root.spawn_tutorial_menu(); removeMovieClip(this); } } movieClip 1442 { } button 1443 { on (release) { removeMovieClip(this); } } movieClip 1445 { } movieClip 1446 { } movieClip 1447 main_menu { instance of movieClip 1197 { onClipEvent (load) { cacheAsBitmap = true; } } instance of movieClip 1415 { onClipEvent (load) { cacheAsBitmap = true; } } instance of movieClip 1442 { onClipEvent (load) { cacheAsBitmap = true; } } instance of movieClip 1446 { onClipEvent (load) { cacheAsBitmap = true; } } } movieClip 1450 temp_border { } movieClip 1453 background_floor_11 { } movieClip 1456 background_up_11 { } movieClip 1459 background_floor_12 { } movieClip 1462 background_up_12 { } movieClip 1465 background_floor_13 { } movieClip 1468 background_up_13 { } movieClip 1471 background_floor_14 { } movieClip 1474 background_floor_100 { } movieClip 1477 background_up_100 { } movieClip 1479 { } movieClip 1517 { } movieClip 1543 { frame 1 { stop(); } } movieClip 1545 { } movieClip 1547 tile_empty { frame 1 { stop(); } } movieClip 1548 tile_block { frame 1 { stop(); } } movieClip 1550 destination { } movieClip 1552 { } movieClip 1554 character { } movieClip 1556 { } movieClip 1557 { } movieClip 1558 { } movieClip 1559 pathpointer { frame 1 { stop(); } frame 2 { stop(); } } movieClip 1565 { frame 1 { stop(); } } movieClip 1566 { } movieClip 1567 { frame 1 { ended = 0; } frame 3 { dodmg = 1; } frame 10 { ended = 1; } } movieClip 1568 enemy_type_1 { frame 1 { stop(); } frame 1 { stop(); } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1569 { frame 11 { stop(); } } movieClip 1574 dead_enemy_type_1 { frame 86 { stop(); } } movieClip 1580 { } movieClip 1581 projectile_1 { } movieClip 1582 statusicons { frame 1 { stop(); } frame 2 { stop(); } } movieClip 1584 { } movieClip 1586 { } movieClip 1587 { frame 1 { stop(); } } movieClip 1588 { } movieClip 1589 { } movieClip 1590 { frame 1 { ended = 0; } frame 2 { dodmg = 1; } frame 6 { ended = 1; } } movieClip 1591 enemy_type_4 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1593 { frame 9 { stop(); } } movieClip 1597 dead_enemy_type_4 { frame 95 { stop(); } } movieClip 1602 { frame 1 { stop(); } } movieClip 1603 { } movieClip 1604 { frame 1 { ended = 0; } frame 4 { dodmg = 1; } frame 15 { ended = 1; } } movieClip 1605 enemy_type_7 { frame 1 { stop(); } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1607 { frame 11 { stop(); } } movieClip 1610 dead_enemy_type_7 { frame 59 { stop(); } } movieClip 1616 { frame 1 { stop(); } } movieClip 1617 { } movieClip 1618 { frame 1 { ended = 0; } frame 5 { dodmg = 1; } frame 15 { ended = 1; } } movieClip 1619 enemy_type_8 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1621 { frame 11 { stop(); } } movieClip 1624 dead_enemy_type_8 { frame 59 { stop(); } } movieClip 1626 enemy_type_100 { frame 1 { stop(); } } button 1628 { on (rollOver, dragOver) { _root.yiff.base_showhp_2.mousover = 1; _root.mouseoverunit = this; _root.bottommenu.showinfo = 'Enemy base.'; if (_root.question_mode eq 1) { if (_root.free_psi_points > 2) { _root.bottommenu.showinfo = 'Enemy base. Click to view enemy resources. (-3 Psy Points)'; } else { _root.bottommenu.showinfo = 'Enemy base. 3 Psy Points required to view enemy resources'; } } } on (rollOut, dragOut) { _root.yiff.base_showhp_2.mousover = 0; _root.mouseoverunit = 0; _root.bottommenu.showinfo = ''; } on (press) { if (_root.question_mode eq 1) { if (_root.free_psi_points > 2) { _root.free_psi_points -= 3; _root.spawnIntelMenu(); } } } } button 1631 { on (release) { trace(this); } } movieClip 1632 enemy_type_200 { frame 1 { stop(); } } movieClip 1635 { } movieClip 1636 otletalka { frame 35 { removeMovieClip(this); } } movieClip 1654 { } movieClip 1656 explosion_2 { frame 7 { if (_root.quickcombat eq 1) { } } frame 19 { removeMovieClip(this); } } movieClip 1658 { } movieClip 1659 poisoned_lable { frame 15 { removeMovieClip(this); } } movieClip 1661 { } movieClip 1662 fps_counter { instance hghghgh3 of movieClip 1661 { onClipEvent (load) { timeA = 0; ghghgyiffhgjt = 999; median_fps_sum = 0; median_fps_mod = 5; median_fps_count = 0; median_fps_sum2 = 0; median_fps_mod2 = 25; median_fps_count2 = 0; } onClipEvent (enterFrame) { timeB = getTimer(); var fps_rough = Math.floor(1000 / (this.timeB - this.timeA)); timeA = timeB; if (median_fps_count < median_fps_mod) { ++median_fps_count; median_fps_sum += fps_rough; } else { this.current_fps = Math.floor(median_fps_sum / this.median_fps_count); this.median_fps_sum = 0; this.median_fps_count = 0; } if (median_fps_count2 < median_fps_mod2) { ++median_fps_count2; median_fps_sum2 += fps_rough; } else { this.current_fps2 = Math.floor(median_fps_sum2 / this.median_fps_count2); this.median_fps_sum2 = 0; this.median_fps_count2 = 0; } ghghgyiffhgjt += 0.03333333333333333; if (ghghgyiffhgjt > 0.5) { ghghgyiffhgjt = 30; if (inmenu eq 1) { showvar = 'fps: ' + current_fps + ' '; } else { showvar = 'Round: ' + _root.currentround + ' fps: ' + current_fps + ' '; } } } } } movieClip 1666 { } movieClip 1670 { } movieClip 1674 { } movieClip 1679 { } movieClip 1680 { } movieClip 1682 { } movieClip 1684 { } movieClip 1686 { } movieClip 1688 { } movieClip 1690 { } movieClip 1692 { } movieClip 1694 { } movieClip 1696 { } movieClip 1698 { } movieClip 1700 { } movieClip 1702 { } movieClip 1704 { } movieClip 1706 { } movieClip 1708 { } movieClip 1710 { } movieClip 1712 { } movieClip 1715 { } movieClip 1717 { } movieClip 1718 { } movieClip 1719 { } movieClip 1721 { } movieClip 1722 { instance of movieClip 1721 { onClipEvent (load) { _visible = false; } } } movieClip 1724 { } movieClip 1726 { } movieClip 1728 { } movieClip 1730 { } movieClip 1732 { } movieClip 1734 { } movieClip 1735 chibiunits_shell { instance of movieClip 1721 { onClipEvent (load) { _visible = false; } } } movieClip 1736 { } movieClip 1738 { frame 35 { stop(); } } movieClip 1741 { } movieClip 1744 { } movieClip 1746 { } movieClip 1748 { } movieClip 1749 { } movieClip 1752 { } movieClip 1753 { } button 1755 { on (release) { _root.gotoAndPlay(20); if (_root.loadmap_id != 999 and _root.loadmap_id != 5) { _root.doopencampaignmenu = 1; _root.forceselectmap = _root.loadmap_id + 1; } if (_root.loadmap_id eq 6) { _root.doopencampaignmenu = 1; _root.forceselectmap = 1; } _root.deleteAllDrestroyEverything(); } } movieClip 1759 victory_menu { frame 12 { _root.quickcombat = 0; _root.game_paused = 1; if (_root.current_participant._currentframe eq 2) { _root.yyyffstopdone = 1; _root.current_participant.gotoAndStop(1); } } frame 30 { stop(); } } movieClip 1762 { } movieClip 1765 { } button 1766 { on (release) { _root.gotoAndPlay(20); if (_root.loadmap_id != 999) { _root.doopencampaignmenu = 1; _root.forceselectmap = _root.loadmap_id; } _root.deleteAllDrestroyEverything(); } } movieClip 1768 defeat_menu { frame 15 { _root.quickcombat = 0; _root.game_paused = 1; if (_root.current_participant._currentframe eq 2) { _root.yyyffstopdone = 1; _root.current_participant.gotoAndStop(1); } } frame 30 { stop(); } } movieClip 1770 { } movieClip 1771 round { frame 47 { removeMovieClip(this); } } movieClip 1772 { frame 1 { stop(); } } movieClip 1773 { } movieClip 1778 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 5 { doshoot = 1; } frame 16 { ended = 1; } } movieClip 1780 { frame 1 { ended = 0; } frame 1 { lastshot = 0; } frame 8 { shoot = 1; } frame 11 { shoot = 1; } frame 14 { shoot = 1; } frame 17 { shoot = 1; } frame 20 { shoot = 1; } frame 23 { shoot = 1; } frame 26 { shoot = 1; } frame 29 { shoot = 1; } frame 32 { shoot = 1; } frame 35 { shoot = 1; lastshot = 1; } frame 42 { ended = 1; } } movieClip 1785 Symbol 1 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 11 { dohit = 1; } frame 18 { ended = 1; } } movieClip 1788 { } movieClip 1791 { } movieClip 1792 { instance of movieClip 1721 { onClipEvent (load) { _visible = false; } } frame 2 { stop(); if (thisischaracter eq 1) { if (_root.melee_slot_item.id eq 2103) { gotoAndStop(3); } else { if (_root.melee_slot_item.id eq 2104) { gotoAndStop(4); } } } } frame 3 { stop(); } frame 4 { stop(); } } movieClip 1801 { frame 1 { doshoot = 0; } instance of movieClip 1792 { onClipEvent (load) { thisischaracter = 1; } } frame 2 { ended = 0; } frame 10 { dohit = 1; } frame 19 { ended = 1; } } movieClip 1803 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 8 { doshoot = 1; } frame 16 { ended = 1; } } movieClip 1804 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 8 { doshoot = 1; } frame 15 { ended = 1; } } movieClip 1805 enemy_type_999 { frame 1 { stop(); } frame 1 { } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1807 { } movieClip 1808 testDot { frame 35 { removeMovieClip(this); } } movieClip 1810 { } movieClip 1811 shot_line_1 { frame 5 { removeMovieClip(this); } } movieClip 1820 ground_hit_1 { frame 5 { removeMovieClip(this); } } movieClip 1829 ground_hit_2 { frame 5 { removeMovieClip(this); } } movieClip 1836 ground_hit_3 { frame 4 { removeMovieClip(this); } } movieClip 1842 circle { frame 30 { removeMovieClip(this); } } movieClip 1849 { frame 1 { stop(); } } movieClip 1850 { } movieClip 1851 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 5 { doshoot = 1; } frame 16 { ended = 1; animation_has_ended_for_real = 1; } } movieClip 1852 { frame 14 { done = 1; } } movieClip 1853 enemy_type_500 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1873 dead_enemy_type_500 { frame 63 { stop(); } } movieClip 1875 { } movieClip 1877 { } movieClip 1879 { } movieClip 1881 { } movieClip 1883 { } movieClip 1890 { frame 1 { stop(); } } movieClip 1891 { } movieClip 1892 { frame 1 { ended = 0; } frame 1 { lastshot = 0; } frame 8 { shoot = 1; } frame 11 { shoot = 1; } frame 14 { shoot = 1; } frame 17 { shoot = 1; } frame 20 { shoot = 1; } frame 23 { shoot = 1; } frame 26 { shoot = 1; } frame 29 { shoot = 1; } frame 32 { shoot = 1; } frame 35 { shoot = 1; lastshot = 1; } frame 42 { ended = 1; } } movieClip 1893 { frame 14 { done = 1; } } movieClip 1894 enemy_type_510 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1910 dead_enemy_type_510 { frame 100 { stop(); } } movieClip 1912 { frame 1 { stop(); } } movieClip 1913 { } movieClip 1914 { frame 1 { ended = 0; } frame 10 { dodmg = 1; } frame 19 { ended = 1; } } movieClip 1915 enemy_type_530 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1917 { frame 1 { stop(); } } movieClip 1918 { } movieClip 1919 { frame 1 { ended = 0; } frame 11 { dodmg = 1; } frame 18 { ended = 1; } } movieClip 1920 enemy_type_540 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1921 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 8 { doshoot = 1; } frame 16 { ended = 1; } } movieClip 1922 enemy_type_520 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1925 { } movieClip 1927 { } button 1929 { on (release, releaseOutside) { if (outofrange != 1) { _root.lootboxmousovered = 'none'; _root.lootBoxOpen(serialnum); } _root.wehaveclickedsumka = serialnum; _root.zalochilis_nasumku = this; } on (rollOver, dragOver) { _root.mouseoverSUMKA = 1; _root.lootboxmousovered = this; } on (rollOut, dragOut) { _root.mouseoverSUMKA = 0; _root.bottommenu.showinfo = ''; outofrange = 1; _root.lootboxmousovered = 'none'; } } movieClip 1930 { } movieClip 1931 { } movieClip 1932 lootbox { } movieClip 1951 dead_enemy_type_501 { frame 63 { stop(); } } movieClip 1953 { frame 1 { stop(); } } movieClip 1954 { } movieClip 1955 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 5 { doshoot = 1; } frame 16 { ended = 1; animation_has_ended_for_real = 1; } } movieClip 1956 { frame 14 { done = 1; } } movieClip 1957 enemy_type_501 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1959 { frame 1 { stop(); } } movieClip 1960 { } movieClip 1961 { frame 1 { ended = 0; } frame 10 { dodmg = 1; } frame 19 { ended = 1; } } movieClip 1962 enemy_type_531 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1964 { frame 1 { stop(); } } movieClip 1965 { } movieClip 1966 { frame 1 { ended = 0; } frame 11 { dodmg = 1; } frame 18 { ended = 1; } } movieClip 1967 enemy_type_541 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1968 { frame 1 { doshoot = 0; } frame 2 { ended = 0; } frame 8 { doshoot = 1; } frame 16 { ended = 1; } } movieClip 1969 enemy_type_521 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1971 { } movieClip 1973 { } movieClip 1975 { } movieClip 1977 { } movieClip 1978 { } movieClip 1980 { frame 1 { stop(); } } movieClip 1981 { } movieClip 1982 { frame 1 { ended = 0; } frame 1 { lastshot = 0; } frame 8 { shoot = 1; } frame 11 { shoot = 1; } frame 14 { shoot = 1; } frame 17 { shoot = 1; } frame 20 { shoot = 1; } frame 23 { shoot = 1; } frame 26 { shoot = 1; } frame 29 { shoot = 1; } frame 32 { shoot = 1; } frame 35 { shoot = 1; lastshot = 1; } frame 42 { ended = 1; } } movieClip 1983 { frame 14 { done = 1; } } movieClip 1984 enemy_type_511 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1985 { frame 1 { stop(); } } movieClip 1986 { } movieClip 1987 { } movieClip 1988 { frame 1 { ended = 0; } frame 2 { dodmg = 1; } frame 6 { ended = 1; } } movieClip 1989 enemy_type_3 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 1991 { frame 9 { stop(); } } movieClip 1994 dead_enemy_type_3 { frame 95 { stop(); } } movieClip 1997 { frame 1 { stop(); } } movieClip 1998 { } movieClip 1999 { } movieClip 2000 { frame 1 { ended = 0; } frame 2 { dodmg = 1; } frame 6 { ended = 1; } } movieClip 2001 enemy_type_5 { frame 1 { stop(); } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 2003 { frame 9 { stop(); } } movieClip 2007 dead_enemy_type_5 { frame 95 { stop(); } } movieClip 2008 { frame 1 { stop(); } } movieClip 2009 { } movieClip 2010 { frame 2 { ended = 0; } frame 5 { dodmg = 1; } frame 10 { ended = 1; } } movieClip 2011 enemy_type_9 { frame 1 { stop(); } frame 1 { stop(); } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 2012 { frame 11 { stop(); } } movieClip 2016 dead_enemy_type_9 { frame 85 { stop(); } } movieClip 2018 { frame 9 { stop(); } } movieClip 2022 dead_enemy_type_6 { frame 95 { stop(); } } movieClip 2023 { frame 1 { stop(); } } movieClip 2024 { } movieClip 2025 { frame 2 { ended = 0; } frame 5 { dodmg = 1; } frame 17 { ended = 1; } } movieClip 2026 enemy_type_6 { frame 1 { stop(); } instance selection_ of movieClip 937 { onClipEvent (load) { _visible = false; } } instance hpbar of movieClip 938 { onClipEvent (load) { _visible = false; } } instance ring of movieClip 973 { onClipEvent (load) { _visible = false; } } } movieClip 2044 dead_enemy_type_999 { frame 65 { stop(); } } movieClip 2047 { } movieClip 2053 { } button 2056 { on (release) { if (_root.handheld.item != 'none') { _root.handheld.item = 'none'; play(); } } on (rollOut, dragOut) { _root.mousoceritem = 'none'; } on (rollOver, dragOver) { gfhdgfjgfj = {}; gfhdgfjgfj.id = 10; _root.mousoceritem = gfhdgfjgfj; } } movieClip 2057 { } movieClip 2059 { frame 1 { stop(); } } movieClip 2062 { } movieClip 2065 { } // unknown tag 88 length 78 button 2113 { on (release) { gotoAndStop(2); } } button 2121 { on (release) { gotoAndStop(3); } } movieClip 2125 { } button 2162 { on (release) { gotoAndStop(1); } } movieClip 2164 { } movieClip 2168 { } movieClip 2169 { frame 1 { stop(); } } button 2174 { on (release) { _root.openCloseInventoryButton(); } } movieClip 2175 inventory_menu { instance of movieClip 501 { onClipEvent (enterFrame) { gotoAndStop(_root.doselect_array); } onClipEvent (load) { cacheAsBitmap = true; } } instance slot_ring1 of movieClip 868 { onClipEvent (load) { whichslotisit = 'ring1'; } } instance slot_ring2 of movieClip 868 { onClipEvent (load) { whichslotisit = 'ring2'; } } instance ammoSHow of movieClip 887 { onClipEvent (load) { yifftimer = 9999; } onClipEvent (enterFrame) { yifftimer += 0.03333333333333333; if (!_root.firearms_slot_item.ammo_capacity or _root.showkukla != 1) { yifftimer = 9999; } if (yifftimer > 0.5) { yifftimer = 0; magazin = _root.firearms_slot_item.ammo_capacity; showvar1 = _root.current_used_amo_inventory; showvar2 = _root.current_amo_in_gun + '/' + magazin; if (!_root.firearms_slot_item.ammo_capacity or _root.showkukla != 1) { _visible = false; } else { _visible = true; } } } } instance of movieClip 2065 { onClipEvent (load) { cacheAsBitmap = true; } } instance statspanel of movieClip 2169 { onClipEvent (load) { cacheAsBitmap = true; } } } movieClip 2178 { } movieClip 2181 { } button 2183 { on (release) { removeMovieClip(this); } } movieClip 2188 { } movieClip 2191 { } button 2193 { on (press) { minusisdown = 1; } on (release, releaseOutside) { minusisdown = 0; } } movieClip 2196 { } button 2199 { on (press) { plusisdown = 1; } on (release, releaseOutside) { plusisdown = 0; } } movieClip 2202 { } movieClip 2205 { } button 2209 { on (release) { _root.BTN_ammountDispenser_ok(); } } movieClip 2212 { } button 2215 { on (release) { _root.BTN_ammountDispenser_takeall(); _root.BTN_ammountDispenser_ok(); } } button 2217 { on (press) { startdrag = 1; } on (release, releaseOutside) { startdrag = 0; } } movieClip 2218 ammountDispenser { } movieClip 2226 { } movieClip 2227 { } movieClip 2231 { } movieClip 2235 { } movieClip 2236 { frame 2 { skp = _root.character_arr[_root.skill_points_id]; stp = _root.character_arr[_root.stat_points_id]; prp = _root.character_arr[_root.perk_points_id]; if (skp > 0 or stp > 0 or prp > 0) { play(); } else { gotoAndPlay(1); } } frame 18 { skp = _root.character_arr[_root.skill_points_id]; stp = _root.character_arr[_root.stat_points_id]; prp = _root.character_arr[_root.perk_points_id]; if (skp > 0 or stp > 0 or prp > 0) { gotoAndPlay(17); } else { play(); } } } movieClip 2239 { } movieClip 2270 { } movieClip 2274 { } button 2277 { on (release) { _root.increaseSkill('firearms'); } } button 2280 { on (release) { _root.increaseSkill('merchant'); } } button 2282 { on (release) { _root.increaseSkill('medic'); } } button 2284 { on (release) { _root.increaseSkill('melee'); } } movieClip 2285 { } movieClip 2287 { } movieClip 2305 { instance of movieClip 2287 { onClipEvent (load) { _visible = false; } } } button 2307 { on (release) { _root.openCloseCHarsheetButton(); } } movieClip 2310 { } button 2314 { on (release) { _root.str_tempoSHeet = 0; _root.per_tempoSHeet = 0; _root.end_tempoSHeet = 0; _root.cha_tempoSHeet = 0; _root.int_tempoSHeet = 0; _root.agi_tempoSHeet = 0; _root.luk_tempoSHeet = 0; _root.firearms_tempoSHeet = 0; _root.melee_tempoSHeet = 0; _root.energy_tempoSHeet = 0; _root.merchant_tempoSHeet = 0; _root.lockpick_tempoSHeet = 0; _root.outdoor_tempoSHeet = 0; _root.medic_tempoSHeet = 0; _root.science_tempoSHeet = 0; _root.openCloseCHarsheetButton(); } } movieClip 2317 { } movieClip 2318 { } movieClip 2322 { frame 1 { stop(); } } movieClip 2325 { } movieClip 2326 { } movieClip 2331 { frame 1 { stop(); } } movieClip 2334 { } movieClip 2336 { } button 2340 { on (release) { _root.increaseStat('str'); } } button 2341 { on (release) { _root.increaseStat('per'); } } button 2342 { on (release) { _root.increaseStat('agi'); } } button 2343 { on (release) { _root.increaseStat('end'); } } button 2344 { on (release) { _root.increaseStat('luk'); } } movieClip 2347 { } movieClip 2350 { } movieClip 2351 { } button 2354 { on (release) { _root.charSHeetLVLUPcancel(); } } movieClip 2356 { } movieClip 2357 { } movieClip 2359 { } movieClip 2360 character_sheet { instance of movieClip 2239 { onClipEvent (load) { cacheAsBitmap = true; } } } movieClip 2366 { } movieClip 2367 { } button 2368 { on (release) { removeMovieClip(this); } } movieClip 2371 { } button 2375 { on (release) { _root.pickUpAllLoot(); } } movieClip 2376 inventory_pickloot { instance of movieClip 501 { onClipEvent (enterFrame) { gotoAndStop(_root.doselect_array); } onClipEvent (load) { cacheAsBitmap = true; } } instance encumsign of movieClip 2367 { onClipEvent (load) { _visible = false; } } instance container_slot_0 of movieClip 779 { onClipEvent (load) { thisislootbox = 0; } } instance container_slot_1 of movieClip 779 { onClipEvent (load) { thisislootbox = 1; } } instance container_slot_2 of movieClip 779 { onClipEvent (load) { thisislootbox = 2; } } instance container_slot_3 of movieClip 779 { onClipEvent (load) { thisislootbox = 3; } } instance container_slot_4 of movieClip 779 { onClipEvent (load) { thisislootbox = 4; } } instance container_slot_5 of movieClip 779 { onClipEvent (load) { thisislootbox = 5; } } instance container_slot_6 of movieClip 779 { onClipEvent (load) { thisislootbox = 6; } } instance container_slot_7 of movieClip 779 { onClipEvent (load) { thisislootbox = 7; } } instance container_slot_8 of movieClip 779 { onClipEvent (load) { thisislootbox = 8; } } instance container_slot_9 of movieClip 779 { onClipEvent (load) { thisislootbox = 9; } } instance container_slot_10 of movieClip 779 { onClipEvent (load) { thisislootbox = 10; } } instance container_slot_11 of movieClip 779 { onClipEvent (load) { thisislootbox = 11; } } instance container_slot_12 of movieClip 779 { onClipEvent (load) { thisislootbox = 12; } } instance container_slot_13 of movieClip 779 { onClipEvent (load) { thisislootbox = 13; } } instance container_slot_14 of movieClip 779 { onClipEvent (load) { thisislootbox = 14; } } instance container_slot_15 of movieClip 779 { onClipEvent (load) { thisislootbox = 15; } } } movieClip 2377 { frame 1 { stop(); } instance of movieClip 977 enemy_type_18 { onClipEvent (load) { if (!_root.hpbarwidthres) { _root.hpbarwidthres = hpbar._width; } } } } frame 42 { if (_root.goingtoshop eq 1) { _root.goingtoshop = 0; trace(7777777777.0); gotoAndStop(7); } else { stopAllSounds(); trace(1212121212); gotoAndPlay(12); } } frame 60 { _root.kursor_depth = 2000; _root.attachMovie('kursor', 'kursor', _root.kursor_depth); startDrag('_root.kursor', true); Mouse.hide(); } frame 60 { stop(); } movieClip 2380 { } movieClip 2382 { } movieClip 2384 { } movieClip 2386 { } movieClip 2389 { } movieClip 2391 { } movieClip 2393 { } movieClip 2396 { } movieClip 2399 { } movieClip 2401 { } movieClip 2403 { } movieClip 2405 { } movieClip 2407 { } movieClip 2409 { } movieClip 2411 { } movieClip 2413 { } movieClip 2415 { frame 38 { stop(); } } movieClip 2417 { } movieClip 2418 { } movieClip 2420 { } movieClip 2422 { } movieClip 2424 { } movieClip 2426 { } movieClip 2428 { } movieClip 2430 { } movieClip 2432 { } movieClip 2434 { } movieClip 2436 { } movieClip 2438 { } movieClip 2439 { frame 37 { stop(); } } movieClip 2441 { } movieClip 2442 { } movieClip 2445 { } movieClip 2446 { } movieClip 2447 { instance of movieClip 2446 { onClipEvent (enterFrame) { aa._rotation += 0.5; } } } movieClip 2450 { } movieClip 2451 { instance of movieClip 2450 { onClipEvent (enterFrame) { _rotation = _rotation - 0.1; } } } movieClip 2453 { frame 164 { _root.play(); } } instance of movieClip 2453 { } movieClip 2455 { } button 2457 { on (release) { play(); } } movieClip 2458 { } instance of movieClip 2458 { onClipEvent (load) { _visible = false; } } frame 61 { stop(); } movieClip 2460 { } movieClip 2464 { } movieClip 2467 { } movieClip 2468 { } movieClip 2469 { } movieClip 2470 { } movieClip 2471 { } movieClip 2474 { } movieClip 2477 { } movieClip 2479 { } movieClip 2481 { } movieClip 2484 { } movieClip 2485 { frame 81 { stop(); _root.play(); } } frame 62 { stop(); } movieClip 2489 { frame 117 { _root.play(); } } frame 63 { gotoAndStop(3); }




http://swfchan.com/18/89386/info.shtml
Created: 29/3 -2019 00:37:21 Last modified: 29/3 -2019 00:37:21 Server time: 17/05 -2024 11:07:53