Joshua Posted May 12, 2010 Posted May 12, 2010 So this has been sitting on my forums for a bit, decided I'd stick it here for you guys who havent visited to use as well. Basically I took the Multiple Armor/Equipment Modification Designed by MDK666 here [mccodes v2]New and improved inventory code sources for free! Re-Vamped a few things for it to work with this mod. The Original Attack was the GRPG engine Attack script, if any of you have used that before. It's been re-coded a bit, had some things added to make it work and better. The idea behind it works off the following If you have a Primary and Secondary Weapon, Both weapons calculate into the fight. ie Prim+second+strength for attack damage if just one obviously it just uses the one you have equipped, and if you have neither it's just your fists "strength" modifier. It takes all the armor you have equipped and adds them up for a sum total of your defense. Hope you enjoy. attack.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Joshua Posted May 12, 2010 Author Posted May 12, 2010 inventory.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Joshua Posted May 12, 2010 Author Posted May 12, 2010 staff_items.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Joshua Posted May 12, 2010 Author Posted May 12, 2010 equip_boots.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. equip_breastplate.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. equip_gloves.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. equip_helmet.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Joshua Posted May 12, 2010 Author Posted May 12, 2010 equip_leggings.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. SQLs SQL's ALTER TABLE `items` ADD `boots` int(11) NOT NULL default '0', `helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '0', `leggings` int(11) NOT NULL default '0', `gloves` int(11) NOT NULL default '0', Delete the Armor Column in Items. ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0', `equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NULL default '0', `equip_leggings` int(11) NOT NULL default '0', `equip_gloves` int(11) NOT NULL default '0', You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Djkanna Posted May 13, 2010 Posted May 13, 2010 I guess I'll be the first to post! Looks good Joshua well done ;) Quote
Jordan Palmer Posted May 13, 2010 Posted May 13, 2010 might wanna look up on HTML...font tag is depreciated Quote
Dave Posted May 13, 2010 Posted May 13, 2010 It still works tho ;) Somehow I see browsers dropping it very soon in favour of using inline css. Please use tabbing correctly as well.. Makes reading a code alot easier when done proberlyish. Quote
Agon Posted May 17, 2010 Posted May 17, 2010 Hiya Hiya, I installed this on one of my games and loving the script. Thanks for the modifications. The challenge I am facing now is, merging attack outcomes with this new script. Trying to figure out how to get this old snippet of code to work right/merge with the new attack.php code. Snippet to direct to different outcomes: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Working on it right now, but if anyone with better skills than I would like to give it a shot. Thanks in advance! Quote
Agon Posted May 17, 2010 Posted May 17, 2010 Ok, I think I got it. Find in attack.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I think that's it. Quote
bladewolf2010 Posted May 17, 2010 Posted May 17, 2010 the sql's dont work:( or am i doing it wrong? [mysql]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '' at line 3[/mysql] Thats the error with ALTER TABLE `items` ADD `boots` int(11) NOT NULL default '0', `helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '0', `leggings` int(11) NOT NULL default '0', `gloves` int(11) NOT NULL default '0', with [mysql]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NUL' at line 3[/mysql] That's error with it ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0', `equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NULL default '0', `equip_leggings` int(11) NOT NULL default '0', `equip_gloves` int(11) NOT NULL default '0', Quote
bladewolf2010 Posted May 18, 2010 Posted May 18, 2010 [mysql]QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,)' at line 2 Query was SELECT * FROM `items` WHERE `itmid` IN(0,0,0,,,,,)[/mysql] That's an error from invotory Quote
rulerofzu Posted May 18, 2010 Posted May 18, 2010 So you wish to merge a one click attack with the original 3 option attack ....which defeats the purpose of a one click attack :D Hiya, I installed this on one of my games and loving the script. Thanks for the modifications. The challenge I am facing now is, merging attack outcomes with this new script. Trying to figure out how to get this old snippet of code to work right/merge with the new attack.php code. Snippet to direct to different outcomes: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Working on it right now, but if anyone with better skills than I would like to give it a shot. Thanks in advance! Quote
bladewolf2010 Posted May 18, 2010 Posted May 18, 2010 the sql's dont work:( or am i doing it wrong? MySQL queries 1 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '' at line 3 Thats the error with ALTER TABLE `items` ADD `boots` int(11) NOT NULL default '0', `helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '0', `leggings` int(11) NOT NULL default '0', `gloves` int(11) NOT NULL default '0', with MySQL queries 1 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NUL' at line 3 That's error with it ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0', `equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NULL default '0', `equip_leggings` int(11) NOT NULL default '0', `equip_gloves` int(11) NOT NULL default '0', Quote
Agon Posted May 18, 2010 Posted May 18, 2010 the sql's dont work:( or am i doing it wrong? [mysql]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '' at line 3[/mysql] Thats the error with ALTER TABLE `items` ADD `boots` int(11) NOT NULL default '0', `helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '0', `leggings` int(11) NOT NULL default '0', `gloves` int(11) NOT NULL default '0', with [mysql]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NUL' at line 3[/mysql] That's error with it ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0', `equip_boots` int(11) NOT NULL default '0', `equip_breastplate` int(11) NOT NULL default '0', `equip_leggings` int(11) NOT NULL default '0', `equip_gloves` int(11) NOT NULL default '0', Try doing the sql like this: ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0', ADD `equip_boots` int(11) NOT NULL default '0', ADD `equip_breastplate` int(11) NOT NULL default '0', ADD `equip_leggings` int(11) NOT NULL default '0', ADD `equip_gloves` int(11) NOT NULL default '0', Quote
Agon Posted May 18, 2010 Posted May 18, 2010 "So you wish to merge a one click attack with the original 3 option attack ....which defeats the purpose of a one click attack :D" Actually, it remains a one click attack system with different outcomes. Quote
Agon Posted May 18, 2010 Posted May 18, 2010 Another note people might want to know. Be prepared to lose your old armor table. Or deal with your players armor before installing this mod. Quote
Danny696 Posted May 18, 2010 Posted May 18, 2010 SQL: ALTER TABLE `items` ADD ( `boots` int(11) NOT NULL default '0', `helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '0', `leggings` int(11) NOT NULL default '0', `gloves` int(11) NOT NULL default '0' ); Quote
bladewolf2010 Posted May 18, 2010 Posted May 18, 2010 Try doing the sql like this: ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0', ADD `equip_boots` int(11) NOT NULL default '0', ADD `equip_breastplate` int(11) NOT NULL default '0', ADD `equip_leggings` int(11) NOT NULL default '0', ADD `equip_gloves` int(11) NOT NULL default '0', I got this when I tried that [mysql]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9[/mysql] Quote
Danny696 Posted May 18, 2010 Posted May 18, 2010 because its an int not a string Use these SQLS: ALTER TABLE `items` ADD ( `boots` int(11) NOT NULL default 0, `helmet` int(11) NOT NULL default 0, `breastplate` int(11) NOT NULL default 0, `leggings` int(11) NOT NULL default 0, `gloves` int(11) NOT NULL default 0 ); Quote
bladewolf2010 Posted May 18, 2010 Posted May 18, 2010 QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',9,'boots','boots dug',1,1,1, '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 0, 10, 0, 0, 0, 0) And this is the inventory error :( You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. When i tried to make an item Quote
lucky3809 Posted May 19, 2010 Posted May 19, 2010 bladewolf- Dont know if this may be your problem but in the staff_item.php There is 2 I believe queries, that look like this.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. try changing it too... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I had the same problem while using the amulet,braclet,ring mod, and it was because in the query it was $boots and so on , when it should been '$boots' which is why your getting the error. Quote
bladewolf2010 Posted May 19, 2010 Posted May 19, 2010 $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', '$weapon', '$boots', '$helmet', '$amulet', '$braclet', '$ring')"); bladewolf- Dont know if this may be your problem but in the staff_item.php There is 2 I believe queries, that look like this.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. try changing it too... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I had the same problem while using the amulet,braclet,ring mod, and it was because in the query it was $boots and so on , when it should been '$boots' which is why your getting the error. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. still get an error Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.