Page 1 of 13
Browser MMO Video #20
Posted: Sun Feb 28, 2010 2:00 pm
by hallsofvallhalla
Re: Video #20
Posted: Sun Feb 28, 2010 2:01 pm
by hallsofvallhalla
I have 3 more videos coming right behind these
Re: Video #20
Posted: Sun Feb 28, 2010 8:38 pm
by zolacat999
Carn't wait to watch these soon, and would it be possible to post what you have added to the source codes like you did early on in the video series because I have added ome changes to my game that are not in the video and if i just replace the files i'll lose those features. If not possible then don't worry
Re: Video #20
Posted: Sun Feb 28, 2010 11:27 pm
by hallsofvallhalla
i can, but there is so little being added you could most likely just follow along in the tutorials.
Re: Video #20
Posted: Mon Mar 01, 2010 1:18 am
by tehbeasthax
when i go to arena no creature pops up although the orc is in the creatures folder i importer your sql and downloaded your files what could be the problem?
Re: Video #20
Posted: Mon Mar 01, 2010 1:25 am
by hallsofvallhalla
what level is your character?
Re: Video #20
Posted: Mon Mar 01, 2010 1:28 am
by tehbeasthax
what is happening is it is not sending the creature again. On the site i logged in with user:halls pass: halls and you were attacking an orc well once the orc got killed it didn't re-update the creature in the players where it was saying creature:10 it is now saying creature:0
Every1 is going to have this problem to get it fixed replace your battle.php with this one for some reason the battle.php in vid 20 does not work and will not auto-update the creature you are attacking.
Code: Select all
<?php
include_once 'connect.php';
session_start();
include_once 'logo.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<div id="login2" div align="center">
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
?>
</div>
<?php
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
include_once 'statpanel.php';
$pid = $playerinfo3['id'];
$name = $playerinfo3['name'];
$playerhp = $playerinfo3['hpoints'];
$playerattack = $playerinfo3['attack'];
$playerdefense = $playerinfo3['defense'];
?>
<div id="table">
<?php
if (isset($_GET['randid']))
{
$randid=$_GET['randid'];
$iteminfo="SELECT * from inventory where randid='$randid' AND id ='$pid'";
$iteminfo2=mysql_query($iteminfo) or die("could not get item stats!");
$iteminfo3=mysql_fetch_array($iteminfo2);
if (!$iteminfo3['name'])
{
}
else
{
$iname = $iteminfo3['name'];
$stats = $iteminfo3['stats'];
$statadd = $iteminfo3['statadd'];
$type = $iteminfo3['type'];
if ($type == "healing")
{
$newhp = $statadd + $playerhp;
if ($newhp > $playerinfo3['maxhp'])
{
$newhp = $playerinfo3['maxhp'];
}
$updateplayer="update players set hpoints='$newhp' where id='$pid'";
mysql_query($updateplayer) or die("Could not update player");
$updateitem="DELETE from inventory where id='$pid' AND randid='$randid' limit 1";
mysql_query($updateitem) or die("Could not delete item");
$playerhp = $newhp;
echo "Used " . $iname . " and recovered " . $statadd . ".<br>";
}
}}
$creature = $playerinfo3['creature'];
if ($creature != 0)
{
$creatureinfo="SELECT * from creatures where id='$creature'";
$creatureinfo2=mysql_query($creatureinfo) or die("could not get the creature you were fighting!");
$creatureinfo3=mysql_fetch_array($creatureinfo2);
}
else
{
$creatureinfo="SELECT * from creatures order by rand() limit 1";
$creatureinfo2=mysql_query($creatureinfo) or die("could get a creature!");
$creatureinfo3=mysql_fetch_array($creatureinfo2);
$cid = $creatureinfo3['id'];
$updateplayer="update players set creature='$cid' where name='$name'";
mysql_query($updateplayer) or die("Could not update player");
}
$creature = $creatureinfo3['name'];
$creaturehp = $creatureinfo3['hpoints'];
$creatureattack = $creatureinfo3['attack'];
$creaturedefense = $creatureinfo3['defense'];
?>
</div>
<div id="player">
<?php
/////player info
echo "<u> " . $playerinfo3['name'] . "</u><br>";
echo "Hit points = " . $playerhp . "<br>";
echo "Attack = " . $playerattack . "<br>";
echo "Defense = " . $playerdefense . "<br><br><br>";
?>
</div>
<div id="creature">
<?php
///////creature info
echo "<u> " . $creatureinfo3['name'] . "</u><br>";
echo "Hit points = " . $creaturehp . "<br>";
echo "Attack = " . $creatureattack . "<br>";
echo "Defense = " . $creaturedefense . "<br><br><br>";
echo "<a href='attack.php'>Attack</a>";
echo "<br><a href='usemagic.php'>Use Magic</a>";
echo "<br><a href='useitem.php'>Use Item</a>";
echo "<br><a href='index.php'>Exit Arena</a>";
?>
</div>
<div id="logout">
<?php
echo "<br><a href='logout.php'><img src='images/logout.gif'>";
?>
</div>
Re: Video #20
Posted: Mon Mar 01, 2010 3:53 am
by hallsofvallhalla
or just edit the database to say creature=10
I will look into this tomorrow, not sure what the error is your getting. it is working for me. Can anyone else confirm?
Re: Video #20
Posted: Mon Mar 01, 2010 4:51 pm
by neronix17
hallsofvallhalla wrote:or just edit the database to say creature=10
I will look into this tomorrow, not sure what the error is your getting. it is working for me. Can anyone else confirm?
I can confirm than mine seems to work fine.
Re: Video #20
Posted: Mon Mar 01, 2010 5:06 pm
by ier
problem at store to i dont got noting in my store