Register for your free account! | Forgot your password?

You last visited: Today at 22:12

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

Advertisement



Auto Event!

Discussion on Auto Event! within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
xToffer's Avatar
 
elite*gold: 0
Join Date: Apr 2018
Posts: 139
Received Thanks: 18
Auto Event!

Code:
void CAutoEvent::ReadInc()
{
	CScanner script;
	if( script.Load( "AutoEvent.inc" ) == FALSE )
	{
		Error("Could not load AutoEvent.inc!");
		return ;
	}

	EventMonster pEventMonster;
	BOOL skip = FALSE;
	script.GetToken();
	while( script.tok != FINISHED )
	{
		if(script.Token == _T("EventMonster"))
		{
			script.GetToken();
			
			pEventMonster.dwID = script.GetNumber();
			pEventMonster.bIsSpawn = FALSE;
			while(script.Token != _T( "}" ))
			{
				
				MoverProp * pMoverProp = prj.GetMoverProp(pEventMonster.dwID);
				if(!pMoverProp)
				{
					skip = TRUE;
					Error("Invalid Mover ID[%d]",pEventMonster.dwID);
				}
				
				script.GetToken();//{
				while(script.Token != _T( "}" ))
				{	
					
					if(script.Token == _T("Intervall"))
					{
						script.GetToken();//=
						pEventMonster.nInterval = script.GetNumber();
					}
					else if(script.Token == _T("percentage"))
					{
						script.GetToken();//=
						pEventMonster.nPercentage = script.GetNumber();
					}
					else if(script.Token == _T("Gift"))
					{
						EventGift pEventGift;
						script.GetToken();
						int nCount = 0;
						while(script.Token != _T("}"))
						{
							if(script.Token == _T("SetGift"))
							{
								BOOL bSkip = FALSE;
								script.GetToken();//(
								pEventGift.dwID = script.GetNumber();
								script.GetToken();//,
								pEventGift.nCount = script.GetNumber();
								script.GetToken();//)
								pEventGift.nPercentage = 0;
								ItemProp * pItemProp = prj.GetItemProp(pEventGift.dwID);
								
								if(!pItemProp)
								{
									Error("Error AutoEvent ID [Monster %i] Item[%i]",pEventMonster.dwID,pEventGift.dwID);
									bSkip = TRUE;
								}
								map<DWORD,EventGift>::iterator it = pEventMonster.m_aEventGift.find( pEventGift.dwID );
								if( it != pEventMonster.m_aEventGift.end() )
								{
									Error("Error AutoEvent Duplicatet ItemGift[Monster %i] [ID %i]",pEventMonster.dwID,pEventGift.dwID);
									bSkip = TRUE;
								}
								
								if(!bSkip)
								{
									pEventMonster.m_aEventGift.insert(make_pair(nCount,pEventGift));
									nCount++;
								}
							}
							script.GetToken();
						}
						//script.GetToken();
						continue;
						
					}
					else if(script.Token == _T("Positions"))
					{
						EventPosition pEventPosition;
						int nCount = 0;
						script.GetToken();
						while(script.Token!=_T("}"))
						{
							if(script.Token == _T("SetPosition"))
							{
								script.GetToken();//(
								D3DXVECTOR3 vPos;
								pEventPosition.dwID= script.GetNumber();
								script.GetToken();//,
								vPos.x = script.GetNumber();
								script.GetToken();//,
								vPos.y = script.GetNumber();
								script.GetToken();//,
								vPos.z = script.GetNumber();
								script.GetToken();//,
								script.GetToken();//Position Text
								pEventPosition.strPosition = script.Token;
								script.GetToken();//)

								pEventPosition.position = vPos;
								pEventMonster.m_aEventPosition.insert(make_pair(nCount,pEventPosition));
								nCount++;
							}
							script.GetToken();
						}
						//script.GetToken();
						//continue;
					}
					script.GetToken();
					//Error(script.Token);
				}
				if(!skip)
				{
					pEventMonster.dwTime = GetTickCount();
					m_aEventMonster.insert(make_pair(pEventMonster.dwID, pEventMonster));
				}
				pEventMonster.m_aEventGift.clear();
				pEventMonster.m_aEventPosition.clear();

				pEventMonster.dwID = script.GetNumber(); // ID;
				
			}
			script.GetToken();
		}
		script.GetToken();
	}
#ifdef __AUTO_EVENT_DEBUG
	Error("Count %d",m_aEventMonster.size());
	for( map<DWORD,EventMonster>::iterator i = m_aEventMonster.begin(); i != m_aEventMonster.end(); i++ )
	{
			EventMonster* pEvent = &i->second;
			if(!pEvent)
				continue;

			Error("---------Start EventMonster Count");
			Error("EventMonster[%d],Interval[%d],Percentage[%d],",pEvent->dwID,pEvent->nInterval,pEvent->nPercentage);
			Error("---------Start Gift");
			Error("GiftCount %d",pEvent->m_aEventGift.size());
			for(map<DWORD,EventGift>::iterator i = pEvent->m_aEventGift.begin(); i != pEvent->m_aEventGift.end(); i++)
			{
				EventGift* pGift = &i->second;

				if(!pGift)
					continue;

				Error("Gift[%d],Count[%d],Percentage[%d]",pGift->dwID,pGift->nCount,pGift->nPercentage);
			}
			Error("Posi %d",pEvent->m_aEventPosition.size());
			for(map<DWORD,EventPosition>::iterator i = pEvent->m_aEventPosition.begin(); i != pEvent->m_aEventPosition.end(); i++)
			{
				EventPosition* posi = &i->second;

				if(!posi)
					continue;

				Error("Position[%d],XYZ[%f,%f,%f]",posi->dwID,posi->position.x,posi->position.y,posi->position.z);
			}
	}
this is correct or not? hahaha lol.

Code:
EventMonster 771 //ID of monster "771"
}
Intervall = 3 //interval or respawn time? this is 3hours?
percentage = 10 //percentage of being respawn? i'm not sure lol.
{

Gift
}
SetGift = ( 2313, 10 ) // id of item, and the amount. ithink
}

Positions
}
SetPosition = ( 1, 1000, 100, 1000, "GG" ) // number of world, x position, y position, z position, i dont know the last one.
{
xToffer is offline  
Old 09/11/2018, 17:36   #2
 
elite*gold: 0
Join Date: Sep 2014
Posts: 6
Received Thanks: 2
like that :
/*
EventMonster
{
MonsterID Muss als Zahl
{
Intervall = x //intervall in minuits that a monster can be spawned
percentage = percent that monster get spawnd
Positions // set the positions where monster can get spawned random
{
SetPosition(WorldID, Posx, posy, posz, "Text where monster is")
...
...
...
}
Gift
{
//get picked random
SetGift(ItemID, Count)
SetGift...
...
}
}
.. usw.
}
*/
Whitelem is offline  
Thanks
1 User
Old 01/10/2019, 17:21   #3
 
xToffer's Avatar
 
elite*gold: 0
Join Date: Apr 2018
Posts: 139
Received Thanks: 18
bump
xToffer is offline  
Old 01/10/2019, 23:53   #4
 
Mike Oxmaul's Avatar
 
elite*gold: 50
Join Date: Feb 2014
Posts: 288
Received Thanks: 245
funny that no one ever fixed that dumb scanner mistake
Mike Oxmaul is offline  
Thanks
1 User
Old 01/11/2019, 08:44   #5
 
xToffer's Avatar
 
elite*gold: 0
Join Date: Apr 2018
Posts: 139
Received Thanks: 18
Quote:
Originally Posted by Jupsi332 View Post
funny that no one ever fixed that dumb scanner mistake
yeah
xToffer is offline  
Reply


Similar Threads Similar Threads
Maul-Online D11 / Auto System / Auto Equipment / Uniuqe Rank / Auto Event Fun
01/26/2015 - SRO PServer Advertising - 5 Replies
Welcome to Maul-Online official thread! I'm proud to finally present to you the server we spent long time working hard on just to keep it well-established Maul-Online online is based on Vsro files Server Will lunched 22/01/2015 Server : Online We Are Here To Represent To You A Server Which Is The Best Old School Server With The Old iSro Features .
Maul-Online D11 / Auto System / Auto Equipment / Uniuqe Rank / Auto Event Fun
01/25/2015 - SRO PServer Advertising - 51 Replies
http://i.epvpimg.com/pcfKe.jpg Welcome to Maul-Online official I'm proud to finally present to you the server we spent long time thread! working hard on just to keep it well-established Online-Online online is based on Vsro files Server is lunched 22/01/2015 Server time : Online http://i.epvpimg.com/V53Ge.png
LatinOnline D11 / Auto System / Auto Equipment / Uniuqe Rank / Auto Event Fun
01/16/2015 - SRO PServer Advertising - 4 Replies
http://i.epvpimg.com/MSJIf.jpg Welcome to Latin-Online official thread! I'm proud to finally present to you the server we spent long time working hard on just to keep it well-established Latin-Online online is based on Vsro files Server is lunched 12/01/2015 Server time : Online ??????????????????????????????



All times are GMT +2. The time now is 22:12.


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.