Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 01:38

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

Advertisement



[TUT]How to Cross Bow

Discussion on [TUT]How to Cross Bow within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
max982's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 119
Received Thanks: 35
[TUT]How to Cross Bow

Hello
Happy new year

i found this on my computer so im gona share it
it works 100% (this one is the same used in flyforglory)

this code will make you the crossbow to work like on an official server

Code:
IN DPClient.cpp
---------------------------------
Replace
-----------
	if( pItemBase->GetProp()->dwParts == PARTS_RWEAPON )
	{
		CItemElem* pItemElemWepon = g_pPlayer->m_Inventory.GetEquip( PARTS_RWEAPON	);
		if( pItemElemWepon && pItemElemWepon->GetProp()->dwItemKind3 == IK3_BOW ) 
		{
			if( pItemBase->GetProp()->dwItemKind3 != IK3_BOW )	// ÀåÂøµÇ¾îÀִ°ÍÀÌ º¸¿ì¸é ¾È¹þ°ÜµÎ µÊ
			{
				CItemElem* pItemElemBullet = g_pPlayer->m_Inventory.GetEquip( PARTS_BULLET );	
				if( pItemElemBullet && pItemElemBullet->GetProp()->dwItemKind3 == IK3_ARROW )
				{
					BEFORESENDSOLE( ar, PACKETTYPE_DOUSEITEM, DPID_UNKNOWN );
					ar << MAKELONG( ITYPE_ITEM, pItemElemBullet->m_dwObjId );
					ar << pItemElemBullet->m_dwObjId;
					ar << PARTS_BULLET;
					SEND( ar, this, DPID_SERVERPLAYER );
				}			
			}
		}
	}

-----------------------
with:
-----------------------
	if( pItemElem->GetProp()->dwParts == PARTS_RWEAPON )
	{
		CItemElem* pItemElemWepon = g_pPlayer->m_Inventory.GetEquip( PARTS_RWEAPON	);
		if( pItemElemWepon && ( pItemElemWepon->GetProp()->dwItemKind3 == IK3_BOW || pItemElemWepon->GetProp()->dwItemKind3 == IK3_CROSSBOW ) ) // ÀåÂøµÇ¾îÀִ°ÍÀÌ È°À̸é
		{
			if( pItemElem->GetProp()->dwItemKind3 != IK3_BOW || pItemElem->GetProp()->dwItemKind3 != IK3_CROSSBOW )	// ÀåÂøµÇ¾îÀִ°ÍÀÌ º¸¿ì¸é ¾È¹þ°ÜµÎ µÊ
			{
				CItemElem* pItemElemBullet = g_pPlayer->m_Inventory.GetEquip( PARTS_BULLET );	
				if( pItemElemBullet && pItemElemBullet->GetProp()->dwItemKind3 == IK3_ARROW )
				{
					BEFORESENDSOLE( ar, PACKETTYPE_DOEQUIP, DPID_UNKNOWN );
					ar << pItemElemBullet->m_dwObjId;
					ar << PARTS_BULLET;
					SEND( ar, this, DPID_SERVERPLAYER );
				}			
			}
		}
	
	}


------------------
WndWorld.cpp
--------------------
replace:
--------------------
					if( pItemProp->dwItemKind3 == IK3_BOW  )
						g_pPlayer->CMD_SetRangeAttack( idTarget, nPower );	


------------------
with:
------------------
					if( pItemProp->dwItemKind3 == IK3_BOW || pItemProp->dwItemKind3 == IK3_CROSSBOW )
						g_pPlayer->CMD_SetRangeAttack( idTarget, nPower );	


-----------------
replace:
------------------
				if( pItemElem && (pItemElem->GetProp()->dwItemKind3 == IK3_BOW ) )
				{
					if( !m_bLButtonDown )
						g_pPlayer->CMD_SetRangeAttack( pFocusObj->GetId(), 0 );		// ¿ø°Å¸®°ø°Ý ÆÐÅÏ¿¡ µé¾î°¨ 
				}
------------------
with:
------------------
				if( pItemElem && (pItemElem->GetProp()->dwItemKind3 == IK3_BOW || pItemElem->GetProp()->dwItemKind3 == IK3_CROSSBOW) )
				{
					if( !m_bLButtonDown )
						g_pPlayer->CMD_SetRangeAttack( pFocusObj->GetId(), 0 );		// ¿ø°Å¸®°ø°Ý ÆÐÅÏ¿¡ µé¾î°¨ 
				}

