Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server > Flyff PServer Guides & Releases
You last visited: Today at 19:46

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

Advertisement



[Release] Special NPC Spawn Command

Discussion on [Release] Special NPC Spawn Command within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
Blouflash's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 183
Received Thanks: 699
[Release] Special NPC Spawn Command


[Mover.cpp]
In:
Code:
void CMover::Process()
Search for:
Code:
if( (m_nCount & 127) == 0 )
Add this above it:
Code:
#ifdef __EVENT_CMD
			if ((m_nCount & 63) == 0)
				if (m_dwTickCreated > 0 && GetTickCount() > m_dwTickCreated)
					Delete();
#endif // __EVENT_CMD


[FuncTextCmd.cpp]
Search for:
Code:
BOOL TextCmd_ChangeShopCost( CScanner & scanner )
Add this above it:
Code:
#ifdef __EVENT_CMD
BOOL TextCmd_EventCmd(CScanner & scanner)
{
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;

	if (!IsValidObj(pUser))
		return FALSE;

	CString szKey = "";
	DWORD dwId = scanner.GetNumber();

	scanner.GetToken();
	szKey = scanner.Token;

	DWORD dwSec = 0;
	dwSec = scanner.GetNumber();

	CMover* pMover = (CMover*)CreateObj(D3DDEVICE, OT_MOVER, dwId);
	if (pMover == nullptr)
		return FALSE;

	lstrcpy(pMover->m_szCharacterKey, szKey);
	LPCHARACTER lpChar = pMover->GetCharacter();
	pMover->InitNPCProperty();
	pMover->InitCharacter(lpChar);
	pMover->SetPos(pUser->GetPos());
	pMover->InitMotion(MTI_STAND);
	pMover->UpdateLocalMatrix();

	SAFE_DELETE(pMover->m_pAIInterface);
	pMover->SetAIInterface(AII_NONE);
	pMover->m_dwBelligerence = BELLI_PEACEFUL;

	if(dwSec > 0)
		pMover->m_dwTickCreated = GetTickCount() + SEC(dwSec);
	if(pUser->GetWorld())
		pUser->GetWorld()->ADDOBJ(pMover, true, pUser->GetLayer());

#endif // __WORLDSERVER

	return TRUE;
}
#endif // __EVENT_CMD
Search for:
Code:
	ON_TEXTCMDFUNC( TextCmd_whisper,               "whisper",           "w",              "±Ó¼Ó¸»",         "±Ó",      TCM_SERVER, AUTH_GENERAL      , "±Ó¼Ó¸» [/¸í·É ¾ÆÀ̵𠳻¿ë]" )
Add this above it:
Code:
#ifdef __EVENT_CMD
ON_TEXTCMDFUNC(TextCmd_EventCmd, "EventCmd", "EventCmd", "EventCmd", "EventCmd", TCM_SERVER, AUTH_ADMINISTRATOR, "EventCmd")
#endif // __EVENT_CMD


Ingame use:
Code:
/EventCmd MOVERID NPCSCRIPT TIME
Blouflash is offline  
Thanks
19 Users
Old 11/30/2017, 14:58   #2


 
- Major's Avatar
 
elite*gold: 7
Join Date: Sep 2012
Posts: 4,462
Received Thanks: 3,213
Gesehen, Geschrieben und DONE !! Boooom ! Hammer dieser Kerl Ein Thanks reicht dafür nicht
- Major is offline  
Old 11/30/2017, 15:53   #3
 
elite*gold: 0
Join Date: Jul 2011
Posts: 53
Received Thanks: 54
Very useful, thank you!
xhien is offline  
Thanks
1 User
Old 12/03/2017, 21:26   #4
 
elite*gold: 0
Join Date: Nov 2017
Posts: 24
Received Thanks: 7
Very useful, thank you!
[BlackThief] is offline  
Old 12/04/2017, 01:41   #5
 
elite*gold: 0
Join Date: Dec 2014
Posts: 190
Received Thanks: 87
already added and its working.,
Zeljian is offline  
Thanks
1 User
Old 12/07/2017, 17:28   #6
 
elite*gold: 0
Join Date: Mar 2009
Posts: 477
Received Thanks: 218
Cool. You already have spawned it. Now how do you remove them? :O
That function would be cool for Short NPC Custom Events. A timer for them would be cool to see.
Burdenz2007 is offline  
Thanks
1 User
Old 12/07/2017, 17:39   #7
 
elite*gold: 0
Join Date: Mar 2008
Posts: 333
Received Thanks: 284
That's exactly what this command has, lol?
Nortix is offline  
Thanks
1 User
Old 12/19/2017, 19:12   #8
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
where do i define " TextCmd_EventCmd " i got error
babyminion is offline  
Old 12/20/2017, 14:42   #9
 
