Jump to content
MakeWebGames

Recommended Posts

Posted

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!

Posted

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!

Posted

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.

Posted

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

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