Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 16:32

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

Advertisement



[Request] Vending Blocker in all worlds

Discussion on [Request] Vending Blocker in all worlds within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
[Request] Vending Blocker in all worlds

Hey people !

I'm trying to add a code in my source where the creation of shops are blocked in every world but not in my Market world.

I've tried to add this code to my DPSrvr.cpp

Code:
#ifdef __SHOP_BLOCK
if (pWorld && pWorld->GetID() != WI_WORLD_MARKET);
	{
		pUser->AddText("Travel to the Market to open a shop !");
		return;
	}
#endif //__SHOP_BLOCK
&

In my VersionCommon.h of WorldServer
Code:
#define  __SHOP_BLOCK
But players can still create shops everywhere.

Can anyone tell me what I'm doing wrong? I think I have to add something to Neuz?

Thanks!
Minotaurr
Minotaurr is offline  
Old 05/02/2018, 17:05   #2
 
elite*gold: 0
Join Date: Apr 2010
Posts: 82
Received Thanks: 27
c/p complete function please
Meutledaron is offline  
Old 05/02/2018, 17:32   #3
 
elite*gold: 0
Join Date: Mar 2018
Posts: 71
Received Thanks: 5
try this all can block vending except areas you want to allow
DPSrvr.cpp
LOOK FOR
ADD BELOW
IF YOU WANT TO ALLOW ONLY IN FLARIS ITS LIKE THE SAME
ONLY IN FLARIS CITY ALLOW AREA
OR IF YOU WANT TO SAINT MORNING AND FLARIS ALLOWING VENDING
LIKE THIS
ONLY IN SM CITY and FLARIS ALLOW AREA

WorldServer
Versioncommon: #define __ALLOW_VENDING_AREA
Rhea03 is offline  
Old 05/02/2018, 18:56   #4
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Quote:
Originally Posted by Meutledaron View Post
c/p complete function please
What do you mean??

Quote:
Originally Posted by Rhea03 View Post
try this all can block vending except areas you want to allow
DPSrvr.cpp
LOOK FOR
ADD BELOW
IF YOU WANT TO ALLOW ONLY IN FLARIS ITS LIKE THE SAME
ONLY IN FLARIS CITY ALLOW AREA
OR IF YOU WANT TO SAINT MORNING AND FLARIS ALLOWING VENDING
LIKE THIS
ONLY IN SM CITY and FLARIS ALLOW AREA

WorldServer
Versioncommon: #define __ALLOW_VENDING_AREA
Actually I want it per world, not per region :$
Minotaurr is offline  
Old 05/02/2018, 19:15   #5

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Quote:
Originally Posted by Minotaurr View Post
I've tried to add this code to my DPSrvr.cpp

Code:
#ifdef __SHOP_BLOCK
if (pWorld && pWorld->GetID() != WI_WORLD_MARKET);
	{
		pUser->AddText("Travel to the Market to open a shop !");
		return;
	}
#endif //__SHOP_BLOCK
Where you try to add that piece of code?
You need to include it in the function "CDPSrvr::OnPVendorOpen"
ZeroTwo02 is offline  
Old 05/02/2018, 19:15   #6
 
