Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2017, 07:25 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 96,594
Dinocanid is on a distinguished road
Default

Oh! Okay, then you would first get the species of the user's adopt with this:
Quote:
$aid = $this->getField("aid")->getValue();
$adopt = new OwnedAdoptable($aid);
$type = $adopt->getType();
If you're using the manage function in myadoptsview.php. Then from there it depends on how the traits are stored. If they have their own separate columns in the database then you could do something like:
Quote:
if($type = "insertspecieshere"){
$trait1 = $mysidia->db->select("adoptables", array("yourtrait"), "type = '{$type}'")->fetchColumn();
}
This is assuming that, in the prefix_adoptables table, each trait is a seperate column and not all bunched into one column. Then, depending on the species, the first trait will be changed accordingly. Then to show the trait to the user you could do this:
Quote:
$document->add(new Comment("Traits: {$trait1}, {$trait2}, etc..."));
__________________
Reply With Quote
  #2  
Old 05-04-2017, 07:36 PM
KatFennec's Avatar
KatFennec KatFennec is offline
Member
 
Join Date: Apr 2017
Posts: 57
Gender: Female
Credits: 11,863
KatFennec is on a distinguished road
Default

Alright, and I'm going to need to use db referrals instead of getWhatever, if I need to use these in an item function, yeah?
__________________
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 09:03 AM.

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