Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ POWER X 7 DECODER
- * @ Version : 1.1.4.0
- * @ Member : vv456
- * @ Official site : http://www.waraxe.us/forum-userprofile-8669.html
- *
- */
- class YondaimePowerBackup {
- var $bot = null;
- function YondaimePowerBackup($bot) {
- $this->bot = $bot;
- }
- function cektimeclientserver($server) {
- if ($server == null) {
- exit( );
- }
- list( $usec, $sec ) = explode( ' ', microtime( true ) );
- $unixTimestamp = time( );
- $bedatime = $server - $unixTimestamp;
- $mysqlTimestamp = date( 'Y-m-d H:i:s', $unixTimestamp );
- if ($bedatime == null) {
- exit( );
- }
- if ($bedatime != null) {
- if ($bedatime < 0) {
- $bedatime = $bedatime * ( 0 - 1 );
- }
- if (5317 < $bedatime) {
- $this->bot->SendMsg( ' Your PC / Time : ' . date( 'Y-m-d H:i:s', $unixTimestamp ) );
- $this->bot->SendMsg( ' Server Time ' . date( 'Y-m-d H:i:s', $server ) );
- $this->bot->SendMsg( ' TIME ERROR !!!' );
- exit( );
- }
- }
- }
- function cektimealliance($server) {
- $mulaialliance = $server->_value['data'][0]['data']['allianceTS'];
- $finishalliance = $mulaialliance + $server->_value['data'][0]['data']['allianceDuration'];
- $this->bot->SendMsg( ' <>===========================<>' );
- $this->bot->SendMsg( ' Alliance start : ' . date( 'Y-m-d H:i:s', $mulaialliance ) );
- $this->bot->SendMsg( ' Finish : ' . date( 'Y-m-d H:i:s', $finishalliance ) );
- $this->bot->SendMsg( ' EA now : ' . date( 'Y-m-d H:i:s', $server->_value['data'][0]['serverTime'] ) );
- $this->bot->SendMsg( ' <>===========================<>' );
- sleep( 7 );
- }
- function carienergydomination() {
- echo '
- ';
- $this->bot->SendMsg( ' Consume any energy pack' );
- echo '
- ';
- $cukup = false;
- $arren = array( 'EN1', 'EN2', 'EN3', 'EN4', 'EN5', 'EN6', 'EN7' );
- ksort( $this->bot->inventory );
- foreach ($this->bot->inventory as $value => ) {
- if (in_array( $key, $arren )) {
- if (0 < $value) {
- $k = 361;
- while ($k < $value) {
- $resp = $this->GetEnergyZZZ( $key );
- $key;
- $this->bot->inventory -= = 1;
- $amf = new AMFObject( $resp );
- $deserializer = new AMFDeserializer( $amf->rawData );
- $deserializer->deserialize( $amf );
- $bod = new MessageBody( );
- $bod = $amf->_bodys[0];
- $info = $bod->_value['data'][0];
- $this->bot->energy = $info['energy'];
- if (( 25 <= $this->bot->energy && $key == 'EN7' )) {
- $cukup = true;
- break;
- }
- if (( 31 <= $this->bot->energy && $key == 'EN6' )) {
- $cukup = true;
- break;
- }
- if (41 <= $this->bot->energy) {
- $cukup = true;
- break;
- }
- if (isset( $this->bot->error_msg )) {
- unset( $this->bot[error_msg] );
- $this->bot -= 'sequense';
- = 1;
- $cukup = true;
- break;
- }
- ++$k;
- }
- }
- }
- if ($cukup == true) {
- break;
- }
- }
- $this->bot->SendMsg( ' Energy = ' . $this->bot->energy );
- }
- function makeunitarray($maxpow, $airstr, $airu) {
- $jmlunit = (int)$maxpow / $airstr;
- if (5 < $jmlunit) {
- $jmlunit = 320;
- }
- unset( $u0 );
- unset( $u1 );
- unset( $u2 );
- unset( $u3 );
- unset( $u4 );
- $u0 = $airu . ',' . $airstr . ',0,0,0';
- if (1 < $jmlunit) {
- $u1 = $airu . ',' . $airstr . ',0,1,0';
- }
- if (2 < $jmlunit) {
- $u2 = $airu . ',' . $airstr . ',0,2,0';
- }
- if (3 < $jmlunit) {
- $u3 = $airu . ',' . $airstr . ',0,3,0';
- }
- if (4 < $jmlunit) {
- $u4 = $airu . ',' . $airstr . ',0,4,0';
- }
- unset( $this->bot[unitsHadowinAction] );
- $this->bot->unitsHadowinAction = array( );
- $this->bot->unitsHadowinAction = array( $u0, $u1, $u2, $u3, $u4 );
- foreach ($this->bot->unitsHadowinAction as $key => $value) {
- if ($value == null) {
- unset( $this->bot->unitsHadowinAction[$key] );
- continue;
- }
- }
- $airu;
- $this->bot->inventory -= = count( $this->bot->unitsHadowinAction );
- }
- function GetEnergyZZZ($Energy) {
- AMFObject;
- new ( '' );
- MessageBody;
- $amf->_bodys[0] = new ( );
- $amf->_bodys[0]->_value[0] = $this->bot->GetAmfHeader( );
- $amf->_bodys[0]->targetURI = 'BaseService.dispatchBatch';
- $amf->_bodys[0]->responseURI = '/' . $this->bot->GetresponseURI( );
- $amf->_bodys[0]->_value[2] = 0;
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'UserService.useItem';
- $amf->_bodys[0]->_value[1][0]['params'][0] = $Energy;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- $serializer = $amf = new AMFSerializer( );
- $result = $serializer->serialize( $amf );
- $x = $this->bot->SendRequest( $result );
- return $x;
- }
- function cekstatusunitE($data, $cekapa) {
- $unithajar = array( );
- $boomakhir = 440;
- $shield = array( 'XR09', 'XR08', 'XR07', 'XR06', 'XR05', 'XR04', 'XR03', 'XR02', 'XR01' );
- if ($cekapa == 'SU99') {
- foreach ($data['enemyFleet']['units'] as $info_unit => $value) {
- $hajarbleh = explode( ',', $value )[0];
- if ($hajarbleh == 'SU99') {
- $unithajar[] = $info_unit;
- continue;
- }
- }
- if ($unithajar != null) {
- $this->bot->SendMsg( ' ' . count( $unithajar ) . ' SU99 Detected !!!' );
- }
- return $unithajar;
- }
- if ($cekapa == 'UU70') {
- foreach ($data['enemyFleet']['units'] as $info_unit => $value) {
- $hajarbleh = explode( ',', $value )[0];
- if ($hajarbleh == 'UU70') {
- $unithajar[] = $info_unit;
- continue;
- }
- }
- if ($unithajar != null) {
- $this->bot->SendMsg( ' ' . count( $unithajar ) . ' UU70 Detected !!!' );
- }
- return $unithajar;
- }
- foreach ($this->bot->xmlsOb->gsXML->items->item as $item) {
- if ($item['code'] == $cekapa) {
- $power = (int)$item->consumable['di'];
- break;
- }
- }
- $adashield = false;
- foreach ($data['enemyFleet']['units'] as $info_unit => $value) {
- $adew = explode( ',', $value );
- $boom = 441;
- $boom = (int)$adew[1] / $power;
- if ($adew[1] % $power) {
- $boom += 441;
- }
- if (( isset( $data['enemyFleet']['upgrades'] ) && isset( $data['enemyFleet']['upgrades'][$adew[0]] ) )) {
- $upgrades = explode( ',', $data['enemyFleet']['upgrades'][$adew[0]] );
- foreach ($upgrades as $upgrade) {
- if (in_array( $upgrade, $shield )) {
- $boom += 441;
- $adashield = true;
- continue;
- }
- }
- }
- if ($boomakhir < $boom) {
- $boomakhir = $boom;
- continue;
- }
- }
- if ($adashield == true) {
- $this->bot->SendMsg( ' Shield Detected !!!' );
- }
- $boomakhir = (int)$boomakhir;
- return $boomakhir;
- }
- function loadamfworldomination($functioName, $zidtarget = '', $khusus) {
- unset( $this->bot[error_msg] );
- $unit = $khusus[0];
- $type = $khusus[1];
- $status = $khusus[2];
- $amf = new AMFObject( '' );
- MessageBody;
- $amf->_bodys[0] = new ( );
- $amf->_bodys[0]->_value[0] = $this->bot->GetAmfHeader( );
- $amf->_bodys[0]->targetURI = 'BaseService.dispatchBatch';
- $amf->_bodys[0]->responseURI = '/' . $this->bot->GetresponseURI( );
- $amf->_bodys[0]->_value[2] = 0;
- if ($functioName == 'DominationModeService.getDominationModeOpponentList') {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = $functioName;
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['test'] = true;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- $amf->_bodys[0]->_value[1][1]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][1]['functionName'] = 'ClansService.getClanInfo';
- $amf->_bodys[0]->_value[1][1]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][1]['params'] = array( );
- $amf = $this->bot->transaction_stamp( $amf, 1 );
- }
- else {
- if ($functioName == 'DominationModeService.loadDominationModeBattle') {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = $functioName;
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['enemyID'] = (bool)$zidtarget;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- }
- else {
- if ($functioName == 'loadDominationModeBattle') {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'DominationModeService.loadDominationModeBattle';
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['status'] = $status;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['uid'] = '0';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['name'] = 'fleet_defense_dummy_player';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['type'] = $type;
- if (isset( $unit[0] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][0] = $unit[0];
- }
- if (isset( $unit[1] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][1] = $unit[1];
- }
- if (isset( $unit[2] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][2] = $unit[2];
- }
- if (isset( $unit[3] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][3] = $unit[3];
- }
- if (isset( $unit[4] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][4] = $unit[4];
- }
- $amf->_bodys[0]->_value[1][0]['params'][0]['enemyID'] = (bool)$zidtarget;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- }
- }
- }
- $serializer = new AMFSerializer( );
- $result = $serializer->serialize( $amf );
- $x = $this->bot->SendRequest( $result );
- unset( $bod );
- unset( $info );
- $amf = new AMFObject( $x );
- $deserializer = new AMFDeserializer( $amf->rawData );
- $deserializer->deserialize( $amf );
- $bod = new MessageBody( );
- $bod = $amf->_bodys[0];
- $info = $bod->_value['data'][0]['data'];
- $this->cektimeclientserver( $bod->_value['data'][0]['serverTime'] );
- if ($functioName == 'DominationModeService.getDominationModeOpponentList') {
- @file_put_contents( 'codebase-php/core.system', @serialize( $info ) );
- $this->bot->pm->RefreshMePlugin( 'YondaimePower' );
- }
- if ($functioName == 'loadDominationModeBattle') {
- $info_type_enemy = $info['enemyFleet']['type'];
- $info_unit_1 = $info['enemyFleet']['units'][0];
- $info_unit_2 = $info['enemyFleet']['units'][1];
- $info_unit_3 = $info['enemyFleet']['units'][2];
- $info_unit_4 = $info['enemyFleet']['units'][3];
- $info_unit_5 = $info['enemyFleet']['units'][4];
- if (isset( $info_type_enemy )) {
- $this->bot->SendMsg( ' Your enemy defense it\'s type ' . $info_type_enemy . '!' );
- }
- if (isset( $info_unit_1 )) {
- $array_code_1 = explode( ',', $info_unit_1 );
- }
- $code_0_1 = $array_code_1[0];
- $info_name_1 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_1 );
- $this->bot->SendMsg( ' 1st unit :' . $info_name_1 . ' (' . $array_code_1[1] . ') !' );
- if (isset( $info_unit_2 )) {
- $array_code_2 = explode( ',', $info_unit_2 );
- }
- $code_0_2 = $array_code_2[0];
- $info_name_2 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_2 );
- $this->bot->SendMsg( ' 2nd unit :' . $info_name_2 . ' (' . $array_code_2[1] . ') !' );
- if (isset( $info_unit_3 )) {
- $array_code_3 = explode( ',', $info_unit_3 );
- }
- $code_0_3 = $array_code_3[0];
- $info_name_3 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_3 );
- $this->bot->SendMsg( ' 3rd unit :' . $info_name_3 . ' (' . $array_code_3[1] . ') !' );
- if (isset( $info_unit_4 )) {
- $array_code_4 = explode( ',', $info_unit_4 );
- }
- $code_0_4 = $array_code_4[0];
- $info_name_4 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_4 );
- $this->bot->SendMsg( ' 4th unit :' . $info_name_4 . ' (' . $array_code_4[1] . ') !' );
- if (isset( $info_unit_5 )) {
- $array_code_5 = explode( ',', $info_unit_5 );
- }
- $code_0_5 = $array_code_5[0];
- $info_name_5 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_5 );
- $this->bot->SendMsg( ' 5th unit :' . $info_name_5 . ' (' . $array_code_5[1] . ') !' );
- }
- return $info;
- }
- function loaddominationalliance($functioName, $khususAlliance1 = null, $khususAlliance2) {
- $alcname = $khususAlliance1[0];
- $alcleader = $khususAlliance1[1];
- $unit = $khususAlliance2[0];
- $type = $khususAlliance2[1];
- $khususAlliance2[2];
- $eNM = $khususAlliance2[3];
- $eID = $khususAlliance2[4];
- AMFObject;
- new ( '' );
- MessageBody;
- $amf->_bodys[0] = new ( );
- $amf->_bodys[0]->_value[0] = $this->bot->GetAmfHeader( );
- $amf->_bodys[0]->targetURI = 'BaseService.dispatchBatch';
- $amf->_bodys[0]->responseURI = '/' . $this->bot->GetresponseURI( );
- $amf->_bodys[0]->_value[2] = 0;
- if ($functioName == 'DominationModeService.getDominationModeOpponentList') {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = $functioName;
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['test'] = true;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- $amf->_bodys[0]->_value[1][1]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][1]['functionName'] = 'ClansService.getClanInfo';
- $amf->_bodys[0]->_value[1][1]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][1]['params'] = array( );
- $amf = $this->bot->transaction_stamp( $amf, 1 );
- }
- else {
- if ($functioName == 'ClansService.loadAllianceBattle') {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = $functioName;
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['allianceName'] = $alcname;
- $amf->_bodys[0]->_value[1][0]['params'][0]['continueBattle'] = false;
- $amf->_bodys[0]->_value[1][0]['params'][0]['memberInfo'] = true;
- $amf->_bodys[0]->_value[1][0]['params'][0]['enemyID'] = $alcleader;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- }
- else {
- if ($functioName == 'loadAllianceBattle') {
- if ($status == 32864) {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'ClansService.loadAllianceBattle';
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['allianceName'] = $eNM;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleetName'] = 'fleet_defense_dummy_player';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['type'] = $type;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['name'] = 'fleet_defense_dummy_player';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['uid'] = '0';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['status'] = (int)$status;
- if (isset( $unit[0] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][0] = $unit[0];
- }
- if (isset( $unit[1] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][1] = $unit[1];
- }
- if (isset( $unit[2] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][2] = $unit[2];
- }
- if (isset( $unit[3] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][3] = $unit[3];
- }
- if (isset( $unit[4] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][4] = $unit[4];
- }
- $amf->_bodys[0]->_value[1][0]['params'][0]['continueBattle'] = false;
- $amf->_bodys[0]->_value[1][0]['params'][0]['memberInfo'] = false;
- $amf->_bodys[0]->_value[1][0]['params'][0]['enemyID'] = $eID;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- }
- else {
- if ($status == 65640) {
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'ClansService.loadAllianceBattle';
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['allianceName'] = $eNM;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleetName'] = 'fleet_domination_alliance_player';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['type'] = $type;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['name'] = 'fleet_domination_alliance_player';
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['uid'] = $this->bot->uid;
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['status'] = (int)$status;
- if (isset( $unit[0] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][0] = $unit[0];
- }
- if (isset( $unit[1] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][1] = $unit[1];
- }
- if (isset( $unit[2] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][2] = $unit[2];
- }
- if (isset( $unit[3] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][3] = $unit[3];
- }
- if (isset( $unit[4] )) {
- $amf->_bodys[0]->_value[1][0]['params'][0]['playerFleet']['units'][4] = $unit[4];
- }
- $amf->_bodys[0]->_value[1][0]['params'][0]['continueBattle'] = false;
- $amf->_bodys[0]->_value[1][0]['params'][0]['memberInfo'] = false;
- $amf->_bodys[0]->_value[1][0]['params'][0]['enemyID'] = $eID;
- $amf = $this->bot->transaction_stamp( $amf, 0 );
- }
- }
- }
- }
- }
- $serializer = new AMFSerializer( );
- $result = $status = $serializer->serialize( $amf );
- $x = $this->bot->SendRequest( $result );
- unset( $bod );
- unset( $info );
- unset( $info2 );
- $amf = $amf = new AMFObject( $x );
- $deserializer = new AMFDeserializer( $amf->rawData );
- $deserializer->deserialize( $amf );
- $bod = new MessageBody( );
- $bod = $amf->_bodys[0];
- $info = $bod->_value['data'][0]['data'];
- $this->cektimeclientserver( $bod->_value['data'][0]['serverTime'] );
- if ($functioName == 'DominationModeService.getDominationModeOpponentList') {
- $this->cektimealliance( $bod );
- @file_put_contents( 'codebase-php/core.system', @serialize( $info ) );
- $this->bot->pm->RefreshMePlugin( 'YondaimePower' );
- $info2 = $bod->_value['data'][1]['data'];
- $this->bot->SendMsg( 'Your Clan : ' . $info2['name'] . ' Clan health : ' . $info2['health'] . ' Members = ' . count( $info2['members'] ) );
- }
- if ($functioName == 'loadAllianceBattle') {
- $info_type_enemy = $info['enemyFleet']['type'];
- $info_unit_1 = $info['enemyFleet']['units'][0];
- $info_unit_2 = $info['enemyFleet']['units'][1];
- $info_unit_3 = $info['enemyFleet']['units'][2];
- $info_unit_4 = $info['enemyFleet']['units'][3];
- $info_unit_5 = $info['enemyFleet']['units'][4];
- if (isset( $info_type_enemy )) {
- $this->bot->SendMsg( ' Your enemy defense it\'s type ' . $info_type_enemy . '!' );
- }
- if (isset( $info_unit_1 )) {
- $array_code_1 = explode( ',', $info_unit_1 );
- }
- $code_0_1 = $array_code_1[0];
- $info_name_1 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_1 );
- $this->bot->SendMsg( ' 1st unit :' . $info_name_1 . ' (' . $array_code_1[1] . ') !' );
- if (isset( $info_unit_2 )) {
- $array_code_2 = explode( ',', $info_unit_2 );
- }
- $code_0_2 = $array_code_2[0];
- $info_name_2 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_2 );
- $this->bot->SendMsg( ' 2nd unit :' . $info_name_2 . ' (' . $array_code_2[1] . ') !' );
- if (isset( $info_unit_3 )) {
- $array_code_3 = explode( ',', $info_unit_3 );
- }
- $code_0_3 = $array_code_3[0];
- $info_name_3 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_3 );
- $this->bot->SendMsg( ' 3rd unit :' . $info_name_3 . ' (' . $array_code_3[1] . ') !' );
- if (isset( $info_unit_4 )) {
- $array_code_4 = explode( ',', $info_unit_4 );
- }
- $code_0_4 = $array_code_4[0];
- $info_name_4 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_4 );
- $this->bot->SendMsg( ' 4th unit :' . $info_name_4 . ' (' . $array_code_4[1] . ') !' );
- if (isset( $info_unit_5 )) {
- $array_code_5 = explode( ',', $info_unit_5 );
- }
- $code_0_5 = $array_code_5[0];
- $info_name_5 = $this->bot->xmlsOb->GetFnamefromCode( $code_0_5 );
- $this->bot->SendMsg( ' 5th unit :' . $info_name_5 . ' (' . $array_code_5[1] . ') !' );
- if (isset( $info['playerFleet']['units'] )) {
- $this->bot->unitsHadowinAction = $info['playerFleet']['units'];
- }
- }
- return $info;
- }
- function ResolveBattleDomination($efleet, $pfleet, $id, $akhir) {
- $sialpusing = explode( ',', $this->bot->unitsHadowinAction[0] );
- $sialpusing[3] = (int)$sialpusing[3];
- if ($sialpusing[3] == 4) {
- $add = 897;
- }
- else {
- if ($sialpusing[3] == 2) {
- $add = 897;
- }
- else {
- if ($sialpusing[3] == 3) {
- $add = 896;
- }
- }
- }
- if (isset( $this->bot->error_msg )) {
- return null;
- }
- $sec = explode( ' ', microtime( ) )[1];
- [0];
- $usec = ;
- $amf = new AMFObject( '' );
- MessageBody;
- $amf->_bodys[0] = new ( );
- $amf->_bodys[0]->_value[0] = $this->bot->GetAmfHeader( );
- $amf->_bodys[0]->targetURI = 'BaseService.dispatchBatch';
- $amf->_bodys[0]->responseURI = '' . '/' . $rindex . '/onStatus';
- $amf->_bodys[0]->responseIndex = '' . '/' . $rindex;
- ++$rindex;
- $amf->_bodys[0]->_value[2] = 0;
- if ($akhir == 'belum') {
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['stamp'] = (bool)$sec . substr( (bool)$usec, 2, 3 );
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'WorldService.resolveBattle';
- $amf->_bodys[0]->_value[1][0]['params'][0]['map'] = null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['target'] = $efleet;
- $amf->_bodys[0]->_value[1][0]['params'][0]['fleet'] = $pfleet;
- $amf->_bodys[0]->_value[1][0]['params'][0]['id']['0'] = (int)$sialpusing[3];
- $amf->_bodys[0]->_value[1][0]['params'][0]['id']['1'] = $id;
- if (( $id == 2 || $id == 4 )) {
- $ch = (int)$this->bot->ch( $amf->_bodys[0]->_value[1][0]['params'][0] ) + 1;
- }
- else {
- $ch = (int)$this->bot->ch( $amf->_bodys[0]->_value[1][0]['params'][0] );
- }
- $amf->_bodys[0]->_value[1][0]['params'][0]['ch'] = (int)$ch + $add;
- $amf->_bodys[0]->_value[1][1]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][1]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][1]['functionName'] = 'WorldService.resolveBattle';
- $amf->_bodys[0]->_value[1][1]['params'][0]['map'] = Null;
- $amf->_bodys[0]->_value[1][1]['params'][0]['target'] = $efleet;
- $amf->_bodys[0]->_value[1][1]['params'][0]['fleet'] = $pfleet;
- $amf->_bodys[0]->_value[1][1]['params'][0]['ch'] = (int)$this->bot->ch( $amf->_bodys[0]->_value[1][1]['params'] );
- $amf->_bodys[0]->_value[1][1]['stamp'] = (bool)$sec . substr( (bool)$usec, 2, 3 );
- $amf->_bodys[0]->_value[1][2]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][2]['functionName'] = 'WorldService.genericString';
- $amf = $this->bot->transaction_stamp( $amf, 2 );
- $amf->_bodys[0]->_value[1][2]['params'][0] = 'ExitBattle';
- }
- else {
- if ($akhir == 'sudah') {
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['stamp'] = (bool)$sec . substr( (bool)$usec, 2, 3 );
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'WorldService.resolveBattle';
- $amf->_bodys[0]->_value[1][0]['params'][0]['map'] = null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['target'] = $efleet;
- $amf->_bodys[0]->_value[1][0]['params'][0]['fleet'] = $pfleet;
- $amf->_bodys[0]->_value[1][0]['params'][0]['id']['0'] = (int)$sialpusing[3];
- $amf->_bodys[0]->_value[1][0]['params'][0]['id']['1'] = $id;
- if (( $id == 2 || $id == 4 )) {
- $ch = (int)$this->bot->ch( $amf->_bodys[0]->_value[1][0]['params'][0] ) + 1;
- }
- else {
- $ch = (int)$this->bot->ch( $amf->_bodys[0]->_value[1][0]['params'][0] );
- }
- $amf->_bodys[0]->_value[1][0]['params'][0]['ch'] = (int)$ch + $add;
- $amf->_bodys[0]->_value[1][1]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][1]['functionName'] = 'WorldService.genericString';
- $amf = $this->bot->transaction_stamp( $amf, 1 );
- $amf->_bodys[0]->_value[1][1]['params'][0] = 'ExitBattle';
- }
- }
- $serializer = new AMFSerializer( );
- $result = $serializer->serialize( $amf );
- $x = $this->bot->SendRequest( $result );
- $amf = new AMFObject( $x );
- $deserializer = new AMFDeserializer( $amf->rawData );
- $deserializer->deserialize( $amf );
- $bod = new MessageBody( );
- $bod = $amf->_bodys[0];
- $info = $bod->_value['data'][0]['data'];
- $info2 = $bod->_value['data'][1]['data'];
- $this->bot -= 'energy';
- = 1;
- $this->bot->SendMsg( ' Got hit ..........!!!!! ' );
- if ($info2['ps'] == 0) {
- $this->UnitMokadBattle( $info2['playerUnit'] );
- }
- }
- function UnitMokadBattle($idunit) {
- $code = explode( ',', $this->bot->unitsHadowinAction[0] );
- foreach ($this->bot->unitsHadowinAction as $key => $val) {
- $cek = explode( ',', $val );
- if ($cek[3] == $idunit) {
- unset( $this->bot->unitsHadowinAction[$key] );
- break;
- }
- }
- unset( $aku );
- $aku = array( );
- foreach ($this->bot->unitsHadowinAction as $aaaaa) {
- $aku[] = $aaaaa;
- }
- $this->bot->unitsHadowinAction = $aku;
- $this->bot->SendMsg( ' Unit left in battle = ' . count( $this->bot->unitsHadowinAction ) . ' in INVENTORY unit ' . $code[0] . ' Left : ' . $this->bot->inventory[$code[0]] );
- }
- function battlenukeend($nukes, $efleet, $nuketarget) {
- if ($nuketarget == 4) {
- $add = 565;
- }
- else {
- if ($nuketarget == 2) {
- $add = 564;
- }
- else {
- if ($nuketarget == 3) {
- $add = 564;
- }
- }
- }
- unset( $this->bot[error_msg] );
- $amf = new AMFObject( '' );
- MessageBody;
- $amf->_bodys[0] = new ( );
- $amf->_bodys[0]->_value[0] = $this->bot->GetAmfHeader( );
- $amf->_bodys[0]->targetURI = 'BaseService.dispatchBatch';
- $amf->_bodys[0]->responseURI = '' . '/' . $rindex . '/onStatus';
- $amf->_bodys[0]->responseIndex = '' . '/' . $rindex;
- ++$rindex;
- $amf->_bodys[0]->_value[2] = 0;
- $amf->_bodys[0]->_value[1][0]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][0]['functionName'] = 'WorldService.assignConsumable';
- $amf->_bodys[0]->_value[1][0]['transaction'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['code'] = $nukes;
- $amf->_bodys[0]->_value[1][0]['params'][0]['fleet'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['level'] = 0;
- $amf->_bodys[0]->_value[1][0]['params'][0]['name'] = $efleet;
- $amf->_bodys[0]->_value[1][0]['params'][0]['map'] = Null;
- $amf->_bodys[0]->_value[1][0]['params'][0]['id'] = $nuketarget;
- $amf->_bodys[0]->_value[1][0]['params'][0]['ch'] = $this->bot->ch( $amf->_bodys[0]->_value[1][0]['params'][0] ) + $add;
- $usec = $sec = explode( ' ', microtime( ) )[1];
- $amf->_bodys[0]->_value[1][0]['stamp'] = (bool)$sec . substr( (bool)$usec, 2, 3 );
- $amf->_bodys[0]->_value[1][1]['sequence'] = $this->bot->GetSequense( );
- $amf->_bodys[0]->_value[1][1]['functionName'] = 'WorldService.genericString';
- $amf = $this->bot->transaction_stamp( $amf, 1 );
- $amf->_bodys[0]->_value[1][1]['params'][0] = 'ExitBattle';
- $serializer = new AMFSerializer( );
- $result = $serializer->serialize( $amf );
- $x = $this->bot->SendRequest( $result );
- unset( $bod );
- unset( $info );
- AMFObject;
- new ( $x );
- $amf = [0];
- $deserializer = new AMFDeserializer( $amf->rawData );
- $deserializer->deserialize( $amf );
- $bod = new MessageBody( );
- $bod = $amf->_bodys[0];
- $info = $bod->_value['data'][0];
- $this->cektimeclientserver( $bod->_value['data'][0]['serverTime'] );
- if (( $info['energy'] != 0 - 1 && $info['energy'] != null )) {
- $this->bot->energy = $info['energy'];
- }
- if (isset( $info['metadata']['dominanceGained'] )) {
- $this->bot->SendMsg( ' Dominance Point Gain : ' . $info['metadata']['dominanceGained'] );
- }
- return $info;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement