Attacking mob on map

Location of the Videos
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: Attacking mob on map

Post by Torniquet »

just leave it like this....

Code: Select all

$mapcrsql="SELECT * FROM map WHERE mapr='$_SESSION[mapr]' AND mapc='$_SESSION[mapc]' LIMIT 1";
ive never had a problem doing it that way.
New Site Coming Soon! Stay tuned :D
GrInd3r
Posts: 66
Joined: Mon Jul 13, 2009 10:34 pm

Re: Attacking mob on map

Post by GrInd3r »

Right I changed it... so im trying to think here.. that wasnt updating the rows.. could I just populate the creatures database randomly and have there x and y stored in there and just read it from the map... im very confusedddddddddddddddddddddddddd
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: Attacking mob on map

Post by Torniquet »

im not sure i understand what you mean :s

do you mean that in your creature DB you have an X n Y field for the positionings of all your mobs, and when a player is on that particular coord the mob is shown to be on the map??

something like...

Code: Select all

$userLocation = mysql_fetch_assoc(mysql_query("SELECT player_x, player_y FROM user_database WHERE user_id='$uid'"));

$monsters = mysql_query("SELECT monster_id, monster_name FROM monster_database WHERE monster_x='$userLocation[player_x]' AND monster_y='$userLocation[player_y]'");

while ($row = mysql_fetch_assoc($monsters){
echo $row['monster_name'];
}
if thats what you mean then yes, that should work.

if on the other hand thats not what you mean, then sorry i dont understand what your trying to say :p lol

peace n love on xmas x
New Site Coming Soon! Stay tuned :D
Post Reply

Return to “Older Browser MMO Videos”