Cash System
OK.. I suck at tutorials but I will give this a try
Find PHP Code:
PHP Code:
PHP Code:
You will have to modify your adopts_users table and add a new field called money `money` int(11) NOT NULL default '0', Lastly you will have to modify your register.php page PHP Code:
Sea |
RE: Cash System
Very nice seapyramid =D
This will even work with the next release of the forum, as it gives points for posts and what not which could be "converted" into "money". |
RE: Cash System
Thanks so much for posting this Sea.
|
RE: Cash System
Thank you & all are quite welcome.
Sea |
RE: Cash System
I just installed this, it wasn't even that bad. :) You did a great job on this Sea. Nice and easy.
|
RE: Cash System
Quote:
|
RE: Cash System
I just came across an idea to show how much money a user has on their profile & in their sidefeed menu. What variable would I need to use for that?
|
RE: Cash System
Thanks, this works really well. :)
Now to figure out what to use the currency for lol. |
RE: Cash System
rolf.. I do have a few games that are generic the can can be used on by those with a bit of knowledge... items systems are quite personalized to the site so I cant help you there. :)
Sea |
RE: Cash System
lol well I managed to show the currency on profiles so at the moment it can just be used to show who clicks the most pets. :D
|
RE: Cash System
Wow, this is awesome. :D
I just installed it (very easy to, thanks!) and it's working amazingly. I might add something so pets can be 'bought', is that okay? I'll share it on here, when I'm finished. :) |
RE: Cash System
Sure its ok :) Actaully I have a separte shop for that which also uses paypal ipn.. you might want to look at it http://mysticgrove.net/grove/shop_queen.php For just using the ingame coin to buy stuff I have http://mysticgrove.net/grove/shop_gnome.php for trinkets (kinda like mini pets I gues) & http://mysticgrove.net/grove/shop_merlin.php for useable items. I also currently have 3 gambling games in game coin can be used for with more planned :)
Much can be done with the coin system once it is in place :) Sea |
RE: Cash System
Ooh, awesome. :) I love how you have the trinket shop and stuff. :) I think that I'll work on the code when I have time, then. x3
|
RE: Cash System
I just made the thing to buy adoptables. It works well, except for I can't get it to set the price in the admin CP - it always defaults to then 10 that I've set. Here's what I did.
PHP Code:
|
RE: Cash System
Sea, I hate to be annoying (xD) but have you any idea on the price of the adoptables not working? I thought I was following the same layout as other stuff, but somehow, I guess it isn't working. :P
|
RE: Cash System
Sorry,
I have been very busy, we just put the script rewrite/opt code on line this morning & preparing all the changes & setting it live was a big task. :) I will try to look at the code this week. Right now, I am tweaking bugs with the new lease & starting on the new full featured trading system coming next. Sea |
RE: Cash System
Ooh, that sounds awesome! And scary, too.
The trading system sounds awesome, too. |
RE: Cash System
Hey Arianna I sort of got your cash thing working...
I will try to make a tut of what I did. Yours worked sorta of but you missed a few things it needed... I am currently trying to make it so if you dont have enough money then you cant buy it... As of right now it allows you to go negative... PHP Code:
|
RE: Cash System
Maybe just check if ($newcash>=0) and then determine it via elseif. :)
|
RE: Cash System
PHP Code:
Also in the admin you can change how much it cost to get the adoptable. If you manage to install this it is wonderfull... or if someone does install it and makes a better tut that would be better! you can see it work at Forumbuds Also some of my code may be weird or not wonderful... because I am a very novice PHP coder lol. |
RE: Cash System
I made a shop system awhile ago when the currency system was posted here, but it's a little different from yours Arianna. I checked out the cash/shop system someone made for the older version of the script and used that to make one for my site. I made a copy of the adopt.php page and called it shop.php, which shows the prices of the adoptables, and and a copy of the doadopt.php page and called it buy.php, when you buy an adoptable it leads to that instead of doadopt, and that page determines whether you have enough of the currency to buy the adoptable before it inserts into the database, and it removes the cost of the adoptable from the user's currency total. It works perfectly as far as I can see so far. I'm totally a php novice so I just really had to play around.
I never even bothered editing the admin.php page to be able to set prices or anything like that, I've just been doing it through phpmyadmin. lol actually it didn't even occur to me to try it, now I should go play around with that. |
RE: Cash System
Nice, Well it works well just lots of editing involved which may turn some off. I might try to do separate pages also but I got it installed on mine... although I need to code it so it put free ones in a different group then pay ones...
|
RE: Cash System
I think that I'll just go and check with 'if', and I can say that it won't insert, if they don't have enough money. I think I'll have that done in a few days. :)
|
RE: Cash System
This mod is excellent, thank you very much for posting it :)
It installed and works perfectly. |
RE: Cash System
I noticed that people still get a cash increase even if they have already levelled that adoptable that day, is there anyway to change it so members cant just keep re clicking on the same adoptable over and over to get credits ?
|
RE: Cash System
That doesn't happen on my site - are you sure that you've pasted the code into the right place?
|
RE: Cash System
That doesn't happen on mine either, but I do remember I had to add an if statement to make the whole cash code work only when the adoptable isn't frozen, because it was originally letting you get the currency for continuously clicking the same frozen adoptable over and over.
|
RE: Cash System
Yes, i defiantly added it correctly :s , i will just have to try and figure it out as Haylzee did :)
|
RE: Cash System
That was a glitch before posting but has been corrected long before this was posted. If you are having that issue you dont have it embedded correctly.
|
All times are GMT -5. The time now is 05:40 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.