You select the monster out of a dropdown box, they have values (1, 2, 3, 4) now
(that is my list to show what your attacking (it shows, you are attacking $_SESSION['currmonster']) which is set to those, works fine, but some reason... it doesnt set the value right for the stats etc..
Code: Select all
$mon1[1]='Baby Elf';
$mon1[2]='Wood Elf';
$mon1[3]='Dark Elf';
$mon1[4]='Blood Elf';Code: Select all
if (isset($_POST['monsters']))
{
($monsters, suppost to get the value from the dropdown box (1,2,3,4))
$monsters = $_POST['monsters'];Code: Select all
$_SESSION['currmonster']=$mon1[$monsters];
$_SESSION['MLmon']=$monsters;
}>>code right below the above code>
Code: Select all
if (!isset($_SESSION['dexlvlmon']))
{$_SESSION['dexlvlmon']=$_session['MLmon'] * 5;}
if (!isset($_SESSION['dexcthmon']))
{$_SESSION['dexcthmon']=0;}
//if (!isset($_SESSION['mba=mon'])) //monster being attked
//{$_SESSION['mba=mon']=true;}
if (!isset($_SESSION['deflvlmon']))
{$_SESSION['deflvlmon']=$_SESSION['MLmon'] * 4;}
if (!isset($_SESSION['defptmmon']))
{$_SESSION['defptmmon']=0;}
if (!isset($_SESSION['strlvlmon']))
{$_SESSION['strlvlmon']=$_SESSION['MLmon'] * 7;}
if (!isset($_SESSION['currlifemon']))
{$_SESSION['currlifemon']=$_SESSION['MLmon']*13;}
if (!isset($_SESSION['currmaxlifemon']))
{$_SESSION['currmaxlifemon']=$_SESSION['MLmon']*13;}
if (!isset($_SESSION['defdamon']))
{$_SESSION['defdamon']=$_SESSION['MLmon']*$_SESSION['deflvlmon'];}
if (!isset($_SESSION['strdmgmon']))
{$_SESSION['strdmgmon']=$_SESSION['strlvlmon']/4;}
if (!isset($_SESSION['mondropgold']))
{$_SESSION['mondropgold']=$_SESSION['MLmon'];}However that doesnt seem to happen? Im really confused can anyone help?
(it kinda makes it easier, being able to just increase the MLmon (main level monster) to make em stronger)