Razor42 Posted August 6, 2012 Posted August 6, 2012 Hell MWG! Another mod iv created to help progress my learning! What this mod does? Players can buy bodyguards, bodyguards will boost up the players strength and guard. Players will be able to upgrade their bodyguards for an amount of crystals. The more they upgrade their bodyguards the more they will boost the users attack and defence. The maximum level for bodyguards is 10. So lets get started :D First run these into phpmyadmin: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then create a file called bodyguards.php and add this into it: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Should work perfect as I have tested and works perfect for me. Hope you all enjoy :) Thanks, Razor42! Quote
KyleMassacre Posted August 7, 2012 Posted August 7, 2012 Why no make it kind of like a gym for the body where you put in how much you'd like to train him for a set secondary currency price for example: 10 crystals/tokens whatever you call it for 100 stat points. Also, you can probably optimize them queries a bit and get rid of updating the userstats and include the bodyguard in attack.php under the my damage I think its called. But other than that pretty good job! Quote
SilvaTungDevil Posted August 7, 2012 Posted August 7, 2012 Just a suggestion you dont need to add four more fields to the already over subscribed user table, why not put it in its own table? Quote
Razor42 Posted August 7, 2012 Author Posted August 7, 2012 As I said this was just another step in my learning, trying to improve on everything I can but only been learning for 4 weeks so got a long road of learning ahead of me :) Will deffinatly take into consideration what you've all said and glad some of you's like it. Quote
Newbie Posted August 7, 2012 Posted August 7, 2012 would this work instead of using it in users table? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
KyleMassacre Posted August 7, 2012 Posted August 7, 2012 Yeah but I would use this instead You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I dont like the use of decimals and tinyints should suffice for the amounts of stats that are being placed. You can probably even go lower than int(11) on the id since not a lot of games will have more than 200000000 or so users. And the stats you can probably go lower as well Quote
Raven1992 Posted August 7, 2012 Posted August 7, 2012 got some images for it working [ATTACH=CONFIG]591[/ATTACH] [ATTACH=CONFIG]592[/ATTACH] 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.