lucky3809 Posted February 8, 2011 Posted February 8, 2011 (edited) This modification is in the process of being re modified, will post it when I am done, stay tune... As for the old code never did work while unequipping, and would not work how ever many times you tried to get it to work elements were out of place. There were more to it. Edited September 24, 2012 by lucky3809 Quote
Danny696 Posted February 8, 2011 Posted February 8, 2011 Unequip needs to be edited on the stats query, make it - Quote
lucky3809 Posted February 9, 2011 Author Posted February 9, 2011 Yeah i do need to redo the queries working on them now, just noticed the problem Quote
lucky3809 Posted February 10, 2011 Author Posted February 10, 2011 Ok figured this out lol. As for the effects done in item_staff Effect 1 is for increase Effect 2 is for decrease which you would have to take the coding You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And add it under the effect 1 coding in all three pages... You can add effect 3 also you just change where 2 is in the coding and change to 3 also where the end query is -$upd that is where you make it so its decrease or increase in stat make sure in the unequip you do the opposite to each weapon equip page so when they take off a decrease weapon it put the players stat back to the orginal stat without weapons equipped.... So this way you can set a weapon at +5 strength with effect 1 and with effect 2 defence -2 which would make the attributes to the weapon. Also dont forget the bonus you can add where it says primary power you need to still fill that part out to make it equip-able. Sorry if I may have confused anyone... Quote
sixsens Posted September 24, 2012 Posted September 24, 2012 (edited) 1st i love this mod. +1 equip part, work great but it double the ammount we set in effect. unequip part, doesnt work at all (nothing hapen). i tried many way and nothing come up! here is my unequip.php before making any change.. (where should i edit please) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. here with edit You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited September 24, 2012 by sixsens Quote
sixsens Posted September 24, 2012 Posted September 24, 2012 ill pay 10$ if anyone found a solution for the unequip effect Quote
sniko Posted September 24, 2012 Posted September 24, 2012 (edited) Try (untested) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited September 24, 2012 by sniko Quote
lucky3809 Posted September 24, 2012 Author Posted September 24, 2012 (edited) Actually this needs to be deleted a lot of errors and not correctly done, it don't work, unless you do a lot of modification to the item table, and do away with the effect 1 effect 2 and so on, I redone this mod but it's not in mccodes, probably end up re doing this mod when i get around to it for mccodes. I use a weapon and item table, and a weapon inventory and item inventory, instead of the effects for weapons I made fields, which for mccodes would be strength,agility,guard,labour... Edited September 24, 2012 by lucky3809 Quote
sixsens Posted September 24, 2012 Posted September 24, 2012 Try (untested) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. thanks SNIKO i have test but nothing. Thanks Lucky3809 too, ill try to fix but as im new it could be long. thx for taking time for me guys. the idea is so cool that i cant delete it. :) if anyone have an idea how to fix this ill still pay 10$ Quote
lucky3809 Posted September 24, 2012 Author Posted September 24, 2012 Going to update this after i redo it, seeing how it is my mod lol... anyone can though, no need to pay it was released for free! Quote
sixsens Posted September 24, 2012 Posted September 24, 2012 (edited) Fatal error: Call to undefined method database::fetch_array() in C:\wamp\www\unequip.php on line 34 this is the error i get with your edit SNIKO You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited September 24, 2012 by sixsens i fix last error Quote
sixsens Posted September 24, 2012 Posted September 24, 2012 Going to update this after i redo it, seeing how it is my mod lol... anyone can though, no need to pay it was released for free! Your the man! let me know if you want me to test :) Quote
Octarine Posted September 24, 2012 Posted September 24, 2012 The art of debugging is obviously a lost art... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Call to undefined method database::fetch_array() Look at the code; it's apparent that you need an associative array - as can be seen by the following line ($r['effect2']). Associate arrays from MySQL (in this context) are returned by one of two functions: mysql_fetch_assoc() or mysql_fetch_array() though the latter does need a second parameter to be one of MYSQL_ASSOC or MYSQL_BOTH. So you need to find something that calls one of these two functions ideally. Looking at the database class (class/class_db_mysql.php) a quick search in your editor will show you that the fetch_row() method does exactly that. ie: search and replace $db->fetch_array with $db->fetch_row in SNIKO's code. Simplez. Quote
lucky3809 Posted September 24, 2012 Author Posted September 24, 2012 This is being redone, scratch the whole thing it was wrong in the first place, because it never did work when unequipping... I have it already made none mccode, so at the moment I am recoding it and will place it up when i am done, there is many modifications though I hope you can bare with me. Quote
sixsens Posted September 24, 2012 Posted September 24, 2012 (edited) this work now...!!! You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. seem ok let me test it no error and the stat go down ;) octarine+sniko+lucky3809 did the hattrick let me know if anyone of you want the 10$ you will have to split in 3 or 2... as i said ill pay by paypal in a day or 2 gime mail for paiement. :) thx again.. ill still wait for the finish version of lucky3809 wanna see if he can make it better. good coding guys Edited September 24, 2012 by sixsens Quote
sixsens Posted September 25, 2012 Posted September 25, 2012 here an equip page its working great. but if there is already something equip it doesnt take out the stat of the already equiped item that is about to be replace. im trying to figure what i should do. add another edition where i take out the effect of the already equipped tiem or if there is something already equipped die endpage "unequip before equip a new item" something like that. if anyone can help me with this little situation. ;) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
rulerofzu Posted September 25, 2012 Posted September 25, 2012 Isnt this the code done by POG1 in his inventory mod a looooooooooooooooong time ago lol. this work now...!!! You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. seem ok let me test it no error and the stat go down ;) octarine+sniko+lucky3809 did the hattrick let me know if anyone of you want the 10$ you will have to split in 3 or 2... as i said ill pay by paypal in a day or 2 gime mail for paiement. :) thx again.. ill still wait for the finish version of lucky3809 wanna see if he can make it better. good coding guys Quote
lucky3809 Posted September 25, 2012 Author Posted September 25, 2012 Isnt this the code done by POG1 in his inventory mod a looooooooooooooooong time ago lol. I don't know about the one that is posted with other weapons such amulet,and so on, the mod i had up only used the 3 that were with mccodes, the re modification will have only those 3 but other weapons can be added i left it simple to add more then 3 weapon slots, will get it up, it's not POG1 mod that I have coded, it's what I made based off roguevampires, entirely my own coding... Quote
rulerofzu Posted September 25, 2012 Posted September 25, 2012 When I coded mine for zu I deemed the entire effect system in Mcc not suitable to do this but it does depend on your requirements. Personally I think you should leave that behind and go with an entirely new system. Quote
sixsens Posted September 25, 2012 Posted September 25, 2012 im close to make it all work.. my only problem is when i equip and there is already something equip.. Quote
realmoflegends Posted September 25, 2012 Posted September 25, 2012 When I coded mine for zu I deemed the entire effect system in Mcc not suitable to do this but it does depend on your requirements. Personally I think you should leave that behind and go with an entirely new system. Yep, I determined the same thing in mine, I just did the additional 'wearing effects' thing manually, and it works fine. Adds stats when equipping, subtracts them when unequipping. The built in system is mostly designed out of the box for 'Use', one-off effects. 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.