Project 1999

Go Back   Project 1999 > Red Community > Red Server Chat

Closed Thread
 
Thread Tools Display Modes
  #191  
Old 05-17-2013, 09:25 AM
Rogean Rogean is offline
¯\_(ツ)_/¯

Rogean's Avatar

Join Date: Oct 2009
Location: Massachusetts
Posts: 5,390
Default

Code:
"[PvP] %s%s%s%s has been defeated by %s%s%s%s!", GetName(), GuildID() ? " <" : "", GuildID() ? guild_mgr.GetGuildName(GuildID()) : "", GuildID() ? ">" : "", Killer->GetName(), Killer->CastToClient()->GuildID() ? " <" : "", Killer->CastToClient()->GuildID() ? guild_mgr.GetGuildName(Killer->CastToClient()->GuildID()) : "", Killer->CastToClient()->GuildID() ? ">" : ""
__________________
Sean "Rogean" Norton
Project 1999 Co-Manager

Project 1999 Setup Guide
  #192  
Old 05-17-2013, 09:33 AM
GODPARTICLE GODPARTICLE is offline
Banned


Join Date: Apr 2013
Posts: 85
Default

Code:
	char phrase[255];
	database.GetRandPvPSaying(phrase);
	
	worldserver.SendEmoteMessage(0,0,0,15,
		"%s (%u %s) <%s> %s %s (%u %s) <%s>  in %s!",
			this->GetName(),this->GetLevel(),classes[this->GetClass()],guild_mgr.GetGuildName(this->GuildID()),
			phrase,
			killer->GetName(),killer->GetLevel(),classes[killer->GetClass()],guild_mgr.GetGuildName(killer->GuildID()),
			zone->GetLongName()
	);
  #193  
Old 05-17-2013, 09:33 AM
Feniggles Feniggles is offline
Banned


Join Date: Sep 2010
Posts: 492
Default

Quote:
Originally Posted by Rogean [You must be logged in to view images. Log in or Register.]
Code:
"[PvP] %s%s%s%s has been defeated by %s%s%s%s!", GetName(), GuildID() ? " <" : "", GuildID() ? guild_mgr.GetGuildName(GuildID()) : "", GuildID() ? ">" : "", Killer->GetName(), Killer->CastToClient()->GuildID() ? " <" : "", Killer->CastToClient()->GuildID() ? guild_mgr.GetGuildName(Killer->CastToClient()->GuildID()) : "", Killer->CastToClient()->GuildID() ? ">" : ""
so much for a troll free thread.
  #194  
Old 05-17-2013, 09:36 AM
GODPARTICLE GODPARTICLE is offline
Banned


Join Date: Apr 2013
Posts: 85
Default

btw what is that Rogean perl or something? What's the world coming to with ternary operations in a string format. Wonder if that's valid in C/C++
  #195  
Old 05-17-2013, 09:46 AM
Rogean Rogean is offline
¯\_(ツ)_/¯

Rogean's Avatar

Join Date: Oct 2009
Location: Massachusetts
Posts: 5,390
Default

Quote:
Originally Posted by GODPARTICLE [You must be logged in to view images. Log in or Register.]
Code:
	char phrase[255];
	database.GetRandPvPSaying(phrase);
	
	worldserver.SendEmoteMessage(0,0,0,15,
		"%s (%u %s) <%s> %s %s (%u %s) <%s>  in %s!",
			this->GetName(),this->GetLevel(),classes[this->GetClass()],guild_mgr.GetGuildName(this->GuildID()),
			phrase,
			killer->GetName(),killer->GetLevel(),classes[killer->GetClass()],guild_mgr.GetGuildName(killer->GuildID()),
			zone->GetLongName()
	);
database.GetRandPvPSaying(phrase); ? You're pulling an SQL Query every time you want to get a phrase? I almost didn't read past this horrible bit of inefficiency.

"%s (%u %s) <%s> %s %s (%u %s) <%s> in %s!"

Lack of guild causes unnecessary ") <> ". This is why I have %s%s%s, If there's no guild name, why add the extra support text around it. It looks cleaner.
You have an extra space before "in".

I did forget the zone name, I'll add that to mine.
__________________
Sean "Rogean" Norton
Project 1999 Co-Manager

Project 1999 Setup Guide
  #196  
Old 05-17-2013, 09:46 AM
Smedy Smedy is offline
Planar Protector

Smedy's Avatar

Join Date: Mar 2011
Posts: 4,578
Default

Quote:
Originally Posted by Rogean [You must be logged in to view images. Log in or Register.]
Code:
"[PvP] %s%s%s%s has been defeated by %s%s%s%s!", GetName(), GuildID() ? " <" : "", GuildID() ? guild_mgr.GetGuildName(GuildID()) : "", GuildID() ? ">" : "", Killer->GetName(), Killer->CastToClient()->GuildID() ? " <" : "", Killer->CastToClient()->GuildID() ? guild_mgr.GetGuildName(Killer->CastToClient()->GuildID()) : "", Killer->CastToClient()->GuildID() ? ">" : ""
pras the lawd, he is pushing buttons in some sequence that may or may not be corrrect

welcome back rogean
__________________
Quote:
Originally Posted by Slathar View Post
you clean plaque off peoples teeth for a living and are only able to do that because your daddy hired you. your waist is also wider than your shoulders and you’re 5’2.
Videos
Wipe it clean.
  #197  
Old 05-17-2013, 09:48 AM
GODPARTICLE GODPARTICLE is offline
Banned


Join Date: Apr 2013
Posts: 85
Default

its a myisam table. reads are virtually 0 overhead for how often a pvp slaying happens, especially compared to the trillions of database calls happening constantly. I did it so they could be added in realtime without recompiling and resetting the server, but it could be hardcoded array (mt_rand might have the same overhead realistically)

oh the original line with <> was a copypasta of null's code
Last edited by GODPARTICLE; 05-17-2013 at 09:52 AM..
  #198  
Old 05-17-2013, 09:50 AM
Feniggles Feniggles is offline
Banned


Join Date: Sep 2010
Posts: 492
Default

plz send updates to my icq = 7050258
  #199  
Old 05-17-2013, 09:53 AM
Rogean Rogean is offline
¯\_(ツ)_/¯

Rogean's Avatar

Join Date: Oct 2009
Location: Massachusetts
Posts: 5,390
Default

Quote:
Originally Posted by GODPARTICLE [You must be logged in to view images. Log in or Register.]
its a myisam table. reads are virtually 0 overhead
Are you forgetting all the overhead of actually running an SQL Query? The amount of code that then needs to be executed through the database functions, then the TCP code.. THEN we get to the actual mysql / myisam portion while the server process sits and twiddles it's thumbs (non asynchronous db call). Then repeat in reverse. I'll pass on that.


Quote:
Originally Posted by GODPARTICLE [You must be logged in to view images. Log in or Register.]
especially compared to the trillions of database calls happening constantly.
Not on my servers. There's a reason P99 holds more stability with hundreds of people online / in same zones compared to other servers. We moved away from on-demand sql queries a long time ago, preferring caches whenever possible.
__________________
Sean "Rogean" Norton
Project 1999 Co-Manager

Project 1999 Setup Guide
  #200  
Old 05-17-2013, 09:53 AM
Andis Andis is offline
Banned


Join Date: Sep 2011
Posts: 2,586
Default

when will this be ready by?!?!!
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:25 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.