Jump to content
MakeWebGames

Advanced Attack and Inventory Mod--One Click.


Joshua

Recommended Posts

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.

 
Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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',

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

the sql's dont work:( or am i doing it wrong?

 

 

 

 

 

codeS.png

 

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

 

 

 

 

codeS.png

 

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',

Link to comment
Share on other sites

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',

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

);

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

$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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...