View Single Post
  #1  
Old 05-04-2011, 12:40 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 19,893
mapleblade
Default slotmachine.php, the slotmachine from the levelup, but for the arcade!

Hiya there as u may have seen, ive made a slotmachine script for when u level and adoptable, that u have a chance to win prices!

Now ive made it that its an new .php file wich includes:

-Unspammable (users can only use it once a day)
-Easy customizable price gold amount



First of all, you will need to run a MYSQL Query
PHP Code:
CREATE TABLE IF NOT EXISTS `adopts_slotmachine_used` (
  `
datevarchar(30) DEFAULT NULL,
  `
usernamevarchar(50) DEFAULT NULL,
  `
ipvarchar(50) DEFAULT NULL
ENGINE=MyISAM DEFAULT CHARSET=latin1
Second: Download the slotmachine map for the images (if you dont already have it from the levelup script)

Third: Download slotmachine.php

And your done :D

EXTRA!
Now the prices seem pretty low, 20,30,50 for once a day, but here i will explain how to edit the prices.

in slotmachine.php find:
PHP Code:
if($slot1 == && $slot2 == && $slot3 == 1){ 
You will see this line under it, this is if all slots are pointed at 1
PHP Code:
$reward 20
Change that value to whatever you like to get as prize when someone gets all 1's

Example:
PHP Code:
$reward 300
Do that the same for 2 and 3, those are precisely the same as the above, and should be under this first code.

Hoep i helped :)
Attached Files
File Type: zip slotmachine.zip (1.2 KB, 112 views)
File Type: php slotmachine.php (2.6 KB, 106 views)
__________________
Need coding help? send me a PM! :)
Reply With Quote