Daron Posted April 25, 2011 Posted April 25, 2011 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. Quote
Curt Posted April 25, 2011 Posted April 25, 2011 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 :) 1 Quote
rulerofzu Posted April 25, 2011 Posted April 25, 2011 Either add to the items table or make a new table (recommended). Add fields exp, level etc for the weapon and you have your starting point. What curt said above lol Quote
Daron Posted April 25, 2011 Author Posted April 25, 2011 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. Quote
rulerofzu Posted April 25, 2011 Posted April 25, 2011 Well in theory :D you could copy the player level function amend it so that it updates the new table and there you go! Quote
Daron Posted April 25, 2011 Author Posted April 25, 2011 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. Quote
Daron Posted April 25, 2011 Author Posted April 25, 2011 alright im lost -_____- i have everything how i want it except it cant make it able to be used in battle or even appear in inventory Quote
rulerofzu Posted April 25, 2011 Posted April 25, 2011 What attack system are you using default? Quote
Daron Posted April 25, 2011 Author Posted April 25, 2011 im using the choose between primary or secondary weapon each turn battle system. Quote
rulerofzu Posted April 25, 2011 Posted April 25, 2011 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. 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.