Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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:
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:
PHP Code:
Example: PHP Code:
Hoep i helped :)
__________________
Need coding help? send me a PM! :) |
#2
|
||||
|
||||
This is really awesome. I do find 1 problem though. If a user lines up 2 numbers, but they're in slot 2 & 3, they don't get the match 2 prize, only match 1. Is there any way to change that?
|
#3
|
|||
|
|||
u have to have all 3 numbers to get a prize, that was meant to be
well, my base is coded like if slot1 =2 and slot2=2 and slot3=2 , then u will get a price, its easy to change tough. as u see this code PHP Code:
PHP Code:
__________________
Need coding help? send me a PM! :) |
#4
|
||||
|
||||
ah, I see, I'll try adding some new prize numbers then :3
Thank you! |
#5
|
|||
|
|||
No Problem :)
__________________
Need coding help? send me a PM! :) |
#6
|
||||
|
||||
Just in case others would like there to be a match 2 secondary prize (and just change the rewards to match your taste)
Code:
if($slot1 == 1 && $slot2 == 1 && $slot3 == 1){ $reward = 30; }elseif($slot1 == 2 && $slot2 == 2 && $slot3 == 2){ $reward = 30; }elseif($slot1 == 3 && $slot2 == 3 && $slot3 == 3){ $reward = 30; }elseif($slot1 == 1 && $slot2 == 1 && $slot3 == 2){ $reward = 10; }elseif($slot1 == 1 && $slot2 == 1 && $slot3 == 3){ $reward = 10; }elseif($slot1 == 2 && $slot2 == 1 && $slot3 == 1){ $reward = 10; }elseif($slot1 == 3 && $slot2 == 1 && $slot3 == 1){ $reward = 10; }elseif($slot1 == 2 && $slot2 == 2 && $slot3 == 1){ $reward = 10; }elseif($slot1 == 2 && $slot2 == 2 && $slot3 == 3){ $reward = 10; }elseif($slot1 == 1 && $slot2 == 2 && $slot3 == 2){ $reward = 10; }elseif($slot1 == 3 && $slot2 == 2 && $slot3 == 2){ $reward = 10; }elseif($slot1 == 3 && $slot2 == 3 && $slot3 == 1){ $reward = 10; }elseif($slot1 == 3 && $slot2 == 3 && $slot3 == 2){ $reward = 10; }elseif($slot1 == 1 && $slot2 == 3 && $slot3 == 3){ $reward = 10; }elseif($slot1 == 2 && $slot2 == 3 && $slot3 == 3){ $reward = 10; }else{ $reward = 1; } Last edited by Solistia; 05-04-2011 at 02:37 PM. |
#7
|
|||
|
|||
i am not a VERY good coder myself too, but i manage to do stuff, it looks good :)
__________________
Need coding help? send me a PM! :) |
#8
|
|||
|
|||
Quote:
This is just a small example: PHP Code:
|
#9
|
|||
|
|||
thanks, im not that good with array, i saw some examples, but if all 3 match would be good for me xD
__________________
Need coding help? send me a PM! :) |
#10
|
|||
|
|||
Mapleblade, instead of comparing the variable to a number why not just compare it to each other?
PHP Code:
should be PHP Code:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with levelup in 1.3.3? | Infernette | Questions and Supports | 1 | 03-25-2013 06:47 PM |
Arcade Site Idea | Nemesis | Other Chat | 8 | 09-01-2012 06:16 PM |
Slotmachine | mapleblade | Mys v1.2.x Mods | 17 | 05-11-2011 06:23 PM |
help with levelup.php please | Sensacionsk8 | Questions and Supports | 7 | 02-27-2011 02:44 PM |
help me with levelup.php | Sensacionsk8 | Questions and Supports | 0 | 02-23-2011 06:48 PM |
What's New? |
What's Hot? |
What's Popular? |