slotmachine.php, the slotmachine from the levelup, but for the arcade!
2 Attachment(s)
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 :) |
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?
|
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:
|
ah, I see, I'll try adding some new prize numbers then :3
Thank you! |
No Problem :)
|
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){ |
i am not a VERY good coder myself too, but i manage to do stuff, it looks good :)
|
Quote:
This is just a small example: PHP Code:
|
thanks, im not that good with array, i saw some examples, but if all 3 match would be good for me xD
|
Mapleblade, instead of comparing the variable to a number why not just compare it to each other?
PHP Code:
should be PHP Code:
|
yeah, i tried that b4, but it didnt seem to work correctly, maybe i had a typo or something, and that gives 20 for all numbers
mine vary (all 1's give 20, all 2's give 30 and all 3's give 50) EDIT: aah i see what i did wrong back then, i used 2 = (==) instead of 3 :x, im not an amazing coder :P |
No...actually, it doesn't really matter if you use 2 or 3 equal signs.
I use 3 in my example, so that it matches the type too not just the number value. Using 3 equal signs is slightly faster You probably did made a typo before or maybe something else that made the code didn't work properly |
well, i rest this script now, im making me a item script, i already made item management(make items and edit thhem)
EDIT: ii also made an item seller now, im also gonna make a resell function now. |
This looks rather awesome, will help lots of members I am sure. Slotmachine is a very popular minigame, hopefully everyone finds it valuable.
|
Ty :D
(btw, is there already an item mod for 1,3, im currently making one, but if theres already one being made ima stop.) EDIT: wewt, i made a resell function for my items! :D |
Well itemshop is a feature planned for Mys v1.3.0, which is still under development. You can definitely go ahead and create your itemshop suitable for your own site, since the official itemshop will have to compensate for public interest. If your site needs a highly customized itemshop, go ahead to make your own.
|
well, i dont really have a site, i just make things when im bored, ill just stop developing mine, because the one you guys will make will def. be much better.
|
I see, its so kind of you to say that. If you wish to contribute to this community, why not be a part of this project? Mys v1.2.x's development will continue for another 2 months at least, and its definitely worth trying. Also compatibility between Mys v1.2.x and v1.3.x will be considerably enhanced compared to Mys v1.1.x to Mys v1.2.x, so expect most mods that work on Mys v1.2.x also work on Mys v1.3.x:
http://www.mysidiaadoptables.com/for...ead.php?t=2071 |
okay, but writing the explinations in a topic will take hours XD
all left for me is the my items page, and add some functions for the items. |
hi where is the file include("inc/functions.php");
pls help me. |
I don't understand how to install this mod, how to do a MYSQL Query or how to make a single page that runs it.
I want a "Game Station" page under explore that has image links to various minigames' own pages. Slot machine being one. |
This mod is for v1.2.x.
Old mods are not going to work in the newest version of Mysidia without significant changes. Even if I tell you how to make the table in the database (open up phpMyAdmin, open the SQL tab, and copy and paste the query given by the OP), you still won't be able to use this mod as-is. Someone will have to open it up, look it over, and bring the code up to date. |
Ah. Well it was the database thing and where to put the slotmachines images and folder that was troubling me the most. I'm quite happy to have a fiddle and see if I can upgrade the php myself.
|
All times are GMT -5. The time now is 09:50 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.