Jump to content
MakeWebGames

Recommended Posts

Posted

hey guys for the like the best hour i been trying explore how to make it so players can train their weapon. i was going make every player in my game a non-buyable weapon & i wanted it so when they battle the weapons gains exp & levels up. i wanted it too of course grow stronger when it levels. But anyway i just wanna know is there an way for me to make it so the weapons can be leveled up by battle? anything will help as im looking for any type of clue to get me started.

Posted

Hey,

Of course what you are saying is do-able but it will require some knowledge of PHP and MYSQL to code it.

You would need to create a seperate table to store the data for the items that level up..such as the weapons level and weapon exp.

You would need to edit the attack script to give exp to your weapon when you attack.

if you are using mccodes then look in the global_function.php file and find the check_level() function. You could use something similiar to that to create a function that checks and updates your weapons level.

I'm sure I left out some details but that should give you a couple steps in the right direction :)

  • Like 1
Posted

yea i had ended up doing something similar to that. i got everything made except the exp stuff. i know i gotta fool with global_functions tho.

Posted

yea thats what i did. i have alot done. so far u can buy the weapon, name it, give it a description. but the most important feature is what im missing! i gotta make it be able to be equipped & used in battle.

Posted

Well look at the code in that and you will need to alter where it looks for what weapon is equipped and change it so that your doing the query to your new table.

I dont use that so not sure of the code structure.

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