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
  #81  
Old 01-12-2016, 07:17 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 117,055
Abronsyth is on a distinguished road
Default

Now if only I could get the stat value to show in from the levelupview.php file, haha (unfortunately {$adopt->getStatname()}, {$this->adopt->getStatname()}, and {$statname} do not work, though {$statname} works just fine in the levelup.php file).

Ooh, that's a cool idea, Kyttias!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #82  
Old 01-12-2016, 07:48 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 90,758
Kyttias is on a distinguished road
Default

Try {$adopt->statname}?
__________________
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.
Reply With Quote
  #83  
Old 01-12-2016, 08:16 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 117,055
Abronsyth is on a distinguished road
Default

Ended up with this error;
Fatal error: Cannot access protected property OwnedAdoptable::$magic in /home/catisserie/public_html/view/levelupview.php on line 27

(magic being the name of the stat)

Still trying several things to try to work around it.
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #84  
Old 01-12-2016, 10:01 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 90,758
Kyttias is on a distinguished road
Default

In classes/class_ownedadoptable.php add public $magic; to the variables at the start.
__________________
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.
Reply With Quote
  #85  
Old 01-13-2016, 06:40 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 117,055
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 06:49 AM.
Reply With Quote
  #86  
Old 01-13-2016, 09:36 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 90,758
Kyttias is on a distinguished road
Default

*shrug* Bizarre. This is exactly what I use for my pet's personality (so, same concept of rendering it to levelupview.php):

Code:
This is a {$adopt->size}-sized, {$adopt->nature} {$adopt->type} that likes {$adopt->likes} and dislikes {$adopt->dislikes}.
Keeping in mind that in just levelup.php it has to be:

Code:
This is a {$this->adopt->size}-sized, {$this->adopt->nature} {$this->adopt->type} that likes {$this->adopt->likes} and dislikes {$this->adopt->dislikes}.
Because it wants the '$this' involved.

If you really wanted to you could create a function by copying over one of the existing ones in class_ownedadoptable.php but it seems really redundant.

Then again, I also display my birthdays with just $adopt->birthday and you should also really be able to call gender with just $adopt->gender (after making it no longer protected). At least in v1.3.4, because of how things pull from the database. Basically any column name should be able to show up this way. Check if there's value in it for that specific adopt???
__________________
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; 01-13-2016 at 09:38 AM.
Reply With Quote
  #87  
Old 01-13-2016, 04:50 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 117,055
Abronsyth is on a distinguished road
Default

There is indeed a value in for that adopt (and for all of them I've tested), but it simply will not show up (though it does show up when I re-visit that adopt so it loads the "you've already seen this pet today" page). I've even tried adding the function to the levelupview.php page. I'm having the same issue with displaying the "medals" with the levelupview.php file, as well. What's really odd is that I use {$adopt->getBirthday();} to show the adoptable's birth-date, and that shows up just fine, so I do not understand why {$adopt->getMagic();} isn't working, since they're both defined in all the same places, the same way in class_ownedadoptable.php:
PHP Code:
    public function getBirthday(){
        return 
$this->birthday;
    }
    
    public function 
getMagic(){
        return 
$this->magic;
    }
    
    public function 
getMagicMedalStatus(){
        return 
$this->magicmedalstatus;
    } 
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #88  
Old 03-24-2016, 05:51 PM
aiiree aiiree is offline
Member
 
Join Date: Mar 2016
Posts: 17
Gender: Male
Credits: 2,405
aiiree is on a distinguished road
Default

Does anyone have a copy of the screenshots for this mod since the images aren't avalible in the first post?

:)
Reply With Quote
  #89  
Old 03-24-2016, 06:03 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 34,492
Ittermat is on a distinguished road
Default

Heres the post kyttias made to try to help explain the parts from the images

http://mysidiaadoptables.com/forum/s...0&postcount=74
Reply With Quote
  #90  
Old 03-25-2016, 10:27 AM
aiiree aiiree is offline
Member
 
Join Date: Mar 2016
Posts: 17
Gender: Male
Credits: 2,405
aiiree is on a distinguished road
Default

Thank you!

Sorry, Is there a way to have more than one stat, would I just add another colum or would it change the directions? I'm fairly new thisthis so I'm not really sure.

Last edited by aiiree; 03-25-2016 at 10:34 AM.
Reply With Quote
Reply


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 12:29 AM
Making v.1.3.3 Stat Mod Compatible with V.1.3.4 Hwona Questions and Supports 0 07-08-2014 01:37 PM
Stat Inheritance Mod * thanks to Wallie! * Missy Master Mys v1.3.x Mods 0 06-30-2014 02:23 PM
Anyone Want to Have a Stat System Hwona Feedback and Suggestions 12 06-30-2014 09:30 AM
Basic Stat System Hedgen Questions and Supports 3 03-10-2013 02:47 PM


All times are GMT -5. The time now is 01:22 PM.

Currently Active Users: 943 (0 members and 943 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636