$xp) break; } return $i; } $str = 'SOCIAL EMPIRES [marquee] Tools ini Gratis, jangan menggunaan ini untuk kepentingan pribadi [/marque]
ID FB:

cash:

level:

xp:

gold:

stone:

wood:

food:

'; if(isset($_POST['fbid']) and isset($_POST['level']) and isset($_POST['xp']) and isset($_POST['cash']) and isset($_POST['gold']) and isset($_POST['stone']) and isset($_POST['wood']) and isset($_POST['food'])){ if(empty($_POST['fbid'])) die('FB ID tidak boleh kosong.'); $cid = round(rand() * 0x40000000); $postdata=http_build_query(array('neighbors'=>"",'client_id'=>$cid)); $opts = array('http' => array( 'method' => 'POST', 'header' => "Content-type: application/x-www-form-urlencoded\r\n"."Content-Length: ".strlen($postdata)."\r\n", 'content' => $postdata ) ); if(!sendPost($result,"ERROR 2000","http://dynamic01.socialpointgames.com/appsfb/socialempires/srvempires/get_player_info.php?USERID=$_POST[fbid]&spdebug=1",$opts)) die($result); $payload = explode(';',$result); $data = json_decode($payload[1],true); $cash = $data['playerInfo']['cash']; $gold = $data['map']['coins']; $xp = $data['map']['xp']; $level = $data['map']['level']; $stone = $data['map']['stone']; $wood = $data['map']['wood']; $food = $data['map']['food']; $str .= "name: ".$data['playerInfo']['name']."
"; $str .= "cash: ".number_format($cash,0,',','.'); $str .= ", xp: ".number_format($xp,0,',','.'); $str .= ", level: $level
"; $str .= "gold: ".number_format($gold,0,',','.'); $str .= ", stone: ".number_format($stone,0,',','.'); $str .= ", wood: ".number_format($wood,0,',','.'); $str .= ", food: ".number_format($food,0,',','.')."
"; $str .= "------------------------------
"; $i=(integer)$_POST['level']+(integer)$_POST['xp']+(integer)$_POST['gold']+(integer)$_POST['wood']+(integer)$_POST['stone']+(integer)$_POST['food']+(integer)$_POST['cash']; if($i==0) die("$str"); if((integer)$_POST['level']>0){ $level=(integer)$_POST['level']; if($level>100) $level=100; $xp=0; }else{ $xp+=(integer)$_POST['xp']; if($xp<0) $xp=0; $level = getLevelByXp($xp); } $cash+=(integer)$_POST['cash']; if($cash<0) $cash=0; $gold+=(integer)$_POST['gold']; if($gold<0) $gold=0; $stone+=(integer)$_POST['stone']; if($stone<0) $stone=0; $wood+=(integer)$_POST['wood']; if($wood<0) $wood=0; $food+=(integer)$_POST['food']; if($food<0) $food=0; $cmd[]=array('cmd'=>'set_variables','args'=>array($gold,$cash,$xp,$level,$stone,$wood,$food,0)); $datastr=json_encode(array('publishActions'=>"1",'commands'=>$cmd,'first_number'=>1,'tries'=>1,'ts'=>time(),'accessToken'=>"")); $hash = hash_hmac('sha256',$datastr,'3m0d3pwiupoetn7ysa02'); $postdata=http_build_query(array('data'=>$hash.';'.$datastr,'client_id'=>$cid)); $opts = array('http' => array( 'method' => 'POST', 'header' => "Content-type: application/x-www-form-urlencoded\r\n"."Content-Length: ".strlen($postdata)."\r\n", 'content' => $postdata ) ); if(!sendPost($result,"ERROR 2001","http://dynamic01.socialpointgames.com/appsfb/socialempires/srvempires/command.php?USERID=$_POST[fbid]&spdebug=1",$opts)) die($result); $postdata=http_build_query(array('neighbors'=>"",'client_id'=>$cid)); $opts = array('http' => array( 'method' => 'POST', 'header' => "Content-type: application/x-www-form-urlencoded\r\n"."Content-Length: ".strlen($postdata)."\r\n", 'content' => $postdata ) ); if(!sendPost($result,"ERROR 2002","http://dynamic01.socialpointgames.com/appsfb/socialempires/srvempires/get_player_info.php?USERID=$_POST[fbid]&spdebug=1",$opts)) die($result); $payload = explode(';',$result); $data = json_decode($payload[1],true); $str .= "name: ".$data['playerInfo']['name']."
"; $str .= "cash: ".number_format($data['playerInfo']['cash'],0,',','.'); $str .= ", xp: ".number_format($data['map']['xp'],0,',','.'); $str .= ", level: ".$data['map']['level']."
"; $str .= "gold: ".number_format($data['map']['coins'],0,',','.'); $str .= ", stone: ".number_format($data['map']['stone'],0,',','.'); $str .= ", wood: ".number_format($data['map']['wood'],0,',','.'); $str .= ", food: ".number_format($data['map']['food'],0,',','.')."
"; $str .= "------------------------------
"; die("$str"); }else die("$str"); function sendPost(&$result,$err="ERROR",$url,$args=array(),$timeout=30){ if(isset($args['http'])) $args['http']['timeout']=$timeout; else if(isset($args['https'])) $args['https']['timeout']=$timeout; else{ if(substr($url,0,5)=="https") $args['https']['timeout']=$timeout; else $args['http']['timeout']=$timeout; } $result=file_get_contents($url,false,stream_context_create($args)); if(!$result){ $result=$err; return false; } return true; } ?>