Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

[Release] Steal Money Module 1.2
#11

(01-19-2009, 11:29 AM)Seeker Wrote: Any idea about the % of success vs. failure (for different amounts?)

Yeah, that would be intersting.
[Image: 0cd35385f23ceb765094a5a68efc6.jpg]
#12

ah i'll have to check the file, please wait.
Below 150 would be 50%( ==> rand(0, 1) )
higher than 150 would be 20% ( rand(0, 5) )
( 1 is always the winner ==> others lose )
Next version will contain the settings to change the random's maximum & the belowX / higherX
Next version will have an item that will protect you X times from stealing.
Thank you,
- Shadows.
#13

Nice updates! Smile
[Center][Image: eiw9hy.png]
[Image: 15re2q8.png]
!Liverpool 4 Life![/Center]
Pirata Nervo Wrote:IE6 is weird and sucks
#14

Argh people i made a mistake.
when i converted it to have it's own amount i forgot to add the user_change_money
so you can't lose money stealing atm and when you win the money you get it twice..
i updated this in version 1.3 Beta.
If you want to continue using it..
Find this:
PHP Code:
        if($maybewin == false)
        { 
replace it until this:
PHP Code:
        }
    
//if he wins and the user has enough money.. 
replace that with:
PHP Code:
        if($maybewin == false)
        {
        
$newam $mybb->input['amts'] * -1;
            
$buyRtnMsg $lang->stealmoney_failed;
            
$buyLogMsg $lang->stealmoney_fail_log;
                    
//FORGOT TO REMOVE MONEY FROM THE GUY TRYING TO STEAL, FIXED IN VERSION 1.3
            
user_change_money($mybb->user$newam)
            if(
$mybb->settings['stealmoney_sendpm'] == true
            {
            
$pm['subject'] = $lang->steal_pmtitleF;
            
$pm['message'] = $lang->steal_pmmsgF;
            
$pm['toid'] = $user['uid'];
            
myplaza_send_pm($pm$user); 
            }
            return 
true;
            
//return false;
            //removed return false for the red color else there's no history =(.
            //why not return true and let it cost his money?
            //because if you return false it'd be red. If it's red he'll understand he lost...
            //but then if it's false returned, we have to remove the money from his profile =).
        
}
    
//if he wins and the user has enough money.. 
then find this
PHP Code:
        if($maybewin == true)
        { 
until thisSadwith)
PHP Code:
                if($mybb->settings['stealmoney_sendpm'] == true)
                {
                    
//AFTERWARDS USE OPTION IF YOU WANT THIS OR NOT..
                    
$pm['subject'] = $lang->steal_pmtitle;
                    
$pm['message'] = $lang->steal_pmmsg;
                    
$pm['toid'] = $user['uid'];
                    
myplaza_send_pm($pm$user);
                } 
replace with:
PHP Code:
        if($maybewin == true)
        {
            
$buyRtnMsg $lang->stealmoney_success;
            
$buyLogMsg $lang->stealmoney_success_log;
            
$newamtime2 $mybb->input['amts'];
                            
//CHANGED TO * 1 instead of * 2 IN VERSION 1.3 ( *1 can be removed )
            
user_change_money($mybb->user$newamtime2);
            
//not sure how to remove money using this.. let's try anyway =).
                    //REMOVE MONEY FROM USER STOLEN
            
$new3 $mybb->input['amts'] * -1;
            
user_change_money($user$new3);
                if(
$mybb->settings['stealmoney_sendpm'] == true)
                {
                    
//AFTERWARDS USE OPTION IF YOU WANT THIS OR NOT..
                    
$pm['subject'] = $lang->steal_pmtitle;
                    
$pm['message'] = $lang->steal_pmmsg;
                    
$pm['toid'] = $user['uid'];
                    
myplaza_send_pm($pm$user);
                } 
Sorry for this.
I will release a fixed version tomorrow.
Thank you,
- Shadows.




Users browsing this thread: 1 Guest(s)