Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-20-2016, 08:35 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 164,687
Abronsyth is on a distinguished road
Default

For some reason it seems to just keep resetting it to 0.

Here is the function currently:
PHP Code:
function items_health($item$adopt){
  
$mysidia Registry::get("mysidia");
  
$addHealth $adopt->health $item->value;
      
//Check if the adoptable's health is already at maximum.    
  
if($adopt->health 100){
    
$note "Your gryphon is already fully healed! The {$item->itemname} was not used.";
  }
  
//Not a maximum, but don't go overboard!
  
elseif($addHealth 100){
    
$mysidia->db->update("owned_adoptables", array("health" => 100), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
    
$note "The {$item->itemname} fully healed your gryphon!";
    
$delitem $item->remove();
  }
  
//Not at maximum, won't go overboard. Proceed.
  
else{
    
$mysidia->db->update("owned_adoptables", array("health" => $addhealth), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
    
$note "The {$item->itemname} raised your gryphon's health by {$item->value}! Their health is now at {$addHealth}.";
    
$delitem $item->remove();
  }
  return 
$note;

The health is at 0, and when I use the potion it now tells me that my pet is already fully healed, and it doesn't use the item up, but the health is still 0.
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 11-20-2016 at 08:41 AM.
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 08:42 PM.

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