Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-01-2017, 06:39 AM
Fox Fox is offline
Member
 
Join Date: Oct 2016
Location: Australia
Posts: 34
Gender: Female
Credits: 8,183
Fox is on a distinguished road
Default

Now, if you followed Abronsyth's adopt shop with conditions, you should have a unique 'shop'.php and 'shop'view.php.

Open the 'shop'.php (whatever you decided to name it)
Find this:
PHP Code:
$cost $mysidia->db->select("adoptables", array("cost"), "type='{$adopt->getType()}'")->fetchColumn();
            
$moneyleft $mysidia->user->money $cost;

            if(
$moneyleft >= 0){ 
                
$mysidia->user->changecash(-$cost); 
And replace with:
PHP Code:
$premiumcost $mysidia->db->select("adoptables", array("premiumcost"), "type='{$adopt->getType()}'")->fetchColumn();
            
$gemsleft $mysidia->user->premiumcurrency $premiumcost;

            if(
$premiumcurrencyleft >= 0){ 
                
$mysidia->user->changegems(-$premiumcost); 
Now for the last step, open up the 'shop'view.php

Find:
PHP Code:
$cost = new Comment("{$adopts[$i]->getCost()} Mythirian Gold");
            
$costCell = new TCell;
            
$costCell->add($cost);
            
$costCell->setAlign(new Align("right"));            

            
$row->add($idCell);
            
$row->add($imageCell);
            
$row->add($typeCell);
            
$row->add($costCell);
            
$adoptTable->add($row);
        } 
And replace with:
PHP Code:
$premiumcost = new Comment("{$adopts[$i]->getPremiumCost()} Mythirian Gems");
            
$premiumcostCell = new TCell;
            
$premiumcostCell->add($premiumcost);
            
$premiumcostCell->setAlign(new Align("right"));            

            
$row->add($idCell);
            
$row->add($imageCell);
            
$row->add($typeCell);
            
$row->add($premiumcostCell);
            
$adoptTable->add($row);
        } 

And there you have it! A second currency and adopts to buy with it. I'll try to implement an item one too eventually.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:47 AM.

Currently Active Users: 5013 (0 members and 5013 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636