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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-29-2014, 12:57 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 66,670
Hwona is on a distinguished road
Default Creating Items to Raise Stats

This post will explain how to create items to raise an adoptable's stats.


1. Go to the “item_functions” table in your database. Once there, click the “insert” tab at the top of the page. You should arrive at a page like this:

Fill out the values to match those in the example and then press “Go”.

2.Go to the “functions_items.php” file in the “functions” folder. Add this item function to the list:
PHP Code:
function items_statname($item$adopt){ $mysidia Registry::get("mysidia"); $newstatname $adopt->statname $item->value$mysidia->db->update("owned_adoptables", array("statname" => $newstatname), "aid='{$adopt->aid}'and owner='{$item->owner}'"); $note "By using {$item->itemname}, the adoptable's Statname raised by {$item->value}!"$delitem $item->remove(); return $note; } 
3. Go to your “class_privateitem.php” file in the “classes’ folder. See all that case-break stuff? Add this to the list:
PHP Code:
case "Statname":
            
$message items_Statname($this$owned_adoptable);
            break; 
4. Go to your ACP and create a “Statname” item. Make your you allow it to be consumed!

Tada! The next post shall cover the award system!
__________________

Last edited by Hwona; 07-01-2014 at 12:32 PM.
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

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 09:48 PM.

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