elite*gold: 0
Join Date: Mar 2008
Posts: 333
Received Thanks: 284
Quote:
Originally Posted by babyminion View Post
where do i define " TextCmd_EventCmd " i got error
You are able to read, aren't you? The post literally tells you where to copy it
Nortix is offline  
Thanks
1 User
Old 12/21/2017, 06:15   #10
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by Nortix View Post
You are able to read, aren't you? The post literally tells you where to copy it
i already did but i got that error?
babyminion is offline  
Old 12/21/2017, 10:09   #11

 
TheRealFoamy's Avatar
 
elite*gold: 273
Join Date: Apr 2011
Posts: 127
Received Thanks: 58
Quote:
Originally Posted by babyminion View Post
i already did but i got that error?
Quote:
Originally Posted by Blouflash View Post
[FuncTextCmd.cpp]
Search for:
Code:
BOOL TextCmd_ChangeShopCost( CScanner & scanner )
Add this above it:
Code:
#ifdef __EVENT_CMD
BOOL TextCmd_EventCmd(CScanner & scanner)
{
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;

	if (!IsValidObj(pUser))
		return FALSE;

	CString szKey = "";
	DWORD dwId = scanner.GetNumber();

	scanner.GetToken();
	szKey = scanner.Token;

	DWORD dwSec = 0;
	dwSec = scanner.GetNumber();

	CMover* pMover = (CMover*)CreateObj(D3DDEVICE, OT_MOVER, dwId);
	if (pMover == nullptr)
		return FALSE;

	lstrcpy(pMover->m_szCharacterKey, szKey);
	LPCHARACTER lpChar = pMover->GetCharacter();
	pMover->InitNPCProperty();
	pMover->InitCharacter(lpChar);
	pMover->SetPos(pUser->GetPos());
	pMover->InitMotion(MTI_STAND);
	pMover->UpdateLocalMatrix();

	SAFE_DELETE(pMover->m_pAIInterface);
	pMover->SetAIInterface(AII_NONE);
	pMover->m_dwBelligerence = BELLI_PEACEFUL;

	if(dwSec > 0)
		pMover->m_dwTickCreated = GetTickCount() + SEC(dwSec);
	if(pUser->GetWorld())
		pUser->GetWorld()->ADDOBJ(pMover, true, pUser->GetLayer());

#endif // __WORLDSERVER

	return TRUE;
}
#endif // __EVENT_CMD
?
TheRealFoamy is offline  
Old 01/04/2018, 17:17   #12
 
klangun's Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 35
Received Thanks: 3
how do you remove the summoned npc's?
klangun is offline  
Old 01/05/2018, 17:52   #13
 
elite*gold: 0
Join Date: Jul 2011
Posts: 53
Received Thanks: 54
Quote:
Originally Posted by klangun View Post
how do you remove the summoned npc's?
/id
- to check the npc's id

/rmvnpc id#
- repleace id# with the number seen in /id
xhien is offline  
Thanks
1 User
Old 01/06/2018, 15:13   #14
 
klangun's Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 35
Received Thanks: 3
Quote:
Originally Posted by xhien View Post
/id
- to check the npc's id

/rmvnpc id#
- repleace id# with the number seen in /id
tnx mate
klangun is offline  
Old 01/08/2018, 21:59   #15
 
elite*gold: 0
Join Date: Oct 2008
Posts: 269
Received Thanks: 62
Am besten bewegen sich die spieler gar nicht mehr selber..
Ganze ticket und was weiß ich was fürn quatsch^^
Könnts verstehen wenn man erst 2 stunden rennen müsste um in die stadt zu kommen, aber da jeder einen teleport hat mitlerweile, unnötig^^
Ist nur meine Meinung, thx kriegste trotzdem für deine Mühe vielleicht kann ja jemand noch was anderes damit anfangen :>
RaptoxxD is offline  
Reply

Tags
blouflash, command, flyff, npc, npc spawn


Similar Threads Similar Threads
[Selling] Best Arma 3 Money spawn - Gear spawn - Vehicles spawn *ON EVERY SERVER*
12/26/2014 - ArmA Trading - 0 Replies
bojkastros Arma 3 Shop ist offen - Geld Spawn - Ausrüstungs Spawn- Fahrzeuge spawnen * auf jedem Server * Geld 2 mil = 1,50 euro 4 mil = 2,50 euro So viel geld wie ihr wollt = 8 euro
Command line interface working command
08/05/2012 - DarkOrbit - 27 Replies
I found only one working command: Enter "J" when you are in teleport Anyone know other commands?



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


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.