Register for your free account! | Forgot your password?

You last visited: Today at 03:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Addtext Help

Discussion on Addtext Help within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Addtext Help

little help please?
babyminion is offline  
Old 04/23/2018, 09:17   #2
 
elite*gold: 0
Join Date: Jun 2016
Posts: 35
Received Thanks: 7
the void for Cuser::AddText only takes 1 value or argument however you wanna look at it, somewhere you're calling another statement so either update the void to handle another or remove the second?
Timelimits is offline  
Thanks
1 User
Old 04/23/2018, 09:40   #3
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by Timelimits View Post
the void for Cuser::AddText only takes 1 value or argument however you wanna look at it, somewhere you're calling another statement so either update the void to handle another or remove the second?
this is what i use:
AttackArbitter.cpp
Code:
#ifdef __EXTRA
	else
	{
		if( m_pDefender->IsNPC() && ( m_pDefender->GetProp()->dwClass == RANK_LOW || m_pDefender->GetProp()->dwClass == RANK_NORMAL || m_pDefender->GetProp()->dwClass == RANK_CAPTAIN ))
		{
			CItemElem* pExtra1 = m_pAttacker->m_Inventory.GetEquip( PARTS_EXTRA1 );
			CItemElem* pExtra2 = m_pAttacker->m_Inventory.GetEquip( PARTS_EXTRA2 );
			
			CString str;
			int nExtraOk = 500;	//	1/500
			bool bMsg = TRUE;
			if( m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X2_1DAY ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X2_7DAYS ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X2_15DAYS ) )
			{
				// Chance /2
				nExtraOk = 250;
			}
			else if( m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X5_1DAY ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X5_7DAYS ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X5_15DAYS ) )
			{
				// Chance /5
				nExtraOk = 100;
			}
			else if( m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_100PERCENT_1DAY ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_100PERCENT_7DAYS ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_100PERCENT_15DAYS ) )
			{
				// Chance 100%
				nExtraOk = 1;
				bMsg = FALSE;
			}
			
			if( (pExtra1 && pExtra1->GetProp()->dwID == II_SYS_EXTRA_OK_1) && (pExtra2 && pExtra2->GetProp()->dwID == II_SYS_EXTRA_OK_2) )
			{
				int nRandom = xRandom( nExtraOk );
				if( nRandom == 0 || nRandom == 1 )
				{
					g_UserMng.AddCreateSfxObj( m_pAttacker, XI_SKILL_BARUNA_WEA_DEATHRUNE );
					str.Format( prj.GetText( TID_GAME_ORBE_TEXT_01 ), pExtra1->GetProp()->szName, pExtra2->GetProp()->szName );
					if( bMsg )
						((CUser*)m_pAttacker)->AddText( str, 0xFFFF0000 );
					
					return m_pDefender->GetHitPoint();
				}
			}
		}
	}
#endif // __EXTRA
Code:

#ifdef __EXTRA
	CItemElem* pExtra1 = m_pAttacker->m_Inventory.GetEquip( PARTS_EXTRA1 );
	CItemElem* pExtra2 = m_pAttacker->m_Inventory.GetEquip( PARTS_EXTRA2 );
	
	CString str;
	int nExtraHP = 100;	//	1/100
	int nExtraMP = 100;	//	1/100
	int nExtraFP = 100;	//	1/100
	bool bMsg = TRUE;
	if( m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X2_1DAY ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X2_7DAYS ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X2_15DAYS ) )
	{
		// Chance /2
		nExtraHP = 50;
		nExtraMP = 50;
		nExtraFP = 50;
	}
	else if( m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X5_1DAY ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X5_7DAYS ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_X5_15DAYS ) )
	{
		// Chance /5
		nExtraHP = 20;
		nExtraMP = 20;
		nExtraFP = 20;
	}
	else if( m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_100PERCENT_1DAY ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_100PERCENT_7DAYS ) || m_pAttacker->HasBuff( BUFF_ITEM, II_SYS_EXTRA_UP_100PERCENT_15DAYS ) )
	{
		// Chance 100%
		nExtraHP = 1;
		nExtraMP = 1;
		nExtraFP = 1;
		bMsg = FALSE;
	}
	

	
	if( (pExtra1 && pExtra1->GetProp()->dwID == II_SYS_EXTRA_HP_1) && (pExtra2 && pExtra2->GetProp()->dwID == II_SYS_EXTRA_HP_2) )
	{
		int nRandom = xRandom( nExtraHP );
		if( nRandom == 0 || nRandom == 1 )
		{
			m_pAttacker->SetPointParam( DST_HP, m_pAttacker->GetMaxHitPoint() );
			g_UserMng.AddCreateSfxObj( m_pAttacker, XI_SKILL_BARUNA_WEA_DEATHRUNE );
			str.Format( prj.GetText( TID_GAME_ORBE_TEXT_02 ), pExtra1->GetProp()->szName, pExtra2->GetProp()->szName );
			if( bMsg )
				((CUser*)m_pAttacker)->AddText( str, 0xFFFF0000 );
		}
	}
	
	if( (pExtra1 && pExtra1->GetProp()->dwID == II_SYS_EXTRA_MP_1) && (pExtra2 && pExtra2->GetProp()->dwID == II_SYS_EXTRA_MP_2) )
	{
		int nRandom = xRandom( nExtraMP );
		if( nRandom == 0 || nRandom == 1 )
		{
			m_pAttacker->SetPointParam( DST_MP, m_pAttacker->GetMaxManaPoint() );
			g_UserMng.AddCreateSfxObj( m_pAttacker, XI_SKILL_BARUNA_WEA_DEATHRUNE );
			str.Format( prj.GetText( TID_GAME_ORBE_TEXT_03 ), pExtra1->GetProp()->szName, pExtra2->GetProp()->szName );
			if( bMsg )
				((CUser*)m_pAttacker)->AddText( str, 0xFFFF0000 );
		}
	}
	
	if( (pExtra1 && pExtra1->GetProp()->dwID == II_SYS_EXTRA_FP_1) && (pExtra2 && pExtra2->GetProp()->dwID == II_SYS_EXTRA_FP_2) )
	{
		int nRandom = xRandom( nExtraFP );
		if( nRandom == 0 || nRandom == 1 )
		{
			m_pAttacker->SetPointParam( DST_FP, m_pAttacker->GetMaxFatiguePoint() );
			g_UserMng.AddCreateSfxObj( m_pAttacker, XI_SKILL_BARUNA_WEA_DEATHRUNE );
			str.Format( prj.GetText( TID_GAME_ORBE_TEXT_04 ), pExtra1->GetProp()->szName, pExtra2->GetProp()->szName );
			if( bMsg )
				((CUser*)m_pAttacker)->AddText( str, 0xFFFF0000 );
		}
	}
#endif // __EXTRA
babyminion is offline  
Old 04/23/2018, 10:14   #4
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
The function "AddText" is the class "CUser" (CUser::AddText) does not take 2 parameters. Look at the function or code an overloaded function to accept another parameter.

error c2660
Avalion is offline  
Thanks
1 User
Old 04/23/2018, 14:35   #5
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by Avalion View Post
The function "AddText" is the class "CUser" (CUser::AddText) does not take 2 parameters. Look at the function or code an overloaded function to accept another parameter.

error c2660
FIXED Thanks for the Hint
babyminion is offline  
Reply


Similar Threads Similar Threads
AddText an alle?
10/20/2015 - Flyff Private Server - 3 Replies
Hallo kann mir jemand sage wie ich es schaffe folgendes an alle user zu senden? pUser->AddText( "User " + strName + " has activated:" + szString ); es klappt soweit wie ich es möchte aber ich würde es gerne so machen das alle user es zu sehen bekommen. Es über g_DPCoreClient.SendSystem zu machen wäre mir da etwas zu krass weil ich nicht möchte das die info mitten auf den bildschirm gepappt wird. any ideas? edit: alternativ könnte ich ja trotzdem g_DPCoreClient.SendSystem benutzen...
[HELP]HELP HELP HELP[HELP]
09/23/2013 - Facebook - 3 Replies
GUYS ^^ THIS IS A HELP THREAD NOT REQUEST THREAD BUT YOU CAN CONSIDER IT AS REQUEST THREAD DOES ANYONE OF YOU KNOW THE AUTO SUBMIT PHP CODE? THANKS!
help help help help help help
06/28/2009 - Say Hello - 0 Replies
how i can dowmload Mangos 6385 ??????????????????????????????????? please give me the limk i can't see that i know it is in www.elitepvpers.com/.../153716-release-mangos-relea ses-blackscorpian-win32-2-4-3-a.html - but give me link sent it to my email plz



All times are GMT +2. The time now is 03:32.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.