chaoswar4u Posted January 16, 2010 Posted January 16, 2010 Well amongst fixing everything that is annoying with mccodes v2 I come to my next issue. Has any one tried or now how to resolve the issue. A member uses an item made and if say that items effect is already at 100% or say its an hospital item and you use it but not even in hospital. Is there an effective way that will take all items into account (v2 system) to ensure that if a value is at 100% etc that the item comes up with x item is already at 100% etc. I would post the code but I dont know if I will get spanked for using the whole of mccodes v2 source code and posting here for review. Any insight would be cool. Regards Chaos Quote
rulerofzu Posted January 16, 2010 Posted January 16, 2010 For hospital items you could make it so that the use link only appears when they are in the hospital. This would be in the inventory code. Make all your items for hospital a itmtype then reference the itmtype in the inventory code. if($i['itmtype'] == 999 && $ir['hospital'] > 0) { echo '[url="itemuse.php?ID='.$i['inv_id'].'"]Use[/url]';} Something like that should work for when the player ends up in hospital. Note if you have medical effects on weapons it will have to be unequipped before you see the link unless you code that differently :D Quote
chaoswar4u Posted January 16, 2010 Author Posted January 16, 2010 Im aware of that method but im looking for something more integrated so it takes into account any item I add to my mccodes v2 game. If that is indeed possible. Quote
rulerofzu Posted January 16, 2010 Posted January 16, 2010 Aye was a basic example. Would you need this for all items? Or only the itm types involved with refilling energy etc or decreasing hospital/jail time. Quote
chaoswar4u Posted January 16, 2010 Author Posted January 16, 2010 Basic any items that have an effect enabled. 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.