Jump to content
MakeWebGames

Recommended Posts

Posted

I haven't tried this but if you have more than one of those items say 4 is it going to equip one item or is it going to try and use all 4 of them? or is it going to use 1 and delete the other 3?

I haven't quite looked at the script just the demo

Posted

Chicka you would probably need to make it error exception for if you have 1 equipped and try adding another.

You could always include the item_add and item_remove functions into it so everytime a player moves one item over to a slot it auto adds the item current in that slot back into the players inventory.

Which is how I do my own jquery inventory.

Posted

This would be incredibly simple to implement into Mccodes V2... With the option to have unlimited amounts of inventory slots.

You'd just need to call various ajax requests when the user drops a certain item. If I get some free time I'll certainly sort it all out for you guys.

Posted

EDIT: You may want to clean it up a bit first though (I cannot edit posts directly so subject will do :P )

This would be incredibly simple to implement into Mccodes V2... With the option to have unlimited amounts of inventory slots.

You'd just need to call various ajax requests when the user drops a certain item. If I get some free time I'll certainly sort it all out for you guys.

I did start it, but recoded the inventory whilst I was at it then when it came down to the drag&drop I got bored.

If you want to continue where I left off.

You're unable to view this code.

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

Posted

Ech, I hate myself for this, but it isnt that bad, only 7 days xD

DJK, I want to question your methods. :)

 

You're unable to view this code.

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

 

Your validating that $item is a number, (for others its in the if statement). Then your sanitizing, meaning it will only allow numbers, even though you've already made sure its a number, surely you only need one. :S

Posted

Well one allows fractions and the other one does not and one can flag in other options whilst the other one does not.

Its a logical method of working with a slight touch of overkill in this instance.

Posted

Saw this page in my analytics (referring sites) so thought i'd check it out. :) Glad you guys like it, the thing could do better with some recoding, i'd probably change a lot of things if I did it over from scratch. Got no experience whatsoever with MCC but it definetly looks interesting, might have a play with it soon cause I do have the intention of building a browser game... one day.. ^^

Posted
Saw this page in my analytics (referring sites) so thought i'd check it out. :) Glad you guys like it, the thing could do better with some recoding, i'd probably change a lot of things if I did it over from scratch. Got no experience whatsoever with MCC but it definetly looks interesting, might have a play with it soon cause I do have the intention of building a browser game... one day.. ^^

Thanks for joining the site Danny your experience with mcc isnt needed its your brains we are after lol

Posted
Quick question, can this be adapted to allow the user to click and drag text words and not pictures?

Of course, any DOM element can be given the ability of dragging/dropping.

Posted

Sorry for the late reply. Any hints or tips I could get to do so? I see that n the img src you can define a class which matches to the slot, what would I use to go about wrapping the text?

Example given in tutorial

<div id="weapon_spot"></div>

<div id="helmet_spot"></div>

<div id="inventory">

weapon.png <--- need this in text not image.

helmet.png

</div>

Posted

cant remember how the inv works but this should work

<div id="weapon_spot"></div>

<div id="helmet_spot"></div>

<div id="inventory">

weapon.png <--- need this in text not image.

helmet.png

</div>

dot quote me on the use of $itm it could be something else on your script..

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