elite*gold: 0
Join Date: Feb 2018
Posts: 39
Received Thanks: 5
void CDPSrvr::OnPVendorOpen( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{
if( uBufSize > 55 ) // 4 + 4 + 48 - 1 = 55
return;

char szPVendor[MAX_VENDORNAME]; // 개인 상점 이름( 48 )
ar.ReadString( szPVendor, MAX_VENDORNAME );

CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
if( IsValidObj( pUser ) )
{
#ifdef __MARKET_TELEPORT_NPC
if( pUser->GetWorld()->GetID() != WI_WORLD_MARKET )
{
pUser->AddText("GO TO THE MARKET FOR A SHOP PUTA");
return ;
}
#endif // __MARKET_TELEPORT_NPC
RedBuIl is offline  
Old 05/03/2018, 13:54   #7
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Quote:
Originally Posted by RedBuIl View Post
void CDPSrvr::OnPVendorOpen( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{
if( uBufSize > 55 ) // 4 + 4 + 48 - 1 = 55
return;

char szPVendor[MAX_VENDORNAME]; // 개인 상점 이름( 48 )
ar.ReadString( szPVendor, MAX_VENDORNAME );

CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
if( IsValidObj( pUser ) )
{
#ifdef __MARKET_TELEPORT_NPC
if( pUser->GetWorld()->GetID() != WI_WORLD_MARKET )
{
pUser->AddText("GO TO THE MARKET FOR A SHOP PUTA");
return ;
}
#endif // __MARKET_TELEPORT_NPC
I used this code, and it works with the message.

But, when I'm in WI_WORLD_MARKET. I get the same message.

I can't open shops anywhere right now :P

How did I do this lol
Minotaurr is offline  
Old 05/05/2018, 05:56   #8
 
xToffer's Avatar
 
elite*gold: 0
Join Date: Apr 2018
Posts: 139
Received Thanks: 18
Quote:
Originally Posted by Minotaurr View Post
I used this code, and it works with the message.

But, when I'm in WI_WORLD_MARKET. I get the same message.

I can't open shops anywhere right now :P

How did I do this lol
try to remove the "!"
xToffer is offline  
Old 05/05/2018, 06:23   #9
 
elite*gold: 0
Join Date: Mar 2018
Posts: 77
Received Thanks: 57
Quote:
Originally Posted by xToffer View Post
try to remove the "!"
You may want to read up on C++ operators.


Anyways...

In: CDPSrvr::OnPVendorOpen(

Below:
Code:
		CWorld* pWorld = pUser->GetWorld();
		if( pWorld && pWorld->GetID() == WI_WORLD_GUILDWAR )
		{			
			pUser->AddText( prj.GetText(TID_GAME_GUILDCOMBAT_CANNOT_TRADE) );
			return;
		}
Add:
Code:
		if( pWorld && pWorld->GetID() != WI_WORLD_MARKET )
		{			
			pUser->AddText( "No shops allowed.." );
			return;
		}
Change the text to w/e.
Mushpoie is offline  
Old 05/06/2018, 16:26   #10
 
Minotaurr's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 203
Received Thanks: 15
Quote:
Originally Posted by Minotaurr View Post
I used this code, and it works with the message.

But, when I'm in WI_WORLD_MARKET. I get the same message.

I can't open shops anywhere right now :P

How did I do this lol
I had to define the worlds in source & resource. Forgot it in source.

Works now
Minotaurr is offline  
Reply


Similar Threads Similar Threads
[Request] offline vending
11/24/2017 - Flyff Private Server - 1 Replies
anyone have offline vending system?:handsdown::handsdown:
[REQUEST] Vending Bot + Working AutoPot
07/17/2008 - Perfect World - 10 Replies
Perhaps, a program to log into the account and auto vend it without opening the element client because the client eats up a lot of memory Also, I would like to request for a working and a clean autopot as all the autopot (1.5 -> 1.7) available in this forum contains trojan and autoit and trojan downloader. Thank you ^_^
Vending /omg
12/20/2005 - Ragnarok Online - 1 Replies
Hallo, Ich habe jetzt schon mehrmals die scheiss shop.txt bearbeitet, aber immer wieder kommt die Fehlermeldung in deinen Shop fehlt ein Titel /omg. Bin ich jetzt gagga im Kopf? In der shop.txt soll in der ersten Zeile der Shopname stehen, oder liegt es wielleicht an den falschen Editor? Hat jemand davon Ahnuung? Gruß SiSa
Openkore 1.6.4 Vending Problem
10/18/2005 - Ragnarok Online - 8 Replies
ok folgendes hab immer das problem wenn mein shop aufgeht bekomm ich sofort dc nun brauch ich rat ^^ Fehlermeldung: Shop opened (xxxxxxxxx) with 4 selling items. Disconnected from Map Server, connecting to Master Server in 30 seconds... das macht der jedesmal halt :)
Auto Vending on euro-RO
04/03/2005 - Ragnarok Online - 5 Replies
Hi @ all Mich würde es interesieren wie gefährlich es ist mit einem Merchant lv 35 Red Potions verkaufen zu lassen :) Sprich das der von morgens bis abens Redz verkauft. Auffällig ist es ja schon, oder?



All times are GMT +1. The time now is 16:32.


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