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 02:13

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

Advertisement



[Release] Server Buffs based on Online Player Count

Discussion on [Release] Server Buffs based on Online Player Count within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
Naltalah's Avatar
 
elite*gold: 0
Join Date: Aug 2016
Posts: 308
Received Thanks: 366
[Release] Server Buffs based on Online Player Count

Edit: The consensus of the feedback so far is, that this code is very performance inefficient. If I have the time, I will rewrite the code and reupdate.

I coded this for a friend and thought why not share it with everyone.

Disclaimer: I'm still kind of new to coding, so if you have any suggestions on how to improve the code, let me know <3

I won't be adding a guide on how to create the items that are used as the a buff, there are enough guides on that out there.

ProjectCmn.cpp


Project.cpp


Project.h


User.h


User.cpp


VersionCommon.h (WorldServer)

add this:

PHP Code:
#define        __SYS_ONLINECOUNT_BUFFS
#ifdef __SYS_ONLINECOUNT_BUFFS
#define        __SYS_ONLINECOUNT_BUFFS_MODE    1    // 0 = Only highest buff will be active, 1 = All buffs will be active
#endif // __SYS_ONLINECOUNT_BUFFS 
Resource

You will need to create a new file called onlinebuff.inc.

It has to look like this:

PHP Code:
// dwBuffID                     Online Count
II_ONLINEBUFF_LEVEL1            10
II_ONLINEBUFF_LEVEL2            20 
First comes the ID of the buff, after that the amount of users that have to be online to apply this buff.

Please note that this does not work for multiple channels.

I also added these instruction as an attachment if you want to save it for later.
Attached Files
File Type: txt OnlineCountBuffs.txt (3.2 KB, 315 views)
Naltalah is offline  
Thanks
17 Users
Old 02/13/2019, 02:56   #2
 
elite*gold: 0
Join Date: Oct 2011
Posts: 41
Received Thanks: 1
thank you for this
comcem is offline  
Old 02/13/2019, 11:09   #3
 
elite*gold: 0
Join Date: Jul 2018
Posts: 224
Received Thanks: 46
Thank you for this release! great job
LookAtTheFlower is offline  
Old 02/14/2019, 23:20   #4
 
elite*gold: 0
Join Date: Oct 2011
Posts: 41
Received Thanks: 1


Have I got this error in Compiling how to solve it?
comcem is offline  
Old 02/15/2019, 08:17   #5
 
Naltalah's Avatar
 
elite*gold: 0
Join Date: Aug 2016
Posts: 308
Received Thanks: 366
You either didnt add the code to the Project.h or you added it at the wrong spot in the Project.h
Naltalah is offline  
Old 02/15/2019, 14:58   #6
 
elite*gold: 0
Join Date: Oct 2011
Posts: 41
Received Thanks: 1
Quote:
Originally Posted by Naltalah View Post
You either didnt add the code to the Project.h or you added it at the wrong spot in the Project.h
I checked, but the error persists even though I check everything correctly

Check <-
comcem is offline  
Old 02/15/2019, 16:44   #7
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
Quote:
Originally Posted by comcem View Post
I checked, but the error persists even though I check everything correctly

Check <-
Project.h in _Common folder
Avalion is offline  
Old 02/15/2019, 16:52   #8
 
elite*gold: 0
Join Date: Oct 2011
Posts: 41
Received Thanks: 1
Quote:
Originally Posted by Avalion View Post
Project.h in _Common folder
This Project.h is in the Project in this folder, please help me
comcem is offline  
Old 02/16/2019, 08:08   #9
 
xToffer's Avatar
 
elite*gold: 0
Join Date: Apr 2018
Posts: 139
Received Thanks: 18
Quote:
Originally Posted by comcem View Post
This Project.h is in the Project in this folder, please help me
define it to versioncommon.h of world only
xToffer is offline  
Old 02/16/2019, 15:06   #10
 
elite*gold: 0
Join Date: Oct 2011
Posts: 41
Received Thanks: 1
Quote:
Originally Posted by xToffer View Post
define it to versioncommon.h of world only
It's really not working here, and I do not know why, I've been trying to figure it out since yesterday. and I can not
comcem is offline  
Old 02/16/2019, 15:18   #11
 
elite*gold: 0
Join Date: Mar 2013
Posts: 226
Received Thanks: 97
I mean the function is being defined only for WorldServer and is being used by WorldServer,Neuz and Database server as the error tells you. Without checking the code I'd suggest adding a #ifdef __WORLDSERVER arround the LoadOnlineCountFile() function.
When you check your screen shot you posted you see that the snippet in project.h is grayed out which means that the compiler skips this snippet when compiling neuz and databaseserver... unfortunate when you tell him to use the function in the .cpp file for those projects aswell
.S0ulSeller is offline  
Thanks
1 User
Old 02/16/2019, 15:32   #12
 
