Posted: Sun Oct 30, 2005 2:17 pm Post subject: Adding token system to Dragonfly port of pnFlashGames
Thought I would let everyone that is using the pnFlashGames port for Dragonfly that I am currently working to add a token system for the module.
It will be vary similar to the user points that is currently used in the vip version of the pnFlashGames for phpNuke.
The way it will work is everytime a score is saved the jackpot increases. If the member that played the game beats the topscore of that game then they win the current pot for that game.
This could open doors for other things on your site. Like the possibility for members to use tokens to access other features and stuff. Like maybe forum shops or RPG mods and stuff.
I am currently thinking of triing to add features for the module, features like you would see in a forums/arcade module like ibproarcade.
I am open to any ideas
Will keep everyone informed _________________ My web site running the latest build of pnFlashGames(hq) for Dragonfly CMS.
Last edited by scetter on Fri Nov 18, 2005 6:00 pm; edited 1 time in total
Joined: May 22, 2003 Posts: 23860 Location: NSW, Australia
Posted: Sun Oct 30, 2005 7:16 pm Post subject:
thanks for the heads up scetter..
Ive added a dragon pnFlashGames forum now so feel free to attach files in the forums, submit links, and whatever else you want to do. Try and keep all your information in the one place for the future..
Posted: Tue Nov 01, 2005 2:34 pm Post subject: tokens system added to dragonfly arcade
Where I am at.
I have added the system and seems to be working great.
How it is working right now.
First the function will check to see if the user has enough coins to store a score. ( same as if they have a score above zero or is not an unregistered member) I set it in the code that they need at least 5 coins to have their score stored and have a chance at the jackpot.
then it will check to see if the user has won any jackpots. If not it will add them to a database and give them 0
then it will check again and give them the jackpot if they beat the highest score for that game.
Everytime a score is succesfully stored the jackpot goes up by 20.
The users coins will go down by five. ( As above it checks to see if they have enough coins to store a score )
I plan on triing to add something in the admin section that will allow the webmaster to set an amount that the jackpot will increase and how many coins a member has to use to pay to play the game as well as other things.
This will mean changing the code that I already added a little though.
SQL's that I had to add or alter
Added a new row to users table (coins)
The reason for putting it in the users table was so when ever someone registers at the site they automattically get 500 tokens to use,much easier than hacking the registaration code, also it is a good place to put it so if other modules are developed for dragonfly that use a coin or points system it will be universal..
Added current pot to games table
Added tokenswon table
The reason why I bring up the info on the SQL's that need to be added or updated is because if I post any hacks or something then you will need to know that you will have to manually add tables and rows to your database. I would also post a notebook on walking someone through phpMyAdmin also though.
unless forahoby decides that he is going to use these upgrades in a later release for dragonfly
By for now
_________________ My web site running the latest build of pnFlashGames(hq) for Dragonfly CMS.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum