Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2011, 07:17 AM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 25,023
mapleblade
Default Slotmachine

hiya, my first mod in years now :P, i made a simple slotmachine for leveling up adoptables mod.

If users get 1,1,1 , they get 20 EXTRA coins,
If users get 2,2,2 , they get 30 EXTRA coins,
If users get 3,3,3 , they get 50 EXTRA coins,

SCREENSHOTS:
http://i470.photobucket.com/albums/r...otmachine1.png
http://i470.photobucket.com/albums/r...otmachine2.png
Okay Lets get started,

In Levelup.php

Find for:
PHP Code:
if($isfrozen == "no"){ 
Directly UNDER that paste this code:
PHP Code:
 $slot1 rand(1,3);
    
$slot2 rand(1,3);
    
$slot3 rand(1,3);
    
    if(
$slot1 == && $slot2 == && $slot3 == 1){
    
$extrareward 20;
    }elseif(
$slot1 == && $slot2 == && $slot3 == 2){
    
$extrareward 30;
    }elseif(
$slot1 == && $slot2 == && $slot3 == 3){
    
$extrareward 50;
    }else{
    
$extrareward 0;
    }
    
    
    if(
$extrareward 1){
    
$rewardmessage "Congratulations, you have gained ".$extrareward." "grabanysetting('cost') ." because you had the slot machine right!";
    }else{
    
$rewardmessage "Sorry, you didnt win a prize this time, try again later.";
    } 
then under that code u will see:
PHP Code:
changecash(grabanysetting('rewardmoney'), $GLOBALS['username'], $GLOBALS['money']); 
REPLACE that with this code:
PHP Code:
changecash(grabanysetting('rewardmoney')+ $extrareward$GLOBALS['username'], $GLOBALS['money']); 
now the final stuff find:
PHP Code:
$article_content $article_content "<div align='center'><br />You have earned "grabanysetting('rewardmoney') ." "grabanysetting('cost') ." for leveling up this adoptable. <br />You now have {$GLOBALS['money']} ".grabanysetting('cost')."</div>"
And REPLACE that with:
PHP Code:
$article_content $article_content "<div align='center'><br /><img src='slotmachine/".$slot1.".png'><img src='slotmachine/".$slot2.".png'><img src='slotmachine/".$slot3.".png'><br />".$rewardmessage."<br /><br />You have earned "grabanysetting('rewardmoney') ." "grabanysetting('cost') ." for leveling up this adoptable. <br />You now have {$GLOBALS['money']} ".grabanysetting('cost')."</div>"
Now Download the attached .zip and place the whole slotmachine map where all your php files are (root), this map is only needed for the images for the slotmachine, u can change them to whatever you like :)
Attached Files
File Type: zip slotmachine.zip (1.2 KB, 21 views)
__________________
Need coding help? send me a PM! :)

Last edited by mapleblade; 05-04-2011 at 11:01 AM.
Reply With Quote
  #2  
Old 05-04-2011, 10:58 AM
Rozel Rozel is offline
Member
 
Join Date: Jun 2010
Posts: 144
Credits: 12,137
Rozel
Default

Oh, this is awesome! I can't wait to try it out ^^ Maybe it'll give more reason to click pets. Thanks.

Last edited by Rozel; 05-04-2011 at 11:01 AM.
Reply With Quote
  #3  
Old 05-04-2011, 11:00 AM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 25,023
mapleblade
Default

:P, finally a comment XD, and yeah, that was wat i had in mind.
__________________
Need coding help? send me a PM! :)
Reply With Quote
  #4  
Old 05-04-2011, 12:23 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 78,188
AlexC is an unknown quantity at this point
Default

could this be edited to be put in an arcade of sorts? o: this is an awesome code!
Reply With Quote
  #5  
Old 05-04-2011, 12:42 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 25,023
mapleblade
Default

i think this could be editted to put in an arcade, i think it wouldnt be that hard.
__________________
Need coding help? send me a PM! :)
Reply With Quote
  #6  
Old 05-04-2011, 12:50 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 78,188
AlexC is an unknown quantity at this point
Default

my members have been requesting an arcade, I'm not sure how to really create one that awards cash... D:
Reply With Quote
  #7  
Old 05-04-2011, 12:52 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 25,023
mapleblade
Default

i can make u an page only for the slotmachine if you want, but remeber they may spam the page for infinite cash, or what kind of security do u want?
__________________
Need coding help? send me a PM! :)
Reply With Quote
  #8  
Old 05-04-2011, 12:58 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 78,188
AlexC is an unknown quantity at this point
Default

perhaps if it was made so that people can only win a number of times? Or only visit the page a number of times?

That would be awesome if you could do that. :D I'll send some points your way if you could~
Reply With Quote
  #9  
Old 05-04-2011, 01:09 PM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 25,023
mapleblade
Default

uhm that would require some mysql stuff etc and time and dates would be tricky, but u mean, they visit 3 times and then they can NEVER do it again?
__________________
Need coding help? send me a PM! :)
Reply With Quote
  #10  
Old 05-04-2011, 01:11 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 78,188
AlexC is an unknown quantity at this point
Default

per day. xD like the pet pages - you visit once a day, then tomorrow you can do it again. If it's too difficult, it's fine, I'll see what I can do myself.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
slotmachine.php, the slotmachine from the levelup, but for the arcade! mapleblade Mys v1.2.x Mods 22 04-20-2015 02:29 AM


All times are GMT -5. The time now is 05:27 AM.

Currently Active Users: 590 (0 members and 590 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636