elite*gold: 0
Join Date: Oct 2011
Posts: 41
Received Thanks: 1
Quote:
Originally Posted by .S0ulSeller View Post
I mean the function is being defined only for WorldServer and is being used by WorldServer,Neuz and Database server as the error tells you. Without checking the code I'd suggest adding a #ifdef __WORLDSERVER arround the LoadOnlineCountFile() function.
When you check your screen shot you posted you see that the snippet in project.h is grayed out which means that the compiler skips this snippet when compiling neuz and databaseserver... unfortunate when you tell him to use the function in the .cpp file for those projects aswell
Fixed ! Thank you
comcem is offline  
Old 02/17/2019, 04:22   #13
 
elite*gold: 0
Join Date: May 2011
Posts: 101
Received Thanks: 0
how to fix this error?
Im using visual studio 2003
campomanes25 is offline  
Old 02/21/2019, 11:07   #14
 
yazuka21's Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 305
Received Thanks: 19
Can I request example line for Spec_Item. Thanks !
yazuka21 is offline  
Old 02/21/2019, 18:25   #15
 
Nιgнтмαяε's Avatar
 
elite*gold: 0
Join Date: Jul 2018
Posts: 426
Received Thanks: 305
Quote:
Originally Posted by yazuka21 View Post
Can I request example line for Spec_Item. Thanks !
II_SYS_SYS_LS_BLESSING
Nιgнтмαяε is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release]Offset Kill Count EP 6.0 / Battlefield Rune Kill Count
02/25/2016 - Shaiya PServer Guides & Releases - 0 Replies
Closed#
Navicat [Err1136] - Column count doesn't match value count at row 1
02/21/2012 - Metin2 Private Server - 2 Replies
Hallöchen Liebe Com, Als ich gerade in der Querry Table auf meinem Server die 80er Rüstungen erneut einfügen wollte, stoß ich auf diesen Fehler: INSERT INTO `item_proto` VALUES ('12039', 'Auraplattenpanzer+9', 'Auraplattenpanzer +9', '2','0','0','2','300','1','1','0','3000','10000',' 1','90','0','0','8','4294967290','37','20','10','4 0','0','154','0','26','0','45','0','64944','127',' 65008','21631','4855','0','0','15','100','3'); 1136 - Column count doesn't match value count at row 1
Navicat - [Err] 1136 - Column count doesn't match value count at row 1
01/14/2012 - Metin2 Private Server - 1 Replies
Hallo x( Ich weis nicht ob ich zu doof bin ein loch in den Schnee zu pissen oder ob wirklich was falsch hier ist.. Aufjedenfall muss ich die Querry für die 12 neuen metin steine in Serverside einfügen aber jedesmal bekomme ich die meldung: INSERT INTO mob_proto VALUES(8028, 'Metin der Hoffnung', 'Metin der Hoffnung', 5, 2, 3, 95, '', 'NOMOVE', 0, '', 'STUN,SLOW,CURSE,TERROR', 0, '', 0, 0, 0, 60, 0, 0, 0, 999999, 5, 1, 184800, 92400, 540, 57, 9529, 9530, 0, 2000, 175, 0, 0, 0, 0, 0, 0, 0,...
column count doesn't match value count value at row 1 fehler beheben. wie?
12/15/2011 - Metin2 Private Server - 1 Replies
Hallo Epvp ich habe bei den 1678 serverfiles von daroo diesen fehler hier column count doesn't match value count value at row 1 wenn ich etwas in die item_proto oder in die mob_proto hinzufügen will z.B wenn ich querys einfügen will kommt dieser fehler habe schon alles ausprobiert mit 6 0en hinten dran aber es klappt einfach nichts Bitte helft mir :) Bitte helft mir :( :(
Daroo Files Lehrer [Err] 1136 - Column count doesn't match value count at row 1
12/08/2011 - Metin2 Private Server - 3 Replies
Hallo , Wollte bei den Daroo Files die LKehrer bestücken. Manche habe ich schon doch ich habe ehrlich keine Lust mehr bekommen. Und habe gehofft das es hier welche Released haben. Ich habe auch 2 Themen dazu gefunden mit den Release. Doch wenn ich sie einfügen will kommt dieser Fehler 1136 - Column count doesn't match value count at row 1



All times are GMT +2. The time now is 02:13.


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.