Jump to content
MakeWebGames

Recommended Posts

Guest Anonymous
Posted

Re: Merge Item's [V2]

Slightly OT, but why on earth do you need to merge items? A swift read of the MySQL manual under INSERT syntax is all you need.

  • 1 month later...
Posted

Re: Merge Item's [V2]

 

but why on earth do you need to merge items?

You should really think about buying the script some time. By default, when a player gets an item you already have, the dumb script doesn't merge them, but shows them twice on the item page, the new items and the ones you already had.

  • 2 years later...
  • 2 weeks later...
Posted

newb needs a hand

Sorry I'm kinda new to this,

I made the merge.php and I have that saved in place but what code do I need in the item.php page and where, to make it merge?

Also How do I choose an item for it to change into.

Thanks a bunch :)

-Gaara x

Posted

open inventory, find

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

after the </a>] add this [Merge]

so it looks like this

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

this should be easy, even for a n00b, i'm a n00b and that was easy, tbh i think you should try to learn it if your going to have a game

Posted
this should be easy, even for a n00b, i'm a n00b and that was easy, tbh i think you should try to learn it if your going to have a game

Awwwh, It's not really working. And the merge option is only on food. I'm not the coder thats my partner but he is not well today so he asked me to have a crack at it... Not much luck though... Thanks anyway.

Posted
this should be easy, even for a n00b, i'm a n00b and that was easy, tbh i think you should try to learn it if your going to have a game

Awwwh, It's not really working. And the merge option is only on food. I'm not the coder thats my partner but he is not well today so he asked me to have a crack at it... Not much luck though... Thanks anyway.

after creating file "Merge.php" and uploaded it, open up "Inventory.php" and find

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and replace it with

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

hopefully you get it idea where im coming at lol.

OR

open up "inventory.php" and find

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and under it add this lol.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

NOTE: this way might slow game down lol.

  • 3 months later...
Posted

You can do this by doing a mysql query using count, group_concat and sum to check for duplicates, store the id's and the quantity.

Add all the items into the inventory and delete all the duplicates.

Which is how its done on zu. Worth looking into :D

Posted
if the game is coded right you should never have mutiples ...

Well yes you are correct there but on zu for example you can get a item from several different areas so the method I mention is to automatically arrange the items. The duplicate exists but the player never sees it.

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...