Smiles-War
53
14
cache/frappe.php
<?php
$resultfc = mysql_query("SELECT nom,x,y,jeton,pv,pvmax,pa,pd,XP,type FROM smi_perso where 1 and nom like ".$su." ");
$row = mysql_fetch_array($resultfc);
$nomm = $row[0];
$x = $row["x"];
$y = $row["y"]; $jeton = $row["jeton"];$pv = $row["pv"];$pvmax = $row["pvmax"];$pa = $row["pa"];$xp = $row["XP"];
$pd = $row["pd"];$type = $row["type"];
$resultfc = mysql_query("SELECT nom,x,y,jeton,pv,pa,pd,XP,type FROM smi_perso where 1 and id like ".$k." ");
$row = mysql_fetch_array($resultfc);
$x = $x-$row["x"];
$y = $y-$row["y"]; $nomm = $row[0];
$pvc = $row["pv"];$pac = $row["pa"];$xpc = $row["XP"];
$pdc = $row["pd"];$typec = $row["type"];
$msg.="combat :il vous restait $jeton jetons ";
if ($jeton<=0){$msg.="Plus de jetons revenez dans une heure ";
}else{
if (($x==0)and($y==0))
{
srand((double)microtime()*1000000);
$r1 = rand(1,$pdc/2);
$r2 = rand(1,$pa);
$msg.="Vous frappez ! ";
$degat=$r2-$r1;
if ($degat>0)
{
$msg.="Et infligez $degat points de dégats";
if ($degat>$pvc) {$msg.="Vous le tuez sur le coup et recevez 5 points d XP";
$r1 = rand(1,$taille);
$r2 = rand(1,$taille);
mysql_query("update smi_perso set pv=pvmax,x=$r1,y=$r2 where 1 and nom like ".$nomm." ");
mysql_query("update smi_perso set jeton=jeton-1,XP=XP+5 where 1 and nom like ".$su." ");
mysql_query("INSERT INTO smi_histo (id, perso, act, cible, date) VALUES ( , ".$su." , tue , ".$nomm." , ".$now." )");
mysql_query("INSERT INTO smi_tombo (id, ki, koi, cote) VALUES ( , ".$su." , ".$nomm." , $typec )");
}else{
mysql_query("update smi_perso set pv=pv-$degat where 1 and nom like ".$nomm." ");
mysql_query("update smi_perso set jeton=jeton-1,XP=XP+1 where 1 and nom like ".$su." ");
mysql_query("INSERT INTO smi_histo (id, perso, act, cible, date) VALUES ( , ".$su." , frappe et inflige $degat dégats , ".$nomm." , ".$now." )");
}
}
else {$msg.="à coté...";$resultfc = mysql_query("update smi_perso set jeton=jeton-1 where 1 and nom like ".$su." ");}
}else{$msg.="trop loin pour combattre avec $nomm";}
}
?>
2005-01-12 16:28:51