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 06-17-2017, 10:24 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 162,697
Abronsyth is on a distinguished road
Default

I would add a new column to the owned_adoptables table in phpMyAdmin and call it something like "timestrained," with the default set to 0. Then each time that pet is trained add +1 to that column...then just include an if/else statement to exclude any pets that have been trained 5 times. So...something like...


Add this under the list of defined variables for training:
PHP Code:
$trained $favpet->timestrained
$total $trained 1
And then at the end of each training type (before the break;):
PHP Code:
$mysidia->db->update("owned_adoptables", array("timestrained" => $total), "aid='{$profile->getFavpetID()}'"); 
Before the if($favpet->currentlevel = 3) add this;
PHP Code:
if($favpet->timestrained 5){ 
$document->add(new Comment("This pet has maxed out its allowed training sessions! It can no longer be trained."FALSE));
}
else{...} 
With the {...} containing all of the training stuff.

Let me know if that makes sense/works out!
__________________
My Mods Site (1.3.4, 2020 Mods)
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


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

Currently Active Users: 5556 (0 members and 5556 guests)
Threads: 4,081, Posts: 32,043, 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