Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
Having an adoptable available only once?
Basically I want users to be able to adopt a certain critter when they join the site only once and never again. I actually do know this is enabled already with the adoptable conditions section "You want user to have no more than THIS many types of this adopt".
However, if they trade it away, say, to a friend or something, they can adopt another and then just get their old one back, which is what I don't want to happen. :c I'm sure some users will eventually figure this out and the value of this adopt will go down (not to mention it will be highly frowned upon by me). Anyone have solutions? I could live with I guess if I have to. I guess in the meantime I'll make them a non tradeable species even though I wanted them to be able to get traded. :L |
#2
|
||||
|
||||
You want a species of pet that you can never ever get again, even if you trade it away. I think what you should do is add a flag to the character's account when that particular species is adopted and then check for that flag on the page that offers the pet.
Let's just say the species name is "Kitsu". In adopt.php, after the adoptable is inserted into the database (shouldn't be hard to find), let's go ahead and check what type it is. PHP Code:
Now, in adoptsview.php, you'll want to find where the table of available adopts is being built. It should look something like this: PHP Code:
PHP Code:
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 01-10-2016 at 02:23 PM. |
#3
|
||||
|
||||
Funny, I actually thought about calling them Kitsu at first. cx
Thank you so much! I'll get this added soon and let you know how it works. And yea, I think I would only need it for the one species, however, I plan on implementing a quest system using the Explore mod with modifications. This bit of code will probably be useful for that too. No doubt I'll probably post here needing help with it though. x.x |
#4
|
||||
|
||||
Hmm, I added the code but when I went to the adopt page, there's just a black line there and no eggs. :I
|
#5
|
||||
|
||||
Hmmnngh... all the eggs are leaving and not just the one of a specific type? I'll need HoF to actually look at it and think it through. >< I'm probably close.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. |
#6
|
||||
|
||||
Aww it's okay, thank you anyway Kyttias! <3 I don't mind having them non-tradeable for now!
|
|
|
What's New? |
What's Hot? |
What's Popular? |