Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 19:16

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

Advertisement



Lord Event Perin?

Discussion on Lord Event Perin? within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Lord Event Perin?

Hey guys !

What do I have to change in this piece of source to change the lord event price from Penya to Perin?

Code:
namespace	lordevent
{
	int	CreateRequirements( CUser* pUser, int iEEvent, int iIEvent )
	{
		ILordEvent* pEvent		= CSLord::Instance()->GetEvent();
		if (!pUser->IsAuthHigher(AUTH_GENERAL))
		{
			if (!CSLord::Instance()->IsLord(pUser->m_idPlayer))
			{
				return TID_GAME_L_EVENT_CREATE_E001;
			}
		}
		if( pEvent->GetComponent( pUser->m_idPlayer ) )
			return TID_GAME_L_EVENT_CREATE_E002;
		if( pUser->IsQuerying() )
			return TID_GAME_LORD_IS_QUERYING;
		
		__int64 iCost	= pEvent->GetCost( iEEvent, iIEvent );
		if( iCost == 0 )
			return TID_GAME_L_EVENT_CREATE_E004;
		if( iCost > pUser->GetTotalGold() )
			return TID_GAME_L_EVENT_CREATE_E003;

		pUser->SetQuerying( TRUE );
		return 0;
	}
};
I found this, but unfortunately this does not work

Code:
	int nPerin	= pUser->RemoveTotalGold( pEvent->GetCost( iEEvent, iIEvent ) );
	if( nPerin == 0 )
		return TID_GAME_L_EVENT_CREATE_E004;
	if( nPerin > pUser->GetTotalGold() )
		return TID_GAME_L_EVENT_CREATE_E003;

Thanks!
Minotaurr
Minotaurr is offline  
Old 05/23/2018, 18:50   #2
 
elite*gold: 60
Join Date: Sep 2017
Posts: 424
Received Thanks: 138
Why you want to change it to Perin ? :0
The highest Penya size is 2.147.483.647, this is the maximum for a int32.

If you Start a Event and i speak currently from a 50/50 you are over the maximum Penya size, so you automaticly use the Perin(s)...
You are also able to recode it for a int64 with a maximum Penya size of 9.223.372.036.854.775.807
so you can Delete the Useless Perins
Dr. Peacock is offline  
Old 05/24/2018, 02:57   #3



 
Flogolo's Avatar
 
elite*gold: 980
Join Date: Nov 2011
Posts: 4,747
Received Thanks: 771
Better reduce the Price to an amount of penya that fits to a good value... e.g. Drop 1.5B EXP 0.5B together 2B?
Flogolo is offline  
Old 05/24/2018, 20:00   #4
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Quote:
Originally Posted by Dr. Peacock View Post
Why you want to change it to Perin ? :0
The highest Penya size is 2.147.483.647, this is the maximum for a int32.

If you Start a Event and i speak currently from a 50/50 you are over the maximum Penya size, so you automaticly use the Perin(s)...
You are also able to recode it for a int64 with a maximum Penya size of 9.223.372.036.854.775.807
so you can Delete the Useless Perins
I'm not sure how to change that, I just prefer changing it to perins...
Minotaurr is offline  
Old 05/25/2018, 08:10   #5
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 227
Only need to change this line
if( iCost > pUser->GetTotalGold() )

by
if( iCost > pUser->GetPerinNum() )
alfredico is offline  
Thanks
1 User
Old 05/25/2018, 17:21   #6
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Quote:
Originally Posted by alfredico View Post
Only need to change this line
if( iCost > pUser->GetTotalGold() )

by
if( iCost > pUser->GetPerinNum() )
Nice tyty!

One more problem, this only checks if the user has enough perin in the inventory, but it still takes penya out of inventory when starting.
Minotaurr is offline  
Old 05/25/2018, 20:32   #7
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 227
WORLDSERVER/DPSrvr.cpp - CDPSrvr::OnLEventCreate()

int nPerin = pUser->RemoveTotalGold( pEvent->GetCost( iEEvent, iIEvent ) );

by
int nPerin = pUser->RemovePerin( pEvent->GetCost( iEEvent, iIEvent ) );
alfredico is offline  
Thanks
1 User
Old 05/26/2018, 09:31   #8
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Quote:
Originally Posted by alfredico View Post
WORLDSERVER/DPSrvr.cpp - CDPSrvr::OnLEventCreate()

int nPerin = pUser->RemoveTotalGold( pEvent->GetCost( iEEvent, iIEvent ) );

by
int nPerin = pUser->RemovePerin( pEvent->GetCost( iEEvent, iIEvent ) );
Thank you so much ! Works perfectly
Minotaurr is offline  
Old 05/27/2018, 08:12   #9



 
Flogolo's Avatar
 
elite*gold: 980
Join Date: Nov 2011
Posts: 4,747
Received Thanks: 771
Maybe i will add this too, but without increasing the price like hell lol
Flogolo is offline  
Reply


Similar Threads Similar Threads
Verkaufe Perin auf Luia 10€ 20 Perin usw
11/21/2011 - Flyff Trading - 6 Replies
Verkaufe zur zeit 600 Perins Macht mir einfach kurs angebote nehme Überweisung PSC und Paypal absprache und handel über Pm oder ICQ
[Luia] Perin An/Verkauf Perin [Luia]
07/15/2011 - Flyff Trading - 8 Replies
Hallo, Heute Eröffne ich meinen Verkaufsthread wo ich Perins Kaufe und Verkaufe. Gehandelt wird nur auf dem Server LUIA !!! Gehandelt wird über MM oder ihr gebt First. Die Perins wurden nicht Gedupt, sie wurde lediglich fair erspielt. Verkauf: 50Perins = 25€ 125Perins = 50€ 250Perins = 100€
[Perin Burudeng]Verkaufe Perin Burudeng[7]
04/28/2011 - Flyff Trading - 4 Replies
Hallo e*pvpers Ich Verkaufe meine Perin auf Burudeng,weil ich Flyff leider nicht mehr spiele Perin Stand : 7 Zahlungsmethoden : Ich nehme nur PSC bei Ausnahmen auch Paypal!
Tausche [Buru] Perin gegen [Augu] Perin
02/27/2011 - Flyff Trading - 1 Replies
wie schon im topic steht suche perin auf dem server augu und biete perin auf buru
68 Perin Steamwalker (1.5 Perin = 1€)
01/29/2011 - Flyff Trading - 0 Replies
Hallo, ich verkaufe genau 68 Perin's auf dem Server Steamwalker. ( dFlyff ) Es schaut folgendermaßen aus: 1.5 <-> 1 ( 150 mio für 1 € ) Ich verkaufe nur in folgenden Schritten: 15 Perin = 10 €



All times are GMT +2. The time now is 19:16.


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.