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 05-10-2015, 08:43 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,512
Missy Master is an unknown quantity at this point
Default Removal Mod for Item Add Mod [Part Two]

Before you start:

One complication is that all your pets -- those from adoptions, breeding, whatever --will need an imageurl in their owned_adoptables table. Still working on how to ensure that, so .. I'd say that needs to be next to make this a finished solution that all may use.



This is the 'mate' to the Item Add Mod. This is for 1.3.4.

First .. backup the database and download the sql. Then backup ALL files you are going to be modifying before you do that. I think I have this right but I would hate to see anyone lose their Site workability!

Note: I am working on a way to just remove one Item at a time, and also a way to place it back into the User's inventory!


1. This will remove all the items on a Pet, it will be called RemovAll here, you can name it what you wish.

Note this below assumes you have five item slots. Add or subtract as needed!


In functions_items add:

Code:
function items_click9($item, $adopt){

  $mysidia = Registry::get("mysidia");
  $newclicks = $item->value;
  $mysidia->db->update("owned_adoptables", array("toy_1" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'");
  $mysidia->db->update("owned_adoptables", array("toy_2" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'");
  $mysidia->db->update("owned_adoptables", array("toy_3" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'");
  $mysidia->db->update("owned_adoptables", array("toy_4" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'");
  $mysidia->db->update("owned_adoptables", array("toy_5" => $newclicks), "aid='{$adopt->aid}'and owner='{$item->owner}'");


  $note = "You used a {$item->itemname}, and the Pet has just used {$item->value} and had all items removed<br>";
  //Now lets check if the adoptable has reached a new level.
  
 

  //Update item quantity...
  $delitem = $item->remove(); 
  return $note;
}


2. in class_privateitem add where you see the list of those like this:

Code:
case "Click9":
            $message = items_click9($this, $owned_adoptable);
            break;

3. Go in and create an item called RemovAll [ or whatever you like ] and select function Click9 --- VALUE is Empty -- nothing else, just the word Empty -- this will kick up the Empty.png for you to use to replace all the item images, so it will appear as if there is nothing there again.

***Note: be sure you have a TRANSPARENT .png called Empty.png in the picuploads folder!

This should be the same size as your Pet images, or as large as the largest of them.

Do not confuse the image for the Item with the Empty.png itself. One is for your inventory and the shop, and the other is the actual item itself.


itemname RemovAll
description Removes Items
imageurl URL where the image for this item lives : ie http://pet-sim.com/Canidae/images/Removeall.png

function Click9
target all
value Empty
shop Wherever you are selling it
price Price
chance 100
cap
tradable yes
consumable yes


Okay I think I have this right, and if I have omitted something please forgive me. The files for my class_privateitem and functions_items are uploaded on the Add Item Mod, if you need them.

Good luck and as always, BACK IT ALL UP! :)

Last edited by Missy Master; 05-10-2015 at 08:57 PM.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.4 Item Shop Mod(s): NPC + Item Display + Tooltips Kyttias Mys v1.3.x Mods 55 06-19-2020 11:21 AM
1.3.4 Item Add Mod To Pets: Reworked [Part One] Missy Master Mys v1.3.x Mods 15 09-06-2015 07:50 PM
Buy X of Item A to receive X of Item B AndromedaKerova Suggestions and Feature Requests 0 11-09-2014 08:17 PM
What do this part of the config mean? LilPixie Questions and Supports 13 02-09-2009 01:15 PM


All times are GMT -5. The time now is 08:32 AM.

Currently Active Users: 437 (0 members and 437 guests)
Threads: 4,080, Posts: 32,024, 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