Uridium Posted March 11, 2011 Posted March 11, 2011 I came across a script last night quite accidentaly and thought it would make for a decent mod.. How to install The SQLS Sqls Needed Working Demo DEMO I havent attempted to add this mod to a MCC working game but im sure those of you who want it to work will make it do so... Credit goes to Danny Van Kooten Quote
chicka Posted March 11, 2011 Posted March 11, 2011 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 Quote
Uridium Posted March 11, 2011 Author Posted March 11, 2011 I cant comment on the Demo as it just uses 2 slots but im sure with a bit of editing you could make your version require 4 slots Quote
rulerofzu Posted March 11, 2011 Posted March 11, 2011 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. Quote
03laceys Posted March 12, 2011 Posted March 12, 2011 It looks like it wouldn't be all that hard to implement HMMM... O and nice to see cronus reading :) Quote
iseeyou94056 Posted March 13, 2011 Posted March 13, 2011 if anyone makes this work for mccodes v2 please post it Quote
Dave Posted March 13, 2011 Posted March 13, 2011 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. Quote
Djkanna Posted March 13, 2011 Posted March 13, 2011 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. Quote
Danny696 Posted March 20, 2011 Posted March 20, 2011 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 Quote
Djkanna Posted March 21, 2011 Posted March 21, 2011 You're right I could get away with just using one or the other, however the way I've done it, seemed to be the logical choice. Quote
rulerofzu Posted March 21, 2011 Posted March 21, 2011 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. Quote
Smartje Posted March 26, 2011 Posted March 26, 2011 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.. ^^ Quote
Uridium Posted March 27, 2011 Author Posted March 27, 2011 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 Quote
Aderik Posted March 29, 2011 Posted March 29, 2011 Quick question, can this be adapted to allow the user to click and drag text words and not pictures? Quote
Djkanna Posted March 29, 2011 Posted March 29, 2011 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. Quote
Aderik Posted April 4, 2011 Posted April 4, 2011 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"> <--- need this in text not image. </div> Quote
Uridium Posted April 4, 2011 Author Posted April 4, 2011 cant remember how the inv works but this should work <div id="weapon_spot"></div> <div id="helmet_spot"></div> <div id="inventory"> <--- need this in text not image. </div> dot quote me on the use of $itm it could be something else on your script.. Quote
Djkanna Posted April 4, 2011 Posted April 4, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. $(".item").draggable({ revert: 'invalid' }); 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.