CEO
Sorceror
After looking at the code, I'm guessing they are forging packets to fool the server into thinking a button is pressed that was already removed by the gump but is still processable in the code.
Taking a look at the repetitive code in OnResponse:
You can prevent this from happening by setting the payout of the selected to button to 0 after it's paid, so if they try to forge a button it'll basically think you've pressed a coal button and exit out. Personally, I'd do more then that and log the attempt somewhere so you can deal with your exploiter later.
So change all those sections of code to something like this:
However, with no offense to the author, this slot machine is basically a gold farm machine. In writing my own slots, I started with this one and one of the first things I did was incorporate the ability to "model" a machine using actual statistical formulas and then followup by simulating a huge number of spins (millions) and then compare that with the statisitcal odds to verify the machine performs as desired. This machine's profile is this:
I gave a value of 2500 to the bonus round which is very conservative as you can easily win 50k+ on some rounds. A payout of 163% means that over a sufficiently large amount of spins for every 1gp put in 1.6gp will be returned, obviously not something desirable for any slot machine! You can modify the payout table by taking some of the numbers off the higher values and distributing them lower, but without the ability to model the machine you won't easily be able to tell if your changes were successful and with only one table to work with (real machines have a table for each reel) moving one value to another can have a huge adverse impact.
Taking a look at the repetitive code in OnResponse:
Code:
if ( info.ButtonID == 1 )
{
if ( m_c1 == 0 )
{
from.SendMessage( "You found coal!" );
from.SendMessage( "You may now close this menu out to contiune playing." );
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
}
else
{
m_Stone.Won += m_c1;
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c1 );
from.SendGump( new MinerBonusGump( m_Stone, true, m_b2, m_b3, m_b4, m_b5, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
m_Stone.LastPay += m_c1;
m_Stone.TotalCollected -= m_c1;
}
}
You can prevent this from happening by setting the payout of the selected to button to 0 after it's paid, so if they try to forge a button it'll basically think you've pressed a coal button and exit out. Personally, I'd do more then that and log the attempt somewhere so you can deal with your exploiter later.
So change all those sections of code to something like this:
Code:
if ( info.ButtonID == 1 )
{
if ( m_c1 == 0 )
{
from.SendMessage( "You found coal!" );
from.SendMessage( "You may now close this menu out to contiune playing." );
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
}
else
{
m_Stone.Won += m_c1;
m_Stone.LastPay += m_c1;
m_Stone.TotalCollected -= m_c1;
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c1 );
m_c1 = 0;
from.SendGump( new MinerBonusGump( m_Stone, true, m_b2, m_b3, m_b4, m_b5, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
}
}
However, with no offense to the author, this slot machine is basically a gold farm machine. In writing my own slots, I started with this one and one of the first things I did was incorporate the ability to "model" a machine using actual statistical formulas and then followup by simulating a huge number of spins (millions) and then compare that with the statisitcal odds to verify the machine performs as desired. This machine's profile is this:
/*
Profiling: Theme:MinerMadness Payout Table:Loose
Distribution Tables:
2,3,4,5,8,11,15,18
2,3,4,5,8,11,15,18
2,3,4,5,8,11,15,18
Individual jackpot odds:
0. 02*02*02:08/287496=0.00003*10000.00000=0.27826 cumulative odds:0.27826
1. 03*03*03:27/287496=0.00009*5000.00000=0.46957 cumulative odds:0.74784
2. 04*04*04:64/287496=0.00022*1000.00000=0.22261 cumulative odds:0.97045
3. 05*05*05:125/287496=0.00043*500.00000=0.21739 cumulative odds:1.18784
4. 08*08*08:512/287496=0.00178*10.00000=0.01781 cumulative odds:1.20565
5. 11*11*11:1331/287496=0.00463*5.00000=0.02315 cumulative odds:1.22880
6. 15*15*15:3375/287496=0.01174*3.00000=0.03522 cumulative odds:1.26402
7. 18*18*18:5832/287496=0.02029*2.00000=0.04057 cumulative odds:1.30459
Any 3: (14*14*14/287496)=.00954-.00078=.00877*25=.21913
Scatter2: (8*8*58+8*58*8+58*8*8)/287496*0.500=0.01937
Scatter1: (8*58*58+58*8*58+58*58*8)/287496=0.28082*0.330=0.09267
Statistical payout odds for this slot machine is : 163.57615%
@ 10 million spins: Low: 163.42% High: 178.21% Actual: 167.16%
*/
I gave a value of 2500 to the bonus round which is very conservative as you can easily win 50k+ on some rounds. A payout of 163% means that over a sufficiently large amount of spins for every 1gp put in 1.6gp will be returned, obviously not something desirable for any slot machine! You can modify the payout table by taking some of the numbers off the higher values and distributing them lower, but without the ability to model the machine you won't easily be able to tell if your changes were successful and with only one table to work with (real machines have a table for each reel) moving one value to another can have a huge adverse impact.