Register for your free account! | Forgot your password?

You last visited: Today at 05:35

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

Advertisement



Small Fix __NO_TRADE

Discussion on Small Fix __NO_TRADE within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
Small Fix __NO_TRADE

Hi elitepvpers,

in some sources we have the __NO_TRADE this will stop the Staff members for trading and or receiving sending mail.

However an staff member cant read normal mail cause it is preventing by the __NO_TRADE system.

What i have done is made it so that Staff members can recieve and sending normal mail.

Staff members cant send items and or gold and also normal players cant send items and or gold to staff members. Except Admins.

this code will only go inside the function
void CDPSrvr::OnQueryPostMail( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )

Under
Code:
if( pItemElem->IsCharged() )
				{
					pUser->AddDiagText( prj.GetText( TID_GAME_CANNOT_POST ) );
					return;
				}
You place this
Code:
#ifdef __NO_TRADE
				if(g_eLocal.GetState(EVE_NO_TRADE))
				{
					if( idReceiver != AUTH_ADMINISTRATOR && idReceiver != AUTH_GENERAL )
					{
						pUser->AddText("You cannot send items to Staff Members.");
						return;
					}
					if(!pUser->IsAuthorization(AUTH_GENERAL) && !pUser->IsAuthorization(AUTH_ADMINISTRATOR) && !pUser->IsAuthorization(AUTH_OPERATOR))
					{		
						pUser->AddText("As an Staff member you cant send items to players.");
						return;
					}
				}
#endif
Under
Code:
{
				pUser->AddDiagText( prj.GetText( TID_GAME_LACKMONEY ) );
				return;
			}
You place this
Code:
#ifdef __NO_TRADE
				if(g_eLocal.GetState(EVE_NO_TRADE))
				{
					if( idReceiver != AUTH_ADMINISTRATOR && idReceiver != AUTH_GENERAL && nGold > 0 )
					{
						pUser->AddText("You cant send Gold to an Staff member.");
						return;
					}
					if(!pUser->IsAuthorization(AUTH_GENERAL) && !pUser->IsAuthorization(AUTH_ADMINISTRATOR) && !pUser->IsAuthorization(AUTH_OPERATOR) && nGold > 0)
					{		
						pUser->AddText("As an staff member you cant send gold to players.");
						return;
					}
					else
					{
						pUser->AddGold( (int)( (int)( nPostGold + nGold ) * (-1) ), TRUE );	// »ç¿ë·á Áö±Þ
					}
				}
#endif
Inside the source of Gentros

Remove these codes
Code:
#ifdef __NO_TRADE
		if(g_eLocal.GetState(EVE_NO_TRADE))
		{
			if(!pUser->IsAuthorization(AUTH_GENERAL) && !pUser->IsAuthorization(AUTH_ADMINISTRATOR) && !pUser->IsAuthorization(AUTH_OPERATOR))
			{		
				pUser->AddText("Unauthorized Action.");
				return;
			}
		}
#endif
From these functions
void CDPSrvr::OnQueryRemoveMail( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )

And
void CDPSrvr::OnQueryGetMailItem( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )

And
void CDPSrvr::OnQueryGetMailGold( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )

And
void CDPSrvr::OnQueryReadMail( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )

And
void CDPSrvr::OnQueryMailBox( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )

If you have done this rebuild the worldserver

@Credits goes to their respective creators

With kind regards,
raventh1984 is offline  
Thanks
2 Users
Old 05/31/2015, 14:51   #2
 
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
Hi, I received this error when I compiled, where to declare the EVE_NO_TRADE and the others too?
pakinglalat is offline  
Old 05/31/2015, 14:55   #3
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
Sorry about that. Forgot something haha

inside FlyffEvent.h

Under EVE_RAINBOWRACE,

#ifdef __NO_TRADE
EVE_NO_TRADE,
#endif

Inside WorldServer.exe

Under
Code:
else if( s.Token == "RAINBOWRACE" )
		{
			g_eLocal.SetState( EVE_RAINBOWRACE, 1 );
		}
Code:
#ifdef __NO_TRADE
        else if ( s.Token == "NO_TRADE")
        {
            g_eLocal.SetState( EVE_NO_TRADE, 1 );
        }
#endif
Inside WorldServer.ini put NO_TRADE

Define __NO_TRADE in versionCommon.h WorldServer
raventh1984 is offline  
Old 05/31/2015, 15:09   #4
 
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
Hi again, uhm how about this?
pakinglalat is offline  
Old 05/31/2015, 15:11   #5
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
Check your Authorization.h file
raventh1984 is offline  
Old 05/31/2015, 15:17   #6
 
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
So looks like I don't have the OPERATOR, should I just change the one in your code to something else like the GAMEMASTER/2/3/4 or other high auth?

pakinglalat is offline  
Old 05/31/2015, 15:24   #7
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
You can remove it or change it to something else

Keep in mind that if you do not want your staff with AUTH setting lower then Z can mail items etc then remove the AUTH_OPERATOR from the code.
raventh1984 is offline  
Old 05/31/2015, 15:30   #8
 
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
Okay I get it already, thank you Raventh!
pakinglalat is offline  
Reply


Similar Threads Similar Threads
[Selling] Aktuellen Small Humble Bundles & Small Weekly Bundles
09/15/2013 - elite*gold Trading - 6 Replies
Pro Small Bundle nur 100 http://cdn.elitepvpers.org/images/tbm/gold.gif http://i.epvpimg.com/AxApg.png http://www.elitepvpers.com/images/tbm/treasure_cl osed.png http://i.epvpimg.com/KsO0c.png http://www.elitepvpers.com/images/tbm/treasure_cl osed.png
[Small-Release] Mob regen helper (small)
06/15/2012 - Metin2 PServer Guides & Strategies - 8 Replies
Huhu, ich fülle gerade einige maps mit Monster voll und da der Map Pointer da nichts funktioniert von Musicinstrutor.. Hab ich eben schnell ne Funktion geschrieben. function mob_add_temp_regendata() -- local filename = 'wuste' local mob_vnums = number(2340,2346) -- local rr = number(1,2)
Small things for small rewards.
10/10/2011 - CO2 Private Server - 1 Replies
Hey, Coding small things for small rewards. I try to fix up people 5375 sources as I know the entire source inside out(I did work with the base for over 4 months).. A few bugs knows are the: Peace PKMode, PKA, Useless NPCs,



All times are GMT +2. The time now is 05:35.


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.