Register for your free account! | Forgot your password?

You last visited: Today at 12:46

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

Advertisement



Automatic Rain

Discussion on Automatic Rain within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
cmwarjin0's Avatar
 
elite*gold: 0
Join Date: Mar 2013
Posts: 74
Received Thanks: 1
Automatic Rain

Hi guys where can i edit or disable automatic rain at world and its always raining.. Thank you to those who can help!
cmwarjin0 is offline  
Old 09/11/2018, 16:01   #2
 
forger123's Avatar
 
elite*gold: 0
Join Date: Jun 2018
Posts: 34
Received Thanks: 14
#ifdef __EVENTLUA_RAIN
m_tRainTime.Set( MIN( 60 ) );
#else // __EVENTLUA_RAIN
#ifdef __RAIN_EVENT
m_tRainTime.Set( MIN( 60 ) );
#else // __RAIN_EVENT
m_tRainTime.Set( MIN( 10 ) );
#endif // __RAIN_EVENT
#endif // __EVENTLUA_RAIN
#ifdef __EVENTLUA_SNOW
m_tSnowTime.Set( MIN( 60 ) );
#else // __EVENTLUA_SNOW
m_tSnowTime.Set( MIN( 10 ) );
#endif // __EVENTLUA_SNOW
forger123 is offline  
Old 09/11/2018, 21:27   #3
 
elite*gold: 0
Join Date: Mar 2018
Posts: 155
Received Thanks: 54
environmenteffect.txt
Tweeney is offline  
Old 09/12/2018, 05:24   #4
 
Nιgнтмαяε's Avatar
 
elite*gold: 0
Join Date: Jul 2018
Posts: 434
Received Thanks: 310
Environment.h:
Code:
#ifndef __ENVIRONMENT_H__ 
#define	__ENVIRONMENT_H__

#ifdef __CORESERVER
#include "Ar.h"
#endif // __cORESERVER

class CEnvironment
{
public:
#ifdef __ENVIRONMENT_EFFECT
	static	CEnvironment*	GetInstance();
	
	BOOL	GetEnvironmentEffect()	{	return m_bEffect;	}
	void	SetEnvironmentEffect( BOOL bEffect )	{	m_bEffect = bEffect;	}

#ifdef __WORLDSERVER
	BOOL	LoadScript();

	int		GetSeason();
#endif // __WORLDSERVER

#ifdef __CLIENT
	void	SetSeason( int nSeason );
	int		GetSeason()		{	return m_nSeason;	}
#endif // __CLIENT

private:
#ifdef __WORLDSERVER
	int		m_aEnvironmentEffect[LANG_MAX][12];
#endif // __WORLDSERVER

#ifdef __CLIENT
	int		m_nSeason;
#endif // __CLIENT

	BOOL	m_bEffect;
	CTimer	m_tEffectTime;
#else // __ENVIRONMENT_EFFECT
public:
	BOOL	m_bRain;
	BOOL	m_bSnow;
	CTimer  m_tRainTime;
	CTimer  m_tSnowTime;
#endif // __ENVIRONMENT_EFFECT
public:
//	Constructions
	CEnvironment();
	~CEnvironment();
	void Serialize( CAr & ar );

#ifdef __CORESERVER
public:
	BOOL	m_Authority;
public:
	HANDLE	m_hWorker;
	HANDLE	m_hCloseWorker;
	
public:
	BOOL	CreateWorkers( void );
	void	CloseWorkers( void );
	static	UINT	_Worker( LPVOID pParam );
	void	Worker( void );
#endif // __CORESERVER
};

#endif	//	__ENVIRONMENT_H__
Environment.cpp:
Code:
#include "stdafx.h"
#include "Environment.h"

#ifdef __CORESERVER
#include "dpcoresrvr.h"
extern	CDPCoreSrvr g_dpCoreSrvr;
#endif // __CORESERVER

/*--------------------------------------------------------------------------------*/

CEnvironment::CEnvironment()
{
#ifdef __ENVIRONMENT_EFFECT

#ifdef __WORLDSERVER
	::memset( m_aEnvironmentEffect, 0, sizeof( m_aEnvironmentEffect ) );
#endif // __WORLDSERVER

#ifdef __CLIENT
	m_nSeason = SEASON_NONE;
#endif // __CLIENT

	m_bEffect = FALSE;
	m_tEffectTime.Set( MIN( 60 ), TRUE );

#else // __ENVIRONMENT_EFFECT

	m_bRain = m_bSnow = FALSE;
#ifdef __EVENTLUA_RAIN
	m_tRainTime.Set( MIN( 60 ) );
#else // __EVENTLUA_RAIN
#ifdef __RAIN_EVENT
	m_tRainTime.Set( MIN( 60 ) );
#else // __RAIN_EVENT
	m_tRainTime.Set( MIN( 10 ) );
#endif // __RAIN_EVENT
#endif // __EVENTLUA_RAIN
#ifdef __EVENTLUA_SNOW
	m_tSnowTime.Set( MIN( 60 ) );
#else // __EVENTLUA_SNOW
	m_tSnowTime.Set( MIN( 10 ) );
#endif // __EVENTLUA_SNOW

#endif // __ENVIRONMENT_EFFECT

#ifdef __CORESERVER
	m_Authority = FALSE;
	m_hWorker	= m_hCloseWorker	= NULL;
#endif // __CORESERVER
}

CEnvironment::~CEnvironment()
{
#ifdef __CORESERVER
	CloseWorkers();
#endif // __CORESERVER
}



#ifdef __ENVIRONMENT_EFFECT

CEnvironment* CEnvironment::GetInstance()
{
	static CEnvironment sEnvironment;
	return & sEnvironment;
}

#ifdef __WORLDSERVER
BOOL CEnvironment::LoadScript()
{
	CScript scanner;

	if( scanner.Load( "EnvironmentEffect.txt", FALSE ) == FALSE )
	{
		Error( "CEnvironment::LoadScript - Script Load Failed" );
		return FALSE;
	}

	::memset( m_aEnvironmentEffect, 0, sizeof( m_aEnvironmentEffect ) );

	int nLang = scanner.GetNumber();
	while( scanner.tok != FINISHED )
	{
		if( nLang < 0 || nLang >= LANG_MAX )
		{
			Error( "CEnvironment::LoadScript - Invalid Lang : %[d]", nLang );
			return FALSE;
		}

		for( int i = 0; i < 12; ++i )
		{
			int nSeason = scanner.GetNumber();
			if( nSeason < 0 || nSeason >= SEASON_MAX )
			{
				Error( "CEnvironment::LoadScript - Invalid Season : %[d]", nSeason );
				return FALSE;
			}
			m_aEnvironmentEffect[nLang][i] = nSeason;
		}
		nLang = scanner.GetNumber();
	}
	return TRUE;
}

int CEnvironment::GetSeason()
{
	int nLang = ::GetLanguage();

	if( nLang < 0 || nLang >= LANG_MAX )
	{
		Error( "CEnvironment::GetSeason - Invalid argument. Lang : [%d]", nLang );
		return SEASON_NONE;
	}

	CTime timeCurr = CTime::GetCurrentTime();
	int nMonth = timeCurr.GetMonth();
	
	return m_aEnvironmentEffect[nLang][nMonth - 1];
}
#endif // __WORLDSERVER

#ifdef __CLIENT
void CEnvironment::SetSeason( int nSeason )
{
	if( nSeason < SEASON_NONE || nSeason >= SEASON_MAX )
	{
		m_nSeason = SEASON_NONE;
	}
	else
	{
		m_nSeason = nSeason;
	}
}
#endif // __CLIENT

#endif // __ENVIRONMENT_EFFECT

