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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-04-2011, 06:17 AM
mapleblade mapleblade is offline
Epicness sausage
 
Join Date: May 2009
Posts: 180
Gender: Male
Credits: 19,924
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 10:01 AM.
Reply With Quote
 


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 01:29 AM


All times are GMT -5. The time now is 04:24 PM.

Currently Active Users: 9803 (0 members and 9803 guests)
Threads: 4,080, Posts: 32,024, 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