paciek |
Król |
|
|
Dołączył: 17 Wrz 2005 |
Posty: 7 |
Przeczytał: 0 tematów
Ostrzeżeń: 0/20
|
|
|
|
|
|
|
|
Brakuje nam teraz takich rzeczy:
Arena Walk na Potwory
Resetów
Oto kod do Areny Walk jeśli ktoś jąumie zmodyfikowaćna poczeby prosze ją tu umieścić z góry dzięki nie obejdzie się beżnagrody.:
Kod: | <?php $title = "Arena Walk"; include("header.php"); ?>
<?
global $stat;
global $enemy;
global $myarm;
global $mywep;
global $earm;
global $ewep;
?>
<?php
function attack() {
global $stat;
global $enemy;
global $myarm;
global $mywep;
global $earm;
global $ewep;
$repeat = ($stat[agility] / $enemy[agility]);
$attackstr = ceil($repeat);
if ($attackstr <= 0) {
$attackstr = 1;
}
$mypower = ($mywep[power] + $stat[strength]);
$epower = ($enemy[strength] + $earm[power]);
$attackdmg = ($mypower - $epower);
if ($attackdmg <= 0) {
$attackdmg = 1;
}
$round = 1;
while ($round <= $attackstr && $enemy[hp] >= 0) {
$enemy[hp] = ($enemy[hp] - $attackdmg);
print "<b>$stat[user]</b> attacks <b>$enemy[user]</b> for <b>$attackdmg</b> damage! ($enemy[hp] left)<br>";
$round = ($round + 1);
}
if ($enemy[hp] <= 0) {
$enemy[hp] = 0;
print "<br><b>$stat[user]</b> wygrał !<br>";
$expgain = (rand(5,10) * $enemy[level]);
$creditgain = ($enemy[credits] / 10);
print "<b>$stat[user]</b> have gained <b>$expgain</b> EXP and <b>$creditgain</b> cash.<br>";
mysql_query("update players set hp=$stat[hp] where id=$stat[id]");
mysql_query("update players set hp=0 where id=$enemy[id]");
mysql_query("update players set exp=exp+$expgain where id=$stat[id]");
mysql_query("update players set credits=credits+$creditgain where id=$stat[id]");
mysql_query("update players set wins=wins+1 where id=$stat[id]");
mysql_query("update players set losses=losses+1 where id=$enemy[id]");
mysql_query("update players set lastkilled='$enemy[user]' where id=$stat[id]");
mysql_query("update players set lastkilledby='$stat[user]' where id=$enemy[id]");
$texp = ($stat[exp] + $expgain);
$expn = (($stat[level] * 50) + ($stat[level] * 15));
if ($texp >= $expn) {
print "<b>$stat[user]</b> gained a level! +3 AP and +1 Level.";
mysql_query("update players set ap=ap+3 where id=$stat[id]");
mysql_query("update players set level=level+1 where id=$stat[id]");
mysql_query("update players set exp=0 where id=$stat[id]");
mysql_query("insert into log (owner, log) values($stat[id],'During a fight with <b>$enemy[user]</b>, you gained a level.')");
}
mysql_query("insert into log (owner, log) values($stat[id],'Pokonałe¶ <b>$enemy[user]</b>. Zgarnąłe¶ <b>$expgain</b> EXP i <b>$creditgain</b> kasy.')");
mysql_query("insert into log (owner, log) values($enemy[id],'Przegrałe¶ z <b>$stat[user]</b>.')");
include("footer.php");
exit;
} else {
attackback();
}
}
function attackback() {
global $stat;
global $enemy;
global $myarm;
global $mywep;
global $earm;
global $ewep;
$repeat = ($enemy[agility] / $stat[agility]);
$attackstr = ceil($repeat);
if ($attackstr <= 0) {
$attackstr = 1;
}
$mypower = ($mywep[power] + $stat[strength]);
$epower = ($enemy[strength] + $earm[power]);
$attackdmg = ($epower - $mypower);
if ($attackdmg <= 0) {
$attackdmg = 1;
}
$round = 1;
while ($round <= $attackstr && $stat[hp] >= 0) {
$stat[hp] = ($stat[hp] - $attackdmg);
print "<b>$enemy[user]</b> attacks <b>$stat[user]</b> for <b>$attackdmg</b> damage! ($stat[hp] left)<br>";
$round = ($round + 1);
}
if ($stat[hp] <= 0) {
print "<br><b>$enemy[user]</b> wygrał!<br>";
$expgain = (rand(5,10) * $stat[level]);
$creditgain = ($enemy[credits] / 10);
print "<b>$enemy[user]</b> have gained <b>$expgain</b> EXP and <b>$creditgain</b> cash.<br>";
mysql_query("update players set hp=$enemy[hp] where id=$enemy[id]");
mysql_query("update players set hp=0 where id=$stat[id]");
mysql_query("update players set exp=exp+$expgain where id=$enemy[id]");
mysql_query("update players set credits=credits+$creditgain where id=$enemy[id]");
mysql_query("update players set wins=wins+1 where id=$enemy[id]");
mysql_query("update players set losses=losses+1 where id=$stat[id]");
mysql_query("update players set lastkilled='$stat[user]' where id=$enemy[id]");
mysql_query("update players set lastkilledby='$enemy[user]' where id=$stat[id]");
$texp = ($enemy[exp] + $expgain);
$expn = (($enemy[level] * 50) + ($enemy[level] * 15));
if ($texp >= $expn) {
print "<b>$enemy[user]</b> gained a level! +3 AP and +1 Level.";
mysql_query("update players set ap=ap+3 where id=$enemy[id]");
mysql_query("update players set level=level+1 where id=$enemy[id]");
mysql_query("update players set exp=0 where id=$enemy[id]");
mysql_query("insert into log (owner, log) values($enemy[id],'During a fight with <b>$stat[user]</b>, you gained a level.')");
}
mysql_query("insert into log (owner, log) values($enemy[id],'Pokonałe¶<b>$stat[user]</b>. Zgarnąłe¶ <b>$expgain</b> EXP i <b>$creditgain</b> kasy.')");
mysql_query("insert into log (owner, log) values($stat[id],'Przegrałe¶ z <b>$enemy[user]</b>.')");
include("footer.php");
exit;
} else {
attack();
}
}
?>
<?php
if (!$action && !$battle) {
print "Witam cię na Arenie Walk<br><br>
- <a href=battle.php?action=levellist>Pokaż mi listę osób na danych poziomach.</a>.<br>
- <a href=battle.php?action=showalive>Chcę walczyć z osobami na tym samym poziomie, co ja...</a>.<br>";
}
if ($action == showalive) {
print "Pokaż wszystkich żywych na poziomie $stat[level]...<br><br>";
print "<table><tr><td width=20><b><u>ID</td><td width=100><b><u>Name</td><td width=100><b><u>Rank</td><td width=20><b><u>Tribe</td><td width=60><b><u>Options</td></tr>";
$esel = mysql_query("select * from players where level=$stat[level] and hp>0 limit 50 ");
while ($elist = mysql_fetch_array($esel)) {
print "<tr><td>$elist[id]</td><td><a href=view.php?view=$elist[id]>$elist[user]</a><td>$elist[rank]</td><td>$elist[tribe]</td></td><td>- <A href=battle.php?battle=$elist[id]>Attack</a></td></tr>";
}
print "</table><br>";
print "Możesz zawsze zawrócić... <a href=battle.php>wróć</a>.";
}
if ($action == levellist) {
print "<form method=post action=battle.php?action=levellist&step=go>";
print "Pokaż żywych na poziomie <select name=slevel>";
for ($i = 1; $i < 100; ++$i) {
print "<option value=$i>Level $i</option>";
}
print "</select> <input type=submit value=Go></form>";
if ($step == go) {
print "<table><tr><td width=20><b><u>ID</td><td width=100><b><u>Name</td><td width=100><b><u>Rank</td><td width=20><b><u>Tribe</td><td width=60><b><u>Options</td></tr>";
$esel = mysql_query("select * from players where level=$slevel and hp>0 limit 50");
while ($elist = mysql_fetch_array($esel)) {
print "<tr><td>$elist[id]</td><td><a href=view.php?view=$elist[id]>$elist[user]</a></td><td>$elist[rank]</td><td>$elist[tribe]</td<td>- <A href=battle.php?battle=$elist[id]>Attack</a></td></tr>";
}
print "</table><br>";
print "Możesz zawsze zawrócić... <a href=battle.php>wróć</a>.";
}
}
if ($battle) {
global $stat;
global $enemy;
global $myarm;
global $mywep;
global $earm;
global $ewep;
$enemy = mysql_fetch_array(mysql_query("select * from players where id=$battle"));
$mywep = mysql_fetch_array(mysql_query("select * from equipment where owner=$stat[id] and type='W' and status='E'"));
$myarm = mysql_fetch_array(mysql_query("select * from equipment where owner=$stat[id] and type='A' and status='E'"));
$ewep = mysql_fetch_array(mysql_query("select * from equipment where owner=$enemy[id] and type='W' and status='E'"));
$earm = mysql_fetch_array(mysql_query("select * from equipment where owner=$enemy[id] and type='A' and status='E'"));
if (!$enemy[id]) {
print "Żadnego gracza";
include("footer.php");
exit;
}
if ($enemy[id] == $stat[id]) {
print "Nie możesz atakować siebie.";
include("footer.php");
exit;
}
if ($enemy[hp] <= 0) {
print "$enemy[user] nieżyje.";
include("footer.php");
exit;
}
if ($stat[energy] < 1) {
print "Nie masz dość energii";
include("footer.php");
exit;
}
if ($stat[hp] <= 0) {
print "Nieżyjesz";
include("footer.php");
exit;
}
if ($enemy[tribe] == $stat[tribe] && $enemy[tribe] > 0) {
print "To członek Twojego klanu";
include("footer.php");
exit;
}
$span = ($stat[level] - $enemy[level]);
if ($span > 2) {
print "Nie możesz atakować kogoś 2 lvl niżej lub wyżej";
include("footer.php");
exit;
}
print "<b><u>$stat[user] vs. $enemy[user]</b></u><br>";
mysql_query("update players set energy=energy-1 where id=$stat[id]");
if ($stat[agility] >= $enemy[agility]) {
attack();
} else {
attackback();
}
}
?>
<?php include("footer.php"); ?>
<?php include("foot.php"); ?> |
Oto kod do pliku z resetami czyli reset.php a adres gry to [link widoczny dla zalogowanych] narazie taki i tak się nie zarejestrujecie bo meil nie przychodzi:P jeśli ktoś jąumie zmodyfikowaćna poczeby prosze ją tu umieścić z góry dzięki nie obejdzie się beżnagrody.:
Kod: | <?php
include("config.php");
if ($step == reset ) {
mysql_query("update players set age=age+1");
mysql_query("update players set energy=max_energy");
mysql_query("update players set hp=max_hp");
mysql_query("update outposts set turns=turns+5");
mysql_query("update outposts set tokens=tokens+100");
$plat_price = rand(100, 300);
mysql_query("update market set platcost='$plat_price'");
mysql_query("update players set ops=ops+5 where mines > 0");
mysql_query("update players set trains=trains+15 where corepass='Y'");
exit;
}
if ($step == revive) {
mysql_query("update players set hp=max_hp");
mysql_query("update players set energy=max_energy");
mysql_query("update outposts set turns=turns+5");
mysql_query("update outposts set tokens=tokens+100");
mysql_query("update players set ops=ops+5 where mines > 0");
exit;
}
?> |
W razie kontaktu gg 6065549 meil [link widoczny dla zalogowanych]
|
|