Questions on the videos

Location of the Videos
Post Reply
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Questions on the videos

Post by hallsofvallhalla »

Please refer all questions that pertain to modifying the videos to the questions board. If you are not following the videos 100% the way they are then do not post the questions under the video title. This is confusing people. Post them in the questions forum under their own topic. I think its great how many people have learned fromt he videos then started changing hte code but lets make sure we dont confuse new people :)
GrInd3r
Posts: 66
Joined: Mon Jul 13, 2009 10:34 pm

Re: Questions on the videos

Post by GrInd3r »

mk
fleaky
Posts: 27
Joined: Sun Jul 05, 2009 11:57 pm

Re: Questions on the videos

Post by fleaky »

you no use item, well... i can't i use it but it does not add anything what so ever and plus i can exit a fight whenever and also i can buy unlimited amount of stuff it doesn't count the stat price or whatever it should count for.

any sugguestions???

here is useitem.php
and by the way did we need a useitem in mysql table?? like players/creatures/store etc cause i havent got one.

Code: Select all

<?php

include_once 'connect.php';
session_start();

if (isset($_SESSION['player']))
{
  $player=$_SESSION['player'];
}
else
{
  echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
  exit;
}

$creature=$_GET['creature'];

$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);

$playerid = $playerinfo3['id'];

$counter = 0;
echo "<small>";
      print "<center>";
      print "<table border='0' width='70%' cellspacing='20'>";
      print "<tr><td width='25%' valign='top'>";
      print "</td>";
      print "<td valign='top' width='75%'>";
      $invinfo="SELECT * from inventory where id='$playerid'";
      $invinfo2=mysql_query($invinfo) or die("could not select player inventory");
      print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
      print "<tr><td>Name<font color='ffffff'>________________</font></td><td>Stat<font color='ffffff'>______</td><td>Stat Add<font color='ffffff'>______</td><td>Type<font color='ffffff'>______</td><td><font color='ffffff'>________________</td></tr>";
      while($invinfo3=mysql_fetch_array($invinfo2))
      {
      print "<tr><td>$invinfo3[name]</td><td>$invinfo3[stats]</td><td>$invinfo3[statadd]</td><td>$invinfo3[type]</td><td><A href='battle.php?randid=$invinfo3[randid]&creature=$creature'>Use Item</td></tr>";
       $counter = 1;

      }

      print "</table>";
      print "</td></tr></table>";
      print "</center>";
       echo "</small>";

      if ($counter == 0)
      {
            echo "<center>You have Nothing in your inventory!<br>";
            echo "<a href='battle.php?creature=$creature'>Go Back</center>";
            exit;
      }

    echo "<center><a href='battle.php?creature=$creature'>NeverMind</center>";

    ?>
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Questions on the videos

Post by hallsofvallhalla »

first off PLEASE MAKE YOUR OWN topics for questions and in the questions section. This is confusing when you spread questions out everywhere.

You are getting ahead of the videos and I will try to get some new videos out shortly.

Useitem is used in battle.php not useitem.php, useitem.php is where you select the item. Check your battle.php to see why the item is not being used.
jpoisson
Posts: 245
Joined: Sun Aug 02, 2009 5:12 pm

Re: Questions on the videos

Post by jpoisson »

Hey guys, I have jsut started following your tutorials, just to see where you guys take everything :P yea right... but i notices a few bugs.

situation ex:

upload 200 monsters to the database. Orc's, Goblins, Imps...

here is the issue:

when you go to the battlepage if you refresh it switches to another monster.
(I think some type of randid like in the item scrips should be use and if it is then you should only need 3 monsters in the database and have a battle DB or something where the id is recorded to the users somehow)

ok i ma in a fight on the attack page can just refresh the page and it will continue to fight. and then when the monster dies and you refresh it will pull another what ever it is you were fighting. (I think we need to get rid of the $_GET method and use $_POST... I am not really sure how to implement post over get but right now the game is very hackable.)

Items is good:P

I am slowly tryinf to convert everything into $_POST since it seems a little more secure.
Laguages:
PHP, MYSQL, (X)HTML, HTML5, JQuery, CSS 3.0,
C, C#, C++, Python, Pascal, Perl, Ruby, Turing

Software:
Adobe MC CS4, Visual Studio 2008, Notepad++,
NetBeans IDE, WAMPSERVER

Browsers:
Internet Explorer, Firefox, Opera, Safari, Chrome
(Always have latest patches for browsers.)

Free time:
...
User avatar
Sakar
Posts: 520
Joined: Thu Apr 23, 2009 2:59 am

Re: Questions on the videos

Post by Sakar »

halls mentioned he would work on the cheating issues in the vids ( he might've already since I haven't watched vids 9 - 10 yet)

My temporary solution is to use Session variables for monster data.
User avatar
neronix17
Posts: 317
Joined: Sat Aug 01, 2009 5:01 am

Re: Questions on the videos

Post by neronix17 »

all you would need to do to sort that would be to change the creatures so that they have a randid like the items do wouldnt you? then instead of the creature name there would be the randid in the address bar :? i dunno, im probably wrong, im kind of taking out that bit out of mine :D
This isnt just a gimp mask...This is an S&M gimp mask...
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Questions on the videos

Post by hallsofvallhalla »

yes the hackability can and will be fixed very easily.
all we have to do is somewhat what you suggested. Add in a creature field to the player table and record the creature the player is fighting. That removes all post and get methods. I did not do this because this is a training video. I show you the easy way first then we fix it later.

Thanks for pointing these out and I will add the fixes to a upcoming video soon. I am finishing up the magic video first.
User avatar
neronix17
Posts: 317
Joined: Sat Aug 01, 2009 5:01 am

Re: Questions on the videos

Post by neronix17 »

hope this is where to ask this :? will the next couple videos have how to have the creatures automatically replaced after they've been killed?
This isnt just a gimp mask...This is an S&M gimp mask...
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Questions on the videos

Post by hallsofvallhalla »

that will be in the cron section, yes
Post Reply

Return to “Older Browser MMO Videos”