Jump to content
DevFuse Forums
Sign in to follow this  

Change iPoints Lotto Payout

This is for iPoints 241, it *may* work with other versions but has not been tested.

This is a simple change so that any 'Lotto' winnings are paid into the winners iPoints 'Bank' account instead of just into their 'points' , useful as that way they will not need to manually bank their winnings to gain any interest. :)

1. Open /sources/tasks/lotto.php - Take a backup of this file before editing it!

Around line 155, find...
$members_current_points = $get['points'];
Change to...
$members_current_points = $get['deposited_points'];
2. Around line 161, find...
$this->ipsclass->DB->do_update( 'members', array( 'points' => $points ), "id=".$row['m_id'] );
Change to..
$this->ipsclass->DB->do_update( 'members', array( 'deposited_points' => $points ), "id=".$row['m_id'] );
3. Around line 193, find...
$message  = "{$this->ipsclass->lang['msg_content']}<strong>{$total_points}</strong>";
Change to...
$message  = "{$this->ipsclass->lang['msg_content']}<strong>{$total_points}</strong><br /><br />These have been deposited into your iPoints bank account.";

Save / upload lotto.php

Test it by purchasing a ticket, making a note of your iPoints points / bank account points then running the lotto task via the task manager to force it to pick a winner. Examine your account and the PM (if enabled)

Recommended Comments

There are no comments to display.