Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 23:18

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

Advertisement



Petfilder Code richtig einfügen

Discussion on Petfilder Code richtig einfügen within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2008
Posts: 158
Received Thanks: 16
Petfilder Code richtig einfügen

Hallo,
ich bin mit c++ nicht so sicher und wäre nett wenn mir jemand bestätigen könnte ob ich den code so richtig eingefügt habe . Ich hab mir jetzt schon ein paar petfilter codes angesehen und langsam komm ich zur überzeugung das das ein Teil vom Code fehlt.
Cross veröffentlicht Code Auszüge mit Zeilenangaben bezogen auf seinen VScoure code oder ? weil wenn ich den Clean Source nehme die auch Sedrika nimmt dann finde ich die Zeilenangabe nicht schlüssig. und wenn ich mir die von xXConXx die ansehe unterscheiden die sich auch wieder
Wäre also für jede Hilfe dankbar

Code:
BOOL CAIPet::SubItemLoot( void )
{
	CMover* pMover = GetMover();
	CMover* pOwner = prj.GetMover( m_idOwner );
	CWorld* pWorld = GetWorld();
	MoverProp *pProp = pMover->GetProp();
	D3DXVECTOR3 vPos = pMover->GetPos();
	CObj *pObj = NULL;
	int nRange = 0;
	D3DXVECTOR3 vDist;
	FLOAT fDistSq, fMinDist = 9999999.0f;
	CObj *pMinObj = NULL;

	vDist = pOwner->GetPos() - pMover->GetPos();
	fDistSq = D3DXVec3LengthSq( &vDist );
	if( fDistSq > 32.0f * 32.0f )	// ÁÖÀδ԰úÀÇ °Å¸®°¡ 32¹ÌÅͰ¡ ³ÑÀ¸¸é ¾ÆÀÌÅÛ ¾ÈÁý´Â´Ù.
		return FALSE;

	if( pOwner && pOwner->IsFly() )
		return FALSE;
		
	// ±ÙóÀÇ ¾ÆÀÌÅÛÀ» °Ë»öÇÔ. - ÁÖÀδԲ¨¸¸ °Ë»öÇØ¾ßÇÒµí...
	FOR_LINKMAP( pWorld, vPos, pObj, nRange, CObj::linkDynamic, pMover->GetLayer() )
	{
		if( pObj->GetType() == OT_ITEM )	//OT_ITEM
		{
			CItem *pItem = (CItem *)pObj;  //pItem vllt IK3 usw
			ItemProp* pItemProp	= pItem->GetProp();
			// ÀÌ°É µû·Î ³ÖÀºÀÌÀ¯´Â StateIdle ARRIVAL¿¡¼* DoLoot()ÇÏ°í ³*Á÷ÈÄ¿¡ ´Ù½Ã SubItemLoot()À» È£ÃâÇßÀ»¶§
			// LootÇÑ ¾ÆÀÌÅÛÀÌ ¾ÆÁ÷ ¾ÈÁö¿öÁ®¼* ¿©±â¼* ¶Ç °Ë»öÀÌ µÇ´õ¶ó°í.. ±×·¡¼* Áߺ¹µÇ´Â ¾ÆÀÌÅÛÀº °Ë»ö ¾ÈµÇ°Ô °íÃĺôÙ.
//			if( pItem->GetId() != m_idLootItem )

			if( pItem->IsDelete() == FALSE )
			{
				if( pItemProp )
				{
[COLOR="Red"]					BOOL b1 = TRUE;

#ifdef __WORLDSERVER
#ifdef _PETFILTER_HOL_B
						//Error("Kind1: %i,Kind2: %i,Kind3: %i; pMover->m_pActMover->bQuestItem: %i", (int) pItemProp->dwItemKind1, (int) pItemProp->dwItemKind2, (int) pItemProp->dwItemKind3, (int)pMover->m_pActMover->bQuestItem);
						// BYTE cQuestItem , cWeapons , cArmor , cCards , cDrinks, cEggs, cStones , cAccessory
						if(!pOwner->bQuestItem && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_GEM && pItemProp->dwItemKind3 == IK3_GEM)
							b1 = FALSE;
						else if(!pOwner->bWeapons && pItemProp->dwItemKind1 == IK1_WEAPON)
							b1 = FALSE;
						else if(!pOwner->bArmor && pItemProp->dwItemKind1 == IK1_ARMOR)
							b1 = FALSE;
						else if(!pOwner->bCards && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_MATERIAL && pItemProp->dwItemKind3 != IK3_ULTIMATE && pItemProp->dwItemKind3 != IK3_ENCHANT && pItemProp->dwItemKind3 != IK3_PIERDICE)
							b1 = FALSE;
						else if(!pOwner->bFood && pItemProp->dwItemKind1 == IK1_GENERAL && (pItemProp->dwItemKind2 == IK2_FOOD || pItemProp->dwItemKind2 == IK2_REFRESHER || pItemProp->dwItemKind2 == IK2_POTION))
							b1 = FALSE;
						else if(!pOwner->bEggs && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_GENERAL && pItemProp->dwItemKind3 == IK3_EGG)
							b1 = FALSE;
						else if(!pOwner->bStones && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_MATERIAL && (pItemProp->dwItemKind3 == IK3_PIERDICE || pItemProp->dwItemKind3 == IK3_ENCHANT || pItemProp->dwItemKind3 == IK3_ULTIMATE || pItemProp->dwItemKind3 == IK3_SUPSTONE))
							b1 = FALSE;
						else if(!pOwner->bAccessory && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_JEWELRY)
							b1 = FALSE;
#endif
#endif[/COLOR]

					if( pOwner->IsLoot( pItem, TRUE ) && b1 )	// ·çÆÃµÇ´Â¾ÆÀÌÅÛÀÎÁö °Ë»çÇÔ.
					{
						vDist = pObj->GetPos() - pMover->GetPos();
						fDistSq = D3DXVec3LengthSq( &vDist );		// °Å¸® ±¸ÇÔ.
						if( fDistSq < 15 * 15 && fDistSq < fMinDist )	// 10¹ÌÅÍ À̳»°í... °¡Àå °Å¸®°¡ °¡±î¿î ¾ÆÅÛÀ» ãÀ½.						
							[COLOR="Red"]pMinObj = pObj;						[/COLOR]
					}
				}
			}
		}
	}
	END_LINKMAP

	if( pMinObj )
	{
		// Get object ID of the loot item
		DWORD dwIdLootItem = ((CItem *)pMinObj)->GetId();

		// Get the item obj
		CCtrl *pCtrl = prj.GetCtrl( dwIdLootItem );	

		// if exists...
		if( IsValidObj(pCtrl) )
		{
				MoveToDst( pMinObj->GetPos() );		// ¸ñÇ¥ÂÊÀ¸·Î À̵¿.
				m_idLootItem = dwIdLootItem;
				m_bLootMove = TRUE;
		}
	}
		
	return m_bLootMove;
}

BOOL CAIPet::StateInit( const AIMSG & msg )
{
	return TRUE;
}
Schnuffel16 is offline  
Old 04/25/2011, 17:58   #2
 
elite*gold: 0
Join Date: Jul 2010
Posts: 130
Received Thanks: 9
xD wenns funktioniert wirds wohl richtig sein. es gibt nicht so viele die das haben( ist nicht standart). Probiers aus...
Neonbilli is offline  
Old 04/25/2011, 18:12   #3
 
Pumbaaa's Avatar
 
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 829
Ist richtig, sieht man doch sogar als Anfänger ;D
Pumbaaa is offline  
Old 04/25/2011, 18:41   #4
 
elite*gold: 0
Join Date: Jan 2011
Posts: 373
Received Thanks: 114
richtig ja aber ob der klappt ist ne andere sache
compilier mal alles und geh ingame und teste ob es klappt^^
~Product~ is offline  
Old 04/26/2011, 18:13   #5
 
elite*gold: 0
Join Date: Feb 2011
Posts: 57
Received Thanks: 35
also ich hab nen kleinen unterschied bei mir
Code:
					if( pOwner->IsLoot( pItem, TRUE ) && b1 )	// ·çÆÃµÇ´Â¾ÆÀÌÅÛÀÎÁö °Ë»çÇÔ.
					{
						vDist = pObj->GetPos() - pMover->GetPos();
						fDistSq = D3DXVec3LengthSq( &vDist );		// °Å¸® ±¸ÇÔ.
						if( fDistSq < 15 * 15 && fDistSq < fMinDist )	// 10¹ÌÅÍ À̳»°í... °¡Àå °Å¸®°¡ °¡±î¿î ¾ÆÅÛÀ» ãÀ½.
						[COLOR="Red"]{[/COLOR]
							pMinObj = pObj;
						[COLOR="Red"]}[/COLOR]
					}
xXConsXx is offline  
Old 04/26/2011, 18:14   #6
 
Pumbaaa's Avatar
 
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 829
das is aber egal
Pumbaaa is offline  
Old 04/26/2011, 18:25   #7
 
elite*gold: 30
Join Date: Oct 2010
Posts: 1,509
Received Thanks: 849
Die Klammen ja, die darüber und darunter aber nicht
Fullscreen is offline  
Old 04/26/2011, 18:25   #8
 
elite*gold: 0
Join Date: Feb 2010
Posts: 294
Received Thanks: 85
Quote:
Originally Posted by Pumbaaa View Post
das is aber egal
Sag nochmal das ist egal und ich hau dich Oo . Sowas bewirkt unterschiede.
Ancientsword is offline  
Old 04/26/2011, 18:44   #9
 
Pumbaaa's Avatar
 
elite*gold: 20
Join Date: Apr 2009
Posts: 804
Received Thanks: 829
Quote:
Originally Posted by Ancientsword View Post
Sag nochmal das ist egal und ich hau dich Oo . Sowas bewirkt unterschiede.
Bewirkt es nicht, solange der Zweig nur eine Anweisung enthält.
Rein Maschinel ist der Code dann identisch.
Wenn es 2 gibt, hast du recht.
Beispiel:
Code:
if( var==0 )
     cout << "Var = 0! \n";
else
     cout <<"Var != 0! \n";
     cout <<"Wo gehöre ich hin?";

[I]Quelle: C++ von A bis Z von Jürgen Wolf[/I]
Vom Compiler schwer zu interpretieren.
Pumbaaa is offline  
Old 04/26/2011, 20:41   #10
 
elite*gold: 0
Join Date: Jan 2008
Posts: 158
Received Thanks: 16
Die variabel (pMinObj) soll den wert der Variabel (pObj) übernehmen .Daas steht doch allein, was sollen dann die Klammern , die bewirken doch nichts. Wenn ich flach liege sll mich bitte mal jemand aufklären.
Liebe Grüße Schnuffel
Schnuffel16 is offline  
Reply


Similar Threads Similar Threads
ICQ Emoticons richtig einfügen!
05/19/2013 - Tutorials - 120 Replies
So liebe Community bin wieder da und diesmal mit einem großem Tutorial! Bei diesem Tutorial bin ich selbst ein bissle stolz auf mich da ich wirklich gestern 1 1/2 Stunden dran gesessen habe um mal ne Lösung dafür zu finden. Lange Rede kurzer Sinn, SynT@x presents: ICQ Emoticons richtig einfügen! Das tolle an dem Tutorial ist, dass ihr eigentlich (falls ihr es noch nicht habt) nur ein Programm braucht: - 7zip -
metin2 map richtig einfügen
05/31/2012 - Metin2 Private Server - 3 Replies
Hey. Wo muss ich bei den 2010 Files die Maps eintragen. Hab game99 und Ch1 bekomme Fehler ./write full .... Kann einer helfen Danke!
[How to]Waffen von Sonygeils Serverfiles richtig einfügen
07/27/2011 - Metin2 PServer Guides & Strategies - 14 Replies
Hey Com. Dies ist mein erstes How to deshalb bitte ich um nicht so starke kritik :D Ich habe bermerkt das viele nicht wissen wie man die neuen Waffen aus Sonygeils serverfiles richtig einfügt. Ich habe darunter noch nichts gefunden deshalb schreibe ich mal dieses How to. Schritt 1. Downloaded die waffen (sind in den 255 files von sonygeil enthalten, diese findet ihr im forum. Schritt 2.Ihr geht in euren Client unter locale_de.Dort findet ihr dann die item_list.Diese öffnet ihr mit dem...
Wie soll ich richtig Starterset einfügen?
04/15/2011 - Metin2 Private Server - 5 Replies
Hallo Ich hätte da mal eine frage ich habe schon ein theme gefunden wie man starterset einfügt. aber es hat nicht geklappt habe In usr... quest/notarget/letter das eingefügt (siehe auch anhang) : say_title ( "Willkommen" ) say ( "Willkommen auf Dem Server." ) say ( "Bei Fragen oder Bugs wende dich bitte an das Team" ) say ( "Das Team wünscht dir viel Spass!" ) say ( "Bitte keine Anfragen zum GM werden," )
[How To] Rüsis Richtig einfügen! + download
02/05/2011 - Metin2 PServer Guides & Strategies - 5 Replies
Hallo erstmal, ich mache mein erstes How-To also bitte net so streng sein. Also da ich durch die Sufu nix gescheites gufunden hab und wenn ich was gefunden hab dann unvollständig.:rtfm: Also ich erklärs euch einfach mal wies richtig geht!:handsdown: Als erstes sucht ihr euch eine Neue Rüstung aus die ihr einfügen wollt Ich hab mal die Weiß-Schwarze-Goldene Rüstungen genommen ich weis net wie se heisen deswegen hab ich se Götterrüstungen gennant.



All times are GMT +1. The time now is 23:20.


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