<script>
function otomatis(){
if(document.getElementById("paket").value == "1"){
document.getElementById("cash").value=3000;
document.getElementById("gold").value=500000;
}else if(document.getElementById("paket").value == "2"){
document.getElementById("cash").value=6000;
document.getElementById("gold").value=1000000;
}else if(document.getElementById("paket").value == "3"){
document.getElementById("cash").value=21000;
document.getElementById("gold").value=1500000;
}else if(document.getElementById("paket").value == "4"){
document.getElementById("cash").value=42000;
document.getElementById("gold").value=3000000;
}else if(document.getElementById("paket").value == "5"){
document.getElementById("cash").value=60000;
document.getElementById("gold").value=5000000;
}else{
document.getElementById("cash").value=0;
document.getElementById("gold").value=0;
}
}
</script>
<body>
<center>
<form method="post">
<p>
<label>FB-ID</label>
<input type="number" name="fbid" class="input-large" placeholder="Masukkan FB-ID" value="<?PHP echo $_POST['fbid']?>"/>
</p>
<p>
<label>UserKey</label>
<input type="number" name="ukey" class="input-large" placeholder="Masukkan UserKey" value="<?PHP echo $_POST['ukey']?>"/>
</p>
<p>
Paket
<select name=paket id=paket onChange="otomatis();" class="uniformselect">
<option value=0 id=0>Select Packet</option>
<option value=1 id=1>3000 Cash & 500K Gold</option>
<option value=2 id=2>6000 Cash & 1M Gold</option>
<option value=3 id=3>21000 Cash & 15M Gold</option>
<option value=4 id=4>42000 Cash & 3M Gold</option>
<option value=5 id=5>60000 Cash & 5M Gold</option>
</select>
</p>
<p>
<label>CASH</label><input type="number" name="cash" id=cash value="<?PHP echo $_POST['cash']?>"/>
<label>GOLD</label><input type="number" name="gold" id=gold value="<?PHP echo $_POST['gold']?>"/>
</p>
<input type="submit" name="proces" value="Proces Now !" />
</form>
<?phpif(isset($_POST['proces']) and isset($_POST['fbid'])){
$jumlah_cash=$_POST['cash'];
$jumlah_gold=$_POST['gold'];
$cid = round(rand() * 0x40000000);
$postdata=array('neighbors'=>"",'client_id'=>$cid);
$result=sendPost("http://dynamic01.socialpointgames.com/appsfb/socialempires/srvempires/get_player_info.php?USERID=$_POST[fbid]&user_key=$_POST[ukey]&spdebug=1",$postdata);
$payload = explode(';',$result);
$data = json_decode($payload[1],true);
$str='';
$str .= "=========BEFORE=========<br/>";
$str .= "FB-ID : ".$data['playerInfo']['pid']."<br/>";
$str .= "=========================<br/>";
$str .= "NAME : ".$data['playerInfo']['name']."<br/>";
$str .= "CASH : ".number_format($data['playerInfo']['cash'],0,',','.')."<br/>";
$str .= "GOLD : ".number_format($data['map']['coins'],0,',','.')."<br/>";
$str .= "=========AFTER=========<br/>";
$cmd[]=array('cmd'=>'tournament_refund_resources','args'=>array('c',$_POST['cash']));
$cmd[]=array('cmd'=>'tournament_refund_resources','args'=>array('g',$_POST['gold']));
$res=sendCommand($_POST['fbid'],$_POST['ukey'],'1.4.05',$cid,$cmd);
//if($res){
$result=sendPost("http://dynamic01.socialpointgames.com/appsfb/socialempires/srvempires/get_player_info.php?USERID=$_POST[fbid]&user_key=$_POST[ukey]&spdebug=1",$postdata);
$payload = explode(';',$result);
$data = json_decode($payload[1],true);
$str .= "FB-ID : ".$data['playerInfo']['pid']."<br/>";
$str .= "=========================<br/>";
$str .= "NAME : ".$data['playerInfo']['name']."<br/>";
$str .= "CASH : ".number_format($data['playerInfo']['cash'],0,',','.')."<br/>";
$str .= "GOLD : ".number_format($data['map']['coins'],0,',','.')."<br/>";
$str .= "=========================<br/>";
//}
echo $str;
}
function sendPost($url,$data=null){
if($data!=null){
$postdata=http_build_query($data);
$opts = array('http' =>
array(
'method' => 'POST',
'timeout' => 30,
'header' => "Content-type: application/x-www-form-urlencoded\r\n"."Content-Length: ".strlen($postdata)."\r\n",
'content' => $postdata
)
);
}else $opts = array('http'=>array('timeout'=>30));
$result=file_get_contents($url,false,stream_context_create($opts));
return $result;
}
function sendCommand($fbid,$ukey,$flash,$cid,$cmd){
$cmd = json_encode(array('publishActions'=>"0",'commands'=>$cmd,'first_number'=>1,'tries'=>1,'ts'=>time()));
$hash = hash_hmac('sha256',$cmd,'3m0d3pwiupoetn7ysa02');
$cmd=array('data'=>$hash.';'.$cmd,'client_id'=>$cid);
$result=sendPost("http://dynamic01.socialpointgames.com/appsfb/socialempires/srvempires/command.php?USERID=$_POST[fbid]&user_key=$_POST[ukey]&spdebug=1",$cmd);
$result = json_decode($result,true);
return $result;
}?>
Senin, 06 Oktober 2014
Script Social Empires ( Edit Sendiri )
Project Ind
Projec Ind (Cerdas)
Diberdayakan oleh Blogger.
Dinamic Project
Dinamic Project


0 komentar:
Posting Komentar