#1
|
||||
|
||||
Item Function: change the type of an adopt
10/01/2014:
Final code for changing the adopt type to a new adopt type, and limited to only the max level thanks once again to IntoRain for helping me with the code here is the final code: open: functions/functions_items.php and paste this code before the ?> IMPORTANT!!! Replace any Moonlight Fairy Dragon, for the Type of the adopt you have selected as the new Type!!! Also i use for my site a max level of 10 replace it for your max level number!!! And edit the $notes = with the info you think fits better your site PHP Code:
PHP Code:
you can find some edit to the code in this thread: change the image of a specific adopt for a custom image: (this will change the adopt image to any image you have selected, this means any adopt that use this item will have that specific image, to prevent this you must select the id of the adopt types that can use it or are compatible in the item creation page) function/function_items.php http://www.mysidiaadoptables.com/for...7&postcount=13 class/class_privateitem.php case: http://www.mysidiaadoptables.com/for...9&postcount=15 you must copy and paste the code for each custom skin you will add, also remember to select which adopt will be able to use the item in the item creation page, or any adopt will have the custom skin. Revert the image of the adopt back to his/her original image(this is to use as part of the custom image code) function/function_items.php and class/class_privateitem.php case: http://www.mysidiaadoptables.com/for...3&postcount=19 remember you must add the info in the database too, so you can select and use the item function in the item creation page Original older post thanks to Wallie987 and IntoRain for the gender item: http://www.mysidiaadoptables.com/for...er+item&page=3 I manage to edit it and make a different function code and like the title says i need a little help with it. The thing is that the current code is working like a charm, and it does what is supposed to do: Change the Type of any adopt to a Specific Adopt, great for a evolution item, but what i really want or need is: For the code to also check if the adopt is at the max level in my case level 10. this is the code: PHP Code:
Please take in mind that any instruction or idea to fix it will be in vain... I can only copy/paste already created codes and make small edits... i cant make anything from scratch even if my life was depending on it =( but i can make some pixel or digital items as a thanks for helping me with the code. For those that want to use the code for their site, the code is working just need to replace the "moonlight fairy dragon" with the adopt type you want and if you want to make it more specific and only target a certain adopt, just change the $type in PHP Code:
PHP Code:
Thanks Wallie987 and IntoRain for the gender item. Last edited by kristhasirah; 10-01-2014 at 04:02 PM. Reason: the code is fixed and working |
#2
|
||||
|
||||
I'm glad we were able to help ^^ Adding the following will let you check if the adoptable is at level 10:
PHP Code:
PHP Code:
__________________
asp.net stole my soul. |
#3
|
||||
|
||||
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! It works perfectly!!!!
if you need some items (pixel or digital) just tell me and i will happily make them for you =D |
#4
|
|||
|
|||
Ooh I love this mod idea! Do you mind if I use it and try to make it a randomized one (so it will change to a random color of the breed?)
|
#5
|
||||
|
||||
I don't have a site currently, but thank you! ^^ I'm glad it worked!
__________________
asp.net stole my soul. |
#6
|
||||
|
||||
ilrak: i dont see any problem with that, and i think it would be cool to have a random color changer
and IntoRain: if you decided to start making a site just tell me and i will gladly make those items for you =) or i can make something else for you ^^ |
#7
|
||||
|
||||
Really love this whole thing, and will be adding it as well, thanks for the good work! :)
|
#8
|
||||
|
||||
Thank you! I really appreciate that ^^
__________________
asp.net stole my soul. |
#9
|
|||
|
|||
So, I tried doing this code as-is first to see if I could get it to work on my site before trying a random changer and I'm running into this error:
Quote:
EDIT: Nevermind. There were one too many brackets. Now I just need to try and fix the invalid function error and then I'm set! Last edited by ilrak; 09-29-2014 at 02:15 PM. |
#10
|
||||
|
||||
Would there be a way to adapt this code so that you can make an item that changes an adoptable into something else? (I mean like reuse it multiple times, on different items, for different kinds of adopts) That way you could have 'skins' for your adopts or something... correct me if I am wrong and this is already what it does XD I don't totally understand XD
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mys v1.3.4 Item Function: Gender Change Potion | Kyttias | Mys v1.3.x Mods | 21 | 10-12-2016 07:52 PM |
Calling a function in a function from the same class page | Hwona | Questions and Supports | 2 | 04-25-2015 08:41 AM |
Item Function Is Invalid | Hwona | Questions and Supports | 31 | 09-27-2014 09:27 PM |
Item Function Suggestions | NobodysHero | Suggestions and Feature Requests | 5 | 06-23-2014 03:45 AM |
What's New? |
What's Hot? |
What's Popular? |