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
  #31  
Old 02-04-2017, 10:28 AM
Silver_Brick Silver_Brick is offline
Designer || Coder
 
Join Date: Oct 2016
Location: In Earth
Posts: 205
Gender: Male
Credits: 31,341
Silver_Brick is on a distinguished road
Default

I'm not sure if I did something wrong when I changed the price of training but I absentmindedly pressed the button for training while I testing and noticed my money was in the negative.

need help with this
Reply With Quote
  #32  
Old 02-04-2017, 01:20 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,641
Abronsyth is on a distinguished road
Default

Quote:
Originally Posted by Corsair View Post
I'm not sure if I did something wrong when I changed the price of training but I absentmindedly pressed the button for training while I testing and noticed my money was in the negative.
Quote:
Originally Posted by lotus View Post
@Corsair
Try adding this to see if it'll help (make sure to define $traincost):
PHP Code:
if($mysidia->user->money $traincost) {
   
$document->add(new Comment(" You don't have enough money to train your companion!"));
  return;

This issue came up and lotus shared the solution :)
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #33  
Old 02-13-2017, 10:54 AM
Silver_Brick Silver_Brick is offline
Designer || Coder
 
Join Date: Oct 2016
Location: In Earth
Posts: 205
Gender: Male
Credits: 31,341
Silver_Brick is on a distinguished road
Default

ok and would you like to work with me an make a battling system where two user can battle online ??
Reply With Quote
  #34  
Old 02-13-2017, 03:20 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,641
Abronsyth is on a distinguished road
Default

Sorry, that is quite beyond my capabilities!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #35  
Old 05-24-2017, 08:21 PM
Fox Fox is offline
Member
 
Join Date: Oct 2016
Location: Australia
Posts: 34
Gender: Female
Credits: 7,316
Fox is on a distinguished road
Default

What would you suggest to limit the amount of training?
Say, you can only train any pet up to 5 times (regardless of stat) so you don't end up with a billion highly trained pets? It forces you to breed and train for better stats?
Reply With Quote
  #36  
Old 06-17-2017, 11:24 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,641
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
  #37  
Old 07-19-2020, 09:26 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 64,556
Missy Master is an unknown quantity at this point
Default

For what its worth, going back in all this time later, this brilliant Mod just needs all the attributes (sense, etc) changed to public instead of private.

I am much more php savvy a few years in -- and found it easy to get it working just fine!

Highly recommend this awesome and fun Mod!


Thanks again for it!
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


All times are GMT -5. The time now is 11:53 PM.

Currently Active Users: 722 (0 members and 722 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 - 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