void CEnvironment::Serialize( CAr & ar )
{
	if( ar.IsStoring() )
	{
#ifdef __ENVIRONMENT_EFFECT
		ar << m_bEffect;
#else // __ENVIRONMENT_EFFECT
		ar << m_bRain;
		ar << m_bSnow;
#endif // __ENVIRONMENT_EFFECT
	}
	else
	{
#ifdef __ENVIRONMENT_EFFECT
		ar >> m_bEffect;
#else // __ENVIRONMENT_EFFECT
		ar >> m_bRain;
		ar >> m_bSnow;
#endif // __ENVIRONMENT_EFFECT
	}
}

#ifdef __CORESERVER
BOOL CEnvironment::CreateWorkers( void )
{
	DWORD dwThreadId;
	m_hCloseWorker	= CreateEvent( NULL, FALSE, FALSE, NULL );
	m_hWorker	= chBEGINTHREADEX( NULL, 0, _Worker, this, 0, &dwThreadId );
	if( m_hWorker == NULL )
		return FALSE;
	return TRUE;
}

void CEnvironment::CloseWorkers( void )
{
	CLOSE_THREAD( m_hWorker, m_hCloseWorker );
}

UINT CEnvironment::_Worker( LPVOID pParam )
{
	CEnvironment* pEnvironment	= (CEnvironment*)pParam;
	pEnvironment->Worker();
	return 0;
}

void CEnvironment::Worker( void )
{
	HANDLE hHandle	= m_hCloseWorker;
	while( WaitForSingleObject( hHandle, 60000 ) == WAIT_TIMEOUT )
	{
		if( m_Authority )
		{
#ifdef __ENVIRONMENT_EFFECT
			if( m_bEffect == TRUE )
			{
				m_Authority = FALSE;
				m_tEffectTime.Reset();
				g_dpCoreSrvr.SendEnvironmentEffect();
			}
#else // __ENVIRONMENT_EFFECT
			if( m_bRain )
			{
#ifdef __EVENTLUA_RAIN
				m_Authority = FALSE;
				m_tRainTime.Reset();
#else // __EVENTLUA_RAIN
#ifdef __RAIN_EVENT
				m_Authority = FALSE;
				m_tRainTime.Reset();
#endif // __RAIN_EVENT
#endif // __EVENTLUA_RAIN
				g_dpCoreSrvr.SendEnvironmentRain( m_bRain );
			}
			if( m_bSnow )
			{
#ifdef __EVENTLUA_SNOW
				m_Authority = FALSE;
				m_tSnowTime.Reset();
#endif // __EVENTLUA_SNOW
				g_dpCoreSrvr.SendEnvironmentSnow( m_bSnow );
			}
#endif // __ENVIRONMENT_EFFECT
		}
		else
		{
#ifdef __ENVIRONMENT_EFFECT

			if( m_tEffectTime.IsTimeOut() == TRUE )
			{
				BOOL bOldEffect = m_bEffect;

				if( random( 10 ) < 5 )
				{
					m_bEffect = TRUE;
					m_tEffectTime.Reset();
				}
				else
				{
					m_bEffect = FALSE;
				}

				if( bOldEffect != m_bEffect )
				{
					g_dpCoreSrvr.SendEnvironmentEffect();
				}
			}

#else // __ENVIRONMENT_EFFECT

#ifdef __JAPAN_SAKURA
			CTime timeCurr	= CTime::GetCurrentTime();
			int nMonth = timeCurr.GetMonth();
			if( nMonth >= 6 && nMonth <= 8 ) // 6 ~ 8 - 비
			{
				if( m_tRainTime.IsTimeOut() )
				{
					BOOL bRainBuf = m_bRain;

					if( random(1440) < 5 )
					{
						m_tRainTime.Reset();
						m_bRain = TRUE;
					}
					else
					{
						m_bRain = FALSE;
					}

					if( bRainBuf != m_bRain )
					{
						g_dpCoreSrvr.SendEnvironmentRain( m_bRain );
					}
				}
			}
			else
			{
				if( m_tSnowTime.IsTimeOut() )
				{
					BOOL bSnowBuf = m_bSnow;
					if( random(1440) < 5 )
					{
						m_tSnowTime.Reset();
						m_bSnow = TRUE;
					}
					else
					{
						m_bSnow = FALSE;
					}

					if( bSnowBuf != m_bSnow )
					{
						g_dpCoreSrvr.SendEnvironmentSnow( m_bSnow );
					}
				}
			}
#else __JAPAN_SAKURA
			CTime timeCurr	= CTime::GetCurrentTime();
			int nMonth = timeCurr.GetMonth();
			if( 1 == nMonth || 2 == nMonth || 12 == nMonth )
			{
				if( m_tSnowTime.IsTimeOut() )
				{
					BOOL bSnowBuf = m_bSnow;
					if( random(1440) < 5 )
					{
						m_tSnowTime.Reset();
						m_bSnow = TRUE;
					}
					else
					{
						m_bSnow = FALSE;
					}
					
					if( bSnowBuf != m_bSnow )
					{
						g_dpCoreSrvr.SendEnvironmentSnow( m_bSnow );
					}
				}
			}
			else
			{
				if( m_tRainTime.IsTimeOut() )
				{
					BOOL bRainBuf = m_bRain;

					if( random(1440) < 5 )
					{
						m_tRainTime.Reset();
						m_bRain = TRUE;
					}
					else
					{
						m_bRain = FALSE;
					}
					
					if( bRainBuf != m_bRain )
					{
						g_dpCoreSrvr.SendEnvironmentRain( m_bRain );
					}
				}
			}
#endif // __JAPAN_SAKURA
#endif // __ENVIRONMENT_EFFECT
		}
		TRACE( "CEnvironment Worker\n" );
	}
}
#endif // __CORESERVER

#ifndef __ENVIRONMENT_EFFECT
CEnvironment	g_Environment;
#endif // __ENVIRONMENT_EFFECT
EnvironmentEffect.txt:
Code:
LANG_USA	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE	SEASON_NONE
Nιgнтмαяε is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[TOOL]Beast Mountain No Rain Patch
04/03/2025 - RFO Hacks, Bots, Cheats, Exploits & Guides - 54 Replies
I heard so many complaints about the lagness in Beast Mountain because of the rain. Now here's the Patch to get rid of the rain. No more Rain in Beast Mountain. I hope this helps:p RapidShare: 1-Click Webhosting Don't Forget to Press Thanks
[Share]No Rain Outcast No Grass Beast Mountain.
08/15/2008 - RFO Hacks, Bots, Cheats, Exploits & Guides - 17 Replies
I'm A gay Hacker fuck my ass
AC Tool Tao meditation and healing rain lvler
07/26/2007 - CO2 Bots & Macros - 1 Replies
I've customized a script to run without problem and lvls ur Meditate and Healing Rain at the same time! Now im only a lvl 54 tao so it might not work for those under or above my lvl. But it works for me. The good thing is though is that the script is very easy to understand and can be configured pretty much by anyone. AC Tool=Download Script to Run= SetActiveWindow &#91;Conquer2.0&#93; Constants sit={F3}
TIP FOR LVLING HEALING RAIN
04/22/2007 - CO2 Exploits, Hacks & Tools - 6 Replies
I found that if you go to an area of tg where there are alot of dummies and stakes being hit and use it it seems to lvl faster.At least thats what it does for me I hope it works for you.I know its not a hack but its worth trying till the new one comes out.
Heal Rain Leveler
02/22/2006 - CO2 Bots & Macros - 5 Replies
As promised I have made a Heal rain leveler. Uses 3 love rings set to &#60;f2>, 3 Normal rings &#60;f3>, Heal Rain &#60;F1>, Meditation &#60;f4>, and Sit &#60;F5> This one works off of your meditation level as well as you heal rain level to maximize its effectiveness



All times are GMT +1. The time now is 12:48.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.