View Single Post
  #3  
Old 12-15-2014, 01:14 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 90,935
Kyttias is on a distinguished road
Default

Let me think... first, I would make a column in the shops table of the database to tell which shops which currency to use. Then, I would have to add a variable representing this new column at the top of classes/class_itemshop.php and classes/class_adoptshop.php. Next, in the same files, I would have to modify the public function purchase and check which currency the shop is using and reduce only the currency that shop is using. (It would be much harder to make a shop that utilizes both currencies at once, and even harder to have it so the same item can be bought with either. So let's just not go down that road right now, as it would involve making columns in the items table, then running running some sort of check or another when display the item buy form...)

As for the drop rate - the amount of currency dropped when visiting a pet is determined by the value column on the reward row of table levels_settings in the database. I would suggest making another row for your other currency to determine the drop rate for it. You'll need to reference to it in classes/class_levelsetting.php by creating a variable for it at the top. In the public function __construct, imitate what's going on with $this->reward with the name of your new variable. In levelup.php, at the end of public function click, imitate what's going on here for the original currency's $reward, one line at a time, each after the last. And finally, in view/levelupview.php, after $reward variable is set, do so with your second, new one as well.

I think that's all you should need to do. I hope that's enough hints. ^^
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 12-15-2014 at 01:21 AM.
Reply With Quote