-------------------
after
-------------------
			case IK3_BOW:
				m_dwPowerTick = ::GetTickCount() + POWER_ATK_DELAY;
				g_pPlayer->CMD_SetRangeAttack( idTarget, nPower );		
				break;
--------------------
add
--------------------
			case IK3_CROSSBOW:
				m_dwPowerTick = ::GetTickCount() + POWER_ATK_DELAY;
				g_pPlayer->CMD_SetRangeAttack( idTarget, nPower );		
				break;
---------------------
after
---------------------
	if( pItemElem && pItemElem->GetProp()->dwItemKind3 == IK3_BOW ) 
	{
		// ±×¸®°í ¿ÞÂÊ ¹öÆ°À» ´©¸£°í Æ÷Ä¿½º°¡ ÀÖ¾î¾ßÇÑ´Ù. ±×·¡¾ß ¸¶¹ý ŸÀÌ¹Ö ÀÛµ¿Çϴϱî.
		if( pFocus && pFocus->GetType() == OT_MOVER && g_pPlayer->IsLive() )
		{
			bRenderGauge = TRUE;
			if( m_bLButtonDown && m_bSelectTarget )
			{
				if( nPower >= MAX_CHARGE_LEVEL )			// ¸Æ½ºÄ¡°¡ µÇ¸é ÀÚµ¿À¸·Î ¹ß»çµÊ.
					dwShootItemKind = IK3_BOW;
			}
		}
	}

-----------------------
add
------------------------
	if( pItemElem && pItemElem->GetProp()->dwItemKind3 == IK3_CROSSBOW ) 
	{
		// ±×¸®°í ¿ÞÂÊ ¹öÆ°À» ´©¸£°í Æ÷Ä¿½º°¡ ÀÖ¾î¾ßÇÑ´Ù. ±×·¡¾ß ¸¶¹ý ŸÀÌ¹Ö ÀÛµ¿Çϴϱî.
		if( pFocus && pFocus->GetType() == OT_MOVER && g_pPlayer->IsLive() )
		{
			bRenderGauge = TRUE;
			if( m_bLButtonDown && m_bSelectTarget )
			{
				if( nPower >= MAX_CHARGE_LEVEL )			// ¸Æ½ºÄ¡°¡ µÇ¸é ÀÚµ¿À¸·Î ¹ß»çµÊ.
					dwShootItemKind = IK3_CROSSBOW;
			}
		}
	}

---------------------------
WndField.cpp
----------------------------
replace
----------------------------
	else if(m_pItemElem->GetProp()->dwItemKind3 == IK3_YOYO ||
			m_pItemElem->GetProp()->dwItemKind3 == IK3_KNUCKLEHAMMER ||
			m_pItemElem->GetProp()->dwItemKind3 == IK3_BOW)
----------------------------
with
---------------------------
	else if(m_pItemElem->GetProp()->dwItemKind3 == IK3_YOYO ||
			m_pItemElem->GetProp()->dwItemKind3 == IK3_KNUCKLEHAMMER ||
			m_pItemElem->GetProp()->dwItemKind3 == IK3_BOW ||
			m_pItemElem->GetProp()->dwItemKind3 == IK3_CROSSBOW)


------------------------------
Project.cpp
-----------------------------
After
----------------------------
	switch( dwItemKind3 )
	{
	case IK3_SWD:
	case IK3_CHEERSTICK:
	case IK3_WAND:	
	case IK3_AXE:
	case IK3_KNUCKLEHAMMER:
	case IK3_STAFF:
	case IK3_YOYO: 
	case IK3_BOW:
----------------------------
add
----------------------------
	case IK3_CROSSBOW:


-----------------------------
Moverskill.cpp
-----------------------------
replace
----------------------------
	case IK3_YOBO:
		if( dwItemKind3 != IK3_YOYO && dwItemKind3 != IK3_BOW  )	
		{
			if( IsPlayer() )
				( (CUser*)this )->AddDefinedText( TID_GAME_WRONGITEM, "" );
			return FALSE;
		}
		break;

-----------------------------
with
-----------------------------

	case IK3_YOBO:
		if( dwItemKind3 != IK3_YOYO && dwItemKind3 != IK3_BOW && dwItemKind3 != IK3_CROSSBOW  )	
		{
			if( IsPlayer() )
				( (CUser*)this )->AddDefinedText( TID_GAME_WRONGITEM, "" );
			return FALSE;
		}
		break;

-------------------------
MoverMsg.cpp
-------------------
replace
--------------------
	if( pItemProp->dwItemKind3 != IK3_BOW  )	// µé°íÀÖ´Â ¹«±â°¡ º¸¿ì°¡ ¾Æ´Ï¸é ¿¡·¯
		return;

--------------------
with
-------------------
	if( pItemProp->dwItemKind3 != IK3_BOW && pItemProp->dwItemKind3 != IK3_CROSSBOW )	// µé°íÀÖ´Â ¹«±â°¡ º¸¿ì°¡ ¾Æ´Ï¸é ¿¡·¯
		return;

--------------------
MoverEquip.cpp
---------------------
replace
-----------------------
	// È*»ìÀ» Âø¿ëÇÏ·Á ÇßÀ»¶§ º¸¿ìÀ϶§¸¸ Âø¿ëµÅ¾ß ÇÔ
	if( pItemProp->dwItemKind3 == IK3_ARROW && ( pHandItemProp == NULL ||  pHandItemProp->dwItemKind3 != IK3_BOW  ) )
		return FALSE;			

---------------------
with
----------------
	// È*»ìÀ» Âø¿ëÇÏ·Á ÇßÀ»¶§ º¸¿ìÀ϶§¸¸ Âø¿ëµÅ¾ß ÇÔ
	if( pItemProp->dwItemKind3 == IK3_ARROW && ( pHandItemProp == NULL || ( pHandItemProp->dwItemKind3 != IK3_BOW && pHandItemProp->dwItemKind3 != IK3_CROSSBOW )) )
		return FALSE;			

-------------------
after
-----------------
				case IK3_BOW:
					((CModelObject*)pModel)->SetParent( PARTS_RWEAPON, ((CModelObject*)pModel)->GetLHandIdx() );
					break;

----------------
add
---------------
				case IK3_CROSSBOW:
					((CModelObject*)pModel)->SetParent( PARTS_RWEAPON, ((CModelObject*)pModel)->GetRHandIdx() );
					break;

---------------
after
----------------
					case IK3_BOW:
						((CModelObject*)pModel)->SetParent( PARTS_RWEAPON, ((CModelObject*)pModel)->GetLHandIdx() );
						break;
--------------
add
----------------

					case IK3_CROSSBOW:
						((CModelObject*)pModel)->SetParent( PARTS_RWEAPON, ((CModelObject*)pModel)->GetRHandIdx() );
						break;

--------------
Mover.cpp
--------------
replace
---------------
		if( pItemProp->dwItemKind3 == IK3_BOW || pItemProp->dwLinkKind == IK3_BOW )
		{
			dwTip = TID_TIP_NEEDSATTACKITEM;			
		}

--------------
with
---------------

		if( pItemProp->dwItemKind3 == IK3_BOW || pItemProp->dwLinkKind == IK3_BOW || pItemProp->dwItemKind3 == IK3_CROSSBOW || pItemProp->dwLinkKind == IK3_CROSSBOW )
		{
			dwTip = TID_TIP_NEEDSATTACKITEM;			
		}


------------------
after
----------------
				case IK3_BOW: 
					if( !bMasterPlayer ) dwMotion += MTI_STAND_13;
					else dwMotion += 200;
					break;
------------------
add
-------------------
				case IK3_CROSSBOW: 
     					   if( !bMasterPlayer ) dwMotion += MTI_STAND_15;
     					   else dwMotion += 200;
      					  break;


--------------------
Ctrl.cpp
---------------------
Replace
--------------------

			if( pSkillProp->dwLinkKind == IK3_BOW )
			{
				CModelObject *pModel = (CModelObject *)m_pModel;
				pModel->GetHandPos( &vPos, PARTS_LWEAPON, GetMatrixWorld() );		// ÁÖ¸Ô ¿ùµåÁÂÇ¥ ±¸ÇÔ		
				vPos.y -=	1.0f;
			}

------------------
with
------------------
			if( pSkillProp->dwLinkKind == IK3_BOW || pSkillProp->dwLinkKind == IK3_CROSSBOW )
			{
				CModelObject *pModel = (CModelObject *)m_pModel;
				pModel->GetHandPos( &vPos, PARTS_LWEAPON, GetMatrixWorld() );		// ÁÖ¸Ô ¿ùµåÁÂÇ¥ ±¸ÇÔ		
				vPos.y -=	1.0f;
			}



---------------------
ActionMovermsg.cpp
-------------------------
replace
---------------------------

				CItemElem* pItemElem = pMover->GetWeaponItem();
				if( pItemElem && (pItemElem->GetProp()->dwItemKind3 == IK3_WAND || pItemElem->GetProp()->dwItemKind3 == IK3_BOW ) )
					return -2;

------------------------------
with
-----------------------------

				CItemElem* pItemElem = pMover->GetWeaponItem();
				if( pItemElem && (pItemElem->GetProp()->dwItemKind3 == IK3_WAND || pItemElem->GetProp()->dwItemKind3 == IK3_BOW || pItemElem->GetProp()->dwItemKind3 == IK3_MAGICBARUNA || pItemElem->GetProp()->dwItemKind3 == IK3_CROSSBOW ) )
					return -2;
Have fun and if it helped you
press thanks
max982 is offline  
Thanks
4 Users
Old 12/31/2011, 19:18   #2
 
Yasunai's Avatar
 
elite*gold: 159
Join Date: Sep 2010
Posts: 3,001
Received Thanks: 595
Whats the Reason for this Thread?

And Thanks Happy New Year too.

Yours sencierly

Yasunai
Yasunai is offline  
Old 12/31/2011, 19:30   #3
 
max982's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 119
Received Thanks: 35
this code will make you the crossbow to work like on an official server
i forgot to add it XD
max982 is offline  
Old 12/31/2011, 19:34   #4
 
Yasunai's Avatar
 
elite*gold: 159
Join Date: Sep 2010
Posts: 3,001
Received Thanks: 595
Okay Thank you.
You got a thanks,
but i don't need it
Yasunai is offline  
Old 12/31/2011, 21:15   #5
 
Jacksx3's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 113
Received Thanks: 35
Cool you became a thanks ! !
Jacksx3 is offline  
Old 01/01/2012, 03:14   #6
 
N8Schatten's Avatar
 
elite*gold: 6
Join Date: Oct 2011
Posts: 506
Received Thanks: 84
ich checke es net nochma auf deutsch Bitte.
Der Code macht den Bogen wie bei Offi richtig?
aber wo is der unterschied zu "unseren" Bisherigen Bögen??
N8Schatten is offline  
Old 01/01/2012, 15:10   #7
 
elite*gold: 455
Join Date: Jun 2009
Posts: 1,601
Received Thanks: 1,103
Quote:
Originally Posted by N8Schatten View Post
ich checke es net nochma auf deutsch Bitte.
Der Code macht den Bogen wie bei Offi richtig?
aber wo is der unterschied zu "unseren" Bisherigen Bögen??
Mit dem neuen Crossbow steht man normalerweise anders, läuft man anders
(wie ein Soldat, sieht echt lustig aus) und die "Schieß-Animation" hat sich verändert. Nur wenige Server haben es wirklich eingebaut, einige kennen es nichtmal.
Flash! is offline  
Thanks
2 Users
Old 01/02/2012, 02:50   #8
 
elite*gold: 0
Join Date: Dec 2011
Posts: 206
Received Thanks: 224
Man saugt sich Etiooms source und hat es scheis leaker lol.
yannickFlyff is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Explanation] Cross Fire Terms [Erklärung] Cross Fire Begriffe
07/10/2011 - CrossFire - 3 Replies
English Version Hello dear section. I dedicate myself today to the numerous terms in CrossFire. In order to call first only a few examples. For example: Lagjump or Quickshot.. I try to explain these terms to you as well as possible. However everything does not have to be correct, what I posts become.
WTS Armour of cross
07/26/2010 - Archlord Trading - 1 Replies
I'm Wanting to trade Armour of Cross for 2 scrolls or 1 scroll + ?. pme me with offer or /w me in game on Brumhart server. ign: Kodak4000
Something cross in my mind (lol)
11/17/2008 - Perfect World - 6 Replies
Well, I was thinking something about hacking idea in PW that make's me curios. So I want to ask some question (I hope someone can ask about this) 1. Is there any possibilities changing the Skill Range value(UsingCE ) (Like Archers skill). So job like Mage/FX can shoot longer distance?, Well My tought tell me it's probably server side (but i never tried to find the value/pointer anyway). 2. Suppose we can change the value/pointer of range/distance skill. it's there any possibilities we can...



All times are GMT +2. The time now is 01:38.


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.