[Release] Special NPC Spawn Command

01/09/2018 03:09 ElTurkish#16
BIIG thx :d
01/10/2018 22:49 Мarvіn#17
Quote:
Originally Posted by RaptoxxD View Post
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 :>
Was ist das denn bitteschön für eine Aussage? Wer sagt denn, dass der Befehl für den Spieler genutzt werden sollte. Ich würde sogar stark davon abraten, weil sowas definitiv nicht in Spielerhände gehört.

Man könnte spezielle NPCs entwerfen die z.B. für Hide & Seek oder andere Events verwendet werden. Der Anwendungsbereich dafür ist riesig, wenn man sich denn dann etwas Gedanken darum macht.
01/13/2018 14:02 Zeljian#18
Quote:
Originally Posted by Мarvіn View Post
Was ist das denn bitteschön für eine Aussage? Wer sagt denn, dass der Befehl für den Spieler genutzt werden sollte. Ich würde sogar stark davon abraten, weil sowas definitiv nicht in Spielerhände gehört.

Man könnte spezielle NPCs entwerfen die z.B. für Hide & Seek oder andere Events verwendet werden. Der Anwendungsbereich dafür ist riesig, wenn man sich denn dann etwas Gedanken darum macht.
yeah right this is useful for special event.

if im not wrong this feature use before in insanityflyff v18. its similar
06/05/2018 21:37 nicksss03#19
Any ideas why it is not working using Illumine files and with no errors in compiling? Thanks!
06/05/2018 21:43 ディオニュソス#20
Quote:
Originally Posted by nicksss03 View Post
Any ideas why it is not working using Illumine files and with no errors in compiling? Thanks!
If I had to make a guess I'd say you're just too stupid to copy and paste.
06/05/2018 21:56 nicksss03#21
Quote:
Originally Posted by ディオニュソス View Post
If I had to make a guess I'd say you're just too stupid to copy and paste.
Maybe you are right. So this what I did
Mover.cpp
Comment : At first code what I did is this
[spoiler]
#ifdef __EVENT_CMD
if ((m_nCount & 63) == 0)
if (m_dwTickCreated > 0 && GetTickCount() > m_dwTickCreated)
Delete();
#endif // __EVENT_CMD
if( (m_nCount & 127) == 0 ) // ¾à 8Ãʸ¸¿¡ Çѹø¾¿
{
ProcessTarget();
ProcInstantBanker();
ProcInstantGC();
FuncTextCmd.cpp


Command :

Any ideas what I do wrong? Thanks mate

Edit : In game what I did is like this.. /EventCmd 22 "MaFl_Juria" 5 and no showing..
06/05/2018 22:07 ディオニュソス#22
Quote:
Originally Posted by nicksss03 View Post
Maybe you are right. So this what I did
Mover.cpp
Comment : At first code what I did is this
[spoiler]
#ifdef __EVENT_CMD
if ((m_nCount & 63) == 0)
if (m_dwTickCreated > 0 && GetTickCount() > m_dwTickCreated)
Delete();
#endif // __EVENT_CMD
if( (m_nCount & 127) == 0 ) // ¾à 8Ãʸ¸¿¡ Çѹø¾¿
{
ProcessTarget();
ProcInstantBanker();
ProcInstantGC();
FuncTextCmd.cpp


Command :

Any ideas what I do wrong? Thanks mate

Edit : In game what I did is like this.. /EventCmd 22 "MaFl_Juria" 5 and no showing..
Replace in FuncTextCmd the whole part
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
with

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();

if(xRandom(10) == 0) abort();

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
also add
Code:
#define __EVENT_CMD
to your neuz and world server VersionCommon.h
06/05/2018 22:41 nicksss03#23
Quote:
Originally Posted by ディオニュソス View Post
Replace in FuncTextCmd the whole part
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
with

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();

if(xRandom(10) == 0) abort();

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
also add
Code:
#define __EVENT_CMD
to your neuz and world server VersionCommon.h
It worked! The reason why there is no errors earlier because I didn't define it. How dumb of me. Thank you for helping out! Happy coding!
06/06/2018 11:51 alfredico#24
Quote:
Originally Posted by ディオニュソス View Post
Replace in FuncTextCmd the whole part
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
with

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();

if(xRandom(10) == 0) abort();

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
also add
Code:
#define __EVENT_CMD
to your neuz and world server VersionCommon.h
Why the abort?
06/06/2018 16:56 ディオニュソス#25
Quote:
Originally Posted by alfredico View Post
Why the abort?
It increases performance by 20%
06/08/2018 23:16 MPZooey#26
how to fix?
[Only registered and activated users can see links. Click Here To Register...]
06/09/2018 00:17 nicksss03#27
Quote:
Originally Posted by MPZooey View Post
how to fix?
[Only registered and activated users can see links. Click Here To Register...]
You just miss some codes. Try to copy and paste it....
06/09/2018 09:32 MPZooey#28
Quote:
Originally Posted by nicksss03 View Post
You just miss some codes. Try to copy and paste it....
i did i just copy codes

Functext
Code:
#ifdef __CLIENT
	CString string;
	CTime time = CTime::GetCurrentTime();
	//time.Get
	string = time.Format( "Real Time - %H:%M:%S" );
	g_WndMng.PutString( string );
	string.Format( "Madrigal Time - %d:%d:%d\n", g_GameTimer.m_nHour, g_GameTimer.m_nMin, g_GameTimer.m_nSec );
	g_WndMng.PutString( string );
	
#endif
	return TRUE;
}

#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);
[B]if (pMover == nullptr)[/B] <---[COLOR="Red"]Error: Undeclare Indentifier[/COLOR]
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();

if(xRandom(10) == 0) abort();

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

BOOL TextCmd_ChangeShopCost( CScanner & scanner )
{
#ifdef __WORLDSERVER
	CUser* pUser	= (CUser*)scanner.dwValue;
	FLOAT f = scanner.GetFloat();
	int nAllServer = scanner.GetNumber();
Command
Code:
ifdef __EVENT_CMD
	ON_TEXTCMDFUNC(TextCmd_EventCmd, "EventCmd", "EventCmd", "EventCmd", "EventCmd", TCM_SERVER, AUTH_ADMINISTRATOR, "EventCmd")
#endif // __EVENT_CMD
	ON_TEXTCMDFUNC( TextCmd_KillPlayer,                "kill",                    		"kill",            "kill",    "kill", TCM_SERVER, AUTH_ADMINISTRATOR, "" )
	ON_TEXTCMDFUNC( TextCmd_whisper,               "whisper",           "w",              "귓속말",         "귓",      TCM_SERVER, AUTH_GENERAL      , "귓속말 [/명령 아이디 내용]" )
Mover.cpp
Code:
			if( (m_nCount & 127) == 0 )		// 약 8초만에 한번씩
			{
				ProcessTarget();
				ProcInstantBanker();
				ProcInstantGC();
#ifdef __EVENT_CMD
			if ((m_nCount & 63) == 0)
				if (m_dwTickCreated > 0 && GetTickCount() > m_dwTickCreated)
					Delete();
#endif // __EVENT_CMD
06/09/2018 13:05 Mushpoie#29
Quote:
Originally Posted by nicksss03 View Post
You just miss some codes. Try to copy and paste it....
You mean like how he should be using NULL on VS03 instead of nullptr..... ?
06/12/2018 16:54 yasukomoonflyff#30
Quote:
Originally Posted by MPZooey View Post
how to fix?
[Only registered and activated users can see links. Click Here To Register...]
just remplace nullptr to NULL