Register for your free account! | Forgot your password?

You last visited: Today at 16:19

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

Advertisement



Source Problems

Discussion on Source Problems within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
Marc~'s Avatar
 
elite*gold: 0
Join Date: Sep 2011
Posts: 677
Received Thanks: 390
Source Problems

Hab mal ein paar Probleme in der Source ich stock hier mal nach und nach auf.

#1
SendItem System
Habe mich mal an einem SendItem System versucht, ist grundlegend der CI Code erweitert durch eine Characterabfrage, jedoch sendet es kein Item. Würde mich über einen Denkanstoß oder eine Lösung freuen!
Lösung:

Dankeschön im Vorhinein!
Marc~ is offline  
Old 09/03/2016, 23:00   #2
 
Blouflash's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 183
Received Thanks: 699
Jopsi wieder am failen.

Code:
BOOL TextCmd_SendItem( CScanner& scanner )
{
#ifdef __WORLDSERVER
	scanner.GetToken();
	CUser* pUser = (CUser*)scanner.dwValue;

	u_long idPlayer = CPlayerDataCenter::GetInstance()->GetPlayerId(scanner.token);
	CUser* pUserTarget = static_cast<CUser*>(prj.GetUserByID(idPlayer));

	if (!IsValidObj(pUserTarget))
	{
		pUser->AddText("Invalid target");
		return TRUE;
	}

	scanner.GetToken();

	DWORD dwNum;
	DWORD dwCharged		= 0;
	ItemProp* pProp	= NULL;

	if( scanner.tokenType == NUMBER )
		pProp	= prj.GetItemProp( _ttoi( scanner.Token ) );
	else
		pProp	= prj.GetItemProp( scanner.Token );

	if( pProp && pProp->dwItemKind3 != IK3_VIRTUAL )
	{
		if( pProp->dwItemKind3 == IK3_EGG && pProp->dwID != II_PET_EGG )	// ¸®¾îÆêÀ» »ý¼ºÇÏ·Á°í ÇÒ °æ¿ì "¾Ë"ÀÎ °æ¿ì¸¸ »ý¼º °¡´ÉÇÏ´Ù.
			return TRUE;

		dwNum	= scanner.GetNumber();
		dwNum	= ( dwNum == 0? 1: dwNum );
		dwCharged	= scanner.GetNumber();
		dwCharged	= ( dwCharged == 0 ? 0 : 1 );
		
		CItemElem itemElem;
		itemElem.m_dwItemId		= pProp->dwID;
		itemElem.m_nItemNum		= (short)( dwNum );
		itemElem.m_nHitPoint	= -1;
		itemElem.m_bCharged		= dwCharged;

		pUserTarget->CreateItem( &itemElem );
	}
#endif	// __WORLDSERVER 
	return TRUE;
}
Habs getestet und es geht.
Blouflash is offline  
Thanks
3 Users
Old 09/03/2016, 23:03   #3
 
Marc~'s Avatar
 
elite*gold: 0
Join Date: Sep 2011
Posts: 677
Received Thanks: 390
Dankeschön, funktioniert.
Marc~ is offline  
Old 09/03/2016, 23:05   #4

 
elite*gold: 353
Join Date: Jan 2013
Posts: 923
Received Thanks: 616
Code:
	if (!IsValidObj(pUser))
	{
		pUser->AddText("Invalid target");
		return TRUE;
	}
AddText ist sehr sinnvoll
@

da fehlt noch :
Code:
	if (!IsValidObj(pUser))
	{
		return FALSE;
	}
Kiseku is offline  
Reply


Similar Threads Similar Threads
Some Problems source
09/30/2014 - Metin2 Private Server - 0 Replies
1: When users teleport using teleport ring, teleporter on city, or any kind of teleport who use quest with the inventory open, they get a invisible inventory on right side of the screen and need press ESC 3 times to close this window and then play normal again. This problem happen to on the official server. 2: My users after the migration are having a high lag, but isn't internet lag, they are having a graphical lag, and my partner already test and she is having lag too even with an i7,16gb...
Problems with source
08/24/2014 - Metin2 Private Server - 8 Replies
https://www.youtube.com/watch?v=reszoAeAyZQ&fe ature=youtu.be After you place your compiled game no longer go the missions. Why? Sorry for my english.
Big problems in my source...
11/18/2012 - CO2 Private Server - 1 Replies
1.The commands GM / PM dsnt work .. and i have a big error in consola The source version is 5620 how can i do to solve this problems .. http://iceimg.com/i/94/16/dc014f7ca4.png
[Problems] Source 5165 All Problems
11/28/2009 - CO2 Private Server - 7 Replies
Hello Everyone, Ok i will put All my problems here So i hope noone spamming and Say Go learn C# and w/e 1-RegPage: fixed all by adding  to the start of the pass and  to the end of the pass. its working okay and when i create character and try to rejoin the game close with itself Note: When i make From NewestCOServer Cmd it works fine and the game dont close i mean i want other players to make thier own accounts and dont ask me to make them The Accounts they want. 2-Lottery: Cant...



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


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.