Question Regarding the old "Dice Game" in FlyFF

04/11/2021 21:29 jägermeister1#1
Recently I've been messing around with CE on several P-Servers,

And in doing this i have also been going through NPC namestrings and

changing them to different ones to see if i could find any useful exchange

menus and whatnot, then i stumbled upon this old "Dice game" where you have
6 slots to put penya in and in return five-double your wager if you win,

So now im wondering if there ever were any known exploits to this and if

anyone here has any knowledge about them. TIA
04/11/2021 23:25 netHoxInc#2
Quote:
Originally Posted by jägermeister1 View Post
Recently I've been messing around with CE on several P-Servers,

And in doing this i have also been going through NPC namestrings and

changing them to different ones to see if i could find any useful exchange

menus and whatnot, then i stumbled upon this old "Dice game" where you have
6 slots to put penya in and in return five-double your wager if you win,

So now im wondering if there ever were any known exploits to this and if

anyone here has any knowledge about them. TIA
Could be used to crash the server, i think it was nBetNum -1 or smth
04/13/2021 23:42 cookie69#3
Quote:
Originally Posted by netHoxInc View Post
Could be used to crash the server, i think it was nBetNum -1 or smth
in the offi v21 leaked version they still did not fix it but anyway I am not sure that would crash the server at 100% but it may lead to a weird behavior of the server.

Problem is in the code below: they use nBetNum before to check the bounds (they do check them in the line after but it must be done at the beginning of the function)

Code:
int CMiniGame::Bet_FiveSystem( FLWSUser* pUser, int nBetNum, int nBetPenya )
{
	// ÀÔÂû ¹øÈ£¿¡ ÀÌÀü °ªÀÌ 0À̰í ÇöÀç ÀÔÂû±ÝÀÌ 0À϶§ ¾Æ¹«Àϵµ ¾ÈÇÔ(·Î±× X)
	if( pUser->m_nBetFiveSystem[nBetNum] == 0 && nBetPenya == 0 )
		return TRUE;
	// À߸øµÈ ÀÔÂû ¹øÈ£°¡ µé¾î ¿ÔÀ» ¶§
	if( nBetNum < 0 || 5 < nBetNum )
		return FIVESYSTEM_FAILED;
	// ÀÔÂû±ÝÀº 0º¸´Ù ÀÛÀ» ¼ö ¾ø´Ù.
	if(nBetPenya < 0)
		return FIVESYSTEM_FAILED;
........
04/14/2021 06:10 netHoxInc#4
Quote:
Originally Posted by cookie69 View Post
in the offi v21 leaked version they still did not fix it but anyway I am not sure that would crash the server at 100% but it may lead to a weird behavior of the server.

Problem is in the code below: they use nBetNum before to check the bounds (they do check them in the line after but it must be done at the beginning of the function)

Code:
int CMiniGame::Bet_FiveSystem( FLWSUser* pUser, int nBetNum, int nBetPenya )
{
	// ÀÔÂû ¹øÈ£¿¡ ÀÌÀü °ªÀÌ 0À̰í ÇöÀç ÀÔÂû±ÝÀÌ 0À϶§ ¾Æ¹«Àϵµ ¾ÈÇÔ(·Î±× X)
	if( pUser->m_nBetFiveSystem[nBetNum] == 0 && nBetPenya == 0 )
		return TRUE;
	// À߸øµÈ ÀÔÂû ¹øÈ£°¡ µé¾î ¿ÔÀ» ¶§
	if( nBetNum < 0 || 5 < nBetNum )
		return FIVESYSTEM_FAILED;
	// ÀÔÂû±ÝÀº 0º¸´Ù ÀÛÀ» ¼ö ¾ø´Ù.
	if(nBetPenya < 0)
		return FIVESYSTEM_FAILED;
........
I dont think it can be used for official anymore but it should crash i think, out of bounds exception or even access violation not sure which one would kick in
04/15/2021 13:15 TheAllfather#5
as far as I know this system didnt have any major or known bugs.

Only the RPS NPC / System was exploitable
04/16/2021 16:43 netHoxInc#6
Quote:
Originally Posted by TheAllfather View Post
as far as I know this system didnt have any major or known bugs.

Only the RPS NPC / System was exploitable
It definetly crashed on v15 systems. Untested on v21 tho.