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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2016, 07:40 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 167,414
Abronsyth is on a distinguished road
Default

Well, it's not coming up with an error now, but instead it's simply displaying a blank where the data should be displayed.
(.../view/levelupview.php):
PHP Code:
    public function click(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;                
        
$adopt $this->getField("adopt");
        
$reward $this->getField("reward")->getValue();
        
$document->setTitle("{$this->lang->gave} {$adopt->getName()} one {$this->lang->unit}");
        
        
$image $adopt->getImage("gui"); 
        
$image->setLineBreak(TRUE);        
        
$summary = new Division;
        
$summary->add($image);    
        
$summary->add (new Comment("<ul>
                                        <li><b>Name:</b> 
{$adopt->getName()}</li>
                                        <li><b>Owner:</b> <a href='/profile/view/
{$adopt->getOwner()}'>{$adopt->getOwner()}</a></li>
                                        <li><b>Birthday:</b> 
{$adopt->getBirthday()}</li>
                                        <li><b>Type:</b> 
{$adopt->getType()}</li>
                                        <li><b>Sex:</b> 
{$adopt->getGender()}</li>
                                        <li><b>LVL:</b> 
{$adopt->getCurrentLevel()}</li>
                                        <li><b>Total EXP:</b> 
{$adopt->getTotalClicks()}</li> 
                                        <li><b>Magic:</b> 
{$adopt->magic}</li>
                                    </ul>"
));
        
$summary->add(new Comment("{$this->lang->gave}{$adopt->getName()} one {$this->lang->unit}."));
        
$summary->add(new Comment($this->lang->encourage));
        
$summary->add(new Comment("<br> You have earned {$reward} {$mysidia->settings->cost} for leveling up this cat. "));
        
$summary->add(new Comment("You now have {$mysidia->user->getcash()} {$mysidia->settings->cost}"));
        
$document->add($summary);            
    } 
And, just to make things even more fun, I'm also having a funny issue with the item that raises the stat. For some reason instead of adding +1 to the stat, it sets the stat itself to 1. I'll play around with this, though, and see if I can get it to work by studying the other functions more.

Edit:
OK, I got the function to work by doing this;
PHP Code:
 function items_magic($item$adopt){
  
$mysidia Registry::get("mysidia");
  
$magic $mysidia->db->select("owned_adoptables", array("magic"), "aid='{$adopt->aid}'");
  
$newmagic $magic $item->value;
  
$mysidia->db->update("owned_adoptables", array("magic" => $newmagic), "aid='{$adopt->aid}'and owner='{$item->owner}'");
  
$note "By using {$item->itemname}, the cat's magical skill has raised by {$item->value}! This cat now has {$newmagic} skill!<br>";
    
//Update item quantity...
  
$delitem $item->remove(); 
  return 
$note;

So at least I fixed that issue ^^
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 01-13-2016 at 07:49 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trade System Kyttias Questions and Supports 4 05-29-2016 01:29 AM
Making v.1.3.3 Stat Mod Compatible with V.1.3.4 Hwona Questions and Supports 0 07-08-2014 02:37 PM
Stat Inheritance Mod * thanks to Wallie! * Missy Master Mys v1.3.x Mods 0 06-30-2014 03:23 PM
Anyone Want to Have a Stat System Hwona Feedback and Suggestions 12 06-30-2014 10:30 AM
Basic Stat System Hedgen Questions and Supports 3 03-10-2013 03:47 PM


All times are GMT -5. The time now is 03:55 AM.

Currently Active Users: 14174 (0 members and 14174 guests)
Threads: 4,082, Posts: 32,047, 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