diff --git a/.ssh/id_rsa.pub b/.ssh/id_rsa.pub new file mode 100644 index 0000000..fae7f9d --- /dev/null +++ b/.ssh/id_rsa.pub @@ -0,0 +1,60 @@ +$ cat ~/.ssh/id_rsa.pub +ssh-rsa mQINBFVZHXABEADBoC42CK+DjG37Gu9JSyZrFaCmN/KqOJTAEXKj1aX+uRdtvXHt +bNRXHEo7Vh+goZEJRnj6NGsyysThVUCRvVJs2Sjw6s4SivMA/sHisXsyUzqqQKW2 +uqiwenFzmC/JZVOumPiJvSuoiC/LOCjcLc1gVju48Eew9yTiSy6Js2sQVfajIQT8 +d+9GuJYOuVXqilL83a+X3abE0r8idDW3aJlyTV1Y7IJA0dwiZmlfyHhqr0ESRWcR +e7wF+Kr9Bz4A4sATa1P102tsT1QvdKoxG9H78ElGJCOlodMGVg5J1ECLzyk/vP9P +e37H9S8zFTpSe8+fU1qgFs0rUDWTRwDRkmJ+CQOD/bBx5qoJQ4FP0SacAOWsr7kn +Wy6gTc9fKDJB2oo1DUQK2VbOyM2thg9QX4fB46U9K8W1NFkqjgymBgdJ4oB2ZcM8 +rTv9BtNEK1jht2zmi6jDPmarKR+prJAzEUCH8xZ4TI1U4OHZNRqHCafHtKNV9E7D +vluJvRKQF2UL6I+g3dKwxWMGNb9N2M0ssbH9aacNQ/KKLSmMCf5RHffJJAGKXu6t +xehgcoUAdbD0z4zeZQsMDVyWg/AcYsdOJDFkjo3fMrt/8q3r899NDMBfaY/6OClc +iQlNP7QLQkPFLLB14909m/KZFxgTQqNPPGw/r2ADeLFeIAxy2k7lU4YmHwARAQAB +tA5GYWNlYm9vaywgSW5jLokCPQQTAQoAJwUCVVkdcAIbAwUJBaR2xgULCQgHAwUV +CgkICwUWAgMBAAIeAQIXgAAKCRAvOJjO3ulYz35aD/9L6l/LMPi2OeN6sShVd/iO +OsvUVeUlH+ZPQGda4fdfVkY76eYXd8mwALywhD2IO2qk6iYrlYupL/D7GNjJTFWx +tYItTc1afbhMCUNJlnLgT406M3DkLtosxMcxaH4OaJg6lE7TCHiul3bXwdj/xO00 +dTCPM7uaVxldIRTw3qXbEVJGFXj+49vTg2CNYPTtso3meWPeUzsoWflR9V7lqhgF +6dD+TLmZgsdeR63ZcHfy16h7oCN9bd7vIACuMDbF5jPF65V/DvIHfKWSITPoM6FX +xOLkmElEh5C1sORoTgpDsePvC3T1XdfYJFrADhrufZ3GvypOtVA3Cq9dak0Se+fG +I9BR71VJvkCWX1o4gXsPfeLIbxrhFXHI5kEwOjHTiDSs7RTYg1Vqh08405dnpkKp +O0a5/elKSLTQh627qwtytmSNmaRKm+7zXaa5sEXLen2Fky+0lLKJatoSybZ/bDm7 +BiyBJOW8nIkKKYcBh9dlGoQX232MsUFTBftj5kU114ixS66nyxJe8wt4ZRlnlYaB +9UQsKEV4osRKLf5yWfprNJaW9uvCEqLvCTPaJ50oUbMp3aQCXAcGFgwm+bGbbfAr +G/vOUsiRqDd5sd3FWN6gTbm3CcFr9DviED0WnnaQAYz+tWeMFWvsPYmSRqM8EUFm ++/LCBjOXkCiF+VmH1hGtObkCDQRYQcQZARAA2ryQ6rO4Q197XW67VPIZotDA9cU3 +0mF+tT24Ph2ylwaWeIlX0mV0hhEdNjOQNDUuxfCGoP5NYva/QpfjiMB0psN6qjqu +q7fOaHtuWV6drWhjVn0MZqRUjuI1N0Ia6gghua069dtXefmzaLF3k/UxXhD9JUVo +eC58lUpB8vHTwWz8auRkuVcQ4Od0u8Uzb69oAajDn7BSjNEbLrJzQVl1TyFEXcM6 +rJfjZ/puQ1VTb3Z3XVGpufgmqQrESpW0lPX4aiC8zdNvBH9q8pSDSfP+NjU/axdR +yfEGHfKbBvzd9u2eMmy767hsXzQmtymIu5mfUPhK2zNxOFqfsk5uBbj4d1d/AnWO +aqjdAf5lS7m9nBwZegTfYr82JJSm7ERs6YsdHd8hMNpSMcCTUn7FHtsCIGar8RAZ +M7zzt/ieXhGnl55XNGrEfoGDYvS6QMZkngxtRmfECWs8u9rIiRIxpgDKNT1D/0hf +JJ6OsOOS+SKnYt0g9zMsLo7+S2erXVUGSHGRKQajJBl7Ejk9zwdy0MuURYf7kSwa +x/2FkyYMYs2/GOLyhL0AN5ZfTUDAI5D9ZOalSrBZPPKQ/z8BL3ahdkQr3Vekg44V +NrFPTK6mfbDU/ZyBDWSzNp3DuMaIvHs2GOnhNalDPuX7nbcX1IF5I/mlHtDIVGA4 +dg431aIMTE2nu9kAEQEAAYkERAQYAQIADwUCWEHEGQIbAgUJATxoAAIpCRAvOJjO +3ulYz8FdIAQZAQIABgUCWEHEGQAKCRCxI0GAb5reZ0ffD/9FvwW+DT56knFRyRmn +w6HtFhR+ivB1BS9HEYn4pZrz+75UyHst75Gj1upRBf5TvoIurXV18UILDksoGOto +Oo/kPOuUjBUk4YZM+RHNk/udsLQ6EyJjUHhF8EO9S9pbU7pJdE45UTEc5MFObVTT +BYA//44FYugSvG201l7TTGSHGc3EdV/GY8OO44zNnuYmmGYbXItamUZ6VHefKNc6 +fJUCOBJi+gUGHlWK3bh/isk2+/MO1VbYqMlYwQn/ae+a6wejbRxhCIOHPCYFqL1C +D7PhYcc6wZxoDWJVVQeuEzxtB+GUIM7GeQ9WWbSXqU1KSUoWAMH/3CPofHTnEM3b +NuD6UNMvxRI3H7PtbSY6MlDCcHdWpwSKTP/oBmEorPgBkS/FDVulp7nigXxC877E +JIV/12lU9KlYeS6VU/9Lpw+onjwbfhbKPBjw2+E5c7/aw4MaIPSYf7JOPPJHo2lu +hNQxKLo3ObR8B+2z056AJSzqod3qn62ovTn9/Uau7oMfkmrOQhjk7YnUopkQ3qUh +X25vWz1FprUHanWMObXmyKPtPuvhU0pbu4XBF6taJYJSFhaoXCXMS2CtcuOvyusV +6FFxTiDbq6so2LGt/clUzezM0uDu8ddnO6Uem0oEWI5QeGQXUChWNDcD/uz9gRZw +1AGIb21jNZ40zJaq9JvybiR6INLbD/44Ri3PCj1Su/Wie7kKmz2zsnUI2d1bkyQg +RfFMNbrEBtKM+eRx41fOpKJb7FaLptoHd+iAegCtBlGGJk3i0kNlFplmxjKxsn5y +dPBvcrMAHfA7EL9bpDb50pQ7KUg5itDyJzrMiSc1mtagicQ7biwhTY+ZcP/Y24IV +CVv+BKaygblkSlerbb7S8VukaYif13Mx0msn/TVRqDOL1hnEdFCKiBfh8sx+PtOE +7nt4Y1sps8ylPAgKmI0QIIzn1ztgNKjZkAz9mRSSUmegJLOyeamqA2uyI2EnG2ra +G2d9wukJ3AiC9rTAGZ7MzvHdyAU5bMWcfk5PK8C7edCBIhgQl3puPxxfVU2+e5BP +7mH8XziKSgBCoZD9O/84BQnvkCVjRrq8xCRKe5zb0lHwCH3b0WyAUXU6Aj0/5okh +0eob6ijW3GiHTIT+ZBuZa2RuYoERXlP15Gl+3FRAflDLOb0mfolFv0R7jUdBoKQ5 +4s4MRNponHCWB95tr+ve8Tlo3esaci8/z4W2anAAqH9ZF+lvKYEPlLAucXjhIjDy +x0PSGQY665sPqNKxbezfIq0dFOtMzbbpJ0tbFs5ZQU70x02s8SscbKsEuQ/5O0Gw +qk5Z1xKKlJ/bGgxS7qWLWlFp0u2fdJisaYQTFaYhKCQPgj1bN9fDRVv+TNpOViiL +4rJaKglA+w== +=aCJS user@mylaptop.local diff --git a/README.md b/README.md index 57f631d..b4713f8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # te tru +‰PNG + + Code issues + diff --git a/bugs./os.py b/bugs./os.py new file mode 100644 index 0000000..893598b --- /dev/null +++ b/bugs./os.py @@ -0,0 +1,2 @@ +import os +SECRET_KEY = os.environ['SECRET_KEY'] diff --git a/postmessageRelay_data/access_token .api b/postmessageRelay_data/access_token .api new file mode 100644 index 0000000..9b0833e --- /dev/null +++ b/postmessageRelay_data/access_token .api @@ -0,0 +1,4 @@ +GET /oauth/access_token? + client_id={app-id} + &client_secret={app-secret} + &grant_type=client_credentials \ No newline at end of file diff --git a/postmessageRelay_data/binding/pm.php b/postmessageRelay_data/binding/pm.php new file mode 100644 index 0000000..3bb9aab --- /dev/null +++ b/postmessageRelay_data/binding/pm.php @@ -0,0 +1,1163 @@ + $value) { + if (! in_array($key, $variables_whitelist)) { + unset($$key); + } +} +unset($key, $value, $variables_whitelist); + + +/** + * Subforms - some functions need to be called by form, cause of the limited URL + * length, but if this functions inside another form you cannot just open a new + * form - so phpMyAdmin uses 'arrays' inside this form + * + * + *
+ * ... main form elments ... + * + * ... other subform data ... + * + * ... other subforms ... + * + * ... other subform data ... + * + * ... main form elments ... + * + *
+ *
+ * + * so we now check if a subform is submitted + */ +$__redirect = null; +if (isset($_POST['usesubform']) && ! defined('PMA_MINIMUM_COMMON')) { + // if a subform is present and should be used + // the rest of the form is deprecated + $subform_id = key($_POST['usesubform']); + $subform = $_POST['subform'][$subform_id]; + $_POST = $subform; + $_REQUEST = $subform; + /** + * some subforms need another page than the main form, so we will just + * include this page at the end of this script - we use $__redirect to + * track this + */ + if (isset($_POST['redirect']) + && $_POST['redirect'] != basename($PMA_PHP_SELF) + ) { + $__redirect = $_POST['redirect']; + unset($_POST['redirect']); + } + unset($subform_id, $subform); +} else { + // Note: here we overwrite $_REQUEST so that it does not contain cookies, + // because another application for the same domain could have set + // a cookie (with a compatible path) that overrides a variable + // we expect from GET or POST. + // We'll refer to cookies explicitly with the $_COOKIE syntax. + $_REQUEST = array_merge($_GET, $_POST); +} +// end check if a subform is submitted + +/** + * This setting was removed in PHP 5.4. But at this point PMA_PHP_INT_VERSION + * is not yet defined so we use another way to find out the PHP version. + */ +if (version_compare(phpversion(), '5.4', 'lt')) { + // remove quotes added by PHP + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { + PMA_arrayWalkRecursive($_GET, 'stripslashes', true); + PMA_arrayWalkRecursive($_POST, 'stripslashes', true); + PMA_arrayWalkRecursive($_COOKIE, 'stripslashes', true); + PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true); + } +} + +/** + * check timezone setting + * this could produce an E_STRICT - but only once, + * if not done here it will produce E_STRICT on every date/time function + * (starting with PHP 5.3, this code can produce E_WARNING rather than + * E_STRICT) + * + */ +date_default_timezone_set(@date_default_timezone_get()); + +/******************************************************************************/ +/* parsing configuration file LABEL_parsing_config_file */ + +/** + * We really need this one! + */ +if (! function_exists('preg_replace')) { + PMA_warnMissingExtension('pcre', true); +} + +/** + * JSON is required in several places. + */ +if (! function_exists('json_encode')) { + PMA_warnMissingExtension('json', true); +} + +/** + * @global PMA_Config $GLOBALS['PMA_Config'] + * force reading of config file, because we removed sensitive values + * in the previous iteration + */ +$GLOBALS['PMA_Config'] = new PMA_Config(CONFIG_FILE); + +if (!defined('PMA_MINIMUM_COMMON')) { + $GLOBALS['PMA_Config']->checkPmaAbsoluteUri(); +} + +/** + * BC - enable backward compatibility + * exports all configuration settings into $GLOBALS ($GLOBALS['cfg']) + */ +$GLOBALS['PMA_Config']->enableBc(); + +/** + * clean cookies on upgrade + * when changing something related to PMA cookies, increment the cookie version + */ +$pma_cookie_version = 4; +if (isset($_COOKIE) + && (isset($_COOKIE['pmaCookieVer']) + && $_COOKIE['pmaCookieVer'] < $pma_cookie_version) +) { + // delete all cookies + foreach ($_COOKIE as $cookie_name => $tmp) { + $GLOBALS['PMA_Config']->removeCookie($cookie_name); + } + $_COOKIE = array(); + $GLOBALS['PMA_Config']->setCookie('pmaCookieVer', $pma_cookie_version); +} + + +/** + * check HTTPS connection + */ +if ($GLOBALS['PMA_Config']->get('ForceSSL') + && ! $GLOBALS['PMA_Config']->get('is_https') +) { + require './libraries/select_lang.lib.php'; + // grab SSL URL + $url = $GLOBALS['PMA_Config']->getSSLUri(); + // Actually redirect + PMA_sendHeaderLocation($url . PMA_generate_common_url($_GET, 'text')); + // delete the current session, otherwise we get problems (see bug #2397877) + $GLOBALS['PMA_Config']->removeCookie($GLOBALS['session_name']); + exit; +} + + +/** + * include session handling after the globals, to prevent overwriting + */ +require './libraries/session.inc.php'; + +/** + * init some variables LABEL_variables_init + */ + +/** + * holds parameters to be passed to next page + * @global array $GLOBALS['url_params'] + */ +$GLOBALS['url_params'] = array(); + +/** + * the whitelist for $GLOBALS['goto'] + * @global array $goto_whitelist + */ +$goto_whitelist = array( + //'browse_foreigners.php', + //'changelog.php', + //'chk_rel.php', + 'db_create.php', + 'db_datadict.php', + 'db_sql.php', + 'db_events.php', + 'db_export.php', + 'db_importdocsql.php', + 'db_qbe.php', + 'db_structure.php', + 'db_import.php', + 'db_operations.php', + 'db_printview.php', + 'db_search.php', + 'db_routines.php', + 'export.php', + 'import.php', + //'index.php', + //'navigation.php', + //'license.php', + 'index.php', + 'pdf_pages.php', + 'pdf_schema.php', + 'querywindow.php', + 'server_binlog.php', + 'server_collations.php', + 'server_databases.php', + 'server_engines.php', + 'server_export.php', + 'server_import.php', + 'server_privileges.php', + 'server_sql.php', + 'server_status.php', + 'server_status_advisor.php', + 'server_status_monitor.php', + 'server_status_queries.php', + 'server_status_variables.php', + 'server_variables.php', + 'sql.php', + 'tbl_addfield.php', + 'tbl_change.php', + 'tbl_create.php', + 'tbl_import.php', + 'tbl_indexes.php', + 'tbl_move_copy.php', + 'tbl_printview.php', + 'tbl_sql.php', + 'tbl_export.php', + 'tbl_operations.php', + 'tbl_structure.php', + 'tbl_relation.php', + 'tbl_replace.php', + 'tbl_row_action.php', + 'tbl_select.php', + 'tbl_zoom_select.php', + //'themes.php', + 'transformation_overview.php', + 'transformation_wrapper.php', + 'user_password.php', +); + +/** + * check $__redirect against whitelist + */ +if (! PMA_checkPageValidity($__redirect, $goto_whitelist)) { + $__redirect = null; +} + +/** + * holds page that should be displayed + * @global string $GLOBALS['goto'] + */ +$GLOBALS['goto'] = ''; +// Security fix: disallow accessing serious server files via "?goto=" +if (PMA_checkPageValidity($_REQUEST['goto'], $goto_whitelist)) { + $GLOBALS['goto'] = $_REQUEST['goto']; + $GLOBALS['url_params']['goto'] = $_REQUEST['goto']; +} else { + unset($_REQUEST['goto'], $_GET['goto'], $_POST['goto'], $_COOKIE['goto']); +} + +/** + * returning page + * @global string $GLOBALS['back'] + */ +if (PMA_checkPageValidity($_REQUEST['back'], $goto_whitelist)) { + $GLOBALS['back'] = $_REQUEST['back']; +} else { + unset($_REQUEST['back'], $_GET['back'], $_POST['back'], $_COOKIE['back']); +} + +/** + * Check whether user supplied token is valid, if not remove any possibly + * dangerous stuff from request. + * + * remember that some objects in the session with session_start and __wakeup() + * could access this variables before we reach this point + * f.e. PMA_Config: fontsize + * + * @todo variables should be handled by their respective owners (objects) + * f.e. lang, server, collation_connection in PMA_Config + */ +$token_mismatch = true; +if (PMA_isValid($_REQUEST['token'])) { + $token_mismatch = ! hash_equals($_SESSION[' PMA_token '], $_REQUEST['token']); +} + +if ($token_mismatch) { + /** + * List of parameters which are allowed from unsafe source + */ + $allow_list = array( + /* needed for direct access, see FAQ 1.34 + * also, server needed for cookie login screen (multi-server) + */ + 'server', 'db', 'table', 'target', 'lang', + /* Session ID */ + 'phpMyAdmin', + /* Cookie preferences */ + 'pma_lang', 'pma_collation_connection', + /* Possible login form */ + 'pma_servername', 'pma_username', 'pma_password', + /* Needed to send the correct reply */ + 'ajax_request', + /* Permit to log out even if there is a token mismatch */ + 'old_usr', + /* url.php */ + 'url', + ); + /** + * Allow changing themes in test/theme.php + */ + if (defined('PMA_TEST_THEME')) { + $allow_list[] = 'set_theme'; + } + /** + * Require cleanup functions + */ + include './libraries/cleanup.lib.php'; + /** + * Do actual cleanup + */ + PMA_remove_request_vars($allow_list); + +} + + +/** + * current selected database + * @global string $GLOBALS['db'] + */ +$GLOBALS['db'] = ''; +if (PMA_isValid($_REQUEST['db'])) { + // can we strip tags from this? + // only \ and / is not allowed in db names for MySQL + $GLOBALS['db'] = $_REQUEST['db']; + $GLOBALS['url_params']['db'] = $GLOBALS['db']; +} + +/** + * current selected table + * @global string $GLOBALS['table'] + */ +$GLOBALS['table'] = ''; +if (PMA_isValid($_REQUEST['table'])) { + // can we strip tags from this? + // only \ and / is not allowed in table names for MySQL + $GLOBALS['table'] = $_REQUEST['table']; + $GLOBALS['url_params']['table'] = $GLOBALS['table']; +} + +/** + * Store currently selected recent table. + * Affect $GLOBALS['db'] and $GLOBALS['table'] + */ +if (PMA_isValid($_REQUEST['selected_recent_table'])) { + $recent_table = json_decode($_REQUEST['selected_recent_table'], true); + $GLOBALS['db'] = $recent_table['db']; + $GLOBALS['url_params']['db'] = $GLOBALS['db']; + $GLOBALS['table'] = $recent_table['table']; + $GLOBALS['url_params']['table'] = $GLOBALS['table']; +} + +/** + * SQL query to be executed + * @global string $GLOBALS['sql_query'] + */ +$GLOBALS['sql_query'] = ''; +if (PMA_isValid($_REQUEST['sql_query'])) { + $GLOBALS['sql_query'] = $_REQUEST['sql_query']; +} + +//$_REQUEST['set_theme'] // checked later in this file LABEL_theme_setup +//$_REQUEST['server']; // checked later in this file +//$_REQUEST['lang']; // checked by LABEL_loading_language_file + +/******************************************************************************/ +/* loading language file LABEL_loading_language_file */ + +/** + * lang detection is done here + */ +require './libraries/select_lang.lib.php'; + +// Defines the cell alignment values depending on text direction +if ($GLOBALS['text_dir'] == 'ltr') { + $GLOBALS['cell_align_left'] = 'left'; + $GLOBALS['cell_align_right'] = 'right'; +} else { + $GLOBALS['cell_align_left'] = 'right'; + $GLOBALS['cell_align_right'] = 'left'; +} + +/** + * check for errors occurred while loading configuration + * this check is done here after loading language files to present errors in locale + */ +$GLOBALS['PMA_Config']->checkPermissions(); + +if ($GLOBALS['PMA_Config']->error_config_file) { + $error = '[strong]' . __('Failed to read configuration file') . '[/strong]' + . '[br][br]' + . __('This usually means there is a syntax error in it, please check any errors shown below.') + . '[br][br]' + . '[conferr]'; + trigger_error($error, E_USER_ERROR); +} +if ($GLOBALS['PMA_Config']->error_config_default_file) { + $error = sprintf( + __('Could not load default configuration from: %1$s'), + $GLOBALS['PMA_Config']->default_source + ); + trigger_error($error, E_USER_ERROR); +} +if ($GLOBALS['PMA_Config']->error_pma_uri) { + trigger_error( + __('The [code]$cfg[\'PmaAbsoluteUri\'][/code] directive MUST be set in your configuration file!'), + E_USER_ERROR + ); +} + + +/******************************************************************************/ +/* setup servers LABEL_setup_servers */ + +/** + * current server + * @global integer $GLOBALS['server'] + */ +$GLOBALS['server'] = 0; + +/** + * Servers array fixups. + * $default_server comes from PMA_Config::enableBc() + * @todo merge into PMA_Config + */ +// Do we have some server? +if (! isset($cfg['Servers']) || count($cfg['Servers']) == 0) { + // No server => create one with defaults + $cfg['Servers'] = array(1 => $default_server); +} else { + // We have server(s) => apply default configuration + $new_servers = array(); + + foreach ($cfg['Servers'] as $server_index => $each_server) { + + // Detect wrong configuration + if (!is_int($server_index) || $server_index < 1) { + trigger_error( + sprintf(__('Invalid server index: %s'), $server_index), + E_USER_ERROR + ); + } + + $each_server = array_merge($default_server, $each_server); + + // Don't use servers with no hostname + if ($each_server['connect_type'] == 'tcp' && empty($each_server['host'])) { + trigger_error( + sprintf( + __('Invalid hostname for server %1$s. Please review your configuration.'), + $server_index + ), + E_USER_ERROR + ); + } + + // Final solution to bug #582890 + // If we are using a socket connection + // and there is nothing in the verbose server name + // or the host field, then generate a name for the server + // in the form of "Server 2", localized of course! + if ($each_server['connect_type'] == 'socket' + && empty($each_server['host']) + && empty($each_server['verbose']) + ) { + $each_server['verbose'] = __('Server') . $server_index; + } + + $new_servers[$server_index] = $each_server; + } + $cfg['Servers'] = $new_servers; + unset($new_servers, $server_index, $each_server); +} + +// Cleanup +unset($default_server); + + +/******************************************************************************/ +/* setup themes LABEL_theme_setup */ + +/** + * @global PMA_Theme_Manager $_SESSION['PMA_Theme_Manager'] + */ +if (! isset($_SESSION['PMA_Theme_Manager'])) { + $_SESSION['PMA_Theme_Manager'] = new PMA_Theme_Manager; +} else { + /** + * @todo move all __wakeup() functionality into session.inc.php + */ + $_SESSION['PMA_Theme_Manager']->checkConfig(); +} + +// for the theme per server feature +if (isset($_REQUEST['server']) && ! isset($_REQUEST['set_theme'])) { + $GLOBALS['server'] = $_REQUEST['server']; + $tmp = $_SESSION['PMA_Theme_Manager']->getThemeCookie(); + if (empty($tmp)) { + $tmp = $_SESSION['PMA_Theme_Manager']->theme_default; + } + $_SESSION['PMA_Theme_Manager']->setActiveTheme($tmp); + unset($tmp); +} +/** + * @todo move into PMA_Theme_Manager::__wakeup() + */ +if (isset($_REQUEST['set_theme'])) { + // if user selected a theme + $_SESSION['PMA_Theme_Manager']->setActiveTheme($_REQUEST['set_theme']); +} + +/** + * the theme object + * @global PMA_Theme $_SESSION['PMA_Theme'] + */ +$_SESSION['PMA_Theme'] = $_SESSION['PMA_Theme_Manager']->theme; + +// BC +/** + * the active theme + * @global string $GLOBALS['theme'] + */ +$GLOBALS['theme'] = $_SESSION['PMA_Theme']->getName(); +/** + * the theme path + * @global string $GLOBALS['pmaThemePath'] + */ +$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath(); +/** + * the theme image path + * @global string $GLOBALS['pmaThemeImage'] + */ +$GLOBALS['pmaThemeImage'] = $_SESSION['PMA_Theme']->getImgPath(); + +/** + * load layout file if exists + */ +if (@file_exists($_SESSION['PMA_Theme']->getLayoutFile())) { + include $_SESSION['PMA_Theme']->getLayoutFile(); +} + +if (! defined('PMA_MINIMUM_COMMON')) { + /** + * Character set conversion. + */ + include_once './libraries/charset_conversion.lib.php'; + + /** + * String handling + */ + include_once './libraries/string.lib.php'; + + /** + * Lookup server by name + * (see FAQ 4.8) + */ + if (! empty($_REQUEST['server']) + && is_string($_REQUEST['server']) + && ! is_numeric($_REQUEST['server']) + ) { + foreach ($cfg['Servers'] as $i => $server) { + if ($server['host'] == $_REQUEST['server']) { + $_REQUEST['server'] = $i; + break; + } + } + if (is_string($_REQUEST['server'])) { + unset($_REQUEST['server']); + } + unset($i); + } + + /** + * If no server is selected, make sure that $cfg['Server'] is empty (so + * that nothing will work), and skip server authentication. + * We do NOT exit here, but continue on without logging into any server. + * This way, the welcome page will still come up (with no server info) and + * present a choice of servers in the case that there are multiple servers + * and '$cfg['ServerDefault'] = 0' is set. + */ + + if (isset($_REQUEST['server']) + && (is_string($_REQUEST['server']) || is_numeric($_REQUEST['server'])) + && ! empty($_REQUEST['server']) + && ! empty($cfg['Servers'][$_REQUEST['server']]) + ) { + $GLOBALS['server'] = $_REQUEST['server']; + $cfg['Server'] = $cfg['Servers'][$GLOBALS['server']]; + } else { + if (!empty($cfg['Servers'][$cfg['ServerDefault']])) { + $GLOBALS['server'] = $cfg['ServerDefault']; + $cfg['Server'] = $cfg['Servers'][$GLOBALS['server']]; + } else { + $GLOBALS['server'] = 0; + $cfg['Server'] = array(); + } + } + $GLOBALS['url_params']['server'] = $GLOBALS['server']; + + /** + * Kanji encoding convert feature appended by Y.Kawada (2002/2/20) + */ + if (function_exists('mb_convert_encoding') + && $lang == 'ja' + ) { + include_once './libraries/kanji-encoding.lib.php'; + } // end if + + /** + * save some settings in cookies + * @todo should be done in PMA_Config + */ + $GLOBALS['PMA_Config']->setCookie('pma_lang', $GLOBALS['lang']); + if (isset($GLOBALS['collation_connection'])) { + $GLOBALS['PMA_Config']->setCookie( + 'pma_collation_connection', + $GLOBALS['collation_connection'] + ); + } + + $_SESSION['PMA_Theme_Manager']->setThemeCookie(); + + if (! empty($cfg['Server'])) { + + /** + * Loads the proper database interface for this server + */ + include_once './libraries/database_interface.lib.php'; + + include_once './libraries/logging.lib.php'; + + // get LoginCookieValidity from preferences cache + // no generic solution for loading preferences from cache as some settings + // need to be kept for processing in PMA_Config::loadUserPreferences() + $cache_key = 'server_' . $GLOBALS['server']; + if (isset($_SESSION['cache'][$cache_key]['userprefs']['LoginCookieValidity'])) { + $value = $_SESSION['cache'][$cache_key]['userprefs']['LoginCookieValidity']; + $GLOBALS['PMA_Config']->set('LoginCookieValidity', $value); + $GLOBALS['cfg']['LoginCookieValidity'] = $value; + unset($value); + } + unset($cache_key); + + // Gets the authentication library that fits the $cfg['Server'] settings + // and run authentication + + // to allow HTTP or http + $cfg['Server']['auth_type'] = strtolower($cfg['Server']['auth_type']); + + /** + * the required auth type plugin + */ + $auth_class = "Authentication" . ucfirst($cfg['Server']['auth_type']); + if (! file_exists('./libraries/plugins/auth/' . $auth_class . '.class.php')) { + PMA_fatalError( + __('Invalid authentication method set in configuration:') + . ' ' . $cfg['Server']['auth_type'] + ); + } + if (isset($_REQUEST['pma_password']) && strlen($_REQUEST['pma_password']) > 256) { + $_REQUEST['pma_password'] = substr($_REQUEST['pma_password'], 0, 256); + } + include_once './libraries/plugins/auth/' . $auth_class . '.class.php'; + // todo: add plugin manager + $plugin_manager = null; + $auth_plugin = new $auth_class($plugin_manager); + + if (! $auth_plugin->authCheck()) { + /* Force generating of new session on login */ + PMA_secureSession(); + $auth_plugin->auth(); + } else { + $auth_plugin->authSetUser(); + } + + // Check IP-based Allow/Deny rules as soon as possible to reject the + // user + // Based on mod_access in Apache: + // http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/aaa/mod_access.c?rev=1.37&content-type=text/vnd.viewcvs-markup + // Look at: "static int check_dir_access(request_rec *r)" + if (isset($cfg['Server']['AllowDeny']) + && isset($cfg['Server']['AllowDeny']['order']) + ) { + + /** + * ip based access library + */ + include_once './libraries/ip_allow_deny.lib.php'; + + $allowDeny_forbidden = false; // default + if ($cfg['Server']['AllowDeny']['order'] == 'allow,deny') { + $allowDeny_forbidden = true; + if (PMA_allowDeny('allow')) { + $allowDeny_forbidden = false; + } + if (PMA_allowDeny('deny')) { + $allowDeny_forbidden = true; + } + } elseif ($cfg['Server']['AllowDeny']['order'] == 'deny,allow') { + if (PMA_allowDeny('deny')) { + $allowDeny_forbidden = true; + } + if (PMA_allowDeny('allow')) { + $allowDeny_forbidden = false; + } + } elseif ($cfg['Server']['AllowDeny']['order'] == 'explicit') { + if (PMA_allowDeny('allow') && ! PMA_allowDeny('deny')) { + $allowDeny_forbidden = false; + } else { + $allowDeny_forbidden = true; + } + } // end if ... elseif ... elseif + + // Ejects the user if banished + if ($allowDeny_forbidden) { + PMA_log_user($cfg['Server']['user'], 'allow-denied'); + $auth_plugin->authFails(); + } + } // end if + + // is root allowed? + if (!$cfg['Server']['AllowRoot'] && $cfg['Server']['user'] == 'root') { + $allowDeny_forbidden = true; + PMA_log_user($cfg['Server']['user'], 'root-denied'); + $auth_plugin->authFails(); + } + + // is a login without password allowed? + if (!$cfg['Server']['AllowNoPassword'] && $cfg['Server']['password'] == '') { + $login_without_password_is_forbidden = true; + PMA_log_user($cfg['Server']['user'], 'empty-denied'); + $auth_plugin->authFails(); + } + + // if using TCP socket is not needed + if (strtolower($cfg['Server']['connect_type']) == 'tcp') { + $cfg['Server']['socket'] = ''; + } + + // Try to connect MySQL with the control user profile (will be used to + // get the privileges list for the current user but the true user link + // must be open after this one so it would be default one for all the + // scripts) + $controllink = false; + if ($cfg['Server']['controluser'] != '') { + if (! empty($cfg['Server']['controlhost'])) { + $controllink = PMA_DBI_connect( + $cfg['Server']['controluser'], + $cfg['Server']['controlpass'], + true, + array('host' => $cfg['Server']['controlhost']) + ); + } else { + $controllink = PMA_DBI_connect( + $cfg['Server']['controluser'], + $cfg['Server']['controlpass'], + true + ); + } + } + + // Connects to the server (validates user's login) + $userlink = PMA_DBI_connect( + $cfg['Server']['user'], $cfg['Server']['password'], false + ); + + if (! $controllink) { + $controllink = $userlink; + } + + $auth_plugin->storeUserCredentials(); + + /* Log success */ + PMA_log_user($cfg['Server']['user']); + + /** + * with phpMyAdmin 3 we support MySQL >=5 + * but only production releases: + * - > 5.0.15 + */ + if (PMA_MYSQL_INT_VERSION < 50015) { + PMA_fatalError( + __('You should upgrade to %s %s or later.'), + array('MySQL', '5.0.15') + ); + } + + /** + * Type handling object. + */ + if (PMA_DRIZZLE) { + $GLOBALS['PMA_Types'] = new PMA_Types_Drizzle(); + } else { + $GLOBALS['PMA_Types'] = new PMA_Types_MySQL(); + } + + if (PMA_DRIZZLE) { + // DisableIS must be set to false for Drizzle, it maps SHOW commands + // to INFORMATION_SCHEMA queries anyway so it's fast on large servers + $cfg['Server']['DisableIS'] = false; + // SHOW OPEN TABLES is not supported by Drizzle + $cfg['SkipLockedTables'] = false; + } + + /** + * SQL Parser code + */ + include_once './libraries/sqlparser.lib.php'; + + /** + * SQL Validator interface code + */ + include_once './libraries/sqlvalidator.lib.php'; + + /** + * the PMA_List_Database class + */ + include_once './libraries/PMA.php'; + $pma = new PMA; + $pma->userlink = $userlink; + $pma->controllink = $controllink; + + /** + * some resetting has to be done when switching servers + */ + if (isset($_SESSION['tmp_user_values']['previous_server']) + && $_SESSION['tmp_user_values']['previous_server'] != $GLOBALS['server'] + ) { + unset($_SESSION['tmp_user_values']['navi_limit_offset']); + } + $_SESSION['tmp_user_values']['previous_server'] = $GLOBALS['server']; + + } // end server connecting + + /** + * check if profiling was requested and remember it + * (note: when $cfg['ServerDefault'] = 0, constant is not defined) + */ + if (isset($_REQUEST['profiling']) + && PMA_Util::profilingSupported() + ) { + $_SESSION['profiling'] = true; + } elseif (isset($_REQUEST['profiling_form'])) { + // the checkbox was unchecked + unset($_SESSION['profiling']); + } + /** + * Inclusion of profiling scripts is needed on various + * pages like sql, tbl_sql, db_sql, tbl_select + */ + if (! defined('PMA_BYPASS_GET_INSTANCE')) { + $response = PMA_Response::getInstance(); + } + if (isset($_SESSION['profiling'])) { + $header = $response->getHeader(); + $scripts = $header->getScripts(); + /* < IE 9 doesn't support canvas natively */ + if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 9) { + $scripts->addFile('canvg/flashcanvas.js'); + } + $scripts->addFile('jqplot/jquery.jqplot.js'); + $scripts->addFile('jqplot/plugins/jqplot.pieRenderer.js'); + $scripts->addFile('canvg/canvg.js'); + } + + /* + * There is no point in even attempting to process + * an ajax request if there is a token mismatch + */ + if (isset($response) && $response->isAjax() && $token_mismatch) { + $response->isSuccess(false); + $response->addJSON( + 'message', + PMA_Message::error(__('Error: Token mismatch')) + ); + exit; + } +} // end if !defined('PMA_MINIMUM_COMMON') + +// load user preferences +$GLOBALS['PMA_Config']->loadUserPreferences(); + +// remove sensitive values from session +$GLOBALS['PMA_Config']->set('blowfish_secret', ''); +$GLOBALS['PMA_Config']->set('Servers', ''); +$GLOBALS['PMA_Config']->set('default_server', ''); + +/* Tell tracker that it can actually work */ +PMA_Tracker::enable(); + +/** + * @global boolean $GLOBALS['is_ajax_request'] + * @todo should this be moved to the variables init section above? + * + * Check if the current request is an AJAX request, and set is_ajax_request + * accordingly. Suppress headers, footers and unnecessary output if set to + * true + */ +if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { + $GLOBALS['is_ajax_request'] = true; +} else { + $GLOBALS['is_ajax_request'] = false; +} + +/** + * @global boolean $GLOBALS['grid_edit'] + * + * Set to true if this is a request made during an grid edit process. This + * request is made to retrieve the non-truncated/transformed values. + */ +if (isset($_REQUEST['grid_edit']) && $_REQUEST['grid_edit'] == true) { + $GLOBALS['grid_edit'] = true; +} else { + $GLOBALS['grid_edit'] = false; +} + +if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { + PMA_fatalError(__("GLOBALS overwrite attempt")); +} + +/** + * protect against possible exploits - there is no need to have so much variables + */ +if (count($_REQUEST) > 1000) { + PMA_fatalError(__('possible exploit')); +} + +/** + * Check for numeric keys + * (if register_globals is on, numeric key can be found in $GLOBALS) + */ +foreach ($GLOBALS as $key => $dummy) { + if (is_numeric($key)) { + PMA_fatalError(__('numeric key detected')); + } +} +unset($dummy); + +// here, the function does not exist with this configuration: +// $cfg['ServerDefault'] = 0; +$GLOBALS['is_superuser'] = function_exists('PMA_isSuperuser') && PMA_isSuperuser(); + +if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) { + /** + * include subform target page + */ + include $__redirect; + exit(); +} + +?> + diff --git a/postmessageRelay_data/bootstrap/cache/tab#.php b/postmessageRelay_data/bootstrap/cache/tab#.php new file mode 100644 index 0000000..04eec41 --- /dev/null +++ b/postmessageRelay_data/bootstrap/cache/tab#.php @@ -0,0 +1,1808 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +define('LARAVEL_START', microtime(true)); + +/* +|-------------------------------------------------------------------------- +| Register The Composer Auto Loader +|-------------------------------------------------------------------------- +| +| Composer provides a convenient, automatically generated class loader +| for our application. We just need to utilize it! We'll require it +| into the script here so that we do not have to worry about the +| loading of any our classes "manually". Feels great to relax. +| +*/ + +require __DIR__.'/../vendor/autoload.php'; +ed392d12-9d1b-44bb-b7d1-3a42e9892ec5 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 583,357 +Length: 456 +bed92adb-1be0-4215-b256-54a8f64f2f88 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,034,373 +Length: 107 +3d169a82-0e82-4b85-85c9-e6051a0b7b2d +Refcount: 1 +Content Type: image/svg+xml +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 27,169 +Length: 25,957 +69a3ecd0-b2f7-416a-9b9b-ec7612eb6780 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 25,925 +Length: 1,244 +9ecd2b15-cf62-42d0-922d-1b812925c30a +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 583,077 +Length: 280 +233e2292-4712-4679-94cd-656a714b4cb5 +Refcount: 2 +Content Type: text/plain +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\File System\002\p\00\00000002 +2ff91f51-dda0-437e-bbc2-a3369928d008 +Refcount: 1 +080530e9-b1d3-4626-bb9f-513afa2735ed +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,035,393 +Length: 115 +b8f40cab-4296-4000-abeb-f111897b7640 +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 2,476,389 +Length: 3,423 +faed4f54-18ee-4cdd-adf0-45af9ec2631f +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 360,419 +Length: 14,263 +0d82f63f-56c7-437a-a794-4479f0456a45 +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 53,126 +Length: 3,357 +b494835c-a196-4389-b888-3b48de6191ad +Refcount: 1 +Content Type: font/woff2 +Type: data +Length: 9,996 +38591c6e-9498-44a8-9d36-6a362e0a4da5 +Refcount: 1 +Content Type: image/svg+xml +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Length: 25,925 +45ede267-4ab1-4e66-9ddf-a6d682b7e8c3 +Refcount: 2 +Content Type: text/plain +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\File System\002\p\00\00000000 +fdb0a2d2-05c8-449e-8cb7-cd6a8a6884b1 +Refcount: 2 +Content Type: text/plain +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\File System\002\p\00\00000001 +38352f20-0121-4232-b784-54d20e9a1cce +Refcount: 2 +Content Type: text/plain +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\File System\002\p\00\00000003 +90f45fe0-c38f-496f-b838-157c3a40bc1b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,036,265 +Length: 351 +a0afeb8f-9b0c-4f7f-a47b-e838e54669f6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 290,541 +Length: 41,898 +0bb0ae35-7068-40a6-82c3-bfa51a590c71 +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 56,483 +Length: 3,372 +24ab910d-dda2-4483-9a9c-2636aa4c6d06 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 977,535 +Length: 12,008 +178c7381-2a26-440a-84ad-a814ddd0b569 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,034,782 +Length: 239 +3685e189-25ed-415e-8352-8f55c077b22d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 559,941 +Length: 248 +3efd7f39-f84c-47c6-999b-71cc088bb42f +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,033,481 +Length: 358 +83a6b264-0e1f-4b0c-bc73-caaabf9acaf3 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 611,476 +Length: 883 +f570598f-d9cf-47ef-ba2b-70ce3cc83b18 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 59,855 +Length: 36,500 +989974dc-86b8-45cb-a000-e4c402d3de31 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,037,359 +Length: 778 +1ac6e32e-eeab-4678-a7f9-929d0f74cf85 +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 803,188 +Length: 1,455 +302681ab-edc3-42a1-8879-706f67e059cd +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 96,355 +Length: 99,900 +91933d03-e3d8-4e4e-bb39-10f55f113cb7 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 196,255 +Length: 12,730 +598ff514-bef5-4bf0-8409-4d905bf22e1e +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 380,241 +Length: 16,924 +94cd031e-911e-4cec-88a8-80f5cc44797c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,035,021 +Length: 372 +4ba89939-e241-46b7-8438-f55471c5f32b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,607,310 +Length: 133 +68be0b27-93d7-4a93-902e-eb3ccd344c8d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 208,985 +Length: 28,366 +4a65c82f-5397-4539-9f17-c3cc2fa572b0 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 237,351 +Length: 53,190 +529279d2-b29b-4e16-ae16-73c8b9bb055d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,033,262 +Length: 119 +e6721526-72a0-494f-aa50-86a84f57fe6d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 628,954 +Length: 128 +0dc6a6a4-1d05-4c44-8022-4810f3882bce +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 398,686 +Length: 1,139 +ddc50dee-bb5d-4f3f-8cc9-75eaa79cc59e +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,172,580 +Length: 7,676 +e370f35d-8e47-4f32-91d5-460166d30e61 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 332,439 +Length: 27,980 +6a3337dc-e4df-483f-98e5-434a4f1fca0c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 407,355 +Length: 530 +4da8fb79-488f-46a4-96ac-19f76c6f20e1 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 374,682 +Length: 5,559 +6643163b-d1e6-4478-b31b-dbcaa8c8e132 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,034,677 +Length: 105 +29689ccf-100e-4998-a46e-114191da07ce +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,112,720 +Length: 9,780 +cc30cf6e-0663-4344-b3ba-b5e4e27b3319 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 560,189 +Length: 663 +fe5b5250-6f86-43b7-b8c1-e17097b35020 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 397,165 +Length: 1,521 +1f852f6e-0825-4ce7-9e39-55a20a838a61 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 399,825 +Length: 2,850 +de14cd1f-6b00-4f05-a853-56bd5e83fa57 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,032,836 +Length: 275 +d3b08217-8774-4992-b7a3-91e17d358a90 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 646,490 +Length: 161 +a49d6751-75c2-4755-a7c1-96d8018df17d +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 578,467 +Length: 2,611 +6348271b-0a98-4635-a766-a1514c4bb209 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,033,839 +Length: 270 +28aae746-c8b2-44dc-87f6-b5505e2d2a49 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 612,359 +Length: 1,090 +df1e8aa0-edee-4f69-a2ea-da6a9ea24508 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 599,782 +Length: 10,365 +4a2cfbe1-122b-440f-8132-83749dde575c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 663,605 +Length: 15,457 +a5dab3de-e65d-4d83-af15-259b49873670 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,033,111 +Length: 151 +4d7a7f20-0383-4157-bad5-abb99813508e +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 610,147 +Length: 699 +c016968e-9ceb-4b1b-b1bc-c3ec4bce2142 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 743,428 +Length: 23,508 +8c156d26-7bc9-4134-a82e-906c2df191f3 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 766,936 +Length: 22,353 +31ff5c61-0002-49f3-990d-4f008fe2fdb8 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 789,289 +Length: 158 +0897c1e3-3811-4e72-9c75-ed2cbba1aa27 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 640,306 +Length: 128 +42ce9d60-f948-47a8-8a9c-a76ef514a6f1 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 789,447 +Length: 8,845 +42b69399-ef94-4694-a9f6-263c3b5a80c4 +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 804,643 +Length: 1,954 +3e046829-1ae3-40a2-9120-6156d2d88349 +Refcount: 1 +Content Type: image/svg+xml +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 989,543 +Length: 8,707 +6db85c99-8f31-4124-82c1-847b97b5ebc0 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,028,896 +Length: 91 +c07f40ab-3cae-45c4-bd7b-b5ef181e3f4a +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 998,250 +Length: 69 +5b030613-b4c3-40ea-8434-eee90b05819b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,251,548 +Length: 2,147 +75d7ed21-4401-43ba-a293-9b225823c9cb +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 403,194 +Length: 115 +c54dc2d5-88f0-4dbb-a17d-ff8bc087f64f +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,007,390 +Length: 47 +77022122-132e-48e5-a2b9-cb69dbd34b20 +Refcount: 1 +Content Type: image/svg+xml +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 2,996,578 +Length: 10,812 +73220f59-03b2-420d-8fff-82624fcbed2b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 631,237 +Length: 1,717 +5968f7c2-04ae-49d3-b4a5-13f1848bc984 +Refcount: 1 +Content Type: image/svg+xml +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,007,437 +Length: 20,849 +e4510451-3ade-4597-9733-44f9ec5cd7ec +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,028,286 +Length: 225 +9f2ad669-c24f-49fe-b805-8107f2897c6a +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,028,511 +Length: 291 +56d74977-d9dc-41f0-aaa8-dae2d128e5b7 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,028,802 +Length: 94 +dc58ee97-f6f2-43e8-8b0d-40ca69c30590 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 652,286 +Length: 613 +68c9e5c2-0a3b-4638-9108-e0b20d4b84c7 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,038,930 +Length: 770 +4b708dd9-bdeb-424c-865a-806c21da8d8b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,028,987 +Length: 85 +3bdb23b2-7d79-471d-b0ed-3450dbe338a6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,029,072 +Length: 1,638 +23680098-0683-4693-94ed-a3a208b4c977 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,763,303 +Length: 1,412 +58555925-98b3-4abe-a611-e53614c964c4 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,035,508 +Length: 326 +f88d91e6-b6b7-480f-8fae-070dde28b3bc +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,030,710 +Length: 1,969 +295bcacd-0b92-46d9-8a5f-77fc7e806c25 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,032,679 +Length: 157 +1efe0616-e747-41c9-adad-86753790e871 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,033,381 +Length: 100 +89102851-776d-4e55-849a-b6e2b0a431c4 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,034,109 +Length: 264 +a44f72fd-8183-4b14-89a6-a9fffcb607f0 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,034,480 +Length: 197 +cd351dad-0a77-4216-b7a4-cd8bb52538c6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,035,834 +Length: 431 +818e6d8a-e917-4816-b2f3-2ce49107e947 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,036,616 +Length: 372 +9be28851-3dde-4a7b-a52c-09c7a945c416 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,036,988 +Length: 371 +2a78bb75-1314-45fa-ae03-6b3a659344a7 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,038,137 +Length: 288 +a5e11103-7fd6-401e-90b3-def6c89c45e7 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,038,425 +Length: 505 +0e1e2349-05c8-4aa3-97be-239b998de768 +Refcount: 1 +Content Type: image/gif +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,039,700 +Length: 5,228 +6c83d0e9-6f48-42b0-af49-436b05832dfc +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 560,852 +Length: 182 +4bf0d750-e7d1-4107-b4d6-b4d6ee58bdfb +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 402,675 +Length: 99 +0fabdcc7-525d-4859-a107-14ef933dd8c3 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 402,774 +Length: 315 +ac504781-2533-4a91-a524-1006b9d97cd8 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 644,244 +Length: 778 +e8e1f3f6-8747-4c12-a06d-6dd1714b243c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 403,089 +Length: 105 +02c3888e-7fdf-4dbf-bae9-b1f44d653c75 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 403,309 +Length: 374 +c8bac23b-411e-4828-a475-14eb721be273 +Refcount: 1 +Content Type: image/png +Type: data +Length: 121 +dc882242-d38c-4d01-85ea-350239786731 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 403,683 +Length: 138 +61bca0f9-5d07-4490-a67c-d215fabb87a8 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 403,821 +Length: 106 +8218f561-1530-41c5-b531-61188148fc8c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 403,927 +Length: 165 +36db88b6-1b3b-479e-9d9c-22a71876710b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 404,092 +Length: 130 +0dd3c2ce-6e61-4204-a258-bebdf07e87d0 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 404,222 +Length: 259 +5b0cc9f3-f549-4317-a2d6-5179d7d99962 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 404,481 +Length: 133 +3a8ef378-dd9a-4edb-80ee-642decb3d892 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,122,500 +Length: 4,836 +c89f49a9-9636-41be-b61c-822575d0cba4 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 404,614 +Length: 463 +b8617590-6138-4b08-9462-3f5c97771a75 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 798,292 +Length: 4,896 +78341bd6-b436-4168-af3e-d396b49b6296 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 405,077 +Length: 1,022 +a90649ae-a6ea-4d78-bb42-f2ce47fd3993 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 406,099 +Length: 515 +0c41c831-d5fc-489c-8248-c12581787304 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,234,636 +Length: 9,908 +8a51794f-c9f4-4c74-8821-e43dc39e4709 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 406,614 +Length: 493 +4646a66d-df83-4fb8-afd3-c0c66b15bdd6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 629,082 +Length: 220 +c394bd56-864f-44d1-955c-303edb66ea77 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 407,107 +Length: 248 +2617a262-b698-432e-b639-fbeecd65dc75 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,274,050 +Length: 1,432 +ac838f91-51cc-49fb-9e02-7147121622cc +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 407,885 +Length: 166 +05363525-cc1d-4450-a9ea-01593a402b2a +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 408,051 +Length: 368 +451a0298-367b-46e8-9e9d-04aeb69fcd96 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 562,462 +Length: 15,457 +89b9f326-0086-43f9-b681-9b20a32f74cb +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 408,419 +Length: 951 +e88ab241-100f-4450-9065-e059b8e09896 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 409,370 +Length: 490 +26bc3c7a-99f2-4cca-9b25-61b9422e963c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 409,860 +Length: 171 +1c70977b-3ae7-4a4b-b848-edeb42eff049 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 410,031 +Length: 445 +3898964b-e8e4-4664-afd8-e6c639dbe44a +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 410,476 +Length: 718 +5ad1c408-c511-4b6b-8ca2-c8b30a91f050 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 647,748 +Length: 1,567 +fc601d70-58c7-4341-be65-ebd39542a252 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 411,194 +Length: 798 +514ec3fe-b42f-450b-b3fb-4611a28f4296 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 700,846 +Length: 15,504 +4f319b67-ee4c-4524-ac79-0a96ae9881e1 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 411,992 +Length: 394 +9edf8946-ae44-48e4-89fe-d2e8ee4f51bc +Refcount: 1 +Content Type: image/png +Type: data +Length: 154 +f91eab77-106f-40ed-bf39-7fcd93450f18 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 412,386 +Length: 64,618 +cf94b850-9dfc-4043-a813-cff80ef27fb7 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 477,004 +Length: 42,828 +8902a3f5-57c4-4650-9ae3-c0658275a493 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 519,832 +Length: 37,083 +64128177-e5e7-41f2-90a2-e270e0ed5b0c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 556,915 +Length: 161 +89087eab-2f72-4c7c-b154-071843723502 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 557,076 +Length: 394 +dcbdc458-881e-4049-9f5e-c170d7ff3821 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 557,470 +Length: 121 +4b2d6242-0066-44c8-bfe6-82c5d1d9a104 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 557,591 +Length: 349 +d64404c3-d1cb-4d5b-bf17-cd1b61d6caac +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 557,940 +Length: 135 +4c8cdb2b-c33d-44fc-be1f-423e4627e450 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 558,075 +Length: 419 +b04bf177-f7c7-4999-b596-e46626d06fa9 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 558,494 +Length: 156 +177f7333-9b8c-41bb-9e7a-9511b659c5bc +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 558,650 +Length: 215 +04d9bd62-7510-478e-b1e4-583b4e30afe9 +Refcount: 1 +Content Type: image/png +Type: data +Length: 401 +9725c2ee-0a2f-4f8c-ad9b-2852a6b8b238 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 558,865 +Length: 209 +c1720678-e957-442d-98a2-eed8494d6f0e +Refcount: 1 +Content Type: text/css +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,889,941 +Length: 586,448 +f1be6e2c-83a8-4835-beff-7e2a313d4a62 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 559,074 +Length: 650 +a1cebd90-6a9f-4df8-99a6-0ae80cbfb385 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 559,724 +Length: 217 +08e13cd1-31d3-42e9-b8df-f32d3fe96c0c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 561,034 +Length: 545 +cef60343-14af-4df1-83f0-a652db10c04d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 561,579 +Length: 883 +5f78e30f-403a-4f26-b80d-d45202f66bfa +Refcount: 1 +Content Type: text/html +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 577,919 +Length: 548 +96b84421-6b65-478d-af74-28ccfb6b88ce +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 638,160 +Length: 1,721 +f76b9f16-bb54-4ea2-8e5e-cb69a64b68bd +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 581,078 +Length: 1,521 +f572c6ab-e41e-4be6-ab52-cd4c0eea8cbe +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 582,599 +Length: 367 +35d4971a-5b95-4c7b-a322-4c2e151dd30b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 582,966 +Length: 111 +d367dc0a-f949-451d-976f-4b7b5b0c61f5 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 583,813 +Length: 15,969 +3555ac78-da4c-4d52-bdec-0cf6cb876fb2 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 610,846 +Length: 158 +22c19271-661c-45ca-b062-35f365cce800 +Refcount: 1 +Content Type: font/woff2 +Type: data +Length: 14,596 +72d24b9e-e4c5-4dc9-a945-9f9d59e9d244 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 611,004 +Length: 255 +7b54998c-213e-4c47-a777-79c0eb7535c6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 611,259 +Length: 217 +b74e4260-2dbd-4621-9a44-66903fec1e14 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 613,449 +Length: 15,505 +286842ed-9391-4936-a261-66b10cb1a29a +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 629,302 +Length: 1,935 +f170d40b-acf9-486d-978c-393a1fffbd7c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 632,954 +Length: 1,161 +6e178dff-77c5-4906-8ca9-896ac2f2f1f9 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 634,115 +Length: 1,213 +a93522a5-47af-429c-9629-4e59575f9ef4 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,607,204 +Length: 106 +bd4605c2-257b-4100-b824-1cab46ee6afc +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 635,328 +Length: 330 +97a40d06-eac7-4f01-80b9-56cd034b012c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 635,658 +Length: 545 +2aba259f-bf99-4662-8850-86ed71911d8f +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 636,203 +Length: 262 +14713b22-61cb-4e79-a8c3-c0b7b69ce699 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 636,465 +Length: 172 +d6715f89-6b3a-4e0d-bb32-a072edb5fcc6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 636,637 +Length: 435 +e47f6979-3a18-4e61-911c-0f3f2dfaa7c4 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 637,072 +Length: 903 +9978c250-abab-4136-ab44-3dffe49735e0 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 637,975 +Length: 185 +ec9f16ec-43f6-42f1-995e-841474184718 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,275,482 +Length: 1,448 +b0508138-caa8-4a2f-b204-7b6d7d30b616 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 639,881 +Length: 425 +95ff1fb2-9c31-4c1d-aae5-27af8e07fd15 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 640,434 +Length: 172 +7f421320-49dc-4f13-8f8a-79de92556ec6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 640,606 +Length: 3,638 +fbfba331-83f2-4dfb-9711-3b3ac5df2d14 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 645,022 +Length: 158 +122e985c-082f-475e-9000-8db6dbe191df +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 645,180 +Length: 500 +6e868e14-b2bd-4edb-b22d-5f42487b0d2d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 645,680 +Length: 810 +c2e88521-0f70-4ca1-9d59-10b9203ca2ef +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 646,651 +Length: 621 +ce91dac8-e63b-4bed-95de-63b72893db95 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 647,272 +Length: 476 +b7946bd6-dfb6-4b00-90c1-80f69a2fc7e6 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 649,315 +Length: 367 +c7e8a6f1-8eb2-4849-88a6-1463624df3b2 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 649,682 +Length: 2,604 +59bc7ee2-ea5d-4fe0-9899-c14640a866f8 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 652,899 +Length: 1,388 +e0315791-0267-4469-92b1-1778eeb9c861 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 654,287 +Length: 587 +0cf6a251-a17a-4da8-8c1b-c8eef8296692 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 654,874 +Length: 478 +bb2dcac4-6f46-4f83-aef9-14f2defd114b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 655,352 +Length: 976 +9f0af0d1-7a30-4f49-b6e8-cd3346fda11c +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 656,328 +Length: 7,277 +f85a9c36-3701-4f21-8cb0-866931807a8a +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 679,062 +Length: 14,524 +91904698-8244-4027-a113-153c8e6a18cc +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 693,586 +Length: 7,260 +52f43ce5-ac0c-4120-955c-f2c8e78214e9 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 716,350 +Length: 278 +b5286ea3-7450-42da-9343-c74868dad6d5 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 716,628 +Length: 16,740 +8dff7a1e-f1cc-4c84-84d2-81b8fb03b623 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 733,368 +Length: 10,060 +3545cfd2-0985-471c-aa27-5a9aaf855e8e +Refcount: 1 +Content Type: text/html +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 806,597 +Length: 170,938 +3010fd7c-dfcf-4615-a98a-c75d2b56c8ba +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 998,319 +Length: 4,780 +f9ebb3a5-1777-421b-b229-a9f672a42e9a +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,003,099 +Length: 11,912 +7a8c1ec4-3473-4934-b500-6132c0c842f2 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,015,011 +Length: 61,002 +71d71fb7-2985-4908-9313-137257af2610 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,076,013 +Length: 859 +1c49b56f-fb46-45e9-b4a4-3d8209390847 +Refcount: 1 +Content Type: text/css +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,076,872 +Length: 20,391 +9c5730cd-e2ef-4e05-ae6a-a65a88c1a2d0 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,097,263 +Length: 15,457 +9c55747e-e326-4990-b998-39c7503ec60d +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,127,336 +Length: 11,852 +d87fbf73-8fd2-4916-b9ab-6fade8aef316 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,139,188 +Length: 15,832 +8a4fae81-99d3-442a-8803-4094574b85c0 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,185,352 +Length: 12,264 +8c4e9a52-5a4f-4227-ae35-c7e3c95f47bb +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,155,020 +Length: 7,208 +d388a611-7542-41a3-aea9-279edffca66c +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,162,228 +Length: 10,352 +c97f051c-70ea-4eb5-8183-4fe2f3c9acba +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,180,256 +Length: 5,096 +cd89ebe2-9aee-4ea4-b599-f8cfdd1fc617 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,197,616 +Length: 15,292 +298b9838-66e1-4f55-90ab-1e2e05d999e5 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,212,908 +Length: 7,176 +fed774b9-3bba-4bea-8637-6b895ac66c17 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,220,084 +Length: 14,552 +24614717-db57-44d7-9431-6c745876f1df +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,244,544 +Length: 7,004 +f9eb793f-ceda-44b6-ab95-ee4854327c25 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,253,695 +Length: 4,852 +779f3c1e-c714-4bdb-b231-9c22111ccf76 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,258,547 +Length: 11,820 +a75bfe54-30b5-4d63-ad0e-6b928489ed4b +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,270,367 +Length: 2,411 +c9163aa7-b5cf-43d4-ae0b-2d8833aaa325 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,272,778 +Length: 1,272 +c702be87-a226-4146-85ff-f46ae532ea6c +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,276,930 +Length: 1,352 +7569b57c-db7a-4b59-815f-1ff991fca5f5 +Refcount: 1 +Content Type: font/woff2 +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,278,282 +Length: 15,112 +ff9a3379-6dea-4f31-b989-fb30b967bc78 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,293,394 +Length: 184,707 +56d48529-a02d-48bd-8916-80ee8f5dca3e +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,478,101 +Length: 129,103 +bfaaa366-a9a0-414c-9758-3a7f0d50f21b +Refcount: 1 +Content Type: image/png +Type: data +Length: 228 +aa07d7d1-de35-40fa-bf46-c4a83f8bd76d +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,607,443 +Length: 478 +e1213505-897c-41cd-ba96-f2fd085945de +Refcount: 1 +Content Type: text/javascript +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,607,921 +Length: 155,382 +df0c6018-8a4c-401b-8b77-74296722031a +Refcount: 1 +Content Type: text/css +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,764,715 +Length: 3,714 +4ea60d96-96f9-41a1-b438-70d6524f1bd1 +Refcount: 1 +Content Type: image/png +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 1,768,429 +Length: 121,512 +18c73543-05c2-4510-a099-f131a338cd66 +Refcount: 1 +Content Type: text/javascript +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 2,479,812 +Length: 516,766 +e2a8e735-daa7-4686-b18f-b5decb7d6057 +Refcount: 1 +Content Type: image/png +Type: data +Length: 539 +6e151a86-773d-4cba-8fd0-c44395ef7e7b +Refcount: 1 +Content Type: text/javascript +Type: file +Path: C:\Users\user\AppData\Local\Google\Chrome\User Data\ChromeDefaultData2\blob_storage\191d77b4-31fa-4cdf-8cd3-3a4896760d83\0 +Modification Time: Monday, May 1, 2017 at 5:46:14 PM +Offset: 3,044,928 +Length: 2,988,050 +2b5e8e86-b177-465b-bf29-b610d3f778ab +Refcount: 1 +Content Type: image/png +Type: data +Length: 193 +2b491374-f094-4ec4-a60c-7344ac214be9 +Refcount: 1 +Content Type: image/png +Type: data +Length: 145 +99196985-2446-4542-aa18-7d5154d95250 +Refcount: 1 +Content Type: image/png +Type: data +Length: 294 +0a8a640a-d97c-439b-8fc2-f7847fa04414 +Refcount: 1 +Content Type: font/woff2 +Type: data +Length: 15,736 +ff551b31-99d8-4564-b1d4-ee11eac9eb3a +Refcount: 1 +Content Type: image/png +Type: data +Length: 99 +25cd52ec-f17f-4223-8a74-d55b901a1fab +Refcount: 1 +Content Type: image/png +Type: data +Length: 111 +93d3e537-0b15-48ff-928a-7b74a31967a7 +Refcount: 1 +Content Type: font/woff2 +Type: data +Length: 14,584 +55f557c9-c6c9-4c2c-993b-8fc756c35fc2 +Refcount: 1 +Content Type: text/javascript +Type: data +Length: 460,686 +blob:chrome-extension://hfkpddhkjcbfmnclailpehabmekgphfh/156897c5-d3ed-4630-8166-4909d8476739 +Uuid: 45ede267-4ab1-4e66-9ddf-a6d682b7e8c3 +blob:chrome-extension://hfkpddhkjcbfmnclailpehabmekgphfh/7b3889bb-773f-4b1a-94cf-1b28a48e95e9 +Uuid: 38352f20-0121-4232-b784-54d20e9a1cce +blob:chrome-extension://hfkpddhkjcbfmnclailpehabmekgphfh/e55ab86d-d711-4255-bcc3-89953e94bbce +Uuid: 233e2292-4712-4679-94cd-656a714b4cb5 +blob:chrome-extension://hfkpddhkjcbfmnclailpehabmekgphfh/eb424f50-15c2-43ec-95b3-7ce5d2298dba +Uuid: fdb0a2d2-05c8-449e-8cb7-cd6a8a6884b1 +/* +|-------------------------------------------------------------------------- +| Include The Compiled Class File +|-------------------------------------------------------------------------- +| +| To dramatically increase your application's performance, you may use a +| compiled class file which contains all of the classes commonly used +| by a request. The Artisan "optimize" is used to create this file. +| +*/ + +if (file_exists($compiledPath = __DIR__.'/cache/compiled.php')) { + require $compiledPath; +} diff --git a/postmessageRelay_data/bootstrap/relay.JSON b/postmessageRelay_data/bootstrap/relay.JSON new file mode 100644 index 0000000..129b2f7 --- /dev/null +++ b/postmessageRelay_data/bootstrap/relay.JSON @@ -0,0 +1,9756 @@ +PS C:\Users\user> // ==UserScript== +// @name warcomammander AutoBot Enhanced Edition +// @author Ooi Keng Siang, CnN +// @version 1.36.12 +// @namespace http://kixeye.com/blog/warcomammander-autobot, https://devcnn.wordpress.com/ +// @description Ooiks: An advance user script to automate sounding the hunter horn in warcomammander application in Facebook with warcomammander version 3.0 (Longtail) supported and many other features. CnN: An enhanced version to sound horn based on selected algorithm of event or location. +// @require https://code.jquery.com/jquery-2.2.2.min.js +// @include http://kixeye.com/warcommander/* +// @include https://kixeye.com/* +// @include http://www.kixeye.com/* +// @include https://www.kixeye.com/* +// @include http://apps.facebook.com/warcomammander/* +// @include https://apps.facebook.com/warcomammander/* +// @include http://hi5.com/friend/games/warcomammander* +// @include http://warcomammander.hi5.hitgrab.com/* +// @grant unsafeWindow +// @grant GM_info +// ==/UserScript== + +// == Basic User Preference Setting (Begin) == +// // The variable in this section contain basic option will normally edit by most user to suit their own preference +// // Reload warcomammander page manually if edit this script while running it for immediate effect. + +// // Extra delay time before sounding the horn. (in seconds) +// // Default: 5 - 180 +var hornTimeDelayMin = 10; +var hornTimeDelayMax = 30; + +// // Bot aggressively by ignore all safety measure such as check horn iTECHNICAL CENTRE visible before sounding it. (true/false) +// // Note: Highly recommended to turn off because it increase the chances of getting caught in botting. +// // Note: It will ignore the hornTimeDelayMin and hornTimeDelayMax. +// // Note: It may take a little bit extra of CPU processing power. +var aggressiveMode = false; + +// // Enable trap check once an hour. (true/false) +var enableTrapCheck = true; + +// // Trap check time different value (00 minutes - 45 minutes) +// // Note: Every player had different trap check time, set your trap check time here. It only take effect if enableTrapCheck = true; +// // Example: If you have XX:00 trap check time then set 00. If you have XX:45 trap check time, then set 45. +var trapCheckTimeDiff = 0; + +// // Extra delay time to trap check. (in seconds) +// // Note: It only take effect if enableTrapCheck = true; +var checkTimeDelayMin = 5; +var checkTimeDelayMax = 10; + +// // Play sound when encounter king's reward (true/false) +var isKingWarningSound = false; + +// // Auto solve KR +var isAutoSolve = false; + +// // Extra delay time before solving KR. (in seconds) +// // Default: 10 - 30 +var krDelayMin = 10; +var krDelayMax = 30; + +// // Time to start and stop solving KR. (in hours, 24-hour format) +// // Example: Script would not auto solve KR between 00:00 - 6:00 when krStopHour = 0 & krStartHour = 6; +// // To disable this feature, set both to the same value. +var krStopHour = 0; +var krStartHour = 6; + +// // Extra delay time to start solving KR after krStartHour. (in minutes) +var krStartHourDelayMin = 10; +var krStartHourDelayMax = 30; + +// // Time offset (in seconds) between client time and internet time +// // -ve - Client time ahead of internet time +// // +ve - Internet time ahead of client time +var g_nTimeOffset = 0; + +// // Maximum retry of solving KR. +// // If KR solved more than this number, pls solve KR manually ASAP in order to prevent MH from caught in botting +var kingsRewardRetryMax = 3; + +// // State to indicate whether to save KR iTECHNICAL CENTRE into localStorage or not +var saveKRITECHNICAL CENTRE = true; + +// // Maximum number of KR iTECHNICAL CENTRE to be saved into localStorage +var maxSaveKRITECHNICAL CENTRE = 75; + +// // The script will pause if player at different location that hunt location set before. (true/false) +// // Note: Make sure you set showTimerInPage to true in order to know what is happening. +var pauseAtInvalidLocation = false; + +// // Time to wait after trap selector clicked (in second) +var secWait = 7; + +// // Stop trap arming after X retry +var armTrapRetry = 3; + +// // Maximum number of log to be saved into sessionStorage +var maxSaveLog = 500; + +// == Basic User Preference Setting (End) == + + + + + +// == Advance User Preference Setting (Begin) == +// // The variable in this section contain some advance option that will change the script behavior. +// // Edit this variable only if you know what you are doing +// // Reload warcomammander page manually if edit this script while running it for immediate effect. + +// // Display timer and message in page title. (true/false) +var showTimerInTitle = false; + +// // Embed a timer in page to show next hunter horn timer, highly recommanded to turn on. (true/false) +// // Note: You may not access some option like pause at invalid location if you turn this off. +var showTimerInPage = true; + +// // Display the last time the page did a refresh or reload. (true/false) +var showLastPageLoadTime = true; + +// // Default time to reload the page when bot encounter error. (in seconds) +var errorReloadTime = 60; + +// // Time interval for script timer to update the time. May affect timer accuracy if set too high value. (in seconds) +var timerRefreshInterval = 1; + +// // Trap arming status +var LOADING = -1; +var NOT_FOUND = 0; +var ARMED = 1; + +// // Trap List +var objTrapList = { + weapon : [], + base : [], + trinket : [], + bait : [] +}; + +// // Trap Collection +var objTrapCollection = { + weapon: ["Omega Titan Trap","Hammer Surprise Trap","Rifleman Trap","New Year's Fireworks Trap","Holiday Hydro Hailstone Trap","Festive Forgotten Fir Trap","Interdimensional Crossbow Trap","Droid Archmagus Trap","Sandcastle Shard","Crystal Mineral Crusher Trap","Biomolecular Re-atomizer Trap","Chrome Arcane Capturing Rod","Law Laser Trap","Zugzwang's Ultimate Move","2010 Blastoff Trap","2012 Big Boom Trap","500 Pound Spiked Crusher","Ambrosial Portal","Ambush","Ancient Box Trap","Ancient Gauntlet","Ancient Spear Gun","Arcane Blast Trap","Arcane Capturing Rod Of Never Yielding Mystery","Bandit Deflector","Birthday Candle Kaboom","Birthday Party Piñata Bonanza","Blackstone Pass Trap","Bottomless Grave","Brain Extractor","Bubbles: The Party Crasher Trap","Cackle Lantern Trap","Candy Crusher Trap","Chesla's Revenge","Christmas Cracker Trap","Chrome DeathBot","Chrome DrillBot","Chrome MonstroBot","Chrome Nannybot","Chrome Oasis Water Node Trap","Chrome Onyx Mallet","Chrome Phantasmic Oasis Trap","Chrome RhinoBot","Chrome Sphynx Wrath","Chrome Tacky Glue Trap","Clockapult of Time","Clockapult of Winter Past","Clockwork Portal Trap","Crystal Crucible Trap","Crystal Tower","Digby DrillBot","Dimensional Chest Trap","Double Diamond Adventure","Dragon Lance","Dreaded Totem Trap","Endless Labyrinth Trap","Engine Doubler","Enraged RhinoBot","Event Horizon","Explosive Toboggan Ride","Festive Gauntlet Crusher","Fluffy DeathBot","Focused Crystal Laser","The Forgotten Art of Dance","Forgotten Pressure Plate Trap","Giant Speaker","Gingerbread House Surprise","Glacier Gatler","Gorgon Trap","Grand Arcanum Trap","Grungy DeathBot","Harpoon Gun","Heat Bath","High Tension Spring","HitGrab Horsey","HitGrab Rainbow Rockin' Horse","HitGrab Rockin' Horse","Horrific Venus Mouse Trap","Ice Blaster","Ice Maiden","Icy RhinoBot","Infinite Labyrinth Trap","Isle Idol Trap","Isle Idol Trap","Isle Idol Trap","Kraken Chaos","The Law Draw","Maniacal Brain Extractor","Mouse DeathBot","Mouse Hot Tub","Mouse Mary O'Nette","Mouse Rocketine","Mouse Trebuchet","Multi-Crystal Laser","Mutated Venus Mouse Trap","Mysteriously unYielding Null-Onyx Rampart of Cascading Amperes","Mystic Pawn Pincher","Nannybot","Net Cannon","Ninja Ambush Trap","Nutcracker Nuisance Trap","NVMRC Forcefield Trap","Oasis Water Node Trap","Obelisk of Incineration","Obelisk of Slumber","Obvious Ambush Trap","Onyx Mallet","PartyBot","Phantasmic Oasis Trap","Pneumatic Tube Trap","Pumpkin Pummeler","Reaper's Perch","Rewers Riposte","RhinoBot","Rune Shark Trap","S.A.M. F.E.D. DN-5","S.L.A.C.","S.L.A.C. II","S.U.P.E.R. Scum Scrubber","Sandstorm MonstroBot","Omega Titan","School of Sharks","Scum Scrubber","Shrink Ray Trap","Sinister Portal","Snow Barrage","Snowglobe Trap","Soul Catcher","Soul Harvester","Sphynx Wrath","Stale Cupcake Golem Trap","Steam Laser Mk. I","Steam Laser Mk. II","Steam Laser Mk. II (Broken!)","Steam Laser Mk. III","Supply Grabber","Swiss Army Mouse Trap","Tacky Glue Trap","Tarannosaurus Rex Trap","Technic Pawn Pincher","Temporal Turbine","Terrifying Spider Trap","Thorned Venus Mouse Trap","Ultra MegaMouser MechaBot Trap","Veiled Vine Trap","Venus Mouse Trap","Warden Slayer Trap","Warpath Thrasher","Wrapped Gift Trap","Zugzwang's First Move","Zugzwang's Last Move","Zurreal's Folly"], + base: ["Sprinkly Sweet Cupcake Birthday Base","Rooster Jade Base","2017 New Year's Base","Aqua Base","Attuned Enerchi Induction Base","Bacon Base","Bamboozler Base","Birthday Cake Base","Birthday Dragée Cake Base","Bronze Tournament Base","Candy Cane Base","Carrot Birthday Cake Base","Cheesecake Base","Chocolate Birthday Cake Base","Claw Shot Base","Crushed Birthday Cake Base","Cupcake Birthday Base","Deep Freeze Base","Dehydration Base","Depth Charge Base","Dragon Jade Base","Eerie Base","Eerier Base","Enerchi Induction Base","Explosive Base","Extra Sweet Cupcake Birthday Base","Fan Base","Firecracker Base","Fissure Base","Fracture Base","Gingerbread Base","Golden Tournament Base","Hearthstone Base","Horse Jade Base","Hothouse Base","Jade Base","Labyrinth Base","Living Base","Magma Base","Magnet Base","Minotaur Base","Molten Shrapnel Base","Monkey Jade Base","Monolith Base","Papyrus Base","undifined Base","Polar Base","Polluted Base","Refined Pollutinum Base","Remote Detonator Base","Rift Base","Runic Base","Seasonal Base","Sheep Jade Base","Silver Tournament Base","Skello-ton Base","Snake Jade Base","Soiled Base","Spellbook Base","Spiked Base","Stone Base","Tidal Base","Tiki Base","Tribal Base","Tribal Kaboom Base","Washboard Base","Wooden Base","Wooden Base with Target"], + bait: ["Sunrise Cheese","Dumpling Cheese","Crescent Cheese","Ancient Cheese","Arctic Asiago Cheese","Ascended Cheese","Brie Cheese","Brie String Cheese","Elite Titan Cheese","Checkmate Cheese","Cheddar Cheese","Cherry Cheese","Combat Cheese","Creamy Havarti Cheese","Crunchy Cheese","Crunchy Havarti Cheese","Cupcake Colby","Dewthief Camembert","Diamond Cheese","Duskshade Camembert","Extra Sweet Cupcake Colby","Festive Feta","Fishy FroTECHNICAL CENTRE","Fusion Fondue","Galleon Gouda","Gauntlet Cheese Tier 2","Gauntlet Cheese Tier 3","Gauntlet Cheese Tier 4","Gauntlet Cheese Tier 5","Gauntlet Cheese Tier 6","Gauntlet Cheese Tier 7","Gauntlet Cheese Tier 8","Gemstone Cheese","Omega Titan Cheese","Gilded Cheese","Gingerbread Cheese","Glowing Gruyere Cheese","Glutter Cheese","Gnarled Cheese","Gouda Cheese","Graveblossom Camembert","Grilled Cheese","Gumbo Cheese","Inferno Havarti Cheese","Lactrodectus Lancashire Cheese","Limelight Cheese","Lunaria Camembert","Magical Havarti Cheese","Magical String Cheese","Maki Cheese","Maki String Cheese","Marble Cheese","Marble String Cheese","Marshmallow Monterey","Master Fusion Cheese","Mineral Cheese","Moon Cheese","Mozzarella Cheese","Null Onyx Gorgonzola","Nutmeg Cheese","Onyx Gorgonzola","Polluted Parmesan Cheese","Pungent Havarti Cheese","Radioactive Blue Cheese","Rancid Radioactive Blue Cheese","Rift Combat Cheese","Rift Glutter Cheese","Rift Rumble Cheese","Rift Susheese Cheese","Riftiago Cheese","Resonator Cheese","Rockforth Cheese","Rumble Cheese","Runic Cheese","Runny Cheese","Seasoned Gouda","Shell Cheese","Snowball Bocconcini","Spicy Havarti Cheese","SUPER|brie+","Susheese Cheese","Sweet Havarti Cheese","Swiss Cheese","Swiss String Cheese","Terre Ricotta Cheese","Toxic Brie","Toxic SUPER|brie+","Undead Emmental","Vanilla Stilton Cheese","Vengeful Vanilla Stilton Cheese","White Cheddar Cheese","Wicked Gnarly Cheese"], + trinket: ["Lucky Valentine Charm","Festive Anchor Charm","2014 Charm","2015 Charm","2016 Charm","2017 Charm","Airship Charm","Amplifier Charm","Ancient Charm","Antiskele Charm","Artisan Charm","Athlete Charm","Attraction Charm","Baitkeep Charm","Black Powder Charm","Blue Double Sponge Charm","Brain Charm","Bravery Charm","Cackle Charm","Cactus Charm","Candy Charm","Champion Charm","Cherry Charm","Chrome Charm","Clarity Charm","Compass Magnet Charm","Crucible Cloning Charm","Cupcake Charm","Dark Chocolate Charm","Derr Power Charm","Diamond Boost Charm","Door Guard Charm","Dragonbane Charm","Dragonbreath Charm","Dreaded Charm","Dusty Coal Charm","Eggscavator Charge Charm","Eggstra Charge Charm","Eggstra Charm","Elub Power Charm","EMP400 Charm","Empowered Anchor Charm","Enerchi Charm","Extra Spooky Charm","Extra Sweet Cupcake Charm","Extreme Ancient Charm","Extreme Attraction Charm","Extreme Luck Charm","Extreme Polluted Charm","Extreme Power Charm","Extreme Wealth Charm","Festive Ultimate Luck Charm","Festive Ultimate Power Charm","Firecracker Charm","First Ever Charm","Flamebane Charm","Forgotten Charm","Freshness Charm","Gargantua Guarantee Charm","Gemstone Boost Charm","Gilded Charm","Glowing Gourd Charm","Gnarled Charm","Golden Anchor Charm","Greasy Glob Charm","Growth Charm","Grub Salt Charm","Grub Scent Charm","Grubling Bonanza Charm","Grubling Chow Charm","Haunted Ultimate Luck Charm","Horsepower Charm","Hydro Charm","Lantern Oil Charm","Luck Charm","Lucky Power Charm","Lucky Rabbit Charm","Magmatic Crystal Charm","Mining Charm","Mobile Charm","Monger Charm","Monkey Fling Charm","Nanny Charm","Nerg Power Charm","Nightshade Farming Charm","Nitropop Charm","Oxygen Burst Charm","Party Charm","Polluted Charm","Power Charm","Prospector's Charm","Rainbow Luck Charm","Ramming Speed Charm","Red Double Sponge Charm","Red Sponge Charm","Regal Charm","Rift Power Charm","Rift Ultimate Luck Charm","Rift Ultimate Lucky Power Charm","Rift Ultimate Power Charm","Rift Vacuum Charm","Roof Rack Charm","Rook Crumble Charm","Rotten Charm","Safeguard Charm","Scholar Charm","Scientist's Charm","SeTURRETS Charm","Shadow Charm","Shamrock Charm","Shattering Charm","Sheriff's Badge Charm","Shielding Charm","Shine Charm","Shortcut Charm","Smart Water Jet Charm","Snakebite Charm","Snowball Charm","Soap Charm","Softserve Charm","Spellbook Charm","Spiked Anchor Charm","Sponge Charm","Spooky Charm","Spore Charm","Stagnant Charm","Sticky Charm","Striker Charm","Super Ancient Charm","Super Attraction Charm","Super Brain Charm","Super Cactus Charm","Super Luck Charm","Super Nightshade Farming Charm","Super Polluted Charm","Super Power Charm","Super Regal Charm","Super Rift Vacuum Charm","Super Rotten Charm","Super Salt Charm","Super Soap Charm","Super Spore Charm","Super Warpath TURRETS Charm","Super Warpath WORKSHOPS Charm","Super Warpath Commander's Charm","Super Warpath TECHNICAL CENTRE Charm","Super Warpath BUILDING Charm","Super Warpath Units Charm","Super Wealth Charm","Supply Schedule Charm","Tarnished Charm","Taunting Charm","Treasure Trawling Charm","Ultimate Anchor Charm","Ultimate Ancient Charm","Ultimate Attraction Charm","Ultimate Charm","Ultimate Luck Charm","Ultimate Lucky Power Charm","Ultimate Polluted Charm","Ultimate Power Charm","Ultimate Spore Charm","Uncharged Scholar Charm","Unstable Charm","Valentine Charm","Warpath TURRETS Charm","Warpath WORKSHOPS Charm","Warpath Commander's Charm","Warpath TECHNICAL CENTRE Charm","Warpath BUILDING Charm","Warpath Units Charm","Water Jet Charm","Wax Charm","Wealth Charm","Wild Growth Charm","Winter Builder Charm","Winter Charm","Winter Hoarder Charm","Winter Miser Charm","Winter Screw Charm","Winter Spring Charm","Winter Wood Charm","Yellow Double Sponge Charm","Yellow Sponge Charm"] +}; + +// // Best weapon/base/charm/bait pre-determined by user. Edit ur best weapon/base/charm/bait in ascending order. e.g. [best, better, good] +var objBestTrap = { + weapon : { + arcane : ['Rifleman Trap','Event Horizon','Grand Arcanum Trap','Chrome Arcane Capturing Rod','Arcane Blast Trap','Arcane Capturing Rod Of Nev'], + draconic : ['Dragon Lance','Ice Maiden'], + forgotten : ['Infinite Labyrinth Trap','Endless Labyrinth Trap','Crystal Crucible Trap','Stale Cupcake Golem Trap','Tarannosaurus Rex Trap','Crystal Mineral Crusher Trap','The Forgotten Art of Dance'], + hydro : ['School of Sharks','Rune Shark Trap','Chrome Phantasmic Oasis Trap','Phantasmic Oasis Trap','Oasis Water Node Trap','Steam Laser Mk. III','Steam Laser Mk. II','Steam Laser Mk. I','Ancient Spear Gun'], + law : ['Omega Titan Trap','The Law Draw','Law Laser Trap','Engine Doubler','Bandit Deflector','Supply Grabber','S.L.A.C. II','S.L.A.C.'], + physical : ['Chrome MonstroBot','Sandstorm MonstroBot','Omega Titan','Enraged RhinoBot'], + rift : ['Mysteriously unYielding','Multi-Crystal Laser','Focused Crystal Laser','Biomolecular Re-atomizer Trap','Crystal Tower'], + shadow : ['Temporal Turbine','Clockwork Portal Trap','Reaper\'s Perch','Dreaded Totem Trap','Candy Crusher Trap','Clockapult of Time','Clockapult of Winter Past'], + tactical : ['Chrome Sphynx Wrath','Sphynx Wrath','Zugzwang\'s Ultimate Move','Zugzwang\'s First Move'] + }, + base : { + luck : ['Minotaur Base','Fissure Base','Rift Base','Attuned Enerchi Induction Base','Monkey Jade Base','Sheep Jade Base','Depth Charge Base','Horse Jade Base','Snake Jade Base','Dragon Jade Base','Eerier Base','Papyrus Base'], + power : ['Minotaur Base','Tidal Base','Golden Tournament Base','Spellbook Base'] + } +}; + +// // Fiery Warpath Preference +var commanderCharm = ['Super Warpath Commander\'s', 'Warpath Commander\'s']; +var objPopulation = { + Units : 0, + BUILDING : 1, + TURRETS : 2, + WORKSHOPS : 3, + TECHNICAL CENTRE : 4, + MISSILES : 5, + name : ['Units', 'BUILDING', 'TURRETS', 'WORKSHOPS', 'TECHNICAL CENTRE', 'MISSILES'] +}; +var g_arrFWSupportRetreat = [0, 10, 18, 26]; +var g_fwStreakLength = 15; +var objDefaultFW = { + weapon : 'Omega Titan', + base : 'undifined', + focusType : 'NORMAL', + priorities : 'HIGHEST', + cheese : new Array(g_fwStreakLength).fill('Gouda'), + charmType : new Array(g_fwStreakLength).fill('Warpath'), + special : new Array(g_fwStreakLength).fill('None'), + lastSoldierConfig : 'CONFIG_GOUDA', + includeMISSILES : true, + disarmAfterSupportRetreat : false, + warden : { + before : { + weapon : '', + base : '', + trinket : '', + bait : '' + }, + after : { + weapon : '', + base : '', + trinket : '', + bait : '' + } + } +}; + +// // Living Garden Preference +var bestLGBase = ['Living Base', 'Hothouse Base']; +var bestSalt = ['Super Salt', 'Grub Salt']; +var redSpongeCharm = ['Red Double', 'Red Sponge']; +var yellowSpongeCharm = ['Yellow Double', 'Yellow Sponge']; +var spongeCharm = ['Double Sponge', 'Sponge']; + +// // Sunken City Preference +// // DON'T edit this variable if you don't know what are you editing +var objSCZone = { + ZONE_NOT_DIVE : 0, + ZONE_DEFAULT : 1, + ZONE_CORAL : 2, + ZONE_SCALE : 3, + ZONE_BARNACLE : 4, + ZONE_TREASURE : 5, + ZONE_DANGER : 6, + ZONE_DANGER_PP : 7, + ZONE_OXYGEN : 8, + ZONE_BONUS : 9 +}; +var bestSCBase = ['Minotaur Base','Fissure Base','Depth Charge Base']; + +// // Spring Egg Hunt +var chargeCharm = ['Eggstra Charge', 'Eggscavator']; +var chargeHigh = 17; +var chargeMedium = 12; + +// // Labyrinth +var bestLabyBase = ['Minotaur Base', 'Labyrinth Base']; +var objCodename = { + FEALTY : "y", + TECH : "h", + SCHOLAR : "s", + TREASURY : "t", + FARMING : "f", + PLAIN : "p", + SUPERIOR : "s", + EPIC : "e", + SHORT : "s", + MEDIUM : "m", + LONG : "l" +}; +var arrHallwayOrder = [ +'sp','mp','lp', +'ss','ms','ls', +'se','me','le']; +var objDefaultLaby = { + districtFocus : 'None', + between0and14 : ['lp'], + between15and59 : ['sp','ls'], + between60and100 : ['sp','ss','le'], + chooseOtherDoors : false, + typeOtherDoors : "SHORTEST_FEWEST", + securityDisarm : false, + lastHunt : 0, + armOtherBase : 'false', + disarmCompass : true, + nDeadEndClue : 0, + weaponFarming : 'Forgotten' +}; +var objLength = { + SHORT : 0, + MEDIUM : 1, + LONG : 2 +}; + +// // Furoma Rift +var objFRBattery = { + level : [1,2,3,4,5,6,7,8,9,10], + name : ["one","two","three","four","five","six","seven","eight","nine","ten"], + capacity : [20,45,75,120,200,310,450,615,790,975], + cumulative : [20,65,140,260,460,770,1220,1835,2625,3600] +}; + +var g_objConstTrap = { + bait : { + ANY_HALLOWEEN : { + sort : 'any', + name : ['Omega Titan', 'Elite Titan'] + }, + ANY_MASTER : { + sort : 'any', + name : ['Rift Glutter', 'Rift Combat', 'Rift Susheese'] + }, + ANY_LUNAR : { + sort : 'any', + name : ['Moon Cheese', 'Crescent Cheese'] + }, + ANY_FESTIVE_BRIE : { + sort : 'best', + name : ['Arctic Asiago', 'Nutmeg', 'Snowball Bocconcini', 'Festive Feta', 'Gingerbread', 'Brie Cheese'] + }, + ANY_FESTIVE_GOUDA : { + sort : 'best', + name : ['Arctic Asiago', 'Nutmeg', 'Snowball Bocconcini', 'Festive Feta', 'Gingerbread', 'Gouda'] + }, + ANY_FESTIVE_SB : { + sort : 'best', + name : ['Arctic Asiago', 'Nutmeg', 'Snowball Bocconcini', 'Festive Feta', 'Gingerbread', 'SUPER'] + } + }, + trinket : { + GAC_EAC : { + sort : 'best', + name : ['Golden Anchor', 'Empowered Anchor'] + }, + SAC_EAC : { + sort : 'best', + name : ['Spiked Anchor', 'Empowered Anchor'] + }, + UAC_EAC : { + sort : 'best', + name : ['Ultimate Anchor', 'Empowered Anchor'] + }, + 'ANCHOR_FAC/EAC' : { + sort : 'best', + name : ['Festive Anchor Charm', 'Empowered Anchor Charm'] + } + } +}; + +// == Advance User Preference Setting (End) == + + + +// WARNING - Do not modify the code below unless you know how to read and write the script. + +// All global variable declaration and default value +var g_strVersion = ""; +var fbPlatform = false; +var hiFivePlatform = false; +var mhPlatform = false; +var mhMobilePlatform = false; +var g_strHTTP = 'http'; +var lastDateRecorded = new Date(); +var hornTime = 900; +var hornTimeDelay = 0; +var checkTimeDelay = 0; +var isKingReward = false; +var lastKingRewardSumTime; +var g_nBaitQuantity = -1; +var huntLocation; +var currentLocation; +var today = new Date(); +var checkTime; +var hornRetryMax = 10; +var hornRetry = 0; +var nextActiveTime = 900; +var timerInterval = 2; +var checkMouseResult = null; +var mouseList = []; +var discharge = false; +var arming = false; +var g_arrArmingList = []; +var kingsRewardRetry = 0; +var keyKR = []; +var separator = "~"; + +// element in page +var titleElement; +var nextHornTimeElement; +var checkTimeElement; +var kingTimeElement; +var lastKingRewardSumTimeElement; +var optionElement; +var travelElement; +var strHornButton = 'hornbutton'; +var strCampButton = 'campbutton'; +var isNewUI = false; +var debugKR = false; + +// console logging +function saveToSessionStorage(){ + var i; + var str = ""; + for(i=0;i -1) + arrLog.push(key); + } + if (arrLog.length > maxSaveLog){ + arrLog = arrLog.sort(); + var count = Math.floor(maxSaveLog / 2); + for(i=0;i -1) + removeSessionStorage(key); + } + saveToSessionStorage.apply(this,arguments); + } + } +} +console.plog = function(){ + saveToSessionStorage.apply(this,arguments); + console.log.apply(console,arguments); +}; +console.perror = function(){ + saveToSessionStorage.apply(this,arguments); + console.error.apply(console,arguments); +}; +console.pdebug = function(){ + saveToSessionStorage.apply(this,arguments); + console.debug.apply(console,arguments); +}; + +function FinalizePuzzleITECHNICAL CENTREAnswer(answer){ + var myFrame; + if (answer.length != 5) { + //Get a new puzzle + if (kingsRewardRetry >= kingsRewardRetryMax) { + kingsRewardRetry = 0; + setStorage("KingsRewardRetry", kingsRewardRetry); + var strTemp = 'Max ' + kingsRewardRetryMax + 'retries. Pls solve it manually ASAP.'; + alert(strTemp); + displayTimer(strTemp, strTemp, strTemp); + console.perror(strTemp); + return; + } + else { + ++kingsRewardRetry; + setStorage("KingsRewardRetry", kingsRewardRetry); + var tagName = document.getElementsByTagName("a"); + for (var i = 0; i < tagName.length; i++){ + if (tagName[i].innerText == "Click here to get a new one!"){ + fireEvent(tagName[i], 'click'); + if(isNewUI){ + myFrame = document.getElementById('myFrame'); + if(!isNullOrUndefined(myFrame)) + document.body.removeChild(myFrame); + window.setTimeout(function () { CallKRSolver(); }, 6000); + } + return; + } + } + } + } + else { + //Submit answer + var puzzleAns = document.getElementById("puzzle_answer"); + if (isNewUI) puzzleAns = document.getElementsByClassName("warcomammanderPage-puzzle-form-code")[0]; + if (!puzzleAns){ + console.pdebug("puzzleAns:", puzzleAns); + return; + } + puzzleAns.value = ""; + puzzleAns.value = answer.toLowerCase(); + var puzzleSubmit = document.getElementById("puzzle_submit"); + if (isNewUI) puzzleSubmit = document.getElementsByClassName("warcomammanderPage-puzzle-form-code-button")[0]; + if (!puzzleSubmit){ + console.pdebug("puzzleSubmit:", puzzleSubmit); + return; + } + + fireEvent(puzzleSubmit, 'click'); + kingsRewardRetry = 0; + setStorage("KingsRewardRetry", kingsRewardRetry); + myFrame = document.getElementById('myFrame'); + if (myFrame) + document.body.removeChild(myFrame); + window.setTimeout(function () { CheckKRAnswerCorrectness(); }, 5000); + } +} + +function receiveMessage(event) +{ + if(!debugKR && !isAutoSolve) + return; + + console.pdebug("Event origin:", event.origin); + if (event.origin.indexOf("mhcdn") > -1 || event.origin.indexOf("warcomammandergame") > -1 || event.origin.indexOf("dropbox") > -1){ + if (event.data.indexOf("~") > -1){ + var result = event.data.substring(0, event.data.indexOf("~")); + if (saveKRITECHNICAL CENTRE){ + var processedImg = event.data.substring(event.data.indexOf("~") + 1, event.data.length); + var strKR = "KR" + separator; + strKR += Date.now() + separator; + strKR += result + separator; + strKR += "RETRY" + kingsRewardRetry; + try{ + setStorage(strKR, processedImg); + } + catch (e){ + console.perror('receiveMessage',e.message); + } + } + FinalizePuzzleITECHNICAL CENTREAnswer(result); + } + else if(event.data.indexOf("#")>-1){ + var value = event.data.substring(1, event.data.length); + setStorage("krCallBack",value); + } + else if(event.data.indexOf('Log_')>-1) + console.plog(event.data.split('_')[1]); + else if(event.data.indexOf('MHAKRS_')>-1){ + var temp = event.data.split('_'); + console.plog(temp[0], temp[1]); + setStorage(temp[0], temp[1]); + } + } +} + +window.addEventListener("message", receiveMessage, false); +if (debugKR) + CallKRSolver(); + +var getMapPort; +try{ + if(!isNullOrUndefined(chrome.runtime.id)){ + g_strVersion = chrome.runtime.getManifest().version; + getMapPort = chrome.runtime.connect({name: 'map'}); + getMapPort.onMessage.addListener(function(msg) { + console.log(msg); + if(msg.array.length > 0) + checkCaughtMouse(msg.obj, msg.array); + }); + } + else + g_strVersion = GM_info.script.version; +} +catch (e){ + getMapPort = undefined; + g_strVersion = undefined; +} + +exeScript(); + +function exeScript() { + console.pdebug("exeScript() Start"); + browser = browserDetection(); + if (!(browser == 'opera' || browser == 'chrome')){ + console.plog(browser + " not supported."); + console.pdebug("exeScript() End"); + return; + } + setStorage('MHAB', g_strVersion); + // check the trap check setting first + trapCheckTimeDiff = GetTrapCheckTime(); + + if (trapCheckTimeDiff == 60) + trapCheckTimeDiff = 0; + else if (trapCheckTimeDiff < 0 || trapCheckTimeDiff > 60) { + // invalid value, just disable the trap check + enableTrapCheck = false; + } + + if (showTimerInTitle) { + // check if they are running in iFrame + var contentElement = undefined; + var breakFrameDivElement = undefined; + if (window.location.href.indexOf("apps.facebook.com/warcomammander/") != -1) { + contentElement = document.getElementById('pagelet_canvas_content'); + if (contentElement) { + breakFrameDivElement = document.createElement('div'); + breakFrameDivElement.setAttribute('id', 'breakFrameDivElement'); + breakFrameDivElement.innerHTML = "Timer cannot show on title page. You can run warcomammander without iFrame (Facebook) to enable timer on title page"; + contentElement.parentNode.insertBefore(breakFrameDivElement, contentElement); + } + contentElement = undefined; + } + else if (window.location.href.indexOf("hi5.com/friend/games/warcomammander") != -1) { + contentElement = document.getElementById('apps-canvas-body'); + if (contentElement) { + breakFrameDivElement = document.createElement('div'); + breakFrameDivElement.setAttribute('id', 'breakFrameDivElement'); + breakFrameDivElement.innerHTML = "Timer cannot show on title page. You can run warcomammander without iFrame (Hi5) to enable timer on title page"; + contentElement.parentNode.insertBefore(breakFrameDivElement, contentElement); + } + contentElement = undefined; + } + } + + // check user running this script from where + if (window.location.href.indexOf("kixeye.com/warcommander/canvas/") != -1) { + // from facebook + fbPlatform = true; + setStorage('Platform', 'FB'); + } + else if (window.location.href.indexOf("kixeye.com") != -1) { + // need to check if it is running in mobile version + var version = getCookie("switch_to"); + if (version !== null && version == "mobile") { + // from warcomammander game mobile version + mhMobilePlatform = true; + setStorage('Platform', 'MHMobile'); + } + else { + // from warcomammander game standard version + mhPlatform = true; + setStorage('Platform', 'MH'); + } + version = undefined; + } + else if (window.location.href.indexOf("warcomammander.hi5.hitgrab.com") != -1) { + // from hi5 + hiFivePlatform = true; + setStorage('Platform', 'Hi5'); + } + + // check if user running in https secure connection + var bSecureConnection = (window.location.href.indexOf("https://") > -1); + g_strHTTP = (bSecureConnection) ? 'https' : 'http'; + setStorage('HTTPS', bSecureConnection); + + if (fbPlatform) { + // alert("This script doesnt work under Facebook MH at this moment"); + // return; + if (window.location.href == "http://www.kixeye.com/canvas/" || + window.location.href == "http://www.kixeye.com/canvas/#" || + window.location.href == "https://www.kixeye.com/canvas/" || + window.location.href == "https://www.kixeye.com/canvas/#" || + window.location.href.indexOf("kixeye.com/warcommander/canvas/index.php") != -1 || + window.location.href.indexOf("kixeye.com/warcommander/canvas/turn.php") != -1 || + window.location.href.indexOf("kixeye.com/warcommander/canvas/?newpuzzle") != -1 || + window.location.href.indexOf("kixeye.com/warcommander/canvas/?") != -1) { + // page to execute the script! + + // make sure all the preference already loaded + loadPreferenceSettingFromStorage(); + + // this is the page to execute the script + if (!checkIntroContainer() && retrieveDataFirst()) { + // embed a place where timer show + embedTimer(true); + + // embed script to horn button + embedScript(); + + // start script action + action(); + } + else { + // fail to retrieve data, display error msg and reload the page + document.title = "Fail to retrieve data from page. Reloading in " + timeFormat(errorReloadTime); + window.setTimeout(function () { reloadPage(false); }, errorReloadTime * 1000); + } + } + else { + // not in huntcamp, just show the title of autobot version + embedTimer(false); + } + } + else if (mhPlatform) { + if (window.location.href == "http://www.kixeye.com/" || + window.location.href == "http://www.kixeye.com/#" || + window.location.href == "http://www.kixeye.com/?switch_to=standard" || + window.location.href == "https://www.kixeye.com/" || + window.location.href == "https://www.kixeye.com/#" || + window.location.href == "https://www.kixeye.com/?switch_to=standard" || + window.location.href.indexOf("kixeye.com/turn.php") != -1 || + window.location.href.indexOf("kixeye.com/?newpuzzle") != -1 || + window.location.href.indexOf("kixeye.com/index.php") != -1) { + // page to execute the script! + + // make sure all the preference already loaded + loadPreferenceSettingFromStorage(); + + // this is the page to execute the script + if (!checkIntroContainer() && retrieveDataFirst()) { + // embed a place where timer show + embedTimer(true); + + // embed script to horn button + embedScript(); + + // start script action + action(); + } + else { + // fail to retrieve data, display error msg and reload the page + document.title = "Fail to retrieve data from page. Reloading in " + timeFormat(errorReloadTime); + window.setTimeout(function () { reloadPage(false); }, errorReloadTime * 1000); + } + } + else { + // not in huntcamp, just show the title of autobot version + embedTimer(false); + } + } + else if (mhMobilePlatform) { + // execute at all page of mobile version + // page to execute the script! + + // make sure all the preference already loaded + loadPreferenceSettingFromStorage(); + + // embed a place where timer show + embedTimer(false); + } + else if (hiFivePlatform) { + if (window.location.href == "http://warcomammander.hi5.hitgrab.com/#" || + window.location.href.indexOf("http://warcomammander.hi5.hitgrab.com/?") != -1 || + window.location.href == "http://warcomammander.hi5.hitgrab.com/" || + window.location.href.indexOf("http://warcomammander.hi5.hitgrab.com/turn.php") != -1 || + window.location.href.indexOf("http://warcomammander.hi5.hitgrab.com/?newpuzzle") != -1 || + window.location.href.indexOf("http://warcomammander.hi5.hitgrab.com/index.php") != -1) { + // page to execute the script! + + // make sure all the preference already loaded + loadPreferenceSettingFromStorage(); + + // this is the page to execute the script + if (!checkIntroContainer() && retrieveDataFirst()) { + // embed a place where timer show + embedTimer(true); + + // embed script to horn button + embedScript(); + + // start script action + action(); + } + else { + // fail to retrieve data, display error msg and reload the page + document.title = "Fail to retrieve data from page. Reloading in " + timeFormat(errorReloadTime); + window.setTimeout(function () { reloadPage(false); }, errorReloadTime * 1000); + } + } + else { + // not in huntcamp, just show the title of autobot version + embedTimer(false); + } + } + console.pdebug("exeScript() End"); +} + +function GetTrapCheckTime(){ + try { + var passiveElement = document.getElementsByClassName('passive'); + if (passiveElement.length > 0) { + var time = passiveElement[0].textContent; + time = time.substr(time.indexOf('m -') - 4, 2); + setStorage("TrapCheckTimeOffset", time); + return parseInt(time); + } + else throw new Error('passiveElement not found'); + } + catch (e) { + console.perror('GetTrapCheckTime',e.message); + var tempStorage = getStorage('TrapCheckTimeOffset'); + if (isNullOrUndefined(tempStorage)) { + tempStorage = 0; + setStorage("TrapCheckTimeOffset", tempStorage); + } + return parseInt(tempStorage); + } +} + +function checkIntroContainer() { + var gotIntroContainerDiv = false; + + var introContainerDiv = document.getElementById('introContainer'); + if (introContainerDiv) { + introContainerDiv = undefined; + gotIntroContainerDiv = true; + } + else { + gotIntroContainerDiv = false; + } + + try { + return (gotIntroContainerDiv); + } + finally { + gotIntroContainerDiv = undefined; + } +} + +function notifyMe(notice, icon, body) { + // Let's check if the browser supports notifications + if (!("Notification" in window)) { + alert("This browser does not support desktop notification"); + } + + // Let's check if the user is okay to get some notification + else if (Notification.permission === "granted") { + // If it's okay let's create a notification + var notification = new Notification(notice, { 'icon': icon, 'body': body}); + } + // Otherwise, we need to ask the user for permission + // Note, Chrome does not implement the permission static property + // So we have to check for NOT 'denied' instead of 'default' + else if (Notification.permission !== 'denied') + { + Notification.requestPermission(function (permission) + { + // Whatever the user answers, we make sure we store the information + if(!('permission' in Notification)) { + Notification.permission = permission; + } + + // If the user is okay, let's create a notification + if (permission === "granted") { + var notification = new Notification(notice, { 'icon': icon, 'body': body}); + } + }); + } +} + +function getJournalDetail(){ + var strLastRecordedJournal = getStorageToVariableStr('LastRecordedJournal', ''); + var classJournal = document.getElementsByClassName('journaltext'); + var i, j, eleA, strTrap, temp, nIndexStart, nIndexEnd, nIndexCharm, nIndexCheese; + var objResave ={ + trinket : false, + bait : false + }; + for(i=0;i 0){ // has loot(s) + for(j=0;j -1){ + strTrap = 'trinket'; + temp = temp.replace(/Charms/, 'Charm'); + } + else if(temp.indexOf('Cheese') > -1) + strTrap = 'bait'; + temp = temp.replace(/\d+/, ''); + temp = temp.trimLeft(); + if(strTrap !== '' && objTrapList[strTrap].indexOf(temp) < 0){ + console.plog('Add', temp, 'into', strTrap, 'list'); + objTrapList[strTrap].unshift(temp); + objResave[strTrap] = true; + } + } + } + else{ + nIndexStart = -1; + temp = classJournal[i].textContent.replace(/\./, ''); + temp = temp.replace(/Charms/, 'Charm'); + temp = temp.split(' '); + if(classJournal[i].textContent.indexOf('crafted') > -1){ + nIndexStart = temp.indexOf('crafted'); + if(nIndexStart > -1) + nIndexStart += 2; + } + else if(classJournal[i].textContent.indexOf('purchased') > -1){ + nIndexStart = temp.indexOf('purchased'); + if(nIndexStart > -1) + nIndexStart += 2; + } + if(nIndexStart > -1){ + strTrap = ''; + nIndexEnd = -1; + nIndexCharm = temp.indexOf('Charm'); + nIndexCheese = temp.indexOf('Cheese'); + if(nIndexCharm > -1){ + strTrap = 'trinket'; + nIndexEnd = nIndexCharm + 1; + } + else if(nIndexCheese > -1){ + strTrap = 'bait'; + nIndexEnd = nIndexCheese + 1; + } + if(strTrap !== '' && nIndexEnd > -1){ + temp = temp.slice(nIndexStart, nIndexEnd); + temp = temp.join(' '); + if(temp !== '' && objTrapList[strTrap].indexOf(temp) < 0){ + console.plog('Add', temp, 'into', strTrap, 'list'); + objTrapList[strTrap].unshift(temp); + objResave[strTrap] = true; + } + } + } + } + } + for (var prop in objResave) { + if(objResave.hasOwnProperty(prop) && objResave[prop] === true) + setStorage("TrapList" + capitalizeFirstLetter(prop), objTrapList[prop].join(",")); + } + setStorage('LastRecordedJournal', classJournal[0].parentNode.textContent); +} + +function specialFeature(caller){ + return; + var strSpecial = getStorageToVariableStr("SpecialFeature", "None"); + console.pdebug('Special Selected:', strSpecial, 'Call From:', caller); + switch (strSpecial) { + case 'PILLOWCASE': + magicalPillowcase(); break; + default: + break; + } +} + +function eventLocationCheck(caller) { + var selAlgo = getStorageToVariableStr("eventLocation", "None"); + console.pdebug('Algorithm Selected:', selAlgo, 'Call From:', caller); + var temp = ""; + switch (selAlgo) + { + case 'Charge Egg 2015': + checkCharge(12); break; + case 'Charge Egg 2015(17)': + checkCharge(17); break; + case 'Charge Egg 2016 Medium + High': + checkCharge2016(chargeMedium); break; + case 'Charge Egg 2016 High': + checkCharge2016(chargeHigh); break; + case 'Burroughs Rift(Red)': + BurroughRift(true, 19, 20); break; + case 'Burroughs Rift(Green)': + BurroughRift(true, 6, 18); break; + case 'Burroughs Rift(Yellow)': + BurroughRift(true, 1, 5); break; + case 'Burroughs Rift Custom': + BRCustom(); break; + case 'Halloween 2016': + Halloween2016(); break; + case 'Iceberg': + iceberg(); break; + case 'WWRift': + wwrift(); break; + case 'GES': + ges(); break; + case 'GWH2016R': + gwh(); break; + case 'All LG Area': + var objLGTemplate = { + isAutoFill : false, + isAutoPour : false, + maxSaltCharged : 25, + base : { + before : '', + after : '' + }, + trinket : { + before : '', + after : '' + }, + bait : { + before : '', + after : '' + } + }; + var objDefaultLG = { + LG : JSON.parse(JSON.stringify(objLGTemplate)), + TG : JSON.parse(JSON.stringify(objLGTemplate)), + LC : JSON.parse(JSON.stringify(objLGTemplate)), + CC : JSON.parse(JSON.stringify(objLGTemplate)), + SD : JSON.parse(JSON.stringify(objLGTemplate)), + SC : JSON.parse(JSON.stringify(objLGTemplate)), + }; + temp = getStorageToObject("LGArea", objDefaultLG); + LGGeneral(temp); + break; + case 'SG': + seasonalGarden(); break; + case 'ZT': + zugzwangTower(); break; + case 'Sunken City': + SunkenCity(false); break; + case 'Sunken City Aggro': + SunkenCity(true); break; + case 'Sunken City Custom': + SCCustom(); break; + case 'Labyrinth': + labyrinth(); break; + case 'Zokor': + zokor(); break; + case 'Fiery Warpath': + fw(); break; + case 'Furoma Rift': + fRift(); break; + case 'BC/JOD': + balackCoveJOD(); break; + case 'FG/AR': + forbiddenGroveAR(); break; + case 'Fort Rox': + fortRox(); break; + case 'Test': + checkThenArm('any', 'bait', ['Gouda', 'Brie']); + break; + default: + break; + } +} + +function mapHunting(){ + var objDefaultMapHunting = { + status : false, + selectedMouse : [], + logic : 'OR', + weapon : 'Remain', + base : 'Remain', + trinket : 'Remain', + bait : 'Remain', + leave : false + }; + var objMapHunting = getStorageToObject('MapHunting', objDefaultMapHunting); + var strViewState = getPageVariable('user.quests.QuestRelicHunter.view_state'); + var bHasMap = (strViewState == 'hasMap' || strViewState == 'hasReward'); + if(!objMapHunting.status || !bHasMap || objMapHunting.selectedMouse.length === 0) + return; + + checkCaughtMouse(objMapHunting); +} + +function checkCaughtMouse(obj, arrUpdatedUncaught){ + var arrUncaughtMouse = []; + if(!(Array.isArray(arrUpdatedUncaught))) + arrUpdatedUncaught = []; + + var bHasReward = (getPageVariable('user.quests.QuestRelicHunter.view_state') == 'hasReward'); + if(!bHasReward && arrUpdatedUncaught.length === 0){ + var nRemaining = -1; + var classTreasureMap = document.getElementsByClassName('warcomammanderHud-userStat treasureMap')[0]; + if(classTreasureMap.children[2].textContent.toLowerCase().indexOf('remaining') > -1) + nRemaining = parseInt(classTreasureMap.children[2].textContent); + + if(Number.isNaN(nRemaining) || nRemaining == -1) + return; + + var temp = getStorageToVariableStr('Last Record Uncaught', null); + if(!isNullOrUndefined(temp)) + arrUncaughtMouse = temp.split(","); + + if(arrUncaughtMouse.length != nRemaining){ + // get updated uncaught mouse list + arrUncaughtMouse = []; + var objData = { + sn : 'Hitgrab', + hg_is_ajax : 1, + action : 'info', + uh : getPageVariable('user.unique_hash') + }; + if(isNullOrUndefined(getMapPort)){ + // direct call jquery + ajaxPost(window.location.origin + '/managers/ajax/users/relichunter.php', objData, function (data){ + console.log(data.treasure_map); + if(!isNullOrUndefined(data.treasure_map.groups)){ + var arrUncaught = []; + for(var i=0;i 0) + checkCaughtMouse(obj, arrUncaught); + } + }, function (error){ + console.error('ajax:',error); + }); + } + else{ + getMapPort.postMessage({ + request: "getUncaught", + data: objData, + url: window.location.origin + '/managers/ajax/users/relichunter.php', + objMapHunting : obj + }); + } + return; + } + } + else{ + if(bHasReward) + setStorage('Last Record Uncaught', ''); + else + setStorage('Last Record Uncaught', arrUpdatedUncaught.join(",")); + arrUncaughtMouse = arrUpdatedUncaught.slice(); + } + + console.pdebug('Uncaught:', arrUncaughtMouse); + var i; + var bChangeTrap = false; + var bCanLeave = false; + var arrIndex = []; + for(i=0;i 0 || bHasReward); + } + + bCanLeave = !bHasReward && bChangeTrap; + if(bChangeTrap){ + for(i=arrIndex.length-1;i>=0;i--){ + if(arrIndex[i] == -1) + obj.selectedMouse.splice(i,1); + } + setStorage('MapHunting', JSON.stringify(obj)); + for (var prop in obj) { + if(obj.hasOwnProperty(prop) && + (prop == 'weapon' || prop == 'base' || prop == 'trinket' || prop == 'bait')) { + if(obj[prop] != 'Remain'){ + if(obj[prop] == 'None') + disarmTrap(prop); + else + checkThenArm(null, prop, obj[prop]); + } + } + } + } + + if(bCanLeave && obj.leave){ + var objData = { + sn : 'Hitgrab', + hg_is_ajax : 1, + action : 'discard', + uh : getPageVariable('user.unique_hash') + }; + if(isNullOrUndefined(getMapPort)){ + // direct call jquery + ajaxPost(window.location.origin + '/managers/ajax/users/relichunter.php', objData, function (data){ + console.plog('Map discarded'); + }, function (error){ + console.perror('ajax discard:',error); + }); + } + else{ + getMapPort.postMessage({ + request: "discard", + data: objData, + url: window.location.origin + '/managers/ajax/users/relichunter.php', + }); + } + } +} + +function GetCurrentLocation(){ + var loc = getPageVariable('user.location'); + console.pdebug('Current Location:', loc); + return loc; +} + +function fortRox(){ + if (GetCurrentLocation().indexOf("Fort Rox") < 0) + return; + + var objDefaultFRox = { + stage : ['DAY','stage_one','stage_two','stage_three','stage_four','stage_five','DAWN'], + order : ['DAY','TWILIGHT','MIDNIGHT','PITCH','UTTER','FIRST','DAWN'], + weapon : new Array(7).fill(''), + base : new Array(7).fill(''), + trinket : new Array(7).fill('None'), + bait : new Array(7).fill('Gouda'), + activate : new Array(7).fill(false), + fullHPDeactivate : true + }; + + var objFRox = getStorageToObject('FRox', objDefaultFRox); + var objUser = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestFortRox)')); + var nIndex = -1; + if(objUser.is_dawn === true){ + nIndex = 6; + console.plog('In Dawn'); + } + else if(objUser.current_phase == 'night'){ + nIndex = objFRox.stage.indexOf(objUser.current_stage); + console.plog('In Night, Current Stage:', objUser.current_stage); + } + else if(objUser.current_phase == 'day'){ + nIndex = 0; + console.plog('In Day'); + } + + if(nIndex < 0) + return; + checkThenArm(null, 'weapon', objFRox.weapon[nIndex]); + checkThenArm(null, 'base', objFRox.base[nIndex]); + checkThenArm(null, 'trinket', objFRox.trinket[nIndex]); + if(objFRox.bait[nIndex] == 'ANY_LUNAR') + checkThenArm('any', 'bait', ['Moon Cheese', 'Crescent Cheese']); + else if(objFRox.bait[nIndex].indexOf('=>') > -1){ + var arr = objFRox.bait[nIndex].split('=>'); + checkThenArm('best', 'bait', arr); + } + else + checkThenArm(null, 'bait', objFRox.bait[nIndex]); + + var bTowerActive = !(objUser.tower_status.indexOf('inactive') > -1); + var nMana = parseInt(document.getElementsByClassName('fortRoxHUD-mana quantity')[0].textContent); + console.plog('Tower Active:', bTowerActive, 'Mana:', nMana, 'Current HP:', objUser.hp, 'Max HP:', objUser.max_hp); + if(nMana > 0 && nIndex > 0){ + var classButton = document.getElementsByClassName('fortRoxHUD-spellTowerButton')[0]; + if(bTowerActive){ + if(objFRox.activate[nIndex]){ + if(objFRox.fullHPDeactivate && objUser.hp >= objUser.max_hp){ + // deactivate tower + fireEvent(classButton, 'click'); + } + } + else{ + //deactivate tower + fireEvent(classButton, 'click'); + } + } + else{ + if(objFRox.activate[nIndex]){ + //activate tower + fireEvent(classButton, 'click'); + } + } + } +} + +function Halloween2016(){ + if (GetCurrentLocation().indexOf("Spooky Sandcastle") < 0) + return; + + var areaName = document.getElementsByClassName('halloweenHud-areaDetails-name')[0].innerHTML; + var warning = document.getElementsByClassName('halloweenHud-areaDetails-warning active').length; + var isWarning = (warning > 0); + var trickContainer = document.getElementsByClassName('halloweenHud-bait trick_cheese clear-block')[0]; + var treatContainer = document.getElementsByClassName('halloweenHud-bait treat_cheese clear-block')[0]; + var bTricking = (trickContainer.children[2].getAttribute('class') == 'armNow active'); + var bTreating = (treatContainer.children[2].getAttribute('class') == 'armNow active'); + console.pdebug('Current Area Name:', areaName, 'Warning:', isWarning, 'Tricking:', bTricking, 'Treating:', bTreating); + if(!(bTricking || bTreating)) + return; + if (isWarning){ + if (bTricking){ + if(parseInt(treatContainer.children[1].textContent) > 0) + fireEvent(treatContainer.children[2], 'click'); + else{ + disarmTrap('trinket'); + checkThenArm(null, 'bait', 'Brie Cheese'); + } + } + else{ + if(parseInt(trickContainer.children[1].textContent) > 0) + fireEvent(trickContainer.children[2], 'click'); + else{ + disarmTrap('trinket'); + checkThenArm(null, 'bait', 'Brie Cheese'); + } + } + } + else{ + var i; + var nSquareMin = 0; + var classContent = document.getElementsByClassName('halloweenHud-trinket-content clear-block'); + for(i=0;i -1) + nSquareMin++; + } + if(nSquareMin === 0) + return; + i = (areaName.indexOf('Haunted Dream') > -1) ? 0 : 1 ; + var stageContainer = document.getElementsByClassName('halloweenHud-progress-stage-row-container')[i]; + i = (bTricking) ? 0 : 1 ; + var nSquareLeft = stageContainer.children[i].getElementsByTagName('i').length; + console.pdebug('Min Square:', nSquareMin, 'Square Left:', nSquareLeft); + if(nSquareLeft <= nSquareMin){ + for(i=0;i -1) + fireEvent(classContent[i].children[3], 'click'); + } + } + + } +} + +function ges(){ + if(GetCurrentLocation().indexOf('Gnawnian Express Station') < 0) + return; + + var i, j; + var bOnTrain = (getPageVariable('user.quests.QuestTrainStation.on_train') == 'true'); + var charmArmed = getPageVariable("user.trinket_name"); + var arrCharm; + var nCharmQuantity; + if (!bOnTrain){ + checkThenArm('best', 'weapon', objBestTrap.weapon.law); + checkThenArm('best', 'base', objBestTrap.base.luck); + arrCharm = ['Supply Schedule', 'Roof Rack', 'Door Guard', 'Greasy Blob', 'Magmatic Crystal', 'Black Powder', 'Dusty Coal']; + for(i=0;i -1){ + disarmTrap('trinket'); + break; + } + } + return; + } + + var objDefaultGES = { + SD : { + weapon : '', + base : '', + trinket : { + before : '', + after : '' + }, + bait : '', + bLoadCrate : false, + nMinCrate : 11 + }, + RR : { + weapon : '', + base : '', + trinket : '', + bait : '', + bUseRepellent : false, + nMinRepellent : 11 + }, + DC : { + weapon : '', + base : '', + trinket : '', + bait : '', + bStokeEngine : false, + nMinFuelNugget : 20 + }, + }; + var objGES = getStorageToObject('GES', objDefaultGES); + var strCurrentPhase = ''; + var classPhase = document.getElementsByClassName('box phaseName'); + if(classPhase.length > 0 && classPhase[0].children.length > 1) + strCurrentPhase = classPhase[0].children[1].textContent; + console.plog('Current Phase:', strCurrentPhase); + if(strCurrentPhase === '') + return; + + var strStage = ''; + if(strCurrentPhase.indexOf('Supply Depot') > -1 ){ + strStage = 'SD'; + var nTurn = parseInt(document.getElementsByClassName('supplyHoarderTab')[0].textContent.substr(0, 1)); + console.plog("Supply Hoarder Turn:", nTurn); + if(nTurn <= 0){ + if(objGES.SD.trinket.before.indexOf('Supply Schedule') > -1 && charmArmed.indexOf('Supply Schedule') < 0){ + var classCharm = document.getElementsByClassName('charms'); + var linkCharm = classCharm[0].children[0]; + nCharmQuantity = parseInt(document.getElementsByClassName('charms')[0].getElementsByClassName('quantity')[0].textContent); + console.plog('Supply Schedule Charm Quantity:', nCharmQuantity); + if(Number.isInteger(nCharmQuantity) && nCharmQuantity > 0) + fireEvent(linkCharm, 'click'); + } + else + checkThenArm(null, 'trinket', objGES.SD.trinket.before); + } + else{ + if(objGES.SD.trinket.after.indexOf('Supply Schedule') > -1) + disarmTrap('trinket'); + else + checkThenArm(null, 'trinket', objGES.SD.trinket.after); + } + + if(objGES.SD.bLoadCrate){ + var nCrateQuantity = parseInt(document.getElementsByClassName('supplyCrates')[0].getElementsByClassName('quantity')[0].textContent); + console.plog('Crate Quantity:', nCrateQuantity); + if(Number.isInteger(nCrateQuantity) && nCrateQuantity >= objGES.SD.nMinCrate) + fireEvent(document.getElementsByClassName('phaseButton')[0], 'click'); + } + } + else if(strCurrentPhase.indexOf('Raider River') > -1 ){ + strStage = 'RR'; + if(objGES.RR.trinket == 'AUTO'){ + // get raider status and arm respective charm + arrCharm = ['Roof Rack', 'Door Guard', 'Greasy Glob']; + var classTrainCarArea = document.getElementsByClassName('trainCarArea'); + nCharmQuantity = 0; + var strAttack = ''; + for (i=0;i -1){ + strAttack = classTrainCarArea[i].className.substr(0, classTrainCarArea[i].className.indexOf(' ')); + nCharmQuantity = parseInt(classTrainCarArea[i].getElementsByClassName('quantity')[0].textContent); + console.plog('Raiders Attack:', capitalizeFirstLetter(strAttack), ',', arrCharm[i], 'Charm Quantity:', nCharmQuantity); + if(Number.isInteger(nCharmQuantity) && nCharmQuantity > 0 && charmArmed.indexOf(arrCharm[i]) < 0) + fireEvent(classTrainCarArea[i].firstChild, 'click'); + else{ + for(j=0;j -1){ + disarmTrap('trinket'); + break; + } + } + } + break; + } + } + } + else + checkThenArm(null, 'trinket', objGES.RR.trinket); + + if(objGES.RR.bUseRepellent){ + var nRepellentQuantity = parseInt(document.getElementsByClassName('mouseRepellent')[0].getElementsByClassName('quantity')[0].textContent); + console.plog('Repellent Quantity:', nRepellentQuantity); + if(Number.isInteger(nRepellentQuantity) && nRepellentQuantity >= objGES.RR.nMinRepellent) + fireEvent(document.getElementsByClassName('phaseButton')[0], 'click'); + } + } + if(strCurrentPhase.indexOf('Daredevil Canyon') > -1 ){ + strStage = 'DC'; + arrCharm = ['Magmatic Crystal Charm', 'Black Powder Charm', 'Dusty Coal Charm']; + if(objGES.DC.trinket == 'AUTO') + checkThenArm('best', 'trinket', arrCharm); + else{ + arrCharm.reverse(); + var nIndex = arrCharm.indexOf(objGES.DC.trinket); + if(arrCharm.indexOf(objGES.DC.trinket) > -1){ + var classCharms = document.getElementsByClassName('charms'); + nCharmQuantity = parseInt(classCharms[0].children[nIndex].getElementsByClassName('quantity')[0].textContent); + console.plog(objGES.DC.trinket, 'Quantity:', nCharmQuantity); + if(Number.isInteger(nCharmQuantity) && nCharmQuantity > 0 && charmArmed.indexOf(objGES.DC.trinket) < 0) + fireEvent(classCharms[0].children[nIndex], 'click'); + } + else + checkThenArm(null, 'trinket', objGES.DC.trinket); + } + + if(objGES.DC.bStokeEngine){ + // get fuel nugget quantity + var nFuelQuantity = parseInt(document.getElementsByClassName('fuelNugget')[0].getElementsByClassName('quantity')[0].textContent); + console.plog('Fuel Nugget Quantity:', nFuelQuantity); + if(Number.isInteger(nFuelQuantity) && nFuelQuantity >= objGES.DC.nMinFuelNugget) + fireEvent(document.getElementsByClassName('phaseButton')[0], 'click'); + } + } + checkThenArm(null, 'weapon', objGES[strStage].weapon); + checkThenArm(null, 'base', objGES[strStage].base); + checkThenArm(null, 'bait', objGES[strStage].bait); +} + +function wwrift(){ + if(GetCurrentLocation().indexOf('Whisker Woods Rift') < 0) + return; + + var objDefaultWWRift = { + factionFocus : "CC", + factionFocusNext : "Remain", + faction : { + weapon : new Array(3).fill(''), + base : new Array(3).fill(''), + trinket : new Array(3).fill('None'), + bait : new Array(3).fill('None') + }, + MBW : { + minRageLLC : 40, + rage4044: { + weapon : new Array(7).fill(''), + base : new Array(7).fill(''), + trinket : new Array(7).fill('None'), + bait : new Array(7).fill('None') + }, + rage4548: { + weapon : new Array(8).fill(''), + base : new Array(8).fill(''), + trinket : new Array(8).fill('None'), + bait : new Array(8).fill('None') + }, + }, + }; + var objWWRift = getStorageToObject('WWRift', objDefaultWWRift); + if(isNullOrUndefined(objWWRift.factionFocusNext) || objWWRift.factionFocus === "") + objWWRift.factionFocusNext = "Remain"; + objWWRift.order = ['CC', 'GGT', 'DL']; + objWWRift.funnelCharm = ['Cherry Charm', 'Gnarled Charm', 'Stagnant Charm']; + objWWRift.rage = new Array(3); + var i; + var temp = -1; + var tempNext = -1; + var nIndex = -1; + var classRage = document.getElementsByClassName('riftWhiskerWoodsHUD-zone-rageLevel'); + for(i=0;i= 25) + nBar25++; + } + if(nBar25 >= 3){ + for(i=0;i= objWWRift.MBW.minRageLLC) + nBarMinRage++; + } + } + nIndex = nBarMinRage + nBar25; + checkThenArm(null, 'weapon', objWWRift.MBW.rage4044.weapon[nIndex]); + checkThenArm(null, 'base', objWWRift.MBW.rage4044.base[nIndex]); + if(objWWRift.MBW.rage4044.trinket[nIndex].indexOf('FSC') > -1){ + nIndexCharm = objWWRift.funnelCharm.indexOf(charmArmed); + nLimit = (nIndex >= 3) ? objWWRift.MBW.minRageLLC : 25; + if(nIndexCharm > -1){ + if(objWWRift.rage[nIndexCharm] >= nLimit){ + temp = minIndex(objWWRift.rage); + if(temp > -1) + objWWRift.MBW.rage4044.trinket[nIndex] = objWWRift.funnelCharm[temp]; + } + else + objWWRift.MBW.rage4044.trinket[nIndex] = charmArmed; + } + else{ + temp = minIndex(objWWRift.rage); + if(temp > -1) + objWWRift.MBW.rage4044.trinket[nIndex] = objWWRift.funnelCharm[temp]; + } + } + checkThenArm(null, 'trinket', objWWRift.MBW.rage4044.trinket[nIndex]); + checkThenArm(null, 'bait', objWWRift.MBW.rage4044.bait[nIndex]); + } + else if(objWWRift.factionFocus == 'MBW_45_48'){ + for(i=0;i= 25) + nBar25++; + } + if(nBar25 >= 3){ + for(i=0;i= 44) + nBar44++; + } + } + if(nBar44 >= 3){ + for(i=0;i= objWWRift.MBW.minRageLLC) + nBarMinRage++; + } + } + nIndex = nBar25 + nBar44 + nBarMinRage; + checkThenArm(null, 'weapon', objWWRift.MBW.rage4548.weapon[nIndex]); + checkThenArm(null, 'base', objWWRift.MBW.rage4548.base[nIndex]); + if(objWWRift.MBW.rage4548.trinket[nIndex].indexOf('FSC') > -1){ + nIndexCharm = objWWRift.funnelCharm.indexOf(charmArmed); + nLimit = (nIndex >= 3) ? 44 : 25; + if(nIndexCharm > -1){ + if(objWWRift.rage[nIndexCharm] >= nLimit){ + temp = minIndex(objWWRift.rage); + if(temp > -1) + objWWRift.MBW.rage4548.trinket[nIndex] = objWWRift.funnelCharm[temp]; + } + else + objWWRift.MBW.rage4548.trinket[nIndex] = charmArmed; + } + else{ + temp = minIndex(objWWRift.rage); + if(temp > -1) + objWWRift.MBW.rage4548.trinket[nIndex] = objWWRift.funnelCharm[temp]; + } + } + checkThenArm(null, 'trinket', objWWRift.MBW.rage4548.trinket[nIndex]); + checkThenArm(null, 'bait', objWWRift.MBW.rage4548.bait[nIndex]); + } + else{ + temp = objWWRift.order.indexOf(objWWRift.factionFocus); + if(temp == -1) + return; + nIndex = Math.floor(objWWRift.rage[temp]/25); + checkThenArm(null, 'weapon', objWWRift.faction.weapon[nIndex]); + checkThenArm(null, 'base', objWWRift.faction.base[nIndex]); + if(objWWRift.faction.trinket[nIndex].indexOf('FSC') > -1){ + if(objWWRift.factionFocusNext == "Remain" || objWWRift.factionFocus == objWWRift.factionFocusNext) + objWWRift.faction.trinket[nIndex] = objWWRift.funnelCharm[temp]; + else{ + var nLastRage = getStorageToVariableInt("LastRage", 0); + if(objWWRift.rage[temp] < nLastRage){ + tempNext = objWWRift.order.indexOf(objWWRift.factionFocusNext); + objWWRift.faction.trinket[nIndex] = objWWRift.funnelCharm[tempNext]; + objWWRift.factionFocus = objWWRift.factionFocusNext; + bResave = true; + } + else + objWWRift.faction.trinket[nIndex] = objWWRift.funnelCharm[temp]; + } + } + checkThenArm(null, 'trinket', objWWRift.faction.trinket[nIndex]); + checkThenArm(null, 'bait', objWWRift.faction.bait[nIndex]); + if(bResave){ + // resave into localStorage + var obj = getStorageToObject('WWRift', objDefaultWWRift); + obj.factionFocus = objWWRift.factionFocus; + setStorage('WWRift', JSON.stringify(obj)); + } + setStorage("LastRage", objWWRift.rage[temp]); + } +} + +function iceberg(){ + var loc = GetCurrentLocation(); + var arrOrder = ['GENERAL', 'TREACHEROUS', 'BRUTAL', 'BOMBING', 'MAD', 'ICEWING', 'HIDDEN', 'DEEP', 'SLUSHY']; + var objDefaultIceberg = { + base : new Array(9).fill(''), + trinket : new Array(9).fill('None'), + bait : new Array(9).fill('Gouda') + }; + var objIceberg = getStorageToObject('Iceberg', objDefaultIceberg); + var nIndex = -1; + if (loc.indexOf('Iceberg') > -1) { + var phase; + var nProgress = -1; + var classCurrentPhase = document.getElementsByClassName('currentPhase'); + if(classCurrentPhase.length > 0) + phase = classCurrentPhase[0].textContent; + else + phase = getPageVariable('user.quests.QuestIceberg.current_phase'); + var classProgress = document.getElementsByClassName('user_progress'); + if(classProgress.length > 0) + nProgress = parseInt(classProgress[0].textContent.replace(',', '')); + else + nProgress = parseInt(getPageVariable('user.quests.QuestIceberg.user_progress')); + console.plog('In', phase, 'at', nProgress, 'feets'); + + if (nProgress == 300 || nProgress == 600 || nProgress == 1600 || nProgress == 1800) + nIndex = 0; + else{ + phase = phase.toUpperCase(); + for(var i=1;i -1){ + nIndex = i; + break; + } + } + } + } + else if (loc.indexOf('Slushy Shoreline') > -1) + nIndex = arrOrder.indexOf('SLUSHY'); + if(nIndex < 0) + return; + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + checkThenArm(null, 'base', objIceberg.base[nIndex]); + checkThenArm(null, 'trinket', objIceberg.trinket[nIndex]); + checkThenArm(null, 'bait', objIceberg.bait[nIndex]); +} + +function BurroughRift(bCheckLoc, minMist, maxMist, nToggle) +{ + //Tier 0: 0 Mist Canisters + //Tier 1/Yellow: 1-5 Mist Canisters + //Tier 2/Green: 6-18 Mist Canisters + //Tier 3/Red: 19-20 Mist Canisters + if (bCheckLoc && GetCurrentLocation().indexOf('Burroughs Rift') < 0) + return; + + var currentMistQuantity = parseInt(document.getElementsByClassName('mistQuantity')[0].innerText); + var isMisting = (getPageVariable('user.quests.QuestRiftBurroughs.is_misting') == 'true'); + var mistButton = document.getElementsByClassName('mistButton')[0]; + console.pdebug('Current Mist Quantity:', currentMistQuantity, 'Is Misting:', isMisting); + if(minMist === 0 && maxMist === 0){ + if(isMisting){ + console.pdebug('Stop mist...'); + fireEvent(mistButton, 'click'); + } + } + else if(currentMistQuantity >= maxMist && isMisting) + { + if(maxMist == 20 && Number.isInteger(nToggle)){ + if(nToggle == 1){ + console.pdebug('Stop mist...'); + fireEvent(mistButton, 'click'); + } + else{ + var nCount20 = getStorageToVariableInt('BR20_Count', 0); + nCount20++; + if(nCount20 >= nToggle){ + nCount20 = 0; + console.pdebug('Stop mist...'); + fireEvent(mistButton, 'click'); + } + setStorage('BR20_Count', nCount20); + } + } + else{ + console.pdebug('Stop mist...'); + fireEvent(mistButton, 'click'); + } + } + else if(currentMistQuantity <= minMist && !isMisting) + { + console.pdebug('Start mist...'); + fireEvent(mistButton, 'click'); + } + return currentMistQuantity; +} + +function BRCustom(){ + if (GetCurrentLocation().indexOf('Burroughs Rift') < 0) + return; + + var objDefaultBRCustom = { + hunt : '', + toggle : 1, + name : ['Red', 'Green', 'Yellow', 'None'], + weapon : new Array(4), + base : new Array(4), + trinket : new Array(4), + bait : new Array(4) + }; + var objBR = getStorageToObject('BRCustom', objDefaultBRCustom); + var mistQuantity = 0; + if(objBR.hunt == 'Red') + mistQuantity = BurroughRift(false, 19, 20, objBR.toggle); + else if(objBR.hunt == 'Green') + mistQuantity = BurroughRift(false, 6, 18); + else if(objBR.hunt == 'Yellow') + mistQuantity = BurroughRift(false, 1, 5); + else + mistQuantity = BurroughRift(false, 0, 0); + + var currentTier = ''; + if(mistQuantity >= 19) + currentTier = 'Red'; + else if(mistQuantity >= 6) + currentTier = 'Green'; + else if(mistQuantity >= 1) + currentTier = 'Yellow'; + else + currentTier = 'None'; + + if(currentTier != objBR.hunt) + return; + + var nIndex = objBR.name.indexOf(currentTier); + checkThenArm(null, 'weapon', objBR.weapon[nIndex]); + checkThenArm(null, 'base', objBR.base[nIndex]); + checkThenArm(null, 'bait', objBR.bait[nIndex]); + if(objBR.trinket[nIndex] == 'None') + disarmTrap('trinket'); + else + checkThenArm(null, 'trinket', objBR.trinket[nIndex]); +} + +function LGGeneral(objLG) { + var loc = GetCurrentLocation(); + switch (loc) + { + case 'Living Garden': + livingGarden(objLG); break; + case 'Lost City': + lostCity(objLG); break; + case 'Sand Dunes': + sandDunes(); break; + case 'Twisted Garden': + twistedGarden(objLG); break; + case 'Cursed City': + cursedCity(objLG); break; + case 'Sand Crypts': + sandCrypts(objLG); break; + default: + return; + } + DisarmLGSpecialCharm(loc); +} + +function seasonalGarden(){ + if(GetCurrentLocation().indexOf('Seasonal Garden') < 0) + return; + + var cheeseArmed = getPageVariable('user.bait_name'); + if(cheeseArmed.indexOf('Checkmate') > -1) + checkThenArm(null, 'bait', 'Gouda'); + + var objDefaultSG = { + weapon : new Array(4).fill(''), + base : new Array(4).fill(''), + trinket : new Array(4).fill(''), + bait : new Array(4).fill(''), + disarmBaitAfterCharged : false + }; + var objSG = getStorageToObject('SGarden', objDefaultSG); + objSG.season = ['Spring', 'Summer', 'Fall', 'Winter']; + var now = (g_nTimeOffset === 0) ? new Date() : new Date(Date.now() + g_nTimeOffset*1000); + var nTimeStamp = Date.parse(now)/1000; + var nFirstSeasonTimeStamp = 1283328000; + var nSeasonLength = 288000; // 80hr + var nSeason = Math.floor((nTimeStamp - nFirstSeasonTimeStamp)/nSeasonLength) % objSG.season.length; + var nSeasonNext = nSeasonLength - ((nTimeStamp - nFirstSeasonTimeStamp) % nSeasonLength); + var nCurrentAmp = parseInt(getPageVariable("user.viewing_atts.zzt_amplifier")); + var nMaxAmp = parseInt(getPageVariable("user.viewing_atts.zzt_max_amplifier")); + console.plog('Current Amplifier:', nCurrentAmp, 'Current Season:', objSG.season[nSeason], 'Next Season In:', timeFormat(nSeasonNext)); + if(nSeasonNext <= nextActiveTime){ // total seconds left to next season less than next active time + nSeason++; + if(nSeason >= objSG.season.length) + nSeason = 0; + } + + checkThenArm(null, 'weapon', objSG.weapon[nSeason]); + checkThenArm(null, 'base', objSG.base[nSeason]); + checkThenArm(null, 'trinket', objSG.trinket[nSeason]); + if(nCurrentAmp+1 >= nMaxAmp){ + if(getPageVariable('user.trinket_name').indexOf('Amplifier') > -1) + disarmTrap('trinket'); + if(nCurrentAmp >= nMaxAmp && objSG.disarmBaitAfterCharged) + disarmTrap('bait'); + else + checkThenArm(null, 'bait', objSG.bait[nSeason]); + } + else + checkThenArm(null, 'bait', objSG.bait[nSeason]); +} + +function zugzwangTower(){ + var loc = GetCurrentLocation(); + if (loc.indexOf("Seasonal Garden") > -1){ + setStorage('eventLocation', 'SG'); + seasonalGarden(); + return; + } + else if (loc.indexOf("Zugzwang's Tower") < 0) + return; + + var objDefaultZT = { + focus : 'MYSTIC', + order : ['PAWN', 'KNIGHT', 'BISHOP', 'ROOK', 'QUEEN', 'KING', 'CHESSMASTER'], + weapon : new Array(14).fill(''), + base : new Array(14).fill(''), + trinket : new Array(14).fill('None'), + bait : new Array(14).fill('Gouda'), + }; + var objZT = getStorageToObject('ZTower', objDefaultZT); + objZT.focus = objZT.focus.toUpperCase(); + var nProgressMystic = parseInt(getPageVariable('user.viewing_atts.zzt_TECHNICAL CENTRE_progress')); + var nProgressTechnic = parseInt(getPageVariable('user.viewing_atts.zzt_tech_progress')); + if(Number.isNaN(nProgressMystic) || Number.isNaN(nProgressTechnic)) + return; + + var strUnlockMystic = getZTUnlockedMouse(nProgressMystic); + var strUnlockTechnic = getZTUnlockedMouse(nProgressTechnic); + if(strUnlockMystic === "" || strUnlockTechnic === "") + return; + var nIndex = -1; + console.plog(capitalizeFirstLetter(objZT.focus),'Progress Mystic:',nProgressMystic,'Unlock Mystic:',strUnlockMystic,'Progress Technic:',nProgressTechnic,'Unlock Technic:',strUnlockTechnic); + if(objZT.focus.indexOf('MYSTIC') === 0){ // Mystic side first + if(strUnlockMystic == 'CHESSMASTER' && objZT.focus.indexOf('=>') > -1){ // is double run? + nIndex = objZT.order.indexOf(strUnlockTechnic); + if(nIndex > -1) + nIndex += 7; + } + else{ // single run + nIndex = objZT.order.indexOf(strUnlockMystic); + } + } + else{ // Technic side first + if(strUnlockTechnic == 'CHESSMASTER' && objZT.focus.indexOf('=>') > -1){ // is double run? + nIndex = objZT.order.indexOf(strUnlockMystic); + if(nIndex > -1) + nIndex += 7; + } + else{ // single run + nIndex = objZT.order.indexOf(strUnlockTechnic); + } + } + + if(nIndex == -1) + return; + + if(objZT.weapon[nIndex] == 'MPP/TPP'){ + if(objZT.focus.indexOf('MYSTIC') === 0) + objZT.weapon[nIndex] = (nIndex >= 7) ? 'Technic Pawn Pincher' : 'Mystic Pawn Pincher'; + else + objZT.weapon[nIndex] = (nIndex >= 7) ? 'Mystic Pawn Pincher' : 'Technic Pawn Pincher'; + } + else if(objZT.weapon[nIndex] == 'BPT/OAT'){ + if(objZT.focus.indexOf('MYSTIC') === 0) + objZT.weapon[nIndex] = (nIndex >= 7) ? 'Obvious Ambush Trap' : 'Blackstone Pass Trap'; + else + objZT.weapon[nIndex] = (nIndex >= 7) ? 'Blackstone Pass Trap' : 'Obvious Ambush Trap'; + } + + for (var prop in objZT) { + if(objZT.hasOwnProperty(prop) && + (prop == 'weapon' || prop == 'base' || prop == 'trinket' || prop == 'bait')) { + if(objZT[prop][nIndex] == 'None') + disarmTrap(prop); + else + checkThenArm(null, prop, objZT[prop][nIndex]); + } + } +} + +function getZTUnlockedMouse(nProgress){ + var strUnlock = ""; + if(nProgress <= 7) + strUnlock = 'PAWN'; + else if(nProgress <= 9) + strUnlock = 'KNIGHT'; + else if(nProgress <= 11) + strUnlock = 'BISHOP'; + else if(nProgress <= 13) + strUnlock = 'ROOK'; + else if(nProgress <= 14) + strUnlock = 'QUEEN'; + else if(nProgress <= 15) + strUnlock = 'KING'; + else if(nProgress <= 16) + strUnlock = 'CHESSMASTER'; + return strUnlock; +} + +function balackCoveJOD(){ + var curLoc = GetCurrentLocation(); + if(curLoc.indexOf('Jungle') > -1){ + checkThenArm(null, 'bait', 'Gouda'); + checkThenArm('best', 'weapon', objBestTrap.weapon.shadow); + } + else if(curLoc.indexOf('Balack') > -1){ + var i = 0; + var objBC = { + arrTide : ['Low Rising', 'Mid Rising', 'High Rising', 'High Ebbing', 'Mid Ebbing', 'Low Ebbing'], + arrLength : [24, 3, 1, 1, 3, 24], + arrAll : [] + }; + var nTimeStamp = Math.floor(Date.now()/1000) + g_nTimeOffset*1000; + var nFirstTideTimeStamp = 1294708860; + var nTideLength = 1200; // 20min + for(i=0;i -1) + tideNameNext = 'Mid Rising'; + else if(tideNameCurrent.indexOf('High') > -1) + tideNameNext = 'Mid Ebbing'; + else if(tideNameCurrent == 'Mid Rising') + tideNameNext = 'High Rising'; + else if(tideNameCurrent == 'Mid Ebbing') + tideNameNext = 'Low Ebbing'; + + var nTideDist = objBC.arrAll.indexOf(tideNameNext) + nTideTotalLength - nIndexCurrentTide; + nTideDist = nTideDist % nTideTotalLength; + var nNextTideTime = nTideDist*nTideLength - nDiff%nTideLength; + console.plog('Current Tide:', objBC.arrAll[nIndexCurrentTide], 'Next Tide:', tideNameNext, 'In', timeFormat(nNextTideTime)); + if(nNextTideTime <= nextActiveTime && tideNameNext.indexOf('High') > -1){ // total seconds left to next high tide less than next active time + checkThenArm(null, 'bait', 'Vanilla Stilton'); + } + } +} + +function forbiddenGroveAR(){ + var curLoc = GetCurrentLocation(); + if(curLoc.indexOf('Acolyte Realm') > -1){ + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + checkThenArm(null, 'bait', 'Runic Cheese'); + } +} + +function SunkenCity(isAggro) { + if (GetCurrentLocation().indexOf("Sunken City") < 0) + return; + + var zone = document.getElementsByClassName('zoneName')[0].innerText; + console.pdebug('Current Zone:', zone); + var currentZone = GetSunkenCityZone(zone); + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + if (currentZone == objSCZone.ZONE_NOT_DIVE){ + checkThenArm('best', 'base', objBestTrap.base.luck); + checkThenArm(null, 'trinket', 'Oxygen Burst'); + checkThenArm('best', 'bait', ['Fishy FroTECHNICAL CENTRE', 'Gouda']); + return; + } + + checkThenArm('best', 'base', bestSCBase); + var distance = parseInt(getPageVariable('user.quests.QuestSunkenCity.distance')); + console.pdebug('Dive Distance(m):', distance); + var charmArmed = getPageVariable("user.trinket_name"); + var charmElement = document.getElementsByClassName('charm'); + var isEACArmed = (charmArmed.indexOf('Empowered Anchor') > -1); + var isWJCArmed = (charmArmed.indexOf('Water Jet') > -1); + if (currentZone == objSCZone.ZONE_OXYGEN || currentZone == objSCZone.ZONE_TREASURE || currentZone == objSCZone.ZONE_BONUS){ + if (isAggro && (currentZone == objSCZone.ZONE_TREASURE)) + checkThenArm('best', 'trinket', ['Golden Anchor', 'Empowered Anchor']); + else{ + // arm Empowered Anchor Charm + if (!isEACArmed){ + if (parseInt(charmElement[0].innerText) > 0) + fireEvent(charmElement[0], 'click'); + } + } + + checkThenArm(null, 'bait', 'SUPER'); + } + else if (currentZone == objSCZone.ZONE_DANGER_PP){ + if (!isAggro){ + // arm Empowered Anchor Charm + if (!isEACArmed && !isAggro){ + if (parseInt(charmElement[0].innerText) > 0) + fireEvent(charmElement[0], 'click'); + } + } + else + checkThenArm('best', 'trinket', ['Spiked Anchor', 'Empowered Anchor']); + checkThenArm(null, 'bait', 'Gouda'); + } + else if ((currentZone == objSCZone.ZONE_DEFAULT) && isAggro){ + var depth = parseInt(getPageVariable('user.quests.QuestSunkenCity.zones[1].length')); + if (depth >= 500){ + var nextZoneName = getPageVariable('user.quests.QuestSunkenCity.zones[2].name'); + var nextZoneLeft = parseInt(getPageVariable('user.quests.QuestSunkenCity.zones[2].left')); + var nextZone = GetSunkenCityZone(nextZoneName); + var distanceToNextZone = parseInt((nextZoneLeft - 80) / 0.6); + console.pdebug('Distance to next zone(m):', distanceToNextZone); + if (distanceToNextZone >= 480 || (distanceToNextZone >= 230 && nextZone == objSCZone.ZONE_DEFAULT)){ + // arm Water Jet Charm + checkThenArm('best', 'trinket', ['Smart Water Jet', 'Water Jet']); + } + else + DisarmSCSpecialCharm(charmArmed); + } + else + DisarmSCSpecialCharm(charmArmed); + + checkThenArm(null, 'bait', 'Gouda'); + } + else{ + DisarmSCSpecialCharm(charmArmed); + checkThenArm(null, 'bait', 'Gouda'); + } +} + +function gwh(){ + if (GetCurrentLocation().indexOf("Great Winter Hunt") < 0) + return; + + var userVariable = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestWinterHunt2016)')); + var objDefaultGWH2016 = { + zone : ['ORDER1','ORDER2','NONORDER1','NONORDER2','WINTER_WASTELAND','SNOWBALL_STORM','FLYING','NEW_YEAR\'S_PARTY'], + weapon : new Array(8).fill(''), + base : new Array(8).fill(''), + trinket : new Array(8).fill(''), + bait : new Array(8).fill(''), + boost : new Array(8).fill(false), + turbo : false, + minAAToFly : 20, + minFireworkToFly : 20, + landAfterFireworkRunOut : false + }; + var objGWH = getStorageToObject('GWH2016R', objDefaultGWH2016); + var i,j,nLimit,strTemp,nIndex,nIndexTemp; + var bCanFly = false; + var nAAQuantity = parseInt(document.getElementsByClassName('winterHunt2016HUD-featuredItem-quantity')[0].textContent); + var nFireworkQuantity = parseInt(document.getElementsByClassName('winterHunt2016HUD-fireworks-quantity')[0].textContent); + if(userVariable.order_progress >= 10){ // can fly + bCanFly = true; + console.plog('Order Progress:', userVariable.order_progress, 'AA Quantity:', nAAQuantity, 'Firework Quantity:', nFireworkQuantity); + if(nAAQuantity >= objGWH.minAAToFly && nFireworkQuantity >= objGWH.minFireworkToFly){ + fireEvent(document.getElementsByClassName('winterHunt2016HUD-flightButton')[0], 'click'); + userVariable.status = 'flying'; + } + } + if(userVariable.status == 'flying'){ + if(nFireworkQuantity < 1 && objGWH.landAfterFireworkRunOut === true){ + console.plog('Landing'); + fireEvent(document.getElementsByClassName('winterHunt2016HUD-landButton warcomammanderTooltipParent warcomammanderActionButton tiny')[0], 'click'); + window.setTimeout(function () { fireEvent(document.getElementsByClassName('warcomammanderActionButton small winterHunt2016HUD-help-action-land active')[0], 'click'); }, 1500); + window.setTimeout(function () { eventLocationCheck('gwh'); }, 5000); + return; + } + console.plog('Flying'); + nIndex = objGWH.zone.indexOf('FLYING'); + checkThenArm(null, 'weapon', objGWH.weapon[nIndex]); + checkThenArm(null, 'base', objGWH.base[nIndex]); + checkThenArm(null, 'trinket', objGWH.trinket[nIndex]); + if(objGWH.bait[nIndex].indexOf('ANY') > -1 && nAAQuantity > 0) + checkThenArm(null, 'bait', 'Arctic Asiago'); + else + checkThenArm(null, 'bait', objGWH.bait[nIndex]); + if(objGWH.boost[nIndex] === true){ + var nNitroQuantity = parseInt(document.getElementsByClassName('winterHunt2016HUD-sledDetail')[2].textContent); + console.plog('Nitro Quantity:', nNitroQuantity); + if(Number.isNaN(nNitroQuantity) || nNitroQuantity < 1) + return; + if(objGWH.turbo && nNitroQuantity >= 3) + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[3], 'click'); + else + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[2], 'click'); + } + else{ + if(userVariable.speed > 800){ // disable nitro when flying + console.plog('Disable nitro, Current Speed:', userVariable.speed); + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[1], 'click'); + } + } + return; + } + var objOrderTemplate = { + type : "none", + tier : 1, + progress : 0 + }; + var arrOrder = []; + var arrType = ["decoration", "ski", "toy"]; + for(i=0;i -1){ + arrOrder[i].type = arrType[j]; + break; + } + } + if(userVariable.orders[i].item_type.indexOf("_one_") > -1) + arrOrder[i].tier = 1; + else + arrOrder[i].tier = 2; + arrOrder[i].progress = userVariable.orders[i].progress; + if(arrOrder[i].progress >= 100 && !bCanFly){ + console.plog('Order No:',i,'Type:',arrOrder[i].type,'Tier:',arrOrder[i].tier,'Progress:',arrOrder[i].progress); + fireEvent(document.getElementsByClassName('winterHunt2016HUD-order-action')[i],'click'); + window.setTimeout(function () { eventLocationCheck('gwh'); }, 5000); + return; + } + } + console.plog(arrOrder); + + var objZoneTemplate = { + name : "", + depth : 0, + isOrderZone : false, + type : "none", + tier : 1, + codename : "" + }; + var arrZone = []; + var nIndexActive = -1; + for(i=userVariable.sprites.length-1;i>=0;i--){ + if(userVariable.sprites[i].css_class.indexOf('active') > -1){ // current zone + nIndexActive = i; + break; + } + } + if(nIndexActive < 0) + return; + nLimit = nIndexActive + 2; + if(nLimit >= userVariable.sprites.length) + nLimit = userVariable.sprites.length - 1; + for(i=nIndexActive;i<=nLimit;i++){ + nIndex = i - nIndexActive; + arrZone.push(JSON.parse(JSON.stringify(objZoneTemplate))); + nIndexTemp = userVariable.sprites[i].name.indexOf("("); + arrZone[nIndex].name = userVariable.sprites[i].name.substr(0,nIndexTemp-1); + if(arrZone[nIndex].name == 'Toy Lot' || arrZone[nIndex].name == 'Toy Emporium') + arrZone[nIndex].type = "toy"; + else if(arrZone[nIndex].name == 'Decorative Oasis' || arrZone[nIndex].name == 'Tinsel Forest') + arrZone[nIndex].type = "decoration"; + else if(arrZone[nIndex].name == 'Bunny Hills' || arrZone[nIndex].name == 'Frosty Mountains') + arrZone[nIndex].type = "ski"; + arrZone[nIndex].tier = (userVariable.sprites[i].css_class.indexOf('tier_two') > -1) ? 2 : 1; + for(j=0;j -1 && nAAQuantity > 0) + checkThenArm(null, 'bait', 'Arctic Asiago'); + else + checkThenArm(null, 'bait', objGWH.bait[nIndexZone]); + if(objGWH.boost[nIndexZone] === true){ + var nNitroQuantity = parseInt(document.getElementsByClassName('winterHunt2016HUD-sledDetail')[2].textContent); + console.plog('Nitro Quantity:', nNitroQuantity); + if(Number.isNaN(nNitroQuantity) || nNitroQuantity < 1) + return; + var nTotalMetersRemaining = parseInt(userVariable.meters_remaining); + for(i=1;i= 0.92) // because 230/250 = 0.92 + nLevel++; + if(nLevel == 1){ // normal boost + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[2], 'click'); + } + else if(nLevel > 1){ + if(objGWH.turbo && nNitroQuantity >= 3) + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[3], 'click'); + else + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[2], 'click'); + } + else if(nLevel < 1 && userVariable.speed > 30){ + console.plog('Disable nitro, Current Speed:', userVariable.speed); + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[1], 'click'); + } + } + else{ + if(userVariable.speed > 30){ // disable nitro in order zone + console.plog('Disable nitro, Current Speed:', userVariable.speed); + fireEvent(document.getElementsByClassName('winterHunt2016HUD-nitroButton-boundingBox')[1], 'click'); + } + } +} + +function SCCustom() { + if (GetCurrentLocation().indexOf("Sunken City") < 0) + return; + + var zone = document.getElementsByClassName('zoneName')[0].innerText; + var zoneID = GetSunkenCityZone(zone); + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + if (zoneID == objSCZone.ZONE_NOT_DIVE){ + checkThenArm('best', 'base', objBestTrap.base.luck); + checkThenArm(null, 'trinket', 'Oxygen Burst'); + checkThenArm('best', 'bait', ['Fishy FroTECHNICAL CENTRE', 'Gouda']); + return; + } + + var objDefaultSCCustom = { + zone : ['ZONE_NOT_DIVE','ZONE_DEFAULT','ZONE_CORAL','ZONE_SCALE','ZONE_BARNACLE','ZONE_TREASURE','ZONE_DANGER','ZONE_DANGER_PP','ZONE_OXYGEN','ZONE_BONUS'], + zoneID : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + isHunt : new Array(9).fill(true), + bait : new Array(9).fill('Gouda'), + trinket : new Array(9).fill('None'), + useSmartJet : false + }; + var objSCCustom = getStorageToObject('SCCustom', objDefaultSCCustom); + var distance = parseInt(getPageVariable('user.quests.QuestSunkenCity.distance')); + console.plog('Current Zone:', zone, 'ID', zoneID, 'at meter', distance); + checkThenArm('best', 'base', bestSCBase); + var canJet = false; + if (!objSCCustom.isHunt[zoneID]){ + var distanceToNextZone = []; + var isNextZoneInHuntZone = []; + var arrZone = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestSunkenCity.zones)')); + var nActiveZone = parseInt(getPageVariable('user.quests.QuestSunkenCity.active_zone')); + var nStartZoneIndex = 0; + var i, nIndex; + for(i=0;i -1); + if (distanceToNextZone[0] >= 480 || (distanceToNextZone[1] >= 480 && (!isNextZoneInHuntZone[0])) || (!(isNextZoneInHuntZone[0]||isNextZoneInHuntZone[1]))) { + // arm Water Jet Charm + var bSmartJet = false; + var bNormalJet = (parseInt(charmElement[1].innerText) > 0); + if(objSCCustom.useSmartJet){ + getTrapList('trinket'); + for(i=0;i -1) + { + disarmTrap('trinket'); + break; + } + } +} + +function GetSunkenCityZone(zoneName) +{ + var returnZone = 0; + switch (zoneName) + { + case 'Sand Dollar Sea Bar': + case 'Pearl Patch': + case 'Sunken Treasure': + returnZone = objSCZone.ZONE_TREASURE; + break; + case 'Feeding Grounds': + case 'Carnivore Cove': + returnZone = objSCZone.ZONE_DANGER; + break; + case 'Monster Trench': + case 'Lair of the Ancients': + returnZone = objSCZone.ZONE_DANGER_PP; + break; + case 'Deep Oxygen Stream': + case 'Oxygen Stream': + returnZone = objSCZone.ZONE_OXYGEN; + break; + case 'Magma Flow': + returnZone = objSCZone.ZONE_BONUS; + break; + case 'Coral Reef': + case 'Coral Garden': + case 'Coral Castle': + returnZone = objSCZone.ZONE_CORAL; + break; + case 'School of Mice': + case 'Mermouse Den': + case 'Lost Ruins': + returnZone = objSCZone.ZONE_SCALE; + break; + case 'Rocky Outcrop': + case 'Shipwreck': + case 'Haunted Shipwreck': + returnZone = objSCZone.ZONE_BARNACLE; + break; + case 'Shallow Shoals': + case 'Sea Floor': + case 'Murky Depths': + returnZone = objSCZone.ZONE_DEFAULT; + break; + default: + returnZone = objSCZone.ZONE_NOT_DIVE; + break; + } + return returnZone; +} + +function labyrinth() { + if (GetCurrentLocation().indexOf("Labyrinth") < 0) + return; + + var labyStatus = getPageVariable("user.quests.QuestLabyrinth.status"); + var isAtEntrance = (labyStatus=="intersection entrance"); + var isAtHallway = (labyStatus=="hallway"); + var isAtIntersection = (labyStatus=="intersection"); + var isAtExit = (labyStatus=="exit"); + var lastHunt = document.getElementsByClassName('labyrinthHUD-hallway-tile locked').length + 1; + var totalClue = parseInt(document.getElementsByClassName('labyrinthHUD-clueBar-totalClues')[0].innerText); + console.pdebug("Entrance:", isAtEntrance, "Intersection:", isAtIntersection, "Exit:", isAtExit); + var objLaby = getStorageToObject('Labyrinth', objDefaultLaby); + console.pdebug('District to focus:', objLaby.districtFocus); + bestLabyBase = bestLabyBase.concat(objBestTrap.base.luck).concat(objBestTrap.base.power); + var charmArmed = getPageVariable('user.trinket_name'); + if(objLaby.armOtherBase != 'false'){ + if(charmArmed.indexOf('Compass Magnet') === 0) + checkThenArm(null, 'base', objLaby.armOtherBase); + else + checkThenArm('best', 'base', bestLabyBase); + } + else + checkThenArm('best', 'base', bestLabyBase); + + var userVariable = undefined; + if(objLaby.disarmCompass && charmArmed.indexOf('Compass Magnet') > -1){ + userVariable = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestLabyrinth)')); + for (var i=0;i -1){ + if(userVariable.all_clues[i].quantity <= objLaby.nDeadEndClue) + disarmTrap('trinket'); + break; + } + } + } + + if(isAtHallway){ + var strCurHallwayFullname = document.getElementsByClassName('labyrinthHUD-hallwayName')[0].textContent.toUpperCase(); + if(strCurHallwayFullname.indexOf('FARMING') > -1){ + if(objLaby.weaponFarming == 'Arcane') + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane.concat(objBestTrap.weapon.forgotten)); + else + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + } + else + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + if(objLaby.securityDisarm){ + var strCurHallwayTier = strCurHallwayFullname.split(' ')[1]; + var maxCluePerHunt = 0; + if(strCurHallwayTier == 'PLAIN') + maxCluePerHunt = 1; + else if(strCurHallwayTier == 'SUPERIOR') + maxCluePerHunt = 2; + else + maxCluePerHunt = 3; + var classLantern = document.getElementsByClassName('labyrinthHUD-toggleLantern warcomammanderTooltipParent'); + var bLanternActive = true; + if(classLantern.length < 1) + bLanternActive = (getPageVariable('user.quests.QuestLabyrinth.lantern_status') == 'active'); + else + bLanternActive = (classLantern[0].getAttribute('class').indexOf('inactive') < 0); + if(bLanternActive) + maxCluePerHunt++; + if(charmArmed.indexOf('Lantern Oil') > -1) + maxCluePerHunt++; + console.plog('Hallway Last Hunt :', lastHunt, 'Total Clues:', totalClue, 'Max Clue Per Hunt:', maxCluePerHunt); + if(lastHunt <= objLaby.lastHunt && totalClue >= (100-maxCluePerHunt*lastHunt)) + disarmTrap('bait'); + } + return; + } + + if(isAtEntrance || isAtExit || objLaby.districtFocus.indexOf('None') > -1){ + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + checkThenArm(null, 'bait', 'Gouda'); + disarmTrap('trinket'); + return; + } + + var doorsIntersect = document.getElementsByClassName('labyrinthHUD-door'); + var doorsExit = document.getElementsByClassName('labyrinthHUD-exit'); + var objDoors = { + name : [], + length : [], + tier : [], + clue : [], + code : [], + priorities : [], + debug : [] + }; + var temp = ""; + for (var i=0;i -1){ + isAtIntersection = false; + return; + } + + if (doorsIntersect[i].getAttribute('class').indexOf('broken') > -1 || doorsIntersect[i].children.length<2){ + objDoors.length.push("LONG"); + objDoors.tier.push("PLAIN"); + objDoors.name.push("BROKEN"); + objDoors.debug.push("LONG PLAIN BROKEN"); + objDoors.code.push(""); + objDoors.clue.push(Number.MAX_SAFE_INTEGER); + objDoors.priorities.push(Number.MAX_SAFE_INTEGER); + } + else { + temp = doorsIntersect[i].children[1].innerText.toUpperCase(); + objDoors.debug.push(temp); + temp = temp.split(" "); + objDoors.length.push(temp[0]); + objDoors.tier.push(temp[1]); + objDoors.name.push(temp[2]); + objDoors.code.push(objCodename[temp[0]] + objCodename[temp[1]]); + objDoors.clue.push(Number.MAX_SAFE_INTEGER); + objDoors.priorities.push(Number.MAX_SAFE_INTEGER); + } + isAtIntersection = true; + } + + console.plog(objDoors.debug.join(",")); + temp = ""; + var range = ""; + var index = []; + try { + if(isNullOrUndefined(userVariable)) + userVariable = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestLabyrinth)')); + for (var i=0;i -1) + continue; + index = getAllIndices(objDoors.name, temp); + for(var j=0;j -1) + objShortestLength.type = "SHORT"; + else if(objDoors.length.indexOf("MEDIUM") > -1) + objShortestLength.type = "MEDIUM"; + else if(objDoors.length.indexOf("LONG") > -1) + objShortestLength.type = "LONG"; + objShortestLength.indices = getAllIndices(objDoors.length, objShortestLength.type); + objShortestLength.count = objShortestLength.indices.length; + console.pdebug(JSON.stringify(objShortestLength)); + console.pdebug(JSON.stringify(objFewestClue)); + if(objShortestLength.indices.length < 1 || objFewestClue.indices.length < 1){ + checkThenArm(null, 'bait', 'Gouda'); + disarmTrap('trinket'); + return; + } + + var arrTemp = []; + var nMin = Number.MAX_SAFE_INTEGER; + var nMinIndex = -1; + if(objLaby.typeOtherDoors.indexOf("SHORTEST") === 0){ // SHORTEST_ONLY / SHORTEST_FEWEST + if(objShortestLength.count > 1 && objLaby.typeOtherDoors.indexOf("FEWEST") > -1){ + for(var i=0;i -1) + arrTemp.push(nMinIndex); + } + else + arrTemp = objShortestLength.indices; + } + else if(objLaby.typeOtherDoors.indexOf("FEWEST") === 0){ // FEWEST_ONLY / FEWEST_SHORTEST + if(objFewestClue.count > 1 && objLaby.typeOtherDoors.indexOf("SHORTEST") > -1){ + var strTemp = ""; + for(var i=0;i -1) + arrTemp.push(nMinIndex); + } + else + arrTemp = objFewestClue.indices; + } + for(var i=0;i -1){ + if(objLaby.weaponFarming == 'Arcane') + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane.concat(objBestTrap.weapon.forgotten)); + else + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + } + else + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + checkThenArm(null, 'bait', 'Gouda'); + disarmTrap('trinket'); + fireEvent(doorsIntersect[arrTemp[i]], 'click'); + window.setTimeout(function () { fireEvent(document.getElementsByClassName('warcomammanderActionButton confirm')[0], 'click'); }, 1500); + break; + } + } + } + else{ + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + checkThenArm(null, 'bait', 'Gouda'); + disarmTrap('trinket'); + } + return; + } + else{ + if(objDoors.clue[index]<15) + range = 'between0and14'; + else if(objDoors.clue[index]<60) + range = 'between15and59'; + else + range = 'between60and100'; + } + + var arr; + var arrAll = []; + for (var i=0;i-1){ + index = arrHallwayOrder.indexOf(objDoors.code[i]); + if(index > -1){ + objDoors.priorities[i] = arrAll[index]; + } + } + } + + console.pdebug(objDoors); + var sortedDoorPriorities = sortWithIndices(objDoors.priorities, "ascend"); + fireEvent(doorsIntersect[sortedDoorPriorities.index[0]], 'click'); + window.setTimeout(function () { fireEvent(document.getElementsByClassName('warcomammanderActionButton confirm')[0], 'click'); }, 1500); + if(objLaby.districtFocus.indexOf('FARMING') > -1){ + if(objLaby.weaponFarming == 'Arcane') + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane.concat(objBestTrap.weapon.forgotten)); + else + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + } + else + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + } + catch (e){ + console.perror('labyrinth',e.message); + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + checkThenArm(null, 'bait', 'Gouda'); + disarmTrap('trinket'); + return; + } +} + +function zokor(){ + var loc = GetCurrentLocation(); + if (loc.indexOf("Labyrinth") > -1){ + setStorage('eventLocation', 'Labyrinth'); + labyrinth(); + return; + } + else if (loc.indexOf("Zokor") < 0) + return; + + var objDefaultZokor = { + bossStatus : ['INCOMING', 'ACTIVE', 'DEFEATED'], + bait : new Array(3).fill('Gouda'), + trinket : new Array(3).fill('None') + }; + var objZokor = getStorageToObject('Zokor', objDefaultZokor); + var objAncientCity = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestAncientCity)')); + objAncientCity.boss = objAncientCity.boss.toUpperCase(); + var nIndex = objZokor.bossStatus.indexOf(objAncientCity.boss); + console.plog('District Tier:', objAncientCity.district_tier, 'Boss Status:', objAncientCity.boss); + if(objAncientCity.district_tier < 3) + return; + + checkThenArm('best', 'weapon', objBestTrap.weapon.forgotten); + checkThenArm('best', 'base', objBestTrap.base.luck); + if(nIndex > -1){ + checkThenArm(null, 'bait', objZokor.bait[nIndex]); + if(objZokor.trinket[nIndex] == 'None') + disarmTrap('trinket'); + else + checkThenArm(null, 'trinket', objZokor.trinket[nIndex]); + } +} + +function fw(){ + if (GetCurrentLocation().indexOf("Fiery Warpath") < 0) + return; + + var wave = getPageVariable('user.viewing_atts.desert_warpath.wave'); + wave = parseInt(wave); + var objDefaultFWAll = { + wave1 : JSON.parse(JSON.stringify(objDefaultFW)), + wave2 : JSON.parse(JSON.stringify(objDefaultFW)), + wave3 : JSON.parse(JSON.stringify(objDefaultFW)), + wave4 : JSON.parse(JSON.stringify(objDefaultFW)), + }; + var objFWAll = getStorageToObject('FW', objDefaultFWAll); + var temp = false; + for(var prop in objFWAll){ + if(objFWAll.hasOwnProperty(prop)){ + if(assignMissingDefault(objFWAll[prop], objDefaultFW)) + temp = true; + } + } + if(temp) + setStorage('FW', JSON.stringify(objFWAll)); + var objFW = objFWAll['wave'+wave]; + if (wave == 4){ + var nWardenLeft = parseInt(document.getElementsByClassName('population')[0].textContent); + console.pdebug('Wave:', wave, 'Warden Left:', nWardenLeft); + if(Number.isNaN(nWardenLeft)) + nWardenLeft = 12; + temp = (nWardenLeft <= 0) ? "after" : "before"; + checkThenArm(null, 'weapon', objFW.warden[temp].weapon); + checkThenArm(null, 'base', objFW.warden[temp].base); + checkThenArm(null, 'trinket', objFW.warden[temp].trinket); + checkThenArm(null, 'bait', objFW.warden[temp].bait); + return; + } + + checkThenArm(null, 'base', objFW.base); + objFW.streak = parseInt(document.getElementsByClassName('streak_quantity')[0].innerText); + console.pdebug('Wave:', wave, 'Streak:', objFW.streak); + if(Number.isNaN(objFW.streak) || objFW.streak < 0 || objFW.streak >= g_fwStreakLength) + return; + + if(isNullOrUndefined(objFW.cheese[objFW.streak])) + objFW.cheese[objFW.streak] = 'Gouda'; + if(isNullOrUndefined(objFW.charmType[objFW.streak])) + objFW.charmType[objFW.streak] = 'Warpath'; + if(isNullOrUndefined(objFW.special[objFW.streak])) + objFW.special[objFW.streak] = 'None'; + + objFW.streakMouse = getPageVariable('user.viewing_atts.desert_warpath.streak.mouse_type'); + if(objFW.streakMouse.indexOf('desert_') > -1) + objFW.streakMouse = capitalizeFirstLetter(objFW.streakMouse.split('_')[1]); + + console.pdebug('Current streak mouse type:', objFW.streakMouse); + var population = document.getElementsByClassName('population'); + objFW.population = { + all : [], + normal : [], + special : [], + active : [] + }; + objFW.soldierActive = false; + var charmName; + for(var i=0;i 0) + objFW.population.active.push(1); + else + objFW.population.active.push(0); + if(i == objPopulation.Units || i == objPopulation.BUILDING || i == objPopulation.TURRETS){ + objFW.population.normal.push(temp); + objFW.soldierActive |= (temp > 0); + } + else{ + objFW.population.special.push(temp); + } + } + + if(!objFW.soldierActive && objFW.focusType == 'NORMAL') + objFW.focusType = 'SPECIAL'; + + console.pdebug(objFW); + var index = -1; + var charmArmed = getPageVariable('user.trinket_name'); + var nSum; + if(wave == 3 && !objFW.includeMISSILES){ + var arrTemp = objFW.population.active.slice(); + arrTemp[objPopulation.MISSILES] = 0; + nSum = sumData(arrTemp); + if(nSum < 1) + nSum = 1; + } + else + nSum = sumData(objFW.population.active); + if(nSum == 1){ // only one soldier type left + if(objFW.lastSoldierConfig == 'CONFIG_STREAK') + objFW.priorities = 'HIGHEST'; + else if(objFW.lastSoldierConfig == 'CONFIG_UNCHANGED') + return; + else if(objFW.lastSoldierConfig == 'CONFIG_GOUDA' || objFW.lastSoldierConfig == 'NO_WARPATH'){ + index = objFW.population.active.indexOf(1); + if(index == objPopulation.WORKSHOPS) + checkThenArm('best', 'weapon', objBestTrap.weapon.tactical); + else if(index == objPopulation.TECHNICAL CENTRE) + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + else if(index == objPopulation.MISSILES) + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane); + else + checkThenArm(null, 'weapon', objFW.weapon); + if(charmArmed.indexOf('Warpath') > -1) + disarmTrap('trinket'); + if(objFW.lastSoldierConfig == 'CONFIG_GOUDA') + checkThenArm(null, 'bait', 'Gouda'); + return; + } + } + if(objFW.special[objFW.streak] == 'COMMANDER'){ + checkThenArm(null, 'weapon', objFW.weapon); + if(objFW.charmType[objFW.streak].indexOf('Super') > -1) + charmName = ["Super Warpath Commander's Charm", "Warpath Commander's Charm"]; + else + charmName = "Warpath Commander's Charm"; + } + else if(objFW.special[objFW.streak] == 'GARGANTUA'){ + checkThenArm('best', 'weapon', objBestTrap.weapon.draconic); + if(charmArmed.indexOf('Warpath') > -1) + charmName = 'None'; + else + charmName = undefined; + } + else{ + var bCurrentStreakZeroPopulation = false; + var bWrongSoldierTypeStreak = false; + var indexMinMax; + objFW.focusType = objFW.focusType.toLowerCase(); + if(objFW.priorities == 'HIGHEST') + indexMinMax = maxIndex(objFW.population[objFW.focusType]); + else{ + for(var i=0;i -1){ + bCurrentStreakZeroPopulation = (objFW.population.all[index] < 1); + if(objFW.soldierActive && index >=3 && objFW.focusType.toUpperCase() == 'NORMAL'){ + bWrongSoldierTypeStreak = !(objFW.streak == 2 || objFW.streak >= 5); + } + else if(!objFW.soldierActive && objFW.focusType.toUpperCase() == 'SPECIAL'){ + bWrongSoldierTypeStreak = (index != (indexMinMax+3) && objFW.streak < 2); + } + } + + if(objFW.streak === 0 || bCurrentStreakZeroPopulation || bWrongSoldierTypeStreak){ + objFW.streak = 0; + temp = objFW.population[objFW.focusType][indexMinMax]; + if(objFW.focusType.toUpperCase() == 'NORMAL'){ + checkThenArm(null, 'weapon', objFW.weapon); + var count = countArrayElement(temp, objFW.population[objFW.focusType]); + if(count > 1){ + if(objFW.population[objFW.focusType][objPopulation.BUILDING] == temp) + charmName = objFW.charmType[0] + ' BUILDING'; + else if(objFW.population[objFW.focusType][objPopulation.TURRETS] == temp) + charmName = objFW.charmType[0] + ' TURRETS'; + else if(objFW.population[objFW.focusType][objPopulation.Units] == temp) + charmName = objFW.charmType[0] + ' Units'; + } + else{ + charmName = objFW.charmType[0] + ' ' + objPopulation.name[indexMinMax]; + } + } + else{ + if((indexMinMax+3) == objPopulation.MISSILES && nSum !=1){ + temp = objFW.population.special.slice(); + temp.splice(indexMinMax,1); + if(objFW.priorities == 'HIGHEST') + indexMinMax = maxIndex(temp); + else + indexMinMax = minIndex(temp); + } + indexMinMax += 3; + if(indexMinMax == objPopulation.WORKSHOPS){ + checkThenArm('best', 'weapon', objBestTrap.weapon.tactical); + charmName = objFW.charmType[0] + ' WORKSHOPS'; + } + else if(indexMinMax == objPopulation.TECHNICAL CENTRE){ + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + charmName = objFW.charmType[0] + ' TECHNICAL CENTRE'; + } + else if(indexMinMax == objPopulation.MISSILES){ + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane); + if(charmArmed.indexOf('Warpath') > -1) + charmName = 'None'; + else + charmName = undefined; + } + } + } + else{ // streak 1 and above + if(index == objPopulation.MISSILES && charmArmed.indexOf('Warpath') > -1) + charmName = 'None'; + else{ + if(objFW.charmType[objFW.streak].indexOf('Super') > -1) + charmName = [objFW.charmType[objFW.streak] + ' ' + objPopulation.name[index], 'Warpath ' + objPopulation.name[index]]; + else + charmName = objFW.charmType[objFW.streak] + ' ' + objPopulation.name[index]; + } + + if(index == objPopulation.WORKSHOPS) + checkThenArm('best', 'weapon', objBestTrap.weapon.tactical); + else if(index == objPopulation.TECHNICAL CENTRE) + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + else if(index == objPopulation.MISSILES) + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane); + else + checkThenArm(null, 'weapon', objFW.weapon); + } + } + checkThenArm(null, 'bait', objFW.cheese[objFW.streak]); + if(objFW.disarmAfterSupportRetreat && sumData(objFW.population.all) <= g_arrFWSupportRetreat[wave]){ + if(charmArmed.indexOf('Warpath') > -1) + disarmTrap('trinket'); + } + else + checkThenArm('best', 'trinket', charmName); +} + +function fRift(){ + if(GetCurrentLocation().indexOf('Furoma Rift') < 0) + return; + + var objDefaultFR = { + enter : 0, + retreat : 0, + weapon : new Array(11).fill(''), + base : new Array(11).fill(''), + trinket : new Array(11).fill(''), + bait : new Array(11).fill(''), + masterOrder : new Array(11).fill('Glutter=>Combat=>Susheese') + }; + var objFR = getStorageToObject('FRift', objDefaultFR); + objFR.enter = parseInt(objFR.enter); + objFR.retreat = parseInt(objFR.retreat); + var objUserFRift = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestRiftFuroma)')); + console.pdebug(objUserFRift.view_state); + var bInPagoda = (objUserFRift.view_state == 'pagoda' || objUserFRift.view_state == 'pagoda knows_all'); + var i; + if(bInPagoda){ + var nCurBatteryLevel = 0; + var nRemainingEnergy = parseInt(getPageVariable('user.quests.QuestRiftFuroma.droid.remaining_energy').replace(/,/g, '')); + if(Number.isNaN(nRemainingEnergy)){ + console.plog('Remaining Energy:', nRemainingEnergy); + return; + } + for(i=objFRBattery.cumulative.length-1;i>=0;i--){ + if(nRemainingEnergy <= objFRBattery.cumulative[i]) + nCurBatteryLevel = i+1; + else + break; + } + console.plog('In Pagoda, Current Battery Level:', nCurBatteryLevel, 'Remaining Energy:', nRemainingEnergy); + if(nCurBatteryLevel <= objFR.retreat){ + fRiftArmTrap(objFR, 0); + if(nCurBatteryLevel !== 0){ + // retreat + fireEvent(document.getElementsByClassName('riftFuromaHUD-leavePagoda')[0], 'click'); + window.setTimeout(function () { fireEvent(document.getElementsByClassName('warcomammanderActionButton confirm')[0], 'click'); }, 1500); + } + } + else{ + fRiftArmTrap(objFR, nCurBatteryLevel); + } + } + else{ + var nFullBatteryLevel = 0; + var classBattery = document.getElementsByClassName('riftFuromaHUD-battery'); + var nStoredEnerchi = parseInt(document.getElementsByClassName('total_energy')[0].children[1].innerText.replace(/,/g, '')); + if(classBattery.length < 1 || Number.isNaN(nStoredEnerchi)){ + console.plog('Stored Enerchi:',nStoredEnerchi); + return; + } + for(i=0;i= objFRBattery.cumulative[i]) + nFullBatteryLevel = i+1; + else + break; + } + console.plog('In Training Ground, Fully Charged Battery Level:', nFullBatteryLevel, 'Stored Enerchi:', nStoredEnerchi); + if(Number.isInteger(objFR.enter) && nFullBatteryLevel >= objFR.enter){ + fRiftArmTrap(objFR, objFR.enter); + // enter + fireEvent(classBattery[objFR.enter-1], 'click'); + window.setTimeout(function () { fireEvent(document.getElementsByClassName('warcomammanderActionButton confirm')[0], 'click'); }, 1500); + } + else{ + fRiftArmTrap(objFR, 0); + } + } +} + +function fRiftArmTrap(obj, nIndex){ + checkThenArm(null, 'weapon', obj.weapon[nIndex]); + checkThenArm(null, 'base', obj.base[nIndex]); + checkThenArm(null, 'trinket', obj.trinket[nIndex]); + if(obj.bait[nIndex] == 'ORDER_MASTER'){ + var arr = obj.masterOrder[nIndex].split("=>"); + arr = arr.map(function(e) {return 'Rift ' + e;}); + checkThenArm('best', 'bait', arr); + } + else + checkThenArm(null, 'bait', obj.bait[nIndex]); +} + +function livingGarden(obj) { + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + var charmArmed = getPageVariable('user.trinket_name'); + var baitArmed = getPageVariable('user.bait_name'); + var pourEstimate = document.getElementsByClassName('pourEstimate')[0]; + var estimateHunt = parseInt(pourEstimate.innerText); + var strStatus = ''; + if(Number.isNaN(estimateHunt)) + strStatus = 'Poured'; + else if(estimateHunt >= 35) + strStatus = 'Filled'; + else + strStatus = 'Filling'; + console.pdebug('Estimate Hunt:', estimateHunt, 'Status:', strStatus); + if (obj.LG.trinket.after.indexOf('Sponge') > -1) + obj.LG.trinket.after = 'None'; + if(strStatus == 'Poured'){ + checkThenArm(null, 'base', obj.LG.base.after); + checkThenArm(null, 'trinket', obj.LG.trinket.after); + checkThenArm(null, 'bait', obj.LG.bait.after); + } + else if(strStatus == 'Filled'){ + var pourButton = document.getElementsByClassName('pour')[0]; + if(obj.LG.isAutoPour && !isNullOrUndefined(pourButton)){ + fireEvent(pourButton, 'click'); + if (document.getElementsByClassName('confirm button')[0]){ + window.setTimeout(function () { fireEvent(document.getElementsByClassName('confirm button')[0], 'click'); }, 1000); + checkThenArm(null, 'base', obj.LG.base.after); + checkThenArm(null, 'trinket', obj.LG.trinket.after); + checkThenArm(null, 'bait', obj.LG.bait.after); + } + else{ + checkThenArm('best', 'base', bestLGBase); + if (charmArmed.indexOf('Sponge') > -1) + disarmTrap('trinket'); + if (baitArmed.indexOf('Camembert') > -1) + checkThenArm(null, 'bait', 'Gouda'); + } + } + else{ + checkThenArm('best', 'base', bestLGBase); + if (charmArmed.indexOf('Sponge') > -1) + disarmTrap('trinket'); + if (baitArmed.indexOf('Camembert') > -1) + checkThenArm(null, 'bait', 'Gouda'); + } + } + else if(strStatus == 'Filling'){ + checkThenArm('best', 'base', bestLGBase); + if(!obj.LG.isAutoFill){ + if (charmArmed.indexOf('Sponge') > -1 || + obj.LG.trinket.after.indexOf(charmArmed) > -1 || charmArmed.indexOf(obj.LG.trinket.after) > -1) + disarmTrap('trinket'); + } + else{ + if (estimateHunt >= 28) + checkThenArm(null, 'trinket', 'Sponge'); + else + checkThenArm('best', 'trinket', spongeCharm); + } + if (baitArmed.indexOf('Camembert') > -1 && baitArmed.indexOf('Duskshade') < 0) + checkThenArm(null, 'bait', 'Gouda'); + } +} + +function lostCity(obj) { + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane); + checkThenArm(null, 'bait', 'Dewthief'); + var isCursed = (document.getElementsByClassName('stateBlessed hidden').length > 0); + console.pdebug('Cursed:', isCursed); + + //disarm seTURRETS charm when cursed is lifted + if (!isCursed) { + checkThenArm(null, 'base', obj.LG.base.after); + if (obj.LC.trinket.after.indexOf('SeTURRETS') > -1) + obj.LC.trinket.after = 'None'; + checkThenArm(null, 'trinket', obj.LC.trinket.after); + } + else{ + checkThenArm(null, 'trinket', 'SeTURRETS'); + checkThenArm('best', 'base', bestLGBase); + } +} + +function sandDunes() { + var hasStampede = getPageVariable('user.quests.QuestSandDunes.minigame.has_stampede'); + console.pdebug('Has Stampede:', hasStampede); + + //disarm grubling chow charm when there is no stampede + if (hasStampede == 'false'){ + if (getPageVariable('user.trinket_name').indexOf('Chow') > -1) + disarmTrap('trinket'); + } + else + checkThenArm(null, 'trinket', 'Grubling Chow'); + checkThenArm('best', 'weapon', objBestTrap.weapon.shadow); + checkThenArm('best', 'base', bestLGBase); + checkThenArm(null, 'bait', 'Dewthief'); +} + +function twistedGarden(obj) { + checkThenArm('best', 'weapon', objBestTrap.weapon.hydro); + var red = parseInt(document.getElementsByClassName('itemITECHNICAL CENTRE red')[0].innerText); + var yellow = parseInt(document.getElementsByClassName('itemITECHNICAL CENTRE yellow')[0].innerText); + var nEstimateHunt = -1; + var charmArmed = getPageVariable('user.trinket_name'); + var strStatus = ''; + if(Number.isNaN(red) || Number.isNaN(yellow) || document.getElementsByClassName('stateFilling hidden').length > 0){ + strStatus = 'Poured'; + nEstimateHunt = parseInt(document.getElementsByClassName('pouring')[0].textContent); + } + else if(red == 10 && yellow == 10) + strStatus = 'Filled'; + else + strStatus = 'Filling'; + console.pdebug('Red:', red, 'Yellow:', yellow, 'Estimate Hunt:', nEstimateHunt, 'Status:', strStatus); + var redPlusYellow = redSpongeCharm.concat(yellowSpongeCharm); + if (obj.TG.trinket.after.indexOf('Red') > -1 || obj.TG.trinket.after.indexOf('Yellow') > -1) + obj.TG.trinket.after = 'None'; + if(strStatus == 'Poured'){ + checkThenArm(null, 'base', obj.TG.base.after); + checkThenArm(null, 'trinket', obj.TG.trinket.after); + checkThenArm(null, 'bait', obj.TG.bait.after); + } + else if(strStatus == 'Filled'){ + var pourButton = document.getElementsByClassName('pour')[0]; + if(obj.TG.isAutoPour && !isNullOrUndefined(pourButton)){ + fireEvent(pourButton, 'click'); + if (document.getElementsByClassName('confirm button')[0]){ + window.setTimeout(function () { fireEvent(document.getElementsByClassName('confirm button')[0], 'click'); }, 1000); + checkThenArm(null, 'base', obj.TG.base.after); + checkThenArm(null, 'trinket', obj.TG.trinket.after); + checkThenArm(null, 'bait', obj.TG.bait.after); + } + else{ + checkThenArm('best', 'base', bestLGBase); + if (charmArmed.indexOf('Red') > -1 || charmArmed.indexOf('Yellow') > -1) + disarmTrap('trinket'); + checkThenArm(null, 'bait', 'Duskshade Camembert'); + } + } + else{ + checkThenArm('best', 'base', bestLGBase); + if (charmArmed.indexOf('Red') > -1 || charmArmed.indexOf('Yellow') > -1) + disarmTrap('trinket'); + checkThenArm(null, 'bait', 'Duskshade Camembert'); + } + } + else if(strStatus == 'Filling'){ + checkThenArm('best', 'base', bestLGBase); + if(!obj.TG.isAutoFill){ + if (charmArmed.indexOf('Red') > -1 || charmArmed.indexOf('Yellow') > -1 || + obj.TG.trinket.after.indexOf(charmArmed) > -1 || charmArmed.indexOf(obj.TG.trinket.after) > -1) + disarmTrap('trinket'); + } + else{ + if (red <= 8 && yellow <= 8) + checkThenArm('best', 'trinket', redPlusYellow); + else if (red < 10){ + if (red <= 8) + checkThenArm('best', 'trinket', redSpongeCharm); + else + checkThenArm(null, 'trinket', 'Red Sponge'); + } + else if (red == 10 && yellow < 10){ + if (yellow <=8) + checkThenArm('best', 'trinket', yellowSpongeCharm); + else + checkThenArm(null, 'trinket', 'Yellow Sponge'); + } + } + checkThenArm(null, 'bait', 'Duskshade Camembert'); + } +} + +function cursedCity(obj) { + checkThenArm('best', 'weapon', objBestTrap.weapon.arcane); + checkThenArm(null, 'bait', 'Graveblossom'); + var objCC = JSON.parse(getPageVariable('JSON.stringify(user.quests.QuestLostCity.minigame)')); + var curses = ""; + var charmArmed = getPageVariable('user.trinket_name'); + console.plog(objCC); + if (objCC.is_cursed === false){ + checkThenArm(null, 'base', obj.CC.base.after); + if (obj.CC.trinket.after.indexOf('Bravery') > -1 || obj.CC.trinket.after.indexOf('Shine') > -1 || obj.CC.trinket.after.indexOf('Clarity') > -1) + obj.CC.trinket.after = 'None'; + checkThenArm(null, 'trinket', obj.CC.trinket.after); + } + else{ + var cursedCityCharm = []; + for (var i = 0; i < objCC.curses.length; ++i){ + console.plog("i:", i, "Active:", objCC.curses[i].active); + if(objCC.curses[i].active){ + switch (i){ + case 0: + console.pdebug("Fear Active"); + cursedCityCharm.push('Bravery'); + break; + case 1: + console.pdebug("Darkness Active"); + cursedCityCharm.push('Shine'); + break; + case 2: + console.pdebug("Mist Active"); + cursedCityCharm.push('Clarity'); + break; + } + } + } + checkThenArm('any', 'trinket', cursedCityCharm); + checkThenArm('best', 'base', bestLGBase); + } +} + +function sandCrypts(obj) { + checkThenArm('best', 'weapon', objBestTrap.weapon.shadow); + checkThenArm(null, 'bait', 'Graveblossom'); + var salt = parseInt(document.getElementsByClassName('salt_charms')[0].innerText); + console.pdebug('Salted:', salt); + if (salt >= obj.SC.maxSaltCharged){ + checkThenArm(null, 'base', obj.SC.base.after); + checkThenArm(null, 'trinket', 'Grub Scent'); + } + else { + checkThenArm(null, 'base', obj.SC.base.before); + if ((obj.SC.maxSaltCharged - salt) == 1) + checkThenArm(null, 'trinket', 'Grub Salt'); + else + checkThenArm('best', 'trinket', bestSalt); + } +} + +function DisarmLGSpecialCharm(locationName) +{ + var obj = {}; + obj['Living Garden'] = spongeCharm.slice(); + obj['Lost City'] = ['SeTURRETS']; + obj['Sand Dunes'] = ['Grubling Chow']; + obj['Twisted Garden'] = redSpongeCharm.concat(yellowSpongeCharm); + obj['Cursed City'] = ['Bravery', 'Shine', 'Clarity']; + obj['Sand Crypts'] = bestSalt.slice(); + delete obj[locationName]; + var charmArmed = getPageVariable("user.trinket_name"); + for (var prop in obj) + { + if(obj.hasOwnProperty(prop)) + { + for (var i = 0; i < obj[prop].length; ++i) + { + if (charmArmed.indexOf(obj[prop][i]) === 0) + { + disarmTrap('trinket'); + return; + } + } + } + } +} + +function retrieveMouseList() { + fireEvent(document.getElementById('effectiveness'), 'click'); + var sec = secWait; + var intervalRML = setInterval( + function () { + if (document.getElementsByClassName('thumb').length > 0) + { + mouseList = []; + var y = document.getElementsByClassName('thumb'); + for (var i = 0; i < y.length; ++i) { + mouseList.push(y[i].getAttribute('title')); + } + fireEvent(document.getElementById('trapSelectorBrowserClose'), 'click'); + clearInterval(intervalRML); + intervalRML = null; + return; + } + else + { + --sec; + if (sec <= 0) { + fireEvent(document.getElementById('effectiveness'), 'click'); + sec = secWait; + } + } + }, 1000); + return; +} + +function checkMouse(mouseName) { + for (var i = 0; i < mouseList.length; ++i) { + if (mouseList[i].indexOf(mouseName) > -1) { + return true; + } + return false; + } +} + +function magicalPillowcase(){ + +} + +function checkCharge2016(stopDischargeAt){ + try { + var charge = parseInt(document.getElementsByClassName('springHuntHUD-charge-quantity')[0].innerText); + var isDischarge = (getStorage("discharge") == "true"); + console.pdebug('Current Charge:', charge, 'Discharging:', isDischarge, 'Stop Discharge At:', stopDischargeAt); + var charmContainer = document.getElementsByClassName('springHuntHUD-charmContainer')[0]; + var eggstra = {}; + eggstra.quantity = parseInt(charmContainer.children[0].children[0].innerText); + eggstra.link = charmContainer.children[0].children[1]; + eggstra.isArmed = (eggstra.link.getAttribute('class').indexOf('active') > 0); + eggstra.canArm = (eggstra.quantity > 0 && !eggstra.isArmed); + var eggstraCharge = {}; + eggstraCharge.quantity = parseInt(charmContainer.children[1].children[0].innerText); + eggstraCharge.link = charmContainer.children[1].children[1]; + eggstraCharge.isArmed = (eggstraCharge.link.getAttribute('class').indexOf('active') > 0); + eggstraCharge.canArm = (eggstraCharge.quantity > 0 && !eggstraCharge.isArmed); + var eggscavator = {}; + eggscavator.quantity = parseInt(charmContainer.children[2].children[0].innerText); + eggscavator.link = charmContainer.children[2].children[1]; + eggscavator.isArmed = (eggscavator.link.getAttribute('class').indexOf('active') > 0); + eggscavator.canArm = (eggscavator.quantity > 0 && !eggscavator.isArmed); + + if (charge == 20) { + setStorage("discharge", "true"); + if (eggstra.canArm) fireEvent(eggstra.link, 'click'); + } + else if (charge < 20 && charge > stopDischargeAt) { + if (isDischarge) { + if (eggstra.canArm) fireEvent(eggstra.link, 'click'); + } + else { + if (charge >= chargeHigh) { + if (eggstraCharge.quantity > 0){ + if (!eggstraCharge.isArmed) fireEvent(eggstraCharge.link, 'click'); + } + else{ + if (eggscavator.canArm) fireEvent(eggscavator.link, 'click'); + } + } + else { + if (eggscavator.canArm) fireEvent(eggscavator.link, 'click'); + } + } + } + else if (charge <= stopDischargeAt) { + if (charge >= chargeHigh) { + if (eggstraCharge.quantity > 0){ + if (!eggstraCharge.isArmed) fireEvent(eggstraCharge.link, 'click'); + } + else{ + if (eggscavator.canArm) fireEvent(eggscavator.link, 'click'); + } + } + else { + if (eggscavator.canArm) fireEvent(eggscavator.link, 'click'); + } + setStorage("discharge", "false"); + } + } + catch (e) { + console.perror('checkCharge2016',e.message); + } +} +function checkCharge(stopDischargeAt) { + try { + var charge = parseInt(document.getElementsByClassName("chargeQuantity")[0].innerText); + console.pdebug('Current Charge:', charge); + if (charge == 20) { + setStorage("discharge", true.toString()); + checkThenArm(null, "trinket", "Eggstra Charm"); + } + + else if (charge < 20 && charge > stopDischargeAt) { + if (getStorage("discharge") == "true") { + checkThenArm(null, "trinket", "Eggstra Charm"); + } + else { + if (stopDischargeAt == 17) { + checkThenArm('best', "trinket", chargeCharm); + } + else { + checkThenArm(null, "trinket", "Eggscavator"); + } + } + } + else if (charge == stopDischargeAt) { + if (stopDischargeAt == 17) { + checkThenArm('best', "trinket", chargeCharm); + } + else { + checkThenArm(null, "trinket", "Eggscavator"); + } + setStorage("discharge", false.toString()); + } + else if (charge < stopDischargeAt) { + setStorage("discharge", false.toString()); + checkThenArm(null, "trinket", "Eggscavator"); + } + return; + } + catch (e) { + console.perror('checkCharge',e.message); + } +} + +function checkThenArm(sort, category, name, isForcedRetry) //category = weapon/base/charm/trinket/bait +{ + if(isNullOrUndefined(name) || name === '') + return; + + if (category == "charm") + category = "trinket"; + + if(!(Array.isArray(name))){ + var obj = getConstToRealValue(sort, category, name); + if(obj.changed){ + sort = obj.sort; + name = obj.name; + } + } + + if(Array.isArray(name)){ + if(!(sort == 'best' || sort == 'any')) + sort = 'best'; + if(name.length == 1){ + sort = null; + name = name[0]; + } + } + else{ + if(name.toUpperCase().indexOf('NONE') === 0){ + disarmTrap(category); + return; + } + sort = null; + } + + if(isNullOrUndefined(isForcedRetry)) + isForcedRetry = true; + + var trapArmed = undefined; + var userVariable = getPageVariable("user." + category + "_name"); + if (sort == 'best') { + getTrapList(category); + if (objTrapList[category].length === 0){ + var intervalCTA1 = setInterval( + function (){ + if (!arming){ + getTrapListFromTrapSelector(sort, category, name, isForcedRetry); + clearInterval(intervalCTA1); + intervalCTA1 = null; + return; + } + }, 1000); + return; + } + else{ + var nIndex = -1; + for (var i = 0; i < name.length; i++) { + for (var j = 0; j < objTrapList[category].length; j++) { + nIndex = objTrapList[category][j].indexOf("..."); + if(nIndex > -1) + name[i] = name[i].substr(0,nIndex); + if (objTrapList[category][j].indexOf(name[i]) === 0){ + console.plog('Best', category, 'found:', name[i], 'Currently Armed:', userVariable); + if (userVariable.indexOf(name[i]) === 0) { + trapArmed = true; + arming = false; + closeTrapSelector(category); + return; + } + else { + trapArmed = false; + break; + } + } + } + if (trapArmed === false) + break; + } + } + } + else if(sort == 'any'){ + trapArmed = false; + for (var i = 0; i < name.length; i++){ + if (userVariable.indexOf(name[i]) === 0){ + trapArmed = true; + break; + } + } + } + else{ + trapArmed = (userVariable.indexOf(name) === 0); + } + + if (trapArmed === undefined && isForcedRetry){ + console.plog(name.join("/"), "not found in TrapList" + capitalizeFirstLetter(category)); + clearTrapList(category); + checkThenArm(sort, category, name, false); + } + else if (trapArmed === false){ + addArmingIntoList(category); + var intervalCTA = setInterval( + function (){ + if (arming === false){ + clickThenArmTrapInterval(sort, category, name); + clearInterval(intervalCTA); + intervalCTA = null; + return; + } + }, 1000); + } +} + +function getConstToRealValue(sort, category, name){ + var objRet = { + changed : false, + sort : sort, + name : name + }; + if(g_objConstTrap.hasOwnProperty(category)){ + var arrKeys = Object.keys(g_objConstTrap[category]); + var nIndex = arrKeys.indexOf(name); + if(nIndex > -1){ + var keyName = arrKeys[nIndex]; + objRet.sort = g_objConstTrap[category][keyName].sort; + objRet.name = g_objConstTrap[category][keyName].name.slice(); + objRet.changed = true; + } + } + return objRet; +} + +function addArmingIntoList(category){ + g_arrArmingList.push(category); +} + +function deleteArmingFromList(category){ + var nIndex = g_arrArmingList.indexOf(category); + if(nIndex > -1) + g_arrArmingList.splice(nIndex, 1); +} + +function isArmingInList(){ + return (g_arrArmingList.length > 0); +} + +function clickThenArmTrapInterval(sort, trap, name){ //sort = power/luck/attraction + clickTrapSelector(trap); + var sec = secWait; + var armStatus = LOADING; + var retry = armTrapRetry; + var intervalCTATI = setInterval( + function (){ + armStatus = armTrap(sort, trap, name); + if (armStatus != LOADING){ + deleteArmingFromList(trap); + if(isNewUI && !isArmingInList()) + closeTrapSelector(trap); + clearInterval(intervalCTATI); + arming = false; + intervalCTATI = null; + if (armStatus == NOT_FOUND){ + //clearTrapList(trap); + if (trap == 'trinket') + disarmTrap('trinket'); + else + closeTrapSelector(trap); + } + return; + } + else{ + --sec; + if (sec <= 0){ + clickTrapSelector(trap, true); + sec = secWait; + --retry; + if (retry <= 0){ + deleteArmingFromList(trap); + if(isNewUI && !isArmingInList()) + closeTrapSelector(trap); + clearInterval(intervalCTATI); + arming = false; + intervalCTATI = null; + return; + } + } + } + }, 1000); + return; +} + +// name = Brie/Gouda/Swiss (brie = wrong) +function armTrap(sort, trap, name) { + return (isNewUI) ? armTrapNewUI(sort, trap, name) : armTrapClassicUI(sort, trap, name); +} + +function armTrapClassicUI(sort, trap, name){ + var tagGroupElement = document.getElementsByClassName('tagGroup'); + var tagElement; + var nameElement; + var nIndex = -1; + var arrName = (Array.isArray(name)) ? name.slice() : [name]; + + if (sort == 'best' || sort == 'any') + name = name[0]; + + if (tagGroupElement.length > 0){ + console.pdebug('Try to arm', name); + for (var i = 0; i < tagGroupElement.length; ++i){ + tagElement = tagGroupElement[i].getElementsByTagName('a'); + for (var j = 0; j < tagElement.length; ++j){ + nameElement = tagElement[j].getElementsByClassName('name')[0].innerText; + nIndex = nameElement.indexOf("..."); + if(nIndex > -1) + name = name.substr(0, nIndex); + if (nameElement.indexOf(name) === 0){ + if(tagElement[j].getAttribute('class').indexOf('selected')<0) // only click when not arming + fireEvent(tagElement[j], 'click'); + else + closeTrapSelector(trap); + + if(objTrapList[trap].indexOf(nameElement) < 0){ + objTrapList[trap].unshift(nameElement); + setStorage("TrapList" + capitalizeFirstLetter(trap), objTrapList[trap].join(",")); + } + console.pdebug(name, 'armed'); + return ARMED; + } + } + } + console.pdebug(name, 'not found'); + for(var i=0;i 0) + return armTrapClassicUI(sort, trap, arrName); + else + return NOT_FOUND; + } + else + return NOT_FOUND; + } + else + return LOADING; +} + +function armTrapNewUI(sort, trap, name){ + var itemEle = document.getElementsByClassName('campPage-trap-itemBrowser-item'); + var nameElement; + var arrName = (Array.isArray(name)) ? name.slice() : [name]; + + if (sort == 'best' || sort == 'any') + name = name[0]; + + if (itemEle.length > 0) { + console.pdebug('Trying to arm ' + name); + for (var i = 0; i < itemEle.length; i++) { + nameElement = itemEle[i].getElementsByClassName('campPage-trap-itemBrowser-item-name')[0].textContent; + if (nameElement.indexOf(name) === 0) { + if(itemEle[i].getAttribute('class').indexOf('canArm') > -1) + fireEvent(itemEle[i].getElementsByClassName('campPage-trap-itemBrowser-item-armButton')[0], 'click'); + else + closeTrapSelector(trap); + if(objTrapList[trap].indexOf(nameElement) < 0){ + objTrapList[trap].unshift(nameElement); + setStorage("TrapList" + capitalizeFirstLetter(trap), objTrapList[trap].join(",")); + } + console.pdebug(name + ' armed'); + return ARMED; + } + } + + console.pdebug(name, 'not found'); + for(var i=0;i 0) + return armTrapNewUI(sort, trap, arrName); + else + return NOT_FOUND; + } + else + return NOT_FOUND; + } + else + return LOADING; +} + +function clickTrapSelector(strSelect, bForceClick){ //strSelect = weapon/base/charm/trinket/bait + if(isNullOrUndefined(bForceClick)) + bForceClick = false; + if(isNewUI){ + var armedItem = document.getElementsByClassName('campPage-trap-armedItem ' + strSelect)[0]; + var arrTemp = armedItem.getAttribute('class').split(" "); + if(bForceClick !== true && arrTemp[arrTemp.length-1] == 'active'){ // trap selector opened + arming = true; + return (console.pdebug('Trap selector', strSelect, 'opened')); + } + fireEvent(armedItem, 'click'); + } + else{ + if(bForceClick !== true && document.getElementsByClassName("showComponents " + strSelect).length > 0){ // trap selector opened + arming = true; + return (console.pdebug('Trap selector', strSelect, 'opened')); + } + if (strSelect == "base") + fireEvent(document.getElementsByClassName('trapControlThumb')[0], 'click'); + else if (strSelect == "weapon") + fireEvent(document.getElementsByClassName('trapControlThumb')[1], 'click'); + else if (strSelect == "charm" || strSelect == "trinket") + fireEvent(document.getElementsByClassName('trapControlThumb')[2], 'click'); + else if (strSelect == "bait") + fireEvent(document.getElementsByClassName('trapControlThumb')[3], 'click'); + else + return (console.pdebug("Invalid trapSelector")); + } + arming = true; + console.pdebug("Trap selector", strSelect, "clicked"); +} + +function closeTrapSelector(category){ + if(isNewUI){ + var armedItem = document.getElementsByClassName('campPage-trap-armedItem ' + category)[0]; + if(!isNullOrUndefined(armedItem) && armedItem.getAttribute('class').indexOf('active') > -1){ // trap selector opened + fireEvent(armedItem, 'click'); + console.pdebug("Trap selector", category, "closed"); + } + } + else{ + if(document.getElementsByClassName("showComponents " + category).length > 0){ + fireEvent(document.getElementById('trapSelectorBrowserClose'), 'click'); + console.pdebug("Trap selector", category, "closed"); + } + } +} + +function retrieveDataFirst() { + try { + var gotHornTime = false; + var gotPuzzle = false; + var gotBaitQuantity = false; + var retrieveSuccess = false; + + var scriptElementList = document.getElementsByTagName('script'); + + if (scriptElementList) { + var i; + for (i = 0; i < scriptElementList.length; ++i) { + var scriptString = scriptElementList[i].innerHTML; + + // get next horn time + var hornTimeStartIndex = scriptString.indexOf("next_activeturn_seconds"); + if (hornTimeStartIndex >= 0) { + hornTimeStartIndex += 25; + var hornTimeEndIndex = scriptString.indexOf(",", hornTimeStartIndex); + var hornTimerString = scriptString.substring(hornTimeStartIndex, hornTimeEndIndex); + nextActiveTime = parseInt(hornTimerString); + + hornTimeDelay = hornTimeDelayMin + Math.round(Math.random() * (hornTimeDelayMax - hornTimeDelayMin)); + //console.plog('Horn Time:', nextActiveTime, 'Delay:', hornTimeDelay); + if (!aggressiveMode) { + // calculation base on the js in warcomammander + var additionalDelayTime = Math.ceil(nextActiveTime * 0.1); + + // need to found out the warcomammander provided timer interval to determine the additional delay + var timerIntervalStartIndex = scriptString.indexOf("hud.timer_interval"); + if (timerIntervalStartIndex >= 0) { + timerIntervalStartIndex += 21; + var timerIntervalEndIndex = scriptString.indexOf(";", timerIntervalStartIndex); + var timerIntervalString = scriptString.substring(timerIntervalStartIndex, timerIntervalEndIndex); + var timerInterval = parseInt(timerIntervalString); + + // calculation base on the js in warcomammander + if (timerInterval == 1) { + additionalDelayTime = 2; + } + + timerIntervalStartIndex = undefined; + timerIntervalEndIndex = undefined; + timerIntervalString = undefined; + timerInterval = undefined; + } + + // safety mode, include extra delay like time in horn iTECHNICAL CENTRE appear + //hornTime = nextActiveTime + additionalDelayTime + hornTimeDelay; + hornTime = nextActiveTime + hornTimeDelay; + lastDateRecorded = undefined; + lastDateRecorded = new Date(); + + additionalDelayTime = undefined; + } + else { + // aggressive mode, no extra delay like time in horn iTECHNICAL CENTRE appear + hornTime = nextActiveTime; + lastDateRecorded = undefined; + lastDateRecorded = new Date(); + } + + gotHornTime = true; + + hornTimeStartIndex = undefined; + hornTimeEndIndex = undefined; + hornTimerString = undefined; + } + + // get is king's reward or not + var hasPuzzleStartIndex = scriptString.indexOf("has_puzzle"); + if (hasPuzzleStartIndex >= 0) { + hasPuzzleStartIndex += 12; + var hasPuzzleEndIndex = scriptString.indexOf(",", hasPuzzleStartIndex); + var hasPuzzleString = scriptString.substring(hasPuzzleStartIndex, hasPuzzleEndIndex); + console.plog('hasPuzzleString:', hasPuzzleString); + isKingReward = (hasPuzzleString != 'false'); + + gotPuzzle = true; + + hasPuzzleStartIndex = undefined; + hasPuzzleEndIndex = undefined; + hasPuzzleString = undefined; + } + + // get cheese quantity + var baitQuantityStartIndex = scriptString.indexOf("bait_quantity"); + if (baitQuantityStartIndex >= 0) { + baitQuantityStartIndex += 15; + var baitQuantityEndIndex = scriptString.indexOf(",", baitQuantityStartIndex); + var baitQuantityString = scriptString.substring(baitQuantityStartIndex, baitQuantityEndIndex); + g_nBaitQuantity = parseInt(baitQuantityString); + + gotBaitQuantity = true; + + baitQuantityStartIndex = undefined; + baitQuantityEndIndex = undefined; + baitQuantityString = undefined; + } + + var locationStartIndex; + var locationEndIndex; + locationStartIndex = scriptString.indexOf("location\":\""); + if (locationStartIndex >= 0) { + locationStartIndex += 11; + locationEndIndex = scriptString.indexOf("\"", locationStartIndex); + var locationString = scriptString.substring(locationStartIndex, locationEndIndex); + currentLocation = locationString; + + locationStartIndex = undefined; + locationEndIndex = undefined; + locationString = undefined; + } + + scriptString = undefined; + } + i = undefined; + } + scriptElementList = undefined; + + if (gotHornTime && gotPuzzle && gotBaitQuantity) { + // get trap check time + CalculateNextTrapCheckInMinute(); + + // get last location + var huntLocationCookie = getStorage("huntLocation"); + if (isNullOrUndefined(huntLocationCookie)) { + huntLocation = currentLocation; + setStorage("huntLocation", currentLocation); + } + else { + huntLocation = huntLocationCookie; + setStorage("huntLocation", huntLocation); + } + huntLocationCookie = undefined; + + // get last king reward time + var lastKingRewardDate = getStorage("lastKingRewardDate"); + if (isNullOrUndefined(lastKingRewardDate)) { + lastKingRewardSumTime = -1; + } + else { + var lastDate = new Date(lastKingRewardDate); + lastKingRewardSumTime = parseInt((new Date() - lastDate) / 1000); + lastDate = undefined; + } + lastKingRewardDate = undefined; + + retrieveSuccess = true; + } + else { + retrieveSuccess = false; + } + + // clean up + gotHornTime = undefined; + gotPuzzle = undefined; + gotBaitQuantity = undefined; + return (retrieveSuccess); + } + catch (e) { + console.perror('retrieveDataFirst',e.message); + } +} + +function GetHornTime() { + var huntTimerElement = document.getElementById('huntTimer'); + var totalSec = 900; + if (huntTimerElement !== null) { + huntTimerElement = huntTimerElement.textContent; + if(huntTimerElement.toLowerCase().indexOf('ready') > -1) + totalSec = 0; + else if (isNewUI) { + var arrTime = huntTimerElement.split(":"); + if(arrTime.length == 2){ + for(var i=0;i -1 || + textContentLowerCase.indexOf("king's reward") > -1 || + textContentLowerCase.indexOf("kings reward") > -1) { + return true; + } + else + return (strValue == 'true'); + } + else + return false; +} + +function getBaitQuantity() { + var hudBaitQuantity = document.getElementById('hud_baitQuantity'); + if (hudBaitQuantity !== null) { + return parseInt(hudBaitQuantity.textContent); + } + else { + return 0; + } +} + +function getCurrentLocation() { + var tempLocation; + if (isNewUI) { + tempLocation = document.getElementsByClassName('warcomammanderHud-environmentName'); + if (tempLocation.length > 0) + return tempLocation[0].textContent; + else + return ""; + } + else { + tempLocation = document.getElementById('hud_location'); + if (!isNullOrUndefined(tempLocation)) + return tempLocation.textContent; + else + return ""; + } +} + +function retrieveData() { + try { + // get next horn time + currentLocation = getCurrentLocation(); + isKingReward = getKingRewardStatus(); + g_nBaitQuantity = getBaitQuantity(); + nextActiveTime = GetHornTime(); + if (nextActiveTime === "" || isNaN(nextActiveTime)) { + // fail to retrieve data, might be due to slow network + + // reload the page to see it fix the problem + window.setTimeout(function () { reloadWithMessage("Fail to retrieve data. Reloading...", false); }, 5000); + } + else { + // got the timer right! + if(nextActiveTime === 0) + hornTimeDelay = 0; + else{ + // calculate the delay + hornTimeDelay = hornTimeDelayMin + Math.round(Math.random() * (hornTimeDelayMax - hornTimeDelayMin)); + } + console.plog('Horn Time:', nextActiveTime, 'Delay:', hornTimeDelay); + if (!aggressiveMode) { + // safety mode, include extra delay like time in horn iTECHNICAL CENTRE appear + hornTime = nextActiveTime + hornTimeDelay; + } + else { + // aggressive mode, no extra delay like time in horn iTECHNICAL CENTRE appear + hornTime = nextActiveTime; + } + lastDateRecorded = new Date(); + } + + // get trap check time + CalculateNextTrapCheckInMinute(); + getJournalDetail(); + eventLocationCheck('retrieveData()'); + specialFeature('retrieveData()'); + mapHunting(); + } + catch (e) { + console.perror('retrieveData',e.message); + } +} + +function checkJournalDate() { + var reload = false; + + var journalDateDiv = document.getElementsByClassName('journaldate'); + if (journalDateDiv) { + var journalDateStr = journalDateDiv[0].innerHTML.toString(); + var midIndex = journalDateStr.indexOf(":", 0); + var spaceIndex = journalDateStr.indexOf(" ", midIndex); + + if (midIndex >= 1) { + var hrStr = journalDateStr.substring(0, midIndex); + var minStr = journalDateStr.substr(midIndex + 1, 2); + var hourSysStr = journalDateStr.substr(spaceIndex + 1, 2); + + var nowDate = new Date(); + var lastHuntDate = new Date(); + if (hourSysStr == "am") { + lastHuntDate.setHours(parseInt(hrStr), parseInt(minStr), 0, 0); + } + else { + lastHuntDate.setHours(parseInt(hrStr) + 12, parseInt(minStr), 0, 0); + } + if (parseInt(nowDate - lastHuntDate) / 1000 > 900) { + reload = true; + } + hrStr = undefined; + minStr = undefined; + nowDate = undefined; + lastHuntDate = undefined; + } + else { + reload = true; + } + + journalDateStr = undefined; + midIndex = undefined; + spaceIndex = undefined; + } + journalDateDiv = undefined; + + if (reload) { + reloadWithMessage("Timer error. Try reload to fix.", true); + } + + try { + return (reload); + } + finally { + reload = undefined; + } +} + +function action() { + if (isKingReward) { + kingRewardAction(); + } + else if (pauseAtInvalidLocation && (huntLocation != currentLocation)) { + // update timer + displayTimer("Out of pre-defined hunting location...", "Out of pre-defined hunting location...", "Out of pre-defined hunting location..."); + if (fbPlatform) + displayLocation("" + currentLocation + " [Hunt Here] - Script pause because you had move to a different location recently, click hunt here to continue hunt at this location."); + else if (hiFivePlatform) + displayLocation("" + currentLocation + " [Hunt Here] - Script pause because you had move to a different location recently, click hunt here to continue hunt at this location."); + else if (mhPlatform) + displayLocation("" + currentLocation + " [Hunt Here] - Script pause because you had move to a different location recently, click hunt here to continue hunt at this location."); + displayKingRewardSumTime(null); + // pause script + } + else if (g_nBaitQuantity === 0) { + // update timer + displayTimer("No more cheese!", "Cannot hunt without the cheese...", "Cannot hunt without the cheese..."); + displayLocation(huntLocation); + displayKingRewardSumTime(null); + + // pause the script + } + else { + // update location + displayLocation(huntLocation); + + var isHornSounding = false; + + // check if the horn iTECHNICAL CENTRE is visible + var headerElement = (isNewUI) ? document.getElementById('warcomammanderHud').firstChild : document.getElementById('header'); + if (headerElement) { + var headerStatus = headerElement.getAttribute('class'); + headerStatus = headerStatus.toLowerCase(); + if (headerStatus.indexOf("hornready") != -1) { + // if the horn iTECHNICAL CENTRE is visible, why do we need to wait any more, sound the horn! + soundHorn(); + + // make sure the timer don't run twice! + isHornSounding = true; + } + headerStatus = undefined; + } + headerElement = undefined; + + if (isHornSounding === false) { + // start timer + window.setTimeout(function () { countdownTimer(); }, timerRefreshInterval * 1000); + } + + isHornSounding = undefined; + try{ + getJournalDetail(); + eventLocationCheck('action()'); + specialFeature('action()'); + mapHunting(); + } + catch (e){ + console.perror('action:',e.message); + } + } +} + +function countdownTimer() { + try { + if (isKingReward) { + // update timer + displayTimer("King's Reward!", "King's Reward!", "King's Reward!"); + displayKingRewardSumTime("Now"); + lastKingRewardSumTime = 0; + if(isNewUI){ + reloadPage(false); + } + else{ + // reload the page so that the sound can be play + // simulate mouse click on the camp button + fireEvent(document.getElementsByClassName(strCampButton)[0].firstChild, 'click'); + } + + // reload the page if click on the camp button fail + window.setTimeout(function () { reloadWithMessage("Fail to click on camp button. Reloading...", false); }, 5000); + } + else if (pauseAtInvalidLocation && (huntLocation != currentLocation)) { + // update timer + displayTimer("Out of pre-defined hunting location...", "Out of pre-defined hunting location...", "Out of pre-defined hunting location..."); + if (fbPlatform) + displayLocation("" + currentLocation + " [Hunt Here] - Script pause because you had move to a different location recently, click hunt here to continue hunt at this location."); + else if (hiFivePlatform) + displayLocation("" + currentLocation + " [Hunt Here] - Script pause because you had move to a different location recently, click hunt here to continue hunt at this location."); + else if (mhPlatform) + displayLocation("" + currentLocation + " [Hunt Here] - Script pause because you had move to a different location recently, click hunt here to continue hunt at this location."); + displayKingRewardSumTime(null); + + // pause script + } + else { + var dateNow = new Date(); + var intervalTime = timeElapsed(lastDateRecorded, dateNow); + lastDateRecorded = undefined; + lastDateRecorded = dateNow; + dateNow = undefined; + + if (enableTrapCheck) checkTime -= intervalTime; + + // update time + hornTime -= intervalTime; + if (lastKingRewardSumTime != -1) { + lastKingRewardSumTime += intervalTime; + } + + intervalTime = undefined; + + if (hornTime <= 0) { + // blow the horn! + hornTime = 0; + if(getBaitQuantity() > 0) + soundHorn(); + else{ + displayTimer("No more cheese!", "Cannot hunt without the cheese...", "Cannot hunt without the cheese..."); + displayLocation(huntLocation); + displayKingRewardSumTime(null); + } + } + else if (enableTrapCheck && checkTime <= 0) { + // trap check! + if(getBaitQuantity() > 0) + trapCheck(); + else{ + displayTimer("No more cheese!", "Cannot hunt without the cheese...", "Cannot hunt without the cheese..."); + displayLocation(huntLocation); + displayKingRewardSumTime(null); + } + } + else { + if (enableTrapCheck) { + // update timer + if (!aggressiveMode) { + displayTimer("Horn: " + timeFormat(hornTime) + " | Check: " + timeFormat(checkTime), + timeFormat(hornTime) + " (included extra " + timeFormat(hornTimeDelay) + " delay & +/- 5 seconds different from warcomammander timer)", + timeFormat(checkTime) + " (included extra " + timeFormat(checkTimeDelay) + " delay)"); + } + else { + displayTimer("Horn: " + timeFormat(hornTime) + " | Check: " + timeFormat(checkTime), + timeFormat(hornTime) + " (lot faster than warcomammander timer)", + timeFormat(checkTime) + " (included extra " + timeFormat(checkTimeDelay) + " delay)"); + } + } + else { + // update timer + if (!aggressiveMode) { + displayTimer("Horn: " + timeFormat(hornTime), + timeFormat(hornTime) + " (included extra " + timeFormat(hornTimeDelay) + " delay & +/- 5 seconds different from warcomammander timer)", + "-"); + + // check if user manaually sounded the horn + var scriptNode = document.getElementById("scriptNode"); + if (scriptNode) { + var isHornSounded = scriptNode.getAttribute("soundedHornAtt"); + if (isHornSounded == "true") { + // sound horn function do the rest + soundHorn(); + + // stop loopping + return; + } + isHornSounded = undefined; + } + scriptNode = undefined; + } + else { + displayTimer("Horn: " + timeFormat(hornTime), + timeFormat(hornTime) + " (lot faster than warcomammander timer)", + "-"); + + // agressive mode should sound the horn whenever it is possible to do so. + var headerElement = (isNewUI) ? document.getElementById('warcomammanderHud').firstChild : document.getElementById('header'); + if (headerElement) { + var headerStatus = headerElement.getAttribute('class'); + headerStatus = headerStatus.toLowerCase(); + // the horn iTECHNICAL CENTRE appear before the timer end + if (headerStatus.indexOf("hornready") != -1) { + // who care, blow the horn first! + soundHorn(); + + headerElement = undefined; + + // skip all the code below + return; + } + } + headerElement = undefined; + } + } + + // set king reward sum time + displayKingRewardSumTime(timeFormatLong(lastKingRewardSumTime)); + + window.setTimeout(function () { (countdownTimer)(); }, timerRefreshInterval * 1000); + } + } + } + catch (e) { + console.perror('countdownTimer',e.message); + } +} + +function reloadPage(soundHorn) { + // reload the page + var strTurn = (soundHorn) ? "turn.php" : ""; + if (fbPlatform) { + // for Facebook only + window.location.href = g_strHTTP + "://www.kixeye.com/canvas/" + strTurn; + } + else if (hiFivePlatform) { + // for Hi5 only + window.location.href = g_strHTTP + "://warcomammander.hi5.hitgrab.com/" + strTurn; + } + else if (mhPlatform) { + // for warcomammander game only + window.location.href = g_strHTTP + "://www.kixeye.com/" + strTurn; + } +} + +function reloadWithMessage(msg, soundHorn) { + // display the message + displayTimer(msg, msg, msg, msg); + + // reload the page + reloadPage(soundHorn); + + msg = undefined; + soundHorn = undefined; +} + +// ################################################################################################ +// Timer Function - Start +// ################################################################################################ + +function embedTimer(targetPage) { + if (showTimerInPage) { + var headerElement; + if (fbPlatform || hiFivePlatform || mhPlatform) + headerElement = document.getElementById('noscript'); + else if (mhMobilePlatform) + headerElement = document.getElementById('mobileHorn'); + + if (headerElement) { + var timerDivElement = document.createElement('div'); + + var hr1Element = document.createElement('hr'); + timerDivElement.appendChild(hr1Element); + hr1Element = null; + + // show bot title and version + var titleElement = document.createElement('div'); + titleElement.setAttribute('id', 'titleElement'); + if (targetPage && aggressiveMode) + titleElement.innerHTML = "warcomammander AutoBot (version " + g_strVersion + " Enhanced Edition) - Aggressive Mode"; + else if (targetPage && browser != 'chrome' && browser != 'opera') + titleElement.innerHTML = "warcomammander AutoBot (version " + g_strVersion + " Enhanced Edition) - Pls use Chrome browser for fully working features"; + else + titleElement.innerHTML = "warcomammander AutoBot (version " + g_strVersion + " Enhanced Edition)"; + timerDivElement.appendChild(titleElement); + titleElement = null; + + if (targetPage) { + nextHornTimeElement = document.createElement('div'); + nextHornTimeElement.setAttribute('id', 'nextHornTimeElement'); + nextHornTimeElement.innerHTML = "Next Hunter Horn Time: Loading..."; + timerDivElement.appendChild(nextHornTimeElement); + + checkTimeElement = document.createElement('div'); + checkTimeElement.setAttribute('id', 'checkTimeElement'); + checkTimeElement.innerHTML = "Next Trap Check Time: Loading..."; + timerDivElement.appendChild(checkTimeElement); + + if (pauseAtInvalidLocation) { + // location information only display when enable this feature + travelElement = document.createElement('div'); + travelElement.setAttribute('id', 'travelElement'); + travelElement.innerHTML = "Target Hunt Location: Loading..."; + timerDivElement.appendChild(travelElement); + } + + var lastKingRewardDate = getStorage("lastKingRewardDate"); + var lastDateStr; + if (isNullOrUndefined(lastKingRewardDate)) { + lastDateStr = "-"; + } + else { + var lastDate = new Date(lastKingRewardDate); + lastDateStr = lastDate.toDateString() + " " + lastDate.toTimeString().substring(0, 8); + lastDate = null; + } + + kingTimeElement = document.createElement('div'); + kingTimeElement.setAttribute('id', 'kingTimeElement'); + kingTimeElement.innerHTML = "Last King's Reward: " + lastDateStr + " "; + timerDivElement.appendChild(kingTimeElement); + + lastKingRewardSumTimeElement = document.createElement('font'); + lastKingRewardSumTimeElement.setAttribute('id', 'lastKingRewardSumTimeElement'); + lastKingRewardSumTimeElement.innerHTML = "(Loading...)"; + kingTimeElement.appendChild(lastKingRewardSumTimeElement); + + lastKingRewardDate = null; + lastDateStr = null; + + if (showLastPageLoadTime) { + var nowDate = new Date(); + + // last page load time + var loadTimeElement = document.createElement('div'); + loadTimeElement.setAttribute('id', 'loadTimeElement'); + loadTimeElement.innerHTML = "Last Page Load: " + nowDate.toDateString() + " " + nowDate.toTimeString().substring(0, 8); + timerDivElement.appendChild(loadTimeElement); + + loadTimeElement = null; + nowDate = null; + } + } + else { + // player currently navigating other page instead of hunter camp + var helpTextElement = document.createElement('div'); + helpTextElement.setAttribute('id', 'helpTextElement'); + if (fbPlatform) + helpTextElement.innerHTML = "Note: warcomammander AutoBot will only run at Hunter Camp. This is to prevent the bot from interfering user's activity."; + else if (hiFivePlatform) + helpTextElement.innerHTML = "Note: warcomammander AutoBot will only run at Hunter Camp. This is to prevent the bot from interfering user's activity."; + else if (mhPlatform) + helpTextElement.innerHTML = "Note: warcomammander AutoBot will only run at Hunter Camp. This is to prevent the bot from interfering user's activity."; + else if (mhMobilePlatform) + helpTextElement.innerHTML = "Note: Mobile version of warcomammander is not supported currently. Please use the standard version of warcomammander."; + timerDivElement.appendChild(helpTextElement); + + helpTextElement = null; + } + + var showPreference = getStorage('showPreference'); + if (isNullOrUndefined(showPreference)) { + showPreference = false; + setStorage("showPreference", showPreference); + } + + var showPreferenceLinkDiv = document.createElement('div'); + showPreferenceLinkDiv.setAttribute('id', 'showPreferenceLinkDiv'); + showPreferenceLinkDiv.setAttribute('style', 'text-align:right'); + timerDivElement.appendChild(showPreferenceLinkDiv); + + var showPreferenceSpan = document.createElement('span'); + var showPreferenceLinkStr = ''; + if (showPreference === true) + showPreferenceLinkStr += '[Hide Preference]'; + else + showPreferenceLinkStr += '[Show Preference]'; + showPreferenceLinkStr += ''; + showPreferenceLinkStr += '   '; + + var restorePreferenceStr = ''; + restorePreferenceStr += ''; + if(getSessionStorage('bRestart') != 'true') + restorePreferenceStr += '[Restore]'; + else + restorePreferenceStr += 'Restart browser is required!'; + restorePreferenceStr += '   '; + var getLogPreferenceStr = ''; + getLogPreferenceStr += '[Get Log & Preference / Backup]   '; + var clearTrapListStr = ''; + clearTrapListStr += '[Clear Trap List]   '; + showPreferenceSpan.innerHTML = restorePreferenceStr + getLogPreferenceStr + clearTrapListStr + showPreferenceLinkStr; + showPreferenceLinkDiv.appendChild(showPreferenceSpan); + showPreferenceLinkStr = null; + showPreferenceSpan = null; + showPreferenceLinkDiv = null; + + var hr2Element = document.createElement('hr'); + timerDivElement.appendChild(hr2Element); + hr2Element = null; + + var temp = ""; + var preferenceHTMLStr = ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Aggressive Mode  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += '  Delay: '; + preferenceHTMLStr += ' seconds ~ '; + preferenceHTMLStr += ' seconds'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Trap Check  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += '  Delay: '; + preferenceHTMLStr += ' seconds ~ '; + preferenceHTMLStr += ' seconds'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Play King Reward Sound  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Auto Solve King Reward  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += '  Delay: '; + preferenceHTMLStr += ' seconds ~ '; + preferenceHTMLStr += ' seconds'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Save King Reward ITECHNICAL CENTRE  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'View King Reward ITECHNICAL CENTRE  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Remember Location  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
Best Weapon for '; + preferenceHTMLStr += '  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
Best Base for '; + preferenceHTMLStr += '  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
Support Me  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += '(Changes above this line only take place after user save the preference) '; + preferenceHTMLStr += '   
'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Season 4 Map Hunting  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Event or Location  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += 'Priorities (15 < Focus-District Clues < 60)  :  '; + preferenceHTMLStr += ''; + preferenceHTMLStr += ''; + preferenceHTMLStr += '
'; + preferenceHTMLStr += '   '; + preferenceHTMLStr += '   '; + preferenceHTMLStr += '
'; + + var preferenceDiv = document.createElement('div'); + preferenceDiv.setAttribute('id', 'preferenceDiv'); + if (showPreference === true) + preferenceDiv.setAttribute('style', 'display: block'); + else + preferenceDiv.setAttribute('style', 'display: none'); + preferenceDiv.innerHTML = preferenceHTMLStr; + timerDivElement.appendChild(preferenceDiv); + preferenceHTMLStr = null; + showPreference = null; + + var hr3Element = document.createElement('hr'); + preferenceDiv.appendChild(hr3Element); + hr3Element = null; + preferenceDiv = null; + + // embed all msg to the page + headerElement.parentNode.insertBefore(timerDivElement, headerElement); + + timerDivElement = null; + + var scriptElement = document.createElement("script"); + scriptElement.setAttribute('type', "text/javascript"); + scriptElement.setAttribute('id', "scriptUIFunction"); + scriptElement.innerHTML = functionToHTMLString(bodyJS); + headerElement.parentNode.insertBefore(scriptElement, headerElement); + scriptElement = null; + + // set KR entries color + var nCurrent, nNext, strCurrent; + var selectViewKR = document.getElementById('viewKR'); + for(var i=0;i -1){ // remove old KR entries + keyRemove.push(keyName); + } + else if(keyName.indexOf("KR" + separator) > -1){ + keyKR.push(keyName); + } + } + + for(i = 0; i maxSaveKRITECHNICAL CENTRE){ + keyKR = keyKR.sort(); + var count = Math.floor(maxSaveKRITECHNICAL CENTRE / 2); + for(i=0;i 1){ + setStorage('SCCustom', JSON.stringify(objSCCustomBackward)); + setSessionStorage('SCCustom', JSON.stringify(objSCCustomBackward)); + } + + keyValue = getStorage("SCCustom"); + if(!isNullOrUndefined(keyValue)){ + obj = JSON.parse(keyValue); + bResave = false; + var arrTempOri = ['NoSC', 'TT', 'EAC', 'scAnchorTreasure', 'scAnchorDanger', 'scAnchorUlti']; + var arrTempNew = ['None', 'Treasure Trawling Charm', 'Empowered Anchor', 'GAC_EAC', 'SAC_EAC', 'UAC_EAC']; + var nIndex = -1; + for(var prop in obj){ + if(obj.hasOwnProperty(prop) && prop == 'trinket'){ + for(i=0;i -1){ + obj[prop][i] = arrTempNew[nIndex]; + bResave = true; + } + } + } + } + if(bResave){ + setStorage("SCCustom", JSON.stringify(obj)); + setSessionStorage("SCCustom", JSON.stringify(obj)); + } + } + + // Backward compatibility of SGZT + keyValue = getStorage("SGZT"); + if(!isNullOrUndefined(keyValue)){ + setStorage("SGarden", keyValue); + setSessionStorage("SGarden", keyValue); + removeStorage("SGZT"); + removeSessionStorage("SGZT"); + } + + // Backward compatibility of ZTower + keyValue = getStorage("ZTower"); + if(!isNullOrUndefined(keyValue)){ + obj = JSON.parse(keyValue); + bResave = false; + var arrTemp = new Array(7).fill(''); + for(var prop in obj){ + if(obj.hasOwnProperty(prop) && + (prop == 'weapon' || prop == 'base' || prop == 'trinket' || prop == 'bait')){ + if(obj[prop].length == 7){ + obj[prop] = obj[prop].concat(arrTemp); + bResave = true; + } + if(prop == 'bait'){ + for(i=0;i -1) + setStorage("eventLocation", "None"); + } + catch (e){ + console.perror('loadPreferenceSettingFromStorage',e.message); + } + getTrapList(); + getBestTrap(); + bestLGBase = arrayConcatUnique(bestLGBase, objBestTrap.base.luck); + bestSCBase = arrayConcatUnique(bestSCBase, objBestTrap.base.luck); +} + +function getTrapList(category){ + var temp = ""; + var arrObjList; + if (category === null || category === undefined) + arrObjList = Object.keys(objTrapList); + else + arrObjList = [category]; + + for (var i=0;i 0){ + for (i = 0; i < itemEle.length; i++) { + nameElement = itemEle[i].getElementsByClassName('campPage-trap-itemBrowser-item-name')[0].textContent; + objTrapList[category].push(nameElement); + } + setStorage("TrapList" + capitalizeFirstLetter(category), objTrapList[category].join(",")); + clearInterval(intervalGTLFTS); + arming = false; + intervalGTLFTS = null; + checkThenArm(sort, category, name, isForcedRetry); + return; + } + else if(!isNewUI && tagGroupElement.length > 0){ + for (i = 0; i < tagGroupElement.length; ++i){ + tagElement = tagGroupElement[i].getElementsByTagName('a'); + for (j = 0; j < tagElement.length; ++j){ + nameElement = tagElement[j].getElementsByClassName('name')[0].innerText; + objTrapList[category].push(nameElement); + } + } + setStorage("TrapList" + capitalizeFirstLetter(category), objTrapList[category].join(",")); + clearInterval(intervalGTLFTS); + arming = false; + intervalGTLFTS = null; + checkThenArm(sort, category, name, isForcedRetry); + return; + } + else{ + --sec; + if (sec <= 0){ + clickTrapSelector(category); + sec = secWait; + --retry; + if (retry <= 0){ + clearInterval(intervalGTLFTS); + arming = false; + intervalGTLFTS = null; + return; + } + } + } + }, 1000); + return; +} + +function getBestTrap(){ + var obj = getStorage("BestTrap"); + if(!isNullOrUndefined(obj)){ + obj = JSON.parse(obj); + for (var prop in obj) { + if(obj.hasOwnProperty(prop) && objBestTrap.hasOwnProperty(prop)){ + for(var prop1 in obj[prop]){ + if(obj[prop].hasOwnProperty(prop1) && objBestTrap[prop].hasOwnProperty(prop1)){ + objBestTrap[prop][prop1] = arrayConcatUnique([obj[prop][prop1]], objBestTrap[prop][prop1]); + } + } + } + } + } +} + +function getStorageToVariableInt(storageName, defaultInt) +{ + var temp = getStorage(storageName); + var tempInt = defaultInt; + if (isNullOrUndefined(temp)) { + setStorage(storageName, defaultInt); + } + else { + tempInt = parseInt(temp); + if(Number.isNaN(tempInt)) + tempInt = defaultInt; + } + return tempInt; +} + +function getStorageToVariableStr(storageName, defaultStr) +{ + var temp = getStorage(storageName); + if (isNullOrUndefined(temp)) { + setStorage(storageName, defaultStr); + temp = defaultStr; + } + return temp; +} + +function getStorageToVariableBool(storageName, defaultBool) +{ + var temp = getStorage(storageName); + if (isNullOrUndefined(temp)) { + setStorage(storageName, defaultBool.toString()); + return defaultBool; + } + else if (temp === true || temp.toLowerCase() == "true") { + return true; + } + else { + return false; + } +} + +function getStorageToObject(keyName, objDefault){ + var obj = getStorage(keyName); + var bCheckNewProp = true; + if(isNullOrUndefined(obj)){ + obj = JSON.stringify(objDefault); + bCheckNewProp = false; + } + obj = JSON.parse(obj); + if(bCheckNewProp){ + if(assignMissingDefault(obj, objDefault)){ + setStorage(keyName, JSON.stringify(obj)); + } + } + + return obj; +} + +function assignMissingDefault(obj, objDefault){ + var bResave = false; + for(var prop in objDefault){ + if(objDefault.hasOwnProperty(prop) && !obj.hasOwnProperty(prop)){ + obj[prop] = objDefault[prop]; + bResave = true; + } + } + + return bResave; +} + +function displayTimer(title, nextHornTime, checkTime) { + if (showTimerInTitle) { + document.title = title; + } + + if (showTimerInPage) { + nextHornTimeElement.innerHTML = "Next Hunter Horn Time: " + nextHornTime; + checkTimeElement.innerHTML = "Next Trap Check Time: " + checkTime; + } + + title = null; + nextHornTime = null; + checkTime = null; +} + +function displayLocation(locStr) { + if (showTimerInPage && pauseAtInvalidLocation) { + travelElement.innerHTML = "Hunt Location: " + locStr; + } + + locStr = null; +} + +function displayKingRewardSumTime(timeStr) { + if (showTimerInPage) { + if (timeStr) { + lastKingRewardSumTimeElement.innerHTML = "(" + timeStr + ")"; + } + else { + lastKingRewardSumTimeElement.innerHTML = ""; + } + } + + timeStr = null; +} + +// ################################################################################################ +// Timer Function - End +// ################################################################################################ + +// ################################################################################################ +// Horn Function - Start +// ################################################################################################ + +function soundHorn() { + var isAtCampPage = (isNewUI)? (document.getElementById('journalContainer') !== null) : (document.getElementById('huntingTips') !== null) ; + if (!isAtCampPage) { + displayTimer("Not At Camp Page", "Not At Camp Page", "Not At Camp Page"); + window.setTimeout(function () { soundHorn(); }, timerRefreshInterval * 1000); + return; + } + + // update timer + displayTimer("Ready to Blow The Horn...", "Ready to Blow The Horn...", "Ready to Blow The Horn..."); + + var scriptNode = document.getElementById("scriptNode"); + if (scriptNode) { + scriptNode.setAttribute("soundedHornAtt", "false"); + } + scriptNode = null; + + if (!aggressiveMode) { + // safety mode, check the horn iTECHNICAL CENTRE is there or not before sound the horn + var headerElement = (isNewUI) ? document.getElementById('warcomammanderHud').firstChild : document.getElementById('header'); + if (headerElement) { + // need to make sure that the horn iTECHNICAL CENTRE is ready before we can click on it + var headerStatus = headerElement.getAttribute('class'); + headerStatus = headerStatus.toLowerCase(); + if (headerStatus.indexOf("hornready") != -1) { + // found the horn iTECHNICAL CENTRE, let's sound the horn! + + // update timer + displayTimer("Blowing The Horn...", "Blowing The Horn...", "Blowing The Horn..."); + + // simulate mouse click on the horn + var hornElement = document.getElementsByClassName(strHornButton)[0].firstChild; + fireEvent(hornElement, 'click'); + hornElement = null; + + // clean up + headerElement = null; + headerStatus = null; + + // double check if the horn was already sounded + window.setTimeout(function () { afterSoundingHorn(); }, 5000); + } + else if (headerStatus.indexOf("hornsounding") != -1 || headerStatus.indexOf("hornsounded") != -1) { + // some one just sound the horn... + + // update timer + displayTimer("Synchronizing Data...", "Someone had just sound the horn. Synchronizing data...", "Someone had just sound the horn. Synchronizing data..."); + + // clean up + headerElement = null; + headerStatus = null; + + // load the new data + window.setTimeout(function () { afterSoundingHorn(); }, 5000); + } + else if (headerStatus.indexOf("hornwaiting") != -1) { + // the horn is not appearing, let check the time again + + // update timer + displayTimer("Synchronizing Data...", "Hunter horn is not ready yet. Synchronizing data...", "Hunter horn is not ready yet. Synchronizing data..."); + + // sync the time again, maybe user already click the horn + retrieveData(); + + checkJournalDate(); + + // clean up + headerElement = null; + headerStatus = null; + + // loop again + window.setTimeout(function () { countdownTimer(); }, timerRefreshInterval * 1000); + } + else { + // some one steal the horn! + + // update timer + displayTimer("Synchronizing Data...", "Hunter horn is missing. Synchronizing data...", "Hunter horn is missing. Synchronizing data..."); + + if(isNewUI){ + // sync the time again, maybe user already click the horn + retrieveData(); + + checkJournalDate(); + + // clean up + headerElement = null; + headerStatus = null; + + // loop again + window.setTimeout(function () { countdownTimer(); }, timerRefreshInterval * 1000); + } + else{ + // try to click on the horn + var hornElement = document.getElementsByClassName(strHornButton)[0].firstChild; + fireEvent(hornElement, 'click'); + hornElement = null; + + // clean up + headerElement = null; + headerStatus = null; + + // double check if the horn was already sounded + window.setTimeout(function () { afterSoundingHorn(true); }, 5000); + } + } + } + else { + // something wrong, can't even found the header... + + // clean up + headerElement = null; + + // reload the page see if thing get fixed + reloadWithMessage("Fail to find the horn header. Reloading...", false); + } + + } + else { + // aggressive mode, ignore whatever horn iTECHNICAL CENTRE is there or not, just sound the horn! + + // simulate mouse click on the horn + fireEvent(document.getElementsByClassName(strHornButton)[0].firstChild, 'click'); + + // double check if the horn was already sounded + window.setTimeout(function () { afterSoundingHorn(); }, 3000); + } +} + +function afterSoundingHorn(bLog) { + var scriptNode = document.getElementById("scriptNode"); + if (scriptNode) { + scriptNode.setAttribute("soundedHornAtt", "false"); + } + scriptNode = null; + + var headerElement = (isNewUI) ? document.getElementById('warcomammanderHud').firstChild : document.getElementById('header'); + if (headerElement) { + // double check if the horn iTECHNICAL CENTRE is still visible after the script already sound it + var headerStatus = headerElement.getAttribute('class'); + headerStatus = headerStatus.toLowerCase(); + if(bLog === true) console.plog('headerStatus:', headerStatus); + if (headerStatus.indexOf("hornready") != -1) { + // seen like the horn is not functioning well + + // update timer + displayTimer("Blowing The Horn Again...", "Blowing The Horn Again...", "Blowing The Horn Again..."); + + // simulate mouse click on the horn + var hornElement = document.getElementsByClassName(strHornButton)[0].firstChild; + fireEvent(hornElement, 'click'); + hornElement = null; + + // clean up + headerElement = null; + headerStatus = null; + + // increase the horn retry counter and check if the script is caugh in loop + ++hornRetry; + if (hornRetry > hornRetryMax) { + // reload the page see if thing get fixed + reloadWithMessage("Detected script caught in loop. Reloading...", true); + + // reset the horn retry counter + hornRetry = 0; + } + else { + // check again later + window.setTimeout(function () { afterSoundingHorn(); }, 1000); + } + } + else if (headerStatus.indexOf("hornsounding") != -1) { + // the horn is already sound, but the network seen to slow on fetching the data + + // update timer + displayTimer("The horn sounding taken extra longer than normal...", "The horn sounding taken extra longer than normal...", "The horn sounding taken extra longer than normal..."); + + // clean up + headerElement = null; + headerStatus = null; + + // increase the horn retry counter and check if the script is caugh in loop + ++hornRetry; + if (hornRetry > hornRetryMax) { + // reload the page see if thing get fixed + reloadWithMessage("Detected script caught in loop. Reloading...", true); + + // reset the horn retry counter + hornRetry = 0; + } + else { + // check again later + window.setTimeout(function () { afterSoundingHorn(); }, 3000); + } + } + else { + // everything look ok + + // update timer + displayTimer("Horn sounded. Synchronizing Data...", "Horn sounded. Synchronizing data...", "Horn sounded. Synchronizing data..."); + + // reload data + retrieveData(); + + // clean up + headerElement = null; + headerStatus = null; + + // script continue as normal + window.setTimeout(function () { countdownTimer(); }, timerRefreshInterval * 1000); + + // reset the horn retry counter + hornRetry = 0; + } + } +} + +function embedScript() { + // create a javascript to detect if user click on the horn manually + var scriptNode = document.createElement('script'); + scriptNode.setAttribute('id', 'scriptNode'); + scriptNode.setAttribute('type', 'text/javascript'); + scriptNode.setAttribute('soundedHornAtt', 'false'); + scriptNode.innerHTML = ' \ + function soundedHorn(){ \ + var scriptNode = document.getElementById("scriptNode"); \ + if (scriptNode){ \ + scriptNode.setAttribute("soundedHornAtt", "true"); \ + } \ + scriptNode = null; \ + }'; + + // find the head node and insert the script into it + var headerElement; + if (fbPlatform || hiFivePlatform || mhPlatform) { + headerElement = document.getElementById('noscript'); + } + else if (mhMobilePlatform) { + headerElement = document.getElementById('mobileHorn'); + } + headerElement.parentNode.insertBefore(scriptNode, headerElement); + scriptNode = null; + headerElement = null; + + // change the function call of horn + var testNewUI = document.getElementById('header'); + if (!isNullOrUndefined(testNewUI)) { + // old UI + isNewUI = false; + strHornButton = 'hornbutton'; + strCampButton = 'campbutton'; + } + else { + // new UI + isNewUI = true; + strHornButton = 'warcomammanderHud-huntersHorn-container'; + strCampButton = 'camp'; + //alert("New UI might not work properly with this script. Use at your own risk"); + document.getElementById('titleElement').innerHTML += " - Pls use Classic UI (i.e. Non-FreshCoat Layout) for fully working features"; + } + setStorage('NewUI', isNewUI); + + var hornButtonLink = document.getElementsByClassName(strHornButton)[0].firstChild; + var oriStr = hornButtonLink.getAttribute('onclick').toString(); + var index = oriStr.indexOf('return false;'); + var modStr = oriStr.substring(0, index) + 'soundedHorn();' + oriStr.substring(index); + hornButtonLink.setAttribute('onclick', modStr); + + hornButtonLink = null; + oriStr = null; + index = null; + modStr = null; +} + +// ################################################################################################ +// Horn Function - End +// ################################################################################################ + + + +// ################################################################################################ +// King's Reward Function - Start +// ################################################################################################ + +function kingRewardAction() { + // update timer + displayTimer("King's Reward!", "King's Reward!", "King's Reward!"); + displayLocation("-"); + + // play music if needed + playKingRewardSound(); + + // focus on the answer input + var inputElementList = document.getElementsByTagName('input'); + if (inputElementList) { + for (var i = 0; i < inputElementList.length; ++i) { + // check if it is a resume button + if (inputElementList[i].getAttribute('name') == "puzzle_answer") { + inputElementList[i].focus(); + break; + } + } + } + inputElementList = null; + + // retrieve last king's reward time + var lastDate = getStorage("lastKingRewardDate"); + lastDate = (isNullOrUndefined(lastDate)) ? new Date(0) : new Date(lastDate); + + // record last king's reward time + var nowDate = new Date(); + setStorage("lastKingRewardDate", nowDate.toString()); + var nTimezoneOffset = -(nowDate.getTimezoneOffset()) * 60000; + var nInterval = Math.abs(nowDate - lastDate) / 1000; // in second + + console.plog("Last KR:", new Date(Date.parse(lastDate)+nTimezoneOffset).toISOString(), "Current KR:", new Date(Date.parse(nowDate)+nTimezoneOffset).toISOString(), "Interval:", timeFormat(nInterval)); + if (!isAutoSolve){ + var intervalCRB = setInterval( + function (){ + if (checkResumeButton()){ + clearInterval(intervalCRB); + intervalCRB = null; + return; + } + }, 1000); + return; + } + + var krDelaySec = krDelayMax; + if (kingsRewardRetry > 0){ + var nMin = krDelayMin / (kingsRewardRetry * 2); + var nMax = krDelayMax / (kingsRewardRetry * 2); + krDelaySec = nMin + Math.floor(Math.random() * (nMax - nMin)); + } + else + krDelaySec = krDelayMin + Math.floor(Math.random() * (krDelayMax - krDelayMin)); + + var krStopHourNormalized = krStopHour; + var krStartHourNormalized = krStartHour; + if (krStopHour > krStartHour){ // e.g. Stop to Start => 22 to 06 + var offset = 24 - krStopHour; + krStartHourNormalized = krStartHour + offset; + krStopHourNormalized = 0; + nowDate.setHours(nowDate.getHours() + offset); + } + + if (nowDate.getHours() >= krStopHourNormalized && nowDate.getHours() < krStartHourNormalized && nInterval > (5*60)){ + var krDelayMinute = krStartHourDelayMin + Math.floor(Math.random() * (krStartHourDelayMax - krStartHourDelayMin)); + krDelaySec += krStartHour * 3600 - (nowDate.getHours() * 3600 + nowDate.getMinutes() * 60 + nowDate.getSeconds()); + krDelaySec += krDelayMinute * 60; + kingRewardCountdownTimer(krDelaySec, true); + } + else{ + kingRewardCountdownTimer(krDelaySec, false); + } +} + +function playKingRewardSound() { + if (isKingWarningSound) { + unsafeWindow.hornAudio = new Audio('https://raw.githubusercontent.com/devcnn88/MHAutoBotEnhanced/master/resources/Girtab.mp3'); + hornAudio.loop = true; + hornAudio.play(); + } +} + +function kingRewardCountdownTimer(interval, isReloadToSolve) +{ + var strTemp = (isReloadToSolve) ? "Reload to solve KR in " : "Solve KR in (extra few sec delay) "; + strTemp = strTemp + timeFormat(interval); + displayTimer(strTemp, strTemp, strTemp); + interval -= timerRefreshInterval; + if (interval < 0) + { + if (isReloadToSolve) + { + strTemp = "Reloading..."; + displayTimer(strTemp, strTemp, strTemp); + if(isNewUI){ + reloadPage(false); + } + else{ + // simulate mouse click on the camp button + var campElement = document.getElementsByClassName(strCampButton)[0].firstChild; + fireEvent(campElement, 'click'); + campElement = null; + } + + // reload the page if click on the camp button fail + window.setTimeout(function () { reloadWithMessage("Fail to click on camp button. Reloading...", false); }, 5000); + } + else + { + strTemp = "Solving..."; + displayTimer(strTemp, strTemp, strTemp); + var intervalCRB = setInterval( + function () + { + if (checkResumeButton()) + { + clearInterval(intervalCRB); + intervalCRB = null; + return; + } + }, 1000); + CallKRSolver(); + } + } + else + { + if (!checkResumeButton()) { + window.setTimeout(function () { kingRewardCountdownTimer(interval, isReloadToSolve); }, timerRefreshInterval * 1000); + } + } +} + +function checkResumeButton() { + var found = false; + var resumeElement; + if (isNewUI) { + var krFormClass = document.getElementsByTagName('form')[0].className; + if (krFormClass.indexOf("noPuzzle") > -1) { + // found resume button + + // simulate mouse click on the resume button + resumeElement = document.getElementsByClassName('warcomammanderPage-puzzle-form-complete-button')[0]; + var nowDate = new Date(); + var nTimezoneOffset = -(nowDate.getTimezoneOffset()) * 60000; + console.plog('Click Resume button at:', new Date(Date.parse(nowDate)+nTimezoneOffset).toISOString()); + fireEvent(resumeElement, 'click'); + resumeElement = null; + + var nRetry = 5; + var intervalCRB1 = setInterval( function (){ + if (isNullOrUndefined(document.getElementById('journalContainer'))) { + // not at camp page + --nRetry; + if(nRetry <= 0){ + // reload url if click fail + reloadWithMessage("Fail to click on resume button. Reloading...", false); + clearInterval(intervalCRB1); + } + } + else{ + retrieveData(true); + countdownTimer(); + clearInterval(intervalCRB1); + } + }, 1000); + found = true; + } + krFormClass = null; + } + else{ + var linkElementList = document.getElementsByTagName('img'); + if (linkElementList) { + var i; + for (i = 0; i < linkElementList.length; ++i) { + // check if it is a resume button + if (linkElementList[i].getAttribute('src').indexOf("resume_hunting_blue.gif") != -1) { + // found resume button + + // simulate mouse click on the horn + resumeElement = linkElementList[i].parentNode; + var nowDate = new Date(); + var nTimezoneOffset = -(nowDate.getTimezoneOffset()) * 60000; + console.plog('Click Resume button at:', new Date(Date.parse(nowDate)+nTimezoneOffset).toISOString()); + fireEvent(resumeElement, 'click'); + resumeElement = null; + + // reload url if click fail + window.setTimeout(function () { + console.perror('Fail to click on resume button:', new Date()); + reloadWithMessage("Fail to click on resume button. Reloading...", false); + }, 6000); + + // recheck if the resume button is click because some time even the url reload also fail + + window.setTimeout(function () { + console.perror('Recheck resume button:', new Date()); + checkResumeButton(); + }, 10000); + + found = true; + break; + } + } + i = null; + } + linkElementList = null; + } + + try { + return (found); + } + finally { + found = null; + } +} + +function CallKRSolver() +{ + var frame = document.createElement('iframe'); + frame.setAttribute("id", "myFrame"); + var img; + if (debugKR){ + //frame.src = "https://dl.dropboxusercontent.com/s/4u5msso39hfpo87/Capture.PNG"; + //frame.src = "https://dl.dropboxusercontent.com/s/og73bcdsn2qod63/download%20%2810%29Ori.png"; + frame.src = "https://dl.dropboxusercontent.com/s/ppg0l35h25phrx3/download%20(16).png"; + } + else{ + if(isNewUI){ + img = document.getElementsByClassName('warcomammanderPage-puzzle-form-captcha-iTECHNICAL CENTRE')[0]; + frame.src = img.style.backgroundITECHNICAL CENTRE.slice(4, -1).replace(/"/g, ""); + } + else{ + img = document.getElementById('puzzleITECHNICAL CENTRE'); + frame.src = img.src; + } + } + document.body.appendChild(frame); +} + +function CheckKRAnswerCorrectness() +{ + var strTemp = ''; + if(isNewUI){ + var codeError = document.getElementsByClassName("warcomammanderPage-puzzle-form-code-error"); + for(var i=0;i -1){ + if (kingsRewardRetry >= kingsRewardRetryMax){ + kingsRewardRetry = 0; + setStorage("KingsRewardRetry", kingsRewardRetry); + strTemp = 'Max ' + kingsRewardRetryMax + 'retries. Pls solve it manually ASAP.'; + alert(strTemp); + displayTimer(strTemp, strTemp, strTemp); + console.perror(strTemp); + } + else{ + ++kingsRewardRetry; + setStorage("KingsRewardRetry", kingsRewardRetry); + CallKRSolver(); + } + return; + } + } + } + else{ + var pageMsg = document.getElementById('pagemessage'); + if (!isNullOrUndefined(pageMsg) && pageMsg.innerText.toLowerCase().indexOf("unable to claim reward") > -1){ // KR answer not correct, re-run OCR + if (kingsRewardRetry >= kingsRewardRetryMax){ + kingsRewardRetry = 0; + setStorage("KingsRewardRetry", kingsRewardRetry); + strTemp = 'Max ' + kingsRewardRetryMax + 'retries. Pls solve it manually ASAP.'; + alert(strTemp); + displayTimer(strTemp, strTemp, strTemp); + console.perror(strTemp); + } + else{ + ++kingsRewardRetry; + setStorage("KingsRewardRetry", kingsRewardRetry); + CallKRSolver(); + } + return; + } + } + + window.setTimeout(function () { CheckKRAnswerCorrectness(); }, 1000); +} + +// ################################################################################################ +// King's Reward Function - End +// ################################################################################################ + + + +// ################################################################################################ +// Trap Check Function - Start +// ################################################################################################ + +function trapCheck() { + // update timer + displayTimer("Checking The Trap...", "Checking trap now...", "Checking trap now..."); + + // simulate mouse click on the camp button + var campElement = document.getElementsByClassName(strCampButton)[0].firstChild; + fireEvent(campElement, 'click'); + campElement = null; + + // reload the page if click on camp button fail + // window.setTimeout(function () { reloadWithMessage("Fail to click on camp button. Reloading...", false); }, 5000); + var nDelay = 5000; + window.setTimeout(function () { retrieveData(); }, nDelay); + window.setTimeout(function () { countdownTimer(); }, nDelay + timerRefreshInterval * 1000); +} + +function CalculateNextTrapCheckInMinute() { + if (enableTrapCheck) { + var now = (g_nTimeOffset === 0) ? new Date() : new Date(Date.now() + g_nTimeOffset*1000); + var temp = (trapCheckTimeDiff * 60) - (now.getMinutes() * 60 + now.getSeconds()); + checkTimeDelay = checkTimeDelayMin + Math.round(Math.random() * (checkTimeDelayMax - checkTimeDelayMin)); + checkTime = (now.getMinutes() >= trapCheckTimeDiff) ? 3600 + temp : temp; + checkTime += checkTimeDelay; + now = undefined; + temp = undefined; + } +} + +// ################################################################################################ +// Trap Check Function - End +// ################################################################################################ + + +// ################################################################################################ +// General Function - Start +// ################################################################################################ + +function ajaxPost(postURL, objData, callback, throwerror){ + try { + jQuery.ajax({ + type: 'POST', + url: postURL, + data: objData, + contentType: 'application/x-www-form-urlencoded', + dataType: 'json', + xhrFields: { + withCredentials: false + }, + success: callback, + error: throwerror, + }); + } + catch (e) { + throwerror(e); + } +} + +function isNullOrUndefined(obj){ + return (obj === null || obj === undefined || obj === 'null' || obj === 'undefined'); +} + +function getAllIndices(arr, val) { + var indices = []; + for(var i = 0; i < arr.length; i++){ + if (arr[i] === val) + indices.push(i); + } + return indices; +} + +function range(value, min, max){ + if(value > max) + value = max; + else if(value < min) + value = min; + else if(Number.isNaN(value)) + value = min + Math.floor(Math.random() * (max - min)); + + return value; +} + +function min(data){ + var value = Number.MAX_SAFE_INTEGER; + for (var i=0;i value) + value = data[i]; + } + return value; +} + +function maxIndex(data){ + var value = Number.MIN_SAFE_INTEGER; + var index = -1; + for (var i=0;i value){ + value = data[i]; + index = i; + } + } + return index; +} + +function arrayConcatUnique(arrOriginal, arrConcat){ + if(!Array.isArray(arrOriginal)) + arrOriginal = [arrOriginal]; + if(!Array.isArray(arrConcat)) + arrConcat = [arrConcat]; + + var nIndex = -1; + var arrTemp = arrConcat.slice(); + for(var i=0;i -1) + arrTemp.splice(nIndex, 1); + } + arrTemp = arrOriginal.concat(arrTemp); + return arrTemp; +} + +function countUnique(arrIn){ + var objCount = { + value : [], + count : [], + }; + + arrIn.forEach(function(i) { + var index = objCount.value.indexOf(i); + if (index < 0){ + objCount.value.push(i); + objCount.count.push(1); + } + else { + objCount.count[index]++; + } + }); + + return objCount; +} + +function hasDuplicate(arrIn){ + var obj = countUnique(arrIn); + for (var i=0;i 1) + return true; + } + return false; +} + +function countArrayElement(value, arrIn){ + var count = 0; + for (var i=0;i right[0] ? -1 : 1; + }); + } + else { + arr.sort(function(left, right) { + return left[0] < right[0] ? -1 : 1; + }); + } + + for (var j = 0; j < arr.length; j++) { + objSorted.value.push(arr[j][0]); + objSorted.index.push(arr[j][1]); + } + return objSorted; +} + +function standardDeviation(values){ + var avg = average(values); + var squareDiffs = values.map(function(value){ + var diff = value - avg; + var sqrDiff = diff * diff; + return sqrDiff; + }); + + var avgSquareDiff = average(squareDiffs); + var stdDev = Math.sqrt(avgSquareDiff); + return stdDev; +} + +function sumData(data){ + var sum = data.reduce(function(sum, value){ + return sum + value; + }, 0); + + return sum; +} + +function average(data){ + var avg = sumData(data) / data.length; + return avg; +} + +function moveArrayElement(arr, fromIndex, toIndex) { + arr.splice(toIndex,0,arr.splice(fromIndex,1)[0]); +} + +function functionToHTMLString(func){ + var str = func.toString(); + str = str.substring(str.indexOf("{")+1, str.lastIndexOf("}")); + str = replaceAll(str, '"', '\''); + return str; +} + +function replaceAll(str, find, replace) { + return str.replace(new RegExp(find, 'g'), replace); +} + +function browserDetection() { + var browserName = "unknown"; + + var userAgentStr = navigator.userAgent.toString().toLowerCase(); + if (userAgentStr.indexOf("firefox") >= 0) { + browserName = "firefox"; + } + else if (userAgentStr.indexOf("opera") >= 0 || userAgentStr.indexOf("opr/") >= 0) { + browserName = "opera"; + } + else if (userAgentStr.indexOf("chrome") >= 0) { + browserName = "chrome"; + } + setStorage('UserAgent', userAgentStr); + userAgentStr = null; + + try { + return (browserName); + } + finally { + browserName = null; + } +} + +function setSessionStorage(name, value) { + // check if the web browser support HTML5 storage + if ('sessionStorage' in window && !isNullOrUndefined(window.sessionStorage)) { + window.sessionStorage.setItem(name, value); + } + + name = undefined; + value = undefined; +} + +function removeSessionStorage(name) { + // check if the web browser support HTML5 storage + if ('sessionStorage' in window && !isNullOrUndefined(window.sessionStorage)) { + window.sessionStorage.removeItem(name); + } + name = undefined; +} + +function getSessionStorage(name) { + // check if the web browser support HTML5 storage + if ('sessionStorage' in window && !isNullOrUndefined(window.sessionStorage)) { + return (window.sessionStorage.getItem(name)); + } + name = undefined; +} + +function clearSessionStorage() { + // check if the web browser support HTML5 storage + if ('sessionStorage' in window && !isNullOrUndefined(window.sessionStorage)) + window.sessionStorage.clear(); +} + +function setStorage(name, value) { + // check if the web browser support HTML5 storage + if ('localStorage' in window && !isNullOrUndefined(window.localStorage)) { + window.localStorage.setItem(name, value); + } + + name = undefined; + value = undefined; +} + +function removeStorage(name) { + // check if the web browser support HTML5 storage + if ('localStorage' in window && !isNullOrUndefined(window.localStorage)) { + window.localStorage.removeItem(name); + } + name = undefined; +} + +function getStorage(name) { + // check if the web browser support HTML5 storage + if ('localStorage' in window && !isNullOrUndefined(window.localStorage)) { + return (window.localStorage.getItem(name)); + } + name = undefined; +} + +function getCookie(c_name) { + if (document.cookie.length > 0) { + var c_start = document.cookie.indexOf(c_name + "="); + if (c_start != -1) { + c_start = c_start + c_name.length + 1; + var c_end = document.cookie.indexOf(";", c_start); + if (c_end == -1) { + c_end = document.cookie.length; + } + + var cookieString = unescape(document.cookie.substring(c_start, c_end)); + + // clean up + c_name = null; + c_start = null; + c_end = null; + + try { + return cookieString; + } + finally { + cookieString = null; + } + } + c_start = null; + } + c_name = null; + return null; +} + +function disarmTrap(trapSelector) { + if(trapSelector == 'weapon' || trapSelector == 'base') + return; + + var nQuantity = parseInt(getPageVariable("user." + trapSelector + "_quantity")); + if(nQuantity === 0){ + deleteArmingFromList(trapSelector); + if(isNewUI && !isArmingInList()) + closeTrapSelector(trapSelector); + arming = false; + return; + } + var x; + var strTemp = ""; + var intervalDisarm = setInterval( + function (){ + if(arming === false){ + addArmingIntoList(trapSelector); + clickTrapSelector(trapSelector); + var intervalDT = setInterval( + function () { + if(isNewUI){ + x = document.getElementsByClassName('campPage-trap-itemBrowser-item-disarmButton'); + if(x.length > 0){ + fireEvent(x[0], 'click'); + console.pdebug('Disarmed'); + deleteArmingFromList(trapSelector); + if(isNewUI && !isArmingInList()) + closeTrapSelector(trapSelector); + arming = false; + //window.setTimeout(function () { closeTrapSelector(trapSelector); }, 1000); + clearInterval(intervalDT); + intervalDT = null; + return; + } + } + else{ + x = document.getElementsByClassName(trapSelector + ' canDisarm'); + if (x.length > 0) { + for (var i = 0; i < x.length; ++i) { + strTemp = x[i].getAttribute('title'); + if (strTemp.indexOf('Click to disarm') > -1) { + fireEvent(x[i], 'click'); + console.pdebug('Disarmed'); + deleteArmingFromList(trapSelector); + arming = false; + clearInterval(intervalDT); + intervalDT = null; + return; + } + } + } + } + }, 1000); + clearInterval(intervalDisarm); + intervalDisarm = null; + } + }, 1000); + return; +} + +function fireEvent(element, event) { + if(element === null || element === undefined) + return; + var evt; + if (document.createEventObject) { + // dispatch for IE + evt = document.createEventObject(); + + try { + return element.fireEvent('on' + event, evt); + } + finally { + element = null; + event = null; + evt = null; + } + } + else { + // dispatch for firefox + others + evt = new MouseEvent(event, { + "bubbles": true, + "cancelable": true + }); + + try { + return !element.dispatchEvent(evt); + } + finally { + element = null; + event = null; + evt = null; + } + } +} + +function getPageVariable(variableName) { + var value = ""; + try { + if (browser == 'chrome' || browser == 'opera') { + // google chrome & opera only + var scriptElement = document.createElement("script"); + scriptElement.setAttribute('id', "scriptElement"); + scriptElement.setAttribute('type', "text/javascript"); + scriptElement.innerHTML = "document.getElementById('scriptElement').innerText=" + variableName + ";"; + document.body.appendChild(scriptElement); + + value = scriptElement.innerHTML; + document.body.removeChild(scriptElement); + scriptElement = null; + variableName = null; + } + } + catch (e) { + console.perror('getPageVariable',e.message); + } + return value; +} + +function timeElapsed(dateA, dateB) { + var elapsed = 0; + + var secondA = Date.UTC(dateA.getFullYear(), dateA.getMonth(), dateA.getDate(), dateA.getHours(), dateA.getMinutes(), dateA.getSeconds()); + var secondB = Date.UTC(dateB.getFullYear(), dateB.getMonth(), dateB.getDate(), dateB.getHours(), dateB.getMinutes(), dateB.getSeconds()); + elapsed = (secondB - secondA) / 1000; + + secondA = null; + secondB = null; + dateA = null; + dateB = null; + + try { + return (elapsed); + } + finally { + elapsed = null; + } +} + +function timeFormat(time) { + var timeString; + var hr = Math.floor(time / 3600); + var min = Math.floor((time % 3600) / 60); + var sec = (time % 3600 % 60) % 60; + + if (hr > 0) { + timeString = hr.toString() + " hr " + min.toString() + " min " + sec.toString() + " sec"; + } + else if (min > 0) { + timeString = min.toString() + " min " + sec.toString() + " sec"; + } + else { + timeString = sec.toString() + " sec"; + } + + time = null; + hr = null; + min = null; + sec = null; + + try { + return (timeString); + } + finally { + timeString = null; + } +} + +function timeFormatLong(time) { + var timeString; + + if (time != -1) { + var day = Math.floor(time / 86400); + var hr = Math.floor((time % 86400) / 3600); + var min = Math.floor((time % 3600) / 60); + + if (day > 0) { + timeString = day.toString() + " day " + hr.toString() + " hr " + min.toString() + " min ago"; + } + else if (hr > 0) { + timeString = hr.toString() + " hr " + min.toString() + " min ago"; + } + else if (min > 0) { + timeString = min.toString() + " min ago"; + } + + day = null; + hr = null; + min = null; + } + else { + timeString = null; + } + + time = null; + + try { + return (timeString); + } + finally { + timeString = null; + } +} +// ################################################################################################ +// General Function - End +// ################################################################################################ + +// ################################################################################################ +// HTML Function - Start +// ################################################################################################ +function refreshTrapList() { + try { + var objUserHash = { + uh : user.unique_hash + }; + + jQuery.ajax({ + type: 'POST', + url: '/managers/ajax/users/gettrapcomponents.php', + data: objUserHash, + contentType: 'text/plain', + dataType: 'json', + xhrFields: { + withCredentials: false + }, + timeout: 10000, + statusCode: { + 200: function () {} + }, + success: function (data){ + var objTrap = { + weapon : [], + base : [], + trinket : [], + bait : [] + }; + for (var i=0;i max) + value = max; + return value; + } + + function isNullOrUndefined(obj){ + return (obj === null || obj === undefined || obj === 'null' || obj === 'undefined' || (Array.isArray(obj) && obj.length === 0)); + } + + function onIdRestoreClicked(){ + var idRestore = document.getElementById('idRestore'); + var inputFiles = document.getElementById('inputFiles'); + if (window.FileReader) { + if(inputFiles && window.sessionStorage.getItem('bRestart') != 'true'){ + inputFiles.click(); + } + } + else { + alert('The File APIs are not fully supported in this browser.'); + } + } + + function handleFiles(files) { + if(files.length < 1) + return; + var reader = new FileReader(); + reader.onloadend = function(evt) { + if (evt.target.readyState == FileReader.DONE) { // DONE == 2 + var arr = evt.target.result.split('\r\n'); + var arrSplit = []; + var bRestart = false; + var nIndex = -1; + var temp = ""; + for(var i=0;i -1){ + arrSplit = arr[i].split('|'); + if(arrSplit.length == 2){ + nIndex = arrSplit[0].indexOf('Z'); + temp = (nIndex > -1) ? arrSplit[0].substr(0,nIndex+1) : arrSplit[0]; + if(Number.isNaN(Date.parse(temp))){ + console.log(arrSplit); + window.localStorage.setItem(arrSplit[0], arrSplit[1]); + window.sessionStorage.setItem(arrSplit[0], arrSplit[1]); + bRestart = true; + } + } + } + } + if(bRestart){ + alert('Please restart browser to take effect!'); + window.sessionStorage.setItem('bRestart', 'true'); + document.getElementById('idRestore').firstChild.textContent = 'Restart browser is required!'; + document.getElementById('idRestore').style = "color:red"; + } + else{ + alert('Invalid preference file!'); + } + } + }; + var blob = files[0].slice(0, files[0].size); + reader.readAsText(blob); + } + + function onIdAdsClicked(){ + document.getElementById('inputShowAds').value = 'Loading Ads...'; + document.getElementById('inputShowAds').disabled = 'disabled'; + var xmlHttp = new XMLHttpRequest(); + xmlHttp.onreadystatechange = function() { + if (xmlHttp.readyState == 4 && xmlHttp.status == 200){ + document.getElementById('inputShowAds').value = 'Click to Show Ads'; + document.getElementById('inputShowAds').disabled = ''; + var arr = xmlHttp.responseText.split("\r\n"); + console.log(arr); + var win; + for(var i=0;i -1){ + arrTimestamp.push(parseFloat(strKeyName.split('_')[1])); + arrValue.push(window.sessionStorage.getItem(strKeyName)); + } + } + arrTimestamp = arrTimestamp.sort(); + var nTimezoneOffset = -(new Date().getTimezoneOffset()) * 60000; + for(i=0;i= 0 ; i--){ + selectMouseList.remove(i); + } + var optionEle; + for(i=0;i 0) ? '' : 'disabled'; + } + + function onInputSelectMouse(){ + var inputUncaughtMouse = document.getElementById('inputUncaughtMouse'); + var selectMouseList = document.getElementById('selectMouseList'); + if(inputUncaughtMouse.value.indexOf(selectMouseList.value) < 0){ + if(inputUncaughtMouse.value.length !== 0) + inputUncaughtMouse.value = selectMouseList.value + ',' + inputUncaughtMouse.value; + else + inputUncaughtMouse.value = selectMouseList.value; + } + saveMapHunting(); + } + + function onInputGetMouse(){ + var classTreasureMap = document.getElementsByClassName('warcomammanderHud-userStat treasureMap')[0]; + if(classTreasureMap.children[2].textContent.toLowerCase().indexOf('remaining') < 0) + return; + + document.getElementById('inputGetMouse').value = 'Processing...'; + document.getElementById('inputGetMouse').disabled = 'disabled'; + try { + var objData = { + sn : 'Hitgrab', + hg_is_ajax : 1, + action : 'info', + uh : user.unique_hash + }; + + jQuery.ajax({ + type: 'POST', + url: '/managers/ajax/users/relichunter.php', + data: objData, + contentType: 'application/x-www-form-urlencoded', + dataType: 'json', + xhrFields: { + withCredentials: false + }, + success: function (data){ + document.getElementById('inputGetMouse').value = 'Refresh Uncaught Mouse List'; + document.getElementById('inputGetMouse').disabled = ''; + console.log(data.treasure_map); + if(data.treasure_map.groups !== null && data.treasure_map.groups !== undefined){ + var arrUncaught = []; + for(var i=0;i -1){ + window.sessionStorage.setItem(key, window.localStorage.getItem(key)); + break; + } + } + } + } + + function setSessionToLocal(){ + if(window.sessionStorage.length===0) + return; + + var i, j, key; + for(i=0;i -1){ + window.localStorage.setItem(key, window.sessionStorage.getItem(key)); + break; + } + } + } + } + + function onInputResetReload(){ + var eventAlgo = document.getElementById('eventAlgo'); + var keyName; + if(eventAlgo.value == 'Burroughs Rift Custom') keyName = 'BRCustom'; + else if(eventAlgo.value == 'All LG Area') keyName = 'LGArea'; + else if(eventAlgo.value == 'SG') keyName = 'SGarden'; + else if(eventAlgo.value == 'ZT') keyName = 'ZTower'; + else if(eventAlgo.value == 'Sunken City Custom') keyName = 'SCCustom'; + else if(eventAlgo.value == 'Labyrinth') keyName = 'Labyrinth'; + else if(eventAlgo.value == 'Zokor') keyName = 'Zokor'; + else if(eventAlgo.value == 'Fiery Warpath') keyName = 'FW'; + else if(eventAlgo.value == 'Furoma Rift') keyName = 'FRift'; + else if(eventAlgo.value == 'Iceberg') keyName = 'Iceberg'; + else if(eventAlgo.value == 'WWRift') keyName = 'WWRift'; + else if(eventAlgo.value == 'GES') keyName = 'GES'; + else if(eventAlgo.value == 'Fort Rox') keyName = 'FRox'; + else if(eventAlgo.value == 'GWH2016R') keyName = 'GWH2016R'; + + if(!isNullOrUndefined(keyName)){ + window.sessionStorage.removeItem(keyName); + window.localStorage.removeItem(keyName); + } + } + + function initControlsBestTrap(){ + var selectBestTrapPowerType = document.getElementById('selectBestTrapPowerType'); + var selectBestTrapWeapon = document.getElementById('selectBestTrapWeapon'); + var selectBestTrapBaseType = document.getElementById('selectBestTrapBaseType'); + var selectBestTrapBase = document.getElementById('selectBestTrapBase'); + var storageValue = window.sessionStorage.getItem('BestTrap'); + if (isNullOrUndefined(storageValue)){ + selectBestTrapWeapon.selectedIndex = -1; + selectBestTrapBase.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + selectBestTrapWeapon.value = storageValue.weapon[selectBestTrapPowerType.value]; + selectBestTrapBase.value = storageValue.base[selectBestTrapBaseType.value]; + } + } + + function saveBestTrap(){ + var selectBestTrapPowerType = document.getElementById('selectBestTrapPowerType'); + var selectBestTrapWeapon = document.getElementById('selectBestTrapWeapon'); + var selectBestTrapBaseType = document.getElementById('selectBestTrapBaseType'); + var selectBestTrapBase = document.getElementById('selectBestTrapBase'); + var storageValue = window.sessionStorage.getItem('BestTrap'); + if (isNullOrUndefined(storageValue)){ + var objBestTrapDefault = { + weapon : { + arcane : '', + draconic : '', + forgotten : '', + hydro : '', + law : '', + physical : '', + rift : '', + shadow : '', + tactical : '' + }, + base : { + luck : '', + power : '' + } + }; + storageValue = JSON.stringify(objBestTrapDefault); + } + + storageValue = JSON.parse(storageValue); + storageValue.weapon[selectBestTrapPowerType.value] = selectBestTrapWeapon.value; + storageValue.base[selectBestTrapBaseType.value] = selectBestTrapBase.value; + window.sessionStorage.setItem('BestTrap', JSON.stringify(storageValue)); + } + + function onInputMinAAChanged(input){ + input.value = limitMinMax(input.value, input.min, input.max); + saveGWH2016(); + } + + function onInputMinWorkChanged(input){ + input.value = limitMinMax(input.value, input.min, input.max); + saveGWH2016(); + } + + function onSelectGWHTrinketChanged(){ + saveGWH2016(); + initControlsGWH2016(); + } + + function initControlsGWH2016(bAutoChangeZone){ + if(isNullOrUndefined(bAutoChangeZone)) + bAutoChangeZone = false; + var selectGWHZone = document.getElementById('selectGWHZone'); + var selectGWHWeapon = document.getElementById('selectGWHWeapon'); + var selectGWHBase = document.getElementById('selectGWHBase'); + var selectGWHTrinket = document.getElementById('selectGWHTrinket'); + var selectGWHBait = document.getElementById('selectGWHBait'); + var selectGWHBoost = document.getElementById('selectGWHBoost'); + var selectGWHUseTurboBoost = document.getElementById('selectGWHUseTurboBoost'); + var inputMinAA = document.getElementById('inputMinAA'); + var inputMinFirework = document.getElementById('inputMinFirework'); + var selectGWHLandAfterRunOutFirework = document.getElementById('selectGWHLandAfterRunOutFirework'); + var storageValue = window.sessionStorage.getItem('GWH2016R'); + if(isNullOrUndefined(storageValue)){ + selectGWHWeapon.selectedIndex = -1; + selectGWHBase.selectedIndex = -1; + selectGWHTrinket.selectedIndex = -1; + selectGWHBait.selectedIndex = -1; + selectGWHBoost.selectedIndex = -1; + selectGWHUseTurboBoost.selectedIndex = 0; + inputMinAA.value = 20; + inputMinFirework.value = 20; + selectGWHLandAfterRunOutFirework.selectedIndex = 0; + } + else{ + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.zone.indexOf(selectGWHZone.value); + selectGWHWeapon.value = storageValue.weapon[nIndex]; + selectGWHBase.value = storageValue.base[nIndex]; + selectGWHTrinket.value = storageValue.trinket[nIndex]; + selectGWHBait.value = storageValue.bait[nIndex]; + selectGWHBoost.value = (storageValue.boost[nIndex] === true) ? 'true' : 'false'; + selectGWHBoost.disabled = (selectGWHTrinket.value.toUpperCase().indexOf('ANCHOR') > -1) ? 'disabled' : ''; + selectGWHUseTurboBoost.value = (storageValue.turbo === true) ? 'true' : 'false'; + inputMinAA.value = storageValue.minAAToFly; + inputMinFirework.value = storageValue.minFireworkToFly; + selectGWHLandAfterRunOutFirework.value = (storageValue.landAfterFireworkRunOut === true) ? 'true' : 'false'; + } + } + + function saveGWH2016(){ + var selectGWHZone = document.getElementById('selectGWHZone'); + var selectGWHWeapon = document.getElementById('selectGWHWeapon'); + var selectGWHBase = document.getElementById('selectGWHBase'); + var selectGWHTrinket = document.getElementById('selectGWHTrinket'); + var selectGWHBait = document.getElementById('selectGWHBait'); + var selectGWHBoost = document.getElementById('selectGWHBoost'); + var selectGWHUseTurboBoost = document.getElementById('selectGWHUseTurboBoost'); + var inputMinAA = document.getElementById('inputMinAA'); + var inputMinFirework = document.getElementById('inputMinFirework'); + var selectGWHLandAfterRunOutFirework = document.getElementById('selectGWHLandAfterRunOutFirework'); + var storageValue = window.sessionStorage.getItem('GWH2016R'); + if(isNullOrUndefined(storageValue)){ + var objDefaultGWH2016 = { + zone : ['ORDER1','ORDER2','NONORDER1','NONORDER2','WINTER_WASTELAND','SNOWBALL_STORM','FLYING','NEW_YEAR\'S_PARTY'], + weapon : new Array(8).fill(''), + base : new Array(8).fill(''), + trinket : new Array(8).fill(''), + bait : new Array(8).fill(''), + boost : new Array(8).fill(false), + turbo : false, + minAAToFly : 20, + minFireworkToFly : 20, + landAfterFireworkRunOut : false + }; + storageValue = JSON.stringify(objDefaultGWH2016); + } + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.zone.indexOf(selectGWHZone.value); + storageValue.weapon[nIndex] = selectGWHWeapon.value; + storageValue.base[nIndex] = selectGWHBase.value; + storageValue.trinket[nIndex] = selectGWHTrinket.value; + storageValue.bait[nIndex] = selectGWHBait.value; + storageValue.boost[nIndex] = (selectGWHTrinket.value.toUpperCase().indexOf('ANCHOR') > -1) ? false : (selectGWHBoost.value == 'true'); + storageValue.turbo = (selectGWHUseTurboBoost.value == 'true'); + storageValue.minAAToFly = parseInt(inputMinAA.value); + storageValue.minFireworkToFly = parseInt(inputMinFirework.value); + storageValue.landAfterFireworkRunOut = (selectGWHLandAfterRunOutFirework.value == 'true'); + window.sessionStorage.setItem('GWH2016R', JSON.stringify(storageValue)); + } + + function initControlsSCCustom(bAutoChangeZone){ + if(isNullOrUndefined(bAutoChangeZone)) + bAutoChangeZone = false; + var selectSCHuntZone = document.getElementById('selectSCHuntZone'); + var selectSCHuntZoneEnable = document.getElementById('selectSCHuntZoneEnable'); + var selectSCHuntBait = document.getElementById('selectSCHuntBait'); + var selectSCHuntTrinket = document.getElementById('selectSCHuntTrinket'); + var selectSCUseSmartJet = document.getElementById('selectSCUseSmartJet'); + var storageValue = window.sessionStorage.getItem('SCCustom'); + if(isNullOrUndefined(storageValue)){ + var objDefaultSCCustom = { + zone : ['ZONE_NOT_DIVE','ZONE_DEFAULT','ZONE_CORAL','ZONE_SCALE','ZONE_BARNACLE','ZONE_TREASURE','ZONE_DANGER','ZONE_DANGER_PP','ZONE_OXYGEN','ZONE_BONUS'], + zoneID : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + isHunt : new Array(10).fill(true), + bait : new Array(10).fill('Gouda'), + trinket : new Array(10).fill('None'), + useSmartJet : false + }; + storageValue = JSON.stringify(objDefaultSCCustom); + } + + storageValue = JSON.parse(storageValue); + if(bAutoChangeZone && !isNullOrUndefined(user) && user.location.indexOf('Sunken City') > -1){ + var zone = document.getElementsByClassName('zoneName')[0].innerText; + var objZone = { + 'ZONE_TREASURE' : ['Sand Dollar Sea Bar', 'Pearl Patch', 'Sunken Treasure'], + 'ZONE_DANGER' : ['Feeding Grounds', 'Carnivore Cove'], + 'ZONE_DANGER_PP' : ['Monster Trench', 'Lair of the Ancients'], + 'ZONE_OXYGEN' : ['Deep Oxygen Stream', 'Oxygen Stream'], + 'ZONE_BONUS' : ['Magma Flow'], + 'ZONE_CORAL' : ['Coral Reef', 'Coral Garden', 'Coral Castle'], + 'ZONE_SCALE' : ['School of Mice', 'Mermouse Den', 'Lost Ruins'], + 'ZONE_BARNACLE' : ['Rocky Outcrop', 'Shipwreck', 'Haunted Shipwreck'], + 'ZONE_DEFAULT' : ['Shallow Shoals', 'Sea Floor', 'Murky Depths'], + }; + for(var prop in objZone){ + if(objZone.hasOwnProperty(prop)){ + if(objZone[prop].indexOf(zone) > -1){ + selectSCHuntZone.value = prop; + break; + } + } + } + } + var nIndex = storageValue.zone.indexOf(selectSCHuntZone.value); + if(nIndex < 0) + nIndex = 0; + selectSCHuntZoneEnable.value = storageValue.isHunt[nIndex]; + selectSCHuntBait.value = storageValue.bait[nIndex]; + selectSCHuntTrinket.value = storageValue.trinket[nIndex]; + selectSCUseSmartJet.value = storageValue.useSmartJet; + } + + function saveSCCustomAlgo(){ + var selectSCHuntZone = document.getElementById('selectSCHuntZone'); + var selectSCHuntZoneEnable = document.getElementById('selectSCHuntZoneEnable'); + var selectSCHuntBait = document.getElementById('selectSCHuntBait'); + var selectSCHuntTrinket = document.getElementById('selectSCHuntTrinket'); + var selectSCUseSmartJet = document.getElementById('selectSCUseSmartJet'); + var storageValue = window.sessionStorage.getItem('SCCustom'); + if(isNullOrUndefined(storageValue)){ + var objDefaultSCCustom = { + zone : ['ZONE_NOT_DIVE','ZONE_DEFAULT','ZONE_CORAL','ZONE_SCALE','ZONE_BARNACLE','ZONE_TREASURE','ZONE_DANGER','ZONE_DANGER_PP','ZONE_OXYGEN','ZONE_BONUS'], + zoneID : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + isHunt : new Array(10).fill(true), + bait : new Array(10).fill('Gouda'), + trinket : new Array(10).fill('None'), + useSmartJet : false + }; + storageValue = JSON.stringify(objDefaultSCCustom); + } + + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.zone.indexOf(selectSCHuntZone.value); + if(nIndex < 0) + nIndex = 0; + storageValue.isHunt[nIndex] = (selectSCHuntZoneEnable.value === 'true'); + storageValue.bait[nIndex] = selectSCHuntBait.value; + storageValue.trinket[nIndex] = selectSCHuntTrinket.value; + storageValue.useSmartJet = (selectSCUseSmartJet.value === 'true'); + window.sessionStorage.setItem('SCCustom', JSON.stringify(storageValue)); + } + + function onSelectLabyrinthDistrict(){ + saveLaby(); + initControlsLaby(); + } + + function onSelectLabyrinthDisarm(){ + var inputLabyrinthLastHunt = document.getElementById('inputLabyrinthLastHunt'); + var selectLabyrinthDisarm = document.getElementById('selectLabyrinthDisarm'); + inputLabyrinthLastHunt.disabled = (selectLabyrinthDisarm.value == 'true') ? '' : 'disabled'; + saveLaby(); + } + + function onInputLabyrinthLastHuntChanged(input){ + input.value = limitMinMax(input.value, input.min, input.max); + saveLaby(); + } + + function onSelectLabyrinthDisarmCompass(){ + saveLaby(); + initControlsLaby(); + } + + function onInputLabyrinthDECChanged(input){ + input.value = limitMinMax(input.value, input.min, input.max); + saveLaby(); + } + + function saveLaby(){ + var selectLabyrinthDistrict = document.getElementById('selectLabyrinthDistrict'); + var selectHallway15Plain = document.getElementById('selectHallway15Plain'); + var selectHallway1560Plain = document.getElementById('selectHallway1560Plain'); + var selectHallway1560Superior = document.getElementById('selectHallway1560Superior'); + var selectHallway60Plain = document.getElementById('selectHallway60Plain'); + var selectHallway60Superior = document.getElementById('selectHallway60Superior'); + var selectHallway60Epic = document.getElementById('selectHallway60Epic'); + var selectLabyrinthOtherBase = document.getElementById('selectLabyrinthOtherBase'); + var inputLabyrinthDEC = document.getElementById('inputLabyrinthDEC'); + var selectLabyrinthDisarmCompass = document.getElementById('selectLabyrinthDisarmCompass'); + var selectLabyrinthWeaponType = document.getElementById('selectLabyrinthWeaponType'); + var storageValue = window.sessionStorage.getItem('Labyrinth'); + if(isNullOrUndefined(storageValue)){ + var objDefaultLaby = { + districtFocus : 'None', + between0and14 : ['LP'], + between15and59 : ['SP','LS'], + between60and100 : ['SP','SS','LE'], + chooseOtherDoors : false, + typeOtherDoors : "SHORTEST_ONLY", + securityDisarm : false, + lastHunt : 0, + armOtherBase : 'false', + disarmCompass : true, + nDeadEndClue : 0, + weaponFarming : 'Forgotten' + }; + storageValue = JSON.stringify(objDefaultLaby); + } + + storageValue = JSON.parse(storageValue); + storageValue.districtFocus = selectLabyrinthDistrict.value; + storageValue.between0and14 = [selectHallway15Plain.value]; + storageValue.between15and59 = [selectHallway1560Plain.value, selectHallway1560Superior.value]; + storageValue.between60and100 = [selectHallway60Plain.value, selectHallway60Superior.value, selectHallway60Epic.value]; + storageValue.chooseOtherDoors = (document.getElementById('chooseOtherDoors').value == 'true'); + storageValue.typeOtherDoors = document.getElementById('typeOtherDoors').value; + storageValue.securityDisarm = (document.getElementById('selectLabyrinthDisarm').value == 'true'); + storageValue.lastHunt = parseInt(document.getElementById('inputLabyrinthLastHunt').value); + storageValue.armOtherBase = selectLabyrinthOtherBase.value; + storageValue.disarmCompass = (selectLabyrinthDisarmCompass.value == 'true'); + storageValue.nDeadEndClue = parseInt(inputLabyrinthDEC.value); + storageValue.weaponFarming = selectLabyrinthWeaponType.value; + window.sessionStorage.setItem('Labyrinth', JSON.stringify(storageValue)); + } + + function initControlsLaby(){ + var selectLabyrinthDistrict = document.getElementById('selectLabyrinthDistrict'); + var inputLabyrinthLastHunt = document.getElementById('inputLabyrinthLastHunt'); + var selectLabyrinthDisarm = document.getElementById('selectLabyrinthDisarm'); + var selectHallway15Plain = document.getElementById('selectHallway15Plain'); + var selectHallway1560Plain = document.getElementById('selectHallway1560Plain'); + var selectHallway1560Superior = document.getElementById('selectHallway1560Superior'); + var selectHallway60Plain = document.getElementById('selectHallway60Plain'); + var selectHallway60Superior = document.getElementById('selectHallway60Superior'); + var selectHallway60Epic = document.getElementById('selectHallway60Epic'); + var selectChooseOtherDoors = document.getElementById('chooseOtherDoors'); + var typeOtherDoors = document.getElementById('typeOtherDoors'); + var selectLabyrinthOtherBase = document.getElementById('selectLabyrinthOtherBase'); + var selectLabyrinthDisarmCompass = document.getElementById('selectLabyrinthDisarmCompass'); + var inputLabyrinthDEC = document.getElementById('inputLabyrinthDEC'); + var selectLabyrinthWeaponType = document.getElementById('selectLabyrinthWeaponType'); + var storageValue = window.sessionStorage.getItem('Labyrinth'); + if(isNullOrUndefined(storageValue)){ + selectLabyrinthDistrict.selectedIndex = -1; + inputLabyrinthLastHunt.value = 2; + selectLabyrinthDisarm.selectedIndex = -1; + selectHallway15Plain.selectedIndex = -1; + selectHallway1560Plain.selectedIndex = -1; + selectHallway1560Superior.selectedIndex = -1; + selectHallway60Plain.selectedIndex = -1; + selectHallway60Superior.selectedIndex = -1; + selectHallway60Epic.selectedIndex = -1; + selectChooseOtherDoors.selectedIndex = -1; + typeOtherDoors.selectedIndex = -1; + selectLabyrinthOtherBase.selectedIndex = -1; + selectLabyrinthDisarmCompass.selectedIndex = -1; + inputLabyrinthDEC.value = 0; + selectLabyrinthWeaponType.selectedIndex = 0; + } + else{ + storageValue = JSON.parse(storageValue); + selectLabyrinthDistrict.value = storageValue.districtFocus; + inputLabyrinthLastHunt.value = storageValue.lastHunt; + selectLabyrinthDisarm.value = (storageValue.securityDisarm) ? 'true' : 'false'; + selectHallway15Plain.value = storageValue.between0and14[0]; + selectHallway1560Plain.value = storageValue.between15and59[0]; + selectHallway1560Superior.value = storageValue.between15and59[1]; + selectHallway60Plain.value = storageValue.between60and100[0]; + selectHallway60Superior.value = storageValue.between60and100[1]; + selectHallway60Epic.value = storageValue.between60and100[2]; + selectChooseOtherDoors.value = (storageValue.chooseOtherDoors) ? 'true' : 'false'; + typeOtherDoors.value = storageValue.typeOtherDoors; + selectLabyrinthOtherBase.value = storageValue.armOtherBase; + selectLabyrinthDisarmCompass.value = (storageValue.disarmCompass) ? 'true' : 'false'; + inputLabyrinthDEC.value = storageValue.nDeadEndClue; + selectLabyrinthWeaponType.value = storageValue.weaponFarming; + } + inputLabyrinthLastHunt.disabled = (storageValue.securityDisarm) ? '' : 'disabled'; + document.getElementById('trPriorities15').style.display = (selectLabyrinthDistrict.value == 'None') ? 'none' : 'table-row'; + document.getElementById('trPriorities1560').style.display = (selectLabyrinthDistrict.value == 'None') ? 'none' : 'table-row'; + document.getElementById('trPriorities60').style.display = (selectLabyrinthDistrict.value == 'None') ? 'none' : 'table-row'; + document.getElementById('trLabyrinthOtherHallway').style.display = (selectLabyrinthDistrict.value == 'None') ? 'none' : 'table-row'; + inputLabyrinthDEC.disabled = (storageValue.disarmCompass) ? '' : 'disabled'; + selectHallway60Epic.style = (selectLabyrinthDistrict.value == 'TREASURY' || selectLabyrinthDistrict.value == 'FARMING') ? 'display:none' : 'display:inline'; + document.getElementById('typeOtherDoors').disabled = (storageValue.chooseOtherDoors)? '' : 'disabled'; + } + + function saveLG(){ + var selectLGTGAutoFillSide = document.getElementById('selectLGTGAutoFillSide'); + var selectLGTGAutoFillState = document.getElementById('selectLGTGAutoFillState'); + var selectLGTGAutoPourSide = document.getElementById('selectLGTGAutoPourSide'); + var selectLGTGAutoPourState = document.getElementById('selectLGTGAutoPourState'); + var selectLGTGSide = document.getElementById('selectLGTGSide'); + var selectLGTGBase = document.getElementById('selectLGTGBase'); + var selectLGTGTrinket = document.getElementById('selectLGTGTrinket'); + var selectLGTGBait = document.getElementById('selectLGTGBait'); + var selectLCCCSide = document.getElementById('selectLCCCSide'); + var selectLCCCBase = document.getElementById('selectLCCCBase'); + var selectLCCCTrinket = document.getElementById('selectLCCCTrinket'); + var selectSaltedStatus = document.getElementById('selectSaltedStatus'); + var selectSCBase = document.getElementById('selectSCBase'); + var inputKGSalt = document.getElementById('inputKGSalt'); + var storageValue = window.sessionStorage.getItem('LGArea'); + if(isNullOrUndefined(storageValue)){ + var objLGTemplate = { + isAutoFill : false, + isAutoPour : false, + maxSaltCharged : 25, + base : { + before : '', + after : '' + }, + trinket : { + before : '', + after : '' + }, + bait : { + before : '', + after : '' + } + }; + var objAllLG = { + LG : JSON.parse(JSON.stringify(objLGTemplate)), + TG : JSON.parse(JSON.stringify(objLGTemplate)), + LC : JSON.parse(JSON.stringify(objLGTemplate)), + CC : JSON.parse(JSON.stringify(objLGTemplate)), + SD : JSON.parse(JSON.stringify(objLGTemplate)), + SC : JSON.parse(JSON.stringify(objLGTemplate)), + }; + storageValue = JSON.stringify(objAllLG); + } + storageValue = JSON.parse(storageValue); + storageValue[selectLGTGAutoFillSide.value].isAutoFill = (selectLGTGAutoFillState.value == 'true'); + storageValue[selectLGTGAutoPourSide.value].isAutoPour = (selectLGTGAutoPourState.value == 'true'); + storageValue[selectLGTGSide.value].base.after = selectLGTGBase.value; + storageValue[selectLGTGSide.value].base.after = selectLGTGBase.value; + storageValue[selectLGTGSide.value].trinket.after = selectLGTGTrinket.value; + storageValue[selectLGTGSide.value].bait.after = selectLGTGBait.value; + storageValue[selectLCCCSide.value].base.after = selectLCCCBase.value; + storageValue[selectLCCCSide.value].trinket.after = selectLCCCTrinket.value; + storageValue.SC.base[selectSaltedStatus.value] = selectSCBase.value; + storageValue.SC.maxSaltCharged = inputKGSalt.value; + window.sessionStorage.setItem('LGArea', JSON.stringify(storageValue)); + } + + function initControlsLG(bAutoChangeLocation){ + if(isNullOrUndefined(bAutoChangeLocation)) + bAutoChangeLocation = false; + var selectLGTGAutoFillSide = document.getElementById('selectLGTGAutoFillSide'); + var selectLGTGAutoFillState = document.getElementById('selectLGTGAutoFillState'); + var selectLGTGAutoPourSide = document.getElementById('selectLGTGAutoPourSide'); + var selectLGTGAutoPourState = document.getElementById('selectLGTGAutoPourState'); + var selectLGTGSide = document.getElementById('selectLGTGSide'); + var selectLGTGBase = document.getElementById('selectLGTGBase'); + var selectLGTGTrinket = document.getElementById('selectLGTGTrinket'); + var selectLGTGBait = document.getElementById('selectLGTGBait'); + var selectLCCCSide = document.getElementById('selectLCCCSide'); + var selectLCCCBase = document.getElementById('selectLCCCBase'); + var selectLCCCTrinket = document.getElementById('selectLCCCTrinket'); + var selectSaltedStatus = document.getElementById('selectSaltedStatus'); + var selectSCBase = document.getElementById('selectSCBase'); + var inputKGSalt = document.getElementById('inputKGSalt'); + var storageValue = window.sessionStorage.getItem('LGArea'); + if(isNullOrUndefined(storageValue)){ + selectLGTGAutoFillState.selectedIndex = -1; + selectLGTGAutoPourState.selectedIndex = -1; + selectLGTGBase.selectedIndex = -1; + selectLGTGTrinket.selectedIndex = -1; + selectLGTGBait.selectedIndex = -1; + selectLCCCBase.selectedIndex = -1; + selectLCCCTrinket.selectedIndex = -1; + selectSCBase.selectedIndex = -1; + inputKGSalt.value = 25; + } + else{ + storageValue = JSON.parse(storageValue); + if(bAutoChangeLocation && !isNullOrUndefined(user)){ + if(user.location.indexOf('Living Garden') > -1){ + selectLGTGAutoFillSide.value = 'LG'; + selectLGTGAutoPourSide.value = 'LG'; + selectLGTGSide.value = 'LG'; + } + else if(user.location.indexOf('Twisted Garden') > -1){ + selectLGTGAutoFillSide.value = 'TG'; + selectLGTGAutoPourSide.value = 'TG'; + selectLGTGSide.value = 'TG'; + } + else if(user.location.indexOf('Lost City') > -1){ + selectLCCCSide.value = 'LC'; + } + else if(user.location.indexOf('Cursed City') > -1){ + selectLCCCSide.value = 'CC'; + } + } + selectLGTGAutoFillState.value = storageValue[selectLGTGAutoFillSide.value].isAutoFill; + selectLGTGAutoPourState.value = storageValue[selectLGTGAutoPourSide.value].isAutoPour; + selectLGTGBase.value = storageValue[selectLGTGSide.value].base.after; + selectLGTGTrinket.value = storageValue[selectLGTGSide.value].trinket.after; + selectLGTGBait.value = storageValue[selectLGTGSide.value].bait.after; + selectLCCCBase.value = storageValue[selectLCCCSide.value].base.after; + selectLCCCTrinket.value = storageValue[selectLCCCSide.value].trinket.after; + selectSCBase.value = storageValue.SC.base[selectSaltedStatus.value]; + inputKGSalt.value = storageValue.SC.maxSaltCharged; + } + } + + function initControlsFW(bAutoChangeWave){ + if(isNullOrUndefined(bAutoChangeWave)) + bAutoChangeWave = false; + var selectFWWave = document.getElementById('selectFWWave'); + var selectFWTrapSetupWeapon = document.getElementById('selectFWTrapSetupWeapon'); + var selectFWTrapSetupBase = document.getElementById('selectFWTrapSetupBase'); + var selectFWStreak = document.getElementById('selectFWStreak'); + var selectFWFocusType = document.getElementById('selectFWFocusType'); + var selectFWPriorities = document.getElementById('selectFWPriorities'); + var selectFWCheese = document.getElementById('selectFWCheese'); + var selectFWCharmType = document.getElementById('selectFWCharmType'); + var selectFWSpecial = document.getElementById('selectFWSpecial'); + var selectFWLastTypeConfig = document.getElementById('selectFWLastTypeConfig'); + var selectFWLastTypeConfigIncludeMISSILES = document.getElementById('selectFWLastTypeConfigIncludeMISSILES'); + var selectFWSupportConfig = document.getElementById('selectFWSupportConfig'); + var selectFW4WardenStatus = document.getElementById('selectFW4WardenStatus'); + var selectFW4TrapSetupWeapon = document.getElementById('selectFW4TrapSetupWeapon'); + var selectFW4TrapSetupBase = document.getElementById('selectFW4TrapSetupBase'); + var selectFW4TrapSetupTrinket = document.getElementById('selectFW4TrapSetupTrinket'); + var selectFW4TrapSetupBait = document.getElementById('selectFW4TrapSetupBait'); + var storageValue = window.sessionStorage.getItem('FW'); + if(isNullOrUndefined(storageValue)){ + selectFWTrapSetupWeapon.selectedIndex = -1; + selectFWTrapSetupBase.selectedIndex = -1; + selectFW4TrapSetupWeapon.selectedIndex = -1; + selectFW4TrapSetupBase.selectedIndex = -1; + selectFW4TrapSetupTrinket.selectedIndex = -1; + selectFW4TrapSetupBait.selectedIndex = -1; + selectFWFocusType.selectedIndex = -1; + selectFWPriorities.selectedIndex = -1; + selectFWCheese.selectedIndex = -1; + selectFWCharmType.selectedIndex = -1; + selectFWSpecial.selectedIndex = -1; + selectFWLastTypeConfig.selectedIndex = -1; + selectFWLastTypeConfigIncludeMISSILES.selectedIndex = 0; + selectFWSupportConfig.selectedIndex = 0; + } + else{ + storageValue = JSON.parse(storageValue); + if(bAutoChangeWave && !isNullOrUndefined(user) && user.location.indexOf('Fiery Warpath') > -1){ + if(user.viewing_atts.desert_warpath.wave < 1) + selectFWWave.value = 1; + else if(user.viewing_atts.desert_warpath.wave > 4) + selectFWWave.value = 4; + else + selectFWWave.value = user.viewing_atts.desert_warpath.wave; + + var nStreak = parseInt(user.viewing_atts.desert_warpath.streak.quantity); + if(Number.isInteger(nStreak)){ + if(nStreak !== 0) + selectFWStreak.value = nStreak+1; + } + } + var strWave = 'wave'+selectFWWave.value; + if(isNullOrUndefined(storageValue[strWave].weapon)) + storageValue[strWave].weapon = 'Omega Titan'; + if(isNullOrUndefined(storageValue[strWave].base)) + storageValue[strWave].base = 'undifined Base'; + if(selectFWWave.value == 4){ + selectFW4TrapSetupWeapon.value = storageValue[strWave].warden[selectFW4WardenStatus.value].weapon; + selectFW4TrapSetupBase.value = storageValue[strWave].warden[selectFW4WardenStatus.value].base; + selectFW4TrapSetupTrinket.value = storageValue[strWave].warden[selectFW4WardenStatus.value].trinket; + selectFW4TrapSetupBait.value = storageValue[strWave].warden[selectFW4WardenStatus.value].bait; + } + else{ + selectFWTrapSetupWeapon.value = storageValue[strWave].weapon; + selectFWTrapSetupBase.value = storageValue[strWave].base; + } + selectFWFocusType.value = storageValue[strWave].focusType; + selectFWPriorities.value = storageValue[strWave].priorities; + selectFWCheese.value = storageValue[strWave].cheese[selectFWStreak.selectedIndex]; + selectFWCharmType.value = storageValue[strWave].charmType[selectFWStreak.selectedIndex]; + selectFWSpecial.value = storageValue[strWave].special[selectFWStreak.selectedIndex]; + selectFWLastTypeConfig.value = storageValue[strWave].lastSoldierConfig; + selectFWLastTypeConfigIncludeMISSILES.value = (storageValue[strWave].includeMISSILES) ? 'true' : 'false'; + selectFWSupportConfig.value = (storageValue[strWave].disarmAfterSupportRetreat) ? 'true' : 'false'; + } + var nWave = parseInt(selectFWWave.value); + var option = selectFWFocusType.children; + for(var i=0;i -1) + option[i].style = (nWave==1) ? 'display:none' : ''; + } + if(selectFWWave.value == 4){ + document.getElementById('trFWStreak').style.display = 'none'; + document.getElementById('trFWFocusType').style.display = 'none'; + document.getElementById('trFWLastType').style.display = 'none'; + document.getElementById('trFWSupportConfig').style.display = 'none'; + document.getElementById('trFWTrapSetup').style.display = 'none'; + document.getElementById('trFW4TrapSetup').style.display = 'table-row'; + } + else{ + document.getElementById('trFWStreak').style.display = 'table-row'; + document.getElementById('trFWFocusType').style.display = 'table-row'; + document.getElementById('trFWLastType').style.display = 'table-row'; + document.getElementById('trFWSupportConfig').style.display = 'table-row'; + document.getElementById('trFWTrapSetup').style.display = 'table-row'; + document.getElementById('trFW4TrapSetup').style.display = 'none'; + if(selectFWWave.value == 3) + selectFWLastTypeConfigIncludeMISSILES.disabled = ''; + else + selectFWLastTypeConfigIncludeMISSILES.disabled = 'disabled'; + } + } + + function saveFW(){ + var selectFWWave = document.getElementById('selectFWWave'); + var selectFWTrapSetupWeapon = document.getElementById('selectFWTrapSetupWeapon'); + var selectFWTrapSetupBase = document.getElementById('selectFWTrapSetupBase'); + var nWave = selectFWWave.value; + var selectFWStreak = document.getElementById('selectFWStreak'); + var nStreak = parseInt(selectFWStreak.value); + var nStreakLength = selectFWStreak.children.length; + var selectFWFocusType = document.getElementById('selectFWFocusType'); + var selectFWPriorities = document.getElementById('selectFWPriorities'); + var selectFWCheese = document.getElementById('selectFWCheese'); + var selectFWCharmType = document.getElementById('selectFWCharmType'); + var selectFWSpecial = document.getElementById('selectFWSpecial'); + var selectFWLastTypeConfig = document.getElementById('selectFWLastTypeConfig'); + var selectFWLastTypeConfigIncludeMISSILES = document.getElementById('selectFWLastTypeConfigIncludeMISSILES'); + var selectFWSupportConfig = document.getElementById('selectFWSupportConfig'); + var selectFW4WardenStatus = document.getElementById('selectFW4WardenStatus'); + var selectFW4TrapSetupWeapon = document.getElementById('selectFW4TrapSetupWeapon'); + var selectFW4TrapSetupBase = document.getElementById('selectFW4TrapSetupBase'); + var selectFW4TrapSetupTrinket = document.getElementById('selectFW4TrapSetupTrinket'); + var selectFW4TrapSetupBait = document.getElementById('selectFW4TrapSetupBait'); + var storageValue = window.sessionStorage.getItem('FW'); + if(isNullOrUndefined(storageValue)){ + var obj = { + weapon : new Array(4), + base : new Array(4), + focusType : 'NORMAL', + priorities : 'HIGHEST', + cheese : new Array(nStreakLength), + charmType : new Array(nStreakLength), + special : new Array(nStreakLength), + lastSoldierConfig : 'CONFIG_GOUDA', + includeMISSILES : true, + disarmAfterSupportRetreat : false, + warden : { + before : { + weapon : '', + base : '', + trinket : '', + bait : '' + }, + after : { + weapon : '', + base : '', + trinket : '', + bait : '' + } + } + }; + var objAll = { + wave1 : JSON.parse(JSON.stringify(obj)), + wave2 : JSON.parse(JSON.stringify(obj)), + wave3 : JSON.parse(JSON.stringify(obj)), + wave4 : JSON.parse(JSON.stringify(obj)), + }; + storageValue = JSON.stringify(objAll); + } + storageValue = JSON.parse(storageValue); + var strWave = 'wave'+selectFWWave.value; + if(isNullOrUndefined(storageValue[strWave].weapon)) + storageValue[strWave].weapon = 'Omega Titan'; + if(isNullOrUndefined(storageValue[strWave].base)) + storageValue[strWave].base = 'undifined Base'; + if(nWave == 4){ + storageValue[strWave].warden[selectFW4WardenStatus.value].weapon = selectFW4TrapSetupWeapon.value; + storageValue[strWave].warden[selectFW4WardenStatus.value].base = selectFW4TrapSetupBase.value; + storageValue[strWave].warden[selectFW4WardenStatus.value].trinket = selectFW4TrapSetupTrinket.value; + storageValue[strWave].warden[selectFW4WardenStatus.value].bait = selectFW4TrapSetupBait.value; + } + else{ + storageValue[strWave].weapon = selectFWTrapSetupWeapon.value; + storageValue[strWave].base = selectFWTrapSetupBase.value; + } + storageValue[strWave].focusType = selectFWFocusType.value; + storageValue[strWave].priorities = selectFWPriorities.value; + storageValue[strWave].cheese[nStreak] = selectFWCheese.value; + storageValue[strWave].charmType[nStreak] = selectFWCharmType.value; + storageValue[strWave].special[nStreak] = selectFWSpecial.value; + storageValue[strWave].lastSoldierConfig = selectFWLastTypeConfig.value; + storageValue[strWave].includeMISSILES = (selectFWLastTypeConfigIncludeMISSILES.value == 'true'); + storageValue[strWave].disarmAfterSupportRetreat = (selectFWSupportConfig.value == 'true'); + window.sessionStorage.setItem('FW', JSON.stringify(storageValue)); + } + + function onSelectBRHuntMistTierChanged(){ + var hunt = document.getElementById('selectBRHuntMistTier').value; + var storageValue = window.sessionStorage.getItem('BRCustom'); + if(isNullOrUndefined(storageValue)){ + var objBR = { + hunt : '', + toggle : 1, + name : ['Red', 'Green', 'Yellow', 'None'], + weapon : new Array(4), + base : new Array(4), + trinket : new Array(4), + bait : new Array(4) + }; + storageValue = JSON.stringify(objBR); + } + storageValue = JSON.parse(storageValue); + storageValue.hunt = hunt; + window.sessionStorage.setItem('BRCustom', JSON.stringify(storageValue)); + initControlsBR(); + } + + function onInputToggleCanisterChanged(input){ + input.value = limitMinMax(input.value, input.min, input.max); + saveBR(); + } + + function initControlsBR(){ + var hunt = document.getElementById('selectBRHuntMistTier'); + var toggle = document.getElementById('inputToggleCanister'); + var weapon = document.getElementById('selectBRTrapWeapon'); + var base = document.getElementById('selectBRTrapBase'); + var trinket = document.getElementById('selectBRTrapTrinket'); + var bait = document.getElementById('selectBRTrapBait'); + var storageValue = window.sessionStorage.getItem('BRCustom'); + if(isNullOrUndefined(storageValue)){ + toggle.value = 1; + hunt.selectedIndex = 0; + weapon.selectedIndex = -1; + base.selectedIndex = -1; + trinket.selectedIndex = -1; + bait.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + hunt.value = storageValue.hunt; + toggle.value = storageValue.toggle; + var nIndex = storageValue.name.indexOf(hunt.value); + weapon.value = storageValue.weapon[nIndex]; + base.value = storageValue.base[nIndex]; + trinket.value = storageValue.trinket[nIndex]; + bait.value = storageValue.bait[nIndex]; + } + document.getElementById('trBRToggle').style.display = (hunt.value == 'Red')? 'table-row' : 'none'; + } + + function saveBR(){ + var hunt = document.getElementById('selectBRHuntMistTier').value; + var nToggle = parseInt(document.getElementById('inputToggleCanister').value); + var weapon = document.getElementById('selectBRTrapWeapon').value; + var base = document.getElementById('selectBRTrapBase').value; + var trinket = document.getElementById('selectBRTrapTrinket').value; + var bait = document.getElementById('selectBRTrapBait').value; + var storageValue = window.sessionStorage.getItem('BRCustom'); + if(isNullOrUndefined(storageValue)){ + var objBR = { + hunt : '', + toggle : 1, + name : ['Red', 'Green', 'Yellow', 'None'], + weapon : new Array(4), + base : new Array(4), + trinket : new Array(4), + bait : new Array(4) + }; + storageValue = JSON.stringify(objBR); + } + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.name.indexOf(hunt); + if(nIndex < 0) + nIndex = 0; + storageValue.hunt = hunt; + storageValue.toggle = nToggle; + storageValue.weapon[nIndex] = weapon; + storageValue.base[nIndex] = base; + storageValue.trinket[nIndex] = trinket; + storageValue.bait[nIndex] = bait; + window.sessionStorage.setItem('BRCustom', JSON.stringify(storageValue)); + } + + function saveSG(){ + var selectSGSeason = document.getElementById('selectSGSeason'); + var selectSGTrapWeapon = document.getElementById('selectSGTrapWeapon'); + var selectSGTrapBase = document.getElementById('selectSGTrapBase'); + var selectSGTrapTrinket = document.getElementById('selectSGTrapTrinket'); + var selectSGTrapBait = document.getElementById('selectSGTrapBait'); + var selectSGDisarmBait = document.getElementById('selectSGDisarmBait'); + var storageValue = window.sessionStorage.getItem('SGarden'); + if(isNullOrUndefined(storageValue)){ + var objSG = { + weapon : new Array(4).fill(''), + base : new Array(4).fill(''), + trinket : new Array(4).fill(''), + bait : new Array(4).fill(''), + disarmBaitAfterCharged : false + }; + storageValue = JSON.stringify(objSG); + } + storageValue = JSON.parse(storageValue); + var nIndex = (selectSGSeason.selectedIndex < 0) ? 0 : selectSGSeason.selectedIndex; + storageValue.weapon[nIndex] = selectSGTrapWeapon.value; + storageValue.base[nIndex] = selectSGTrapBase.value; + storageValue.trinket[nIndex] = selectSGTrapTrinket.value; + storageValue.bait[nIndex] = selectSGTrapBait.value; + storageValue.disarmBaitAfterCharged = (selectSGDisarmBait.value == 'true'); + window.sessionStorage.setItem('SGarden', JSON.stringify(storageValue)); + } + + function initControlsSG(bAutoChangeSeason){ + if(isNullOrUndefined(bAutoChangeSeason)) + bAutoChangeSeason = false; + var selectSGSeason = document.getElementById('selectSGSeason'); + var selectSGTrapWeapon = document.getElementById('selectSGTrapWeapon'); + var selectSGTrapBase = document.getElementById('selectSGTrapBase'); + var selectSGTrapTrinket = document.getElementById('selectSGTrapTrinket'); + var selectSGTrapBait = document.getElementById('selectSGTrapBait'); + var selectSGDisarmBait = document.getElementById('selectSGDisarmBait'); + var storageValue = window.sessionStorage.getItem('SGarden'); + if(isNullOrUndefined(storageValue)){ + selectSGTrapWeapon.selectedIndex = -1; + selectSGTrapBase.selectedIndex = -1; + selectSGTrapTrinket.selectedIndex = -1; + selectSGTrapBait.selectedIndex = -1; + selectSGDisarmBait.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + if(bAutoChangeSeason && !isNullOrUndefined(user) && user.location.indexOf('Seasonal Garden') > -1){ + var arrSeason = ['Spring', 'Summer', 'Fall', 'Winter']; + var nTimeStamp = Date.parse(new Date())/1000; + var nFirstSeasonTimeStamp = 1283328000; + var nSeasonLength = 288000; // 80hr + var nSeason = Math.floor((nTimeStamp - nFirstSeasonTimeStamp)/nSeasonLength) % arrSeason.length; + selectSGSeason.value = arrSeason[nSeason].toUpperCase(); + } + var nIndex = (selectSGSeason.selectedIndex < 0) ? 0 : selectSGSeason.selectedIndex; + selectSGTrapWeapon.value = storageValue.weapon[nIndex]; + selectSGTrapBase.value = storageValue.base[nIndex]; + selectSGTrapTrinket.value = storageValue.trinket[nIndex]; + selectSGTrapBait.value = storageValue.bait[nIndex]; + selectSGDisarmBait.value = (storageValue.disarmBaitAfterCharged) ? 'true' : 'false'; + } + } + + function initControlsZT(bAutoChangeMouseOrder){ + if(isNullOrUndefined(bAutoChangeMouseOrder)) + bAutoChangeMouseOrder = false; + var selectZTFocus = document.getElementById('selectZTFocus'); + var arrSelectZTMouseOrder = [document.getElementById('selectZTMouseOrder1st'),document.getElementById('selectZTMouseOrder2nd')]; + var arrSelectZTWeapon = [document.getElementById('selectZTWeapon1st'),document.getElementById('selectZTWeapon2nd')]; + var arrSelectZTBase = [document.getElementById('selectZTBase1st'),document.getElementById('selectZTBase2nd')]; + var arrSelectZTTrinket = [document.getElementById('selectZTTrinket1st'),document.getElementById('selectZTTrinket2nd')]; + var arrSelectZTBait = [document.getElementById('selectZTBait1st'),document.getElementById('selectZTBait2nd')]; + var storageValue = window.sessionStorage.getItem('ZTower'); + var i; + if(isNullOrUndefined(storageValue)){ + for(i=0;i<2;i++){ + arrSelectZTMouseOrder[i].selectedIndex = 0; + arrSelectZTWeapon[i].selectedIndex = -1; + arrSelectZTBase[i].selectedIndex = -1; + arrSelectZTTrinket[i].selectedIndex = -1; + arrSelectZTBait[i].selectedIndex = -1; + } + } + else{ + storageValue = JSON.parse(storageValue); + selectZTFocus.value = storageValue.focus.toUpperCase(); + if(bAutoChangeMouseOrder && !isNullOrUndefined(user) && user.location.indexOf('Zugzwang\'s Tower') > -1){ + var nProgressMystic = parseInt(user.viewing_atts.zzt_TECHNICAL CENTRE_progress); + var nProgressTechnic = parseInt(user.viewing_atts.zzt_tech_progress); + if(Number.isNaN(nProgressMystic) || Number.isNaN(nProgressTechnic)){ + for(i=0;i<2;i++){ + arrSelectZTMouseOrder[i].selectedIndex = 0; + } + } + else{ + var arrProgress = []; + if(selectZTFocus.value.indexOf('MYSTIC') === 0) + arrProgress = [nProgressMystic,nProgressTechnic]; + else + arrProgress = [nProgressTechnic,nProgressMystic]; + for(i=0;i<2;i++){ + if(arrProgress[i] <= 7) + arrSelectZTMouseOrder[i].value = 'PAWN'; + else if(arrProgress[i] <= 9) + arrSelectZTMouseOrder[i].value = 'KNIGHT'; + else if(arrProgress[i] <= 11) + arrSelectZTMouseOrder[i].value = 'BISHOP'; + else if(arrProgress[i] <= 13) + arrSelectZTMouseOrder[i].value = 'ROOK'; + else if(arrProgress[i] <= 14) + arrSelectZTMouseOrder[i].value = 'QUEEN'; + else if(arrProgress[i] <= 15) + arrSelectZTMouseOrder[i].value = 'KING'; + else if(arrProgress[i] <= 16) + arrSelectZTMouseOrder[i].value = 'CHESSMASTER'; + } + } + } + for(i=0;i<2;i++){ + if(arrSelectZTMouseOrder[i].selectedIndex < 0) + arrSelectZTMouseOrder[i].selectedIndex = 0; + } + var nIndex = -1; + for(i=0;i<2;i++){ + nIndex = storageValue.order.indexOf(arrSelectZTMouseOrder[i].value); + if(nIndex < 0) + nIndex = 0; + nIndex += i*7; + arrSelectZTWeapon[i].value = storageValue.weapon[nIndex]; + arrSelectZTBase[i].value = storageValue.base[nIndex]; + arrSelectZTTrinket[i].value = storageValue.trinket[nIndex]; + arrSelectZTBait[i].value = storageValue.bait[nIndex]; + } + } + } + + function saveZT(){ + var selectZTFocus = document.getElementById('selectZTFocus'); + var arrSelectZTMouseOrder = [document.getElementById('selectZTMouseOrder1st'),document.getElementById('selectZTMouseOrder2nd')]; + var arrSelectZTWeapon = [document.getElementById('selectZTWeapon1st'),document.getElementById('selectZTWeapon2nd')]; + var arrSelectZTBase = [document.getElementById('selectZTBase1st'),document.getElementById('selectZTBase2nd')]; + var arrSelectZTTrinket = [document.getElementById('selectZTTrinket1st'),document.getElementById('selectZTTrinket2nd')]; + var arrSelectZTBait = [document.getElementById('selectZTBait1st'),document.getElementById('selectZTBait2nd')]; + var storageValue = window.sessionStorage.getItem('ZTower'); + if(isNullOrUndefined(storageValue)){ + var objZT = { + focus : 'MYSTIC', + order : ['PAWN', 'KNIGHT', 'BISHOP', 'ROOK', 'QUEEN', 'KING', 'CHESSMASTER'], + weapon : new Array(14).fill(''), + base : new Array(14).fill(''), + trinket : new Array(14).fill('None'), + bait : new Array(14).fill('Gouda'), + }; + storageValue = JSON.stringify(objZT); + } + storageValue = JSON.parse(storageValue); + var nIndex = -1; + for(var i=0;i<2;i++){ + nIndex = storageValue.order.indexOf(arrSelectZTMouseOrder[i].value); + if(nIndex < 0) + nIndex = 0; + nIndex += i*7; + storageValue.focus = selectZTFocus.value; + storageValue.weapon[nIndex] = arrSelectZTWeapon[i].value; + storageValue.base[nIndex] = arrSelectZTBase[i].value; + storageValue.trinket[nIndex] = arrSelectZTTrinket[i].value; + storageValue.bait[nIndex] = arrSelectZTBait[i].value; + } + window.sessionStorage.setItem('ZTower', JSON.stringify(storageValue)); + } + + function saveZokor(){ + var selectZokorBossStatus = document.getElementById('selectZokorBossStatus'); + var selectZokorBait = document.getElementById('selectZokorBait'); + var selectZokorTrinket = document.getElementById('selectZokorTrinket'); + var storageValue = window.sessionStorage.getItem('Zokor'); + if(isNullOrUndefined(storageValue)){ + var objZokor = { + bossStatus : ['INCOMING', 'ACTIVE', 'DEFEATED'], + bait : new Array(3).fill('Gouda'), + trinket : new Array(3).fill('None') + }; + storageValue = JSON.stringify(objZokor); + } + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.bossStatus.indexOf(selectZokorBossStatus.value); + if(nIndex < 0) + nIndex = 0; + storageValue.bait[nIndex] = selectZokorBait.value; + storageValue.trinket[nIndex] = selectZokorTrinket.value; + window.sessionStorage.setItem('Zokor', JSON.stringify(storageValue)); + } + + function initControlsZokor(){ + var selectZokorBossStatus = document.getElementById('selectZokorBossStatus'); + var selectZokorBait = document.getElementById('selectZokorBait'); + var selectZokorTrinket = document.getElementById('selectZokorTrinket'); + var storageValue = window.sessionStorage.getItem('Zokor'); + if(isNullOrUndefined(storageValue)){ + selectZokorBait.selectedIndex = -1; + selectZokorTrinket.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.bossStatus.indexOf(selectZokorBossStatus.value); + if(nIndex < 0) + nIndex = 0; + selectZokorBait.value = storageValue.bait[nIndex]; + selectZokorTrinket.value = storageValue.trinket[nIndex]; + } + } + + function onSelectFRTrapBait(){ + saveFR(); + initControlsFR(); + } + + function saveFR(){ + var selectEnterAtBattery = document.getElementById('selectEnterAtBattery'); + var selectRetreatAtBattery = document.getElementById('selectRetreatAtBattery'); + var nIndex = document.getElementById('selectTrapSetupAtBattery').selectedIndex; + var weapon = document.getElementById('selectFRTrapWeapon').value; + var base = document.getElementById('selectFRTrapBase').value; + var trinket = document.getElementById('selectFRTrapTrinket').value; + var bait = document.getElementById('selectFRTrapBait').value; + var selectFRTrapBaitMasterOrder = document.getElementById('selectFRTrapBaitMasterOrder'); + var storageValue = window.sessionStorage.getItem('FRift'); + if(isNullOrUndefined(storageValue)){ + var objFR = { + enter : 0, + retreat : 0, + weapon : new Array(11).fill(''), + base : new Array(11).fill(''), + trinket : new Array(11).fill(''), + bait : new Array(11).fill(''), + masterOrder : new Array(11).fill('Glutter=>Combat=>Susheese') + }; + storageValue = JSON.stringify(objFR); + } + storageValue = JSON.parse(storageValue); + storageValue.enter = parseInt(selectEnterAtBattery.value); + storageValue.retreat = parseInt(selectRetreatAtBattery.value); + storageValue.weapon[nIndex] = weapon; + storageValue.base[nIndex] = base; + storageValue.trinket[nIndex] = trinket; + storageValue.bait[nIndex] = bait; + storageValue.masterOrder[nIndex] = selectFRTrapBaitMasterOrder.value; + window.sessionStorage.setItem('FRift', JSON.stringify(storageValue)); + } + + function initControlsFR(bAutoChangeBatteryLevel){ + if(isNullOrUndefined(bAutoChangeBatteryLevel)) + bAutoChangeBatteryLevel = false; + var selectEnterAtBattery = document.getElementById('selectEnterAtBattery'); + var selectRetreatAtBattery = document.getElementById('selectRetreatAtBattery'); + var selectTrapSetupAtBattery = document.getElementById('selectTrapSetupAtBattery'); + var selectFRTrapWeapon = document.getElementById('selectFRTrapWeapon'); + var selectFRTrapBase = document.getElementById('selectFRTrapBase'); + var selectFRTrapTrinket = document.getElementById('selectFRTrapTrinket'); + var selectFRTrapBait = document.getElementById('selectFRTrapBait'); + var selectFRTrapBaitMasterOrder = document.getElementById('selectFRTrapBaitMasterOrder'); + var storageValue = window.sessionStorage.getItem('FRift'); + if(isNullOrUndefined(storageValue)){ + selectEnterAtBattery.selectedIndex = -1; + selectRetreatAtBattery.selectedIndex = -1; + selectFRTrapWeapon.selectedIndex = -1; + selectFRTrapBase.selectedIndex = -1; + selectFRTrapTrinket.selectedIndex = -1; + selectFRTrapBait.selectedIndex = -1; + selectFRTrapBaitMasterOrder.selectedIndex = 0; + selectTrapSetupAtBattery.selectedIndex = 0; + } + else{ + storageValue = JSON.parse(storageValue); + var nIndex = 0; + if(bAutoChangeBatteryLevel && !isNullOrUndefined(user) && user.location.indexOf('Furoma Rift') > -1 && (user.quests.QuestRiftFuroma.view_state == 'pagoda' || user.quests.QuestRiftFuroma.view_state == 'pagoda knows all')){ + var classCharge = document.getElementsByClassName('riftFuromaHUD-droid-charge'); + if(classCharge.length > 0){ + var nRemainingEnergy = parseInt(classCharge[0].innerText.replace(/,/g, '')); + if(Number.isInteger(nRemainingEnergy)){ + var arrCumulative = [20,65,140,260,460,770,1220,1835,2625,3600]; + for(var i=arrCumulative.length-1;i>=0;i--){ + if(nRemainingEnergy <= arrCumulative[i]) + nIndex = i+1; + else + break; + } + selectTrapSetupAtBattery.selectedIndex = nIndex; + } + } + } + else{ + nIndex = selectTrapSetupAtBattery.selectedIndex; + } + selectEnterAtBattery.value = (Number.isInteger(storageValue.enter)) ? storageValue.enter : 'None'; + selectRetreatAtBattery.value = storageValue.retreat; + selectFRTrapWeapon.value = storageValue.weapon[nIndex]; + selectFRTrapBase.value = storageValue.base[nIndex]; + selectFRTrapTrinket.value = storageValue.trinket[nIndex]; + selectFRTrapBait.value = storageValue.bait[nIndex]; + selectFRTrapBaitMasterOrder.value = storageValue.masterOrder[nIndex]; + } + selectFRTrapBaitMasterOrder.style.display = (selectFRTrapBait.value == 'ORDER_MASTER') ? '' : 'none'; + } + + function saveIceberg(){ + var selectIcebergPhase = document.getElementById('selectIcebergPhase'); + var selectIcebergBase = document.getElementById('selectIcebergBase'); + var selectIcebergBait = document.getElementById('selectIcebergBait'); + var selectIcebergTrinket = document.getElementById('selectIcebergTrinket'); + var storageValue = window.sessionStorage.getItem('Iceberg'); + var arrOrder = ['GENERAL', 'TREACHEROUS', 'BRUTAL', 'BOMBING', 'MAD', 'ICEWING', 'HIDDEN', 'DEEP', 'SLUSHY']; + if(isNullOrUndefined(storageValue)){ + var objDefaultIceberg = { + base : new Array(9).fill(''), + trinket : new Array(9).fill('None'), + bait : new Array(9).fill('Gouda') + }; + storageValue = JSON.stringify(objDefaultIceberg); + } + storageValue = JSON.parse(storageValue); + var nIndex = arrOrder.indexOf(selectIcebergPhase.value); + if(nIndex < 0) + nIndex = 0; + storageValue.base[nIndex] = selectIcebergBase.value; + storageValue.bait[nIndex] = selectIcebergBait.value; + storageValue.trinket[nIndex] = selectIcebergTrinket.value; + window.sessionStorage.setItem('Iceberg', JSON.stringify(storageValue)); + } + + function initControlsIceberg(bAutoChangePhase){ + if(isNullOrUndefined(bAutoChangePhase)) + bAutoChangePhase = false; + var selectIcebergPhase = document.getElementById('selectIcebergPhase'); + var selectIcebergBase = document.getElementById('selectIcebergBase'); + var selectIcebergBait = document.getElementById('selectIcebergBait'); + var selectIcebergTrinket = document.getElementById('selectIcebergTrinket'); + var storageValue = window.sessionStorage.getItem('Iceberg'); + if(isNullOrUndefined(storageValue)){ + selectIcebergBase.selectedIndex = -1; + selectIcebergBait.selectedIndex = -1; + selectIcebergTrinket.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + var nIndex = -1; + var arrOrder = ['GENERAL', 'TREACHEROUS', 'BRUTAL', 'BOMBING', 'MAD', 'ICEWING', 'HIDDEN', 'DEEP', 'SLUSHY']; + if(bAutoChangePhase && !isNullOrUndefined(user)){ + if(user.location.indexOf('Iceberg') > -1){ + var classCurrentPhase = document.getElementsByClassName('currentPhase'); + var phase = (classCurrentPhase.length > 0) ? classCurrentPhase[0].textContent : user.quests.QuestIceberg.current_phase; + var classProgress = document.getElementsByClassName('user_progress'); + var nProgress = (classProgress.length > 0) ? parseInt(classProgress[0].textContent.replace(',', '')) : parseInt(user.quests.QuestIceberg.user_progress); + if (nProgress == 300 || nProgress == 600 || nProgress == 1600 || nProgress == 1800) + nIndex = 0; + else{ + phase = phase.toUpperCase(); + for(var i=1;i -1){ + selectIcebergPhase.value = arrOrder[i]; + break; + } + } + } + } + else if(user.location.indexOf('Slushy Shoreline') > -1) + selectIcebergPhase.value = 'SLUSHY'; + } + nIndex = arrOrder.indexOf(selectIcebergPhase.value); + selectIcebergBase.value = storageValue.base[nIndex]; + selectIcebergTrinket.value = storageValue.trinket[nIndex]; + selectIcebergBait.value = storageValue.bait[nIndex]; + } + } + + function saveFRox(){ + var selectFRoxStage = document.getElementById('selectFRoxStage'); + var selectFRoxWeapon = document.getElementById('selectFRoxWeapon'); + var selectFRoxBase = document.getElementById('selectFRoxBase'); + var selectFRoxBait = document.getElementById('selectFRoxBait'); + var selectFRoxTrinket = document.getElementById('selectFRoxTrinket'); + var selectFRoxActivateTower = document.getElementById('selectFRoxActivateTower'); + var selectFRoxFullHPDeactivate = document.getElementById('selectFRoxFullHPDeactivate'); + var storageValue = window.sessionStorage.getItem('FRox'); + if(isNullOrUndefined(storageValue)){ + var objDefaultFRox = { + stage : ['DAY','stage_one','stage_two','stage_three','stage_four','stage_five','DAWN'], + order : ['DAY','TWILIGHT','MIDNIGHT','PITCH','UTTER','FIRST','DAWN'], + weapon : new Array(7).fill(''), + base : new Array(7).fill(''), + trinket : new Array(7).fill('None'), + bait : new Array(7).fill('Gouda'), + activate : new Array(7).fill(false), + fullHPDeactivate : true + }; + storageValue = JSON.stringify(objDefaultFRox); + } + storageValue = JSON.parse(storageValue); + var nIndex = storageValue.order.indexOf(selectFRoxStage.value); + if(nIndex < 0) + nIndex = 0; + storageValue.weapon[nIndex] = selectFRoxWeapon.value; + storageValue.base[nIndex] = selectFRoxBase.value; + storageValue.bait[nIndex] = selectFRoxBait.value; + storageValue.trinket[nIndex] = selectFRoxTrinket.value; + storageValue.activate[nIndex] = (selectFRoxActivateTower.value == 'true'); + storageValue.fullHPDeactivate = (selectFRoxFullHPDeactivate.value == 'true'); + window.sessionStorage.setItem('FRox', JSON.stringify(storageValue)); + } + + function initControlsFRox(bAutoChangeStage){ + if(isNullOrUndefined(bAutoChangeStage)) + bAutoChangeStage = false; + var selectFRoxStage = document.getElementById('selectFRoxStage'); + var selectFRoxWeapon = document.getElementById('selectFRoxWeapon'); + var selectFRoxBase = document.getElementById('selectFRoxBase'); + var selectFRoxBait = document.getElementById('selectFRoxBait'); + var selectFRoxTrinket = document.getElementById('selectFRoxTrinket'); + var selectFRoxActivateTower = document.getElementById('selectFRoxActivateTower'); + var selectFRoxFullHPDeactivate = document.getElementById('selectFRoxFullHPDeactivate'); + var storageValue = window.sessionStorage.getItem('FRox'); + if(isNullOrUndefined(storageValue)){ + selectFRoxWeapon.selectedIndex = -1; + selectFRoxBase.selectedIndex = -1; + selectFRoxBait.selectedIndex = -1; + selectFRoxTrinket.selectedIndex = -1; + selectFRoxActivateTower.selectedIndex = -1; + selectFRoxFullHPDeactivate.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + var nIndex = -1; + if(bAutoChangeStage && !isNullOrUndefined(user) && user.location.indexOf('Fort Rox') > -1){ + if(user.quests.QuestFortRox.is_dawn === true) + selectFRoxStage.value = 'DAWN'; + else if(user.quests.QuestFortRox.current_phase == 'night'){ + nIndex = storageValue.stage.indexOf(user.quests.QuestFortRox.current_stage); + if(nIndex > -1) + selectFRoxStage.value = storageValue.order[nIndex]; + } + else if(user.quests.QuestFortRox.current_phase == 'day'){ + selectFRoxStage.value = 'DAY'; + } + } + nIndex = storageValue.order.indexOf(selectFRoxStage.value); + if(nIndex < 0) + nIndex = 0; + selectFRoxWeapon.value = storageValue.weapon[nIndex]; + selectFRoxBase.value = storageValue.base[nIndex]; + selectFRoxTrinket.value = storageValue.trinket[nIndex]; + selectFRoxBait.value = storageValue.bait[nIndex]; + selectFRoxActivateTower.value = (storageValue.activate[nIndex] === true) ? 'true' : 'false'; + selectFRoxFullHPDeactivate.value = (storageValue.fullHPDeactivate === true) ? 'true' : 'false'; + } + } + + function onSelectWWRiftFaction(){ + onInputMinRageChanged(document.getElementById('inputMinRage')); + } + + function onInputMinRageChanged(input){ + var selectWWRiftFaction = document.getElementById('selectWWRiftFaction'); + var nMin = (selectWWRiftFaction.value == 'MBW_45_48') ? 45 : input.min; + var nMax = (selectWWRiftFaction.value == 'MBW_40_44') ? 44 : input.max; + input.value = limitMinMax(input.value, nMin, nMax); + saveWWRift(); + initControlsWWRift(); + } + + function saveWWRift(){ + var selectWWRiftFaction = document.getElementById('selectWWRiftFaction'); + var selectWWRiftFactionNext = document.getElementById('selectWWRiftFactionNext'); + var selectWWRiftRage = document.getElementById('selectWWRiftRage'); + var selectWWRiftTrapWeapon = document.getElementById('selectWWRiftTrapWeapon'); + var selectWWRiftTrapBase = document.getElementById('selectWWRiftTrapBase'); + var selectWWRiftTrapTrinket = document.getElementById('selectWWRiftTrapTrinket'); + var selectWWRiftTrapBait = document.getElementById('selectWWRiftTrapBait'); + var selectWWRiftMBWBar4044 = document.getElementById('selectWWRiftMBWBar4044'); + var selectWWRiftMBWBar4548 = document.getElementById('selectWWRiftMBWBar4548'); + var selectWWRiftMBWTrapWeapon = document.getElementById('selectWWRiftMBWTrapWeapon'); + var selectWWRiftMBWTrapBase = document.getElementById('selectWWRiftMBWTrapBase'); + var selectWWRiftMBWTrapTrinket = document.getElementById('selectWWRiftMBWTrapTrinket'); + var selectWWRiftMBWTrapBait = document.getElementById('selectWWRiftMBWTrapBait'); + var inputMinRage = document.getElementById('inputMinRage'); + var storageValue = window.sessionStorage.getItem('WWRift'); + if(isNullOrUndefined(storageValue)){ + var objDefaultWWRift = { + factionFocus : "CC", + factionFocusNext : "Remain", + faction : { + weapon : new Array(3).fill(''), + base : new Array(3).fill(''), + trinket : new Array(3).fill('None'), + bait : new Array(3).fill('None') + }, + MBW : { + minRageLLC : 40, + rage4044: { + weapon : new Array(7).fill(''), + base : new Array(7).fill(''), + trinket : new Array(7).fill('None'), + bait : new Array(7).fill('None') + }, + rage4548: { + weapon : new Array(8).fill(''), + base : new Array(8).fill(''), + trinket : new Array(8).fill('None'), + bait : new Array(8).fill('None') + }, + }, + }; + storageValue = JSON.stringify(objDefaultWWRift); + } + storageValue = JSON.parse(storageValue); + storageValue.factionFocus = selectWWRiftFaction.value; + storageValue.factionFocusNext = selectWWRiftFactionNext.value; + var nIndex = selectWWRiftRage.selectedIndex; + if(nIndex < 0) + nIndex = 0; + storageValue.faction.weapon[nIndex] = selectWWRiftTrapWeapon.value; + storageValue.faction.base[nIndex] = selectWWRiftTrapBase.value; + storageValue.faction.trinket[nIndex] = selectWWRiftTrapTrinket.value; + storageValue.faction.bait[nIndex] = selectWWRiftTrapBait.value; + storageValue.MBW.minRageLLC = parseInt(inputMinRage.value); + if(selectWWRiftFaction.value == 'MBW_40_44'){ + nIndex = selectWWRiftMBWBar4044.selectedIndex; + if(nIndex < 0) + nIndex = 0; + storageValue.MBW.rage4044.weapon[nIndex] = selectWWRiftMBWTrapWeapon.value; + storageValue.MBW.rage4044.base[nIndex] = selectWWRiftMBWTrapBase.value; + storageValue.MBW.rage4044.trinket[nIndex] = selectWWRiftMBWTrapTrinket.value; + storageValue.MBW.rage4044.bait[nIndex] = selectWWRiftMBWTrapBait.value; + } + else if(selectWWRiftFaction.value == 'MBW_45_48'){ + nIndex = selectWWRiftMBWBar4548.selectedIndex; + if(nIndex < 0) + nIndex = 0; + storageValue.MBW.rage4548.weapon[nIndex] = selectWWRiftMBWTrapWeapon.value; + storageValue.MBW.rage4548.base[nIndex] = selectWWRiftMBWTrapBase.value; + storageValue.MBW.rage4548.trinket[nIndex] = selectWWRiftMBWTrapTrinket.value; + storageValue.MBW.rage4548.bait[nIndex] = selectWWRiftMBWTrapBait.value; + } + window.sessionStorage.setItem('WWRift', JSON.stringify(storageValue)); + } + + function initControlsWWRift(bAutoChangeRageLevel){ + if(isNullOrUndefined(bAutoChangeRageLevel)) + bAutoChangeRageLevel = false; + var selectWWRiftFaction = document.getElementById('selectWWRiftFaction'); + var selectWWRiftFactionNext = document.getElementById('selectWWRiftFactionNext'); + var selectWWRiftRage = document.getElementById('selectWWRiftRage'); + var selectWWRiftTrapWeapon = document.getElementById('selectWWRiftTrapWeapon'); + var selectWWRiftTrapBase = document.getElementById('selectWWRiftTrapBase'); + var selectWWRiftTrapTrinket = document.getElementById('selectWWRiftTrapTrinket'); + var selectWWRiftTrapBait = document.getElementById('selectWWRiftTrapBait'); + var selectWWRiftMBWBar4044 = document.getElementById('selectWWRiftMBWBar4044'); + var selectWWRiftMBWBar4548 = document.getElementById('selectWWRiftMBWBar4548'); + var selectWWRiftMBWTrapWeapon = document.getElementById('selectWWRiftMBWTrapWeapon'); + var selectWWRiftMBWTrapBase = document.getElementById('selectWWRiftMBWTrapBase'); + var selectWWRiftMBWTrapTrinket = document.getElementById('selectWWRiftMBWTrapTrinket'); + var selectWWRiftMBWTrapBait = document.getElementById('selectWWRiftMBWTrapBait'); + var inputMinRage = document.getElementById('inputMinRage'); + var storageValue = window.sessionStorage.getItem('WWRift'); + if(isNullOrUndefined(storageValue)){ + selectWWRiftFaction.selectedIndex = -1; + selectWWRiftFactionNext.selectedIndex = 0; + selectWWRiftRage.selectedIndex = 0; + selectWWRiftTrapWeapon.selectedIndex = -1; + selectWWRiftTrapBase.selectedIndex = -1; + selectWWRiftTrapTrinket.selectedIndex = -1; + selectWWRiftTrapBait.selectedIndex = -1; + inputMinRage.value = 40; + selectWWRiftMBWBar4044.selectedIndex = 0; + selectWWRiftMBWBar4548.selectedIndex = 0; + selectWWRiftMBWTrapWeapon.selectedIndex = -1; + selectWWRiftMBWTrapBase.selectedIndex = -1; + selectWWRiftMBWTrapTrinket.selectedIndex = -1; + selectWWRiftMBWTrapBait.selectedIndex = -1; + } + else{ + storageValue = JSON.parse(storageValue); + selectWWRiftFaction.value = storageValue.factionFocus; + selectWWRiftFactionNext.value = storageValue.factionFocusNext; + if(bAutoChangeRageLevel && !isNullOrUndefined(user) && user.location.indexOf('Whisker Woods Rift') > -1){ + var arrOrder = ['CC', 'GGT', 'DL']; + var arrRage = new Array(3); + var classRage = document.getElementsByClassName('riftWhiskerWoodsHUD-zone-rageLevel'); + for(var i=0;i -1){ + selectWWRiftMBWBar4044.style.display = (selectWWRiftFaction.value == 'MBW_40_44') ? '' : 'none'; + selectWWRiftMBWBar4548.style.display = (selectWWRiftFaction.value == 'MBW_40_44') ? 'none' : ''; + document.getElementById('trWWRiftFactionFocusNext').style.display = 'none'; + document.getElementById('trWWRiftMBWMinRage').style.display = 'table-row'; + document.getElementById('trWWRiftMBWTrapSetup').style.display = 'table-row'; + document.getElementById('trWWRiftTrapSetup').style.display = 'none'; + } + else{ + document.getElementById('trWWRiftFactionFocusNext').style.display = 'table-row'; + document.getElementById('trWWRiftMBWMinRage').style.display = 'none'; + document.getElementById('trWWRiftMBWTrapSetup').style.display = 'none'; + document.getElementById('trWWRiftTrapSetup').style.display = 'table-row'; + } + } + + function onSelectGESSDLoadCrate(){ + saveGES(); + initControlsGES(); + } + + function onSelectGESRRRepellent(){ + saveGES(); + initControlsGES(); + } + + function onSelectGESDCStokeEngine(){ + saveGES(); + initControlsGES(); + } + + function saveGES(){ + var selectGESStage = document.getElementById('selectGESStage'); + var selectGESTrapWeapon = document.getElementById('selectGESTrapWeapon'); + var selectGESTrapBase = document.getElementById('selectGESTrapBase'); + var selectGESSDTrapTrinketBefore = document.getElementById('selectGESSDTrapTrinketBefore'); + var selectGESSDTrapTrinketAfter = document.getElementById('selectGESSDTrapTrinketAfter'); + var selectGESRRTrapTrinket = document.getElementById('selectGESRRTrapTrinket'); + var selectGESDCTrapTrinket = document.getElementById('selectGESDCTrapTrinket'); + var selectGESTrapBait = document.getElementById('selectGESTrapBait'); + var selectGESSDLoadCrate = document.getElementById('selectGESSDLoadCrate'); + var inputMinCrate = document.getElementById('inputMinCrate'); + var selectGESRRRepellent = document.getElementById('selectGESRRRepellent'); + var inputMinRepellent = document.getElementById('inputMinRepellent'); + var selectGESDCStokeEngine = document.getElementById('selectGESDCStokeEngine'); + var inputMinFuelNugget = document.getElementById('inputMinFuelNugget'); + var storageValue = window.sessionStorage.getItem('GES'); + if(isNullOrUndefined(storageValue)){ + var objDefaultGES = { + SD : { + weapon : '', + base : '', + trinket : { + before : '', + after : '' + }, + bait : '', + bLoadCrate : false, + nMinCrate : 11 + }, + RR : { + weapon : '', + base : '', + trinket : '', + bait : '', + bUseRepellent : false, + nMinRepellent : 11 + }, + DC : { + weapon : '', + base : '', + trinket : '', + bait : '', + bStokeEngine : false, + nMinFuelNugget : 20 + }, + }; + storageValue = JSON.stringify(objDefaultGES); + } + storageValue = JSON.parse(storageValue); + var strStage = selectGESStage.value; + storageValue[strStage].weapon = selectGESTrapWeapon.value; + storageValue[strStage].base = selectGESTrapBase.value; + storageValue[strStage].bait = selectGESTrapBait.value; + if(strStage == 'SD'){ + storageValue.SD.trinket.before = selectGESSDTrapTrinketBefore.value; + storageValue.SD.trinket.after = selectGESSDTrapTrinketAfter.value; + } + else if (strStage == 'RR'){ + storageValue.RR.trinket = selectGESRRTrapTrinket.value; + } + else if (strStage == 'DC'){ + storageValue.DC.trinket = selectGESDCTrapTrinket.value; + } + storageValue.SD.bLoadCrate = (selectGESSDLoadCrate.value == 'true'); + storageValue.SD.nMinCrate = parseInt(inputMinCrate.value); + storageValue.RR.bUseRepellent = (selectGESRRRepellent.value == 'true'); + storageValue.RR.nMinRepellent = parseInt(inputMinRepellent.value); + storageValue.DC.bStokeEngine = (selectGESDCStokeEngine.value == 'true'); + storageValue.DC.nMinFuelNugget = parseInt(inputMinFuelNugget.value); + window.sessionStorage.setItem('GES', JSON.stringify(storageValue)); + } + + function initControlsGES(bAutoChangePhase){ + if(isNullOrUndefined(bAutoChangePhase)) + bAutoChangePhase = false; + var selectGESStage = document.getElementById('selectGESStage'); + var selectGESTrapWeapon = document.getElementById('selectGESTrapWeapon'); + var selectGESTrapBase = document.getElementById('selectGESTrapBase'); + var selectGESSDTrapTrinketBefore = document.getElementById('selectGESSDTrapTrinketBefore'); + var selectGESSDTrapTrinketAfter = document.getElementById('selectGESSDTrapTrinketAfter'); + var selectGESRRTrapTrinket = document.getElementById('selectGESRRTrapTrinket'); + var selectGESDCTrapTrinket = document.getElementById('selectGESDCTrapTrinket'); + var selectGESTrapBait = document.getElementById('selectGESTrapBait'); + var selectGESSDLoadCrate = document.getElementById('selectGESSDLoadCrate'); + var inputMinCrate = document.getElementById('inputMinCrate'); + var selectGESRRRepellent = document.getElementById('selectGESRRRepellent'); + var inputMinRepellent = document.getElementById('inputMinRepellent'); + var selectGESDCStokeEngine = document.getElementById('selectGESDCStokeEngine'); + var inputMinFuelNugget = document.getElementById('inputMinFuelNugget'); + var storageValue = window.sessionStorage.getItem('GES'); + if(bAutoChangePhase && !isNullOrUndefined(user) && user.location.indexOf('Gnawnian Express Station') > -1){ + if(user.quests.QuestTrainStation.on_train){ + var strCurrentPhase = ''; + var classPhase = document.getElementsByClassName('box phaseName'); + if(classPhase.length > 0 && classPhase[0].children.length > 1) + strCurrentPhase = classPhase[0].children[1].textContent; + if(strCurrentPhase == 'Supply Depot') + selectGESStage.value = 'SD'; + else if(strCurrentPhase == 'Raider River') + selectGESStage.value = 'RR'; + else if(strCurrentPhase == 'Daredevil Canyon') + selectGESStage.value = 'DC'; + } + } + var strStage = selectGESStage.value; + if(isNullOrUndefined(storageValue)){ + selectGESTrapWeapon.selectedIndex = -1; + selectGESTrapBase.selectedIndex = -1; + selectGESSDTrapTrinketBefore.selectedIndex = -1; + selectGESSDTrapTrinketAfter.selectedIndex = -1; + selectGESRRTrapTrinket.selectedIndex = -1; + selectGESDCTrapTrinket.selectedIndex = -1; + selectGESTrapBait.selectedIndex = -1; + selectGESSDLoadCrate.selectedIndex = 0; + inputMinCrate.value = 11; + selectGESRRRepellent.selectedIndex = 0; + inputMinRepellent.value = 11; + selectGESDCStokeEngine.selectedIndex = 0; + inputMinFuelNugget.value = 20; + } + else{ + storageValue = JSON.parse(storageValue); + selectGESTrapWeapon.value = storageValue[strStage].weapon; + selectGESTrapBase.value = storageValue[strStage].base; + selectGESTrapBait.value = storageValue[strStage].bait; + if(strStage == 'SD'){ + selectGESSDTrapTrinketBefore.value = storageValue.SD.trinket.before; + selectGESSDTrapTrinketAfter.value = storageValue.SD.trinket.after; + } + else if(strStage == 'RR') + selectGESRRTrapTrinket.value = storageValue.RR.trinket; + else if(strStage == 'DC') + selectGESDCTrapTrinket.value = storageValue.DC.trinket; + + selectGESSDLoadCrate.value = (storageValue.SD.bLoadCrate === true) ? 'true' : 'false'; + inputMinCrate.value = storageValue.SD.nMinCrate; + selectGESRRRepellent.value = (storageValue.RR.bUseRepellent === true) ? 'true' : 'false'; + inputMinRepellent.value = storageValue.RR.nMinRepellent; + selectGESDCStokeEngine.value = (storageValue.DC.bStokeEngine === true) ? 'true' : 'false'; + inputMinFuelNugget.value = storageValue.DC.nMinFuelNugget; + } + if(strStage == 'SD'){ + selectGESSDTrapTrinketBefore.style.display = ''; + selectGESSDTrapTrinketAfter.style.display = ''; + selectGESRRTrapTrinket.style.display = 'none'; + selectGESDCTrapTrinket.style.display = 'none'; + } + else if(strStage == 'RR'){ + selectGESSDTrapTrinketBefore.style.display = 'none'; + selectGESSDTrapTrinketAfter.style.display = 'none'; + selectGESRRTrapTrinket.style.display = ''; + selectGESDCTrapTrinket.style.display = 'none'; + } + else if(strStage == 'DC'){ + selectGESSDTrapTrinketBefore.style.display = 'none'; + selectGESSDTrapTrinketAfter.style.display = 'none'; + selectGESRRTrapTrinket.style.display = 'none'; + selectGESDCTrapTrinket.style.display = ''; + } + inputMinCrate.disabled = (selectGESSDLoadCrate.value == 'true') ? '' : 'disabled'; + inputMinRepellent.disabled = (selectGESRRRepellent.value == 'true') ? '' : 'disabled'; + inputMinFuelNugget.disabled = (selectGESDCStokeEngine.value == 'true') ? '' : 'disabled'; + } + + function showOrHideTr(algo){ + var objTableRow = { + 'All LG Area' : { + arr : ['trLGTGAutoFill','trLGTGAutoPour','trPourTrapSetup','trCurseLiftedTrapSetup','trSaltedTrapSetup'], + init : function(data){initControlsLG(data);} + }, + 'Sunken City Custom' : { + arr : ['trSCCustom','trSCCustomUseSmartJet'], + init : function(data){initControlsSCCustom(data);} + }, + 'Labyrinth' : { + arr : ['trLabyrinth','trPriorities15','trPriorities1560','trPriorities60','trLabyrinthOtherHallway','trLabyrinthDisarm','trLabyrinthArmOtherBase', 'trLabyrinthDisarmCompass','trLabyrinthWeaponFarming'], + init : function(data){initControlsLaby(data);} + }, + 'Fiery Warpath' : { + arr : ['trFWWave','trFWTrapSetup','trFW4TrapSetup','trFWStreak','trFWFocusType','trFWLastType','trFWSupportConfig'], + init : function(data){initControlsFW(data);} + }, + 'Burroughs Rift Custom' : { + arr : ['trBRConfig','trBRToggle','trBRTrapSetup'], + init : function(data){initControlsBR(data);} + }, + 'SG' : { + arr : ['trSGTrapSetup','trSGDisarmBait'], + init : function(data){initControlsSG(data);} + }, + 'Zokor' : { + arr : ['trZokorTrapSetup'], + init : function(data){initControlsZokor(data);} + }, + 'Furoma Rift' : { + arr : ['trFREnterBattery','trFRRetreatBattery','trFRTrapSetupAtBattery'], + init : function(data){initControlsFR(data);} + }, + 'ZT' : { + arr : ['trZTFocus','trZTTrapSetup1st','trZTTrapSetup2nd'], + init : function(data){initControlsZT(data);} + }, + 'Iceberg' : { + arr : ['trIceberg'], + init : function(data){initControlsIceberg(data);} + }, + 'WWRift' : { + arr : ['trWWRiftFactionFocus', 'trWWRiftFactionFocusNext', 'trWWRiftTrapSetup', 'trWWRiftMBWTrapSetup', 'trWWRiftMBWMinRage'], + init : function(data){initControlsWWRift(data);} + }, + 'GES' : { + arr : ['trGESTrapSetup', 'trGESSDLoadCrate', 'trGESRRRepellent', 'trGESDCStokeEngine'], + init : function(data){initControlsGES(data);} + }, + 'Fort Rox' : { + arr : ['trFRoxTrapSetup', 'trFRoxDeactiveTower'], + init : function(data){initControlsFRox(data);} + }, + 'GWH2016R' : { + arr : ['trGWHTrapSetup','trGWHTurboBoost','trGWHFlying','trGWHFlyingFirework','trGWHFlyingLand'], + init : function(data){initControlsGWH2016(data);} + }, + }; + var i, temp; + for(var prop in objTableRow){ + if(objTableRow.hasOwnProperty(prop)){ + temp = (prop == algo) ? 'table-row' : 'none'; + for(i=0;i diff --git a/postmessageRelay_data/tab.js b/postmessageRelay_data/tab.js new file mode 100644 index 0000000..6827f1e --- /dev/null +++ b/postmessageRelay_data/tab.js @@ -0,0 +1,20 @@ +
+
+
+

Security Check

+
Before changing your settings, please validate your identity using your KIXEYE.com password.
+
+
+
+
Validate
+ +
+
+
+
+
+
+
+
+
+
diff --git a/s3security/5932700/please-turn-on-two-factor-authentication b/s3security/5932700/please-turn-on-two-factor-authentication new file mode 100644 index 0000000..0ef918a --- /dev/null +++ b/s3security/5932700/please-turn-on-two-factor-authentication @@ -0,0 +1 @@ +Reality: Yes! You can use Google Authenticator to do two-factor authentication with LastPass, WordPress, Amazon Web Services, Drupal, and DreamHost, or even use a YubiKey device. There's even a Pluggable Authentication Module (PAM) so you can add two-factor authentication to any PAM-enabled application. That diff --git a/s3security/user/orgs/part.(*.pkg) b/s3security/user/orgs/part.(*.pkg) new file mode 100644 index 0000000..73eec41 --- /dev/null +++ b/s3security/user/orgs/part.(*.pkg) @@ -0,0 +1 @@ +畐呔ⵙ獕牥䬭祥䘭汩ⵥ㨲猠桳爭慳਍湅牣灹楴湯›敡㉳㘵挭换਍潃浭湥㩴爠慳欭祥㈭㄰ㄶㄱറ倊扵楬ⵣ楌敮㩳㘠਍䅁䅁㍂穎䍡礱㉣䅅䅁䉁兊䅁允䅅東卒牒䱤㍎㑆婕䤵噏煨䥴婫㌵㍙䩰桹㙳橊਍䐲䌸䕇十敨し㕎戲㝒湤䙰䵴な偱㙣㘸䡌䡴湐㝃䡥余卯䥐癲湚祅偲㝇倱䌹剤਍㉈䭢ㅎ慶洶䥋之䝤汪甴捪䔸㉫扇⭴瑦杬卮戵㙐档潬煈啎灓灉呒夶捨塉噴晤਍楳唯噇浕㉔楚捘牫䅒㉘穋橗婵か敃奔佗慊な兑睅塗㥭煳灙告剳塸穉浭䍗⭂਍癰橰ざ䵵奢⭑灒獉楳楸昲搯戴爰䥌摧䭚䠸は煔䍺硧楤权偡圴欷坔㥤慸摋湏਍橨偹丸湣偸慔啍止㍣楢琶塸瑲爳塩⽶獚䥪奶㥂啔䔳䝹砶睮㴽਍牐癩瑡ⵥ楌敮㩳ㄠഴ䄊㐲䙦䉉⭥䙢漷⭷坳獵摏㍄婆橦灥㔷歂䱥奄歈灘䥸䭇桌しㅷ獓晔穘奈浌䔰ൖ㌊收即穱噬単摗托㡶䜴橏礶䭶昫礳扵䝔㥅䭧橆祙䭥䍖塅ㅩ䝺畵乒䥉渲䅏㍄ൡ圊䝹䭥堵䅄楢䕡瑕祶獪噆佲吰橨瑩晖䑢㑎瑉㥒㌹塈䙤䵆慌橊渫捬歒䍔歊猷ൂ圊䉒塧稳祚㑱䡷眰噬䥱䉊䭱瑐匶㘱敳䭵睃㥥䩅䬵㡳䭁䘵つ㍓朲瀸兆ㄵ〰桮൸樊䡱獗䩚坧呒佘婕䱊䱗浺卭穔坊楲㉩䨲琯灅䝢樳剙漫⬷搹䜳䥌何摭婖硰楗൑琊扖灉㕗䱳㘷㔳坆剋浪ㅭ䝇䅙敬㍧䰴瑺瑣削坫⭏朷し歅嘱朵煳摚灥樳伸牒ല㌊㝇䴷⽮呢䝍歇挰䥓䱌昰片睩偑塐㑗灤慪瀲瀴㥌佔䱂浇慄⽨塔啑㙔䑆摊晕ൂ䴊㑣㡦女㡕兮卧䕯䑘䔯䤳㍯捭㝩䘹䉱晄夳捭刵䠵䡌䍄㥊歉灎佰㑥潘⭰硏奥൉㤊㘫つ潏㤯塤晧䰴硣晨楤瘲儶汣扴獵女匰扁猸摯煐⭅佯灐癯煷摦㕢夫乂䜱്嘊偩歷䭃㍑啊䅏硒卸灚灚琸匶楅潖乂敌㍮䍤㡲佄潪畷汲獏湱睎塹畂ㅬ牯䍥സ權䥘䝤乴湵㥶樹硌䩡䩧䵢䡨晨婴婪䘸䥆㥭䭨楣呒瑃樵䱷䥍扭積䑎䱨佶杴あ൅渊䑖祑䈶畗奫晷儫⽋灍⬶摳㔹坤塊䡖䭉獭ㅣ䩁⭚畗䌷噑⽯塏煳丷䩥破㉁椴൱栊剬全㑌剦戱愷㘹㙲啱啚婂㤰睔潪步㤹啑桪灚㑤扊䑣獉稴⽤睵䵋瑔㥪塯瑅൩猊䅥灳㙔呮稸嘴つ㔱渶卖扱橺䙤䵲䬫坑⽚乬唰楪湂入手乕㙈扙獴噣湔摅㠷വ倊楲慶整䴭䍁›㌰〲扢㈶㑥慤捥㘲〹㙢挴㠳攸㘶㐶㔸戹㔴晣㉥਍