Register for your free account! | Forgot your password?

You last visited: Today at 15:03

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

Advertisement



dupe command

Discussion on dupe command within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
dupe command

It's a command for duplicate an item. By me

Code:
#ifdef __DUPLICATE
BOOL TextCmd_Duplicate( CScanner& scanner )
{
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;
	if( IsValidObj( pUser ) )
	{
		CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
		if( pItemElem )
		{
			int nNumber	= scanner.GetNumber();
			if( scanner.tok == FINISHED )
			{
				if( pUser->m_Inventory.GetEmptyCount() < 1 )
					pUser->AddDefinedText( TID_GAME_LACKSPACE );
				else
					pUser->CreateItem( pItemElem );
			}
			else
			{
				if( nNumber > MAX_INVENTORY )
					nNumber = MAX_INVENTORY;
				
				else if( nNumber < 1 )
					nNumber = 1;
				
				if( pUser->m_Inventory.GetEmptyCount()-nNumber < 1 )
					pUser->AddDefinedText( TID_GAME_LACKSPACE );
				else
				{
					for( int i = nNumber; i != 0; i-- )
						pUser->CreateItem( pItemElem );
				}
			}
		}
	}
#endif // __WORLDSERVER
	return TRUE;
}
#endif // __DUPLICATE

	ON_TEXTCMDFUNC( TextCmd_Duplicate,						"Duplicate",				"duplicate",		"dup",		"DUP",		TCM_BOTH,	AUTH_GAMEMASTER3,	""	)
sebariio is offline  
Thanks
1 User
Old 09/10/2016, 20:49   #2

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Dude...
Wtf ?

Code:
	CUser* pUser = (CUser*)scanner.dwValue;
	CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
	if( pItemElem && IsValidObj( pUser ) )
Check your puser BEFORE, because you use the puser before "pUser->m_Inventory.GetAt"
ZeroTwo02 is offline  
Old 09/10/2016, 20:49   #3
 
elite*gold: 0
Join Date: Feb 2014
Posts: 11
Received Thanks: 1
Does it copy awakenings and such?
Supindahood is offline  
Old 09/10/2016, 20:56   #4
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
Quote:
Originally Posted by Supindahood View Post
Does it copy awakenings and such?
yea, piercing, awakening, jewel, model_change, ... all ^^
sebariio is offline  
Old 09/10/2016, 20:57   #5

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Quote:
Originally Posted by sebariio View Post
yea, piercing, awakening, jewel, model_change, ... all ^^
Nice edit, better
ZeroTwo02 is offline  
Old 09/10/2016, 21:00   #6
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
sebariio is offline  
Thanks
1 User
Old 09/10/2016, 21:14   #7
 
kevinkraus's Avatar
 
elite*gold: 110
Join Date: Oct 2010
Posts: 306
Received Thanks: 58
Does it change the Item ID ?

- Kevin
kevinkraus is offline  
Old 09/10/2016, 23:21   #8
 
ImpreZz1994's Avatar
 
elite*gold: 0
Join Date: Jul 2016
Posts: 29
Received Thanks: 5
Can you release the buy buttons Power ups and arrows?
ImpreZz1994 is offline  
Old 09/18/2016, 18:48   #9
 
elite*gold: 0
Join Date: Dec 2014
Posts: 98
Received Thanks: 6
Can u release ur inventory?
pedala1 is offline  
Old 09/19/2016, 14:18   #10

 
Chyukαsame's Avatar
 
elite*gold: 0
Join Date: Oct 2012
Posts: 1,102
Received Thanks: 564
Or you all code it self like him?
Chyukαsame is offline  
Old 09/19/2016, 19:34   #11
 
elite*gold: 0
Join Date: Feb 2015
Posts: 111
Received Thanks: 7
ist das nicht nur für items die man nicht stapeln kann ? weil sonst wäre ja max item nicht möglich =??????
ironiebob1994 is offline  
Old 09/20/2016, 21:05   #12

 
elite*gold: 353
Join Date: Jan 2013
Posts: 924
Received Thanks: 617
Quote:
Originally Posted by ironiebob1994 View Post
ist das nicht nur für items die man nicht stapeln kann ? weil sonst wäre ja max item nicht möglich =??????
Richtig davon mal abgesehen das es null sinn macht, ein Item zu verdoppeln das eh immer gleich ist ( vom erstell Vorgang )
Denk ich auf jeden Fall ^^
Kiseku is offline  
Old 09/21/2016, 14:07   #13
 
elite*gold: 7
Join Date: Oct 2007
Posts: 431
Received Thanks: 253
Quote:
Originally Posted by Arcitc™ View Post
Richtig davon mal abgesehen das es null sinn macht, ein Item zu verdoppeln das eh immer gleich ist ( vom erstell Vorgang )
Denk ich auf jeden Fall ^^
Also als Admin kann es vielleicht zu Testzwecken manchmal nützlich sein ein Item zu verdoppeln. Für Events oder um das Balance zu testen oder was weiß ich, eine nette Idee ist es ja an sich.

Aber um auf die Frage von kevinkraus zurückzukommen, würde mich auch interessieren, ob es die Item ID auch kopiert, dann wäre das ganze nicht mehr so schön.
Rodopushin is offline  
Old 09/21/2016, 15:30   #14
 
elite*gold: 0
Join Date: Jan 2014
Posts: 773
Received Thanks: 374
Quote:
Originally Posted by xXXKillianXXx View Post
Also als Admin kann es vielleicht zu Testzwecken manchmal nützlich sein ein Item zu verdoppeln. Für Events oder um das Balance zu testen oder was weiß ich, eine nette Idee ist es ja an sich.

Aber um auf die Frage von kevinkraus zurückzukommen, würde mich auch interessieren, ob es die Item ID auch kopiert, dann wäre das ganze nicht mehr so schön.
Natürlich wird die Item id kopiert weil sonst hast du nachher ein anderes Item?

wenn du die "seriennummer" meinst kannst du doch einfach mal in der ITEM_TBL oder so ähnlich nach schauen bzw wenn es so ist einfach eine zeile am code verändern und fertig ist es.
Drabur is offline  
Old 09/23/2016, 09:46   #15
 
elite*gold: 115
Join Date: Jan 2012
Posts: 1,156
Received Thanks: 894
Quote:
Originally Posted by ImpreZz1994 View Post
Can you release the buy buttons Power ups and arrows?
Quote:
Originally Posted by pedala1 View Post
Can u release ur inventory?


if you don't know how to code it.. just google basic c++
Rhyder` is offline  
Reply


Similar Threads Similar Threads
Command line interface working command
08/05/2012 - DarkOrbit - 27 Replies
I found only one working command: Enter "J" when you are in teleport Anyone know other commands?



All times are GMT +1. The time now is 15:03.


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.