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 14:38

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

Advertisement



[Release] Single-Right Click to use Items

Discussion on [Release] Single-Right Click to use Items within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1

 
netHoxInc's Avatar
 
elite*gold: 2
Join Date: Jan 2008
Posts: 778
Received Thanks: 983
Lightbulb [Release] Single-Right Click to use Items

As seen on some Servers, you can use a Right-Click on Items in your Inventory to use/activate them, instead of the painful double-left-clicking. (Specially annoying on awakes/Upgrade processes)

Here I'm releasing a basic code making your Inventory be able to use a single-right-click instead.

So here's what we're about to edit:

Neuz project:



Credits: 100% me, netHox
Inspiration: various P-servers


Update: Delete Items directly without Yes/No prompt from Inventory by holding alt+shift+rightclicking the Item

Preview:


Source-Code Snippet's above have this included now, if you dont wish to use it, just dont define:
Code:
__DELETEITEM_INSTANT
netHoxInc is offline  
Thanks
10 Users
Old 04/05/2018, 08:24   #2
 
elite*gold: 0
Join Date: Mar 2018
Posts: 71
Received Thanks: 5
very nice. but the question is for the player wrong right click to the item will dmd.
Rhea03 is offline  
Old 04/05/2018, 10:35   #3
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
im don't have intelligent on c++ codes. but i think this feature may can help in game thank for this sir

Edit: Sir i got this? can you help me please?
babyminion is offline  
Old 04/05/2018, 11:14   #4
 
FlyServices's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 49
Received Thanks: 33
Quote:
Originally Posted by babyminion View Post
im don't have intelligent on c++ codes. but i think this feature may can help in game thank for this sir

Edit: Sir i got this? can you help me please?
Your for loop have an incorrect syntaxe and you forgot a }
FlyServices is offline  
Thanks
1 User
Old 04/05/2018, 11:17   #5

 
netHoxInc's Avatar
 
elite*gold: 2
Join Date: Jan 2008
Posts: 778
Received Thanks: 983
Quote:
Originally Posted by babyminion View Post
im don't have intelligent on c++ codes. but i think this feature may can help in game thank for this sir

Edit: Sir i got this? can you help me please?
The errors dont tell any much detailed stuff, you should check the code arround the error locations, you maybe copied something to a wrong location, or are using an older sourcecode maybe? (this uses Visual Studio 2017)

Better re-check twice for miss-copying ^^
netHoxInc is offline  
Thanks
1 User
Old 04/05/2018, 11:18   #6
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by FlyServices View Post
Your for loop have an incorrect syntaxe and you forgot a }
i just copied from what the thread say's and im just a leecher idk how it works well *****

Quote:
Originally Posted by netHoxInc View Post
The errors dont tell any much detailed stuff, you should check the code arround the error locations, you maybe copied something to a wrong location, or are using an older sourcecode maybe? (this uses Visual Studio 2017)

Better re-check twice for miss-copying ^^
yes sir im using old source i think im using erendora files and thats what i got. and im using vs2003 only ***** pizup!
babyminion is offline  
Old 04/05/2018, 11:43   #7

 
netHoxInc's Avatar
 
elite*gold: 2
Join Date: Jan 2008
Posts: 778
Received Thanks: 983
Im not 100% sure if all functions included will work in VS2003, but usual c++ knownledge should be enough to fix it. Im not a c++ pro myself so, I dont know the differenced of version in exact.

But as long as you put it into the right location, the code should only spit our reference or syntax errors, which shouldnt be hard to fix by googling them.

Cheers
netHoxInc is offline  
Old 04/05/2018, 12:56   #8
 
FlyServices's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 49
Received Thanks: 33
Code:
void CWndItemCtrl::OnLButtonDblClk( UINT nFlags, CPoint point )
{
	if( !g_pPlayer )
		return;

	if( !m_pItemContainer )
		return;

	if( GetAsyncKeyState( VK_LCONTROL ) & 0x8000 )
		return;

	if( CWndBase::m_GlobalShortcut.IsEmpty() == FALSE )
		return;

	int nItem = HitTest( point );
	if( nItem == -1 )	return;

	CItemElem* pItemElem = NULL;
	pItemElem = GetItem( nItem );

#ifdef __DELETEITEM_INSTANT
	if (/*pItemElem && GetAsyncKeyState(VK_MENU)&& */GetAsyncKeyState(VK_SHIFT))
		g_DPlay.SendRemoveItem( pItemElem, pItemElem->m_nItemNum );
	else
#endif // __DELETEITEM_INSTANT
	{
#if __VER >= 8 // __CSC_VER8_5
		if( IsUsableItem( pItemElem ) || (m_useDieFlag && pItemElem != NULL))
#else // __CSC_VER8_5
		if( IsUsableItem( pItemElem ) )
#endif // __CSC_VER8_5
		{
			if( IsSelectedItem( nItem ) == FALSE )
			{
				m_dwSelectAry.RemoveAll();
				m_dwSelectAry.Add( nItem );
				m_nCurSelect = nItem;
				m_pFocusItem = pItemElem;
			}

			CWndBase* pParent = (CWndBase*)GetParentWnd();
			pParent->OnChildNotify( WIN_DBLCLK,m_nIdWnd,(LRESULT*)m_pFocusItem); 
		}
	}
}
Code:
void CWndInventory::OnRButtonDown(UINT nFlags, CPoint point)
{
#ifdef __DOUBLECLICK_ITEMUSE
	for( int i = PARTS_UPPER_BODY; i < MAX_HUMAN_PARTS; i++ )
	{
		if( m_InvenRect[i].PtInRect( point ))
		{
			CItemElem* pItemElem = NULL;
			pItemElem = (CItemElem*)g_pPlayer->GetEquipItem(i);
			if( pItemElem )
				g_DPlay.SendDoEquip(pItemElem, i);
		}
	}
#endif //__DOUBLECLICK_ITEMUSE
	BaseMouseCursor();
}
FlyServices is offline  
Thanks
1 User
Old 04/05/2018, 14:02   #9
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by FlyServices View Post
Code:
void CWndItemCtrl::OnLButtonDblClk( UINT nFlags, CPoint point )
{
	if( !g_pPlayer )
		return;

	if( !m_pItemContainer )
		return;

	if( GetAsyncKeyState( VK_LCONTROL ) & 0x8000 )
		return;

	if( CWndBase::m_GlobalShortcut.IsEmpty() == FALSE )
		return;

	int nItem = HitTest( point );
	if( nItem == -1 )	return;

	CItemElem* pItemElem = NULL;
	pItemElem = GetItem( nItem );

#ifdef __DELETEITEM_INSTANT
	if (/*pItemElem && GetAsyncKeyState(VK_MENU)&& */GetAsyncKeyState(VK_SHIFT))
		g_DPlay.SendRemoveItem( pItemElem, pItemElem->m_nItemNum );
	else
#endif // __DELETEITEM_INSTANT
	{
#if __VER >= 8 // __CSC_VER8_5
		if( IsUsableItem( pItemElem ) || (m_useDieFlag && pItemElem != NULL))
#else // __CSC_VER8_5
		if( IsUsableItem( pItemElem ) )
#endif // __CSC_VER8_5
		{
			if( IsSelectedItem( nItem ) == FALSE )
			{
				m_dwSelectAry.RemoveAll();
				m_dwSelectAry.Add( nItem );
				m_nCurSelect = nItem;
				m_pFocusItem = pItemElem;
			}

			CWndBase* pParent = (CWndBase*)GetParentWnd();
			pParent->OnChildNotify( WIN_DBLCLK,m_nIdWnd,(LRESULT*)m_pFocusItem); 
		}
	}
}
Code:
void CWndInventory::OnRButtonDown(UINT nFlags, CPoint point)
{
#ifdef __DOUBLECLICK_ITEMUSE
	for( int i = PARTS_UPPER_BODY; i < MAX_HUMAN_PARTS; i++ )
	{
		if( m_InvenRect[i].PtInRect( point ))
		{
			CItemElem* pItemElem = NULL;
			pItemElem = (CItemElem*)g_pPlayer->GetEquipItem(i);
			if( pItemElem )
				g_DPlay.SendDoEquip(pItemElem, i);
		}
	}
#endif //__DOUBLECLICK_ITEMUSE
	BaseMouseCursor();
}
compile has success! sir thanks for recoding it <3. but feature is not functioning. the only effect of the feature is ( when i right click a item its automatically equip. but when i wear a item and try to try to right click to remove its not working ) and about the SHIFT+ALT+RIGHT THE ITEM its not also working with the code that you give
babyminion is offline  
Old 04/05/2018, 15:01   #10

 
netHoxInc's Avatar
 
elite*gold: 2
Join Date: Jan 2008
Posts: 778
Received Thanks: 983
Quote:
Originally Posted by babyminion View Post
compile has success! sir thanks for recoding it <3. but feature is not functioning. the only effect of the feature is ( when i right click a item its automatically equip. but when i wear a item and try to try to right click to remove its not working ) and about the SHIFT+ALT+RIGHT THE ITEM its not also working sad
Maybe you're using a different Inventory/Equipment window code? Im not sure why it wouldnt do it else.

You could send me the files which you implemented it on on PM, and I'll check if there's something misscopied, but else i got no clue.

For me It works perfectly and i explicitly only did the changes I mentioned above, and the code is original code for these actions, just copied onto these Key functions.
netHoxInc is offline  
Thanks
1 User
Old 04/05/2018, 16:20   #11
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by netHoxInc View Post
Maybe you're using a different Inventory/Equipment window code? Im not sure why it wouldnt do it else.

You could send me the files which you implemented it on on PM, and I'll check if there's something misscopied, but else i got no clue.

For me It works perfectly and i explicitly only did the changes I mentioned above, and the code is original code for these actions, just copied onto these Key functions.
ok sir. i already pm you now
babyminion is offline  
Old 04/05/2018, 16:34   #12
 
elite*gold: 0
Join Date: Mar 2018
Posts: 77
Received Thanks: 57
Quote:
Originally Posted by netHoxInc View Post
Maybe you're using a different Inventory/Equipment window code? Im not sure why it wouldnt do it else.

You could send me the files which you implemented it on on PM, and I'll check if there's something misscopied, but else i got no clue.

For me It works perfectly and i explicitly only did the changes I mentioned above, and the code is original code for these actions, just copied onto these Key functions.
Your code works fine, he just expects you to do it for him. This is how he always rolls with his 13+ help threads a day. No effort, complains it doesn't work till someone directly implements it for him.

Nice release nonetheless.
Mushpoie is offline  
Thanks
2 Users
Old 04/05/2018, 18:31   #13
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by Mushpoie View Post
Your code works fine, he just expects you to do it for him. This is how he always rolls with his 13+ help threads a day. No effort, complains it doesn't work till someone directly implements it for him.

Nice release nonetheless.
im just a leecher what are you expecting for? like i said on my previous replies i dont have enough intelligent on c++. btw i dont have server and i dont want to make im just exploring things regarding flyff/developing and how gm's/admins doing. and coz i love playing flyff since 2004. and i didnt expect that he do it for me sir. and i think theres no problem to post error problems on help desk *****
babyminion is offline  
Old 04/05/2018, 21:00   #14

 
netHoxInc's Avatar
 
elite*gold: 2
Join Date: Jan 2008
Posts: 778
Received Thanks: 983
PM answered, you included code into wrong functions, I've fixed it up just insert the whole code back.

#Leechnote: I dont mind about that, as long as it doesnt end in requesting any other thing. I'm supporting what I've released, as best I can, even to people who aren't cappable of copying things into the correct sections.

But I also have to say, this is an very easy Task, and if @ would've followed the instructions 'correctly', it'd be working fine.

As in this example, he did the WndCtrlItem.cpp in wrong way, he did not seek the function and then

Code:
CPoint pt;
	pt.y = 0;
	pt.y += m_wndScrollBar.GetScrollPos() * nWidth;
Instead he searched this code piece at first, resulting in being copied into the wrong function, as earlier functions uses this code snippet aswell.

So please @echers, Read the Instructions closely.
netHoxInc is offline  
Thanks
2 Users
Old 04/05/2018, 22:14   #15
 
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
Quote:
Originally Posted by netHoxInc View Post
PM answered, you included code into wrong functions, I've fixed it up just insert the whole code back.

#Leechnote: I dont mind about that, as long as it doesnt end in requesting any other thing. I'm supporting what I've released, as best I can, even to people who aren't cappable of copying things into the correct sections.

But I also have to say, this is an very easy Task, and if @ would've followed the instructions 'correctly', it'd be working fine.

As in this example, he did the WndCtrlItem.cpp in wrong way, he did not seek the function and then

Code:
CPoint pt;
	pt.y = 0;
	pt.y += m_wndScrollBar.GetScrollPos() * nWidth;
Instead he searched this code piece at first, resulting in being copied into the wrong function, as earlier functions uses this code snippet aswell.

So please @echers, Read the Instructions closely.
sorry i didn't check it first before i put the codes my bad btw. the codes are now functionable but i saw a little bug thing.

Scenario:
- i try to unequip 4 of my equipments in inventory and i try to reput it again. backwards EX: i unequip item1 then item2 and item3 item4 now i try to wear items backwards first i equip item4 using right click feature. then i was shock! i dont know if its a coincidence or what but i try to rightclick item4 but it's not just that instead it wear's item1 idk how did happen maybe its a bug but its not a big deal i think. btw i just want to report it to you to help sir btw thanks for being kind people godbless


Edit: regarding shift + alt + rightclick = delete
I think the shift + alt + rightclick is not good sometimes because I tried pressing once the shift and i try to walk and do something else and i accidentally press alt and try to unequip one of my things and re-equip again and its gone. im just wondering if someone has official server and player accidentally happened especially if he got very rare item maybe that player will be quit automatically lmfao! That's just my opinion
babyminion is offline  
Reply


Similar Threads Similar Threads
Spam right clicks when right click held
06/18/2014 - CO2 Programming - 0 Replies
Can any one guide me into making this thing? I made 2 scripts, one it autoit and one in autohotkey and they both work but only out of the game. The game seems to be blocking them with some sort of "cheat" guard. I really need this to spamm scatters without developing a carpal-tunner syndrom so i can level up faster and get to double reborn before june 28th (new server) Please help!
[Help]cannot use or right click at my equipment
11/27/2009 - EO PServer Hosting - 1 Replies
i need some help to find this erro...who can find it??
click click click!!!!!!!!!!!
09/07/2007 - Off Topic - 14 Replies
if you reeeeaaaallyyy >are< bored (or if you are annoyed that you have to work on a saturday or smthing :D) Click for Germany - Click Click Click - ClickClickClick.com - Click game here you go ^^ nebenbei, japan hat ca. 500 mill klicks mehr als deutschland!!!!!



All times are GMT +2. The time now is 14: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.