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

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

512758_Medieval_Rampage___The_Rea202c.swf

This is the info page for
Flash #215000

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


ActionScript [AS1/AS2]
Combined Code
movieClip 26 { frame 1 { stop(); } } movieClip 39 { frame 1 { stop(); } } movieClip 40 { } movieClip 45 { } movieClip 49 { } movieClip 51 { } movieClip 53 spike4 { } movieClip 55 spike5 { } movieClip 57 { } movieClip 58 { } movieClip 59 spike { } movieClip 61 { } movieClip 62 spike3 { } movieClip 64 spike8 { } movieClip 66 spike9 { } movieClip 67 spike2 { frame 1 { stop(); } } movieClip 80 { frame 1 { stop(); } } movieClip 81 { } movieClip 85 archer { frame 1 { stop(); } } movieClip 94 enemy1a { } movieClip 96 longbow { } movieClip 98 shortbow { } movieClip 100 crossbow { } movieClip 102 compositebow { } movieClip 104 alpha_sound { } // unknown tag 88 length 81 movieClip 109 portalstrike { } movieClip 112 { } movieClip 114 { } movieClip 115 { } movieClip 116 powerup3 { } movieClip 118 { } movieClip 119 powerup2 { } movieClip 122 { } movieClip 123 { } movieClip 124 { } movieClip 125 powerup { } movieClip 128 aim { frame 1 { stop(); } } // unknown tag 88 length 81 movieClip 131 newAlert1 { } movieClip 132 newEnemies { frame 100 { stop(); } } movieClip 134 { } movieClip 136 { } movieClip 137 newEnemies2 { frame 200 { stop(); } } movieClip 140 { } movieClip 142 finishedbtn { } movieClip 144 aimer { } movieClip 146 { } movieClip 147 redFlash { frame 10 { this.removeMovieClip(); } } movieClip 149 { } movieClip 150 { } movieClip 151 { frame 1 { stop(); } frame 10 { _parent.removeMovieClip(); } } movieClip 153 { } movieClip 154 orangedes { frame 4 { stop(); } } movieClip 157 { } movieClip 158 { } movieClip 159 { } movieClip 160 il1 { } movieClip 162 { } movieClip 163 powerup4 { } movieClip 165 { } movieClip 166 up1 { frame 100 { stop(); } } movieClip 168 { } movieClip 169 up2 { frame 100 { stop(); } } movieClip 171 { } movieClip 172 up3 { frame 100 { stop(); } } movieClip 174 { } movieClip 175 up4 { frame 100 { stop(); } } movieClip 177 { } movieClip 178 rtb { } movieClip 180 { } movieClip 182 moreGames { frame 35 { stop(); } } movieClip 185 { } movieClip 186 { } movieClip 187 shield { } movieClip 189 { } movieClip 190 powerup5 { } movieClip 192 { } movieClip 193 up5 { frame 100 { stop(); } } movieClip 195 { } movieClip 196 powerup6 { } movieClip 198 { } movieClip 199 up6 { frame 100 { stop(); } } movieClip 202 { } movieClip 203 np1 { frame 100 { stop(); } } movieClip 205 { } movieClip 206 np2 { frame 100 { stop(); } } movieClip 209 { } movieClip 210 np3 { frame 100 { stop(); } } movieClip 212 { } movieClip 213 np4 { frame 100 { stop(); } } movieClip 216 coin { } movieClip 218 enbullet { } movieClip 220 nightmode { } movieClip 223 coin3a { } movieClip 227 { } movieClip 229 { } movieClip 232 continue2 { } movieClip 234 { } movieClip 235 lavapit { } movieClip 237 { } movieClip 239 { } movieClip 241 { } movieClip 242 bhealth { } movieClip 245 music { frame 1 { stop(); } } movieClip 247 spike7 { } movieClip 249 countdownoutline { } movieClip 251 { } movieClip 252 countdown { } movieClip 254 { } movieClip 255 spike6 { } movieClip 256 yy7 { } movieClip 257 yy8 { } movieClip 261 { frame 1 { stop(); } } movieClip 262 { } movieClip 263 { frame 28 { _parent.removeMovieClip(); } } movieClip 264 scoreMovie { } movieClip 267 blood3 { } movieClip 272 { frame 1 { stop(); } } movieClip 274 { } movieClip 276 { } movieClip 278 { } movieClip 280 { } movieClip 282 { } movieClip 284 { } movieClip 286 { } movieClip 288 { } movieClip 290 { } movieClip 292 { } movieClip 293 { } movieClip 295 { } movieClip 297 { } movieClip 299 { } movieClip 301 { } movieClip 303 { } movieClip 305 { } movieClip 307 { } movieClip 309 { } movieClip 311 { } movieClip 312 cheatscreen { } movieClip 324 hat { frame 1 { stop(); } } movieClip 326 explosion2 { } movieClip 328 explosion { } movieClip 329 { } movieClip 332 { } movieClip 333 { } movieClip 337 { frame 1 { stop(); } } movieClip 340 { frame 1 { stop(); } } movieClip 341 paused2 { } movieClip 344 coin2a { } movieClip 347 blood2 { } movieClip 350 blood1 { } movieClip 353 { } movieClip 355 { } movieClip 356 { } movieClip 357 { frame 1 { stop(); } frame 10 { _parent.removeMovieClip(); } } movieClip 359 { } movieClip 360 { frame 1 { stop(); } frame 10 { _parent.removeMovieClip(); } } movieClip 362 { } movieClip 363 { frame 1 { stop(); } frame 10 { _parent.removeMovieClip(); } } movieClip 364 enemy0 { frame 1 { stop(); } } movieClip 367 headbar { } movieClip 369 intro3 { } movieClip 371 { } movieClip 373 { } movieClip 424 enemy7attack { frame 37 { _parent.gotoAndStop(1); } } 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 onEnterFrame() { if (on_frame == 1) { delayM -= 1; bytes_loaded = Math.round(_root.getBytesLoaded()); bytes_total = Math.round(_root.getBytesTotal()); getPercent = bytes_loaded / bytes_total; inder._xscale = getPercent * 100; if (bytes_loaded == bytes_total && delayM <= 0) { _root.gotoAndStop(2); on_frame = 2; } } } function itemHandler1(obj, item) { getURL('http://armorgames.com', ''); } stop(); _root.API_Settings = {'movie_id': 8892, 'enc_key': 'HuIxI98YnFvVRaoKyuxMf7EDucVVpEW9', 'debug_mode': false, 'movie_version': ''}; tka = 0; on_frame = 1; onArmor = 0; urlStart = _url.indexOf('://') + 3; urlEnd = _url.indexOf('/', urlStart); domain = _url.substring(urlStart, urlEnd); LastDot = domain.lastIndexOf('.') - 1; domEnd = domain.lastIndexOf('.', LastDot) + 1; domain = domain.substring(domEnd, domain.length); delayM = 70; if (domain == 'www.armorgames.com' || domain == 'armorgames.com') { onArmor = 1; } else {} visitedArmor = 0; visitedCreds = 0; visitedBesti = 0; visitedLevel = 0; if (onArmor == 0) { var CPMStarContentSpotID = '0'; System.security.allowDomain('server.cpmstar.com'); adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=603QED1EED66'); __com_mochibot__('3afb3ed1', this, 10301, true); __com_mochibot__('7fe700b9', this, 10301, true); } else { adBox._x = 1000; } mochi.MochiServices.connect('89db28dbf8b4a93c'); var myMenu = new ContextMenu(); myMenu.hideBuiltInItems(); item1 = new ContextMenuItem('Play More Games', itemHandler1); myMenu.customItems.push(item1); _root.menu = myMenu; } movieClip 427 { } // unknown tag 88 length 68 movieClip 433 { } movieClip 437 { } movieClip 439 { } movieClip 441 { } movieClip 443 { } movieClip 445 { } movieClip 448 { } movieClip 451 { } movieClip 453 { } movieClip 455 { } movieClip 457 { } movieClip 459 { } movieClip 463 { frame 1 { stop(); } } button 466 { on (release) { this._visible = false; } } // unknown tag 88 length 62 movieClip 474 { frame 1 { _visible = false; var checkConnection = function (event) { if (!event.success) { _visible = true; gotoAndStop(3); } }; if (com.Newgrounds.NewgroundsAPI.isNewgrounds() || _root.API_Settings.debug_mode) { com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection); if (!com.Newgrounds.NewgroundsAPI.hasUserSession() && !_root.API_Settings.debug_mode) { _visible = true; gotoAndStop(2); } } com.Newgrounds.NewgroundsAPI.setMovieVersion(_root.API_Settings.movie_version); com.Newgrounds.NewgroundsAPI.connectMovie(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode); com.Newgrounds.NewgroundsAPI.loadMedals(); stop(); } } movieClip 4979 __Packages.com.Newgrounds.BaseN { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.BaseN) { var v1 = function (hash) { this.ceiling = 100000000000000.0; if (hash) { this.hashIndex = hash; } else { this.hashIndex = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/'; } this.bitSize = this.hashIndex.length; this.hashVal = new Object(); this.i = 0; while (this.i < this.bitSize) { this.hashVal[this.hashIndex.charAt(this.i)] = this.i; ++this.i; } }; com.Newgrounds.BaseN = v1; var v2 = v1.prototype; v2.verify = function (s) { if (this.hashVal[s] != undefined) { return true; } else { return false; } }; v2.encode = function (n, minchars) { this.debug.lastencode = ''; if (typeof this.i != 'string') { n = n.toString(); } if (n.charAt(0) == '-') { var v3 = '-'; n = n.substring(1); } else { var v3 = ''; } if ((String(n)).indexOf('.') > -1) { var v4 = (String(n)).split('.', 2); return v3 + this.baseNEncoder(v4[0], minchars) + '.' + this.baseNEncoder(v4[1]); } else { this.debug.lastencode += '\tNo decimal\r'; return v3 + this.baseNEncoder(n, minchars); } }; v2.decode = function (s) { var v4 = 1; if (s.charAt(0) == '-') { v4 = -1; s = s.substring(1, s.length); } var v3 = s.indexOf('.'); if (v3 > -1) { var v5 = Math.pow(10, this.baseNDecoder(s.substring(v3 + 1, s.length))); return (this.baseNDecoder(s.substring(0, v3)) / v5) * v4; } else { return this.baseNDecoder(s) * v4; } }; v2.baseNEncoder = function (n, minchars) { if (!minchars) { minchars = 1; } var v4 = ''; while (n != 0) { n = Math.round(n); var v3 = n % this.bitSize; if (Math.round(v3) != v3) { trace('BaseN failed on ' + n + '%' + this.bitSize + ' = ' + v3 + ' ' + int(n) + ' ' + int(this.bitSize)); } v4 = this.hashIndex.charAt(v3) + v4; this.debug.lastencode += '\t-> n:' + n + ' % bitSize:' + this.bitSize + ' = ' + v3 + ', final char=' + v4 + '\n'; n -= v3; n /= this.bitSize; } if (minchars) { while (v4.length < minchars) { v4 = this.hashIndex.charAt(0) + v4; } } return v4; }; v2.baseNDecoder = function (s) { var v2 = 0; var v6 = 0; this.i = 0; while (this.i < s.length) { var v3 = s.charAt(s.length - this.i - 1); if (v3 == this.hashIndex.charAt(0)) { var v5 = 0; } else { var v5 = this.hashVal[v3] * Math.pow(this.bitSize, this.i); } v2 += v5; if (v2 >= this.ceiling) { v6 += (v2 - v2 % this.ceiling) / this.ceiling; v2 %= this.ceiling; } ++this.i; } if (v6 > 0) { v2 = '' + v2; while (v2.length < (this.ceiling.toString()).length - 1) { v2 = '0' + v2; } v2 = '' + v6 + v2; } return v2; }; v2.debug = new Object(); ASSetPropFlags(com.Newgrounds.BaseN.prototype, null, 1); } #endinitclip } movieClip 4980 __Packages.com.Newgrounds.NewgroundsAPIError { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPIError) { var v1 = function (error, msg) { if ((Number(error)).toString() == String(error)) { error = Number(error); } else { if (com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]) { error = com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]; } else { error = 0; } } this.code = error; this.message = msg; this.name = com.Newgrounds.NewgroundsAPIError.error_names[error]; this.alias = com.Newgrounds.NewgroundsAPIError.aliases[error]; }; com.Newgrounds.NewgroundsAPIError = v1; var v2 = v1.prototype; v1.init_codes = function () { var v2 = new Object(); var v1 = 0; while (v1 < com.Newgrounds.NewgroundsAPIError.aliases.length) { v2[com.Newgrounds.NewgroundsAPIError.aliases[v1]] = v1; ++v1; } return v2; }; v1.init_names = function () { var v5 = new Array(); var v3 = 0; while (v3 < com.Newgrounds.NewgroundsAPIError.aliases.length) { var v2 = (com.Newgrounds.NewgroundsAPIError.aliases[v3].toLowerCase()).split('_'); var v1 = 0; while (v1 < v2.length) { v2[v1] = (v2[v1].substr(0, 1)).toUpperCase() + v2[v1].substr(1, v2[v1].length); for (var v4 in com.Newgrounds.NewgroundsAPIError.always_caps) { if (v2[v1].toUpperCase() == com.Newgrounds.NewgroundsAPIError.always_caps[v4]) { v2[v1] = v2[v1].toUpperCase(); } } ++v1; } v5[v3] = v2.join(' '); ++v3; } return v5; }; v2.isError = function () { return true; }; v1.aliases = new Array('UNKNOWN_ERROR', 'INVALID_API_ID', 'MISSING_PARAM', 'INVALID_STAT_ID', 'INVALID_COMMAND_ID', 'FLASH_ADS_NOT_APPROVED', 'PERMISSION_DENIED', 'IDENTIFICATION_REQUIRED', 'INVALID_EMAIL_ADDRESS', 'BANNED_USER', 'SESSION_EXPIRED', 'INVALID_SCORE', 'INVALID_MEDAL', 'INVALID_FOLDER', 'FILE_NOT_FOUND', 'SITE_ID_REQUIRED', 'UPLOAD_IN_PROGRESS', 'USER_CANCELLED', 'CONFIRM_REQUEST', 'CONNECTION_FAILED'); v1.always_caps = new Array('API', 'URL', 'ID'); v1.error_codes = com.Newgrounds.NewgroundsAPIError.init_codes(); v1.error_names = com.Newgrounds.NewgroundsAPIError.init_names(); v2.code = 0; ASSetPropFlags(com.Newgrounds.NewgroundsAPIError.prototype, null, 1); } #endinitclip } movieClip 4981 __Packages.com.Newgrounds.NewgroundsAPI { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPI) { var v1 = function () {}; com.Newgrounds.NewgroundsAPI = v1; var v2 = v1.prototype; v1.setMovieVersion = function (v) { if (v) { com.Newgrounds.NewgroundsAPI.version = String(v); } }; v1.setUserEmail = function (e) { com.Newgrounds.NewgroundsAPI.user_email = e; }; v1.getOfficialVersionURL = function () { var v1 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?tracker_id=' + com.Newgrounds.NewgroundsAPI.movie_id + '&command_id=' + com.Newgrounds.NewgroundsAPI.getCommandID('loadOfficalVersion') + '&seed=' + Math.random(); if (com.Newgrounds.NewgroundsAPI.debug) { v1 += '&debug=1'; } return v1; }; v1.hasUserSession = function () { if (com.Newgrounds.NewgroundsAPI.session_id && com.Newgrounds.NewgroundsAPI.publisher_id) { return true; return false; } if (_root.NewgroundsAPI_PublisherID && _root.NewgroundsAPI_SessionID) { return true; } return false; }; v1.isNewgrounds = function () { return com.Newgrounds.NewgroundsAPI.publisher_id == 1 || _root.NewgroundsAPI_PublisherID == 1 || ((com.Newgrounds.NewgroundsAPI.getHost()).toLowerCase()).indexOf('ungrounded.net') > -1; }; v1.hasPublisher = function () { return com.Newgrounds.NewgroundsAPI.publisher_id || _root.NewgroundsAPI_PublisherID; }; v1.hasUserEmail = function () { if (com.Newgrounds.NewgroundsAPI.user_email) { return true; } return false; }; v1.connectionTimeOut = function () { clearInterval(com.Newgrounds.NewgroundsAPI.timeout); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError('CONNECTION_FAILED', 'Connection to NewgroundsAPI gateway timed out.')); }; v1.connectMovie = function (m_id, encrypt_key, debug_mode) { if (com.Newgrounds.NewgroundsAPI.connected) { return undefined; } var v2 = function () { com.Newgrounds.NewgroundsAPI.connectionTimeOut(); }; com.Newgrounds.NewgroundsAPI.timeout = setInterval(v2, 8000, null); if (!m_id) { com.Newgrounds.NewgroundsAPI.fatalError('NewgroundsAPI.connectMovie() - missing required movie_id parameter', 'connectMovie'); } com.Newgrounds.NewgroundsAPI.movie_id = String(m_id); com.Newgrounds.NewgroundsAPI.tracker_id = Number(com.Newgrounds.NewgroundsAPI.movie_id.substring(0, com.Newgrounds.NewgroundsAPI.movie_id.indexOf(':'))); com.Newgrounds.NewgroundsAPI.encryption_key = encrypt_key; com.Newgrounds.NewgroundsAPI.debug = debug_mode; if (_root.NewgroundsAPI_PublisherID) { com.Newgrounds.NewgroundsAPI.publisher_id = _root.NewgroundsAPI_PublisherID; if (_root.NewgroundsAPI_SessionID) { com.Newgrounds.NewgroundsAPI.session_id = _root.NewgroundsAPI_SessionID; } } else { com.Newgrounds.NewgroundsAPI.publisher_id = 1; com.Newgrounds.NewgroundsAPI.session_id = null; com.Newgrounds.NewgroundsAPI.user_id = 0; com.Newgrounds.NewgroundsAPI.user_name = 'Guest'; } if (_root.NewgroundsAPI_UserName) { com.Newgrounds.NewgroundsAPI.user_name = _root.NewgroundsAPI_UserName; } if (_root.NewgroundsAPI_UserID) { com.Newgrounds.NewgroundsAPI.user_id = _root.NewgroundsAPI_UserID; } com.Newgrounds.NewgroundsAPI.connected = true; com.Newgrounds.NewgroundsAPI.sendCommand('connectMovie', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'movie_version': com.Newgrounds.NewgroundsAPI.version}); }; v1.getHost = function () { if (!com.Newgrounds.NewgroundsAPI.host) { var v1 = _url; if (v1.indexOf('http://') > -1 or v1.indexOf('https://') > -1) { com.Newgrounds.NewgroundsAPI.host = (v1.split('/'))[2].toLowerCase(); return com.Newgrounds.NewgroundsAPI.host; } com.Newgrounds.NewgroundsAPI.host = 'localhost'; } return com.Newgrounds.NewgroundsAPI.host; }; v1.loadNewgrounds = function () { com.Newgrounds.NewgroundsAPI.sendCommand('loadNewgrounds', {'host': com.Newgrounds.NewgroundsAPI.getHost()}, true); }; v1.loadMySite = function () { com.Newgrounds.NewgroundsAPI.sendCommand('loadMySite', {'host': com.Newgrounds.NewgroundsAPI.getHost()}); }; v1.loadCustomLink = function (link) { com.Newgrounds.NewgroundsAPI.sendCommand('loadCustomLink', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'link': link}, true); }; v1.logCustomEvent = function (event) { com.Newgrounds.NewgroundsAPI.sendCommand('logCustomEvent', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'event': event}); }; v1.postScore = function (score, value, get_best) { if (!score or value == undefined) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('postScore')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required parameter(s)')); return undefined; } com.Newgrounds.NewgroundsAPI.sendSecureCommand('postScore', {'score': score, 'value': value, 'get_best': get_best}); }; v1.getTodaysScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 't', params, 'getTodaysScores'); }; v1.getYesterdaysScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getYesterdaysScores'); }; v1.getThisWeeksScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'w', params, 'getThisWeeksScores'); }; v1.getThisMonthsScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'm', params, 'getThisMonthsScores'); }; v1.getThisYearsScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getThisYearsScores'); }; v1.getAlltimeScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'a', params, 'getAlltimeScores'); }; v1.getScores = function (score, period, params, command_name) { if (!score) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required score name')); return undefined; } if (!params) { params = new Object(); } if (!com.Newgrounds.NewgroundsAPI.hasUserSession()) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError('SITE_ID_REQUIRED', 'Host \'' + com.Newgrounds.NewgroundsAPI.getHost() + '\' does not have high scores enabled')); return undefined; } params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; params.period = period; params.score = score; if (params.user_id) { var v3 = period; } else { var v3 = period + '-u'; } if (com.Newgrounds.NewgroundsAPI.score_page_counts[v3] == undefined) { params.request_page_count = true; } com.Newgrounds.NewgroundsAPI.sendCommand('getScores', params); }; v1.unlockMedal = function (medal, get_score) { if (!medal) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('unlockMedal')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required medal name')); return undefined; } var v1 = new Object(); v1.medal = medal; if (get_score) { v1.get_score = get_score; } com.Newgrounds.NewgroundsAPI.sendSecureCommand('unlockMedal', v1); }; v1.loadMedals = function () { if (com.Newgrounds.NewgroundsAPI.medals) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, true, {'medals': com.Newgrounds.NewgroundsAPI.medals}); return undefined; } var v1 = new Object(); if (com.Newgrounds.NewgroundsAPI.hasUserSession()) { v1.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; v1.user_id = com.Newgrounds.NewgroundsAPI.user_id; } com.Newgrounds.NewgroundsAPI.sendCommand('getMedals', v1); }; v1.getMedals = function () { return com.Newgrounds.NewgroundsAPI.medals; }; v1.saveLocal = function (save_id, save_data, size_allocation) { if (!com.Newgrounds.NewgroundsAPI.sharedObjects[save_id]) { com.Newgrounds.NewgroundsAPI.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.Newgrounds.NewgroundsAPI.movie_id + '_' + save_id); } com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id] = com.Newgrounds.NewgroundsAPI.encodeData(save_data); com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].flush(); }; v1.loadLocal = function (save_id) { if (!com.Newgrounds.NewgroundsAPI.sharedObjects[save_id]) { com.Newgrounds.NewgroundsAPI.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.Newgrounds.NewgroundsAPI.movie_id + '_' + save_id); } com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].flush(); if (com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id]) { return com.Newgrounds.NewgroundsAPI.decodeData(com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id]); } else { return null; } }; v1.encodeData = function (data) { return com.Newgrounds.NewgroundsAPI.compressHex(com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(data), com.Newgrounds.NewgroundsAPI.encryption_key)); }; v1.decodeData = function (base) { return com.Newgrounds.JSON.decode(com.Newgrounds.RC4.decrypt(com.Newgrounds.NewgroundsAPI.uncompressHex(base), com.Newgrounds.NewgroundsAPI.encryption_key)); }; v1.compressHex = function (hex_value) { var v5 = hex_value.length % 6; var v4 = ''; var v1 = 0; while (v1 < hex_value.length) { var v2 = Number('0x' + hex_value.substr(v1, 6)); v4 += com.Newgrounds.NewgroundsAPI.compressor.encode(v2, 4); v1 += 6; } return v5 + v4; }; v1.uncompressHex = function (base_value) { var v8 = Number(base_value.charAt(0)); var v7 = ''; var v3; var v2 = 1; while (v2 < base_value.length) { var v6 = base_value.substr(v2, 4); var v5 = com.Newgrounds.NewgroundsAPI.compressor.decode(v6); var v1 = com.Newgrounds.NewgroundsAPI.dec2hex(v5); if (v2 + 4 < base_value.length) { v3 = 6; } else { v3 = v8; } while (v1.length < v3) { v1 = '0' + v1; } v7 += v1; v2 += 4; } return v7; }; v1.dec2hex = function (dec) { var v4 = '0123456789ABCDEF'; var v3 = ''; while (dec > 0) { var v2 = dec % 16; v3 = v4.charAt(v2) + v3; dec = (dec - v2) / 16; } return v3; }; v1.saveFile = function (folder, filename, contents, thumbnail_source) { if (!com.Newgrounds.NewgroundsAPI.save_file) { com.Newgrounds.NewgroundsAPI.save_file = new com.Newgrounds.NewgroundsAPISaveFile(com.Newgrounds.NewgroundsAPI.movie_id, folder, filename); com.Newgrounds.NewgroundsAPI.save_file.setContents(contents); if (thumbnail_source) { com.Newgrounds.NewgroundsAPI.save_file.setThumbnail(thumbnail_source); } com.Newgrounds.NewgroundsAPI.save_file.onError = function (msg) { var v1 = new com.Newgrounds.NewgroundsAPIError('PERMISSION_DENIED', msg); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); }; com.Newgrounds.NewgroundsAPI.save_file.onCancel = function (msg) { var v1 = new com.Newgrounds.NewgroundsAPIError('USER_CANCELLED', msg); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); }; com.Newgrounds.NewgroundsAPI.save_file.submit(); } else { var v1 = new com.Newgrounds.NewgroundsAPIError('UPLOAD_IN_PROGRESS', 'Please wait for the previous file to finish uploading'); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); } }; v1.checkFilePrivs = function (folder, filename) { if (com.Newgrounds.NewgroundsAPI.user_id) { var v1 = com.Newgrounds.NewgroundsAPI.user_id; } else { var v1 = 0; } var v2 = {'folder': folder, 'filename': filename, 'user_id': v1, 'publisher_id': com.Newgrounds.NewgroundsAPI.publisher_id}; com.Newgrounds.NewgroundsAPI.sendCommand('checkFilePrivs', v2); }; v1.finishFileSave = function (folder, filename, description, share, file, thumbnail) { var v2; v2 = {'folder': folder, 'filename': filename, 'description': description, 'share': share}; var v1; v1 = {'file': file, 'thumbnail': thumbnail}; com.Newgrounds.NewgroundsAPI.sendSecureCommand('saveFile', v2, null, v1); }; v1.getFiles = function (folder, options) { var v7 = {'name': 1, 'date': 2, 'score': 3}; var v2 = {'user_only': false, 'sort_on': 'date', 'page': 1, 'results_per_page': 20, 'sort_descending': true}; var v6 = new Array(); for (var v10 in v7) { v6.push('\'' + v10 + '\''); } var v4 = new Array(); for (var v9 in v2) { v4.push('\'' + v9 + '\''); } if (options.sort_descending && !v7[options.sort_descending]) { var v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + options.sort_descending + '\' is not a valid sort_on value. Valid values are: ' + v6.join(', ')); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options.sort_descending; } var v8; if (options) { for (v10 in options) { if (v2[v10] == undefined) { v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + v10 + '\' is not a valid option. Valid options are: ' + v4.join(', ')); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options[v10]; } else { if (typeof options[v10] != typeof v2[v10]) { v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'option \'' + v10 + '\' should be the following type: ' + typeof v2[v10]); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options[v10]; } } } v8 = options; } else { v8 = new Object(); } if (com.Newgrounds.NewgroundsAPI.hasUserSession()) { v8.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; v8.user_id = com.Newgrounds.NewgroundsAPI.user_id; } v8.folder = folder; com.Newgrounds.NewgroundsAPI.sendCommand('getFiles', v8); }; v1.getConfirmation = function (command_name, event, msg, target, confirm, cancel) { var v1 = new com.Newgrounds.NewgroundsAPIError('CONFIRM_REQUEST', msg); v1.confirm = function () { target[confirm](); }; v1.cancel = function () { target[cancel](); }; v1.command = com.Newgrounds.NewgroundsAPI.getCommandID(command_name); com.Newgrounds.NewgroundsAPI.callListener(event, false, v1); }; v1.doBlockHost = function (event) { _root.stop(); com.Newgrounds.NewgroundsAPI.initTextFormats(); _root.createEmptyMovieClip('NGAPI_deny_host_overlay', _root.getNextHighestDepth()); _root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100); _root.NGAPI_deny_host_overlay.beginFill(6684672); _root.NGAPI_deny_host_overlay.moveTo(0, 0); _root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0); _root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height); _root.NGAPI_deny_host_overlay.lineTo(0, Stage.height); _root.NGAPI_deny_host_overlay.lineTo(0, 0); _root.NGAPI_deny_host_overlay.endFill(); var v2 = 'This movie has not been approved for use on ' + com.Newgrounds.NewgroundsAPI.getHost() + '.'; v2 += '\r\rFor an aproved copy, please visit:\r'; var v4 = v2.length; v2 += event.data.movie_url; var v3 = v2.length; _root.NGAPI_deny_host_overlay.createTextField('mousekill', 100, 0, 0, Stage.width, Stage.height); _root.NGAPI_deny_host_overlay.createTextField('error', 101, (Stage.width - 400) / 2, Stage.height / 2 - 100, 400, 200); _root.NGAPI_deny_host_overlay.error.text = 'ERROR!'; _root.NGAPI_deny_host_overlay.error.setTextFormat(com.Newgrounds.NewgroundsAPI.error_format); _root.NGAPI_deny_host_overlay.createTextField('message', 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200); _root.NGAPI_deny_host_overlay.message.text = v2; _root.NGAPI_deny_host_overlay.message.multiline = true; _root.NGAPI_deny_host_overlay.message.wordWrap = true; _root.NGAPI_deny_host_overlay.message.html = true; _root.NGAPI_deny_host_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format); com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url; _root.NGAPI_deny_host_overlay.message.setTextFormat(v4, v3, com.Newgrounds.NewgroundsAPI.link_format); }; v1.onNewVersionAvailable = function (event) { _root.stop(); com.Newgrounds.NewgroundsAPI.initTextFormats(); var v2 = new Object(); v2.x = Stage.width / 2; v2.y = Stage.height / 2; _root.createEmptyMovieClip('NGAPI_new_version_overlay', _root.getNextHighestDepth()); _root.NGAPI_new_version_overlay.lineStyle(1, 0, 100); _root.NGAPI_new_version_overlay.beginFill(0, 70); _root.NGAPI_new_version_overlay.moveTo(-10, -10); _root.NGAPI_new_version_overlay.lineTo(-10, 1000); _root.NGAPI_new_version_overlay.lineTo(1000, 1000); _root.NGAPI_new_version_overlay.lineTo(1000, -10); _root.NGAPI_new_version_overlay.lineTo(-10, -10); _root.NGAPI_new_version_overlay.endFill(); _root.NGAPI_new_version_overlay.lineStyle(10, 0, 100); _root.NGAPI_new_version_overlay.beginFill(51); _root.NGAPI_new_version_overlay.moveTo(v2.x - 240, v2.y - 120); _root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y - 120); _root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y + 80); _root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y + 80); _root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y - 120); _root.NGAPI_new_version_overlay.endFill(); _root.NGAPI_new_version_overlay.createEmptyMovieClip('exit', 1000); _root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100); _root.NGAPI_new_version_overlay.exit.beginFill(0, 50); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 210, v2.y - 110); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 110); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 90); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 90); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 110); _root.NGAPI_new_version_overlay.exit.endFill(); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 214, v2.y - 106); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 226, v2.y - 94); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 226, v2.y - 106); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 214, v2.y - 94); _root.NGAPI_new_version_overlay.exit.onMouseUp = function () { if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) { _root.NGAPI_new_version_overlay.removeMovieClip(); } }; var v3 = 'Version ' + event.data.movie_version + ' is now available at:' + '\n'; var v6 = v3.length; v3 += event.data.movie_url; var v4 = v3.length; _root.NGAPI_new_version_overlay.createTextField('mouseblocker', 99, -10, -10, 1000, 1000); _root.NGAPI_new_version_overlay.createTextField('newversion', 100, v2.x - 210, v2.y - 90, 400, 80); _root.NGAPI_new_version_overlay.newversion.text = 'New Version Available!'; _root.NGAPI_new_version_overlay.newversion.setTextFormat(com.Newgrounds.NewgroundsAPI.header_format); _root.NGAPI_new_version_overlay.createTextField('message', 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40); _root.NGAPI_new_version_overlay.message.text = v3; _root.NGAPI_new_version_overlay.message.multiline = true; _root.NGAPI_new_version_overlay.message.wordWrap = true; _root.NGAPI_new_version_overlay.message.html = true; _root.NGAPI_new_version_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format); com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url; _root.NGAPI_new_version_overlay.message.setTextFormat(v6, v4, com.Newgrounds.NewgroundsAPI.link_format); }; v1.initTextFormats = function () { if (!com.Newgrounds.NewgroundsAPI.error_format) { com.Newgrounds.NewgroundsAPI.error_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.error_format.font = 'Arial Black'; com.Newgrounds.NewgroundsAPI.error_format.size = 48; com.Newgrounds.NewgroundsAPI.error_format.color = 16711680; } if (!com.Newgrounds.NewgroundsAPI.header_format) { com.Newgrounds.NewgroundsAPI.header_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.header_format.font = 'Arial Black'; com.Newgrounds.NewgroundsAPI.header_format.size = 24; com.Newgrounds.NewgroundsAPI.header_format.color = 16777215; } if (!com.Newgrounds.NewgroundsAPI.normal_format) { com.Newgrounds.NewgroundsAPI.normal_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.normal_format.font = 'Arial'; com.Newgrounds.NewgroundsAPI.normal_format.bold = true; com.Newgrounds.NewgroundsAPI.normal_format.size = 12; com.Newgrounds.NewgroundsAPI.normal_format.color = 16777215; } if (!com.Newgrounds.NewgroundsAPI.link_format) { com.Newgrounds.NewgroundsAPI.link_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.link_format.color = 16776960; com.Newgrounds.NewgroundsAPI.link_format.underline = true; } }; v1.doEvent = function (e) { switch (com.Newgrounds.NewgroundsAPI.getCommandName(e.command_id)) { case 'connectMovie': clearInterval(com.Newgrounds.NewgroundsAPI.timeout); com.Newgrounds.NewgroundsAPI.sendMessage('You have successfully connected to the Newgrounds API Gateway'); com.Newgrounds.NewgroundsAPI.sendMessage('Movie identified as "' + e.movie_name + '"'); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, e.success, {'movie_name': e.movie_name}); var v4 = false; if (e.ad_status === -1) { var v6 = 'This movie was not approved to run Flash Ads.'; com.Newgrounds.NewgroundsAPI.sendWarning(v6); com.Newgrounds.NewgroundsAPI.sendWarning('visit ' + com.Newgrounds.NewgroundsAPI.AD_TERMS_URL + ' to view our approval guidelines'); if (!e.ad_url) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6)); } else { v4 = true; } } else { if (e.ad_status === 0) { var v6 = 'Flash Ads are currently awaiting approval.'; com.Newgrounds.NewgroundsAPI.sendNotice(v6); if (!e.ad_url) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6)); } else { v4 = true; } } } if (e.ad_url) { com.Newgrounds.NewgroundsAPI.ad_url = unescape(e.ad_url); if (!v4) { com.Newgrounds.NewgroundsAPI.sendMessage('This movie has been approved to run Flash Ads!'); } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, true); } if (e.deny_host) { v6 = com.Newgrounds.NewgroundsAPI.getHost() + ' does not have permission to run this movie!'; com.Newgrounds.NewgroundsAPI.sendWarning(v6); com.Newgrounds.NewgroundsAPI.sendWarning('\tUpdate your API configuration to unblock ' + com.Newgrounds.NewgroundsAPI.getHost()); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED, true, {'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()}); } if (e.movie_version) { com.Newgrounds.NewgroundsAPI.sendWarning('According to your API Configuration, this version is out of date.'); if (com.Newgrounds.NewgroundsAPI.version) { com.Newgrounds.NewgroundsAPI.sendWarning('\tThe this movie is version ' + com.Newgrounds.NewgroundsAPI.version); } com.Newgrounds.NewgroundsAPI.sendWarning('\tThe most current version is ' + e.movie_version); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE, true, {'movie_version': e.movie_version, 'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()}); } if (e.request_portal_url) { com.Newgrounds.NewgroundsAPI.sendCommand('setPortalID', {'portal_url': _url}); } break; case 'logCustomEvent': if (e.success) { com.Newgrounds.NewgroundsAPI.sendMessage('Event \'' + e.event + '\' was logged.'); } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.EVENT_LOGGED, e.success, {'event': e.event}); break; case 'postScore': var v7; if (e.success) { var v3 = 'User'; if (com.Newgrounds.NewgroundsAPI.user_email) { v3 = com.Newgrounds.NewgroundsAPI.user_email; } else { if (com.Newgrounds.NewgroundsAPI.user_name) { v3 = com.Newgrounds.NewgroundsAPI.user_name; } } com.Newgrounds.NewgroundsAPI.sendMessage(v3 + ' posted ' + e.value + ' to \'' + e.score + '\''); v7 = {'score': e.score, 'value': e.value, 'username': v3}; } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORE_POSTED, e.success, v7); break; case 'getScores': var v7 = new Object(); if (e.user_id) { var v5 = e.period; } else { var v5 = e.period + '-u'; } if (e.total_pages) { com.Newgrounds.NewgroundsAPI.score_page_counts[v5] = e.total_pages; } v7.user_id = e.user_id; v7.current_page = e.current_page; v7.total_pages = com.Newgrounds.NewgroundsAPI.score_page_counts[v5]; v7.scores = e.scores; v7.period = com.Newgrounds.NewgroundsAPI.getPeriodName(e.period); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, e.success, v7); break; case 'unlockMedal': if (com.Newgrounds.NewgroundsAPI.medals) { var v2 = 0; while (v2 < com.Newgrounds.NewgroundsAPI.medals.length) { if (com.Newgrounds.NewgroundsAPI.medals[v2].medal_name === e.medal_name) { com.Newgrounds.NewgroundsAPI.medals[v2].medal_unlocked = true; break; } ++v2; } } var v7 = {'medal_name': e.medal_name, 'medal_value': e.medal_value, 'medal_difficulty': e.medal_difficulty}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDAL_UNLOCKED, e.success, v7); break; case 'getMedals': com.Newgrounds.NewgroundsAPI.medals = e.medals; var v7 = {'medals': e.medals}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, e.success, v7); break; break; case 'getFiles': case 'getSystemFiles': break; case 'saveFile': com.Newgrounds.NewgroundsAPI.save_file = null; var v7 = {'file_id': e.file_id, 'filename': e.filename, 'file_url': e.file_url, 'thumbnail': e.thumbnail, 'icon': e.icon}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, e.success, v7); break; case 'checkFilePrivs': if (com.Newgrounds.NewgroundsAPI.save_file) { com.Newgrounds.NewgroundsAPI.save_file.checkPrivs(e); } else { var v7 = {'filename': e.filename, 'folder': e.folder, 'can_read': e.can_read, 'can_write': e.can_write}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_PRIVS_LOADED, e.success, v7); } } }; v1.setDefaultListeners = function () { var v1 = new Array(); v1[com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED] = {'listener': com.Newgrounds.NewgroundsAPI.doBlockHost}; v1[com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE] = {'listener': com.Newgrounds.NewgroundsAPI.onNewVersionAvailable}; return v1; }; v1.addEventListener = function (event, listener, params) { com.Newgrounds.NewgroundsAPI.listeners[event] = {'listener': listener, 'params': params}; }; v1.removeEventListener = function (event) { delete com.Newgrounds.NewgroundsAPI.listeners[event]; }; v1.getEventName = function (event) { for (var v2 in com.Newgrounds.NewgroundsAPI.events) { if (com.Newgrounds.NewgroundsAPI.events[v2] == event) { return v2; } } return undefined; }; v1.callListener = function (event, success, data, target) { com.Newgrounds.NewgroundsAPI.echo('Fired Event: ' + com.Newgrounds.NewgroundsAPI.getEventName(event)); if (com.Newgrounds.NewgroundsAPI.listeners[event]) { if (data.isError()) { com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'error': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params); } else { com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'data': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params); } } }; v1.getCommandName = function (id) { return id; }; v1.getCommandID = function (name) { return name; }; v1.getPeriodAliases = function () { var v1 = new Object(); for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { v1[com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias] = v2; } return v1; }; v1.getPeriodName = function (p) { for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { if (v2 == p) { return com.Newgrounds.NewgroundsAPI.period_aliases[v2].name; } } return null; }; v1.getPeriodAlias = function (p) { for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { if (v2 == p) { return com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias; } } return null; }; v1.sendError = function (c, e) { trace('[NewgroundsAPI ERROR] :: ' + com.Newgrounds.NewgroundsAPI.getCommandName(c.command_id) + '() - ' + e.name + ':' + '\n' + '\t\t\t\t' + e.message); }; v1.sendWarning = function (m, c) { if (c) { m += '\r[NewgroundsAPI WARNING] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[NewgroundsAPI WARNING] :: ' + m); }; v1.sendNotice = function (m, c) { if (c) { m += '\r[NewgroundsAPI NOTICE] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[NewgroundsAPI NOTICE] :: ' + m); }; v1.fatalError = function (m, c) { if (c) { m += '\r\tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } throw '***ERROR*** frame=' + _root._currentframe + ', class=NewgroundsAPI' + '\n' + '\n' + m; }; v1.sendSecureCommand = function (command, secure_params, unsecure_params, files) { if (!com.Newgrounds.NewgroundsAPI.debug && !com.Newgrounds.NewgroundsAPI.hasUserSession() && !com.Newgrounds.NewgroundsAPI.hasUserEmail()) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command)}, new com.Newgrounds.NewgroundsAPIError('IDENTIFICATION_REQUIRED', 'You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail("name@domain.com"); ) to use ' + command + '().')); return undefined; } if (!command) { com.Newgrounds.NewgroundsAPI.fatalError('Missing command', 'sendSecureCommand'); } if (!secure_params) { com.Newgrounds.NewgroundsAPI.fatalError('Missing secure_params', 'sendSecureCommand'); } if (!unsecure_params) { unsecure_params = new Object(); } var v2 = ''; var v1 = 0; while (v1 < 16) { v2 += com.Newgrounds.NewgroundsAPI.compression_radix.charAt(Math.floor(Math.random() * com.Newgrounds.NewgroundsAPI.compression_radix.length)); ++v1; } if (com.Newgrounds.NewgroundsAPI.debug) { secure_params.session_id = ''; } else { secure_params.session_id = com.Newgrounds.NewgroundsAPI.session_id; } secure_params.as_version = 2; secure_params.user_email = com.Newgrounds.NewgroundsAPI.user_email; secure_params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; secure_params.seed = v2; secure_params.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command); var v8 = com.Newgrounds.MD5.calculate(v2); var v6 = com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), com.Newgrounds.NewgroundsAPI.encryption_key); var v7 = v8 + v6; unsecure_params.secure = com.Newgrounds.NewgroundsAPI.compressHex(v7); com.Newgrounds.NewgroundsAPI.sendCommand('securePacket', unsecure_params, false, files); }; v1.sendCommand = function (command, params, open_browser, files) { if (!com.Newgrounds.NewgroundsAPI.connected and command != 'connectMovie') { var v11 = 'NewgroundsAPI.' + command + '() - NewgroundsAPI.connectMovie() must be called before this command can be called' + '\n'; com.Newgrounds.NewgroundsAPI.fatalError(v11, 'connectMovie'); } if (open_browser) { var v1 = new Object(); } else { var v1 = new LoadVars(); } v1.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command); v1.tracker_id = com.Newgrounds.NewgroundsAPI.movie_id; if (com.Newgrounds.NewgroundsAPI.debug) { v1.debug = com.Newgrounds.NewgroundsAPI.debug; } if (params) { for (var v8 in params) { v1[v8] = params[v8]; } } if (files) { for (v8 in files) { v1[v8] = files[v8]; } } com.Newgrounds.NewgroundsAPI.echo('OUTPUT: \r' + com.Newgrounds.JSON.encode(v1) + '\n'); if (open_browser) { var v5 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(); for (v8 in v1) { v5 += '&' + escape(v8) + '=' + escape(v1[v8]); } getURL(v5, '_blank'); v1.removeMovieClip(); } else { var v9 = new LoadVars(); v9.onData = function (data) { com.Newgrounds.NewgroundsAPI.echo('INPUT: \r' + data + '\n'); if (data) { var v1 = com.Newgrounds.JSON.decode(data); } else { var v1 = {'success': false}; } if (!v1.success) { var v3 = new com.Newgrounds.NewgroundsAPIError(v1.error_code, v1.error_msg); com.Newgrounds.NewgroundsAPI.sendError(v1, v3); } else { com.Newgrounds.NewgroundsAPI.doEvent(v1); } }; var v4 = new Array(); for (var v7 in v1) { v4.push(v7 + '=' + escape(v1[v7])); } com.Newgrounds.NewgroundsAPI.echo('POST ' + com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?' + v4.join('&')); v1.sendAndLoad(com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(), v9, 'POST'); } }; v1.renderAd = function (target) { if (com.Newgrounds.NewgroundsAPI.ad_swf_url) { target.background = target.createEmptyMovieClip('background', 100); target.background.beginFill(0); target.background.moveTo(0, 0); target.background.lineTo(300, 0); target.background.lineTo(300, 250); target.background.lineTo(0, 250); target.background.lineTo(0, 0); target.background.endFill(); target.mask = target.createEmptyMovieClip('mask', 101); target.mask.beginFill(0); target.mask.moveTo(0, 0); target.mask.lineTo(300, 0); target.mask.lineTo(300, 250); target.mask.lineTo(0, 250); target.mask.lineTo(0, 0); target.mask.endFill(); target.clip = target.createEmptyMovieClip('clip', 102); target.clip.ad = target.clip.createEmptyMovieClip('ad', 100); target.clip.setMask(target.mask); loadMovie(com.Newgrounds.NewgroundsAPI.ad_swf_url, target.clip.ad); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, true, null, target); } else { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', 'Unable to render ad')); } }; v1.attachFlashAd = function (target) { System.security.allowDomain('http://server.cpmstar.com'); System.security.allowDomain('http://www.cpmstar.com'); System.security.allowDomain('https://server.cpmstar.com'); System.security.allowDomain('https://www.cpmstar.com'); System.security.allowInsecureDomain('http://server.cpmstar.com'); System.security.allowInsecureDomain('http://www.cpmstar.com'); System.security.allowInsecureDomain('https://server.cpmstar.com'); System.security.allowInsecureDomain('https://www.cpmstar.com'); com.Newgrounds.NewgroundsAPI.sendMessage('You may get a security sandbox violation from this ad. This is nothing to worry about!'); if (com.Newgrounds.NewgroundsAPI.resetAdTimer()) { if (com.Newgrounds.NewgroundsAPI.ad_url) { var v1 = new LoadVars(); v1.onData = function (data) { if (data) { com.Newgrounds.NewgroundsAPI.ad_swf_url = data; } else { com.Newgrounds.NewgroundsAPI.ad_swf_url = null; } com.Newgrounds.NewgroundsAPI.renderAd(target); }; if (com.Newgrounds.NewgroundsAPI.ad_url.indexOf('?') > -1) { v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '&random=' + Math.random()); } else { v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '?random=' + Math.random()); } } } else { com.Newgrounds.NewgroundsAPI.renderAd(target); } }; v1.resetAdTimer = function () { if (!com.Newgrounds.NewgroundsAPI.ad_url) { return false; } var v1 = new Date(); if (v1.getTime() >= com.Newgrounds.NewgroundsAPI.ad_reset) { com.Newgrounds.NewgroundsAPI.ad_reset = v1.getTime() + 300000; return true; } return false; }; v1.sendMessage = function (m, r) { var v1 = '[NewgroundsAPI] :: ' + m; if (r) { return v1; } else { trace(v1); } }; v1.echo = function (m) { if (com.Newgrounds.NewgroundsAPI.do_echo) { trace(m); } }; v1.do_echo = false; v1.GATEWAY_URL = 'http://www.ngads.com/gateway_v2.php'; v1.AD_TERMS_URL = 'http://www.newgrounds.com/wiki/flashads/terms/'; v1.COMMANDS_WIKI_URL = 'http://www.newgrounds.com/wiki/flashapi/commands/'; v1.ad_reset = 0; v1.save_file = null; v1.medals = null; v1.score_page_counts = new Object(); v1.compression_radix = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X'; v1.compressor = new com.Newgrounds.BaseN(com.Newgrounds.NewgroundsAPI.compression_radix); v1.errors = com.Newgrounds.NewgroundsAPIError.init_codes(); v1.sharedObjects = new Object(); v1.events = {'MOVIE_CONNECTED': 1, 'ADS_APPROVED': 2, 'AD_ATTACHED': 3, 'HOST_BLOCKED': 4, 'NEW_VERSION_AVAILABLE': 5, 'EVENT_LOGGED': 6, 'SCORE_POSTED': 7, 'SCORES_LOADED': 8, 'MEDAL_UNLOCKED': 9, 'MEDALS_LOADED': 10, 'FILE_PRIVS_LOADED': 11, 'FILE_SAVED': 12}; v1.listeners = com.Newgrounds.NewgroundsAPI.setDefaultListeners(); v1.periods = com.Newgrounds.NewgroundsAPI.getPeriodAliases(); v1.period_aliases = {'t': {'name': 'Today', 'alias': 'TODAY'}, 'p': {'name': 'Yesterday', 'alias': 'YESTERDAY'}, 'w': {'name': 'This Week', 'alias': 'THIS_WEEK'}, 'm': {'name': 'This Month', 'alias': 'THIS_MONTH'}, 'y': {'name': 'This Year', 'alias': 'THIS_YEAR'}, 'a': {'name': 'All-Time', 'alias': 'ALL_TIME'}}; ASSetPropFlags(com.Newgrounds.NewgroundsAPI.prototype, null, 1); } #endinitclip } movieClip 4982 __Packages.com.Newgrounds.NewgroundsAPISaveFile { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPISaveFile) { var v1 = function (tracker_id, folder, filename) { this.tracker_id = tracker_id; this.folder = folder; this.filename = filename; this.contents = null; this.thumbnail = null; this.icon_url = null; this.thumbnail_url = null; }; com.Newgrounds.NewgroundsAPISaveFile = v1; var v2 = v1.prototype; v2.setDescription = function (description) { this.description = description; }; v2.setShared = function (share) { this.share = share; }; v2.setContents = function (contents) { this.contents = contents; }; v2.setThumbnail = function (thumb) { if (thumb) { this.thumbnail = thumb; } else { this.thumbnail = null; } }; v2.onError = function (msg) { trace('[NewgroundsAPISaveFile ERROR] :: ' + msg); }; v2.onCancel = function (msg) { trace('[NewgroundsAPISaveFile] :: ' + msg); }; v2.submit = function () { this.scan = null; com.Newgrounds.NewgroundsAPI.checkFilePrivs(this.folder, this.filename); }; v2.checkPrivs = function (p) { if (p.success) { if (p.can_write) { this.can_write = p.can_write; if (p.exists) { com.Newgrounds.NewgroundsAPI.getConfirmation('saveFile', com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, 'File \'' + this.filename + '\' exists, overwrite?', this, 'startFile', 'cancelFile'); } else { this.startFile(); } } else { this.onError('This filename is owned by another user.'); } } else { this.onError('There was a problem looking up your file\'s details'); } }; v2.cancelFile = function () { this.onCancel('Overwrite was cancelled'); }; v2.startFile = function () { if (this.can_write) { if (this.thumbnail) { this.scanner = new com.Newgrounds.ImageScanner(this.thumbnail); this.scanner.setCallback(this, 'writeFile'); this.scanner.startScan(100, 100, true); } else { this.writeFile(); } } else { this.onError('You cannot write to filename "' + this.filename + '"'); } }; v2.writeFile = function (img) { trace('FINISHED'); com.Newgrounds.NewgroundsAPI.finishFileSave(this.folder, this.filename, this.description, this.share, com.Newgrounds.JSON.encode(this.contents), img); }; v2.can_write = false; v2.share = true; ASSetPropFlags(com.Newgrounds.NewgroundsAPISaveFile.prototype, null, 1); } #endinitclip } movieClip 4983 __Packages.com.Newgrounds.ImageScanner { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.ImageScanner) { var v1 = function (the_source) { if (the_source) { this.image_source = the_source; } else { this.image_source = _root; } this.reset(); if (typeof this.image_source == 'movieclip') { if (this.image_source == _root) { this.source_width = Stage.width; this.source_height = Stage.height; } else { this.source_width = Math.floor(this.image_source._width); this.source_height = Math.floor(this.image_source._height); } this.sourceBitmap = new flash.display.BitmapData(this.source_width, this.source_height, false, 4294967295.0); this.sourceBitmap.draw(_root); } else { if (this.image_source.width) { this.source_width = this.image_source.width; this.source_height = this.image_source.height; this.sourceBitmap = this.image_source; } else { this.error('You can only use BitMaptData and MovieClip objects to create images'); } } }; com.Newgrounds.ImageScanner = v1; var v2 = v1.prototype; v2.setCallback = function (target, funct) { if (target && funct) { this.callback_target = target; this.callback_function = funct; } }; v2.reset = function () { this.callback_target = null; this.callback_function = null; this.debug.bad_pixels = 0; this.hash = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&'; var v3 = Math.pow(this.hash.length, 2); trace('MAX COLORS: ' + v3); var v2 = Math.floor(Math.pow(v3, 0.3333333333333333)) - 1; var v4 = Math.pow(v2, 3); this.cube = v2; this.basen = new com.Newgrounds.BaseN(this.hash); this.xpos = 0; this.ypos = 0; this.pixels = 0; this.busy = false; }; v2.startScan = function (w, h, s) { if (w) { this.image_width = w; } if (h) { this.image_height = h; } if (s != undefined) { this.crop = s; } var v7 = _root.getNextHighestDepth(); var v6 = _root.createEmptyMovieClip('API_image_container_' + v7, v7); var v5 = v6.createEmptyMovieClip('canvas', 100); v5.attachBitmap(this.sourceBitmap, 100); if (this.crop) { if (this.image_width / this.source_width > this.image_height / this.source_height) { this.canvas_width = this.image_width; this.canvas_height = Math.ceil(this.source_height * (this.image_width / this.source_width)); } else { this.canvas_height = this.image_height; this.canvas_width = Math.ceil(this.source_width * (this.image_height / this.source_height)); } } else { this.canvas_width = this.image_width; this.canvas_height = this.image_height; } v5._x = Math.round((this.image_width - this.canvas_width) / 2); v5._width = this.canvas_width; v5._height = this.canvas_height; this.resizedBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); this.resizedBitmap.draw(v6); v6.removeMovieClip(); this.copyBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); var v3 = '' + this.image_width; while (v3.length < 3) { v3 = '0' + v3; } var v4 = '' + this.image_height; while (v4.length < 3) { v4 = '0' + v4; } this.output = v3 + v4; this.draw_interval = setInterval(this, 'drawChunk', 10); this.busy = false; return this.resizedBitmap; }; v2.getBitmapData = function () { return this.copyBitmap; }; v2.getBytesTotal = function () { return this.image_width * this.image_height * 2; }; v2.getBytesScanned = function () { return this.pixels * 2; }; v2.drawChunk = function () { if (!this.busy) { this.busy = true; var v2 = 0; while (v2 < 250) { if (!this.nextPixel()) { clearInterval(this.draw_interval); this.callback_interval = setInterval(this, 'doCallback', 25); this.busy = true; break; } ++v2; } this.busy = false; } }; v2.doCallback = function () { this.busy = false; clearInterval(this.callback_interval); if (this.callback_target and this.callback_function) { this.callback_target[this.callback_function](this.output); } else { this.onScanComplete(this.output); } }; v2.onScanComplete = function (packet) { this.sendMessage('packet size: ' + this.output.length + ' bytes', 'onScanComplete'); }; v2.nextPixel = function () { var v15 = this.xpos; var v14 = this.ypos; var v7 = this.resizedBitmap.getPixel(v15, v14); var v17 = v7 >> 16 & 255; var v20 = v7 >> 8 & 255; var v16 = v7 >> 0 & 255; var v11 = Math.round(((v17 + 1) / 256) * this.cube); var v10 = Math.round(((v20 + 1) / 256) * this.cube); var v13 = Math.round(((v16 + 1) / 256) * this.cube); var v12 = v11 * (this.cube + 1) * (this.cube + 1) + v10 * (this.cube + 1) + v13; var v6 = this.basen.encode(v12, 2); this.output += v6; if (v6.length != 2) { trace('bad pixel ' + v6); } var v5 = this.basen.decode(v6); var v18 = v5; var v8 = v5 % (this.cube + 1); v5 = (v5 - v8) / (this.cube + 1); var v9 = v5 % (this.cube + 1); var v19 = (v5 - v9) / (this.cube + 1); if (v13 != v8 and v10 != v9 and v11 != v10) { ++this.debug.bad_pixels; trace('BAD PIXEL ' + this.debug.bad_pixels + ') ' + v12 + ' != ' + v18 + ' ' + v6); trace(this.basen.debug.lastencode); } var v2 = (Math.round((v19 / this.cube) * 255)).toString(16); var v4 = (Math.round((v9 / this.cube) * 255)).toString(16); var v3 = (Math.round((v8 / this.cube) * 255)).toString(16); while (v2.length < 2) { v2 = '0' + v2; } while (v4.length < 2) { v4 = '0' + v4; } while (v3.length < 2) { v3 = '0' + v3; } this.copyBitmap.setPixel(v15, v14, Number('0x' + v2 + v4 + v3)); ++this.pixels; if (this.pixels >= this.image_width * this.image_height) { return false; } ++this.xpos; if (this.xpos >= this.image_width) { this.xpos = 0; ++this.ypos; } return true; }; v2.error = function (e, f) { this.sendMessage(e, f, 'ERROR'); }; v2.sendMessage = function (msg, func, type) { var v1 = 'ImageScanner'; if (func) { v1 += '.' + func + '()'; } if (type) { v1 = type + ' in ' + v1; } v1 += ' :: ' + msg; trace(v1); }; v2.image_width = 100; v2.image_height = 100; v2.crop = true; v2.debug = new Object(); ASSetPropFlags(com.Newgrounds.ImageScanner.prototype, null, 1); } #endinitclip } movieClip 4984 __Packages.com.Newgrounds.JSON { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.JSON) { var v1 = function () {}; com.Newgrounds.JSON = v1; var v2 = v1.prototype; v1.encode = function (arg, noquotes) { var v3; var v2; var v6; var v1 = ''; var v4; if (arg.isSServerVar()) { var v8 = 'sservervariable'; } else { var v8 = typeof arg; } switch (v8) { return 'null'; case 'sservervariable': return '?' + arg.getEncodedValue(); break; case 'object': if (arg) { if (arg instanceof Array) { v2 = 0; while (v2 < arg.length) { v4 = com.Newgrounds.JSON.encode(arg[v2]); if (v1) { v1 += ','; } v1 += v4; ++v2; } return '[' + v1 + ']'; } else { if (typeof arg.toString != 'undefined') { for (v2 in arg) { v4 = arg[v2]; if (typeof v4 != 'undefined' && typeof v4 != 'function') { v4 = com.Newgrounds.JSON.encode(v4); if (v1) { v1 += ','; } v1 += com.Newgrounds.JSON.encode(v2) + ':' + v4; } } return '{' + v1 + '}'; } } } return 'null'; case 'number': return isFinite(arg) ? String(arg) : 'null'; case 'string': v6 = arg.length; if (noquotes) { var v7 = ''; } else { var v7 = '"'; } v1 = v7; v2 = 0; while (v2 < v6) { v3 = arg.charAt(v2); if (v3 >= ' ') { if (v3 == '\\' || v3 == '"') { v1 += '\\'; } v1 += v3; } else { switch (v3) { case '\b': v1 += '\\b'; break; case '\f': v1 += '\\f'; break; case '\n': v1 += '\\n'; break; case '\r': v1 += '\\r'; break; case '\t': v1 += '\\t'; break; default: v3 = v3.charCodeAt(); v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16); } } v2 += 1; } return v1 + v7; case 'boolean': return String(arg); default: return 'null'; } }; v1.decode = function (text) { var at = 0; var ch = ' '; var _value; var _error = function (m) { throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text}; }; var _next = function () { ch = text.charAt(at); at += 1; return ch; }; var _white = function () { while (ch) { if (ch <= ' ') { _next(); } else { if (ch == '/') { switch (_next()) { case '/': for (;;) { if (!(_next() && ch != '\n' && ch != '\r')) break; } break; case '*': _next(); for (;;) { if (ch) { if (ch == '*') { if (_next() == '/') { _next(); break; } } else { _next(); } continue; } _error('Unterminated comment'); } break; default: _error('Syntax error'); } } else { break; } } } }; var _string = function () { var v4; var v1 = ''; var v3; var v2; var v5 = false; if (ch == '"') { while (_next()) { if (ch == '"') { _next(); return v1; } else { if (ch == '\\') { switch (_next()) { case 'b': v1 += '\b'; break; case 'f': v1 += '\f'; break; case 'n': v1 += '\n'; break; case 'r': v1 += '\r'; break; case 't': v1 += '\t'; break; case 'u': v2 = 0; v4 = 0; while (v4 < 4) { v3 = parseInt(_next(), 16); if (!isFinite(v3)) { v5 = true; break; } v2 = v2 * 16 + v3; v4 += 1; } if (v5) { v5 = false; } else { v1 += String.fromCharCode(v2); break; default: v1 += ch; } } } else { v1 += ch; } } } } _error('Bad string'); }; var _array = function () { var v1 = []; if (ch == '[') { _next(); _white(); if (ch == ']') { _next(); return v1; } while (ch) { v1.push(_value()); _white(); if (ch == ']') { _next(); return v1; } else { if (ch != ',') { break; } } _next(); _white(); } } _error('Bad array'); }; var _object = function () { var v2; var v1 = {}; if (ch == '{') { _next(); _white(); if (ch == '}') { _next(); return v1; } while (ch) { v2 = _string(); _white(); if (ch != ':') { break; } _next(); v1[v2] = _value(); _white(); if (ch == '}') { _next(); return v1; } else { if (ch != ',') { break; } } _next(); _white(); } } _error('Bad object'); }; var _number = function () { var v1 = ''; var v2; if (ch == '-') { v1 = '-'; _next(); } for (;;) { if (!(ch >= '0' && ch <= '9')) break; v1 += ch; _next(); } if (ch == '.') { v1 += '.'; for (;;) { if (!(_next() && ch >= '0' && ch <= '9')) break; v1 += ch; } } v2 = 1 * v1; if (!isFinite(v2)) { _error('Bad number'); } else { return v2; } }; var _word = function () { switch (ch) { case 't': if (_next() == 'r' && _next() == 'u' && _next() == 'e') { _next(); return true; } break; case 'f': if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') { _next(); return false; } break; case 'n': if (_next() == 'u' && _next() == 'l' && _next() == 'l') { _next(); return null; } } _error('Syntax error'); }; _value = function () { _white(); switch (ch) { case '{': return _object(); case '[': return _array(); case '"': return _string(); case '-': return _number(); } return (ch >= '0' && ch <= '9') ? _number() : _word(); }; return _value(); }; ASSetPropFlags(com.Newgrounds.JSON.prototype, null, 1); } #endinitclip } movieClip 4985 __Packages.com.Newgrounds.RC4 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.RC4) { var v1 = function () {}; com.Newgrounds.RC4 = v1; var v2 = v1.prototype; v1.encrypt = function (src, key) { var v3 = com.Newgrounds.RC4.strToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return com.Newgrounds.RC4.charsToHex(v2); }; v1.encryptbin = function (src, key) { var v3 = com.Newgrounds.RC4.strToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return v2; }; v1.decrypt = function (src, key) { var v3 = com.Newgrounds.RC4.hexToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return com.Newgrounds.RC4.charsToStr(v2); }; v1.initialize = function (pwd) { var v2 = 0; var v3; var v4 = pwd.length; var v1 = 0; while (v1 <= 255) { com.Newgrounds.RC4.mykey[v1] = pwd[v1 % v4]; com.Newgrounds.RC4.sbox[v1] = v1; ++v1; } v1 = 0; while (v1 <= 255) { v2 = (v2 + com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.mykey[v1]) % 256; v3 = com.Newgrounds.RC4.sbox[v1]; com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2]; com.Newgrounds.RC4.sbox[v2] = v3; ++v1; } }; v1.calculate = function (plaintxt, psw) { com.Newgrounds.RC4.initialize(psw); var v1 = 0; var v2 = 0; var v9 = new Array(); var v7; var v5; var v6; var v3 = 0; while (v3 < plaintxt.length) { v1 = (v1 + 1) % 256; v2 = (v2 + com.Newgrounds.RC4.sbox[v1]) % 256; v5 = com.Newgrounds.RC4.sbox[v1]; com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2]; com.Newgrounds.RC4.sbox[v2] = v5; var v4 = (com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.sbox[v2]) % 256; v7 = com.Newgrounds.RC4.sbox[v4]; v6 = plaintxt[v3] ^ v7; v9.push(v6); ++v3; } return v9; }; v1.charsToHex = function (chars) { var v4 = new String(''); var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); var v1 = 0; while (v1 < chars.length) { v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15]; ++v1; } return v4; }; v1.hexToChars = function (hex) { var v3 = new Array(); var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0; while (v1 < hex.length) { v3.push(parseInt(hex.substr(v1, 2), 16)); v1 += 2; } return v3; }; v1.charsToStr = function (chars) { var v3 = new String(''); var v1 = 0; while (v1 < chars.length) { v3 += String.fromCharCode(chars[v1]); ++v1; } return v3; }; v1.strToChars = function (str) { var v3 = new Array(); var v1 = 0; while (v1 < str.length) { v3.push(str.charCodeAt(v1)); ++v1; } return v3; }; v1.sbox = new Array(255); v1.mykey = new Array(255); ASSetPropFlags(com.Newgrounds.RC4.prototype, null, 1); } #endinitclip } movieClip 4986 __Packages.com.Newgrounds.MD5 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.MD5) { var v1 = function () {}; com.Newgrounds.MD5 = v1; var v2 = v1.prototype; v1.calculate = function (src) { return com.Newgrounds.MD5.hex_md5(src); }; v1.hex_md5 = function (src) { return com.Newgrounds.MD5.binl2hex(com.Newgrounds.MD5.core_md5(com.Newgrounds.MD5.str2binl(src), src.length * 8)); }; v1.core_md5 = function (x, len) { x[len >> 5] |= 128 << len % 32; x[(len + 64 >>> 9 << 4) + 14] = len; var v4 = 1732584193; var v3 = -271733879; var v2 = -1732584194; var v1 = 271733878; var v5 = 0; while (v5 < x.length) { var v10 = v4; var v9 = v3; var v8 = v2; var v7 = v1; v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551); v4 = com.Newgrounds.MD5.safe_add(v4, v10); v3 = com.Newgrounds.MD5.safe_add(v3, v9); v2 = com.Newgrounds.MD5.safe_add(v2, v8); v1 = com.Newgrounds.MD5.safe_add(v1, v7); v5 += 16; } return new Array(v4, v3, v2, v1); }; v1.md5_cmn = function (q, a, b, x, s, t) { return com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.bit_rol(com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.safe_add(a, q), com.Newgrounds.MD5.safe_add(x, t)), s), b); }; v1.md5_ff = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t); }; v1.md5_gg = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t); }; v1.md5_hh = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t); }; v1.md5_ii = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t); }; v1.bit_rol = function (num, cnt) { return num << cnt | num >>> 32 - cnt; }; v1.safe_add = function (x, y) { var v1 = (x & 65535) + (y & 65535); var v2 = (x >> 16) + (y >> 16) + (v1 >> 16); return v2 << 16 | v1 & 65535; }; v1.str2binl = function (str) { var v3 = new Array(); var v4 = 255; var v1 = 0; while (v1 < str.length * 8) { v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32; v1 += 8; } return v3; }; v1.binl2hex = function (binarray) { var v4 = new String(''); var v3 = new String('0123456789abcdef'); var v1 = 0; while (v1 < binarray.length * 4) { v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15); ++v1; } return v4; }; ASSetPropFlags(com.Newgrounds.MD5.prototype, null, 1); } #endinitclip } movieClip 4987 __Packages.ab3.rankz.Armor_Bot_30_En_AS1 { #initclip if (!_global.ab3) { _global.ab3 = new Object(); } if (!_global.ab3.rankz) { _global.ab3.rankz = new Object(); } if (!_global.ab3.rankz.Armor_Bot_30_En_AS1) { var v1 = function () { super(); }; ab3.rankz.Armor_Bot_30_En_AS1 = v1; ab3.rankz.Armor_Bot_30_En_AS1 extends Object; var v2 = v1.prototype; v1.Encode = function (str) { var v1 = new ab3.rankz.Armor_Bot_30_En_AS1(); return v1.encodeArmor_Bot_30_En_AS1(str); }; v1.Decode = function (str) { var v1 = new ab3.rankz.Armor_Bot_30_En_AS1(); return v1.decodeArmor_Bot_30_En_AS1(str); }; v1.StringReplaceAll = function (source, find, replacement) { return (source.split(find)).join(replacement); }; v1.InitReverseChars = function () { ab3.rankz.Armor_Bot_30_En_AS1._CharsReverseLookup = new Array(); var v1 = 0; while (v1 < ab3.rankz.Armor_Bot_30_En_AS1._Chars.length) { ab3.rankz.Armor_Bot_30_En_AS1._CharsReverseLookup[ab3.rankz.Armor_Bot_30_En_AS1._Chars[v1]] = v1; ++v1; } return true; }; v1.UrlDecode = function (str) { str = ab3.rankz.Armor_Bot_30_En_AS1.StringReplaceAll(str, '\\', ' '); str = unescape(str); return str; }; v1.UrlEncode = function (str) { str = escape(str); str = ab3.rankz.Armor_Bot_30_En_AS1.StringReplaceAll(str, '\\', '%2B'); str = ab3.rankz.Armor_Bot_30_En_AS1.StringReplaceAll(str, '%20', '+'); return str; }; v2.setArmor_Bot_30_En_AS1Str = function (str) { this._Armor_Bot_30_En_AS1Str = str; this._Armor_Bot_30_En_AS1Count = 0; }; v2.readArmor_Bot_30_En_AS1 = function () { if (!this._Armor_Bot_30_En_AS1Str) { return ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput; } if (this._Armor_Bot_30_En_AS1Count >= this._Armor_Bot_30_En_AS1Str.length) { return ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput; } var v2 = this._Armor_Bot_30_En_AS1Str.charCodeAt(this._Armor_Bot_30_En_AS1Count) & 255; ++this._Armor_Bot_30_En_AS1Count; return v2; }; v2.encodeArmor_Bot_30_En_AS1 = function (str) { this.setArmor_Bot_30_En_AS1Str(str); var v3 = ''; var v2 = new Array(3); var v5 = 0; var v4 = false; for (;;) { if (!(!v4 && v2[0] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput)) break; v2[1] = this.readArmor_Bot_30_En_AS1(); v2[2] = this.readArmor_Bot_30_En_AS1(); v3 += ab3.rankz.Armor_Bot_30_En_AS1._Chars[v2[0] >> 2]; if (v2[1] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput) { v3 += ab3.rankz.Armor_Bot_30_En_AS1._Chars[v2[0] << 4 & 48 | v2[1] >> 4]; if (v2[2] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput) { v3 += ab3.rankz.Armor_Bot_30_En_AS1._Chars[v2[1] << 2 & 60 | v2[2] >> 6]; v3 += ab3.rankz.Armor_Bot_30_En_AS1._Chars[v2[2] & 63]; } else { v3 += ab3.rankz.Armor_Bot_30_En_AS1._Chars[v2[1] << 2 & 60]; v3 += '='; v4 = true; } } else { v3 += ab3.rankz.Armor_Bot_30_En_AS1._Chars[v2[0] << 4 & 48]; v3 += '='; v3 += '='; v4 = true; } v5 += 4; if (v5 >= 76) { v3 += '\n'; v5 = 0; } } return v3; }; v2.readReverseArmor_Bot_30_En_AS1 = function () { if (!this._Armor_Bot_30_En_AS1Str) { return ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput; } while (!false) { if (this._Armor_Bot_30_En_AS1Count >= this._Armor_Bot_30_En_AS1Str.length) { return ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput; } var v2 = this._Armor_Bot_30_En_AS1Str.charAt(this._Armor_Bot_30_En_AS1Count); ++this._Armor_Bot_30_En_AS1Count; if (ab3.rankz.Armor_Bot_30_En_AS1._CharsReverseLookup[v2]) { return ab3.rankz.Armor_Bot_30_En_AS1._CharsReverseLookup[v2]; } if (v2 == 'A') { return 0; } } return ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput; }; v2.ntos = function (n) { var v1 = n.toString(16); if (v1.length == 1) { v1 = '0' + v1; } v1 = '%' + v1; return unescape(v1); }; v2.decodeArmor_Bot_30_En_AS1 = function (str) { this.setArmor_Bot_30_En_AS1Str(str); var v3 = ''; var v2 = new Array(4); var v4 = false; for (;;) { if (!(!v4 && v2[0] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput && v2[1] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput)) break; v2[2] = this.readReverseArmor_Bot_30_En_AS1(); v2[3] = this.readReverseArmor_Bot_30_En_AS1(); v3 += this.ntos(v2[0] << 2 & 255 | v2[1] >> 4); if (v2[2] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput) { v3 += this.ntos(v2[1] << 4 & 255 | v2[2] >> 2); if (v2[3] != ab3.rankz.Armor_Bot_30_En_AS1._EndOfInput) { v3 += this.ntos(v2[2] << 6 & 255 | v2[3]); } else { v4 = true; } } else { v4 = true; } } return v3; }; v2.toHex = function (n) { var v4 = ''; var v3 = true; var v1 = 32; while (v1 > 0) { v1 -= 4; var v2 = n >> v1 & 15; if (!v3 || v2 != 0) { v3 = false; v4 += ab3.rankz.Armor_Bot_30_En_AS1._Digits[v2]; } } return (v4 == '') ? '0' : v4; }; v2.pad = function (str, len, pad) { var v2 = str; var v1 = str.length; while (v1 < len) { v2 = pad + v2; ++v1; } return v2; }; v2.encodeHex = function (str) { var v4 = ''; var v2 = 0; while (v2 < str.length) { v4 += this.pad(this.toHex(str.charCodeAt(v2) & 255), 2, '0'); ++v2; } return v4; }; v2.decodeHex = function (str) { var v5 = ''; var v3 = ''; var v2 = 0; while (v2 < str.length) { v3 += str.charAt(v2); if (v3.length == 2) { v5 += this.ntos(parseInt('0x' + v3)); v3 = ''; } ++v2; } return v5; }; v1._EndOfInput = -1; v1._Chars = new Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'); v1._CharsReverseLookupInited = ab3.rankz.Armor_Bot_30_En_AS1.InitReverseChars(); v1._Digits = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); ASSetPropFlags(ab3.rankz.Armor_Bot_30_En_AS1.prototype, null, 1); } #endinitclip } frame 2 { stop(); } movieClip 481 { } button 486 { on (press) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 490 { } movieClip 492 { } movieClip 494 { } movieClip 496 { } movieClip 498 { } movieClip 500 { } movieClip 501 { frame 1 { _root.stop(); gotoAndPlay(2); } frame 408 { _root.nextFrame(); } } frame 3 { function restInvis() { saveScreen.lc._x = -1000; saveScreen.s1.gotoAndStop(1); saveScreen.s2.gotoAndStop(1); saveScreen.s3.gotoAndStop(1); } function hMaker(button) { button.onRollOver = function () { button.gotoAndStop(2); }; button.onRollOut = function () { if (button._currentframe != 3) { button.gotoAndStop(1); } }; } function hMaker2(button) { button.onRollOver = function () { button.gotoAndStop(2); }; button.onRollOut = function () { if (button._currentframe != 3) { button.gotoAndStop(1); } }; } function saveFile() { sObject.data.under50 = under50; sObject.flush(); sObject.data.untouched = untouched; sObject.flush(); sObject.data.boughtItem = boughtItem; sObject.flush(); sObject.data.achievementAllowed = achievementAllowed; sObject.flush(); sObject.data.attackType = attackType; sObject.flush(); sObject.data.lives = lives; sObject.flush(); sObject.data.expierence = expierence; sObject.flush(); sObject.data.charLevel = charLevel; sObject.flush(); sObject.data.mana = mana; sObject.flush(); sObject.data.manaUps = manaUps; sObject.flush(); sObject.data.slot1 = slot1; sObject.flush(); sObject.data.slot2 = slot2; sObject.flush(); sObject.data.slot3 = slot3; sObject.flush(); sObject.data.slot4 = slot4; sObject.flush(); sObject.data.slot5 = slot5; sObject.flush(); sObject.data.slot6 = slot6; sObject.flush(); sObject.data.slot7 = slot7; sObject.flush(); sObject.data.slot8 = slot8; sObject.flush(); sObject.data.slotBow = slotBow; sObject.flush(); sObject.data.slotArrow = slotArrow; sObject.flush(); sObject.data.slotWep = slotWep; sObject.flush(); sObject.data.slotSpell = slotSpell; sObject.flush(); sObject.data.gunAmmo2 = gunAmmo2; sObject.flush(); sObject.data.gunAmmo3 = gunAmmo3; sObject.flush(); sObject.data.gunAmmo4 = gunAmmo4; sObject.flush(); sObject.data.gunAmmo5 = gunAmmo5; sObject.flush(); sObject.data.gunAmmo6 = gunAmmo6; sObject.flush(); sObject.data.gunAmmo7 = gunAmmo7; sObject.flush(); sObject.data.gunAmmo8 = gunAmmo8; sObject.flush(); sObject.data.arrowUsed = arrowUsed; sObject.flush(); sObject.data.quiver = quiver; sObject.flush(); sObject.data.weaponUsed = weaponUsed; sObject.flush(); sObject.data.spellUsed = spellUsed; sObject.flush(); sObject.data.money = money; sObject.flush(); sObject.data.level = level; sObject.flush(); sObject.data.kills = kills; sObject.flush(); sObject.data.score = score; sObject.flush(); sObject.data.armorEquip = armorEquip; sObject.flush(); sObject.data.ownHpPot = ownHpPot; sObject.flush(); sObject.data.ownManaPot = ownManaPot; sObject.flush(); sObject.data.ownBomb1 = ownBomb1; sObject.flush(); sObject.data.ownBomb2 = ownBomb2; sObject.flush(); sObject.data.skillLevel = skillLevel; sObject.flush(); sObject.data.speedLevel = speedLevel; sObject.flush(); sObject.data.healthLevel = healthLevel; sObject.flush(); sObject.data.armorLevel = armorLevel; sObject.flush(); sObject.data.bowEnchant1 = speeded[0]; sObject.flush(); sObject.data.bowEnchant2 = speeded[1]; sObject.flush(); sObject.data.bowEnchant3 = speeded[2]; sObject.flush(); sObject.data.bowEnchant4 = speeded[3]; sObject.flush(); sObject.data.bowEnchant5 = speeded[4]; sObject.flush(); sObject.data.bowEnchant6 = speeded[5]; sObject.flush(); sObject.data.bowEnchant7 = speeded[6]; sObject.flush(); sObject.data.spent = spent; sObject.flush(); sObject.data.shotCount = shotCount; sObject.flush(); sObject.data.leFin = leFin; sObject.flush(); sObject.data.stale = stale; sObject.flush(); sObject.data.enchantPoints = enchantPoints; sObject.flush(); sObject.data.upgradePoints = upgradePoints; sObject.flush(); sObject.data.continues = continues; sObject.flush(); sObject.data.enCome = enCome; sObject.flush(); sObject.data.skillq = skillq; sObject.flush(); sObject.data.healthq = healthq; sObject.flush(); sObject.data.armorq = armorq; sObject.flush(); sObject.data.speedq = speedq; sObject.flush(); sObject.data.delayTime = delayTime; sObject.flush(); gObject.data.second = seconds; gObject.flush(); gObject.data.minute = minutes; gObject.flush(); gObject.data.hour = hours; gObject.flush(); gObject.data.completed_levels = awardsRecieved; gObject.flush(); gObject.data.meleeKills = meleeKills; gObject.flush(); gObject.data.magicKills = magicKills; gObject.flush(); gObject.data.death = deaths; gObject.flush(); gObject.data.rangeKills = rangeKills; gObject.flush(); gObject.data.kill = kill; gObject.flush(); } function countBadges() { i = 0; while (i < awardsRecieved.length) { if (awardsRecieved[i] == 1) { counter += 1; } ++i; } awardsTotal = counter; } function onEnterFrame() { var v2 = _xmouse - aim._x; var v1 = _ymouse - aim._y; aim._x += v2 / 2; aim._y += v1 / 2; } function createHover(movie, movie2) { movie.onRollOver = function () { movie._alpha = 30; }; movie.onRollOut = function () { movie._alpha = 0; }; movie.onReleaseOutside = function () { movie._alpha = 0; }; } function badgeCounter(array1) { var v4 = array1.length; var v2 = 0; var v3 = 0; b = array1.length; while (b >= 0) { if (awardsRecieved[array1[b]] == 1) { v2 += 1; } --b; } v3 = (v2 / v4) * 100; if (v3 >= 25) { badges += 1; } else {} if (v3 >= 50) { badges += 1; } else {} if (v3 >= 75) { badges += 1; } else {} if (v3 >= 100) { badges += 1; } else {} } awards = new Array('Kill 100 Enemies', 'Kill 300 Enemies', 'Kill 1000 Enemies', 'Kill 3000 Enemies', 'Play for 5 Minutes', 'Play for 15 Minutes', 'Play for 60 Minutes', 'Play for 120 Minutes', 'Kill 50 Enemies in Survival', 'Kill 100 Enemies in Survival', 'Kill 150 Enemies in Survival', 'Kill 200 Enemies in Survival', 'Buy Light Arrows', 'Buy Heavy Arrows', 'Buy Fire Arrows', 'Buy Ice Arrows', 'Buy Electric Arrows', 'Buy Acid Arrows', 'Buy Poision Arrows', 'Buy a Long Bow', 'Buy a Composite Bow', 'Buy a Cross Bow', 'Buy a Compound Bow', 'Buy a Cross Bow +', 'Buy a Compound Bow +', 'Buy a Dagger', 'Buy a Dagger+', 'Buy a Dagger++', 'Buy a Maul', 'Buy a Hammer', 'Buy a Axe', 'Buy a Long Sword', 'Buy a Dark Axe', 'Buy Level 1 Armor', 'Buy Level 2 Armor', 'Buy Level 3 Armor', 'Buy Level 4 Armor', 'Buy Level 5 Armor', 'Buy a Health Potion', 'Buy a Mana Potion', 'Buy a Timed Bomb', 'Buy a Motion Bomb', 'Buy Fire Ball', 'Buy Comet', 'Buy Ice Blast', 'Buy Star Dash', 'Buy Striker', 'Score 300 in a game', 'Score 1000 in a game', 'Score 4000 in a game', 'Score 10000 in a game', 'Fully Upgraded Skill', 'Fully Upgraded Armor', 'Fully Upgraded Health', 'Fully Upgraded Speed', 'Fully Enchanted Short Bow', 'Fully Enchanted Long Bow', 'Fully Enchanted Composite Bow', 'Fully Enchanted Cross Bow', 'Fully Enchanted Compound Bow', 'Fully Enchanted Cross Bow +', 'Fully Enchanted Compound Bow +', 'Unlocked Cheat 1', 'Unlocked Cheat 2', 'Unlocked Cheat 3', 'Unlocked Cheat 4', 'Unlocked Cheat 5', 'Unlocked Cheat 6', 'Unlocked Cheat 7', 'Unlocked Cheat 8', 'Unlocked Cheat 9', 'Play Again', 'Play Three Times', 'Play Four Times', 'Play Five Times', 'Long Bow Drop', 'Composite Bow Drop', 'Cross Bow Drop', 'Compound Bow Drop', 'Cross Bow Drop +', 'Compound Bow Drop +', 'Defeated Vandoru', 'Defeated Korthag', 'Defeated Shocknor', 'Defeated Azgorg', 'Defeated Kagoru', 'Kill a Kordul', 'Kill a Sathir', 'Kill a Ortug', 'Kill a Atugor', 'Kill a Dronder', 'Kill a Tungurd', 'Kill a Cazgur', 'Kill a Uroth', 'Kill a Fazgor', 'Kill a Farodun', 'Kill a Tree Monster', 'Kill a Were Wolf', 'Kill a Skeleton Warrior', 'Kill a Skeleton Archer', 'Kill a Ice Warrior', 'Kill a Ice Monster', 'Kill a Rock Monster', 'Kill a Volcano Monster', 'Kill a Snake Archer', 'Kill a Snaker Warrior', 'Spend 101 Gold', 'Spend 1000 Gold', 'Spend 3000 Gold', 'Spend 10000 Gold', 'Collect Light Arrows', 'Collect Heavy Arrows', 'Collect Fire Arrows', 'Collect Ice Arrows', 'Collect Electric Arrows', 'Collect Acid Arrows', 'Collect Poision Arrows', 'Pause The Game', 'Dead End', 'Frozen', 'Broken', 'Walk on Goo', 'Walk on Acid', 'Sell an Arrow', 'Enter the Shop', 'Sell a weapon', 'Kill 2 Enemies with a bomb', 'Sell a bow', 'Die', 'Use a Health Potion', 'Use a Mana Potion', 'Use a Timed Bomb', 'Use a Motion Bomb', 'Suicide', 'Collect All Money', 'Buy 1000 Arrows', 'Sell a spell', 'Get hit by teleportation arrow', 'Walk over underground monster', 'Get Blinded', 'Get hit with a freezing arrow', 'Complete a level with 100% accuracy', 'Mute the game', 'Visit Armorgames.com', 'Make a level', 'Visit Credits', 'Go to the bestiary', 'Start the game', '100 Kills with Range', '250 Kills with Range', '500 Kills with Range', '1000 Kills with Range', '100 Kills with Melee', '250 Kills with Melee', '500 Kills with Melee', '1000 Kills with Melee', '100 Kills with Magic', '250 Kills with Magic', '500 Kills with Magic', '1000 Kills with Magic', 'Spend 500,000 gold', '5 Levels Untouched', 'All levels under 50% HP', 'Die by last boss at 5-% HP', '10,000 Kills', 'Play for 5 hours', 'Platinum medals in all other categories', '300 kills in survival', 'Completed all achievements except last one', 'Beat the game again for fun :)'); stop(); on_frame = 2; Mouse.hide(); moneyC = 0; currentPick = 0; MR1.onRollOver = function () { MR1.gotoAndStop(2); }; MR1.onRollOut = function () { MR1.gotoAndStop(1); }; MR1.onRelease = function () { getURL('http://armorgames.com/play/3642/medieval-rampage', '_blank'); }; saveScreen.c.onRelease = function () { saveScreen._x = -1000; }; saveScreen.f.onRelease = function () { enemiesLeft = 500; lSize = 1; camp.play(); saveScreen._x = Stage.width / 2; saveScreen._y = Stage.height / 2 + 15; }; hMaker2(saveScreen.s1); hMaker2(saveScreen.s2); hMaker2(saveScreen.s3); saveScreen.ss1.onRelease = function () { currentPick = 1; restInvis(); saveScreen.s1.gotoAndStop(3); }; saveScreen.ss2.onRelease = function () { currentPick = 2; restInvis(); saveScreen.s2.gotoAndStop(3); }; saveScreen.ss3.onRelease = function () { currentPick = 3; restInvis(); saveScreen.s3.gotoAndStop(3); }; hMaker(saveScreen.c); hMaker(saveScreen.l); hMaker(saveScreen.s); hMaker(saveScreen.f); hMaker(saveScreen.d); untouched = 1; achievementAllowed = 1; attackType = 1; lives = 5; expierence = 0; charLevel = 1; mana = 100; manaUps = 0; slot1 = 0; slot2 = 0; slot3 = 0; slot4 = 0; slot5 = 0; slot6 = 0; slot7 = 0; slot8 = 0; slotBow = 0; slotArrow = 0; slotWep = 0; slotSpell = 0; gunAmmo2 = 0; gunAmmo3 = 0; gunAmmo4 = 0; gunAmmo5 = 0; gunAmmo6 = 0; gunAmmo7 = 0; gunAmmo8 = 0; level = 1; kills = 0; score = 0; armorEquip = 1; ownHpPot = 5; ownManaPot = 5; ownBomb1 = 2; ownBomb2 = 0; quiver = 0; arrowUsed = 0; weaponUsed = 0; spellUsed = 0; boughtItem = 0; money = 0; skillLevel = 0; speedLevel = 0; healthLevel = 0; armorLevel = 0; bowEnchant1 = 0; bowEnchant2 = 0; bowEnchant3 = 0; bowEnchant4 = 0; bowEnchant5 = 0; bowEnchant6 = 0; bowEnchant7 = 0; spent = 0; shotCount = 1; leFin = 105; stale = 0; enchantPoints = 0; upgradePoints = 0; continues = 3; enCome = 3; skillq = 0; speedq = 0; armorq = 0; healthq = 0; delayTime = 15; under50 = 1; saveScreen.d.onRelease = function () { saveScreen.fd.gotoAndPlay(2); if (currentPick == 1) { sObject = SharedObject.getLocal('savedFile1'); sObject.clear(); gObject.data.SF1 = undefined; gObject.flush(); saveScreen.ls1 = 'New Save Slot'; } else { if (currentPick == 2) { sObject = SharedObject.getLocal('savedFile2'); sObject.clear(); gObject.data.SF2 = undefined; gObject.flush(); saveScreen.ls2 = 'New Save Slot'; } else { if (currentPick == 3) { sObject = SharedObject.getLocal('savedFile3'); sObject.clear(); gObject.data.SF3 = undefined; gObject.flush(); saveScreen.ls3 = 'New Save Slot'; } } } }; saveScreen.l.onRelease = function () { untouched = 1; achievementAllowed = 1; attackType = 1; lives = 5; expierence = 0; charLevel = 1; mana = 100; manaUps = 0; slot1 = 0; slot2 = 0; slot3 = 0; slot4 = 0; slot5 = 0; slot6 = 0; slot7 = 0; slot8 = 0; slotBow = 0; slotArrow = 0; slotWep = 0; slotSpell = 0; gunAmmo2 = 0; gunAmmo3 = 0; gunAmmo4 = 0; gunAmmo5 = 0; gunAmmo6 = 0; gunAmmo7 = 0; gunAmmo8 = 0; level = 1; kills = 0; score = 0; armorEquip = 1; ownHpPot = 5; ownManaPot = 5; ownBomb1 = 2; ownBomb2 = 0; quiver = 0; arrowUsed = 0; weaponUsed = 0; spellUsed = 0; boughtItem = 0; money = 0; skillLevel = 0; speedLevel = 0; healthLevel = 0; armorLevel = 0; bowEnchant1 = 0; bowEnchant2 = 0; bowEnchant3 = 0; bowEnchant4 = 0; bowEnchant5 = 0; bowEnchant6 = 0; bowEnchant7 = 0; spent = 0; shotCount = 1; leFin = 105; stale = 0; enchantPoints = 0; upgradePoints = 0; continues = 3; enCome = 3; skillq = 0; speedq = 0; armorq = 0; healthq = 0; delayTime = 15; under50 = 1; if (currentPick == 0) { saveScreen.psaf.gotoAndPlay(2); } if (currentPick != 0) { saveScreen.fc._x = -1000; saveScreen.loaded.gotoAndPlay(2); if (currentPick == 1) { sObject = SharedObject.getLocal('savedFile1'); } else { if (currentPick == 2) { sObject = SharedObject.getLocal('savedFile2'); } else { if (currentPick == 3) { sObject = SharedObject.getLocal('savedFile3'); } } } if (sObject.data.attackType != undefined) { attackType = sObject.data.attackType; } if (sObject.data.quiver != undefined) { quiver = sObject.data.quiver; } if (sObject.data.arrowUsed != undefined) { arrowUsed = sObject.data.arrowUsed; } if (sObject.data.weaponUsed != undefined) { weaponUsed = sObject.data.weaponUsed; } if (sObject.data.spellUsed != undefined) { spellUsed = sObject.data.spellUsed; } if (sObject.data.lives != undefined) { lives = sObject.data.lives; } if (sObject.data.expierence != undefined) { expierence = sObject.data.expierence; } if (sObject.data.charLevel != undefined) { charLevel = sObject.data.charLevel; } if (sObject.data.mana != undefined) { mana = sObject.data.mana; } if (sObject.data.manaUps != undefined) { manaUps = sObject.data.manaUps; } if (sObject.data.slot1 != undefined) { slot1 = sObject.data.slot1; } if (sObject.data.slot2 != undefined) { slot2 = sObject.data.slot2; } if (sObject.data.slot3 != undefined) { slot3 = sObject.data.slot3; } if (sObject.data.slot4 != undefined) { slot4 = sObject.data.slot4; } if (sObject.data.slot5 != undefined) { slot5 = sObject.data.slot5; } if (sObject.data.slot6 != undefined) { slot6 = sObject.data.slot6; } if (sObject.data.slot7 != undefined) { slot7 = sObject.data.slot7; } if (sObject.data.slot8 != undefined) { slot8 = sObject.data.slot8; } if (sObject.data.slotBow != undefined) { slotBow = sObject.data.slotBow; } if (sObject.data.slotArrow != undefined) { slotArrow = sObject.data.slotArrow; } if (sObject.data.slotWep != undefined) { slotWep = sObject.data.slotWep; } if (sObject.data.slotSpell != undefined) { slotSpell = sObject.data.slotSpell; } if (sObject.data.gunAmmo2 != undefined) { gunAmmo2 = sObject.data.gunAmmo2; } if (sObject.data.gunAmmo3 != undefined) { gunAmmo3 = sObject.data.gunAmmo3; } if (sObject.data.gunAmmo4 != undefined) { gunAmmo4 = sObject.data.gunAmmo4; } if (sObject.data.gunAmmo5 != undefined) { gunAmmo5 = sObject.data.gunAmmo5; } if (sObject.data.gunAmmo6 != undefined) { gunAmmo6 = sObject.data.gunAmmo6; } if (sObject.data.gunAmmo7 != undefined) { gunAmmo7 = sObject.data.gunAmmo7; } if (sObject.data.gunAmmo8 != undefined) { gunAmmo8 = sObject.data.gunAmmo8; } if (sObject.data.level != undefined) { level = sObject.data.level; } if (sObject.data.kills != undefined) { kills = sObject.data.kills; } if (sObject.data.score != undefined) { score = sObject.data.score; } if (sObject.data.money != undefined) { money = sObject.data.money; } if (sObject.data.ownHpPot != undefined) { ownHpPot = sObject.data.ownHpPot; } if (sObject.data.ownManaPot != undefined) { ownManaPot = sObject.data.ownManaPot; } if (sObject.data.ownBomb1 != undefined) { ownBomb1 = sObject.data.ownBomb1; } if (sObject.data.ownBomb2 != undefined) { ownBomb2 = sObject.data.ownBomb2; } if (sObject.data.skillLevel != undefined) { skillLevel = sObject.data.skillLevel; } if (sObject.data.speedLevel != undefined) { speedLevel = sObject.data.speedLevel; } if (sObject.data.healthLevel != undefined) { healthLevel = sObject.data.healthLevel; } if (sObject.data.armorLevel != undefined) { armorLevel = sObject.data.armorLevel; } if (sObject.data.bowEnchant1 != undefined) { bowEnchant1 = sObject.data.bowEnchant1; } if (sObject.data.bowEnchant2 != undefined) { bowEnchant2 = sObject.data.bowEnchant2; } if (sObject.data.bowEnchant3 != undefined) { bowEnchant3 = sObject.data.bowEnchant3; } if (sObject.data.bowEnchant4 != undefined) { bowEnchant4 = sObject.data.bowEnchant4; } if (sObject.data.bowEnchant5 != undefined) { bowEnchant5 = sObject.data.bowEnchant5; } if (sObject.data.bowEnchant6 != undefined) { bowEnchant6 = sObject.data.bowEnchant6; } if (sObject.data.bowEnchant7 != undefined) { bowEnchant7 = sObject.data.bowEnchant7; } if (sObject.data.spent != undefined) { spent = sObject.data.spent; } if (sObject.data.shotCount != undefined) { shotCount = sObject.data.shotCount; } if (sObject.data.leFin != undefined) { leFin = sObject.data.leFin; } if (sObject.data.stale != undefined) { stale = sObject.data.stale; } if (sObject.data.armorEquip != undefined) { armorEquip = sObject.data.armorEquip; } if (sObject.data.enchantPoints != undefined) { enchantPoints = sObject.data.enchantPoints; } if (sObject.data.upgradePoints != undefined) { upgradePoints = sObject.data.upgradePoints; } if (sObject.data.continues != undefined) { continues = sObject.data.continues; } if (sObject.data.enCome != undefined) { enCome = sObject.data.enCome; } if (sObject.data.skillq != undefined) { skillq = sObject.data.skillq; } if (sObject.data.speedq != undefined) { speedq = sObject.data.speedq; } if (sObject.data.armorq != undefined) { armorq = sObject.data.armorq; } if (sObject.data.healthq != undefined) { healthq = sObject.data.healthq; } if (sObject.data.delayTime != undefined) { delayTime = sObject.data.delayTime; } if (sObject.data.achievementAllowed != undefined) { achievementAllowed = sObject.data.achievementAllowed; } if (sObject.data.boughtItem != undefined) { boughtItem = sObject.data.boughtItem; } if (sObject.data.untouched != undefined) { untouched = sObject.data.untouched; } if (sObject.data.under50 != undefined) { under50 = sObject.data.under50; } } }; speeded = new Array(0, 0, 0, 0, 0, 0, 0); gObject = SharedObject.getLocal('objectName'); qq.onPress = function () { gotoAndStop(10); }; seconds = 0; minutes = 0; hours = 0; camp.skipbtn.onPress = function () { if (camp.skipbtn._alpha >= 50) { gotoAndStop(4); } }; kill = 0; deaths = 0; if (gObject.data.kill > 0) { kill = gObject.data.kill; } if (gObject.data.death > 0) { deaths = gObject.data.death; } if (gObject.data.second > 0) { seconds = gObject.data.second; } if (gObject.data.minute > 0) { minutes = gObject.data.minute; } if (gObject.data.hour > 0) { hours = gObject.data.hour; } timesPlayed = 0; if (gObject.data.timesPlayed > 0) { timesPlayed = gObject.data.timesPlayed; } rangeKills = 0; meleeKills = 0; magicKills = 0; if (gObject.data.rangeKills > 0) { rangeKills = gObject.data.rangeKills; } if (gObject.data.meleeKills > 0) { meleeKills = gObject.data.meleeKills; } if (gObject.data.magicKills > 0) { magicKills = gObject.data.magicKills; } SF1 = 1; SF2 = 1; SF3 = 1; if (gObject.data.SF1 != undefined) { SF1 = gObject.data.SF1; saveScreen.ls1 = 'Last Saved: Level ' + SF1; if (SF1 == 1) { saveScreen.ls1 = 'No Saved Data'; } } if (gObject.data.SF2 != undefined) { SF2 = gObject.data.SF2; saveScreen.ls2 = 'Last Saved: Level ' + SF2; if (SF2 == 1) { saveScreen.ls2 = 'No Saved Data'; } } if (gObject.data.SF3 != undefined) { SF3 = gObject.data.SF3; saveScreen.ls3 = 'Last Saved: Level ' + SF3; if (SF3 == 1) { saveScreen.ls3 = 'No Saved Data'; } } personalHighScore = 0; if (gObject.data.phs > 0) { personalHighScore = gObject.data.phs; } awardsRecieved = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); i = 0; while (i <= 174) { if (gObject.data.completed_levels[i] == 1) { awardsRecieved[i] = 1; } ++i; } attachMovie('aim', 'aim', 1010945); counter = 0; awardsTotal = 0; countBadges(); pmg.onPress = function () { getURL('http://www.armorgames.com/', '_blank'); visitedArmor = 1; }; firster; if (firster == undefined) { firster = 0; oldBadges = awardsTotal; } if (oldBadges == undefined) { oldBadges = 0; } mg.onPress = function () { getURL('http://www.armorgames.com/', '_blank'); visitedArmor = 1; }; mg3.onPress = function () { getURL('http://www.armorgames.com/', '_blank'); visitedArmor = 1; }; bes.onPress = function () { gotoAndStop(8); }; lSize = 0; saveScreen._x = -1000; startbtn.onRelease = function () { if (opts._x <= 0) { if (onArmor == 0) { __com_mochibot__('6b530053', this, 10301, true); } if (gObject.data.SF1 == undefined && gObject.data.SF2 == undefined && gObject.data.SF3 == undefined) { enemiesLeft = 500; lSize = 1; camp.play(); sObject = SharedObject.getLocal('savedFile1'); } else { saveScreen._x = Stage.width / 2; saveScreen._y = Stage.height / 2 + 15; } } }; hs.onRelease = function () { Mouse.show(); mochi.MochiScores.showLeaderboard({'boardID': '89db28dbf8b4a93c', 'onClose': function () { gotoAndStop(3); Mouse.hide(); }}); }; sur.onRelease = function () { lSize = 0; enemiesLeft = 100000; camp.play(); if (onArmor == 0) { __com_mochibot__('da9a36bf', this, 10301, true); } }; ins.onRelease = function () { gotoAndStop(6); }; awa.onRelease = function () { gotoAndStop(7); }; if (insaneMode) { options.ll1._x -= 118; } cre.onPress = function () { gotoAndStop(9); }; opt.onPress = function () { opts._x = Stage.width / 2; }; music_frame = 2; opts.xd.onPress = function () { opts._x = -1000; }; opts.b2._alpha = 60; opts.b5._alpha = 60; opts.b1.onRollOver = function () { if (opts.b1._alpha <= 50) { opts.b1._alpha = 45; } }; opts.b1.onRollOut = function () { if (opts.b1._alpha <= 50) { opts.b1._alpha = 30; } }; opts.b2.onRollOver = function () { if (opts.b2._alpha <= 50) { opts.b2._alpha = 45; } }; opts.b2.onRollOut = function () { if (opts.b2._alpha <= 50) { opts.b2_alpha = 30; } }; opts.b3.onRollOver = function () { if (opts.b3._alpha <= 50) { opts.b3._alpha = 45; } }; opts.b3.onRollOut = function () { if (opts.b3._alpha <= 50) { opts.b3._alpha = 30; } }; opts.b4.onRollOver = function () { if (opts.b4._alpha <= 50) { opts.b4._alpha = 45; } }; opts.b4.onRollOut = function () { if (opts.b4._alpha <= 50) { opts.b4._alpha = 30; } }; opts.b5.onRollOver = function () { if (opts.b5._alpha <= 50) { opts.b5._alpha = 45; } }; opts.b5.onRollOut = function () { if (opts.b5._alpha <= 50) { opts.b5._alpha = 30; } }; opts.b1.onPress = function () { _quality = 'LOW'; opts.b3._alpha = 30; opts.b2._alpha = 30; opts.b1._alpha = 60; }; opts.b2.onPress = function () { opts.b3._alpha = 30; opts.b2._alpha = 60; opts.b1._alpha = 30; _quality = 'MEDIUM'; }; opts.b3.onPress = function () { opts.b3._alpha = 60; opts.b2._alpha = 30; opts.b1._alpha = 30; _quality = 'HIGH'; }; opts.b4.onPress = function () { opts.b4._alpha = 60; opts.b5._alpha = 30; music_frame = 1; }; opts.b5.onPress = function () { opts.b4._alpha = 30; opts.b5._alpha = 60; music_frame = 2; }; a = 0; createHover(startbtn, startbtn); createHover(opt, opt2); createHover(sur, sur2); createHover(awa, awa2); createHover(bes, bes2); createHover(pmg, pmg2); createHover(ins, ins2); createHover(hs, hs2); createHover(cre, cre2); createHover(qq, qq); groupArray1 = new Array(49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69); groupArray2 = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); groupArray3 = new Array(0, 36, 37, 38, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59); groupArray4 = new Array(70, 71, 72, 73, 74, 75, 76, 77); groupArray5 = new Array(21, 22, 23, 24, 25, 26, 27, 28, 29, 30); groupArray6 = new Array(31, 32, 33, 34, 35, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48); groupArray7 = new Array(12, 13, 14, 15, 16, 17, 18, 19, 20); badges = 0; badgeCounter(groupArray1); badgeCounter(groupArray2); badgeCounter(groupArray3); badgeCounter(groupArray4); badgeCounter(groupArray5); badgeCounter(groupArray6); badgeCounter(groupArray7); if (badges > oldBadges) { awa.newBadge._alpha = 100; } else { awa.newBadge._alpha = 0; } badges = 0; } movieClip 505 { } movieClip 509 { } movieClip 510 { frame 1 { stop(); } } movieClip 537 { } movieClip 540 { } movieClip 541 { } movieClip 542 { } movieClip 543 { } movieClip 544 { } movieClip 545 { } movieClip 546 { } movieClip 547 { } movieClip 548 { } movieClip 549 { } movieClip 550 { } movieClip 551 { } movieClip 552 { } movieClip 553 { } movieClip 555 { } movieClip 557 { } movieClip 564 { } movieClip 565 { } movieClip 567 { } movieClip 568 { } movieClip 569 { } movieClip 570 { } movieClip 571 { } movieClip 572 { } movieClip 587 { } movieClip 604 { } movieClip 619 { } movieClip 636 { } movieClip 645 { frame 1 { stop(); } } movieClip 647 { frame 1 { stop(); } } movieClip 657 { } movieClip 659 { } movieClip 661 { } movieClip 676 { frame 1 { stop(); } } movieClip 679 { } movieClip 680 { } movieClip 684 { } movieClip 685 { } movieClip 686 { frame 1 { stop(); } } movieClip 688 { } movieClip 689 { } movieClip 690 menu { } movieClip 694 { } movieClip 698 { } // unknown tag 88 length 67 movieClip 711 { frame 1 { stop(); } } movieClip 715 { } movieClip 716 scscreen { } movieClip 717 { } movieClip 744 { } movieClip 745 { } movieClip 746 { } movieClip 799 { frame 26 { _parent.gotoAndStop(1); } } movieClip 838 { frame 20 { _parent.removeMovieClip(); } } movieClip 839 boss3 { frame 1 { stop(); } } movieClip 841 { } movieClip 842 blackhole { } movieClip 875 { } movieClip 926 { frame 25 { _parent.gotoAndStop(1); } } movieClip 945 { frame 17 { _parent.removeMovieClip(); } } movieClip 946 enemy { frame 1 { stop(); } } movieClip 947 { } movieClip 980 { } movieClip 981 { } movieClip 982 { } movieClip 1033 { frame 25 { _parent.gotoAndStop(1); } } movieClip 1072 { frame 20 { _parent.removeMovieClip(); } } movieClip 1073 enemy2 { frame 1 { stop(); } } movieClip 1106 { } movieClip 1157 { frame 25 { _parent.gotoAndStop(1); } } movieClip 1176 { frame 17 { _parent.removeMovieClip(); } } movieClip 1177 enemy3 { frame 1 { stop(); } } movieClip 1210 { } movieClip 1261 { frame 25 { _parent.gotoAndStop(1); } } movieClip 1280 { frame 17 { _parent.removeMovieClip(); } } movieClip 1281 enemy4 { frame 1 { stop(); } } movieClip 1282 { } movieClip 1315 { } movieClip 1316 { } movieClip 1317 { } movieClip 1366 { frame 24 { _parent.gotoAndStop(1); } } movieClip 1405 { frame 20 { _parent.removeMovieClip(); } } movieClip 1406 enemy5 { frame 1 { stop(); } } movieClip 1407 { } movieClip 1440 { } movieClip 1441 { } movieClip 1442 { } movieClip 1491 { frame 24 { _parent.gotoAndStop(1); } } movieClip 1510 { frame 17 { _parent.removeMovieClip(); } } movieClip 1511 { } movieClip 1512 enemy6 { frame 1 { stop(); } frame 4 { stop(); } } movieClip 1545 { } movieClip 1582 { frame 18 { _parent.removeMovieClip(); } } movieClip 1583 enemy7 { frame 1 { stop(); } } movieClip 1616 { } movieClip 1667 { frame 25 { _parent.gotoAndStop(1); } } movieClip 1686 { frame 17 { _parent.removeMovieClip(); } } movieClip 1687 enemy8 { frame 1 { stop(); } } movieClip 1718 { } movieClip 1769 { frame 25 { _parent.gotoAndStop(1); } } movieClip 1804 { frame 18 { _parent.removeMovieClip(); } } movieClip 1805 enemy9 { frame 1 { stop(); } } movieClip 1870 { } movieClip 1921 { frame 25 { _parent.gotoAndStop(1); } } movieClip 1960 { frame 20 { _parent.removeMovieClip(); } } movieClip 1961 enemy10 { frame 1 { stop(); } frame 1 { stop(); } } movieClip 1988 { } movieClip 2045 { frame 28 { _parent.gotoAndStop(1); } } movieClip 2084 { frame 20 { _parent.removeMovieClip(); } } movieClip 2085 boss1 { frame 1 { stop(); } } movieClip 2112 { } movieClip 2163 { frame 25 { _parent.gotoAndStop(1); } } movieClip 2202 { frame 20 { _parent.removeMovieClip(); } } movieClip 2203 boss2 { frame 1 { stop(); } } movieClip 2230 { } movieClip 2285 { frame 27 { _parent.gotoAndStop(1); } } movieClip 2324 { frame 20 { _parent.removeMovieClip(); } } movieClip 2325 boss4 { frame 1 { stop(); } } movieClip 2352 { } movieClip 2445 { frame 46 { _parent.gotoAndStop(1); } } movieClip 2484 { frame 20 { _parent.removeMovieClip(); } } movieClip 2485 boss5 { frame 1 { stop(); } } movieClip 2516 { } movieClip 2559 { frame 21 { _parent.gotoAndStop(1); } } movieClip 2580 { frame 10 { _parent.removeMovieClip(); } } movieClip 2581 enemy11 { frame 1 { stop(); } } movieClip 2642 { } movieClip 2673 { frame 15 { _parent.gotoAndStop(1); } } movieClip 2694 { frame 10 { _parent.removeMovieClip(); } } movieClip 2695 enemy12 { frame 1 { stop(); } frame 1 { stop(); } } movieClip 2726 { } movieClip 2767 { frame 20 { _parent.gotoAndStop(1); } } movieClip 2768 { frame 1 { _parent.removeMovieClip(); } } movieClip 2769 enemy13 { frame 1 { stop(); } } movieClip 2800 { } movieClip 2817 { frame 10 { _parent.gotoAndStop(1); } } movieClip 2848 { frame 15 { _parent.removeMovieClip(); } } movieClip 2849 enemy14 { frame 1 { stop(); } } movieClip 2880 { } movieClip 2915 { frame 17 { _parent.gotoAndStop(1); } } movieClip 2946 { frame 15 { _parent.removeMovieClip(); } } movieClip 2947 enemy15 { frame 1 { stop(); } } movieClip 2978 { } movieClip 2999 { frame 10 { _parent.gotoAndStop(1); } } movieClip 3020 { frame 10 { _parent.removeMovieClip(); } } movieClip 3021 enemy16 { frame 1 { stop(); } } movieClip 3052 { } movieClip 3093 { frame 20 { _parent.gotoAndStop(1); } } movieClip 3124 { frame 15 { _parent.removeMovieClip(); } } movieClip 3126 canttouchthis { } movieClip 3127 enemy17 { frame 1 { stop(); } } movieClip 3158 { } movieClip 3209 { frame 25 { _parent.gotoAndStop(1); } } movieClip 3230 { frame 10 { _parent.removeMovieClip(); } } movieClip 3231 enemy18 { frame 1 { stop(); } } movieClip 3262 { } movieClip 3303 { frame 20 { _parent.gotoAndStop(1); } } movieClip 3324 { frame 10 { _parent.removeMovieClip(); } } movieClip 3325 enemy19 { frame 1 { stop(); } } movieClip 3356 { } movieClip 3397 { frame 20 { _parent.gotoAndStop(1); } } movieClip 3418 { frame 10 { _parent.removeMovieClip(); } } movieClip 3419 enemy20 { frame 1 { stop(); } } movieClip 3420 { } movieClip 3421 { } movieClip 3422 { } movieClip 3423 { } movieClip 3425 { } movieClip 3428 { frame 1 { stop(); } } movieClip 3429 { } movieClip 3431 { } movieClip 3433 { } movieClip 3435 { } movieClip 3437 { } movieClip 3439 { } movieClip 3440 { frame 1 { stop(); } frame 49 { _root.gotoAndStop(4); } frame 1000 { _root.gotoAndStop(4); } } movieClip 3443 { } movieClip 3444 { } movieClip 3445 { } movieClip 3446 { } movieClip 3447 { } // unknown tag 88 length 67 movieClip 3453 { } movieClip 3455 { } movieClip 3457 { } movieClip 3459 { } movieClip 3461 { } movieClip 3463 { } movieClip 3465 { } // unknown tag 88 length 67 movieClip 3471 { frame 1 { stop(); } } movieClip 3478 { } movieClip 3483 { frame 1 { stop(); } } movieClip 3489 { } movieClip 3491 { } movieClip 3492 { frame 1 { stop(); } } movieClip 3494 { } movieClip 3495 { frame 1 { stop(); } } movieClip 3497 { } movieClip 3498 { frame 1 { stop(); } } movieClip 3500 { } movieClip 3501 { frame 1 { stop(); } } movieClip 3503 saveScreen { } movieClip 3505 it1 { } movieClip 3507 it10 { } movieClip 3509 it11 { } movieClip 3510 it12 { } movieClip 3512 it13 { } movieClip 3514 it14 { } movieClip 3516 it15 { } movieClip 3518 it16 { } movieClip 3520 it17 { } movieClip 3521 it18 { } movieClip 3523 it19 { } movieClip 3525 it2 { } movieClip 3527 it20 { } movieClip 3529 it21 { } movieClip 3531 it22 { } movieClip 3532 it23 { } movieClip 3534 it24 { } movieClip 3535 it25 { } movieClip 3537 it26 { } movieClip 3539 it27 { } movieClip 3541 it28 { } movieClip 3543 it29 { } movieClip 3545 it3 { } movieClip 3546 it30 { } movieClip 3548 it31 { } movieClip 3550 it32 { } movieClip 3552 it33 { } movieClip 3554 it34 { } movieClip 3556 it4 { } movieClip 3558 it5 { } movieClip 3560 it6 { } movieClip 3562 it7 { } movieClip 3564 it8 { } movieClip 3566 it9 { } frame 4 { function whereDidItGo() { if (quiver <= 2) { shotCount = 1; } if (quiver >= 3) { shotCount = 2; } if (quiver >= 5) { shotCount = 3; } if (quiver == 0) { quiver = 1; } ball1.t.o.bow.gotoAndStop(quiver); if (quiver == 1) { quiver = 0; } } function updateInvenLeft() { invenUse.bow.gotoAndStop(quiver); invenUse.arrow.gotoAndStop(arrowUsed); invenUse.weapon.q.gotoAndStop(weaponUsed); invenUse.spell.gotoAndStop(spellUsed); if (quiver == 0) { invenUse.bow.gotoAndStop(1); } else {} if (arrowUsed == 0) { invenUse.arrow.gotoAndStop(1); } else {} if (weaponUsed == 0) { invenUse.weapon._alpha = 0; } else { invenUse.weapon._alpha = 100; } if (spellUsed == 0) { invenUse.spell._alpha = 0; } else { invenUse.spell._alpha = 100; } } function populateInvetory() { i = theSlots.length - 1; while (i >= 0) { var v3 = _root[theSlots[i]]; var v2 = 1; if (v3 >= 1 && v3 <= 7) { v2 = 2; } if (v3 >= 8 && v3 <= 15) { v2 = 3; v3 -= 7; } if (v3 >= 16 && v3 <= 23) { v2 = 4; v3 -= 15; } if (v3 >= 24) { v2 = 5; v3 -= 23; } invenScreen[i].gotoAndStop(v2); invenScreen[i].u1.gotoAndStop(v3); --i; } i = specSlots.length - 1; while (i >= 0) { v3 = _root[specSlots[i]]; specScreen[i].gotoAndStop(v3); if (v3 == 0) { specScreen[i]._alpha = 0; } else { specScreen[i]._alpha = 100; } --i; } } function invenCreate() { gamepause = true; inventoryScreen._x = Stage.width / 2; inventoryScreen._y = Stage.height / 2; populateInvetory(); inventoryScreen.sell.onRelease = function () { if (inHand != null) { var v2 = 0; if (inHand._currentframe >= 3) { v2 += 6; } if (inHand._currentframe >= 4) { v2 += 8; } if (inHand._currentframe >= 5) { v2 += 8; } if (v2 == 6) { money += Math.floor(allCosts[inHand.u1._currentframe + v2 - 1] * (_root[allSellItems[inHand.u1._currentframe + v2 - 1]] / 100)); _root[allSellItems[inHand.u1._currentframe + v2 - 1]] = 0; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, 930999); ++depth; sm.inside.inside.inside = Math.floor(allCosts[inHand.u1._currentframe + v2 - 1] * (_root[allSellItems[inHand.u1._currentframe + v2 - 1]] / 100)); sm._x = randRange(0, Stage.width); sm._y = randRange(0, Stage.height); giveAward(124); } else { if (v2 == 0) { giveAward(128); } if (v2 == 14) { giveAward(126); } if (v2 == 22) { giveAward(137); } money += allCosts[inHand.u1._currentframe + v2 - 1]; _root[allSellItems[inHand.u1._currentframe + v2 - 1]] -= 1; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, 930999); ++depth; sm.inside.inside.inside = allCosts[inHand.u1._currentframe + v2 - 2]; sm._x = randRange(0, Stage.width); sm._y = randRange(0, Stage.height); } inHand.removeMovieClip(); inHand = null; if (lSize != 0) { textHolder.moneytxt = money; } invenHolding = -1; } }; inventoryScreen.f1.onRelease = function () { if (openToShop == 1) { menuCreate(); openToShop = 0; } else { gamepause = false; } inventoryScreen._x = 2000; inventoryScreen._y = 2000; mouseDownTime = delayTime; }; createHolding(inventoryScreen.y1, 1); createHolding(inventoryScreen.y2, 2); createHolding(inventoryScreen.y3, 3); createHolding(inventoryScreen.y4, 4); createHolding(inventoryScreen.y5, 5); createHolding(inventoryScreen.y6, 6); createHolding(inventoryScreen.y7, 7); createHolding(inventoryScreen.y8, 8); createHolding(inventoryScreen.y9, 9); createHolding(inventoryScreen.y10, 10); createHolding(inventoryScreen.y11, 11); createHolding(inventoryScreen.y12, 12); } function putInHand(slotN) { if (slotN <= 7) { slotsFilled -= 1; var v3 = _root[theSlots[slotN]]; _root[theSlots[slotN]] = 0; var v4 = 1; if (v3 >= 1 && v3 <= 7) { v4 = 2; } if (v3 >= 8 && v3 <= 15) { v4 = 3; v3 -= 7; } if (v3 >= 16 && v3 <= 23) { v4 = 4; v3 -= 15; } if (v3 >= 24) { v4 = 5; v3 -= 23; } tempo = attachMovie('armory', 'armory', 955522); tempo.onEnterFrame = function () { tempo._x = _xmouse; tempo._y = _ymouse; }; armory.gotoAndStop(v4); armory.u1.gotoAndStop(v3); inHand = tempo; } else { var v3 = _root[specSlots[slotN - 8]]; _root[specSlots[slotN - 8]] = 0; _root[whatUse[slotN - 8]] = 0; var v4 = slotN - 6; updateInvenLeft(); tempo = attachMovie('armory', 'armory', 955522); tempo.onEnterFrame = function () { tempo._x = _xmouse; tempo._y = _ymouse; }; armory.gotoAndStop(v4); armory.u1.gotoAndStop(v3); inHand = tempo; } } function createHolding(theButton, slotNumber) { slotNumber -= 1; theButton.onPress = function () { if (_root[theSlots[slotNumber]] != 0 && invenHolding == -1 && slotNumber <= 7) { invenHolding = slotNumber; putInHand(slotNumber); } else { if (_root[theSlots[slotNumber]] == 0 && invenHolding != -1 && slotNumber <= 7) { if (slotNumber <= 7) { slotsFilled += 1; invenHolding = -1; var v3 = inHand._currentframe(); var v2 = 0; if (inHand._currentframe >= 3) { v2 += 7; } if (inHand._currentframe >= 4) { v2 += 8; } if (inHand._currentframe >= 5) { v2 += 8; } _root[theSlots[slotNumber]] = inHand.u1._currentframe + v2; inHand.removeMovieClip(); inHand = null; } } } if (_root[specSlots[slotNumber - 8]] != 0 && invenHolding == -1 && slotNumber >= 8) { invenHolding = slotNumber; putInHand(slotNumber); } else { if (_root[specSlots[slotNumber - 8]] == 0 && invenHolding != -1 && slotNumber >= 8) { if (inHand._currentframe == slotNumber - 6) { invenHolding = -1; _root[specSlots[slotNumber - 8]] = inHand.u1._currentframe; _root[whatUse[slotNumber - 8]] = inHand.u1._currentframe; if (slotNumber - 8 == 1) { invenUse.a1 = 'x' + _root[allItems[inHand.u1._currentframe + 6]]; if (allItems[inHand.u1._currentframe + 6] == 'gunAmmo1') { invenUse.a1 = 'x∞'; } } whereDidItGo(); updateInvenLeft(); inHand.removeMovieClip(); inHand = null; } } } populateInvetory(); }; } function upTime() { seconds += 1; secondsThisGame += 1; mDownSeconds += 1; if (mouseIsDown == 1 || gamepause) { mDownSeconds = 0; } if (mDownSeconds == 20) { giveAward(121); } if (stale == 0 && !gamepause) { staleSeconds += 1; if (staleSeconds == 10) { giveAward(120); } } else { staleSeconds = 0; } if (seconds >= 60) { if (awardsTotal >= 100 && unl1 == 0) { unl1 = 1; _root.medal_popup.unlockMedal('100 achievements'); } if (awardsTotal >= 168 && unl2 == 0) { unl2 = 1; _root.medal_popup.unlockMedal('All achievements'); } minutes += 1; seconds = 0; if (minutes >= 5) { giveAward(5); } if (minutes == 5 && onArmor == 0) { __com_mochibot__('9fa122cb', this, 10301, true); } if (minutes == 10 && onArmor == 0) { __com_mochibot__('6b7b680f', this, 10301, true); } if (minutes == 30 && onArmor == 0) { __com_mochibot__('f5616010', this, 10301, true); } if (minutes == 60 && onArmor == 0) { __com_mochibot__('88956b23', this, 10301, true); } if (minutes >= 15) { giveAward(6); } if (minutes >= 60) { hours += 1; giveAward(7); minutes = 0; if (hours >= 2) { giveAward(8); } if (hours >= 5) { giveAward(166); } } } } function changeArmor(frame) { armorEquip = frame; ball1.t.o.q.gotoAndStop(frame); ball1.t.o.w.gotoAndStop(frame); ball1.t.o.e.gotoAndStop(frame); ball1.t.o.r.gotoAndStop(frame); ball1.hat.gotoAndStop(frame); ball1.w.w.gotoAndStop(frame); ball1.q.f.gotoAndStop(frame); ball1.q.d.gotoAndStop(frame); } function giveAward(awardnum) { if (award._currentframe == 1 && achievementAllowed) { if (awardsRecieved[awardnum - 1] != 1) { if (awardnum == 87) { _root.medal_popup.unlockMedal('First Kill'); } if (awardnum == 1) { _root.medal_popup.unlockMedal('100th kill'); } if (awardnum == 82) { _root.medal_popup.unlockMedal('Defeat boss 1'); } if (awardnum == 83) { _root.medal_popup.unlockMedal('Defeat boss 2'); } if (awardnum == 84) { _root.medal_popup.unlockMedal('Defeat boss 3'); } if (awardnum == 85) { _root.medal_popup.unlockMedal('Defeat boss 4'); } if (awardnum == 86) { _root.medal_popup.unlockMedal('Defeat boss 5'); } if (awardnum == 169 && onArmor == 0) { __com_mochibot__('7153ecab', this, 10301, true); } awardsTotal += 1; award.aname.awardName = awards[awardnum - 1]; awardsRecieved[awardnum - 1] = 1; award.gotoAndPlay(2); if (awardsTotal >= 159) { getMedal = 1; i = 0; while (i <= 159) { if (awardsRecieved[awardnum - 1] == 0) { getMedal = 0; } ++i; } if (getMedal == 1) { giveAward(167); } } if (awardsTotal >= 10) { giveAward(63); } if (awardsTotal >= 30) { giveAward(64); } if (awardsTotal >= 50) { giveAward(65); } if (awardsTotal >= 70) { giveAward(66); } if (awardsTotal >= 90) { giveAward(67); } if (awardsTotal >= 100 && unlt100 == 0) { _root.medal_popup.unlockMedal('100 achievements'); unlt100 = 1; } if (awardsTotal >= 110) { giveAward(68); } if (awardsTotal >= 130) { giveAward(69); } if (awardsTotal >= 145) { giveAward(70); } if (awardsTotal >= 160) { giveAward(71); } if (awardsTotal >= 168) { giveAward(169); _root.medal_popup.unlockMedal('All achievements'); } } } else { if (achievementAllowed) { awardqueue.push(awardnum); } } } function awardWait() { if (award._currentframe == 1) { if (awardqueue.length != 0) { giveAward(awardqueue[0]); awardqueue.splice(0, 1); } } } function enemyFunc() { if (lSize == 1) { var v7 = randRange(1, _root[enArs[level - 1]].length - 1); type = _root[enArs[level - 1]][v7]; } else { type = randRange(enemyAmount - 3, enemyAmount); } if (type < 1) { type = 1; } if (type == 1) { createEnemy1(); } else { if (type == 2) { createEnemy17(); type = 17; } else { if (type == 3) { createEnemy2(); type = 2; } else { if (type == 4) { createEnemy19(); type = 19; } else { if (type == 5) { createEnemy3(); type = 3; } else { if (type == 6) { createEnemy15(); type = 15; } else { if (type == 7) { createEnemy4(); type = 4; } else { if (type == 8) { createEnemy14(); type = 14; } else { if (type == 9) { createEnemy5(); type = 5; } else { if (type == 10) { createEnemy12(); type = 12; } else { if (type == 11) { createEnemy6(); type = 6; } else { if (type == 12) { createEnemy11(); type = 11; } else { if (type == 13) { createEnemy7(); type = 7; } else { if (type == 14) { createEnemy13(); type = 13; } else { if (type == 15) { createEnemy8(); type = 8; } else { if (type == 16) { createEnemy18(); type = 18; } else { if (type == 17) { createEnemy9(); type = 9; } else { if (type == 18) { createEnemy16(); type = 16; } else { if (type == 19) { createEnemy10(); type = 10; } else { if (type == 20) { createEnemy20(); } } } } } } } } } } } } } } } } } } } } enemiesOnStage += 1; trueOnStage += 1; enemyType.push(type); var v2 = randRange(1, 4 - noSouth); enemyX.push(0); enemyY.push(0); enemies.push(en); if (v2 == 1) { en._x = -en._width / 2; en._y = randRange(0, Stage.height); } if (v2 == 2) { en._x = Stage.width + en._width / 2; en._rotation = 180; en._y = randRange(0, Stage.height); } if (v2 == 3) { en._y = -en._height / 2; en._rotation = 90; en._x = randRange(0, Stage.width); } if (v2 == 4) { en._y = Stage.height + en._height / 2; en._rotation = 270; en._x = randRange(0, Stage.width); } if (stageType == 1) { en._y = -en._height / 2; en._x = randRange(0, Stage.width); } if (stageType == 3) { var v3 = randRange(0, levelCapacity[nIn]); en._x = pl1[v3]._x + bg._x; en._y = pl1[v3]._y + bg._y; var v5 = ball1._x - en._x; var v4 = ball1._y - en._y; var v6 = Math.atan2(v5, v4); en._rotation = v6 * 180 / Math.PI; se = attachMovie('spellExplosion', 'spellExplosion' + depth, depth); ++depth; se._x = en._x; se._y = en._y; se.onEnterFrame = function () { se._x -= initialX; se._y -= initialY; }; } } function skipIt(type) { enemyType.push(-3); en._alpha = 0; en.onEnterFrame = function () { if (this._alpha <= 100) { this._alpha += 3; } }; en._y = randRange(enemies[i]._y - 100, enemies[i]._y + 100); en._x = randRange(enemies[i]._x - 100, enemies[i]._x + 100); while (en.hitTest(ball1)) { en._y = randRange(en._y - 100, en._y + 100); en._x = randRange(en._x - 100, en._x + 100); } enemyX.push(0); enemyY.push(0); var v3 = ball1._x - en._x; var v2 = ball1._y - en._y; var v4 = Math.atan2(v2, v3); en._rotation = v4 * 180 / Math.PI; enemies.push(en); } function MouseDownCounter() { mouseDownTime -= 1; if (mouseDownTime <= 0 && mouseIsDown == 1 && attackType == 1) { if (ownBow1 >= 1 || ownBow2 >= 1 || ownBow3 >= 1 || ownBow4 >= 1 || ownBow5 >= 1) { if (music_frame == 1) { ashot.start(); } if (shotCount == 1) { shotHow(0); } if (shotCount == 2) { shotHow(5); shotHow(-5); } if (shotCount == 3) { shotHow(10); shotHow(1); shotHow(-10); } } } if (mouseDownTime <= 0 && mouseIsDown == 1 && attackType == 2 && ball1.t.o._currentframe == 1) { ball1.t.o.k.q.gotoAndStop(weaponUsed); ball1.t.o.gotoAndPlay(2); ball1.t.o.wepTrails.r.gotoAndPlay(2); } if (attackType == 2) { if (ball1.t.o._currentframe == 2) { ensHitThisSwing.splice(0, ensHitThisSwing.length); } i = enemies.length - 1; while (i >= 0) { doHit = 1; if (weaponUsed == 1 || weaponUsed == 3 || weaponUsed == 5) { ball1.t.o.d.gotoAndStop(1); if (ball1.t.o.d.hitTest(enemies[i]) && ball1.t.o._currentframe != 1) { o = ensHitThisSwing.length - 1; while (o >= 0) { if (ensHitThisSwing[o] == enemies[i]) { doHit = 0; } --o; } if (doHit == 1 && (enemies[i]._currentframe != 4 || enemyType[i] != 17)) { ensHitThisSwing.push(enemies[i]); shake = 1; enemyHealth[i] -= weaponStrengths[weaponUsed - 1] + skillq / 4 + (charLevel - 1) / 4; if (enemyHealth[i] > 0) { sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.a1.gotoAndStop(2); sm.inside.inside.inside = weaponStrengths[weaponUsed - 1] + skillq / 4 + (charLevel - 1) / 4; sm._x = enemies[i]._x; sm._y = enemies[i]._y; } if (enemyType[i] == 17 && enemies[i]._currentframe == 4) { enemyHealth[i] += weaponStrengths[weaponUsed - 1] + skillq / 4 + (charLevel - 1) / 4; } if (enemyHealth[i] <= 0) { enDeath(i); meleeKills += 1; if (meleeKills >= 100) { giveAward(153); } if (meleeKills >= 250) { giveAward(154); } if (meleeKills >= 500) { giveAward(155); } if (meleeKills >= 1000) { giveAward(156); } } } } } else { ball1.t.o.d.gotoAndStop(2); if (ball1.t.o.d.hitTest(enemies[i]) && ball1.t.o._currentframe != 1) { o = ensHitThisSwing.length - 1; while (o >= 0) { if (ensHitThisSwing[o] == enemies[i]) { doHit = 0; } --o; } if (doHit == 1 && (enemies[i]._currentframe != 4 || enemyType[i] != 17)) { ensHitThisSwing.push(enemies[i]); shake = 1; enemyHealth[i] -= weaponStrengths[weaponUsed - 1] + skillq / 4 + (charLevel - 1) / 4; if (enemyHealth[i] > 0) { sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.a1.gotoAndStop(2); sm.inside.inside.inside = weaponStrengths[weaponUsed - 1] + skillq / 4 + (charLevel - 1) / 4; sm._x = enemies[i]._x; sm._y = enemies[i]._y; } if (enemyType[i] >= 21 && enemyHealth[i] <= 0) { bhealth.removeMovieClip(); } if (enemyType[i] == 17 && enemies[i]._currentframe == 4) { enemyHealth[i] += weaponStrengths[weaponUsed - 1]; } if (enemyHealth[i] <= 0) { enDeath(i); meleeKills += 1; if (meleeKills >= 100) { giveAward(153); } if (meleeKills >= 250) { giveAward(154); } if (meleeKills >= 500) { giveAward(155); } if (meleeKills >= 1000) { giveAward(156); } } } } } --i; } } if (mouseDownTime <= 0 && mouseIsDown == 1 && attackType == 3) { shootSpell(spellUsed); } } function shootSpell(sType) { if (mana - sType >= 0) { mana -= sType / 3; ball1.t.o.gotoAndPlay(2); theSpell = attachMovie('enbullet2', 'spell' + depth, depth); theSpell.gotoAndStop(sType); theSpell._x = ball1._x; theSpell._y = ball1._y; theSpell._rotation = ball1._rotation; mouseDownTime = delayTime - 5; ++depth; var v3 = Math.cos(theSpell._rotation * Math.PI / 180) * 7; var v2 = Math.sin(theSpell._rotation * Math.PI / 180) * 7; spells.push(theSpell); spellType.push(sType); spellX.push(v3); spellY.push(v2); } } function removeSpell() { spells[i].removeMovieClip(); spells.splice(i, 1); spellType.splice(i, 1); spellX.splice(i, 1); spellY.splice(i, 1); } function spellMovement() { i = spells.length - 1; while (i >= 0) { spells[i]._x += spellX[i]; spells[i]._y += spellY[i]; spells[i]._x -= initialX; spells[i]._y -= initialY; if (spellType[i] == 2) { } if (spellType[i] == 3) { } if (spellType[i] == 4) { } if (spellType[i] == 5) { } if (spells[i]._x > 640 || spells[i]._x < 0 || spells[i]._y > 480 || spells[i]._y < 0) { removeSpell(); bulletMissed = 1; } b = enemies.length - 1; while (b >= 0) { if (spells[i].center.hitTest(enemies[b].inner)) { if (music_frame == 1) { gothit.start(); } shake = 1; se = attachMovie('spellExplosion', 'spellExplosion' + depth, depth); if (spells[i]._currentframe == 2) { se.gotoAndStop(3); } if (spells[i]._currentframe == 3) { se.gotoAndStop(2); } ++depth; se._x = spells[i]._x; se._y = spells[i]._y; se.onEnterFrame = function () { se._x -= initialX; se._y -= initialY; }; enemyHealth[b] -= spells[i]._currentframe * 4 + skillq / 4 + (charLevel - 1) / 4; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); if (enemyHealth[b] > 0) { ++depth; sm.inside.inside.a1.gotoAndStop(2); sm.inside.inside.inside = spells[i]._currentframe * 2 + skillq / 4 + (charLevel - 1) / 4; sm._x = enemies[b]._x; sm._y = enemies[b]._y; } if (enemyType[b] == 17 && enemies[b]._currentframe == 4) { enemyHealth[b] += spells[i]._currentframe; } if (enemyType[b] >= 21 && enemyHealth[b] <= 0) { bhealth.removeMovieClip(); } if (enemyHealth[b] <= 0) { magicKills += 1; if (magicKills >= 100) { giveAward(157); } if (magicKills >= 250) { giveAward(158); } if (magicKills >= 500) { giveAward(159); } if (magicKills >= 1000) { giveAward(160); } enDeath(b); } removeSpell(); } --b; } --i; } } function shotHow(angle) { ball1.t.o.gotoAndPlay(2); if (arrowUsed == 8) { arrowPicked = 'spike8'; ammo = gunAmmo8; if (gunAmmo8 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 7) { arrowPicked = 'spike9'; ammo = gunAmmo7; if (gunAmmo7 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 6) { arrowPicked = 'spike6'; ammo = gunAmmo6; if (gunAmmo6 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 5) { arrowPicked = 'spike'; ammo = gunAmmo5; if (gunAmmo5 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 4) { arrowPicked = 'spike3'; ammo = gunAmmo4; if (gunAmmo4 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 3) { arrowPicked = 'spike5'; ammo = gunAmmo3; if (gunAmmo3 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 2) { arrowPicked = 'spike4'; ammo = gunAmmo2; if (gunAmmo2 <= 0) { arrowUsed = 0; ammo = gunAmmo1; _root[specSlots[1]] = 0; updateInvenLeft(); } } if (arrowUsed == 0) { arrowPicked = 'spike2'; ammo = 999999999; } if (gaOn == 1) { arrowUsed = 6; arrowPicked = 'spike7'; } if (quiver == 0) { quiver = 1; } mouseDownTime = delayTime - speeded[quiver - 1] * 2; if (quiver == 1) { quiver = 0; } if (angle == 0) { if (ammo > 0) { ammo -= 1; sp = attachMovie(arrowPicked, 'spike' + depth, depth); } } if (angle == 5 || angle == -5) { if (ammo > 0) { ammo -= 1; sp = attachMovie(arrowPicked, 'spike' + depth, depth); } } if (angle == 10 || angle == -10 || angle == 1) { if (ammo > 0) { ammo -= 1; sp = attachMovie(arrowPicked, 'spike' + depth, depth); if (angle == 1) { angle = 0; } } } textHolder.arrowstxt = ammo; ++depth; sp._x = ball1._x; sp._y = ball1._y; sp._rotation = topRotation; sp._rotation += angle; var v4 = Math.cos(sp._rotation * Math.PI / 180) * 20; var v3 = Math.sin(sp._rotation * Math.PI / 180) * 20; bullets.push(sp); bulletX.push(v4); bulletY.push(v3); if (arrowUsed == 0) { gunAmmo1 = ammo; } if (arrowUsed == 2) { gunAmmo2 = ammo; } if (arrowUsed == 3) { gunAmmo3 = ammo; } if (arrowUsed == 4) { gunAmmo4 = ammo; } if (arrowUsed == 5) { gunAmmo5 = ammo; } if (arrowUsed == 6) { gunAmmo6 = ammo; } if (arrowUsed == 7) { gunAmmo7 = ammo; } if (arrowUsed == 8) { gunAmmo8 = ammo; } invenUse.a1 = 'x' + ammo; if (arrowUsed == 0) { invenUse.a1 = 'x∞'; } } function splatterFunc() { i = splatters.length - 1; while (i >= 0) { splatters[i]._x -= initialX; splatters[i]._y -= initialY; sTimer[i] -= 1; --i; } } function enbulMovement() { i = enBullets.length - 1; while (i >= 0) { enBullets[i]._x += enbx[i]; enBullets[i]._y += enby[i]; enBullets[i]._x -= initialX; enBullets[i]._y -= initialY; if (enBullets[i].center.hitTest(ball1.abox) && timer2 <= 0 && stageType != 1 && stageType != 2) { if (enBulletsType[i] == 2) { giveAward(138); ball1._x = randRange(0, Stage.width); ball1._y = randRange(0, Stage.height); } if (enBulletsType[i] == 3) { giveAward(141); playerFreeze = 35; } if (!inver) { lives -= (Math.ceil(level / 5) * (1 - armorEquip / 10) - 0.2 * armorq) / 2; } if (music_frame == 1) { stab.start(); } timer2 = 30; untouched = 0; if (lives <= 0) { if (lSize == 0 || lSize == -1) { realGO = 1; } gameover = 1; gamepause = 1; deaths += 1; } textHolder.livestxt = lives; attachMovie('redFlash', 'redFlash', 1000824); removeEnBul(); } if (enBullets[i]._x + enBullets[i]._width / 2 >= Stage.width || enBullets[i]._x <= -(enBullets[i]._width / 2) || enBullets[i]._y >= Stage.height || enBullets[i]._y <= 0) { removeEnBul(); } --i; } } function removeEnBul() { enBullets[i].removeMovieClip(); enBullets.splice(i, 1); enBulletsType.splice(i, 1); enbx.splice(i, 1); enby.splice(i, 1); } function bulletMovement() { shaker(); i = bullets.length - 1; while (i >= 0) { pEffect = randRange(1, 3); if (pEffect == 1) { particleEffect(i); } bullets[i]._x += bulletX[i]; bullets[i]._y += bulletY[i]; if (arrowUsed == 2) { bullets[i]._x += bulletX[i] / 3; bullets[i]._y += bulletY[i] / 3; } if (arrowUsed == 3) { bullets[i]._x -= bulletX[i] / 3; bullets[i]._y -= bulletY[i] / 3; } if (bullets[i]._x > 640 || bullets[i]._x < 0 || bullets[i]._y > 480 || bullets[i]._y < 0) { removeBullet(); bulletMissed = 1; } b = enemies.length - 1; while (b >= 0) { if (bullets[i].hitTest(enemies[b].inner)) { if (music_frame == 1) { gothit.start(); } if (gaOn == 1) { aIn = enemies[b].temper.attachMovie('spike7', 'spiked' + depth2, depth2); } else { if (arrowUsed == 0) { aIn = enemies[b].temper.attachMovie('spike2', 'spiked' + depth2, depth2); } if (arrowUsed == 2) { aIn = enemies[b].temper.attachMovie('spike4', 'spiked' + depth2, depth2); } if (arrowUsed == 3) { aIn = enemies[b].temper.attachMovie('spike5', 'spiked' + depth2, depth2); } if (arrowUsed == 4) { aIn = enemies[b].temper.attachMovie('spike3', 'spiked' + depth2, depth2); } if (arrowUsed == 5) { aIn = enemies[b].temper.attachMovie('spike', 'spiked' + depth2, depth2); } if (arrowUsed == 6) { aIn = enemies[b].temper.attachMovie('spike6', 'spiked' + depth2, depth2); } if (arrowUsed == 7) { aIn = enemies[b].temper.attachMovie('spike9', 'spiked' + depth2, depth2); } if (arrowUsed == 8) { aIn = enemies[b].temper.attachMovie('spike8', 'spiked' + depth2, depth2); } } ++depth2; aIn._rotation = bullets[i]._rotation - enemies[b]._rotation; var v8 = enemies[b]._x - bullets[i]._x; var v7 = enemies[b]._y - bullets[i]._y; var v3 = Math.atan2(v7, v8); var v5 = bullets[i]._x - Math.cos(v3) * 39; var v6 = bullets[i]._y - Math.sin(v3) * 39; var v10 = bullets[i]._x - Math.cos(bullets[i]._rotation * Math.PI / 180) * 39; var v9 = bullets[i]._y - Math.sin(bullets[i]._rotation * Math.PI / 180) * 39; var v11 = v10 - v5; var v1 = v9 - v6; enemies[b].inside.swapDepths(100000); xMove = Math.cos(aIn._rotation * Math.PI / 180); yMove = Math.sin(aIn._rotation * Math.PI / 180); aIn._x -= xMove * 39; aIn._y -= yMove * 39; aIn._rotation += enemies[b]._rotation; if (v1 >= 15) { v1 = 15; } if (v1 <= -15) { v1 = -15; } aIn._y += v1 * -Math.cos(enemies[b]._rotation * Math.PI / 180); aIn._rotation -= enemies[b]._rotation; if (enemyType[i] == 24) { aIn.removeMovieClip(); bullets[i]._rotation += 180; bulletX[i] *= -1; bulletY[i] *= -1; } else { shake = 1; particleEffect3(b, i); if (gaOn == 0) { removeBullet(); } enemies[b]._x += Math.cos(v3) * 15; enemies[b]._y += Math.sin(v3) * 15; if (quiver == 0) { quiver = 1; } qHit = quiver; if (quiver == 1) { quiver = 0; } if (qHit >= 3) { qHit -= 1; if (qHit >= 4) { qHit -= 1; } } var v4 = 0; var v2 = 0; v4 = (qHit - 1) / 3 + 1; if (arrowUsed == 0) { arrowUsed = 1; } v2 = (arrowUsed - 1) / 3 + 1; if (arrowUsed == 1) { arrowUsed = 0; } enemyHealth[b] -= v4 * v2 + skillq / 4 + (charLevel - 1) / 4; if (enemyHealth[b] > 0) { sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.a1.gotoAndStop(2); sm.inside.inside.inside = Math.floor(v4 * v2 + skillq / 4 + ((charLevel - 1) / 4) * 10) / 10; sm._x = enemies[b]._x; sm._y = enemies[b]._y; } if (arrowUsed == 4 || arrowUsed == 6 || arrowUsed == 8) { se = attachMovie('spellExplosion', 'spellExplosion' + depth, depth); ++depth; se._x = enemies[b]._x; se._y = enemies[b]._y; if (arrowUsed == 4) { se.gotoAndStop(2); } if (arrowUsed == 8) { se.gotoAndStop(3); } se.onEnterFrame = function () { se._x -= initialX; se._y -= initialY; }; } if (enemyType[b] == 17 && enemies[b]._currentframe == 4) { enemyHealth[b] += v4 * v2 + skillq / 4; } if (enemyType[b] >= 21 && enemyHealth[b] <= 0) { bhealth.removeMovieClip(); } } if (enemyHealth[b] <= 0) { enDeath(b); rangeKills += 1; if (rangeKills >= 100) { giveAward(149); } if (rangeKills >= 250) { giveAward(150); } if (rangeKills >= 500) { giveAward(151); } if (rangeKills >= 1000) { giveAward(152); } } } --b; } --i; } } function enDeath(b) { enemies[b].inside.swapDepths(100000); enemyKillCount += 1; if (enemyKillCount >= 0 && (lSize == 0 || lSize == -1)) { if (lSize == 0 || lSize == -1) { chance *= 0.999; if (enemyKillCount >= 20) { enemyAmount = 2; } if (enemyKillCount >= 40) { enemyAmount = 3; } if (enemyKillCount >= 60) { enemyAmount = 4; } if (enemyKillCount >= 80) { enemyAmount = 5; } if (enemyKillCount >= 100) { enemyAmount = 6; } if (enemyKillCount >= 120) { enemyAmount = 7; } if (enemyKillCount >= 140) { enemyAmount = 8; } if (enemyKillCount >= 160) { enemyAmount = 9; } if (enemyKillCount >= 180) { enemyAmount = 10; } if (enemyKillCount >= 200) { enemyAmount = 11; } if (enemyKillCount >= 220) { enemyAmount = 12; } if (enemyKillCount >= 240) { enemyAmount = 13; } if (enemyKillCount >= 260) { enemyAmount = 14; } if (enemyKillCount >= 280) { enemyAmount = 15; } if (enemyKillCount >= 300) { enemyAmount = 16; } if (enemyKillCount >= 320) { enemyAmount = 17; } if (enemyKillCount >= 340) { enemyAmount = 18; } if (enemyKillCount >= 360) { enemyAmount = 19; } if (enemyKillCount >= 380) { enemyAmount = 20; } } } if (shake == 0) { shake = 1; } if (level % 5 != 0) { percent += 100 / enemiesToKill[level - 1]; if (percent > 100) { percent = 100; } if (level >= 20 && enemyType[b] == 4) { percent -= 100 / enemiesToKill[level - 1]; } if (level >= 7 && enemyType[b] == 2) { percent -= 100 / enemiesToKill[level - 1]; } } if (enemyType[b] >= 21) { percent += 100; } kills += 1; kill += 1; if (lSize == 0) { if (kills >= 50) { giveAward(9); } if (kills >= 100) { giveAward(10); } if (kills >= 150) { giveAward(11); } if (kills >= 200) { giveAward(12); } if (kills >= 300) { giveAward(168); } } if (kill % 10 == 0) { } textHolder.killstxt = kills; enemiesLeft -= 1; textHolder.enemiestxt = enemiesLeft; if (kill >= 10000) { giveAward(165); } else { if (kill >= 3000) { giveAward(4); } else { if (kill >= 1000) { giveAward(3); } else { if (kill >= 300) { giveAward(2); } else { if (kill >= 100) { giveAward(1); } } } } } removeEnemy(b); textHolder.scoretxt = score; if (score >= 10000) { giveAward(51); } else { if (score >= 4000) { giveAward(50); } else { if (score >= 1000) { giveAward(49); } else { if (score >= 300) { giveAward(48); } } } } } function removeBullet() { bullets[i].removeMovieClip(); bulletX.splice(i, 1); bulletY.splice(i, 1); bullets.splice(i, 1); } function enemyMovement() { i = enemies.length - 1; while (i >= 0) { if (enemyType[i] == 21 || enemyType[i] == 25) { sWave -= 1; var v17 = randRange(1, 150); if (v17 == 1 && sWave <= 0) { sWave = 50; } if (sWave == 50 || sWave == 40 || sWave == 30 || sWave == 20 || sWave == 10 || sWave == 0) { bul = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; enBulletsType.push(1); bul.gotoAndStop(1); bul._x = -bul._width / 2 + 1; bul._y = sWave * 9 + randRange(0, 10); enBullets.push(bul); enbx.push(Math.cos(bul._rotation * Math.PI / 180) * 4); enby.push(Math.sin(bul._rotation * Math.PI / 180) * 4); } } if (enemyType[i] >= 21) { if (enemyType[i] == 21) { bhealth.bfill._xscale = 100 * (enemyHealth[i] / 300); } if (enemyType[i] == 22) { bhealth.bfill._xscale = 100 * (enemyHealth[i] / 800); } if (enemyType[i] == 23) { bhealth.bfill._xscale = 100 * (enemyHealth[i] / 1300); } if (enemyType[i] == 24) { bhealth.bfill._xscale = 100 * (enemyHealth[i] / 2000); } if (enemyType[i] == 25) { bhealth.bfill._xscale = 100 * (enemyHealth[i] / 3000); } } if (enemyType[i] == 17) { var v8 = randRange(1, 300); if (v8 == 1) { enemies[i].gotoAndStop(4); } var v9 = randRange(1, 300); if (v9 == 1 || trueOnStage - enemiesToKill[level - 1] >= 0) { enemies[i].gotoAndStop(1); } } if (stageType == 1 || stageType == 2) { if (enemies[i]._y >= Stage.height) { removeEnemy(i); percent += 100 / enemiesToKill[level - 1]; if (percent > 100) { percent = 100; } } if (enemies[i].hitTest(bg.castle) && enemies[i]._currentframe == 1) { enemies[i].gotoAndStop(2); castleHealth -= 1; bg.Castle.gotoAndPlay(2); if (castleHealth <= 0) { bg.Castle._alpha = 0; } } } if (stageType == 0 || stageType == 1 || stageType == 2 || stageType == 3) { var v2 = enemies[i]._rotation; var v4 = 0; var v7; var v6; if (stageType == 0 || stageType == 3) { v7 = ball1._x - enemies[i]._x; v6 = ball1._y - enemies[i]._y; } else { if (stageType == 1 || stageType == 2) { v7 = bg._x + bg.Castle._x - enemies[i]._x; v6 = bg._y + bg.Castle._y - enemies[i]._y; } } var v18 = Math.atan2(v6, v7); v4 = v18 * 180 / Math.PI; var v3 = (v2 - v4) % 360; if (v3 > 180) { v3 -= 360; } else { if (v3 < -180) { v3 += 360; } } if (Math.abs(v3) < 3) { v2 = v4; } else { if (v3 < 0) { v2 += 2; if (enemyType[i] == 12 || enemyType[i] == 8 || enemyType[i] == 20 || enemyType[i] == 24) { v2 -= 1; } } else { v2 -= 2; if (enemyType[i] == 12 || enemyType[i] == 8 || enemyType[i] == 20) { v2 += 1; } } } enemies[i]._rotation = v2; } enemyX[i] = Math.cos(enemies[i]._rotation * Math.PI / 180) * 1.5; enemyY[i] = Math.sin(enemies[i]._rotation * Math.PI / 180) * 1.5; if ((enemyType[i] == 4 || enemyType[i] == 14 || enemyType[i] == 7 || enemyType[i] == 10 || enemyType[i] == 23 || enemyType[i] == 25) && stageType != 1) { if (enemies[i]._x >= Stage.width - 75 || enemies[i]._x <= 75 || enemies[i]._y <= 75 || enemies[i]._y >= Stage.height - 75) { enemies[i].h.play(); } else { if (enemies[i]._x >= Stage.width - 80 || enemies[i]._x <= 80 || enemies[i]._y <= 80 || enemies[i]._y >= Stage.height - 80) { enemyX[i] -= Math.cos(enemies[i]._rotation * Math.PI / 180) * 1.5; enemyY[i] -= Math.sin(enemies[i]._rotation * Math.PI / 180) * 1.5; enemies[i].h.stop(); } else { enemyX[i] -= Math.cos(enemies[i]._rotation * Math.PI / 180) * 3; enemyY[i] -= Math.sin(enemies[i]._rotation * Math.PI / 180) * 3; enemies[i].h.play(); } } } if (enemyType[i] == 5 || enemyType[i] == 9 || enemyType[i] == 16 || enemyType[i] == 22 || enemyType[i] == 25) { var v15 = randRange(1, 210); if (v15 == 1) { enemies[i]._alpha -= 10; } if (enemies[i]._alpha <= 97 && spikes[i] != 1000) { enemies[i]._alpha -= 3; if (enemies[i]._alpha <= 0) { spikes[i] = 1000; enemies[i]._x = randRange(0, Stage.width); enemies[i]._y = randRange(0, Stage.height); while (enemies[i].hitTest(ball1)) { enemies[i]._x = randRange(0, Stage.width); enemies[i]._y = randRange(0, Stage.height); } var v14 = ball1._x - enemies[i]._x; var v12 = ball1._y - enemies[i]._y; var v19 = Math.atan2(v12, v14); enemies[i]._rotation = v19 * 180 / Math.PI; } } if (spikes[i] == 1000) { enemies[i]._alpha += 3; if (enemies[i]._alpha >= 100) { spikes[i] = 10000; } } } if ((enemyType[i] == 12 || enemyType[i] == 10) && enemies.length <= 13) { if (enemyType[i] == 10) { var v13 = randRange(1, 320); if (v13 == 1) { createEnemy11(); skipIt(11); exp = attachMovie('explosionS', 'exp' + depth, depth); ++depth; exp._x = enemies[i]._x; exp._y = enemies[i]._y; } } } if (stageType != 1 && stageType != 2) { if (enemyType[i] == 2 || enemyType[i] == 4 || enemyType[i] == 7 || enemyType[i] == 9 || enemyType[i] == 10 || enemyType[i] == 15 || enemyType[i] == 16 || enemyType[i] == 14 || enemyType[i] == 18 || enemyType[i] == 23 || enemyType[i] == 24 || enemyType[i] == 25) { var v5 = randRange(1, 280); if (enemyType[i] == 15 || enemyType[i] == 23 || enemyType[i] == 25) { v5 = randRange(1, 320); } if (v5 == 1) { enemies[i].inside.removeMovieClip(); enemies[i].gotoAndStop(2); } stopAttack = 1; if (enemyType[i] == 15 || enemyType[i] == 23 || enemyType[i] == 25) { stopAttack = randRange(1, 5); } if (enemies[i].inder._currentframe == 15 && stopAttack != 1) { enemies[i].inder.gotoAndPlay(2); var v10 = ball1._x - enemies[i]._x; var v11 = ball1._y - enemies[i]._y; var v16 = Math.atan2(v11, v10); enemies[i]._rotation = v16 * 180 / Math.PI; } if (enemies[i].inder._currentframe == 10 || enemies[i]._currentframe == 2 && (enemyType[i] == 14 || enemyType[i] == 16) && enemies[i].inder._currentframe == 4) { if (enemyType[i] != 9 && enemyType[i] != 18) { if (enemyType[i] == 14) { bul = attachMovie('spike', 'enbullet' + depth, depth); enBulletsType.push(2); } else { if (enemyType[i] == 16) { bul = attachMovie('spike6', 'enbullet' + depth, depth); enBulletsType.push(3); } else { bul = attachMovie('enbullet2', 'enbullet' + depth, depth); if (enemyType[i] == 2) { enBulletsType.push(1); bul.gotoAndStop(1); } if (enemyType[i] == 4) { enBulletsType.push(4); bul.gotoAndStop(1); } if (enemyType[i] == 7) { enBulletsType.push(5); bul.gotoAndStop(3); } if (enemyType[i] == 9) { enBulletsType.push(6); bul.gotoAndStop(4); } if (enemyType[i] == 10) { enBulletsType.push(7); bul.gotoAndStop(5); } if (enemyType[i] == 16) { enBulletsType.push(7); bul.gotoAndStop(5); } if (enemyType[i] == 23) { enBulletsType.push(1); bul.gotoAndStop(1); } if (enemyType[i] == 24) { enBulletsType.push(1); bul.gotoAndStop(1); } if (enemyType[i] == 25) { enBulletsType.push(1); bul.gotoAndStop(1); } } } } ++depth; actualBeam = randRange(1, 6); if (enemyType[i] == 18 && actualBeam == 1) { lb = attachMovie('lazerbeam', 'lb' + depth, depth); ++depth; lb._x = enemies[i]._x; lb._y = enemies[i]._y; lb._rotation = enemies[i]._rotation; lb.onEnterFrame = function () { if (this._currentframe == 20) { this.removeMovieClip(); } if (this._currentframe == 10) { if (this.hitTest(ball1._x, ball1._y, true)) { playerOnGoo2 = 100; } } }; bul = attachMovie('enbullet2', 'enbullet' + depth, depth); enBulletsType.push(1); bul.gotoAndStop(1); ++depth; } else { if (enemyType[i] == 18 && actualBeam != 1) { bul = attachMovie('enbullet2', 'enbullet' + depth, depth); enBulletsType.push(1); bul.gotoAndStop(1); ++depth; } } if (enemyType[i] != 9) { bul._x = enemies[i]._x; bul._y = enemies[i]._y; bul._rotation = enemies[i]._rotation; enBullets.push(bul); enbx.push(Math.cos(bul._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul._rotation * Math.PI / 180) * 6); if (enemyType[i] == 7 || enemyType[i] == 24 || enemyType[i] == 25) { bul2 = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; bul3 = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; bul3._x = enemies[i]._x; bul2._x = bul3._x; bul3._y = enemies[i]._y; bul2._y = bul3._y; bul2._rotation = enemies[i]._rotation + 10; bul3._rotation = enemies[i]._rotation - 10; enBullets.push(bul2); enbx.push(Math.cos(bul2._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul2._rotation * Math.PI / 180) * 6); enBullets.push(bul3); enbx.push(Math.cos(bul3._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul3._rotation * Math.PI / 180) * 6); enBulletsType.push(1); enBulletsType.push(1); } } else { bul = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; bul2 = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; bul3 = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; bul4 = attachMovie('enbullet2', 'enbullet' + depth, depth); ++depth; bul._x = enemies[i]._x; bul._y = enemies[i]._y; bul._rotation = 45; enBullets.push(bul); enbx.push(Math.cos(bul._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul._rotation * Math.PI / 180) * 6); bul2._x = enemies[i]._x; bul2._y = enemies[i]._y; bul2._rotation = 135; enBullets.push(bul2); enbx.push(Math.cos(bul2._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul2._rotation * Math.PI / 180) * 6); bul3._x = enemies[i]._x; bul3._y = enemies[i]._y; bul3._rotation = -45; enBullets.push(bul3); enbx.push(Math.cos(bul3._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul3._rotation * Math.PI / 180) * 6); bul4._x = enemies[i]._x; bul4._y = enemies[i]._y; bul4._rotation = -135; enBullets.push(bul4); enbx.push(Math.cos(bul4._rotation * Math.PI / 180) * 6); enby.push(Math.sin(bul4._rotation * Math.PI / 180) * 6); enBulletsType.push(1); enBulletsType.push(1); enBulletsType.push(1); enBulletsType.push(1); } } } } if (enemies[i].target2.hitTest(ball1.abox) && timer2 <= 0) { enemies[i].inside.removeMovieClip(); enemies[i].gotoAndStop(2); } if (enemyType[i] == 17 && ball1.hitTest(enemies[i]) && enemies[i]._currentframe == 4) { giveAward(139); } if (enemies[i].inder._currentframe == 10 && enemyType[i] != 2 && enemyType[i] != 4 && enemyType[i] != 7 && enemyType[i] != 9 && enemyType[i] != 10 && enemyType[i] != 15 && enemyType[i] != 16 && enemyType[i] != 14 && enemyType[i] != 23 && enemyType[i] != 24 && enemyType[i] != 25 && enemyType[i] != 18 && stageType != 1 && stageType != 2) { if (timer2 <= 0) { if (enemyType[i] >= 21 && !inver) { lives -= (Math.ceil(level / 5) * (1 - armorEquip / 10) - 0.2 * armorq) / 2; } if (!inver) { lives -= (Math.ceil(level / 5) * (1 - armorEquip / 10) - 0.2 * armorq) / 2; } if (music_frame == 1) { stab.start(); } timer2 = 30; untouched = 0; if (lives <= 0) { if (lSize == 0 || lSize == -1) { realGO = 1; } gameover = 1; gamepause = 1; deaths += 1; } textHolder.livestxt = lives; attachMovie('redFlash', 'redFlash', 1000824); } } if (20 >= initialX) { enemies[i]._x -= initialX; enemies[i]._y -= initialY; } if (enemies[i]._currentframe == 1 || enemies[i]._currentframe == 4) { enemies[i]._x += enemyX[i]; enemies[i]._y += enemyY[i]; if (enemyType[i] == 8 || enemyType[i] == 3 || enemyType[i] == 25) { enRot = enemies[i]._rotation; while (enRot <= ball1._rotation) { enRot += 360; } enRot -= 360; if (enRot + 180 >= ball1._rotation - 170 && enRot + 180 <= ball1._rotation) { enemies[i]._x += Math.cos((ball1._rotation - 90) * Math.PI / 180); enemies[i]._y += Math.sin((ball1._rotation - 90) * Math.PI / 180); } if (enRot + 180 <= ball1._rotation + 170 && enRot + 180 >= ball1._rotation) { enemies[i]._x += Math.cos((ball1._rotation + 90) * Math.PI / 180); enemies[i]._y += Math.sin((ball1._rotation + 90) * Math.PI / 180); } } if (enemyType[i] == 3) { enemies[i]._x += enemyX[i] / 4; enemies[i]._y += enemyY[i] / 4; } if (enemyType[i] == 21 || enemyType[i] == 24) { enemies[i]._x += enemyX[i]; enemies[i]._y += enemyY[i]; } if (enemyType[i] == 12 || enemyType[i] == 8 || enemyType[i] == 2) { enemies[i]._x += enemyX[i] * 1.5; enemies[i]._y += enemyY[i] * 1.5; if (enemyType[i] == 12 || enemyType[i] == 8) { enemies[i]._x += enemyX[i]; enemies[i]._y += enemyY[i]; } } if (enemyType[i] == 6 && Math.abs(ball1._x - enemies[i]._x) <= 150 && Math.abs(ball1._y - enemies[i]._y) <= 150) { enemies[i]._x += enemyX[i] * 1.5; enemies[i]._y += enemyY[i] * 1.5; if (enemies[i]._currentframe == 1) { enemies[i].gotoAndStop(4); } } else { if (enemyType[i] != 17) { enemies[i].gotoAndStop(1); } } } if (enemyX[i] > 0 && enemies[i]._x > bg._x + bg._width) { enemies[i]._x -= 100; } if (enemyX[i] < 0 && enemies[i]._x < bg._x - bg._width) { enemies[i]._x += 100; } if (enemyY[i] > 0 && enemies[i]._y > bg._y + bg._height) { enemies[i]._y -= 100; } if (enemyY[i] < 0 && enemies[i]._y < bg._y - bg._height / 2) { enemies[i]._y += 100; } if (bg.bg.hitTest(enemies[i]._x + enemies[i]._width / 2, enemies[i]._y, true)) { enemies[i]._x -= 1; if (bg.bg.hitTest(enemies[i]._x + enemies[i]._width / 2, enemies[i]._y, true)) { enemies[i]._x -= 1; if (bg.bg.hitTest(enemies[i]._x + enemies[i]._width / 2, enemies[i]._y, true)) { enemies[i]._x -= 1; } } } if (bg.bg.hitTest(enemies[i]._x - enemies[i]._width / 2, enemies[i]._y, true)) { enemies[i]._x += 1; if (bg.bg.hitTest(enemies[i]._x - enemies[i]._width / 2, enemies[i]._y, true)) { enemies[i]._x += 1; if (bg.bg.hitTest(enemies[i]._x - enemies[i]._width / 2, enemies[i]._y, true)) { enemies[i]._x += 1; } } } if (bg.bg.hitTest(enemies[i]._x, enemies[i]._y + enemies[i]._height / 2, true)) { enemies[i]._y -= 1; if (bg.bg.hitTest(enemies[i]._x, enemies[i]._y + enemies[i]._height / 2, true)) { enemies[i]._y -= 1; if (bg.bg.hitTest(enemies[i]._x, enemies[i]._y + enemies[i]._height / 2, true)) { enemies[i]._y -= 1; } } } if (bg.bg.hitTest(enemies[i]._x, enemies[i]._y - enemies[i]._height / 2, true)) { enemies[i]._y += 1; if (bg.bg.hitTest(enemies[i]._x, enemies[i]._y - enemies[i]._height / 2, true)) { enemies[i]._y += 1; if (bg.bg.hitTest(enemies[i]._x, enemies[i]._y - enemies[i]._height / 2, true)) { enemies[i]._y += 1; } } } --i; } } function createEnemy1() { en = attachMovie('enemy', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; enemyHealth.push(1); spikes.push(10000); } function createEnemy17() { enemyHealth.push(2); spikes.push(10000); en = attachMovie('enemy17', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy2() { enemyHealth.push(3); spikes.push(10000); en = attachMovie('enemy2', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy19() { enemyHealth.push(4); spikes.push(10000); en = attachMovie('enemy19', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy3() { enemyHealth.push(5); spikes.push(10000); en = attachMovie('enemy3', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy15() { enemyHealth.push(6); spikes.push(10000); en = attachMovie('enemy15', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy4() { enemyHealth.push(8); spikes.push(10000); en = attachMovie('enemy4', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy14() { enemyHealth.push(10); spikes.push(10000); en = attachMovie('enemy14', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy5() { enemyHealth.push(5); spikes.push(10000); en = attachMovie('enemy5', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy12() { enemyHealth.push(14); spikes.push(10000); en = attachMovie('enemy12', 'enemy' + depth, depth); en._yscale = 45; en._xscale = 45; ++depth; } function createEnemy6() { enemyHealth.push(16); spikes.push(10000); en = attachMovie('enemy6', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy11() { enemyHealth.push(6); spikes.push(10000); en = attachMovie('enemy11', 'enemy' + depth, depth); en._yscale = 100; en._xscale = 100; ++depth; } function createEnemy7() { enemyHealth.push(21); spikes.push(10000); en = attachMovie('enemy7', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy13() { enemyHealth.push(24); spikes.push(10000); en = attachMovie('enemy13', 'enemy' + depth, depth); en._yscale = 100; en._xscale = 100; ++depth; } function createEnemy8() { enemyHealth.push(27); spikes.push(10000); en = attachMovie('enemy8', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy18() { enemyHealth.push(10); spikes.push(10000); en = attachMovie('enemy18', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy9(vari) { enemyHealth.push(34); spikes.push(10000); en = attachMovie('enemy9', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy16() { enemyHealth.push(38); spikes.push(10000); en = attachMovie('enemy16', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy10() { enemyHealth.push(42); spikes.push(10000); en = attachMovie('enemy10', 'enemy' + depth, depth); en._yscale = 65; en._xscale = 65; ++depth; } function createEnemy20() { enemyHealth.push(50); spikes.push(10000); en = attachMovie('enemy20', 'enemy' + depth, depth); en._yscale = 100; en._xscale = 100; ++depth; } function createBoss1() { enemyHealth.push(300); spikes.push(10000); en = attachMovie('boss2', 'boss' + depth, depth); ++depth; en._x = Stage.width / 2; en._y = en._height; } function createBoss2() { enemyHealth.push(800); spikes.push(10000); en = attachMovie('boss5', 'boss' + depth, depth); ++depth; en._x = Stage.width / 2; en._y = en._height; } function createBoss3() { enemyHealth.push(1300); spikes.push(10000); en = attachMovie('boss3', 'boss' + depth, depth); ++depth; en._x = Stage.width / 2; en._y = en._height; } function createBoss4() { enemyHealth.push(2000); spikes.push(10000); en = attachMovie('boss4', 'boss' + depth, depth); ++depth; en._x = Stage.width / 2; en._y = en._height; } function createBoss5() { enemyHealth.push(3000); spikes.push(10000); en = attachMovie('boss1', 'boss' + depth, depth); ++depth; en._x = Stage.width / 2; en._y = en._height; } function quickRemove() { enemies[i].removeMovieClip(); enemies.splice(i, 1); enemiesOnStage -= 1; enemyHealth.splice(i, 1); enemyX.splice(i, 1); enemyType.splice(i, 1); enemyY.splice(i, 1); spikes.splice(i, 1); } function coinMove() { var v1 = randRange(1, 50); i = coins.length - 1; while (i >= 0) { coins[i]._x -= initialX; coins[i]._y -= initialY; coinTimer[i] -= 1; if (coinTimer[i] <= 0) { coins[i]._alpha -= 1; if (coins[i]._alpha <= 0) { removeCoin(); moneyC = 1; } } if (coins[i].hitTest(ball1.abox)) { if (music_frame == 1) { coinCollect.start(); } if (coinWorth[i] == -1 && slotsFilled != 8) { ownBow1 += 1; invenInsert(1, ''); } if (coinWorth[i] == -2 && slotsFilled != 8) { ownBow2 += 1; invenInsert(2, ''); giveAward(76); } if (coinWorth[i] == -3 && slotsFilled != 8) { ownBow3 += 1; invenInsert(3, ''); giveAward(77); } if (coinWorth[i] == -4 && slotsFilled != 8) { ownBow4 += 1; invenInsert(4, ''); giveAward(78); } if (coinWorth[i] == -5 && slotsFilled != 8) { ownBow5 += 1; invenInsert(5, ''); giveAward(79); } if (coinWorth[i] == -6 && slotsFilled != 8) { ownBow6 += 1; invenInsert(6, ''); giveAward(80); } if (coinWorth[i] == -7 && slotsFilled != 8) { ownBow7 += 1; invenInsert(7, ''); giveAward(81); } if (coinWorth[i] == -8 && slotsFilled != 8) { giveAward(111); invenInsert(9, 'gunAmmo2'); gunAmmo2 += 100; } if (coinWorth[i] == -9 && slotsFilled != 8) { giveAward(112); invenInsert(10, 'gunAmmo3'); gunAmmo3 += 100; } if (coinWorth[i] == -10 && slotsFilled != 8) { giveAward(113); invenInsert(11, 'gunAmmo4'); gunAmmo4 += 100; } if (coinWorth[i] == -11 && slotsFilled != 8) { giveAward(114); invenInsert(12, 'gunAmmo5'); gunAmmo5 += 100; } if (coinWorth[i] == -12 && slotsFilled != 8) { giveAward(115); invenInsert(13, 'gunAmmo6'); gunAmmo6 += 100; } if (coinWorth[i] == -13 && slotsFilled != 8) { giveAward(116); invenInsert(14, 'gunAmmo7'); gunAmmo7 += 100; } if (coinWorth[i] == -14 && slotsFilled != 8) { giveAward(117); invenInsert(15, 'gunAmmo8'); gunAmmo8 += 100; } if (coinWorth[i] > 0) { money += coinWorth[i]; } particleEffect4(); removeCoin(); if (lSize != 0) { textHolder.moneytxt = money; } } --i; } } function removeCoin() { coins[i].removeMovieClip(); coins.splice(i, 1); coinTimer.splice(i, 1); coinWorth.splice(i, 1); } function removeEnemy(vari) { if (gamepause) { remove = 0; } if (remove == 0) { enemiesOnStage -= 1; blood = 0; if (bloodType == 1 && enemyType[vari] != 2) { bd = attachMovie('blood1', 'blood' + depth3, depth3); ++depth3; bd._x = enemies[vari]._x; bd._y = enemies[vari]._y; splatters.push(bd); sTimer.push(400); } if (bloodType == 2 && enemyType[vari] != 2) { bd = attachMovie('blood2', 'blood' + depth3, depth3); ++depth3; bd._x = enemies[vari]._x; bd._y = enemies[vari]._y; splatters.push(bd); sTimer.push(400); } if (bloodType == 3 && enemyType[vari] != 2) { bd = attachMovie('blood3', 'blood' + depth3, depth3); ++depth3; bd._x = enemies[vari]._x; bd._y = enemies[vari]._y; splatters.push(bd); sTimer.push(400); } bd._rotation = randRange(0, 359); if (enemyType[vari] >= 21) { if (enemyType[vari] == 21) { money += 250; giveAward(82); } if (enemyType[vari] == 22) { money += 1500; giveAward(83); } if (enemyType[vari] == 23) { money += 6000; giveAward(84); } if (enemyType[vari] == 24) { money += 24000; giveAward(85); } if (enemyType[vari] == 25) { giveAward(86); } } var v20 = randRange(1, 2); if (v20 == 1) { var v18 = 0; var v10 = 0; var v7 = 0; var v6 = 0; var v5 = 0; var v11 = 0; var v17 = 0; var v19 = 0; if (enemyType[vari] == 1) { } if (enemyType[vari] == 2) { v10 = randRange(1, 15); } if (enemyType[vari] == 3) { v7 = randRange(1, 15); } if (enemyType[vari] == 4) { v7 = randRange(1, 15); } if (enemyType[vari] == 5) { v6 = randRange(1, 15); } if (enemyType[vari] == 6) { v6 = randRange(1, 15); } if (enemyType[vari] == 7) { v5 = randRange(1, 15); } if (enemyType[vari] == 8) { v5 = randRange(1, 15); } if (enemyType[vari] == 9) { v11 = randRange(1, 15); } if (enemyType[vari] == 10) { v17 = randRange(1, 15); } if (enemyType[vari] == 11) { v6 = randRange(1, 15); } if (enemyType[vari] == 12) { v6 = randRange(1, 15); } if (enemyType[vari] == 13) { v5 = randRange(1, 15); } if (enemyType[vari] == 14) { v7 = randRange(1, 15); } if (enemyType[vari] == 15) { v7 = randRange(1, 15); } if (enemyType[vari] == 16) { v11 = randRange(1, 15); } if (enemyType[vari] == 17) { } if (enemyType[vari] == 18) { v5 = randRange(1, 15); } if (enemyType[vari] == 19) { v10 = randRange(1, 15); } if (enemyType[vari] == 20) { v17 = randRange(1, 15); } v19 = worthArray[enemyType[vari] - 1]; if (lSize != 0 && enemyType[vari] != 17 && enemyType[vari] != 19 && enemyType[vari] != 3 && enemyType[vari] != 6 && enemyType[vari] != 7 && enemyType[vari] != 8 && enemyType[vari] != 20) { if (enemyType[vari] == 1 || enemyType[vari] == 17 || enemyType[vari] == 2 || enemyType[vari] == 19 || enemyType[vari] == 3 || enemyType[vari] == 15) { coin = attachMovie('coin', 'coin' + depth2, depth2); } else { if (enemyType[vari] == -3 || enemyType[vari] == 4 || enemyType[vari] == 14 || enemyType[vari] == 5 || enemyType[vari] == 12 || enemyType[vari] == 6 || enemyType[vari] == 11 || enemyType[vari] == 7) { coin = attachMovie('coin2a', 'coin' + depth2, depth2); } else { if (enemyType[vari] == 13 || enemyType[vari] == 8 || enemyType[vari] == 18 || enemyType[vari] == 9 || enemyType[vari] == 16 || enemyType[vari] == 10 || enemyType[vari] == 20) { coin = attachMovie('coin3a', 'coin' + depth2, depth2); } } } coin._yscale = 50; coin._xscale = 50; ++depth2; coin._x = enemies[vari]._x; coin._y = enemies[vari]._y; coins.push(coin); coinTimer.push(500); coinWorth.push(v19); } if (lSize == 0 || lSize == -1) { if (ownBow1 >= 1) { v18 = 0; } if (ownBow2 >= 1) { v10 = 0; } if (ownBow3 >= 1) { v7 = 0; } if (ownBow4 >= 1) { v6 = 0; } if (ownBow5 >= 1) { v5 = 0; } if (ownBow6 >= 1) { v6 = 0; } if (ownBow7 >= 1) { v5 = 0; } } if (v18 == 1) { coin2 = attachMovie('w1', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-1); } if (v10 == 1) { coin2 = attachMovie('w2', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-2); } if (v7 == 1) { coin2 = attachMovie('w3', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-3); } if (v6 == 1) { coin2 = attachMovie('w4', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-4); } if (v5 == 1) { coin2 = attachMovie('w5', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-5); } if (v11 == 1) { coin2 = attachMovie('w6', 'coin' + depth3, depth3); ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-6); } if (v17 == 1) { coin2 = attachMovie('w7', 'coin' + depth3, depth3); ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-7); } var v16 = 0; var v9 = 0; var v8 = 0; var v14 = 0; var v13 = 0; var v12 = 0; var v15 = 0; v19 = 0; var v4 = 15; if (lSize == 0 || lSize == -1) { v4 = 5; } if (enemyType[vari] == 1) { DropArrow1 = randRange(1, v4); } if (enemyType[vari] == 2) { v16 = randRange(1, v4); } if (enemyType[vari] == 3) { v9 = randRange(1, v4); } if (enemyType[vari] == 4) { v9 = randRange(1, v4); } if (enemyType[vari] == 5) { v8 = randRange(1, v4); } if (enemyType[vari] == 6) { v8 = randRange(1, v4); } if (enemyType[vari] == 7) { v14 = randRange(1, v4); } if (enemyType[vari] == 8) { v13 = randRange(1, v4); } if (enemyType[vari] == 9) { v12 = randRange(1, v4); } if (enemyType[vari] == 10) { v15 = randRange(1, v4); } if (enemyType[vari] == 11) { v8 = randRange(1, v4); } if (enemyType[vari] == 12) { v8 = randRange(1, v4); } if (enemyType[vari] == 13) { v14 = randRange(1, v4); } if (enemyType[vari] == 14) { v9 = randRange(1, v4); } if (enemyType[vari] == 15) { v9 = randRange(1, v4); } if (enemyType[vari] == 16) { v12 = randRange(1, v4); } if (enemyType[vari] == 17) { DropArrow1 = randRange(1, v4); } if (enemyType[vari] == 18) { v13 = randRange(1, v4); } if (enemyType[vari] == 19) { v16 = randRange(1, v4); } if (enemyType[vari] == 20) { v15 = randRange(1, v4); } v19 = worthArray[enemyType[vari] - 1]; if (v16 == 1) { coin2 = attachMovie('yy2', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-8); } if (v9 == 1) { coin2 = attachMovie('yy3', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-9); } if (v8 == 1) { coin2 = attachMovie('yy4', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-10); } if (v14 == 1) { coin2 = attachMovie('yy5', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-11); } if (v13 == 1) { coin2 = attachMovie('yy6', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-12); } if (v12 == 1) { coin2 = attachMovie('yy7', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-13); } if (v15 == 1) { coin2 = attachMovie('yy8', 'coin' + depth3, depth3); coin2._yscale = 45; coin2._xscale = 45; ++depth3; coin2._x = enemies[vari]._x; coin2._y = enemies[vari]._y; coins.push(coin2); coinTimer.push(500); coinWorth.push(-14); } } enemies[vari].inside.removeMovieClip(); enemies[vari].gotoAndStop(3); if (enemyType[vari] == -3) { if (music_frame == 1) { banger.start(); } percent -= 100 / enemiesToKill[level - 1]; } if (enemyType[vari] == 1) { giveAward(87); if (music_frame == 1) { banger.start(); } expierence += 5; score += 2; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '2'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 17) { giveAward(97); if (music_frame == 1) { banger.start(); } expierence += 9; score += 5; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '5'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; gooey = attachMovie('goo2', 'goo' + depth3, depth3); gooey._yscale = 70; gooey._xscale = 70; ++depth3; gooey._x = enemies[vari]._x; gooey._y = enemies[vari]._y; gooList.push(gooey); gooLife.push(500); } else { if (enemyType[vari] == 2) { giveAward(88); if (music_frame == 1) { banger.start(); } expierence += 14; score += 9; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '9'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 19) { giveAward(98); if (music_frame == 1) { banger.start(); } expierence += 20; score += 14; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '14'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; if (lSize == 1) { p1 = bg.bg.attachMovie('goo4s', 'goo' + depth, depth); ++depth; p2 = attachMovie('goo4', 'goo' + depth, depth); gooList4.push(p2); ++depth; p2._x = enemies[vari]._x; p2._y = enemies[vari]._y; p1._x = enemies[vari]._x - bg._x - bg.bg._x; p1._y = enemies[vari]._y - bg._y - bg.bg._y; } } else { if (enemyType[vari] == 3) { giveAward(89); if (music_frame == 1) { banger.start(); } expierence += 27; score += 20; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '20'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; ep += 2; textHolder.eptxt = ep; gooey = attachMovie('goo', 'goo' + depth3, depth3); gooey._yscale = 70; gooey._xscale = 70; ++depth3; gooey._x = enemies[vari]._x; gooey._y = enemies[vari]._y; gooList2.push(gooey); gooLife2.push(500); } else { if (enemyType[vari] == 15) { giveAward(99); if (music_frame == 1) { banger.start(); } expierence += 35; score += 27; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '27'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 4) { giveAward(90); if (music_frame == 1) { banger.start(); } expierence += 44; score += 35; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '35'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 14) { giveAward(100); if (music_frame == 1) { banger.start(); } expierence += 54; score += 44; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '44'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 5) { if (music_frame == 1) { banger.start(); } expierence += 65; score += 54; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '54'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; giveAward(91); createEnemy5(); enemyType.push(-3); en._x = enemies[vari]._x + 10; en._y = enemies[vari]._y; enemyX.push(0); enemyY.push(0); enemies.push(en); en._yscale = 50; en._xscale = 50; en._rotation = enemies[vari]._rotation; createEnemy5(); enemyType.push(-3); en._x = enemies[vari]._x - 10; en._y = enemies[vari]._y; enemyX.push(0); enemyY.push(0); enemies.push(en); en._yscale = 50; en._xscale = 50; en._rotation = enemies[vari]._rotation; } else { if (enemyType[vari] == 12) { giveAward(101); if (music_frame == 1) { banger.start(); } expierence += 77; score += 65; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '65'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 6) { giveAward(92); if (music_frame == 1) { banger.start(); } expierence += 90; score += 77; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '77'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; gooey = attachMovie('goo3', 'goo' + depth3, depth3); ++depth3; gooey._x = enemies[vari]._x; gooey._y = enemies[vari]._y; gooList3.push(gooey); gooLife3.push(500); } else { if (enemyType[vari] == 11) { giveAward(102); if (music_frame == 1) { banger.start(); } expierence += 104; score += 90; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '90'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; createEnemy11(); enemyType.push(-3); en._x = enemies[vari]._x + 10; en._y = enemies[vari]._y; enemyX.push(0); enemyY.push(0); enemies.push(en); en._yscale = 50; en._xscale = 50; en._rotation = enemies[vari]._rotation; createEnemy11(); enemyType.push(-3); en._x = enemies[vari]._x - 10; en._y = enemies[vari]._y; enemyX.push(0); enemyY.push(0); enemies.push(en); en._yscale = 50; en._xscale = 50; en._rotation = enemies[vari]._rotation; } else { if (enemyType[vari] == 7) { giveAward(93); if (music_frame == 1) { banger.start(); } expierence += 119; score += 104; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '104'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; gooey = attachMovie('goo2', 'goo' + depth3, depth3); gooey._yscale = 70; gooey._xscale = 70; ++depth3; gooey._x = enemies[vari]._x; gooey._y = enemies[vari]._y; gooList.push(gooey); gooLife.push(500); } else { if (enemyType[vari] == 13) { giveAward(103); if (music_frame == 1) { banger.start(); } expierence += 135; score += 119; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '119'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; q = explosionParts.length - 1; while (q >= 0) { pt = attachMovie(explosionParts[q], 'ep' + depth, depth); ++depth; pt._x = enemies[vari]._x; pt._y = enemies[vari]._y; enBullets.push(pt); var v2 = randRange(4, 10); var v3 = Math.random() * Math.PI * 2; enbx.push(Math.cos(v3) * v2); enby.push(Math.sin(v3) * v2); --q; } } else { if (enemyType[vari] == 8) { giveAward(94); if (music_frame == 1) { banger.start(); } expierence += 152; score += 135; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '135'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; if (lSize == 1) { p1 = bg.bg.attachMovie('goo4s', 'goo' + depth, depth); ++depth; p2 = attachMovie('goo4', 'goo' + depth, depth); gooList4.push(p2); ++depth; p2._x = enemies[vari]._x; p2._y = enemies[vari]._y; p1._x = enemies[vari]._x - bg._x - bg.bg._x; p1._y = enemies[vari]._y - bg._y - bg.bg._y; } } else { if (enemyType[vari] == 18) { giveAward(104); if (music_frame == 1) { banger.start(); } expierence += 170; score += 152; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '152'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; createEnemy18(); enemyType.push(-3); en._x = enemies[vari]._x + 10; en._y = enemies[vari]._y; enemyX.push(0); enemyY.push(0); enemies.push(en); en._yscale = 50; en._xscale = 50; en._rotation = enemies[vari]._rotation; createEnemy18(); enemyType.push(-3); en._x = enemies[vari]._x - 10; en._y = enemies[vari]._y; enemyX.push(0); enemyY.push(0); enemies.push(en); en._yscale = 50; en._xscale = 50; en._rotation = enemies[vari]._rotation; } else { if (enemyType[vari] == 9) { giveAward(95); if (music_frame == 1) { banger.start(); } expierence += 189; score += 170; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '170'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 16) { giveAward(105); if (music_frame == 1) { banger.start(); } expierence += 209; score += 189; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '189'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 10) { giveAward(96); if (music_frame == 1) { banger.start(); } expierence += 230; score += 209; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '209'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; } else { if (enemyType[vari] == 20) { giveAward(106); if (music_frame == 1) { banger.start(); } expierence += 252; score += 230; sm = attachMovie('scoreMovie', 'scoreMovie' + depth, depth); ++depth; sm.inside.inside.inside = '230'; sm._x = enemies[vari]._x; sm._y = enemies[vari]._y; gooey = attachMovie('goo3', 'goo' + depth3, depth3); ++depth3; gooey._x = enemies[vari]._x; gooey._y = enemies[vari]._y; gooList3.push(gooey); gooLife3.push(500); } } } } } } } } } } } } } } } } } } } } if (expierence >= expNeeded[charLevel - 1]) { expierence = 0; charLevel += 1; levelUp.gotoAndPlay(2); textHolder.leveltxt = charLevel; } textHolder.scoretxt = score; enemies.splice(vari, 1); enemyHealth.splice(vari, 1); enemyX.splice(vari, 1); enemyType.splice(vari, 1); enemyY.splice(vari, 1); spikes.splice(vari, 1); sm.selectable = false; } } function bombMovement() { bombHitCount = 0; i = bombs.length - 1; while (i >= 0) { bombs[i]._x -= initialX; bombs[i]._y -= initialY; bombTime[i] -= 1; q = enemies.length - 1; while (q >= 0) { if (bombs[i].hitTest(enemies[q]._x, enemies[q]._y, true) && bombType[i] == 2 || bombTime[i] <= 0 && bombType[i] == 1) { se = attachMovie('spellExplosion', 'spellExplosion' + depth, depth); ++depth; se._x = bombs[i]._x; se._y = bombs[i]._y; se.onEnterFrame = function () { se._x -= initialX; se._y -= initialY; }; bombs[i].removeMovieClip(); bombs.splice(i, 1); bombType.splice(i, 1); bombTime.splice(i, 1); b = enemies.length - 1; while (b >= 0) { if (se.hitTest(enemies[b]._x, enemies[b]._y, true)) { if (enemyHealth[b] > 0) { enemyHealth[b] -= 200; } if (enemyType[b] >= 21 && enemyHealth[b] <= 0) { bhealth.removeMovieClip(); } if (enemyType[b] == 17 && enemies[b]._currentframe == 4) { enemyHealth[b] += 5; } if (enemyHealth[b] <= 0) { bombHitCount += 1; enDeath(b); } } if (bombHitCount >= 2) { giveAward(127); } --b; } } --q; } --i; } } function onEnterFrame() { updateInvenLeft(); potUse.t1 = 'x' + ownBomb1; potUse.t2 = 'x' + ownBomb2; potUse.t3 = 'x' + ownManaPot; potUse.t4 = 'x' + ownHpPot; enemyStart -= 1; if (money > 9999999) { money = 9999999; if (lSize != 0) { textHolder.moneytxt = money; } } if (Key.isDown(39) && Key.isDown(16)) { achievementAllowed = 0; gamepause = true; attachMovie('cheatscreen', 'cheatscreen', 1001710); if (awardsTotal >= 160) { cheatscreen.l9._x = -1300; } else { cheatscreen.ga._x = -1300; } if (awardsTotal >= 70) { cheatscreen.l4._x = -1300; } else { cheatscreen.mm._x = -1300; } if (awardsTotal >= 50) { cheatscreen.l3._x = -1300; } else { cheatscreen.ma._x = -1300; } if (awardsTotal >= 30) { cheatscreen.l2._x = -1300; } else { cheatscreen.ab._x = -1300; } if (awardsTotal >= 110) { cheatscreen.l6._x = -1300; } else { cheatscreen.ms._x = -1300; } if (awardsTotal >= 145) { cheatscreen.l8._x = -1300; } else { cheatscreen.inv._x = -1300; } if (awardsTotal >= 130) { cheatscreen.l7._x = -1300; } else { cheatscreen.rf._x = -1300; } if (awardsTotal >= 90) { cheatscreen.l5._x = -1300; } else { cheatscreen.ss._x = -1300; } if (awardsTotal >= 10) { cheatscreen.l1._x = -1300; } else { cheatscreen.nm._x = -1300; } cheatscreen._x = Stage.width / 2; cheatscreen._y = Stage.height / 2; cheatscreen.done.onPress = function () { gamepause = 0; cheatScreen.swapDepths(5500); cheatscreen.removeMovieClip(); }; cheatscreen.ga.onPress = function () { if (cheatscreen.ga.g._currentframe == 1) { cheatscreen.ga.g.gotoAndStop(2); gaOn = 1; } else { cheatscreen.ga.g.gotoAndStop(1); gaOn = 0; } }; cheatscreen.mm.onPress = function () { if (cheatscreen.mm.g._currentframe == 1) { cheatscreen.mm.g.gotoAndStop(2); money = 9999999; if (lSize != 0) { textHolder.moneytxt = money; } } else { cheatscreen.mm.g.gotoAndStop(1); } }; cheatscreen.ma.onPress = function () { if (cheatscreen.ma.g._currentframe == 1) { cheatscreen.ma.g.gotoAndStop(2); invenInsert(15, 'gunAmmo8'); gunAmmo8 += 99999; } else { cheatscreen.ma.g.gotoAndStop(1); } }; cheatscreen.ab.onPress = function () { if (cheatscreen.ab.g._currentframe == 1) { cheatscreen.ab.g.gotoAndStop(2); ownBow7 += 1; invenInsert(7, ''); } else { cheatscreen.ab.g.gotoAndStop(1); } }; cheatscreen.ms.onPress = function () { if (cheatscreen.ms.g._currentframe == 1) { cheatscreen.ms.g.gotoAndStop(2); skillq = 4; if (speedq < 4) { speedq = 4; } armorq = 4; healthq = 4; speeded[0] = 5; speeded[1] = 5; speeded[2] = 5; speeded[3] = 5; speeded[4] = 5; speeded[6] = 5; speeded[7] = 5; } else { cheatscreen.ms.g.gotoAndStop(1); } }; cheatscreen.inv.onPress = function () { if (cheatscreen.inv.g._currentframe == 1) { cheatscreen.inv.g.gotoAndStop(2); inver = 1; } else { cheatscreen.inv.g.gotoAndStop(1); inver = 0; } }; cheatscreen.rf.onPress = function () { if (cheatscreen.rf.g._currentframe == 1) { cheatscreen.rf.g.gotoAndStop(2); rapid = 1; delayTime = 0; } else { cheatscreen.rf.g.gotoAndStop(1); rapid = 0; delayTime = 15; } }; cheatscreen.ss.onPress = function () { if (cheatscreen.ss.g._currentframe == 1) { cheatscreen.ss.g.gotoAndStop(2); speedq = 5; } else { cheatscreen.ss.g.gotoAndStop(1); speedq = 0; } }; cheatscreen.nm.onPress = function () { if (cheatscreen.nm.g._currentframe == 1) { cheatscreen.nm.g.gotoAndStop(2); attachMovie('nightmode', 'nightmode', 3); } else { cheatscreen.nm.g.gotoAndStop(1); nightmode.removeMovieClip(); } }; } if (gamepause) { _root._x = 0; _root._y = 0; } ball1._rotation = topRotation; if (enemiesLeft >= 90000) { enemiesLeft = 100000; textHolder.el._alpha = 0; textHolder.el2._alpha = 0; } awardWait(); var v9 = _xmouse - aim._x; var v8 = _ymouse - aim._y; aim._x += v9 / 2; aim._y += v8 / 2; if (gameover && realGO == 0 && lSize != 0) { if (continues <= 0) { realGO = 1; } else { realGO = 0.5; attachMovie('continue2', 'continue2', 1006215); gamepause = 1; continue2.ye._alpha = 50; continue2.ye.onRollOver = function () { continue2.ye._alpha = 100; }; continue2.ye.onRollOut = function () { continue2.ye._alpha = 50; }; continue2.no._alpha = 50; continue2.no.onRollOver = function () { continue2.no._alpha = 100; }; continue2.no.onRollOut = function () { continue2.no._alpha = 50; }; continue2.ye.onPress = function () { continue2.removeMovieClip(); continues -= 1; gamepause = 0; gameover = 0; realGO = 0; lives = 5 + healthq; }; continue2.no.onPress = function () { continue2.removeMovieClip(); realGO = 1; }; continue2.cl = 'Continues Left: ' + continues; } } if (realGO == 1) { saveScreen2.removeMovieClip(); inventoryScreen.removeMovieClip(); sEnter.removeMovieClip(); if (bhealth.bfill._xscale <= 5 && level == 25) { giveAward(164); } i = coins.length - 1; while (i >= 0) { removeCoin(); --i; } bhealth.removeMovieClip(); award.removeMovieClip(); pointer.removeMovieClip(); i = splatters.length - 1; while (i >= 0) { splatters[i].removeMovieClip(); splatters.splice(i, 1); sTimer.splice(i, 1); --i; } i = gooList.length; while (i >= 0) { gooList[i].removeMovieClip(); gooList.splice(i, 1); gooLife.splice(i, 1); --i; } i = gooList2.length; while (i >= 0) { gooList2[i].removeMovieClip(); gooList2.splice(i, 1); gooLife2.splice(i, 1); --i; } i = gooList3.length; while (i >= 0) { gooList3[i].removeMovieClip(); gooList3.splice(i, 1); gooLife3.splice(i, 1); --i; } i = gooList4.length - 1; while (i >= 0) { gooList4[i].removeMovieClip(); gooList4.splice(i, 1); --i; } i = spells.length - 1; while (i >= 0) { removeSpell(i); --i; } i = enemies.length; while (i >= 0) { enemies[i]._alpha -= 10; if (enemies[i]._alpha <= 0) { enemies[i].removeMovieClip(); enemies.splice(vari, 1); enemiesOnStage -= 1; enemyHealth.splice(vari, 1); enemyX.splice(vari, 1); enemyType.splice(vari, 1); enemyY.splice(vari, 1); spikes.splice(vari, 1); } --i; } i = bullets.length; while (i >= 0) { bullets[i]._alpha -= 10; if (bullets[i]._alpha <= 0) { bullets[i].removeMovieClip(); bulletX.splice(i, 1); bulletY.splice(i, 1); bullets.splice(i, 1); } --i; } i = enBullets.length; while (i >= 0) { removeEnBul(); --i; } hHolder.removeMovieClip(); invenUse.removeMovieClip(); potUse.removeMovieClip(); levelUp.removeMovieClip(); gb.removeMovieClip(); manaM.removeMovieClip(); expM.removeMovieClip(); useless.removeMovieClip(); i = bombs.length - 1; while (i >= 0) { bombs[i].removeMovieClip(); bombs.splice(i, 1); bombType.splice(i, 1); bombTime.splice(i, 1); --i; } ball1._alpha -= 1; ball2._alpha -= 1; ball3._alpha -= 1; ball4._alpha -= 1; ball5._alpha -= 1; nightmode.removeMovieClip(); i = explosions.length; while (i >= 0) { explosions[i].removeMovieClip(); explosions.splice(i, 1); exX.splice(i, 1); exY.splice(i, 1); --i; } i = explosions2.length; while (i >= 0) { explosions2[i].removeMovieClip(); explosions2.splice(i, 1); exX2.splice(i, 1); exY2.splice(i, 1); howFast.splice(i, 1); --i; } makebigger.removeMovieClip(); if (ball1._alpha <= 0) { shield.removeMovieClip(); ball1.removeMovieClip(); ball2.removeMovieClip(); ball3.removeMovieClip(); ball4.removeMovieClip(); ball5.removeMovieClip(); gotoAndStop(5); } } if (menu._x == Stage.width / 2) { if (menu._alpha < 100) { menu._alpha += 2; } } invenFull.gotoAndStop(1); if (!gamepause) { if (isGo == 1) { var v12 = randRange(1, 250); if (v12 == 1) { isGo = 0; } } if (level == 10 || level == 25 && isGo == 0) { var v10 = randRange(1, 250); if (v10 == 1) { isGo = 1; } if (percent >= 50) { isGo = 1; } tts -= 1; if (tts <= 0) { redX._x += (ball1._x - redX._x) / 40; redX._y += (ball1._y - redX._y) / 40; } var v13 = randRange(1, 100); if (v13 == 1) { tts = 25; se = attachMovie('spellExplosion', 'spellExplosion' + depth, depth); ++depth; se._x = redX._x; se._y = redX._y; se.onEnterFrame = function () { se._x -= initialX; se._y -= initialY; if (this.hitTest(ball1._x, ball1._y, true)) { lives -= 1; timer2 = 30; untouched = 0; if (lives <= 0) { if (lSize == 0 || lSize == -1) { realGO = 1; } gameover = 1; gamepause = 1; deaths += 1; } textHolder.livestxt = lives; attachMovie('redFlash', 'redFlash', 1000824); this.removeMovieClip(); } }; } } else { redX._x = 1000; } if (slotsFilled >= 8) { invenFull.gotoAndStop(2); } particleMovement(); particleMovement2(); stale = 0; var v3 = 0; if (Key.isDown(39) || Key.isDown(68)) { v3 = 1; velocityX += acceleration + 0.2 * speedq; stale = 1; } if (Key.isDown(37) || Key.isDown(65)) { v3 = 1; velocityX -= acceleration + 0.2 * speedq; stale = 1; } if (Key.isDown(40) || Key.isDown(83)) { v3 = 1; velocityY += acceleration + 0.2 * speedq; stale = 1; } if (Key.isDown(38) || Key.isDown(87)) { v3 = 1; velocityY -= acceleration + 0.2 * speedq; stale = 1; } bombDelayTime -= 1; if (Key.isDown(9) && bombDelayTime <= 0) { bombDelayTime = 20; if (ownBomb1 > 0) { giveAward(132); bm = attachMovie('bomb1', 'bomb' + depth3, depth3); ++depth3; bm._x = ball1._x; bm._y = ball1._y; bombs.push(bm); bombType.push(1); bombTime.push(100); ownBomb1 -= 1; } else { if (ownBomb2 > 0) { giveAward(133); bm = attachMovie('bomb2', 'bomb' + depth3, depth3); ++depth3; bm._x = ball1._x; bm._y = ball1._y; bombs.push(bm); bombType.push(2); bombTime.push(0); ownBomb2 -= 1; } } } hpDelay -= 1; manaDelay -= 1; if (Key.isDown(32) && hpDelay <= 0 && lives < 5 + healthq) { if (ownHpPot >= 1) { giveAward(130); hpDelay = 10; ownHpPot -= 1; lives += (5 + healthq) / 4; if (lives >= 5 + healthq) { lives = 5 + healthq; } } } if (Key.isDown(17) && manaDelay <= 0) { if (ownManaPot >= 1) { giveAward(131); manaDelay = 10; ownManaPot -= 1; mana += 10; if (mana >= 100 + manaUps * 10) { mana = manaUps * 10 + 100; } } } if (v3 == 1) { ball1.w.play(); ball1.q.play(); } if (v3 == 0) { ball1.w.stop(); ball1.q.stop(); } velocityX *= friction; velocityY *= friction; playerFreeze -= 1; if (playerFreeze >= 0) { velocityX = 0; velocityY = 0; } if (playerOnGoo == 1) { velocityX *= 0.5; velocityY *= 0.5; } ball1._x += velocityX; ball1._y += velocityY; if (ball1._x + ball1.abox._width / 2 > Stage.width) { ball1._x = Stage.width - ball1.abox._width / 2; velocityX = 0; giveAward(119); } if (bg.bg.hitTest(ball1._x + ball1.abox._width / 2, ball1._y, true)) { ball1._x -= 1; if (bg.bg.hitTest(ball1._x + ball1.abox._width / 2, ball1._y, true)) { ball1._x -= 1; if (bg.bg.hitTest(ball1._x + ball1.abox._width / 2, ball1._y, true)) { ball1._x -= 1; if (bg.bg.hitTest(ball1._x + ball1.abox._width / 2, ball1._y, true)) { ball1._x -= 1; if (bg.bg.hitTest(ball1._x + ball1.abox._width / 2, ball1._y, true)) { ball1._x -= 1; } } } } } if (bg.bg.hitTest(ball1._x - ball1.abox._width / 2, ball1._y, true)) { ball1._x += 1; if (bg.bg.hitTest(ball1._x - ball1.abox._width / 2, ball1._y, true)) { ball1._x += 1; if (bg.bg.hitTest(ball1._x - ball1.abox._width / 2, ball1._y, true)) { ball1._x += 1; if (bg.bg.hitTest(ball1._x - ball1.abox._width / 2, ball1._y, true)) { ball1._x += 1; if (bg.bg.hitTest(ball1._x - ball1.abox._width / 2, ball1._y, true)) { ball1._x += 1; } } } } } if (bg.bg.hitTest(ball1._x, ball1._y + ball1.abox._height / 2, true)) { ball1._y -= 1; if (bg.bg.hitTest(ball1._x, ball1._y + ball1.abox._height / 2, true)) { ball1._y -= 1; if (bg.bg.hitTest(ball1._x, ball1._y + ball1.abox._height / 2, true)) { ball1._y -= 1; if (bg.bg.hitTest(ball1._x, ball1._y + ball1.abox._height / 2, true)) { ball1._y -= 1; if (bg.bg.hitTest(ball1._x, ball1._y + ball1.abox._height / 2, true)) { ball1._y -= 1; } } } } } if (bg.bg.hitTest(ball1._x, ball1._y - ball1.abox._height / 2, true)) { ball1._y += 1; if (bg.bg.hitTest(ball1._x, ball1._y - ball1.abox._height / 2, true)) { ball1._y += 1; if (bg.bg.hitTest(ball1._x, ball1._y - ball1.abox._height / 2, true)) { ball1._y += 1; if (bg.bg.hitTest(ball1._x, ball1._y - ball1.abox._height / 2, true)) { ball1._y += 1; if (bg.bg.hitTest(ball1._x, ball1._y - ball1.abox._height / 2, true)) { ball1._y += 1; } } } } } if (ball1._x - ball1.abox._width / 2 < 0) { ball1._x = ball1.abox._width / 2; velocityX = 0; giveAward(119); } if (ball1._y + ball1.abox._height / 2 > Stage.height) { ball1._y = Stage.height - ball1.abox._height / 2; velocityY = 0; giveAward(119); } if (ball1._y - ball1.abox._height / 2 < 0) { ball1._y = ball1.abox._height / 2; velocityY = 0; giveAward(119); } aimer._x = ball1._x; aimer._y = ball1._y; aimer._rotation = topRotation; remove = 0; toNextLevel._xscale = percent; if (toNextLevel._xscale < 0) { toNextLevel._xscale = 0; } if (percent >= 95 && enemiesOnStage <= 0 && enemies.length <= 0) { leFin -= 1; } if (percent >= 95 && leFin <= 0 && lSize != 0 && enemiesOnStage <= 0 && enemies.length <= 0) { openToShop = 1; invenCreate(); } var v5 = _xmouse - ball1._x; var v4 = _ymouse - ball1._y; if (v5 != 0 || v4 != 0) { var v11 = Math.atan2(v4, v5); topRotation = v11 * 180 / Math.PI; } initialX = bg._x; initialY = bg._y; bg._x = -ball1._x / 2; bg._y = -ball1._y / 2; bg._x = Math.floor(bg._x); bg._y = Math.floor(bg._y); initialX -= bg._x; initialY -= bg._y; ball2._x += (ball1._x - ball2._x) / 3; ball2._y += (ball1._y - ball2._y) / 3; ball3._x += (ball2._x - ball3._x) / 3; ball3._y += (ball2._y - ball3._y) / 3; ball4._x += (ball3._x - ball4._x) / 3; ball4._y += (ball3._y - ball4._y) / 3; ball5._x += (ball4._x - ball5._x) / 3; ball5._y += (ball4._y - ball5._y) / 3; var v6 = randRange(1, chance); if (v6 == 1 && enemies.length <= 10 && trueOnStage - enemiesToKill[level - 1] < 0 && enemyStart <= 0 && lSize != 0 && (level % 5 != 0 || bhealth != null)) { var v7 = 1; if (enemies.length >= 7) { v7 = randRange(1, 2); } if (v7 == 1) { enemyFunc(); } } else { if (enemies.length < enCome && enemies.length <= 10 && trueOnStage - enemiesToKill[level - 1] < 0 && enemyStart <= 0 && lSize != 0 && (level % 5 != 0 || bhealth != null)) { enemyFunc(); } } if ((lSize == 0 || lSize == -1) && v6 == 1 && enemies.length <= 10) { enemyFunc(); } else { if (enemies.length < 3 && (lSize == 0 || lSize == -1)) { enemyFunc(); } } if (timer2 > 0) { timer2 -= 1; ball1._alpha = 30; ball2._alpha = 30; ball3._alpha = 30; ball4._alpha = 30; ball5._alpha = 30; } else { ball1._alpha = 100; ball2._alpha = 100; ball3._alpha = 100; ball4._alpha = 100; ball5._alpha = 100; } hHolder.hFill._xscale = lives * (100 / (healthq + 5)); lhp._alpha = 100 - lives * (100 / (healthq + 5)); if (lhp._alpha >= 80) { psh.play(); } manaM.mFill._xscale = (mana / (manaUps * 10 + 100)) * 100; expM.eFill._xscale = 100 - (expNeeded[charLevel - 1] - expierence) / (expNeeded[charLevel - 1] / 100); MouseDownCounter(); bulletMovement(); spellMovement(); enemyMovement(); enbulMovement(); splatterFunc(); gooMove(); bombMovement(); if (ownBow1 >= 1 && ownBow2 >= 1 && ownBow3 >= 1 && ownBow4 >= 1 && ownBow5 >= 1) { giveAward(); } coinMove(); bow._x = ball1._x; bow._y = ball1._y; bow._rotation = topRotation; tAchs = awardsTotal + '/' + '170'; if (shield != undefined) { shield._x = ball1._x; shield._y = ball1._y; shield._yscale = ball1._xscale; shield._xscale = shield._yscale; } } } function randRange(smallNum, bigNum) { return Math.floor(Math.random() * (bigNum - smallNum + 1)) + smallNum; } function invisable() { menu.shop.inventory2 = ''; menu.shop.j1._alpha = 0; menu.shop.j2._alpha = 0; menu.shop.j3._alpha = 0; menu.shop.j4._alpha = 0; menu.shop.j5._alpha = 0; menu.shop.j6._alpha = 0; menu.shop.j7._alpha = 0; menu.shop.j8._alpha = 0; menu.shop.j9._alpha = 0; menu.shop.j10._alpha = 0; menu.shop.j11._alpha = 0; menu.shop.j12._alpha = 0; menu.shop.j13._alpha = 0; menu.shop.j14._alpha = 0; menu.shop.p1._alpha = 0; menu.shop.t1._alpha = 0; menu.shop.t2._alpha = 0; menu.shop.t3._alpha = 0; menu.shop.t4._alpha = 0; menu.shop.t5._alpha = 0; menu.shop.t6._alpha = 0; menu.shop.t7._alpha = 0; menu.shop.s1._alpha = 0; menu.shop.s2._alpha = 0; menu.shop.s3._alpha = 0; menu.shop.s4._alpha = 0; menu.shop.s5._alpha = 0; } function scScreen() { function restInvis2() { saveScreen2.sc._x = -1000; saveScreen2.s1.gotoAndStop(1); saveScreen2.s2.gotoAndStop(1); saveScreen2.s3.gotoAndStop(1); } sc = attachMovie('scscreen', 'scscreen', 940120); scscreen.sg.onPress = function () { getURL('http://armorgames.com/guide/Medieval-Rampage-2-Guide', '_blank'); }; scscreen.sg.onRollOver = function () { scscreen.sg.gotoAndStop(2); }; scscreen.sg.onRollOut = function () { scscreen.sg.gotoAndStop(1); }; pointer._alpha = 0; sc.scTxt = score; sc.moTxt = money; sc.stTxt = stageArray[level - 1]; sc.reTxt = realmArray[Math.ceil(level / 5) - 1]; sc.deTxt = stories[level - 2]; gamepause = true; sc._x = Stage.width / 2; sc._y = Stage.height / 2; i = spells.length - 1; while (i >= 0) { removeSpell(i); --i; } if (gObject.data.SF1 != undefined) { SF1 = gObject.data.SF1; saveScreen2.ls1 = 'Last Saved: Level ' + SF1; } else { saveScreen2.ls1 = 'New Save Slot'; } if (gObject.data.SF2 != undefined) { SF2 = gObject.data.SF2; saveScreen2.ls2 = 'Last Saved: Level ' + SF2; } else { saveScreen2.ls2 = 'New Save Slot'; } if (gObject.data.SF3 != undefined) { SF3 = gObject.data.SF3; saveScreen2.ls3 = 'Last Saved: Level ' + SF3; } else { saveScreen2.ls3 = 'New Save Slot'; } saveScreen2._x = 170; saveScreen2._y = 150; saveScreen2.s.onRelease = function () { if (currentPick != 0) { saveScreen2.ss.gotoAndPlay(2); if (currentPick == 1) { sObject = SharedObject.getLocal('savedFile1'); gObject.data.SF1 = level; gObject.flush(); saveScreen2.ls1 = 'Last Saved: Level ' + level; } else { if (currentPick == 2) { sObject = SharedObject.getLocal('savedFile2'); gObject.data.SF2 = level; gObject.flush(); saveScreen2.ls2 = 'Last Saved: Level ' + level; } else { if (currentPick == 3) { sObject = SharedObject.getLocal('savedFile3'); gObject.data.SF3 = level; gObject.flush(); saveScreen2.ls3 = 'Last Saved: Level ' + level; } } } saveFile(); saveScreen2.fc._x = -1000; } }; hMaker(saveScreen2.c); hMaker(saveScreen2.l); hMaker(saveScreen2.s); hMaker(saveScreen2.f); restInvis2(); saveScreen2.c.onRelease = function () { saveScreen2._x = -1000; }; saveScreen2.f.onRelease = function () { saveScreen2._x = -1000; }; saveScreen2.d.onRelease = function () { saveScreen2.fd.gotoAndPlay(2); if (currentPick == 1) { sObject = SharedObject.getLocal('savedFile1'); sObject.clear(); gObject.data.SF1 = undefined; gObject.flush(); saveScreen2.ls1 = 'New Save Slot'; } else { if (currentPick == 2) { sObject = SharedObject.getLocal('savedFile2'); sObject.clear(); gObject.data.SF2 = undefined; gObject.flush(); saveScreen2.ls2 = 'New Save Slot'; } else { if (currentPick == 3) { sObject = SharedObject.getLocal('savedFile3'); sObject.clear(); gObject.data.SF3 = undefined; gObject.flush(); saveScreen2.ls3 = 'New Save Slot'; } } } }; hMaker2(saveScreen2.s1); hMaker2(saveScreen2.s2); hMaker2(saveScreen2.s3); if (currentPick == 1) { restInvis2(); saveScreen2.s1.gotoAndStop(3); } if (currentPick == 2) { restInvis2(); saveScreen2.s2.gotoAndStop(3); } if (currentPick == 3) { restInvis2(); saveScreen2.s3.gotoAndStop(3); } saveScreen2.ss1.onRelease = function () { currentPick = 1; restInvis2(); saveScreen2.s1.gotoAndStop(3); }; saveScreen2.ss2.onRelease = function () { currentPick = 2; restInvis2(); saveScreen2.s2.gotoAndStop(3); }; saveScreen2.ss3.onRelease = function () { currentPick = 3; restInvis2(); saveScreen2.s3.gotoAndStop(3); }; sc.fin.onRollOver = function () { sc.fin._alpha = 30; }; sc.fin.onRollOut = function () { sc.fin._alpha = 0; }; sc.fin.onRelease = function () { saveScreen2._x = -1000; shopEnter = 0; mouseDownTime = delayTime; enemyStart = 10; i = splatters.length - 1; while (i >= 0) { splatters[i].removeMovieClip(); splatters.splice(i, 1); sTimer.splice(i, 1); --i; } i = gooList4.length - 1; while (i >= 0) { gooList4[i].removeMovieClip(); gooList4.splice(i, 1); --i; } i = gooList.length; while (i >= 0) { gooList[i].removeMovieClip(); gooList.splice(i, 1); gooLife.splice(i, 1); --i; } i = gooList2.length; while (i >= 0) { gooList2[i].removeMovieClip(); gooList2.splice(i, 1); gooLife2.splice(i, 1); --i; } i = gooList3.length; while (i >= 0) { gooList3[i].removeMovieClip(); gooList3.splice(i, 1); gooLife3.splice(i, 1); --i; } shopEntered = 0; sc.removeMovieClip(); castleHealth = 100; noSouth = 0; if (level == 3 || level == 9 || level == 13 || level == 17 || level == 24) { noSouth = 1; } if (level == 2 || level == 6 || level == 14 || level == 18 || level == 23 || level == 25) { if (level == 2) { nIn = 0; } if (level == 6) { nIn = 1; } if (level == 14) { nIn = 2; } if (level == 18) { nIn = 3; } if (level == 23) { nIn = 4; } stageType = 3; } else { stageType = 0; } ball1._x = startPositionsX[level - 1]; ball1._y = startPositionsY[level - 1]; bg.nextFrame(); if (moneyC == 0) { giveAward(135); } moneyC = 0; if (gunAmmo2 + gunAmmo3 + gunAmmo4 + gunAmmo5 >= 1000) { giveAward(136); } var timeToGo = 150; cliped._x = 346; cliped._y = 100; cliped.onEnterFrame = function () { timeToGo -= 1; if (timeToGo <= 0) { this._alpha -= 3; if (this._alpha <= 0) { this.removeMovieClip(); } } }; if (gunAmmo1 >= 99999) { gunAmmo1 = 99999; } if (gunAmmo2 >= 99999) { gunAmmo2 = 99999; } if (gunAmmo3 >= 99999) { gunAmmo3 = 99999; } if (gunAmmo4 >= 99999) { gunAmmo4 = 99999; } if (gunAmmo5 >= 99999) { gunAmmo5 = 99999; } if (gunAmmo6 >= 99999) { gunAmmo6 = 99999; } if (ownBow1 >= 99999) { ownBow1 = 99999; } if (ownBow2 >= 99999) { ownBow2 = 99999; } if (ownBow3 >= 99999) { ownBow3 = 99999; } if (ownBow4 >= 99999) { ownBow4 = 99999; } if (ownBow5 >= 99999) { ownBow5 = 99999; } menuExist = false; menu.removeMovieClip(); makebigger.w1 = 'x' + ownBow1; makebigger.w2 = 'x' + ownBow2; makebigger.w3 = 'x' + ownBow3; makebigger.w4 = 'x' + ownBow4; makebigger.w5 = 'x' + ownBow5; makebigger.q1 = 'x' + gunAmmo1; makebigger.q2 = 'x' + gunAmmo2; makebigger.q3 = 'x' + gunAmmo3; makebigger.q4 = 'x' + gunAmmo5; makebigger.q5 = 'x' + gunAmmo4; makebigger.q6 = 'x' + gunAmmo6; if (onArmor == 0) { if (level == 6) { __com_mochibot__('29a6e9bd', this, 10301, true); } if (level == 10) { __com_mochibot__('cf2b4454', this, 10301, true); } if (level == 15) { __com_mochibot__('6a6e7aa5', this, 10301, true); } if (level == 20) { __com_mochibot__('dbd2c8e7', this, 10301, true); } if (level == 25) { __com_mochibot__('c185dcbf', this, 10301, true); } } if (level == 5 || level == 10 || level == 15 || level == 20 || level == 25) { attachMovie('bhealth', 'bhealth', 701360); bhealth._x = Stage.width / 2 - 120; bhealth._y = 400; if (level == 5) { createBoss1(); enemyType.push(21); } if (level == 10) { createBoss2(); enemyType.push(22); } if (level == 15) { createBoss3(); enemyType.push(23); } if (level == 20) { createBoss4(); enemyType.push(24); } if (level == 25) { createBoss5(); enemyType.push(25); } enemies.push(en); enemyX.push(0); enemyY.push(0); } gamepause = false; invenCreate(); }; } function invenInsert(tn, theitem) { if (tn >= 9 && tn <= 15 && _root[theitem] > 0) { } else { s = theSlots.length - 1; while (s >= 0) { if (_root[theSlots[s]] == 0) { _root[theSlots[s]] = tn; slotsFilled += 1; break; } --s; } } } function mPress() { menu.shop.co = '$' + level * 10; menu.shop.sl = skillq; menu.shop.warn._alpha = 0; menu.shop.inventory = ''; menu.shop.itemname = ''; menu.shop.description = 'Select an item.'; menu.shop.moneytext = money; menu.shop.e1.onPress = function () { onView = 2; menu.shop.gotoAndStop(6); menu.shop.r1.gotoAndStop(skillq + 1); menu.shop.r2.gotoAndStop(speedq + 1); menu.shop.r3.gotoAndStop(armorq + 1); menu.shop.r4.gotoAndStop(healthq + 1); menu.shop.eno = enchantPoints; menu.shop.upo = upgradePoints; menu.shop.namer = 'Skills'; menu.shop.desc = ' Does 1/4 more damage Cost:' + Math.pow(2, menu.shop.r1._currentframe - 1) + ' \n Makes your character run faster. Cost:' + Math.pow(2, menu.shop.r2._currentframe - 1) + ' \n Enemies inflict less damage. Cost:' + Math.pow(2, menu.shop.r3._currentframe - 1) + ' \n Gives your character a higher maximum health. Cost:' + Math.pow(2, menu.shop.r4._currentframe - 1); if (skillq == 4 || speedq == 4 || healthq == 4 || armorq == 4) { menu.shop.desc = ''; } menu.shop.s1.onPress = function () { invisable(); otherSelector = 1; menu.shop.s1._alpha = 10; menu.shop.namer = 'Skill'; menu.shop.desc = ' Does 1/4 more damage \n Cost:' + Math.pow(2, menu.shop.r1._currentframe - 1); if (skillq == 4) { menu.shop.desc = 'MAX'; } }; menu.shop.s2.onPress = function () { invisable(); otherSelector = 2; menu.shop.s2._alpha = 10; menmer = 'Speed'; menu.shop.desc = ' Makes your character faster. \n Cost:' + Math.pow(2, menu.shop.r2._currentframe - 1); if (speedq == 4) { menu.shop.desc = 'MAX'; } }; menu.shop.s3.onPress = function () { invisable(); otherSelector = 3; menu.shop.s3._alpha = 10; nmenu.shop.amer = 'Armor'; menu.shop.desc = ' Enemies inflict less damage. \n Cost:' + Math.pow(2, menu.shop.r3._currentframe - 1); if (armorq == 4) { menu.shop.desc = 'MAX'; } }; menu.shop.s4.onPress = function () { invisable(); otherSelector = 4; menu.shop.s4._alpha = 10; menu.shop.namer = 'Health'; menu.shop.desc = ' Gives your character a higher maximum health. \n Cost:' + Math.pow(2, menu.shop.r4._currentframe - 1); if (healthq == 4) { menu.shop.desc = 'MAX'; } }; menu.shop.s5.onPress = function () { invisable(); otherSelector = 5; menu.shop.namer = 'Enchant'; menu.shop.desc = ' Choose a bow you wish to enchant.'; }; menu.shop.t1.onPress = function () { invisable(); otherSelector = 6; menu.shop.r5.gotoAndStop(speeded[0] + 1); menu.shop.bowbg.gotoAndStop(1); menu.shop.t1._alpha = 10; menu.shop.namer = 'Shortbow'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.t2.onPress = function () { invisable(); otherSelector = 7; menu.shop.r5.gotoAndStop(speeded[1] + 1); menu.shop.bowbg.gotoAndStop(2); menu.shop.t2._alpha = 10; menu.shop.namer = 'Longbow'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.t3.onPress = function () { invisable(); otherSelector = 8; menu.shop.r5.gotoAndStop(speeded[2] + 1); menu.shop.bowbg.gotoAndStop(3); menu.shop.t3._alpha = 10; menu.shop.namer = 'Compositebow'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.t4.onPress = function () { invisable(); otherSelector = 9; menu.shop.t4._alpha = 10; menu.shop.r5.gotoAndStop(speeded[3] + 1); menu.shop.bowbg.gotoAndStop(4); menu.shop.namer = 'Crossbow'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.t5.onPress = function () { invisable(); otherSelector = 10; menu.shop.r5.gotoAndStop(speeded[4] + 1); menu.shop.bowbg.gotoAndStop(5); menu.shop.t5._alpha = 10; menu.shop.namer = 'Compoundbow'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.t6.onPress = function () { invisable(); otherSelector = 11; menu.shop.r5.gotoAndStop(speeded[5] + 1); menu.shop.bowbg.gotoAndStop(6); menu.shop.t6._alpha = 10; menu.shop.namer = 'Cross Bow +'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.t7.onPress = function () { invisable(); otherSelector = 12; menu.shop.r5.gotoAndStop(speeded[6] + 1); menu.shop.bowbg.gotoAndStop(7); menu.shop.t7._alpha = 10; menu.shop.namer = 'Compound Bow +'; menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); }; menu.shop.y1.onRollOver = function () { menu.shop.y1._alpha = 10; }; menu.shop.y1.onRollOut = function () { menu.shop.y1._alpha = 0; }; menu.shop.y1.onReleaseOutside = function () { menu.shop.y1._alpha = 0; }; menu.shop.y2.onRollOver = function () { menu.shop.y2._alpha = 10; }; menu.shop.y2.onRollOut = function () { menu.shop.y2._alpha = 0; }; menu.shop.y2.onReleaseOutside = function () { menu.shop.y2._alpha = 0; }; menu.shop.y3.onRollOver = function () { menu.shop.y3._alpha = 10; }; menu.shop.y3.onRollOut = function () { menu.shop.y3._alpha = 0; }; menu.shop.y3.onReleaseOutside = function () { menu.shop.y3._alpha = 0; }; menu.shop.y4.onRollOver = function () { menu.shop.y4._alpha = 10; }; menu.shop.y4.onRollOut = function () { menu.shop.y4._alpha = 0; }; menu.shop.y4.onReleaseOutside = function () { menu.shop.y4._alpha = 0; }; menu.shop.y5.onRollOver = function () { menu.shop.y5._alpha = 10; }; menu.shop.y5.onRollOut = function () { menu.shop.y5._alpha = 0; }; menu.shop.y5.onReleaseOutside = function () { menu.shop.y5._alpha = 0; }; menu.shop.y1.onPress = function () { if (upgradePoints >= Math.pow(2, menu.shop.r1._currentframe - 1) && menu.shop.r1._currentframe != 5 && Math.pow(2, menu.shop.r1._currentframe - 1) != 16) { upgradePoints -= Math.pow(2, menu.shop.r1._currentframe - 1); menu.shop.r1.gotoAndStop(menu.shop.r1._currentframe + 1); menu.shop.upo = upgradePoints; skillq += 1; menu.shop.desc = ' Does 1/4 more damage Cost:' + Math.pow(2, menu.shop.r1._currentframe - 1) + ' \n Makes your character run faster. Cost:' + Math.pow(2, menu.shop.r2._currentframe - 1) + ' \n Enemies inflict less damage. Cost:' + Math.pow(2, menu.shop.r3._currentframe - 1) + ' \n Gives your character a higher maximum health. Cost:' + Math.pow(2, menu.shop.r4._currentframe - 1); if (skillq == 4) { giveAward(52); menu.shop.desc = 'MAX'; } } }; menu.shop.y2.onPress = function () { if (upgradePoints >= Math.pow(2, menu.shop.r2._currentframe - 1) && menu.shop.r2._currentframe != 5 && Math.pow(2, menu.shop.r2._currentframe - 1) != 16) { upgradePoints -= Math.pow(2, menu.shop.r2._currentframe - 1); menu.shop.r2.gotoAndStop(menu.shop.r2._currentframe + 1); menu.shop.upo = upgradePoints; speedq += 1; menu.shop.desc = ' Increases Speed Cost:' + Math.pow(2, menu.shop.r1._currentframe - 1) + ' \n Makes your character run faster. Cost:' + Math.pow(2, menu.shop.r2._currentframe - 1) + ' \n Enemies inflict less damage. Cost:' + Math.pow(2, menu.shop.r3._currentframe - 1) + ' \n Gives your character a higher maximum health. Cost:' + Math.pow(2, menu.shop.r4._currentframe - 1); if (speedq == 4) { giveAward(55); menu.shop.desc = 'MAX'; } } }; menu.shop.y3.onPress = function () { if (upgradePoints >= Math.pow(2, menu.shop.r3._currentframe - 1) && menu.shop.r3._currentframe != 5 && Math.pow(2, menu.shop.r3._currentframe - 1) != 16) { upgradePoints -= Math.pow(2, menu.shop.r3._currentframe - 1); menu.shop.r3.gotoAndStop(menu.shop.r3._currentframe + 1); menu.shop.upo = upgradePoints; armorq += 1; menu.shop.desc = ' Increases Armor Cost:' + Math.pow(2, menu.shop.r1._currentframe - 1) + ' \n Makes your character run faster. Cost:' + Math.pow(2, menu.shop.r2._currentframe - 1) + ' \n Enemies inflict less damage. Cost:' + Math.pow(2, menu.shop.r3._currentframe - 1) + ' \n Gives your character a higher maximum health. Cost:' + Math.pow(2, menu.shop.r4._currentframe - 1); if (armorq == 4) { giveAward(53); menu.shop.desc = 'MAX'; } } }; menu.shop.y4.onPress = function () { if (upgradePoints >= Math.pow(2, menu.shop.r4._currentframe - 1) && menu.shop.r4._currentframe != 5 && Math.pow(2, menu.shop.r4._currentframe - 1) != 16) { upgradePoints -= Math.pow(2, menu.shop.r4._currentframe - 1); menu.shop.r4.gotoAndStop(menu.shop.r4._currentframe + 1); menu.shop.upo = upgradePoints; healthq += 1; lives += 2; if (hHolder.hFill._xscale > 100) { hHolder.hFill._xscale = 100; lives = healthq + lives; } menu.shop.desc = ' Increases Health Cost:' + Math.pow(2, menu.shop.r1._currentframe - 1) + ' \n Makes your character run faster. Cost:' + Math.pow(2, menu.shop.r2._currentframe - 1) + ' \n Enemies inflict less damage. Cost:' + Math.pow(2, menu.shop.r3._currentframe - 1) + ' \n Gives your character a higher maximum health. Cost:' + Math.pow(2, menu.shop.r4._currentframe - 1); if (healthq == 4) { giveAward(54); menu.shop.desc = 'MAX'; } } }; menu.shop.y5.onPress = function () { if (enchantPoints >= Math.pow(2, menu.shop.r5._currentframe - 1) && menu.shop.r5._currentframe != 6) { enchantPoints -= Math.pow(2, menu.shop.r5._currentframe - 1); if (otherSelector == 6) { speeded[0] += 1; if (speeded[0] >= 5) { giveAward(56); } } if (otherSelector == 7) { speeded[1] += 1; if (speeded[1] >= 5) { giveAward(57); } } if (otherSelector == 8) { speeded[2] += 1; if (speeded[2] >= 5) { giveAward(58); } } if (otherSelector == 9) { speeded[3] += 1; if (speeded[3] >= 5) { giveAward(59); } } if (otherSelector == 10) { speeded[4] += 1; if (speeded[4] >= 5) { giveAward(60); } } if (otherSelector == 11) { speeded[5] += 1; if (speeded[5] >= 5) { giveAward(61); } } if (otherSelector == 12) { speeded[6] += 1; if (speeded[6] >= 5) { giveAward(62); } } menu.shop.r5.gotoAndStop(menu.shop.r5._currentframe + 1); menu.shop.desc = ' Increases the bow\'s speed. \n Cost:' + Math.pow(2, menu.shop.r5._currentframe - 1); } menu.shop.eno = enchantPoints; menu.shop.upo = upgradePoints; }; menu.shop.b1.onRollOver = function () { menu.shop.b1._alpha = 30; }; menu.shop.b1.onRollOut = function () { menu.shop.b1._alpha = 10; }; menu.shop.b1.onPress = function () { menu.shop.gotoAndStop(Math.ceil(level / 5)); mPress(); onView = 1; }; menu.shop.finished2.onRollOver = function () { menu.shop.finished2._alpha = 20; }; menu.shop.finished2.onRollOut = function () { menu.shop.finished2._alpha = 0; }; menu.shop.finished2.onPress = function () { mouseDownTime = delayTime; textHolder.moneytxt = money; menuExist = false; menu.removeMovieClip(); makebigger.w1 = 'x' + ownBow1; makebigger.w2 = 'x' + ownBow2; makebigger.w3 = 'x' + ownBow3; makebigger.w4 = 'x' + ownBow4; makebigger.w5 = 'x' + ownBow5; makebigger.q1 = 'x' + gunAmmo1; makebigger.q2 = 'x' + gunAmmo2; makebigger.q3 = 'x' + gunAmmo3; makebigger.q4 = 'x' + gunAmmo5; makebigger.q5 = 'x' + gunAmmo4; makebigger.q6 = 'x' + gunAmmo6; openToShop = 0; scscreen(); giveAward(125); leFin = 105; enchantPoints += 2; if (level >= 6) { upgradePoints += 1; } if (level >= 12) { upgradePoints += 1; } if (level >= 18) { upgradePoints += 1; } upgradePoints += 1; percent = 0; level += 1; if (bulletMissed == 0) { giveAward(142); } bulletMissed = 0; if (level == 5 && untouched == 1) { giveAward(162); } if (lives > (5 + healthq) / 2) { under50 = 0; } enemiesOnStage = 0; trueOnStage = 0; if (level >= 26) { continues = 0; gameover = 1; gameWon = 1; gamepause = 1; } else { scScreen(); ball1.q.stop(); ball1.w.stop(); i = enemies.length - 1; while (i >= 0) { quickRemove(); --i; } menuExist = true; textHolder.wavetxt = level; chance *= 0.95; } }; }; menu.shop.ch._alpha = 0; menu.shop.inventory2 = ''; menu.shop.e1.onRollOver = function () { menu.shop.e1._alpha = 30; }; menu.shop.e1.onRollOut = function () { menu.shop.e1._alpha = 10; }; realmChoice = Math.ceil(level / 5); menu.shop.j1.onPress = function () { invisable(); if (realmChoice == 1) { selector = 1; menu.shop.itemname = 'Dagger'; menu.shop.inventory = ownWep1; menu.shop.description = ' Cost: 50 \n Damage: 2 \n Range: 5 \n Sell Value: 25'; menu.shop.j1._alpha = 10; } if (realmChoice == 2) { selector = 15; menu.shop.itemname = 'Dagger+'; menu.shop.inventory = ownWep3; menu.shop.description = ' Cost: 300 \n Damage: 4 \n Range: 5 \n Sell Value: 150'; menu.shop.j1._alpha = 10; } if (realmChoice == 3) { selector = 29; menu.shop.itemname = 'Dagger++'; menu.shop.inventory = ownWep5; menu.shop.description = ' Cost: 1000 \n Damage: 10 \n Range: 5 \n Sell Value: 500'; menu.shop.j1._alpha = 10; } selector = 1; }; menu.shop.j2.onPress = function () { invisable(); menu.shop.j2._alpha = 10; if (realmChoice == 1) { selector = 2; menu.shop.itemname = 'Maul'; menu.shop.inventory = ownWep2; menu.shop.description = ' Cost: 300 \n Damage: 2 \n Range: 10 \n Sell Value: 150'; } if (realmChoice == 2) { selector = 16; menu.shop.itemname = 'Hammer'; menu.shop.inventory = ownWep4; menu.shop.description = ' Cost: 1500 \n Damage: 4 \n Range: 10 \n Sell Value: 750'; } if (realmChoice == 3) { selector = 30; menu.shop.itemname = 'Hand Axe'; menu.shop.inventory = ownWep6; menu.shop.description = ' Cost: 5000 \n Damage: 10 \n Range: 10 \n Sell Value: 2500'; } if (realmChoice == 4) { selector = 44; menu.shop.itemname = 'Long Sword'; menu.shop.inventory = ownWep7; menu.shop.description = ' Cost: 20,000 \n Damage: 20 \n Range: 10 \n Sell Value: 10,000'; } if (realmChoice == 5) { selector = 58; menu.shop.itemname = 'Dark Axe'; menu.shop.inventory = ownWep8; menu.shop.description = ' Cost: 100,000 \n Damage: 50 \n Range: 10 \n Sell Value: 50,000'; } selector = 2; }; menu.shop.j3.onPress = function () { invisable(); menu.shop.j3._alpha = 10; if (realmChoice == 1) { selector = 3; menu.shop.itemname = 'Long Bow'; menu.shop.inventory = ownBow2; menu.shop.description = ' Cost: 100 \n Damage: 2 \n Shots: 1 \n Sell Value: 50'; } if (realmChoice == 2) { selector = 17; menu.shop.itemname = 'Long Bow'; menu.shop.inventory = ownBow2; menu.shop.description = ' Cost: 100 \n Damage: 2 \n Shots: 1 \n Sell Value: 50'; } if (realmChoice == 3) { selector = 31; menu.shop.itemname = 'Composite Bow'; menu.shop.inventory = ownBow3; menu.shop.description = ' Cost: 500 \n Damage: 2 \n Shots: 1 \n Sell Value: 250'; } if (realmChoice == 4) { selector = 45; menu.shop.itemname = 'Cross Bow'; menu.shop.inventory = ownBow4; menu.shop.description = ' Cost: 2000 \n Damage: 3 \n Shots: 1 \n Sell Value: 1000'; } if (realmChoice == 5) { selector = 59; menu.shop.itemname = 'Compound Bow'; menu.shop.inventory = ownBow5; menu.shop.description = ' Cost: 10000 \n Damage: 3 \n Shots: 1 \n Sell Value: 5000'; } selector = 3; }; menu.shop.j4.onPress = function () { invisable(); menu.shop.j4._alpha = 10; if (realmChoice == 1) { selector = 4; menu.shop.itemname = 'Composite Bow'; menu.shop.inventory = ownBow3; menu.shop.description = ' Cost: 500 \n Damage: 2 \n Shots: 1 \n Sell Value: 250'; } if (realmChoice == 2) { selector = 18; menu.shop.itemname = 'Composite Bow'; menu.shop.inventory = ownBow3; menu.shop.description = ' Cost: 500 \n Damage: 2 \n Shots: 1 \n Sell Value: 250'; } if (realmChoice == 3) { selector = 32; menu.shop.itemname = 'Cross Bow'; menu.shop.inventory = ownBow4; menu.shop.description = ' Cost: 2000 \n Damage: 3 \n Shots: 1 \n Sell Value: 1000'; } if (realmChoice == 4) { selector = 46; menu.shop.itemname = 'Compound Bow'; menu.shop.inventory = ownBow5; menu.shop.description = ' Cost: 10000 \n Damage: 3 \n Shots: 1 \n Sell Value: 5000'; } if (realmChoice == 5) { selector = 60; menu.shop.itemname = 'Cross Bow +'; menu.shop.inventory = ownBow6; menu.shop.description = ' Cost: 50,000 \n Damage: 4 \n Shots: 1 \n Sell Value: 25000'; } selector = 4; }; menu.shop.j5.onPress = function () { invisable(); if (realmChoice == 1) { selector = 5; menu.shop.itemname = ' '; menu.shop.inventory = ' '; menu.shop.description = ' '; } if (realmChoice == 2) { selector = 19; menu.shop.j5._alpha = 10; menu.shop.itemname = 'Cross Bow'; menu.shop.inventory = ownBow4; menu.shop.description = ' Cost: 2000 \n Damage: 3 \n Shots: 1 \n Sell Value: 1000'; } if (realmChoice == 3) { selector = 33; menu.shop.j5._alpha = 10; menu.shop.itemname = 'Compound Bow'; menu.shop.inventory = ownBow5; menu.shop.description = ' Cost: 10000 \n Damage: 3 \n Shots: 1 \n Sell Value: 5000'; } if (realmChoice == 4) { selector = 47; menu.shop.j5._alpha = 10; menu.shop.itemname = 'Cross Bow +'; menu.shop.inventory = ownBow6; menu.shop.description = ' Cost: 50,000 \n Damage: 4 \n Shots: 1 \n Sell Value: 25000'; } if (realmChoice == 5) { selector = 61; menu.shop.j5._alpha = 10; menu.shop.itemname = 'Compound Bow +'; menu.shop.inventory = ownBow7; menu.shop.description = ' Cost: 250,000 \n Damage: 5 \n Shots: 1 \n Sell Value: 125000'; } selector = 5; }; menu.shop.j6.onPress = function () { invisable(); menu.shop.j6._alpha = 10; if (realmChoice == 1) { selector = 6; menu.shop.itemname = 'Light Arrows'; menu.shop.inventory = gunAmmo2; menu.shop.description = ' Cost: 10 \n Damage: 2 \n Effect: Fast \n Sell Value: 5'; } if (realmChoice == 2) { selector = 20; menu.shop.itemname = 'Light Arrows'; menu.shop.inventory = gunAmmo2; menu.shop.description = ' Cost: 10 \n Damage: 2 \n Effect: Fast \n Sell Value: 5'; } if (realmChoice == 3) { selector = 34; menu.shop.inventory = gunAmmo4; menu.shop.itemname = 'Fire Arrows'; menu.shop.description = ' Cost: 50 \n Damage: 4 \n Effect: Burns Enemy \n Sell Value: 25'; } if (realmChoice == 4) { selector = 48; menu.shop.inventory = gunAmmo4; menu.shop.itemname = 'Fire Arrows'; menu.shop.description = ' Cost: 50 \n Damage: 4 \n Effect: Burns Enemy \n Sell Value: 25'; } if (realmChoice == 5) { selector = 62; menu.shop.inventory = gunAmmo6; menu.shop.itemname = 'Electric Arrows'; menu.shop.description = ' Cost: 200 \n Damage: 6 \n Effect: Explodes on Impact \n Sell Value: 100'; } selector = 6; }; menu.shop.j7.onPress = function () { invisable(); menu.shop.j7._alpha = 10; if (realmChoice == 1) { selector = 7; menu.shop.inventory = gunAmmo3; menu.shop.itemname = 'Heavy Arrows'; menu.shop.description = ' Cost: 20 \n Damage: 4 \n Effect: Large Damage \n Sell Value: 10'; } if (realmChoice == 2) { selector = 21; menu.shop.inventory = gunAmmo3; menu.shop.itemname = 'Heavy Arrows'; menu.shop.description = ' Cost: 20 \n Damage: 4 \n Effect: Large Damage \n Sell Value: 10'; } if (realmChoice == 3) { selector = 35; menu.shop.inventory = gunAmmo5; menu.shop.itemname = 'Ice Arrows'; menu.shop.description = ' Cost: 100 \n Damage: 5 \n Effect: Slows Enemy \n Sell Value: 50'; } if (realmChoice == 4) { selector = 49; menu.shop.inventory = gunAmmo5; menu.shop.itemname = 'Ice Arrows'; menu.shop.description = ' Cost: 100 \n Damage: 5 \n Effect: Slows Enemy \n Sell Value: 50'; } if (realmChoice == 5) { selector = 63; menu.shop.inventory = gunAmmo7; menu.shop.itemname = 'Acid Arrows'; menu.shop.description = ' Cost: 500 \n Damage: 8 \n Effect: Very Strong \n Sell Value: 250'; } selector = 7; }; menu.shop.j8.onPress = function () { invisable(); menu.shop.j8._alpha = 10; if (realmChoice == 1) { menu.shop.j8._alpha = 0; selector = 8; menu.shop.itemname = ' '; menu.shop.inventory = ' '; menu.shop.description = ' '; } if (realmChoice == 2) { selector = 22; menu.shop.inventory = gunAmmo4; menu.shop.itemname = 'Fire Arrows'; menu.shop.description = ' Cost: 50 \n Damage: 4 \n Effect: Burns Enemy \n Sell Value: 25'; } if (realmChoice == 3) { selector = 36; menu.shop.inventory = gunAmmo6; menu.shop.itemname = 'Electric Arrows'; menu.shop.description = ' Cost: 200 \n Damage: 6 \n Effect: Explodes on Impact \n Sell Value: 100'; } if (realmChoice == 4) { selector = 50; menu.shop.inventory = gunAmmo6; menu.shop.itemname = 'Electric Arrows'; menu.shop.description = ' Cost: 200 \n Damage: 6 \n Effect: Explodes on Impact \n Sell Value: 100'; } if (realmChoice == 5) { selector = 64; menu.shop.inventory = gunAmmo8; menu.shop.itemname = 'Poision Arrows'; menu.shop.description = ' Cost: 1000 \n Damage: 8 \n Effect: Poisionous carcass \n Sell Value: 500'; } selector = 8; }; menu.shop.j9.onPress = function () { invisable(); menu.shop.j9._alpha = 10; if (realmChoice == 1) { menu.shop.j9._alpha = 0; selector = 9; menu.shop.itemname = ' '; menu.shop.inventory = ' '; menu.shop.description = ' '; } if (realmChoice == 2) { selector = 23; menu.shop.inventory = gunAmmo5; menu.shop.itemname = 'Ice Arrows'; menu.shop.description = ' Cost: 100 \n Damage: 5 \n Effect: Slows Enemy \n Sell Value: 50'; } if (realmChoice == 3) { menu.shop.j9._alpha = 0; selector = 37; menu.shop.itemname = ' '; menu.shop.inventory = ' '; menu.shop.description = ' '; } if (realmChoice == 4) { selector = 51; menu.shop.inventory = gunAmmo8; menu.shop.itemname = 'Poision Arrows'; menu.shop.description = ' Cost: 1000 \n Damage: 8 \n Effect: Poisionous carcass \n Sell Value: 500'; } if (realmChoice == 5) { menu.shop.j9._alpha = 0; selector = 65; menu.shop.itemname = ' '; menu.shop.inventory = ' '; menu.shop.description = ' '; } selector = 9; }; menu.shop.j10.onPress = function () { menu.shop.itemname = 'Health Refil'; invisable(); menu.shop.inventory = ownHpPot; menu.shop.description = 'Refils some of your health.'; menu.shop.j10._alpha = 10; if (realmChoice == 1) { selector = 10; } if (realmChoice == 2) { selector = 24; } if (realmChoice == 3) { selector = 38; } if (realmChoice == 4) { selector = 52; } if (realmChoice == 5) { selector = 66; } selector = 10; }; menu.shop.j11.onPress = function () { menu.shop.itemname = 'Mana Refil'; invisable(); menu.shop.inventory = ownManaPot; menu.shop.description = 'Refils some of your mana.'; menu.shop.j11._alpha = 10; if (realmChoice == 1) { selector = 11; } if (realmChoice == 2) { selector = 25; } if (realmChoice == 3) { selector = 39; } if (realmChoice == 4) { selector = 53; } if (realmChoice == 5) { selector = 67; } selector = 11; }; menu.shop.j12.onPress = function () { menu.shop.inventory = ownBomb1; invisable(); menu.shop.j12._alpha = 10; if (realmChoice == 1) { selector = 12; menu.shop.itemname = 'Timed Bomb'; menu.shop.description = 'Explodes: 10 seconds'; } if (realmChoice == 2) { menu.shop.itemname = 'Timed Bomb'; menu.shop.description = 'Explodes: 10 seconds'; } if (realmChoice == 3) { menu.shop.itemname = 'Motion Bomb'; menu.shop.description = 'Explodes: on contact'; } if (realmChoice == 4) { menu.shop.itemname = 'Motion Bomb'; menu.shop.description = 'Explodes: on contact'; } if (realmChoice == 5) { menu.shop.itemname = 'Motion Bomb'; menu.shop.description = 'Explodes: on contact'; } selector = 12; }; menu.shop.j13.onPress = function () { invisable(); menu.shop.j13._alpha = 10; if (realmChoice == 1) { selector = 13; menu.shop.inventory = ownSpell1; menu.shop.itemname = 'Fire Ball'; menu.shop.description = ' Cost: 1,000 \n Effect: Burns Enemy \n Damage: 2 \n Sell Value: 500'; } if (realmChoice == 2) { selector = 27; menu.shop.inventory = ownSpell2; menu.shop.itemname = 'Comet'; menu.shop.description = ' Cost: 1,500 \n Effect: Homes Enemy \n Damage: 5 \n Sell Value: 750'; } if (realmChoice == 3) { selector = 41; menu.shop.inventory = ownSpell3; menu.shop.itemname = 'Ice Blast'; menu.shop.description = ' Cost: 8,000 \n Effect: Slows Enemy \n Damage: 10 \n Sell Value: 4,000'; } if (realmChoice == 4) { selector = 55; menu.shop.inventory = ownSpell4; menu.shop.itemname = 'Star Dash'; menu.shop.description = ' Cost: 35,000 \n Effect: Critical hit \n Damage: 20 \n Sell Value: 17,500'; } if (realmChoice == 5) { selector = 69; menu.shop.inventory = ownSpell5; menu.shop.itemname = 'Striker'; menu.shop.description = ' Cost: 200,000 \n Effect: Explosion \n Damage: 50 \n Sell Value: 100,000'; } selector = 13; }; menu.shop.j14.onPress = function () { invisable(); if (realmChoice == 1) { selector = 14; menu.shop.inventory = ownArmor1; menu.shop.itemname = 'Level 1 Armor'; menu.shop.description = ' Cost: 1,000 \n Armor Bonus: +2 \n Sell Value: N/A'; menu.shop.j14._alpha = 10; } if (realmChoice == 2) { selector = 28; menu.shop.inventory = ownArmor2; menu.shop.itemname = 'Level 2 Armor'; menu.shop.description = ' Cost: 5,000 \n Armor Bonus: +3 \n Sell Value: N/A'; menu.shop.j14._alpha = 10; } if (realmChoice == 3) { selector = 42; menu.shop.inventory = ownArmor3; menu.shop.itemname = 'Level 3 Armor'; menu.shop.description = ' Cost: 20,000 \n Armor Bonus: +4 \n Sell Value: N/A'; menu.shop.j14._alpha = 10; } if (realmChoice == 4) { selector = 56; menu.shop.inventory = ownArmor4; menu.shop.itemname = 'Level 4 Armor'; menu.shop.description = ' Cost: 100,000 \n Armor Bonus: +5 \n Sell Value: N/A'; menu.shop.j14._alpha = 10; } if (realmChoice == 5) { selector = 70; menu.shop.inventory = ownArmor5; menu.shop.itemname = 'Level 5 Armor'; menu.shop.description = ' Cost: 500,000 \n Armor Bonus: +6 \n Sell Value: N/A'; menu.shop.j14._alpha = 10; } selector = 14; }; menu.shop.p1.onRollOver = function () { menu.shop.p1._alpha = 20; }; menu.shop.p1.onRollOut = function () { menu.shop.p1._alpha = 0; }; menu.shop.p1.onPress = function () { if (selector != 0) { if (Math.ceil(level / 5) == 1) { if (money >= cost1[selector - 1] && (slotsFilled < 8 || selector == 10 || selector == 11 || selector == 12 || selector == 14) || money >= cost1[selector - 1] && itType[selector - 1] == 2 && Math.ceil(level / 5) == 1) { i = theSlots.length - 1; while (i >= 0) { if (_root[theSlots[i]] == 0 && itType[selector - 1] != 0) { if (selector >= 6 && selector <= 9 && _root[items1[selector - 1]] > 0) { } else { var v2 = 0; if (itType[selector - 1] >= 2) { v2 += 7; } if (itType[selector - 1] >= 3) { v2 += 8; } if (itType[selector - 1] >= 4) { v2 += 8; } _root[theSlots[i]] = theNum1[selector - 1] + v2; slotsFilled += 1; break; } } --i; } if (selector == 14) { changeArmor(2); } boughtItem = 1; money -= cost1[selector - 1]; spent += cost1[selector - 1]; giveAward(awaNum1[selector - 1]); _root[items1[selector - 1]] += giveAmount[selector - 1]; menu.shop.inventory = _root[items1[selector - 1]]; } else { menu.shop.warn._alpha = 100; } } if (Math.ceil(level / 5) == 2 && (slotsFilled < 8 || selector == 10 || selector == 11 || selector == 12 || selector == 14) || money >= cost1[selector - 1] && itType[selector - 1] == 2 && Math.ceil(level / 5) == 2) { if (money >= cost2[selector - 1]) { i = theSlots.length - 1; while (i >= 0) { if (_root[theSlots[i]] == 0 && itType[selector - 1] != 0) { if (selector >= 6 && selector <= 9 && _root[items2[selector - 1]] > 0) { } else { var v2 = 0; if (itType[selector - 1] >= 2) { v2 += 7; } if (itType[selector - 1] >= 3) { v2 += 8; } if (itType[selector - 1] >= 4) { v2 += 8; } _root[theSlots[i]] = theNum2[selector - 1] + v2; slotsFilled += 1; break; } } --i; } boughtItem = 1; if (selector == 14) { changeArmor(3); } money -= cost2[selector - 1]; spent += cost2[selector - 1]; giveAward(awaNum2[selector - 1]); _root[items2[selector - 1]] += giveAmount[selector - 1]; menu.shop.inventory = _root[items2[selector - 1]]; } else { menu.shop.warn._alpha = 100; } } if (Math.ceil(level / 5) == 3 && (slotsFilled < 8 || selector == 10 || selector == 11 || selector == 12 || selector == 14) || money >= cost1[selector - 1] && itType[selector - 1] == 2 && Math.ceil(level / 5) == 3) { if (money >= cost3[selector - 1]) { i = theSlots.length - 1; while (i >= 0) { if (_root[theSlots[i]] == 0 && itType[selector - 1] != 0) { if (selector >= 6 && selector <= 9 && _root[items3[selector - 1]] > 0) { } else { var v2 = 0; if (itType[selector - 1] >= 2) { v2 += 7; } if (itType[selector - 1] >= 3) { v2 += 8; } if (itType[selector - 1] >= 4) { v2 += 8; } _root[theSlots[i]] = theNum3[selector - 1] + v2; slotsFilled += 1; break; } } --i; } boughtItem = 1; if (selector == 14) { changeArmor(4); } money -= cost3[selector - 1]; spent += cost3[selector - 1]; giveAward(awaNum3[selector - 1]); _root[items3[selector - 1]] += giveAmount[selector - 1]; menu.shop.inventory = _root[items3[selector - 1]]; } else { menu.shop.warn._alpha = 100; } } if (Math.ceil(level / 5) == 4 && (slotsFilled < 8 || selector == 10 || selector == 11 || selector == 12 || selector == 14) || money >= cost1[selector - 1] && itType[selector - 1] == 2 && Math.ceil(level / 5) == 4) { if (money >= cost4[selector - 1]) { i = theSlots.length - 1; while (i >= 0) { if (_root[theSlots[i]] == 0 && itType[selector - 1] != 0) { if (selector >= 6 && selector <= 9 && _root[items4[selector - 1]] > 0) { } else { var v2 = 0; if (itType[selector - 1] >= 2) { v2 += 7; } if (itType[selector - 1] >= 3) { v2 += 8; } if (itType[selector - 1] >= 4) { v2 += 8; } slotsFilled += 1; _root[theSlots[i]] = theNum4[selector - 1] + v2; break; } } --i; } boughtItem = 1; if (selector == 14) { changeArmor(5); } money -= cost4[selector - 1]; spent += cost4[selector - 1]; giveAward(awaNum4[selector - 1]); _root[items4[selector - 1]] += giveAmount[selector - 1]; menu.shop.inventory = _root[items4[selector - 1]]; } else { menu.shop.warn._alpha = 100; } } if (Math.ceil(level / 5) == 5 && (slotsFilled < 8 || selector == 10 || selector == 11 || selector == 12 || selector == 14) || money >= cost1[selector - 1] && itType[selector - 1] == 2 && Math.ceil(level / 5) == 5) { if (money >= cost5[selector - 1]) { i = theSlots.length - 1; while (i >= 0) { if (_root[theSlots[i]] == 0 && itType[selector - 1] != 0) { if (selector >= 6 && selector <= 9 && _root[items5[selector - 1]] > 0) { } else { var v2 = 0; if (itType[selector - 1] >= 2) { v2 += 7; } if (itType[selector - 1] >= 3) { v2 += 8; } if (itType[selector - 1] >= 4) { v2 += 8; } _root[theSlots[i]] = theNum5[selector - 1] + v2; slotsFilled += 1; break; } } --i; } boughtItem = 1; if (selector == 14) { changeArmor(6); } money -= cost5[selector - 1]; spent += cost5[selector - 1]; giveAward(awaNum5[selector - 1]); _root[items5[selector - 1]] += giveAmount[selector - 1]; menu.shop.inventory = _root[items5[selector - 1]]; } else { menu.shop.warn._alpha = 100; } } if (spent >= 101) { giveAward(107); } if (spent >= 1000) { giveAward(108); } if (spent >= 3000) { giveAward(109); } if (spent >= 10000) { giveAward(110); } if (spent >= 500000) { giveAward(161); } menu.shop.moneytext = money; } }; } function menuCreate() { shopEnter = 1; menu = attachMovie('menu', 'menu', 1001380); menu.shop.gotoAndStop(Math.ceil(level / 5)); menu.shop.warn._alpha = 0; gamepause = true; menu._alpha = 0; menu._x = Stage.width / 2; menu._y = Stage.height / 2; onView = 1; menu.p3.onPress = function () { menu.shop.gotoAndStop(3); menu.shop.bs1.onPress = function () {}; menu.shop.bs2.onPress = function () {}; menu.shop.bs3.onPress = function () {}; menu.shop.bs4.onPress = function () {}; menu.shop.bs5.onPress = function () {}; }; mPress(); } function particleEffect2(vari) { q = 25; while (q > 0) { exp = attachMovie('explosion', 'explosion' + depth, depth); exp._yscale = randRange(10, 100); exp._xscale = exp._yscale; exp._x = ball1._x + (Math.random() * 600 - 300); exp._y = ball1._y + (Math.random() * 600 - 300); ++depth; var v3 = exp._x - ball1._x; var v2 = exp._y - ball1._y; var v4 = Math.atan2(v2, v3); var v1 = v4 * 180 / Math.PI; exp._alpha = 0; xDir = Math.cos(v1); yDir = Math.sin(v1); explosions2.push(exp); exX2.push(xDir); exY2.push(yDir); howFast.push(1); blah = new Color(exp); --q; } } function particleMovement2() { i = explosions2.length; while (i >= 0) { var v3 = explosions2[i]._x - ball1._x; var v2 = explosions2[i]._y - ball1._y; var v1 = Math.atan2(v2, v3); exX2[i] = Math.cos(v1) * 5; exY2[i] = Math.sin(v1) * 5; howFast[i] += 0.05; exX2[i] *= howFast[i]; exY2[i] *= howFast[i]; explosions2[i]._x -= exX2[i]; explosions2[i]._y -= exY2[i]; explosions2[i]._alpha += 2; if (explosions2[i]._alpha <= 0 || explosions2[i].hitTest(ball1)) { explosions2[i].removeMovieClip(); explosions2.splice(i, 1); exX2.splice(i, 1); exY2.splice(i, 1); howFast.splice(i, 1); } --i; } } function particleEffect3(vari, vari2) { q = 15; while (q > 0) { exp = this.createEmptyMovieClip('exp' + depth, depth); drawCircle(exp, randRange(1, 3), 10027008, 100); exp._x = enemies[vari]._x; exp._y = enemies[vari]._y; exp._rotation = enemies[vari]._rotation; ++depth; xDir = Math.cos(bullets[vari2]._rotation * Math.PI / 180 + (Math.random() / 2 - 0.5)) * randRange(3, 20); yDir = Math.sin(bullets[vari2]._rotation * Math.PI / 180 + (Math.random() / 2 - 0.5)) * randRange(3, 20); explosions.push(exp); exX.push(xDir); exY.push(yDir); --q; } } function particleEffect4() { q = 10; while (q > 0) { exp = attachMovie('explosion2', 'explosion' + depth, depth); ++depth; exp._yscale = randRange(20, 70); exp._xscale = exp._yscale; exp._x = ball1._x; exp._y = ball1._y; xDir = Math.random() * 10 - 5; yDir = Math.random() * 10 - 5; explosions.push(exp); exX.push(xDir); exY.push(yDir); --q; } } function particleEffect(vari) { exp = this.createEmptyMovieClip('exp' + depth, depth); drawCircle(exp, randRange(1, 3), 16777215, 100); exp._x = bullets[vari]._x; exp._y = bullets[vari]._y; exp._alpha = 70; ++depth; var xDir2 = Math.random() * 6 - 3; var yDir2 = Math.random() * 6 - 3; exp.onEnterFrame = function () { this._x += xDir2; this._y += yDir2; xDir2 *= 0.9; yDir2 *= 0.9; this._alpha -= 2; if (this._alpha <= 0) { this.removeMovieClip(); } this._xscale -= 2; this._yscale = this._xscale; }; blah = new Color(exp); } function particleEffect7() { exp = this.createEmptyMovieClip('exp' + depth4, depth4); drawCircle(exp, randRange(1, 3), 16777215, 100); exp._x = ball1._x; exp._y = ball1._y; ++depth4; var xDir2 = Math.random() * 6 - 3; var yDir2 = Math.random() * 6 - 3; exp.onEnterFrame = function () { this._x += xDir2; this._y += yDir2; xDir2 *= 0.9; yDir2 *= 0.9; this._alpha -= 2; if (this._alpha <= 0) { this.removeMovieClip(); } this._xscale -= 2; this._yscale = this._xscale; }; blah = new Color(exp); if (charLevel == 5) { blah.setRGB(10027008); } else { if (charLevel == 2) { blah.setRGB(16777131); } else { if (charLevel == 3) { blah.setRGB(16750848); } else { if (charLevel == 4) { blah.setRGB(3316223); } else { if (charLevel >= 6) { blah.setRGB(0); } } } } } } function particleEffect8(i) { exp = this.createEmptyMovieClip('exp' + depth4, depth4); drawCircle(exp, randRange(1, 3), 0, 100); exp._x = enemies[i]._x; exp._y = enemies[i]._y; ++depth4; var xDir2 = Math.random() * 6 - 3; var yDir2 = Math.random() * 6 - 3; exp.onEnterFrame = function () { this._x += xDir2; this._y += yDir2; xDir2 *= 0.9; yDir2 *= 0.9; this._alpha -= 2; if (this._alpha <= 0) { this.removeMovieClip(); } this._xscale -= 2; this._yscale = this._xscale; }; } function particleMovement() { i = explosions.length; while (i >= 0) { explosions[i]._x += exX[i]; explosions[i]._y += exY[i]; exX[i] *= 0.95; exY[i] *= 0.95; explosions[i]._alpha -= 5; if (explosions[i]._alpha <= 0) { explosions[i].removeMovieClip(); explosions.splice(i, 1); exX.splice(i, 1); exY.splice(i, 1); } --i; } } function shaker() { if (shake == 0) { _root._x = 0; _root._y = 0; } else { if (shake == 1) { shake += 1; _root._x += 3; _root._y += 3; } else { if (shake == 2) { shake += 1; _root._y -= 5; _root._x -= 5; } else { if (shake == 3) { shake = 0; _root._x += 2; _root._y += 2; } } } } } function drawCircle(target_mc, radius, fillColor, fillAlpha) { var x = radius; var y = radius; with (target_mc) { beginFill(fillColor, fillAlpha); moveTo(x + radius, y); curveTo(radius + x, 0.414213562373095 * radius + y, Math.SQRT1_2 * radius + x, Math.SQRT1_2 * radius + y); curveTo(0.414213562373095 * radius + x, radius + y, x, radius + y); curveTo(-0.414213562373095 * radius + x, radius + y, -Math.SQRT1_2 * radius + x, Math.SQRT1_2 * radius + y); curveTo(-radius + x, 0.414213562373095 * radius + y, -radius + x, y); curveTo(-radius + x, -0.414213562373095 * radius + y, -Math.SQRT1_2 * radius + x, -Math.SQRT1_2 * radius + y); curveTo(-0.414213562373095 * radius + x, -radius + y, x, -radius + y); curveTo(0.414213562373095 * radius + x, -radius + y, Math.SQRT1_2 * radius + x, -Math.SQRT1_2 * radius + y); curveTo(radius + x, -0.414213562373095 * radius + y, radius + x, y); endFill(); } } _quality = 'MEDIUM'; moneyC = 0; upM.stop(); achievementAllowed = 1; if (lSize == 0 || lSize == -1) { ownHpPot = 0; ownManaPot = 0; } if (lSize == 0 || lSize == -1) { toNextLevel._alpha = 0; nw._alpha = 0; textHolder.wavetxt = ''; textHolder.waves._alpha = 0; textHolder.monies._alpha = 0; textHolder.moneytxt = ''; bas._alpha = 0; } theItemsList = new Array('item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7', 'item8', 'item9', 'item10', 'item11', 'item12', 'item13', 'item14', 'item15', 'item16', 'item17', 'item18', 'item19', 'item20', 'item21', 'item22', 'item23', 'item24', 'item25', 'item26', 'item27', 'item28', 'item29', 'item30', 'item31', 'item32', 'item33', 'item34'); theItemsList2 = new Array('it1', 'it2', 'it3', 'it4', 'it5', 'it6', 'it7', 'it8', 'it9', 'it10', 'it11', 'it12', 'it13', 'it14', 'it15', 'it16', 'it17', 'it18', 'it19', 'it20', 'it21', 'it22', 'it23', 'it24', 'it25', 'it26', 'it27', 'it28', 'it29', 'it30', 'it31', 'it32', 'it33', 'it34'); if (lSize == -1) { bg.gotoAndStop(bgn + 26); i = itemers2.length - 1; while (i >= 0) { trace(theItemsList[itemers2[i]]); it = bg.attachMovie(theItemsList[itemers2[i]], 'item' + depth, depth); ++depth; it._rotation = rotationers2[i]; it._x = xValers2[i]; it._y = yValers2[i]; it._yscale = sizered2[i]; it._xscale = it._yscale; if (flipped2[i] == 1) { it._xscale *= -1; } bgAtter = bg.bg.attachMovie(theItemsList2[itemers2[i]], 'item' + depth, depth); bgAtter._alpha = 5; ++depth; bgAtter._rotation = rotationers2[i]; bgAtter._x = xValers2[i] - bg.bg._x; bgAtter._y = yValers2[i] - bg.bg._y; bgAtter._yscale = sizered2[i]; bgAtter._xscale = bgAtter._yscale; if (flipped2[i] == 1) { bgAtter._xscale *= -1; } --i; } } var my_sound = new Sound(); my_sound.attachSound('193466_Rose_At_Twilight.mp3'); my_sound.start(0, 100); var banger = new Sound(); banger.attachSound('bang'); var ashot = new Sound(); ashot.attachSound('Arrow_sh-kayden_r-8961_hifi'); var gothit = new Sound(); gothit.attachSound('Knife_SL-Derka_De-8768_hifi'); var stab = new Sound(); stab.attachSound('Sword_Sl-Doogens-8722_hifi'); var coinCollect = new Sound(); coinCollect.attachSound('power_of-kayden_r-8978_hifi'); tt1._alpha = 0; o1._alpha = 0; v1._alpha = 0; tt2._alpha = 0; o2._alpha = 0; v2._alpha = 0; tt1.selectable = false; tt2.selectable = false; makebigger.b1._alpha = 10; makebigger.a1._alpha = 10; ball1.t.o.bow.gotoAndStop(quiver); speeded[0] = bowEnchant1; speeded[1] = bowEnchant2; speeded[2] = bowEnchant3; speeded[3] = bowEnchant4; speeded[4] = bowEnchant5; speeded[5] = bowEnchant6; speeded[6] = bowEnchant7; whatUse = new Array('quiver', 'arrowUsed', 'weaponUsed', 'spellUsed'); if (lSize == 0 || lSize == -1) { speeded[0] = 3; speeded[1] = 3; speeded[2] = 3; speeded[3] = 3; speeded[4] = 3; speeded[5] = 3; speeded[6] = 3; } ownBow1 = 1; ownBow2 = 0; ownBow3 = 0; ownBow4 = 0; ownBow5 = 0; ownBow6 = 0; ownBow7 = 0; ownWep1 = 0; ownWep2 = 0; ownWep3 = 0; ownWep4 = 0; ownWep5 = 0; ownWep6 = 0; ownWep7 = 0; ownWep8 = 0; ownArmor1 = 0; ownArmor2 = 0; ownArmor3 = 0; ownArmor4 = 0; ownArmor5 = 0; ownSpell1 = 0; ownSpell2 = 0; ownSpell3 = 0; ownSpell4 = 0; ownSpell5 = 0; gunAmmo1 = 9999999; slotsFilled = 0; theItems = new Array(); theSlots = new Array('slot1', 'slot2', 'slot3', 'slot4', 'slot5', 'slot6', 'slot7', 'slot8'); specSlots = new Array('slotBow', 'slotArrow', 'slotWep', 'slotSpell'); specScreen = new Array(inventoryScreen.u9, inventoryScreen.u10, inventoryScreen.u11, inventoryScreen.u12); invenScreen = new Array(inventoryScreen.u1, inventoryScreen.u2, inventoryScreen.u3, inventoryScreen.u4, inventoryScreen.u5, inventoryScreen.u6, inventoryScreen.u7, inventoryScreen.u8); gamepause = false; gameover = false; openToShop = 0; invenHolding = -1; inHand = null; invenUse.a1 = 'x∞'; makebigger.w1 = 'x' + ownBow1; makebigger.w2 = 'x' + ownBow2; makebigger.w3 = 'x' + ownBow3; makebigger.w4 = 'x' + ownBow4; makebigger.w5 = 'x' + ownBow5; shake = 0; var dx = 0; var dy = 0; var dist = 0; depth = 400000; depth2 = 20000; depth3 = 100; depth4 = 50000; initialX = 0; initialY = 0; ep = 1; gameWon = 0; enemyEvolution = 0; levelUp.gotoAndStop(50); spike = new Array(); sdir = new Array(); topRotation = 0; leFin = 105; remove = 0; chance = 35; Mouse.hide(); percent = 0; enemiesOnStage = 0; enemiesToKill = new Array(30, 32, 34, 36, 9999, 38, 40, 42, 44, 9999, 46, 48, 50, 52, 9999, 54, 56, 58, 60, 9999, 62, 64, 66, 68, 9999); if (lSize != 0) { textHolder.moneytxt = money; } ball1.swapDepths(700015); useless.swapDepths(698522); headbar.swapDepths(700021); textHolder.swapDepths(700022); hHolder.swapDepths(703000); makebigger.swapDepths(701310); award.swapDepths(1001482); deler.swapDepths(912989); sEnter.swapDepths(703520); pointer.swapDepths(702355); invenUse.swapDepths(802152); potUse.swapDepths(802252); inventoryScreen.swapDepths(933322); levelUp.swapDepths(699462); gb.swapDepths(703111); manaM.swapDepths(703112); expM.swapDepths(703113); saveScreen2.swapDepths(940126); Mouse.hide(); enemies = new Array(); enemyX = new Array(); enemyY = new Array(); enemyType = new Array(); spikes = new Array(); enemyHealth = new Array(); bullets = new Array(); bulletX = new Array(); bulletY = new Array(); enBullets = new Array(); enbx = new Array(); enby = new Array(); enBulletsType = new Array(); enemyAmount = 1; story1 = 'You can decrease lag by right clicking, clicking on the folder icon, and setting storage to unlimited'; story2 = 'You can use Q&E to switch between different forms of attack'; story3 = 'You can access your inventory by pressing \'I\''; story4 = 'You can hit SPACE to use a health potion'; story5 = 'you can equip items by putting them into the slots at the top of the inventory screen'; story6 = 'You can use the WASD keys to move'; story7 = 'You can hold your mouse down to shoot'; story8 = 'You can hit CONTROL to use a mana potion'; story9 = 'You can hit TAB to use a bomb'; story10 = 'You can sell items by inserting them into the black box at the bottom of the inventory screen'; story11 = 'You can mute the game by hitting the speaker button at the bottom of the screen during gameplay'; story12 = 'You can decrease lag by closing down non-used applications'; story13 = 'You can decrease lag by setting quality to low'; story14 = 'You can press \'P\' to pause the game'; story15 = 'You can adjust the quality and sound on the options page of the main menu'; story16 = 'You can access a cheat screen by pressing SHIFT + RIGHt *WARNING* you can not get achievements in this mode'; story17 = 'There\'s a large list of tasks you can achieve on the achievements page'; story18 = 'You can access exclusive content at armorgames.com'; story19 = 'You can create your own level to share with your friends when you use the level editor'; story20 = 'There\'s a large bestiary containing all the enemies and their abilities on the menu'; story21 = 'You can play survival mode on the main menu'; story22 = 'There\'s a walkthrough to this game on armorgames.com'; story23 = 'This is the best game ever'; story24 = 'That the next level is the last? :(. Don\'t worry I made it extra hard just for you'; stories = new Array(story1, story2, story3, story4, story5, story6, story7, story8, story9, story10, story11, story12, story13, story14, story15, story16, story17, story18, story19, story20, story21, story22, story23, story24, story25); enemyKillCount = 0; timer = setInterval(upTime, 1000); mDownSeconds = 0; staleSeconds = 0; secondsThisGame = 0; unl1 = 0; unl2 = 0; seconds2 = 0; minutes2 = 0; hours2 = 0; enemyStart = 200; changeArmor(armorEquip); if (lSize == 0 || lSize == -1) { changeArmor(4); } award.aname.awardName = awards[0]; award.gotoAndStop(1); awardqueue = new Array(); if (timesPlayed == 1) { giveAward(72); } if (timesPlayed == 2) { giveAward(73); } if (timesPlayed == 3) { giveAward(74); } if (timesPlayed == 4) { giveAward(75); } timesPlayed += 1; gObject.data.timesPlayed = timesPlayed; gObject.flush(); if (awardsTotal >= 10) { giveAward(63); } if (awardsTotal >= 30) { giveAward(64); } if (awardsTotal >= 50) { giveAward(65); } if (awardsTotal >= 70) { giveAward(66); } if (awardsTotal >= 90) { giveAward(67); } if (awardsTotal >= 110) { giveAward(68); } if (awardsTotal >= 130) { giveAward(69); } if (awardsTotal >= 145) { giveAward(70); } if (awardsTotal >= 160) { giveAward(71); } if (awardsTotal >= 168) { giveAward(169); } if (kill >= 10000) { giveAward(165); } else { if (kill >= 3000) { giveAward(4); } } if (kill >= 1000) { giveAward(3); } if (kill >= 300) { giveAward(2); } if (kill >= 100) { giveAward(1); } if (visitedArmor == 1) { giveAward(144); } if (visitedCreds == 1) { giveAward(146); } if (visitedBesti == 1) { giveAward(147); } if (visitedLevel == 1) { giveAward(145); } getMedal = 1; unlt100 = 0; noSouth = 0; if (lSize == -1) { stageType = 0; } if (lSize != -1) { bg.gotoAndStop(level); if (level == 3 || level == 9 || level == 13 || level == 17 || level == 24) { noSouth = 1; } if (level == 2 || level == 6 || level == 14 || level == 18 || level == 23 || level == 25) { if (level == 2) { nIn = 0; } if (level == 6) { nIn = 1; } if (level == 14) { nIn = 2; } if (level == 18) { nIn = 3; } if (level == 23) { nIn = 4; } stageType = 3; } else { stageType = 0; } if (level == 5 || level == 10 || level == 15 || level == 20 || level == 25) { attachMovie('bhealth', 'bhealth', 701360); bhealth._x = Stage.width / 2 - 120; bhealth._y = 400; if (level == 5) { createBoss1(); enemyType.push(21); } if (level == 10) { createBoss2(); enemyType.push(22); } if (level == 15) { createBoss3(); enemyType.push(23); } if (level == 20) { createBoss4(); enemyType.push(24); } if (level == 25) { createBoss5(); enemyType.push(25); } enemies.push(en); enemyX.push(0); enemyY.push(0); } } qbtn.onPress = function () { if (_quality == 'HIGH') { _quality = 'MEDIUM'; } else { if (_quality == 'LOW') { _quality = 'HIGH'; } else { if (_quality == 'MEDIUM') { _quality = 'LOW'; } } } }; keyListener = new Object(); shopEntered = 0; keyListener.onKeyDown = function () { num = Key.getAscii(); if (num == 105) { openToShop = 0; invenCreate(); } if (num == 101) { attackType += 1; if (attackType == 4) { attackType = 1; whereDidItGo(); } } if (num == 113) { attackType -= 1; if (attackType == 1) { whereDidItGo(); } if (attackType == 0) { attackType = 3; } } if (attackType == 1) { whereDidItGo(); } if (attackType == 2) { ball1.t.o.wepTrails.gotoAndStop(weaponUsed); if (weaponUsed == 1 || weaponUsed == 3 || weaponUsed == 5) { ball1.t.o.d.gotoAndStop(1); } else { ball1.t.o.d.gotoAndStop(2); } if (weaponUsed == 0) { attackType = 1; } } if (attackType == 3) { if (spellUsed == 0) { attackType = 1; } } ball1.t.gotoAndStop(attackType); if (num == 112 && !gamepause && !gameover) { gamepause = true; giveAward(118); attachMovie('paused2', 'paused2', 1000122); paused2.btm.onPress = function () { gameover = true; paused2.removeMovieClip(); continues = 0; realGO = 1; }; paused2.btm.onRollOver = function () { paused2.btm.gotoAndStop(2); }; paused2.btm.onRollOut = function () { paused2.btm.gotoAndStop(1); }; paused2.rg.onRollOver = function () { paused2.rg.gotoAndStop(2); }; paused2.rg.onRollOut = function () { paused2.rg.gotoAndStop(1); }; paused2.rg.onPress = function () { gamepause = false; paused2.removeMovieClip(); }; paused2._x = Stage.width / 2; paused2._y = Stage.height / 2 - 20; } else { if (num == 112 && gamepause && !gameover && !menuExist) { gamepause = false; paused2.removeMovieClip(); } } if (num == 109) { if (music_frame == 1) { music.gotoAndStop(2); music_frame = 2; my_sound.stop(); giveAward(143); } else { if (music_frame == 2) { music.gotoAndStop(1); music_frame = 1; my_sound.start(0, 9999); } } } ball1.t.o.k.q.gotoAndStop(weaponUsed); ball1.t.o.bow.gotoAndStop(quiver); }; if (music_frame == 1) { music.gotoAndStop(2); music_frame = 2; my_sound.stop(); } else { if (music_frame == 2) { music.gotoAndStop(1); music_frame = 1; my_sound.start(0, 9999); } } giveAward(148); music.onPress = function () { if (music_frame == 1) { music.gotoAndStop(2); music_frame = 2; giveAward(143); } else { if (music_frame == 2) { music.gotoAndStop(1); music_frame = 1; } } if (music_frame == 1) { my_sound.start(0, 9999); } if (music_frame == 2) { my_sound.stop(); } }; Key.addListener(keyListener); damage = 1; doit = false; trueOnStage = 0; a1 = new Array(0, 1); a2 = new Array(0, 1, 2); a3 = new Array(0, 2, 3); a4 = new Array(0, 2, 3, 4); a6 = new Array(0, 3, 5); a7 = new Array(0, 5, 6); a8 = new Array(0, 6, 7); a9 = new Array(0, 6, 7, 8); a11 = new Array(0, 7, 9); a12 = new Array(0, 9, 10); a13 = new Array(0, 10, 11); a14 = new Array(0, 10, 11, 12); a16 = new Array(0, 9, 13); a17 = new Array(0, 13, 14); a18 = new Array(0, 14, 15); a19 = new Array(0, 14, 15, 16); a21 = new Array(0, 15, 17); a22 = new Array(0, 17, 18); a23 = new Array(0, 18, 19); a24 = new Array(0, 18, 19, 20); b1 = new Array(0, 1, 2, 3, 4); b2 = new Array(0, 5, 6, 7, 8); b3 = new Array(0, 9, 10, 11, 12); b4 = new Array(0, 13, 14, 15, 16); b5 = new Array(0, 17, 18, 19, 20); enArs = new Array('a1', 'a2', 'a3', 'a4', 'b1', 'a6', 'a7', 'a8', 'a9', 'b2', 'a11', 'a12', 'a13', 'a14', 'b3', 'a16', 'a17', 'a18', 'a19', 'b4', 'a21', 'a22', 'a23', 'a24', 'b5'); ball1._yscale = ball1._xscale / 1.3; ball1._xscale = ball1._yscale; type = 0; nIn = 0; levelCapacity = new Array(2, 2, 4, 1, 3); pl1 = new Array(bg.ss1, bg.ss2, bg.ss3, bg.ss4, bg.ss5); mouseDownTime = 0; mouseIsDown = 0; onMouseDown = function () { Mouse.hide(); mouseIsDown = 1; }; doHit = 1; onMouseUp = function () { mouseIsDown = 0; }; Button.prototype.tabEnabled = false; ensHitThisSwing = new Array(); weaponStrengths = new Array(2, 4, 4, 8, 8, 16, 32, 64); spells = new Array(); spellX = new Array(); spellY = new Array(); spellType = new Array(); makebigger.q1 = 'x' + gunAmmo1; makebigger.q2 = 'x' + gunAmmo2; makebigger.q3 = 'x' + gunAmmo3; makebigger.q4 = 'x' + gunAmmo5; makebigger.q5 = 'x' + gunAmmo4; makebigger.q6 = 'x' + gunAmmo6; arrowPicked = ''; ammo = 0; textHolder.arrowstxt = ammo; splatters = new Array(); sTimer = new Array(); textHolder.killstxt = kills; tKiller = 0; playerFreeze = 0; bulletMissed = 0; pEffect = 0; levelMode = 2; castleHealth = 100; explosionParts = new Array('expp1', 'expp2', 'expp3', 'expp4', 'expp5', 'expp6', 'expp7', 'expp8', 'expp9', 'expp10', 'expp11', 'expp12', 'expp13', 'expp14'); sWave = 0; doPart = 0; dtn = 0; stn = 0; coins = new Array(); coinTimer = new Array(); coinWorth = new Array(); gooList = new Array(); gooLife = new Array(); gooList2 = new Array(); gooLife2 = new Array(); gooList3 = new Array(); gooLife3 = new Array(); gooList4 = new Array(); playerOnGoo = 0; playerOnGoo2 = 0; shopEnter = 0; gooMove = function () { playerOnGoo = 0; i = gooList4.length - 1; while (i >= 0) { gooList4[i]._x -= initialX; gooList4[i]._y -= initialY; --i; } i = gooList.length - 1; while (i >= 0) { gooList[i]._x -= initialX; gooList[i]._y -= initialY; if (gooList[i].hitTest(ball1._x, ball1._y, true)) { playerOnGoo = 1; giveAward(122); } gooLife[i] -= 1; if (gooLife[i] <= 0) { gooList[i]._alpha -= 1; if (gooList[i]._alpha <= 0) { gooList[i].removeMovieClip(); gooList.splice(i, 1); gooLife.splice(i, 1); } } --i; } playerOnGoo2 -= 1; if (playerOnGoo2 >= 0) { deler.gotoAndPlay(1); } i = gooList2.length - 1; while (i >= 0) { gooList2[i]._x -= initialX; gooList2[i]._y -= initialY; if (gooList2[i].hitTest(ball1._x, ball1._y, true)) { playerOnGoo2 = 100; giveAward(140); } gooLife2[i] -= 1; if (gooLife2[i] <= 0) { gooList2[i]._alpha -= 1; if (gooList2[i]._alpha <= 0) { gooList2[i].removeMovieClip(); gooList2.splice(i, 1); gooLife2.splice(i, 1); } } --i; } i = gooList3.length - 1; while (i >= 0) { gooList3[i]._x -= initialX; gooList3[i]._y -= initialY; if (gooList3[i].hitTest(ball1._x, ball1._y, true)) { if (!inver) { lives -= 1; } giveAward(123); timer2 = 30; untouched = 0; if (lives <= 0) { if (lSize == 0 || lSize == -1) { realGO = 1; } gameover = 1; gamepause = 1; deaths += 1; } textHolder.livestxt = lives; attachMovie('redFlash', 'redFlash', 1000824); gooList3[i].removeMovieClip(); gooList3.splice(i, 1); gooLife3.splice(i, 1); } gooLife3[i] -= 1; if (gooLife3[i] <= 0) { gooList3[i]._alpha -= 1; if (gooList3[i]._alpha <= 0) { gooList3[i].removeMovieClip(); gooList3.splice(i, 1); gooLife3.splice(i, 1); } } --i; } }; worthArray = new Array(20, 50, 70, 120, 200, 400, 1500, 2500, 3500, 10000, 600, 300, 2000, 170, 80, 7000, 40, 3000, 100, 13000); startShrink = 0; textHolder.enemiestxt = enemiesLeft; textHolder.scoretxt = score; textHolder.livestxt = lives; textHolder.eptxt = ep; if (lSize != 0) { textHolder.wavetxt = level + '/25'; } attachMovie('aimer', 'aimer', 1010949); aimer._alpha = 0; velocityX = 0; velocityY = 0; acceleration = 1.8; friction = 0.55; menuExist = false; gaOn = 0; inver = 0; rapid = 0; deler._x = Stage.width / 2; deler._y = Stage.height / 2; realGO = 0; if (lSize == 0 || lSize == -1) { continues = 0; } bombs = new Array(); bombType = new Array(); bombTime = new Array(); bombHitCount = 0; bombDelayTime = 0; hpDelay = 0; manaDelay = 0; soPart = 0; tts = 0; isGo = 0; expNeeded = new Array(100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000); textHolder.leveltxt = charLevel; selector = 0; inventoryScreen.f1.onRollOver = function () { inventoryScreen.fbtn.gotoAndStop(2); }; inventoryScreen.f1.onRollOut = function () { inventoryScreen.fbtn.gotoAndStop(1); }; otherSelector = 0; bBig = 1; realmArray = new Array('Volcano', 'Moss', 'Desert', 'Darkness', 'Tundra'); stageArray = new Array('First', 'Second', 'Third', 'Fourth', 'Fifth', 'Sixth', 'Seventh', 'Eighth', 'Ninth', 'Tenth', 'Eleventh', 'Twelfth', 'Thirteenth', 'Fourteenth', 'Fifteenth', 'Sixteenth', 'Seventeenth', 'Eighteenth', 'Nineteenth', 'Twentieth', 'Twenty First', 'Twenty Second', 'Twenty Third', 'Twenty Fourth', 'Twenty Fifth'); startPositionsX = new Array(360, 280, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 350, 400, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320); startPositionsY = new Array(140, 240, 340, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 320, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240); startPositionsXB = new Array(520, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 580, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480); startPositionsYB = new Array(480, 480, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 460, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360); if (lSize == 0) { bg.gotoAndStop(randRange(1, 25)); } ball1._x = startPositionsX[level - 1]; ball1._y = startPositionsY[level - 1]; onView = 0; allItems = new Array('ownBow1', 'ownBow2', 'ownBow3', 'ownBow4', 'ownBow5', 'ownBow6', 'ownBow7', 'gunAmmo1', 'gunAmmo2', 'gunAmmo3', 'gunAmmo4', 'gunAmmo5', 'gunAmmo6', 'gunAmmo7', 'gunAmmo8', 'ownWep1', 'ownWep2', 'ownWep3', 'ownWep4', 'ownWep5', 'ownWep6', 'ownWep7', 'ownWep8', 'ownSpell1', 'ownSpell2', 'ownSpell3', 'ownSpell4', 'ownSpell5'); i = theSlots.length - 1; while (i >= 0) { allItems[theSlots[i]] += _root[theSlots[i]]; if (_root[theSlots[i]] != 0) { slotsFilled += 1; trace(theSlots[i]); } --i; } allSellItems = new Array('ownBow1', 'ownBow2', 'ownBow3', 'ownBow4', 'ownBow5', 'ownBow6', 'ownBow7', 'gunAmmo2', 'gunAmmo3', 'gunAmmo4', 'gunAmmo5', 'gunAmmo6', 'gunAmmo7', 'gunAmmo8', 'ownWep1', 'ownWep2', 'ownWep3', 'ownWep4', 'ownWep5', 'ownWep6', 'ownWep7', 'ownWep8', 'ownSpell1', 'ownSpell2', 'ownSpell3', 'ownSpell4', 'ownSpell5'); allCosts = new Array(15, 50, 250, 1000, 5000, 25000, 125000, 5, 10, 25, 50, 100, 250, 500, 25, 150, 150, 750, 500, 2500, 10000, 50000, 250, 750, 4000, 17500, 100000); itType = new Array(3, 3, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 4, 0); theNum1 = new Array(1, 2, 2, 3, 0, 2, 3, 0, 0, 0, 0, 0, 1, 0); cost1 = new Array(50, 300, 100, 500, 0, 10, 20, 0, 0, 50, 50, 50, 500, 1000); items1 = new Array('ownWep1', 'ownWep2', 'ownBow2', 'ownBow3', null, 'gunAmmo2', 'gunAmmo3', null, null, 'ownHpPot', 'ownManaPot', 'ownBomb1', 'ownSpell1', 'ownArmor1'); awaNum1 = new Array(26, 29, 20, 21, 0, 13, 14, 0, 0, 39, 40, 41, 43, 34); theNum2 = new Array(3, 4, 2, 3, 4, 2, 3, 4, 5, 0, 0, 0, 2, 0); cost2 = new Array(300, 1500, 100, 500, 2000, 10, 20, 50, 100, 150, 150, 300, 1500, 5000); items2 = new Array('ownWep3', 'ownWep4', 'ownBow2', 'ownBow3', 'ownBow4', 'gunAmmo2', 'gunAmmo3', 'gunAmmo4', 'gunAmmo5', 'ownHpPot', 'ownManaPot', 'ownBomb1', 'ownSpell2', 'ownArmor2'); awaNum2 = new Array(27, 30, 20, 21, 22, 13, 14, 15, 16, 39, 40, 41, 44, 35); theNum3 = new Array(5, 6, 3, 4, 5, 4, 5, 6, 0, 0, 0, 0, 3, 0); cost3 = new Array(1000, 5000, 500, 2000, 10000, 50, 100, 200, 0, 600, 600, 1200, 8000, 20000); items3 = new Array('ownWep5', 'ownWep6', 'ownBow3', 'ownBow4', 'ownBow5', 'gunAmmo4', 'gunAmmo5', 'gunAmmo6', null, 'ownHpPot', 'ownManaPot', 'ownBomb2', 'ownSpell3', 'ownArmor3'); awaNum3 = new Array(28, 31, 21, 22, 23, 15, 16, 17, 0, 39, 40, 42, 45, 36); theNum4 = new Array(0, 7, 4, 5, 6, 4, 5, 6, 7, 0, 0, 0, 4, 0); cost4 = new Array(0, 20000, 2000, 10000, 50000, 50, 100, 200, 500, 2400, 2400, 4800, 35000, 100000); items4 = new Array(null, 'ownWep7', 'ownBow4', 'ownBow5', 'ownBow6', 'gunAmmo4', 'gunAmmo5', 'gunAmmo6', 'gunAmmo7', 'ownHpPot', 'ownManaPot', 'ownBomb2', 'ownSpell4', 'ownArmor4'); awaNum4 = new Array(0, 32, 22, 23, 24, 15, 16, 17, 18, 39, 40, 42, 46, 37); theNum5 = new Array(0, 8, 5, 6, 7, 6, 7, 8, 0, 0, 0, 0, 5, 0); cost5 = new Array(0, 100000, 10000, 50000, 250000, 200, 500, 1000, null, 10000, 10000, 20000, 200000, 500000); items5 = new Array(null, 'ownWep8', 'ownBow5', 'ownBow6', 'ownBow7', 'gunAmmo6', 'gunAmmo7', 'gunAmmo8', null, 'ownHpPot', 'ownManaPot', 'ownBomb2', 'ownSpell5', 'ownArmor5'); awaNum5 = new Array(0, 33, 23, 24, 25, 17, 18, 19, 0, 39, 40, 42, 47, 38); boughtYes = new Array(menu.shop.bt1, menu.shop.bt2, menu.shop.bt3, menu.shop.bt4, menu.shop.bt5, null, null, null, null, null, null, null, menu.shop.bt6, menu.shop.bt7); giveAmount = new Array(1, 1, 1, 1, 1, 100, 100, 100, 100, 1, 1, 1, 1, 1); explosions = new Array(); exX = new Array(); exY = new Array(); explosions2 = new Array(); exX2 = new Array(); exY2 = new Array(); howFast = new Array(); updateInvenLeft(); } movieClip 3574 { } movieClip 3575 l14 { } movieClip 3577 l15 { } movieClip 3580 l16 { } movieClip 3582 { } movieClip 3583 { } movieClip 3584 { } movieClip 3585 { } movieClip 3589 { } movieClip 3591 { } movieClip 3598 { } movieClip 3599 { frame 1 { stop(); } } movieClip 3601 { } movieClip 3603 { } movieClip 3606 { } movieClip 3610 l17 { } movieClip 3612 { } movieClip 3619 l19 { } movieClip 3622 { } movieClip 3624 { } movieClip 3628 l20 { } movieClip 3630 { } movieClip 3634 l21 { } movieClip 3637 l22 { } movieClip 3639 { } movieClip 3642 { } movieClip 3646 l24 { } movieClip 3648 { } movieClip 3658 { } movieClip 3659 { } movieClip 3666 l26 { } movieClip 3668 l27 { } movieClip 3670 l28 { } movieClip 3672 l29 { } movieClip 3674 { } movieClip 3678 { } movieClip 3682 { } movieClip 3685 { } movieClip 3689 l31 { } movieClip 3691 l32 { } movieClip 3693 l33 { } movieClip 3696 l34 { } movieClip 3698 { } movieClip 3703 l1 { } movieClip 3706 l2 { } movieClip 3709 l3 { } movieClip 3712 l4 { } movieClip 3713 l5 { } movieClip 3715 { } movieClip 3718 l6 { } movieClip 3719 l7 { } movieClip 3721 l8 { } movieClip 3723 { } movieClip 3726 { } movieClip 3729 { } movieClip 3732 { } movieClip 3736 { } movieClip 3740 { } movieClip 3743 { } movieClip 3746 { } movieClip 3749 { } movieClip 3751 { } movieClip 3761 { frame 1 { stop(); } } movieClip 3762 { } movieClip 3763 { } movieClip 3764 LE1 { frame 1 { stop(); } frame 30 { stop(); } frame 60 { stop(); } } movieClip 3768 { } movieClip 3770 { } movieClip 3772 { } movieClip 3774 { } movieClip 3776 { } movieClip 3777 { } movieClip 3778 LESS { frame 1 { stop(); } frame 30 { stop(); } frame 60 { stop(); } } movieClip 3780 { } movieClip 3784 { frame 1 { stop(); } frame 6 { stop(); } frame 11 { stop(); } frame 16 { stop(); } frame 21 { stop(); } } movieClip 3786 { } movieClip 3794 { frame 1 { stop(); } } movieClip 3806 { frame 1 { stop(); } } movieClip 3818 { frame 1 { stop(); } } movieClip 3825 w6 { } movieClip 3827 w7 { } movieClip 3828 { frame 1 { stop(); } } movieClip 3830 { } movieClip 3832 { } movieClip 3833 { frame 1 { stop(); } } movieClip 3850 { frame 1 { stop(); } } movieClip 3851 { } movieClip 3852 { frame 1 { stop(); } } movieClip 3853 { frame 1 { stop(); } } movieClip 3854 { frame 1 { stop(); } } movieClip 3855 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 3856 { } movieClip 3857 { frame 1 { stop(); } } movieClip 3891 { } movieClip 3925 { } movieClip 3959 { } movieClip 3993 { } movieClip 4026 { } movieClip 4027 enbullet2 { frame 1 { stop(); } } movieClip 4031 { } movieClip 4049 { } movieClip 4051 { frame 3 { stop(); } } movieClip 4053 yy2 { } movieClip 4055 yy1 { } movieClip 4057 yy3 { } movieClip 4059 yy4 { } movieClip 4061 yy5 { } movieClip 4063 yy6 { } movieClip 4066 { } movieClip 4069 w2 { } movieClip 4071 w3 { } movieClip 4073 w4 { } movieClip 4075 w5 { } movieClip 4078 w1 { frame 4 { stop(); } } movieClip 4079 armory { frame 1 { stop(); } } movieClip 4080 { } movieClip 4081 toSell { } movieClip 4082 { } movieClip 4084 { } movieClip 4085 { frame 50 { stop(); } } movieClip 4087 { } movieClip 4094 { } movieClip 4096 { } movieClip 4100 { } movieClip 4102 { } movieClip 4103 { } movieClip 4106 { } movieClip 4107 { frame 350 { stop(); } } movieClip 4115 { } movieClip 4116 { } movieClip 4117 goo2 { } movieClip 4152 { frame 1 { _parent.swapDepths(900321); _parent.removeMovieClip(); } } movieClip 4153 { frame 17 { _parent.removeMovieClip(); } } movieClip 4186 { frame 16 { _parent.removeMovieClip(); } } movieClip 4221 { frame 17 { _parent.removeMovieClip(); } } movieClip 4222 spellExplosion { frame 1 { stop(); } } movieClip 4223 explosionS { } movieClip 4224 goo3 { } movieClip 4225 goo { } movieClip 4228 goo4 { } movieClip 4230 { } movieClip 4231 lazerbeam { } movieClip 4234 { } movieClip 4235 expp1 { } movieClip 4238 expp2 { } movieClip 4241 expp3 { } movieClip 4244 expp4 { } movieClip 4247 expp5 { } movieClip 4250 expp6 { } movieClip 4253 expp7 { } movieClip 4256 expp8 { } movieClip 4259 exp9 { } movieClip 4262 expp10 { } movieClip 4265 expp11 { } movieClip 4268 expp12 { } movieClip 4271 expp13 { } movieClip 4274 expp14 { } movieClip 4276 { } movieClip 4277 { frame 1 { stop(); } } movieClip 4279 th { } movieClip 4294 { } movieClip 4296 { } movieClip 4299 { } movieClip 4301 { } movieClip 4303 { } movieClip 4304 { } movieClip 4307 { } movieClip 4310 { } movieClip 4311 { } movieClip 4313 { } movieClip 4316 { } movieClip 4317 { frame 151 { gotoAndStop(1); } } movieClip 4319 { } movieClip 4322 bomb1 { } movieClip 4325 bomb2 { } movieClip 4328 { } movieClip 4331 { } movieClip 4339 { } movieClip 4341 goo4s { } movieClip 4343 { } movieClip 4346 { } movieClip 4347 { } movieClip 4348 { frame 1 { stop(); } } movieClip 4350 redX { } // unknown tag 88 length 67 // unknown tag 88 length 62 movieClip 4357 { } movieClip 4361 { } movieClip 4362 { frame 1 { function unlockMedal(m_name) { clearInterval(pop_delay); var v1 = com.Newgrounds.NewgroundsAPI.getMedals(); var v2 = null; for (i in v1) { if (v1[i].medal_name == m_name) { v2 = v1[i]; medal_name = v2.medal_name; medal_value = v2.medal_value + 'pts'; com.Newgrounds.NewgroundsAPI.unlockMedal(medal_name); pop_delay = setInterval(endDelay, 3000); _visible = true; gotoAndPlay(2); break; } } } function endDelay(params) { gotoAndPlay(10); clearInterval(pop_delay); } var pop_delay; var medal_name = '?????'; var medal_value = '???'; _visible = false; } frame 10 { var myBitmapData = flash.display.BitmapData.loadBitmap(medal_name + '.gif'); medal_icon.attachBitmap(myBitmapData, 111); stop(); } } movieClip 4365 { } movieClip 4366 { } movieClip 4381 { } movieClip 4382 { } movieClip 4383 { frame 50 { stop(); } } movieClip 4387 { } movieClip 4388 { } movieClip 4389 { } movieClip 4392 { } movieClip 4393 { } movieClip 4396 { } movieClip 4397 { } movieClip 4400 { } movieClip 4402 { } movieClip 4403 pstuahp { frame 1 { stop(); } } frame 5 { function newHover(movie) { movie.onRollOver = function () { movie._alpha = 10; }; movie.onReleaseOutside = function () { movie._alpha = 0; }; movie.onRollOut = function () { movie._alpha = 0; }; } function __rankz_send__(par1, par2, par3, par4) { par227 = new LoadVars(); par228 = new LoadVars(); par227.flashkey = par2; par227.SU0249 = par1; par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3); par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + 'j%e%a%n%s'); par227.flashkey = (par227.flashkey.split('=')).join(''); par227.SU0249 = (par227.SU0249.split('=')).join(''); par228.onLoad = function (success) { if (success) { trace(par228.msg); } else { trace(par228.loaded); } }; par227.sendAndLoad('http://rankz.armorbot.com/submit/', par228, 'POST'); } function sendScore(GameName, SubmitterName, ScoreVar, Type, DeveloperName, Mode) { if (sentScore != ScoreVar) { sentScore = ScoreVar; GameName = GameName.split(' '); GameName = GameName.join('_'); _root.loadVariables('http://www.casualcollision.com/new_score.php?game=' + GameName + '&name=' + SubmitterName + '&developer=' + DeveloperName + '&mode=' + Mode, 'POST'); getURL('http://www.casualcollision.com/scores.php?game=' + GameName + '&type=' + Type + '&developer=' + DeveloperName + '&mode=' + Mode, '_blank'); } } function onEnterFrame() { var v2 = _xmouse - aim._x; var v1 = _ymouse - aim._y; aim._x += v2 / 2; aim._y += v1 / 2; awardWait(); } scoreMovie.scoretext = score; if (lSize == 0 && achievementAllowed == 1) { } headbar.removeMovieClip(); textHolder.removeMovieClip(); award.gotoAndStop(1); clearInterval(timer); clearInterval(timers); scoreMovie._x = Stage.width / 2; my_sound.stop(); newHover(mg); newHover(ss); newHover(re); newHover(me); if (score > personalHighScore && achievementAllowed == 1) { personalHighScore = score; sObject.data.phs = personalHighScore; sObject.flush(); } else { npb._alpha = 0; } if (level == 1 && achievementAllowed == 1) { giveAward(134); } namer = 'No Name'; Selection.setFocus('namer'); if (onArmor == 0) { __com_mochibot__('9ecfa411', this, 10301, true); } stop(); ss.onRelease = function () { sendScore('Medieval Rampage 2', namer, score, 'ascending', 'xdragonx10', campaign); }; me.onRelease = function () { if (awardqueue.length == 0) { percent = 0; gotoAndStop(3); } }; re.onRelease = function () { Mouse.hide(); if (awardqueue.length == 0) { untouched = 1; achievementAllowed = 1; attackType = 1; lives = 5; expierence = 0; charLevel = 1; mana = 100; manaUps = 0; slot1 = 0; slot2 = 0; slot3 = 0; slot4 = 0; slot5 = 0; slot6 = 0; slot7 = 0; slot8 = 0; slotBow = 0; slotArrow = 0; slotWep = 0; slotSpell = 0; gunAmmo2 = 0; gunAmmo3 = 0; gunAmmo4 = 0; gunAmmo5 = 0; gunAmmo6 = 0; gunAmmo7 = 0; gunAmmo8 = 0; level = 1; kills = 0; score = 0; armorEquip = 1; ownHpPot = 5; ownManaPot = 5; ownBomb1 = 2; ownBomb2 = 0; quiver = 0; arrowUsed = 0; weaponUsed = 0; spellUsed = 0; boughtItem = 0; money = 0; skillLevel = 0; speedLevel = 0; healthLevel = 0; armorLevel = 0; bowEnchant1 = 0; bowEnchant2 = 0; bowEnchant3 = 0; bowEnchant4 = 0; bowEnchant5 = 0; bowEnchant6 = 0; bowEnchant7 = 0; spent = 0; shotCount = 1; leFin = 105; stale = 0; enchantPoints = 0; upgradePoints = 0; continues = 3; enCome = 3; skillq = 0; speedq = 0; armorq = 0; healthq = 0; delayTime = 15; under20 = 1; gotoAndStop(4); } }; mg.onRelease = function () { getURL('http://www.armorgames.com/', '_blank'); }; Key.removeListener(keyListener); gameover = false; gamepause = false; gObject.data.second = seconds; gObject.flush(); gObject.data.minute = minutes; gObject.flush(); gObject.data.hour = hours; gObject.flush(); gObject.data.completed_levels = awardsRecieved; gObject.flush(); gObject.data.meleeKills = meleeKills; gObject.flush(); gObject.data.magicKills = magicKills; gObject.flush(); gObject.data.death = deaths; gObject.flush(); gObject.data.rangeKills = rangeKills; gObject.flush(); gObject.data.kill = kill; gObject.flush(); if (gameWon) { didwin.gotoAndStop(2); gg.gotoAndStop(2); gc.gotoAndStop(2); if (under50 == 1) { giveAward(163); } if (awardsTotal >= 169) { giveAward(170); } if (achievementAllowed == 1) { if (untouched) { } } } else { if (achievementAllowed == 1) { giveAward(129); } gc.gotoAndStop(1); } badges = 0; badgeCounter(groupArray1); badgeCounter(groupArray2); badgeCounter(groupArray3); badgeCounter(groupArray4); badgeCounter(groupArray5); badgeCounter(groupArray6); badgeCounter(groupArray7); badges = 0; sObject.data.kill = kills; sObject.flush(); sObject.data.second = seconds; sObject.flush(); sObject.data.minute = minutes; sObject.flush(); sObject.data.hour = hours; sObject.flush(); _root.gamename = 'Cell Warfare'; } movieClip 4409 { } movieClip 4410 { frame 1 { stop(); } } movieClip 4414 { frame 1 { stop(); } } movieClip 4417 { } movieClip 4419 { } movieClip 4422 { frame 1 { stop(); } } frame 6 { createHover(btm); btm.onRelease = function () { gotoAndStop(3); }; sg.onPress = function () { getURL('http://armorgames.com/guide/Medieval-Rampage-2-Guide', '_blank'); }; sg.onRollOver = function () { sg.gotoAndStop(2); }; sg.onRollOut = function () { sg.gotoAndStop(1); }; nex.onRollOver = function () { nex._alpha = 10; }; nex.onRollOut = function () { nex._alpha = 0; }; bac.onRollOver = function () { bac._alpha = 10; }; bac.onRollOut = function () { bac._alpha = 0; }; nex.onPress = function () { zx.gotoAndStop(2); }; bac.onPress = function () { zx.gotoAndStop(1); }; mbtn.onRollOut = function () { mbtn._alpha = 0; }; mbtn.onReleaseOutside = function () { mbtn._alpha = 0; }; mbtn.onRollOver = function () { mbtn._alpha = 10; }; mbtn.onRelease = function () { gotoAndStop(3); }; } movieClip 4455 { frame 1 { stop(); } } movieClip 4456 { } frame 7 { function hoved(mc, num) { mc.onRollOver = function () { if (overOn == 0) { desc = descros[startNum + num]; } if (mc._alpha <= 15) { mc._alpha = 10; } }; mc.onRollOut = function () { if (mc._alpha <= 15) { mc._alpha = 0; } }; mc.onReleaseOutside = function () { if (mc._alpha <= 15) { mc._alpha = 0; } }; mc.onPress = function () { if (mc._alpha >= 15) { mc._alpha = 10; overOn = 0; } else { notOver(); overOn = 1; mc._alpha = 20; desc = descros[startNum + num]; } }; } function populate() { earned = 0; p1 = awards[startNum]; c1._alpha = 0; if (awardsRecieved[startNum] == 1) { c1._alpha = 100; if (1 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p2 = awards[startNum + 1]; c2._alpha = 0; if (awardsRecieved[startNum + 1] == 1) { c2._alpha = 100; if (2 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p3 = awards[startNum + 2]; c3._alpha = 0; if (awardsRecieved[startNum + 2] == 1) { c3._alpha = 100; if (3 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p4 = awards[startNum + 3]; c4._alpha = 0; if (awardsRecieved[startNum + 3] == 1) { c4._alpha = 100; if (4 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p5 = awards[startNum + 4]; c5._alpha = 0; if (awardsRecieved[startNum + 4] == 1) { c5._alpha = 100; if (5 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p6 = awards[startNum + 5]; c6._alpha = 0; if (awardsRecieved[startNum + 5] == 1) { c6._alpha = 100; if (6 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p7 = awards[startNum + 6]; c7._alpha = 0; if (awardsRecieved[startNum + 6] == 1) { c7._alpha = 100; if (7 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p8 = awards[startNum + 7]; c8._alpha = 0; if (awardsRecieved[startNum + 7] == 1) { c8._alpha = 100; if (8 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p9 = awards[startNum + 8]; c9._alpha = 0; if (awardsRecieved[startNum + 8] == 1) { c9._alpha = 100; if (9 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p10 = awards[startNum + 9]; c10._alpha = 0; if (awardsRecieved[startNum + 9] == 1) { c10._alpha = 100; if (10 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p11 = awards[startNum + 10]; c11._alpha = 0; if (awardsRecieved[startNum + 10] == 1) { c11._alpha = 100; if (11 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p12 = awards[startNum + 11]; c12._alpha = 0; if (awardsRecieved[startNum + 11] == 1) { c12._alpha = 100; if (12 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p13 = awards[startNum + 12]; c13._alpha = 0; if (awardsRecieved[startNum + 12] == 1) { c13._alpha = 100; if (13 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p14 = awards[startNum + 13]; c14._alpha = 0; if (awardsRecieved[startNum + 13] == 1) { c14._alpha = 100; if (14 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p15 = awards[startNum + 14]; c15._alpha = 0; if (awardsRecieved[startNum + 14] == 1) { c15._alpha = 100; if (15 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p16 = awards[startNum + 15]; c16._alpha = 0; if (awardsRecieved[startNum + 15] == 1) { c16._alpha = 100; if (16 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p17 = awards[startNum + 16]; c17._alpha = 0; if (awardsRecieved[startNum + 16] == 1) { c17._alpha = 100; if (17 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p18 = awards[startNum + 17]; c18._alpha = 0; if (awardsRecieved[startNum + 17] == 1) { c18._alpha = 100; if (18 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p19 = awards[startNum + 18]; c19._alpha = 0; if (awardsRecieved[startNum + 18] == 1) { c19._alpha = 100; if (19 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p20 = awards[startNum + 19]; c20._alpha = 0; if (awardsRecieved[startNum + 19] == 1) { c20._alpha = 100; if (20 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p21 = awards[startNum + 20]; c21._alpha = 0; if (awardsRecieved[startNum + 20] == 1) { c21._alpha = 100; if (21 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p22 = awards[startNum + 21]; c22._alpha = 0; if (awardsRecieved[startNum + 21] == 1) { c22._alpha = 100; if (22 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p23 = awards[startNum + 22]; c23._alpha = 0; if (awardsRecieved[startNum + 22] == 1) { c23._alpha = 100; if (23 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p24 = awards[startNum + 23]; c24._alpha = 0; if (awardsRecieved[startNum + 23] == 1) { c24._alpha = 100; if (24 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p25 = awards[startNum + 24]; c25._alpha = 0; if (awardsRecieved[startNum + 24] == 1) { c25._alpha = 100; if (25 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p26 = awards[startNum + 25]; c26._alpha = 0; if (awardsRecieved[startNum + 25] == 1) { c26._alpha = 100; if (26 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p27 = awards[startNum + 26]; c27._alpha = 0; if (awardsRecieved[startNum + 26] == 1) { c27._alpha = 100; if (27 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p28 = awards[startNum + 27]; c28._alpha = 0; if (awardsRecieved[startNum + 27] == 1) { c28._alpha = 100; if (28 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p29 = awards[startNum + 28]; c29._alpha = 0; if (awardsRecieved[startNum + 28] == 1) { c29._alpha = 100; if (29 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p30 = awards[startNum + 29]; c30._alpha = 0; if (awardsRecieved[startNum + 29] == 1) { c30._alpha = 100; if (30 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p31 = awards[startNum + 30]; c31._alpha = 0; if (awardsRecieved[startNum + 30] == 1) { c31._alpha = 100; if (31 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p32 = awards[startNum + 31]; c32._alpha = 0; if (awardsRecieved[startNum + 31] == 1) { c32._alpha = 100; if (32 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p33 = awards[startNum + 32]; c33._alpha = 0; if (awardsRecieved[startNum + 32] == 1) { c33._alpha = 100; if (33 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p34 = awards[startNum + 33]; c34._alpha = 0; if (awardsRecieved[startNum + 33] == 1) { c34._alpha = 100; if (34 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p35 = awards[startNum + 34]; c35._alpha = 0; if (awardsRecieved[startNum + 34] == 1) { c35._alpha = 100; if (35 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } p36 = awards[startNum + 35]; c36._alpha = 0; if (awardsRecieved[startNum + 35] == 1) { c36._alpha = 100; if (36 <= amountOfAchievements[screenFrame - 1]) { earned += 1; } } ff3.gotoAndStop(Math.floor(earned / amountOfAchievements[screenFrame - 1] / 0.25) + 1); i = 35; while (i >= 0) { if (i >= amountOfAchievements[screenFrame - 1]) { movieClips2[i]._alpha = 0; _root[movieClips[i]] = ' '; } --i; } } descros = new Array('Kill 100 Enemies', 'Kill 300 Enemies', 'Kill 1000 Enemies', 'Kill 3000 Enemies', 'Play for 5 Minutes', 'Play for 15 Minutes', 'Play for 60 Minutes', 'Play for 120 Minutes', 'Kill 50 Enemies in Survival', 'Kill 100 Enemies in Survival', 'Kill 150 Enemies in Survival', 'Kill 200 Enemies in Survival', 'Buy Light Arrows', 'Buy Heavy Arrows', 'Buy Fire Arrows', 'Buy Ice Arrows', 'Buy Electric Arrows', 'Buy Acid Arrows', 'Buy Poision Arrows', 'Buy a Long Bow', 'Buy a Composite Bow', 'Buy a Cross Bow', 'Buy a Compound Bow', 'Buy a Cross Bow +', 'Buy a Compound Bow +', 'Buy a Dagger', 'Buy a Dagger+', 'Buy a Dagger++', 'Buy a Maul', 'Buy a Hammer', 'Buy a Axe', 'Buy a Long Sword', 'Buy a Dark Axe', 'Buy Level 1 Armor', 'Buy Level 2 Armor', 'Buy Level 3 Armor', 'Buy Level 4 Armor', 'Buy Level 5 Armor', 'Buy a Health Potion', 'Buy a Mana Potion', 'Buy a Timed Bomb', 'Buy a Motion Bomb', 'Buy Fire Ball', 'Buy Comet', 'Buy Ice Blast', 'Buy Star Dash', 'Buy Striker', 'Score 300 in a game', 'Score 1000 in a game', 'Score 4000 in a game', 'Score 10000 in a game', 'Fully Upgrade Skill', 'Fully Upgrade Armor', 'Fully Upgrade Health', 'Fully Upgrade Speed', 'Fully Enchant a ShortBow', 'Fully Enchant a LongBow', 'Fully Enchant a CompositeBow', 'Fully Enchant a CrossBow', 'Fully Enchant a CompoundBow', 'Fully Enchant a CrossBow+', 'Fully Enchant a CompoundBow+', 'Unlocked Cheat 1', 'Unlocked Cheat 2', 'Unlocked Cheat 3', 'Unlocked Cheat 4', 'Unlocked Cheat 5', 'Unlocked Cheat 6', 'Unlocked Cheat 7', 'Unlocked Cheat 8', 'Unlocked Cheat 9', 'Play Again', 'Play Three Times', 'Play Four Times', 'Play Five Times', 'Long Bow Drop', 'Composite Bow Drop', 'Cross Bow Drop', 'Compound Bow Drop', 'Cross Bow Drop +', 'Compound Bow Drop +', 'Defeated Vandoru', 'Defeated Korthag', 'Defeated Shocknor', 'Defeated Azgorg', 'Defeated Kagoru', 'Kill a Kordul', 'Kill a Sathir', 'Kill a Ortug', 'Kill a Atugor', 'Kill a Dronder', 'Kill a Tungurd', 'Kill a Cazgur', 'Kill a Uroth', 'Kill a Fazgor', 'Kill a Farodun', 'Kill a Tree Monster', 'Kill a Were Wolf', 'Kill a Skeleton Warrior', 'Kill a Skeleton Archer', 'Kill a Ice Warrior', 'Kill a Ice Monster', 'Kill a Rock Monster', 'Kill a Volcano Monster', 'Kill a Snake Archer', 'Kill a Snaker Warrior', 'Spend 101 Gold', 'Spend 1000 Gold', 'Spend 3000 Gold', 'Spend 10000 Gold', 'Collect Light Arrows', 'Collect Heavy Arrows', 'Collect Fire Arrows', 'Collect Ice Arrows', 'Collect Electric Arrows', 'Collect Acid Arrows', 'Collect Poision Arrows', 'Pause The Game', 'Walk to the edge of the map', 'Don\'t move for 10 seconds', 'Don\'t shoot for 20 seconds', 'Walk on Goo', 'Walk on Acid', 'Sell an Arrow', 'Enter the Shop', 'Sell a weapon', 'Kill 2 Enemies with a bomb', 'Sell a bow', 'Die', 'Use a Health Potion', 'Use a Mana Potion', 'Use a Timed Bomb', 'Use a Motion Bomb', 'Kill yourself on the first level', 'Collect All Money for a level', 'Buy 1000 Arrows', 'Sell a spell', 'Get hit by teleportation arrow', 'Walk over the tree monster while it\'s underground', 'Get Blinded with the volcano monster\'s blinding beam', 'Get hit with a freezing arrow', 'Complete a level with 100% accuracy', 'Mute the game', 'Visit Armorgames.com', 'Make a level', 'Visit Credits', 'Go to the bestiary', 'Start the game', '100 Kills with Range', '250 Kills with Range', '500 Kills with Range', '1000 Kills with Range', '100 Kills with Melee', '250 Kills with Melee', '500 Kills with Melee', '1000 Kills with Melee', '100 Kills with Magic', '250 Kills with Magic', '500 Kills with Magic', '1000 Kills with Magic', 'Spend 500,000 gold', 'Play through 5 levels without being hit once', 'Complete all levels with under 50% HP', 'Die from the last boss while he has less than 5% of his health left', '10,000 Kills', 'Play for 5 hours', 'Obtain platinum medals in all other categories', '300 kills in survival', 'Completed every other achievement except for the one below', 'Beat the game again for fun :) - Oh, and congratulations on wasting over 5 hours of your life!'); createHover(btm); desc = 'Select an achievement'; startNum = 0; achievementNames = new Array('Slayer', 'Time Waster', 'Surviver', 'Shopper', 'Point Addict', 'Skiller', 'Enchanter', 'Cheater', 'Repeat Player', 'Bow Collector', 'Boss Killer', 'Monster Killer', 'Spender', 'Arrow Collector', 'Random', 'Archer', 'Warrior', 'Mage', 'Impossible'); Objectives = new Array('Kill 3000 Enemies', 'Play the game for two hours', 'Kill 300 enemies in survival', 'Purchase Every Item', 'Score 10,000 in a game', 'Upgrade all your skills to max', 'Fully Enchant all your bows', 'Collect every bow', 'Collect every arrow', 'Unlock all the cheats', 'Play the game 5 different times', 'Kill all the bosses', 'Kill all the enemies', 'Complete these random tasks', 'Spend 10,000 gold', 'Kill 1000 enemies with Range', 'Kill 1000 enemies with Melee', 'Kill 1000 enemies with Magic', 'Complete these near impossible tasks'); amountOfAchievements = new Array(4, 4, 4, 35, 4, 4, 7, 9, 4, 6, 5, 20, 4, 7, 31, 4, 4, 4, 10, 10); startNumbers = new Array(); screenFrame = 1; if (tka == 0) { movieClips = new Array(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36); tka = 1; } movieClips2 = new Array(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36); populate(); hoved(z1, 0); hoved(z2, 1); hoved(z3, 2); hoved(z4, 3); hoved(z5, 4); hoved(z6, 5); hoved(z7, 6); hoved(z8, 7); hoved(z9, 8); hoved(z10, 9); hoved(z11, 10); hoved(z12, 11); hoved(z13, 12); hoved(z14, 13); hoved(z15, 14); hoved(z16, 15); hoved(z17, 16); hoved(z18, 17); hoved(z19, 18); hoved(z20, 19); hoved(z21, 20); hoved(z22, 21); hoved(z23, 22); hoved(z24, 23); hoved(z25, 24); hoved(z26, 25); hoved(z27, 26); hoved(z28, 27); hoved(z29, 28); hoved(z30, 29); hoved(z31, 30); hoved(z32, 31); hoved(z33, 32); hoved(z34, 33); hoved(z35, 34); hoved(z36, 35); overOn = 0; notOver = function () { z1._alpha = 0; z2._alpha = 0; z3._alpha = 0; z4._alpha = 0; z5._alpha = 0; z6._alpha = 0; z7._alpha = 0; z8._alpha = 0; z9._alpha = 0; z10._alpha = 0; z11._alpha = 0; z12._alpha = 0; z13._alpha = 0; z14._alpha = 0; z15._alpha = 0; z16._alpha = 0; z17._alpha = 0; z18._alpha = 0; z19._alpha = 0; z20._alpha = 0; z21._alpha = 0; z22._alpha = 0; z23._alpha = 0; z24._alpha = 0; z25._alpha = 0; z26._alpha = 0; z27._alpha = 0; z28._alpha = 0; z29._alpha = 0; z30._alpha = 0; z31._alpha = 0; z32._alpha = 0; z33._alpha = 0; z34._alpha = 0; z35._alpha = 0; z36._alpha = 0; }; earned = 0; nexta.onPress = function () { screenFrame += 1; startNum += amountOfAchievements[screenFrame - 2]; if (startNum >= 165) { startNum = 0; screenFrame = 1; } overOn = 0; notOver(); populate(); ff1.gotoAndStop(screenFrame); ff2.gotoAndStop(screenFrame); }; back.onPress = function () { startNum -= amountOfAchievements[screenFrame - 2]; screenFrame -= 1; if (screenFrame <= 0) { screenFrame = 20; startNum = 160; } overOn = 0; notOver(); populate(); ff1.gotoAndStop(screenFrame); ff2.gotoAndStop(screenFrame); }; btm.onRelease = function () { gotoAndStop(3); }; mbtn.onRollOut = function () { mbtn._alpha = 0; }; mbtn.onReleaseOutside = function () { mbtn._alpha = 0; }; mbtn.onRollOver = function () { mbtn._alpha = 10; }; mbtn.onRelease = function () { gotoAndStop(3); }; nexta.onRollOver = function () { nexta._alpha = 20; }; nexta.onRollOut = function () { nexta._alpha = 0; }; nexta.onReleaseOutside = function () { nexta._alpha = 0; }; back.onRollOver = function () { back._alpha = 20; }; back.onRollOut = function () { back._alpha = 0; }; back.onReleaseOutside = function () { back._alpha = 0; }; oldBadges = 0; hText = hours; mText = minutes; sText = seconds; killos = kills; } movieClip 4460 { } movieClip 4483 { } movieClip 4525 { frame 1 { stop(); } } movieClip 4545 { frame 1 { stop(); } } movieClip 4551 { frame 1 { stop(); } } movieClip 4552 { } movieClip 4553 { } frame 8 { function hoverEffect(movie, number) { number += 1; movie.onRollOut = function () { if (isSelect != number) { movie._alpha = 0; } }; movie.onReleaseOutside = function () { movie._alpha = 0; }; movie.onRollOver = function () { if (isSelect != number) { movie._alpha = 10; } if (isSelect == 0) { choice.gotoAndStop(number); desc = descriptions[number - 1]; nm = names[number - 1]; } }; movie.onPress = function () { if (isSelect == number) { isSelect = 0; } else { vanish(); isSelect = number; movie._alpha = 20; choice.gotoAndStop(number); desc = descriptions[number - 1]; nm = names[number - 1]; } }; } function vanish() { b1._alpha = 0; b2._alpha = 0; b3._alpha = 0; b4._alpha = 0; b5._alpha = 0; b6._alpha = 0; b7._alpha = 0; b8._alpha = 0; b9._alpha = 0; b10._alpha = 0; b11._alpha = 0; b12._alpha = 0; b13._alpha = 0; b14._alpha = 0; b15._alpha = 0; b16._alpha = 0; b17._alpha = 0; b18._alpha = 0; b19._alpha = 0; b20._alpha = 0; b21._alpha = 0; b22._alpha = 0; b23._alpha = 0; b24._alpha = 0; b25._alpha = 0; } desc3 = 'Abilities: None \nHealth: 1'; desc16 = 'Abilities: Gooey Drop, Underground \nHealth: 2'; desc2 = 'Abilities: Runs Fast, Magic Attack \nHealth: 3'; desc15 = 'Abilities: Arrow Deflection, Solid Drop \nHealth: 4'; desc1 = 'Abilities: Drops Blinding Substance \nHealth: 5'; desc11 = 'Abilities: Row Shots, Stays back \nHealth: 6'; desc10 = 'Abilities: Magic Attack, Stays Back \nHealth: 8'; desc12 = 'Abilities: Teleportation Arrow \nHealth: 10'; desc8 = 'Abilities: Damaging Substance, Deflects \nHealth: 12'; desc19 = 'Abilities: Charge, Summon \nHealth: 14'; desc9 = 'Abilities: Teleportation, Splits into little monsters \nHealth: 16'; desc20 = 'Abilities: Splits into little monsters \nHealth: 18'; desc7 = 'Abilities: Magic Attack, Stay Back, Gooey Drop \nHealth: 21'; desc17 = 'Abilities: Exploads on death \nHealth: 24'; desc6 = 'Abilities: Magic Attack, Teleportation \nHealth: 27'; desc18 = 'Abilities: Splits into little monsters, Blinding Beam \nHealth: 30'; desc5 = 'Abilities: Barrier Drops, Charge \nHealth: 34'; desc13 = 'Abilities: Freezing Arrow, Teleportation \nHealth: 38'; desc4 = 'Abilities: Summoning, Stays Back, Magic Attack \nHealth: 42'; desc14 = 'Abilities: Magic Attack, Damaging Drop, Summoning \nHealth: 50'; desc21 = 'Abilities: Spell Launch, Charges Fast \nHealth: 300'; desc22 = 'Abilities: Red X, Teleportation \nHealth: 800'; desc23 = 'Abilities: Stays Back, Row Shots, Dodges Attacks \nHealth: 1300'; desc24 = 'Abilities: Arrow Deflection, Charges, Triple Spell \nHealth: 2000'; desc25 = 'Abilities: Spell Launch, Stays Back, Teleportation, Row Shots (Triple), Dodges Attacks \nHealth: 3000'; visitedBesti = 1; descriptions = new Array(desc3, desc2, desc1, desc10, desc8, desc9, desc7, desc6, desc5, desc4, desc25, desc23, desc21, desc24, desc22, desc13, desc14, desc20, desc19, desc12, desc11, desc17, desc18, desc15, desc16); names = new Array('Ortug', 'Sathir', 'Kordul', 'Farodun', 'Uroth', 'Fazgor', 'Cazgur', 'Tungurd', 'Dronder', 'Atugor', 'Vandoru', 'Korthag', 'Shocknor', 'Azgorg', 'Kagoru', 'Skeleton Warrior', 'Skeleton Archer', 'Snake Archer', 'Snake Warrior', 'Werewolf', 'Tree Monster', 'Rock Monster', 'Lava Monster', 'Ice Warrior', 'Ice Monster'); desc = 'Click on an enemy or a boss'; nm = 'Name'; mbtn.onRollOut = function () { mbtn._alpha = 0; }; mbtn.onReleaseOutside = function () { mbtn._alpha = 0; }; mbtn.onRollOver = function () { mbtn._alpha = 10; }; mbtn.onRelease = function () { gotoAndStop(3); }; isSelect = 0; buttoners = new Array(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25); i = buttoners.length - 1; while (i >= 0) { hoverEffect(buttoners[i], i); --i; } } movieClip 4565 { } movieClip 4568 { } movieClip 4569 { } movieClip 4574 { } movieClip 4577 { } movieClip 4578 { } movieClip 4582 { } movieClip 4586 { } movieClip 4590 { } movieClip 4594 { } movieClip 4598 { } movieClip 4602 { } movieClip 4606 { } movieClip 4610 { } movieClip 4614 { } movieClip 4618 { } movieClip 4622 { } movieClip 4626 { } movieClip 4630 { } movieClip 4634 { } movieClip 4638 { } movieClip 4642 { } movieClip 4646 { } movieClip 4650 { } movieClip 4654 { } movieClip 4658 { } movieClip 4662 { } movieClip 4666 { } movieClip 4670 { } movieClip 4674 { } movieClip 4678 { } movieClip 4679 { } movieClip 4682 { } movieClip 4685 { } movieClip 4686 { } movieClip 4689 { } movieClip 4692 { } movieClip 4693 { } movieClip 4696 { } movieClip 4699 { } movieClip 4700 { } movieClip 4703 { } movieClip 4706 { } movieClip 4707 { } movieClip 4710 { } movieClip 4713 { } movieClip 4714 { } movieClip 4717 { } movieClip 4720 { } movieClip 4721 { } movieClip 4724 { } movieClip 4727 { } movieClip 4728 { } movieClip 4731 { } movieClip 4734 { } movieClip 4735 { } movieClip 4738 { } movieClip 4741 { } movieClip 4742 { } movieClip 4745 { } movieClip 4748 { } movieClip 4749 { } movieClip 4752 { } movieClip 4755 { } movieClip 4756 { } movieClip 4759 { } movieClip 4762 { } movieClip 4763 { } movieClip 4766 { } movieClip 4769 { } movieClip 4770 { } movieClip 4773 { } movieClip 4776 { } movieClip 4777 { } movieClip 4780 { } movieClip 4783 { } movieClip 4784 { } movieClip 4787 { } movieClip 4790 { } movieClip 4791 { } movieClip 4794 { } movieClip 4797 { } movieClip 4798 { } movieClip 4801 { } movieClip 4804 { } movieClip 4805 { } movieClip 4808 { } movieClip 4811 { } movieClip 4812 { } movieClip 4815 { } movieClip 4818 { } movieClip 4819 { } movieClip 4822 { } movieClip 4825 { } movieClip 4826 { } movieClip 4829 { } movieClip 4832 { } movieClip 4833 { } movieClip 4836 { } movieClip 4839 { } movieClip 4840 { } movieClip 4843 { } movieClip 4846 { } movieClip 4847 { } movieClip 4851 { } movieClip 4852 { frame 1 { stop(); } } movieClip 4853 { } frame 9 { ap.onPress = function () { g; }; arm.onPress = function () { getURL('http://www.armorgames.com/', '_blank'); }; visitedCreds = 1; nt.onPress = function () {}; mbtna.onRollOut = function () { mbtna._alpha = 0; }; mbtna.onReleaseOutside = function () { mbtna._alpha = 0; }; mbtna.onRollOver = function () { mbtna._alpha = 10; }; mbtna.onRelease = function () { gotoAndStop(3); }; } movieClip 4861 { } movieClip 4863 { } movieClip 4872 { } frame 10 { function createString() { temp = String(bgers) + '|'; i = itemers.length - 1; while (i >= 0) { temp = temp + itemers[i] + '|' + xValers[i] + '|' + yValers[i] + '|' + sizered[i] + '|' + flipped[i] + '|' + rotationers[i] + '|'; --i; } trace(temp); return temp; } function onEnterFrame() { if (holding != null) { holding._x = Math.floor(aim._x); holding._y = Math.floor(aim._y); } if (startDragStage == 1) { oldBGx = bg._x; oldBGy = bg._y; bg._x += Math.floor(Math.floor(aim._x) - oldX); bg._y += Math.floor(Math.floor(aim._y) - oldY); if (bg._x > 0) { bg._x = 0; } if (bg._y > 0) { bg._y = 0; } if (bg._x < -320) { bg._x = -320; } if (bg._y < -240) { bg._y = -240; } i = objecters.length - 1; while (i >= 0) { objecters[i]._x += bg._x - oldBGx; objecters[i]._y += bg._y - oldBGy; --i; } } oldX = Math.floor(aim._x); oldY = Math.floor(aim._y); aa.t.onRelease = function () { if (aa._currentframe == 1) { aa.gotoAndPlay(2); } if (aa._currentframe <= 30) { aa.gotoAndPlay(30 + (30 - aa._currentframe)); } if (aa._currentframe > 30 && holding == null) { aa.gotoAndPlay(31 - (aa._currentframe - 30)); } }; qe.t.onRelease = function () { if (qe._currentframe == 1) { qe.gotoAndPlay(2); } if (qe._currentframe <= 30) { qe.gotoAndPlay(30 + (30 - qe._currentframe)); } if (qe._currentframe > 30 && holding == null) { qe.gotoAndPlay(31 - (qe._currentframe - 30)); } }; var v2 = _xmouse - aim._x; var v1 = _ymouse - aim._y; aim._x += v2 / 2; aim._y += v1 / 2; } function readLevel(levelString) { lSize = -1; bgn = Number(levelString.substr(0, 1)); place = levelString.indexOf('|'); place2 = levelString.indexOf('|', place + 1); while (place2 != -1) { fake = Number(levelString.substr(place + 1, place2 - place - 1)); itemers2.push(fake); place = place2; place2 = levelString.indexOf('|', place + 1); fake = Number(levelString.substr(place + 1, place2 - place - 1)); xValers2.push(fake); place = place2; place2 = levelString.indexOf('|', place + 1); fake = Number(levelString.substr(place + 1, place2 - place - 1)); yValers2.push(fake); place = place2; place2 = levelString.indexOf('|', place + 1); fake = Number(levelString.substr(place + 1, place2 - place - 1)); sizered2.push(fake); place = place2; place2 = levelString.indexOf('|', place + 1); fake = Number(levelString.substr(place + 1, place2 - place - 1)); flipped2.push(fake); place = place2; place2 = levelString.indexOf('|', place + 1); fake = Number(levelString.substr(place + 1, place2 - place - 1)); rotationers2.push(fake); place = place2; place2 = levelString.indexOf('|', place + 1); } btpt.removeMovieClip(); box.removeMovieClip(); aa.removeMovieClip(); ra.removeMovieClip(); la.removeMovieClip(); qe.removeMovieClip(); del.removeMovieClip(); gc.removeMovieClip(); bb.removeMovieClip(); i = itemers.length - 1; while (i >= 0) { objecters[i].removeMovieClip(); trace(objecters[i]); objecters.splice(i, 1); itemers.splice(i, 1); rotationers.splice(i, 1); xValers.splice(i, 1); yValers.splice(i, 1); sizered.splice(i, 1); flipped.splice(i, 1); --i; } enemiesLeft = 100000; gotoAndStop(4); } leFrame = 0; depth = 5; aa.swapDepths(300006); ra.swapDepths(310016); la.swapDepths(310026); qe.swapDepths(300036); box.swapDepths(300043); del.swapDepths(301040); gc.swapDepths(301440); bb.swapDepths(301552); if (onArmor == 0) { __com_mochibot__('ed6a6037', this, 10301, true); } objecters = new Array(); bb.onRelease = function () { btpt.removeMovieClip(); box.removeMovieClip(); aa.removeMovieClip(); ra.removeMovieClip(); la.removeMovieClip(); qe.removeMovieClip(); del.removeMovieClip(); gc.removeMovieClip(); bb.removeMovieClip(); i = itemers.length - 1; while (i >= 0) { objecters[i].removeMovieClip(); trace(objecters[i]); objecters.splice(i, 1); itemers.splice(i, 1); rotationers.splice(i, 1); xValers.splice(i, 1); yValers.splice(i, 1); sizered.splice(i, 1); flipped.splice(i, 1); --i; } gotoAndStop(3); }; bb.onRollOver = function () { bb.gotoAndStop(2); }; bb.onRollOut = function () { bb.gotoAndStop(1); }; ra.onRelease = function () { if (aa.ba.ca._currentframe == 3) { aa.ba.ca.gotoAndStop(1); } else { aa.ba.ca.gotoAndStop(aa.ba.ca._currentframe + 1); } leFrame = aa.ba.ca._currentframe - 1; }; la.onRelease = function () { if (aa.ba.ca._currentframe == 1) { aa.ba.ca.gotoAndStop(3); } else { aa.ba.ca.gotoAndStop(aa.ba.ca._currentframe - 1); } leFrame = aa.ba.ca._currentframe - 1; }; qe.qq1.onRelease = function () { bg.gotoAndStop(1); bgers = 1; }; qe.qq2.onRelease = function () { bg.gotoAndStop(2); bgers = 2; }; qe.qq3.onRelease = function () { bg.gotoAndStop(3); bgers = 3; }; qe.qq4.onRelease = function () { bg.gotoAndStop(4); bgers = 4; }; qe.qq5.onRelease = function () { bg.gotoAndStop(5); bgers = 5; }; itemList = new Array('item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7', 'item8', 'item9', 'item10', 'item11', 'item12', 'item13', 'item14', 'item15', 'item16', 'item17', 'item18', 'item19', 'item20', 'item21', 'item22', 'item23', 'item24', 'item25', 'item26', 'item27', 'item28', 'item29', 'item30', 'item31', 'item32', 'item33', 'item34'); picked = 0; holding = null; aa.r1.onPress = function () { picked = leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r2.onPress = function () { picked = 1 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r3.onPress = function () { picked = 2 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r4.onPress = function () { picked = 3 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r5.onPress = function () { picked = 4 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r6.onPress = function () { picked = 5 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r7.onPress = function () { picked = 6 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r8.onPress = function () { picked = 7 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r9.onPress = function () { picked = 8 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r10.onPress = function () { picked = 9 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r11.onPress = function () { picked = 10 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } holding._alpha = 50; }; aa.r12.onPress = function () { picked = 11 + leFrame * 12; it = attachMovie(itemList[picked], itemList[picked] + depth, depth); ++depth; holding = it; v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } iSelected = holding; holding._alpha = 50; }; pressed(); bgers = 1; itemers = new Array(); rotationers = new Array(); xValers = new Array(); yValers = new Array(); sizered = new Array(); flipped = new Array(); startDragStage = 0; namedItems = new Array('Small Lava', 'Large Lava', 'Small Rock', 'Large Rock', 'Modern Shop', 'Castle Walls', 'Castle', 'Long Barracade', 'Short Barracade', 'Small Enemy Base', 'Large Enemy Base', 'Red Orb', 'Old Log', 'Mossy Log', 'Tree', 'Jungle Shop', 'Large Pit', 'Green Orb', 'Small Cactus', 'Large Cactus', 'Small Bone', 'Large Bone', 'Orange Orb', 'Small Pit', 'Dark Orb', 'Ice Rock 1', 'Ice Rock 2', 'Ice Rock 3', 'Ice Rock 4', 'Ice Orb', 'Ice Rock 5', 'Ice Rock 6', 'Ice Rock 7', 'Ice Rock 8'); iSelected = null; hTemp = null; onMouseDown = function () { createString(); dontPut = 0; startDragStage = 1; i = objecters.length - 1; while (i >= 0) { if (iSelected == objecters[i] && objecters[i].aa.hitTest(_xmouse, _ymouse, true)) { dontPut = 1; holding = objecters[i]; holding._alpha = 50; objecters.splice(i, 1); picked = itemers[i]; itemers.splice(i, 1); rotationers.splice(i, 1); xValers.splice(i, 1); yValers.splice(i, 1); sizered.splice(i, 1); flipped.splice(i, 1); startDragStage = 0; } else { if (holding != null && objecters[i].hitTest(holding)) { startDragStage = 0; } else { if (holding == null && objecters[i].aa.hitTest(_xmouse, _ymouse, true)) { v = objecters.length - 1; while (v >= 0) { objecters[v]._alpha = 100; --v; } objecters[i]._alpha = 50; iSelected = objecters[i]; dontPut = 1; startDragStage = 0; box.rotTxt = rotationers[i]; box.fliTxt = flipped[i]; box.sizTxt = sizered[i]; box.xTxt = xValers[i]; box.yTxt = yValers[i]; box.objTxt = namedItems[itemers[i]]; holding._alpha = 100; } } } --i; } if (holding != null && dontPut == 0) { objecters.push(holding); itemers.push(picked); xValers.push(Math.floor(holding._x - bg._x)); yValers.push(Math.floor(holding._y - bg._y)); sizered.push(holding._yscale); if (holding._xscale >= 0) { flipped.push(0); } else { flipped.push(1); } rotationers.push(holding._rotation); box.rotTxt = 0; box.fliTxt = 0; box.sizeTxt = 100; box.xTxt = holding._x - bg._x; box.yTxt = holding._y - bg._y; box.objTxt = namedItems[picked]; holding._alpha = 100; holding = null; iSelected = null; startDragStage = 0; } if (_ymouse >= 453 || btpt._x <= 550) { startDragStage = 0; } }; visitedLevel = 1; onMouseUp = function () { startDragStage = 0; }; oldX = 0; oldY = 0; oldBGx = 0; oldBGy = 0; box.fbtn.onRollOver = function () { box.fbtn.gotoAndStop(2); }; box.fbtn.onRollOut = function () { box.fbtn.gotoAndStop(1); }; found = 0; box.fbtn.onPress = function () { held = 0; found = 0; i = objecters.length - 1; while (i >= 0) { if (objecters[i] == iSelected) { found = 1; objecters.splice(i, 1); held = itemers[i]; itemers.splice(i, 1); rotationers.splice(i, 1); xValers.splice(i, 1); yValers.splice(i, 1); sizered.splice(i, 1); flipped.splice(i, 1); } --i; } if (found == 1) { iSelected._x = Number(box.xTxt) + bg._x; iSelected._y = Number(box.yTxt) + bg._y; iSelected._rotation = Number(box.rotTxt); iSelected._yscale = Number(box.sizTxt); iSelected._xscale = iSelected._yscale; if (Number(box.fliTxt) == 1) { iSelected._xscale *= -1; } objecters.push(iSelected); trace(held); itemers.push(held); xValers.push(Math.floor(iSelected._x - bg._x)); yValers.push(Math.floor(iSelected._y - bg._y)); sizered.push(iSelected._yscale); flipped.push(Number(box.fliTxt)); rotationers.push(iSelected._rotation); } }; del.onRollOver = function () { del.gotoAndStop(2); }; del.onRollOut = function () { del.gotoAndStop(1); }; del.onRelease = function () { i = objecters.length - 1; while (i >= 0) { if (objecters[i] == iSelected) { objecters[i].removeMovieClip(); objecters.splice(i, 1); itemers.splice(i, 1); rotationers.splice(i, 1); xValers.splice(i, 1); yValers.splice(i, 1); sizered.splice(i, 1); flipped.splice(i, 1); } --i; } }; gc.onRollOver = function () { gc.gotoAndStop(2); }; gc.onRollOut = function () { gc.gotoAndStop(1); }; gc.onRelease = function () { btpt._x = Stage.width / 2; btpt._y = Stage.height / 2; btpt.textor = createString(); }; btpt.swapDepths(852321); btpt.pyl.onRollOver = function () { btpt.pyl.gotoAndStop(2); }; btpt.pyl.onRollOut = function () { btpt.pyl.gotoAndStop(1); }; btpt.pyl.onRelease = function () { readLevel(btpt.textor); }; btpt.cs.onRollOver = function () { btpt.cs.gotoAndStop(2); }; btpt.cs.onRollOut = function () { btpt.cs.gotoAndStop(1); }; btpt.cs.onRelease = function () { btpt._x = 10000; }; bgn = 0; itemers2 = new Array(); rotationers2 = new Array(); xValers2 = new Array(); yValers2 = new Array(); sizered2 = new Array(); flipped2 = new Array(); hello = '3|21|12|433|231|100|1|22|13|434|232|101|0|'; } movieClip 4875 { frame 1 { stop(); } } movieClip 4877 item1 { } movieClip 4879 item2 { } movieClip 4880 item3 { } movieClip 4882 item4 { } movieClip 4884 item5 { } movieClip 4885 item6 { } movieClip 4886 item7 { } movieClip 4888 item8 { } movieClip 4890 item9 { } movieClip 4892 item10 { } movieClip 4894 item11 { } movieClip 4897 { } movieClip 4898 item12 { } movieClip 4901 { } movieClip 4902 item13 { } movieClip 4903 item14 { } movieClip 4904 item15 { } movieClip 4906 item16 { } movieClip 4907 item17 { } movieClip 4910 { } movieClip 4911 item18 { } movieClip 4912 item19 { } movieClip 4913 item20 { } movieClip 4915 item21 { } movieClip 4916 item22 { } movieClip 4919 { } movieClip 4920 item23 { } movieClip 4921 item24 { } movieClip 4922 item25 { } movieClip 4923 item26 { } movieClip 4924 item27 { } movieClip 4925 item28 { } movieClip 4926 item29 { } movieClip 4929 { } movieClip 4930 item30 { } movieClip 4931 item31 { } movieClip 4932 item32 { } movieClip 4933 item33 { } movieClip 4934 item34 { } movieClip 4951 { frame 1 { stop(); } } movieClip 4952 { } movieClip 4955 { frame 1 { stop(); } } movieClip 4958 { frame 1 { stop(); } } movieClip 4961 { frame 1 { stop(); } } movieClip 4964 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 4966 { } movieClip 4968 { } movieClip 4972 { frame 1 { stop(); } } movieClip 4975 { frame 1 { stop(); } } movieClip 4978 { }




http://swfchan.com/43/215000/info.shtml
Created: 16/11 -2018 21:35:44 Last modified: 16/11 -2018 21:35:44 Server time: 28/04 -2024 20:46:20