View Full Version : My next version
[D]Vincent
08-12-2002, 07:56 AM
Vincent]I'm doing my next version of the RPG Class Hack and I've got all of it down with the itemshop I'm just wondering how I would go about displaying the stats. Anyways here's how I did it, I added a few fields to the table items(I added attack, mattack, defense, ect, all the stats) and I've edited itemadmin.php to work fine with it(atleast I think I have, I have yet to try it out since my forums are down), now I was thinking that I would just do this to display the stats:
$itemattack = $DB_site->query("SELECT attack FROM items WHERE itemid=$id");
$itemmattack = $DB_site->query("SELECT mattack FROM items WHERE itemid=$id");
and so on
But I have doubts about that, I don't know if it will work, which is why I would like one of the PHP masters or someone that knows to verify this for me.
[D]Vincent
08-12-2002, 10:23 AM
Anyone at all?
Xenon
08-13-2002, 11:13 PM
you should use query_first instead of query, but i don't know exactly your hack, so this is just what comes to my mind after reading your post ;)
[D]Vincent
08-14-2002, 05:52 AM
The part I need help on is just would I use that or make fields for it in items_user also. This is an add-on to make my classes hack stats part go up with what you set on the items, it adds a selection for each stat thing where you edit/add items. I am basically not sure how to display the stats.
g-force2k2
08-14-2002, 01:58 PM
[D]Vincent you should do as Xenon says and use the query first option... but also group all of your queries so you don't run like ten when you only need to run one ;)
ex...
$itms = $DB_site->query_first("SELECT * FROM items WHERE itemid='$id'");
then you can define your stats...
ex.
$atk = $itms[attack];
$matk = $itms[mattack];
etc...
and thats only part of what you need to setup to acquire what you're looking for :p then you will need to set up either userfields or what not to achieve the user end stats...
trust me i've done more then one of these before ;)
g-force2k2
[D]Vincent
08-15-2002, 04:51 AM
g-force, do you have an IM service that I can contact you on and talk about this?
g-force2k2
08-16-2002, 01:41 AM
[D]Vincent just pm me your info ;) i try to keep to a lower profile... i either stick to pms... ;)
g-fore2k2
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.