Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.1.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 12-10-2009, 02:01 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,470
gjac1
Default RE: Item Shop - 100% Done (For Now)

I just found out that if someone was to replace the id in adopt.php?id=xx from the normal adoption page with an id of a shop adoptable, they will get it for free :(
Reply With Quote
  #22  
Old 12-10-2009, 03:36 PM
Haylzee Haylzee is offline
Member
 
Join Date: Jun 2009
Posts: 34
Credits: 537
Haylzee
Default RE: Item Shop - 100% Done (For Now)

Yeah they can, when I made my shop I changed adopt.php to also link to my buy.php (the page that checks your money and removes the amount owing) instead of doadopt.php and just set the prices of the normal adopts to 0. So they still all have to go through the buy.php page but you can still keep 'free' adoptables.
Reply With Quote
  #23  
Old 12-10-2009, 03:48 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,470
gjac1
Default RE: Item Shop - 100% Done (For Now)

Quote:
Originally Posted by Haylzee
Yeah they can, when I made my shop I changed adopt.php to also link to my buy.php (the page that checks your money and removes the amount owing) instead of doadopt.php and just set the prices of the normal adopts to 0. So they still all have to go through the buy.php page but you can still keep 'free' adoptables.
Could you go into this a bit more please ?? :)

I dont have a buy.php :s
Reply With Quote
  #24  
Old 12-10-2009, 04:17 PM
Haylzee Haylzee is offline
Member
 
Join Date: Jun 2009
Posts: 34
Credits: 537
Haylzee
Default RE: Item Shop - 100% Done (For Now)

ETA: After now looking at this mod, I think it's set up differently from mine so what I've put below might not apply.

Ok this is how I set mine up, I have a shop.php which is the same as adopt.php (at the time I had free adoptables and shop adoptables which is why I made them separate, the free adoptables showed up on adopt.php and the ones that cost money showed up on the shop.php). adopt.php uses doadopt.php to put the pets into the owned adoptables table in the database. I made a copy of doadopt.php and called it buy.php, and edited shop.php so that instead of going to doadopt when adopting, it goes to buy.php instead. My buy.php page is coded to check that the user has enough money, if they don't they get told they don't have enough to buy the pet. If they do have enough, the price of the pet gets deducted from their total and the pet goes into their owned adoptables in the database.

Since promo.php still uses adopt.php and doadopt.php, I left it there as normal, but it didn't take long to realize that people could use adopt.php to get free adoptables, so I altered adopt.php to also link to buy.php (basically removing the need for doadopt.php altogether) because now even the free adoptables will still have to go through the process of the money check (which will of course go through because they are set at 0 currency anyway). So even if someone was to use a shop pet id with adopt.php, they will still get charged for it because it's going through the same system.

Of course, this can all be simplified down to just editing doadopt.php to do what buy.php does, but at the time I wanted to keep my doadopt.php unchanged. And I have simplified it a little by charging currency for all the adoptables, none are free. So they all show up on the same page now anyway.

I'm not entirely sure how you have yours set up, but as long as you make sure any adoptions have to go through the money check and money deduction process, no one can get shop adoptables for free.
Reply With Quote
  #25  
Old 12-11-2009, 11:42 AM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,470
gjac1
Default RE: Item Shop - 100% Done (For Now)

I currently have my shop.php directed to use a file called doadopt2.php which i modified myself to add the money checking/deduction process, but that is on shop.php , if a member just does it using the normal adopt.php then they can still get it for free.
Reply With Quote
  #26  
Old 12-11-2009, 01:10 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,310
Arianna will become famous soon enough
Default RE: Item Shop - 100% Done (For Now)

I just looked through your code - how do you have it so if the cash goes under 0, the adoption doesn't work? Some of my members are at -50 coins and stuff, and even though I'm using a different code, it would be greatly appreciated. :)[hr]
Sorry, I got that worked out now. It was a missing '=' in a statement. To think that I spent half an hour tearing my hair out over that...
Reply With Quote
  #27  
Old 12-11-2009, 06:42 PM
Haylzee Haylzee is offline
Member
 
