when a player accepts a quest, it will then be stored into the players quest log, when reviewing his quest log he will see the requirements needed in order to finish the quest, Like This.
Orc Tooth
0/3
Goblin Mail
0/3
Now the setup i have for my database is in the Image Files i'm really sorry the Table is to big to fit into one picture. 3 is the maximum attachments allowed so i will post a reply with the remaining photos.
i do not know how to really make an array to say how many items they have, this is what i tried and it failed horribly but it displays a 2 which i'm sure is just how many are in the array but its not accurate, because i actually have 4 in my inventory.
This is the Code i have for it to query and put it into an array to be counted, i'm sorry i'm not even sure if i'm on the right track or not. For some reason it will only display if i say $req1 !=='0') its weird and help on that would be appreciated.
Code: Select all
if($req1 !== '0')
{
$selectinventory="SELECT name from playerinventory where pid = '$userid' AND name='$selectquest3[req1]'";
$selectinventory2=mysql_query($selectinventory) or die("Could not retrieve inventory Count.");
$selectinventory3=mysql_fetch_array($selectinventory2);
$icount1 = count($selectinventory3);
print"<br>
$selectpquest3[req1]<br>" . count($selectinventory3) . " / $selectpquest3[req1amount]<br><br>";
}
thanks everyone who looked at this and tried to help!