Join Date: Jun 2009
Posts: 34
Credits: 537
Haylzee
Default RE: Item Shop - 100% Done (For Now)

Quote:
Originally Posted by gjac1
I currently have my shop.php directed to use a file called doadopt2.php which i modified myself to add the money checking/deduction process, but that is on shop.php , if a member just does it using the normal adopt.php then they can still get it for free.
That's because adopt.php is probably still using doadopt.php instead doadopt2.php to add the pets to the database. Your dodoadpt.php, if it hasn't been changed, won't deduct the money, so if someone uses a shop id with adopt.php, the adoption will go through without the deduction process, because that is only happening with doadopt2.php with your deduction code - does that make sense?

Your doadopt2.php is the same as my buy.php - If you edit your adopt.php to use doadopt2.php, it won't matter if people try to use adopt.php to get free adoptables, they won't be able to, because it will still go through the deduction process and deduct the set cost of the adoptable they are trying to get.

In adopt.php find

PHP Code:
<form name='form1' method='get' action='doadopt.php'
and just change doadopt.php to doadopt2.php - it's simple enough to change back later if you want. Just remember that promo adoptables still go through adopt.php so this will count for them too. I was using the promo page to give myself shop adoptables for free by just giving them a code, which can no longer be done with adopt.php going through the money process too.
Reply With Quote
  #28  
Old 12-12-2009, 01:04 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,310
Arianna will become famous soon enough
Default RE: Item Shop - 100% Done (For Now)

Why don't you just make it so all adoptables have prices, even if they are 0? That way you don't need any doadopt2's or the like.
Reply With Quote
  #29  
Old 12-13-2009, 06:58 PM
PTGigi's Avatar
PTGigi PTGigi is offline
Crazily Friendly~HoF
 
Join Date: Jul 2009
Location: Somewhere >.>
Posts: 370
Gender: Female
Credits: 26,323
PTGigi
Default RE: Item Shop - 100% Done (For Now)

Quote:
Originally Posted by gjac1
After spending most of today on this, i have finally figured it out.

After fixing the first few problems i found out that mod wasnt subtracting the cost of the shop item from the current balance, instead it was leaving the user with minus whatever the shop item cost, for example if i had 2000 credits and i bought an adoptable for 500 , it would say my balance was -500 :s , this was due to several things.

Basically all you have to do now is edit the shop.php file and tell it to use doadopt2.php for the actual adoption (search for doadopt.php in shop.php and change it to doadopt2.php) , i have attached my doadopt2.php for you to use with everything fixed.

Thanks again for this original mod, i would never have known where to start making something like this :)

EDIT : oops, it seems i cant attach the file, so i uploaded it here :)

http://www.speedyshare.com/files/19603746/doadopt2.rar
Hey gjac1, is it possible to add that file up again? The site you put it on seems to have deleted it...
__________________


"I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are."~Mewtwo
My Adoptables|Nuzlocke Webcomic
Reply With Quote
  #30  
Old 12-14-2009, 04:45 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,470
gjac1
Default RE: Item Shop - 100% Done (For Now)

Quote:
Originally Posted by Arianna
Why don't you just make it so all adoptables have prices, even if they are 0? That way you don't need any doadopt2's or the like.

This is what i ended up doing, but i have to manually change the shop value in myphpadmin to 2 so i can still keep the regular adoptable separate from the shop ones and on different pages.

Thanks for the help :)[hr]
pokemontrainergigi, Here is my doadopt2.php if you still need it :)

http://www.mediafire.com/?5i1qiyvy0mo
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
images on adoptables not working. Mortain Questions and Supports 7 11-14-2015 09:39 AM
Choosing Adoptables Type [EASY ADOPTABLES SCRIPT ONLY] Ashje Addons/Mods Graveyard 2 05-24-2009 03:17 AM
Help adoptables site isn't working!!! GamingMotion Questions and Supports 7 05-17-2009 05:02 AM
Shop and... 12345 Questions and Supports 1 03-05-2009 07:59 AM
Shop? trollis76 Questions and Supports 6 02-20-2009 12:46 AM


All times are GMT -5. The time now is 01:58 PM.

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