change chaingun 2 blaster by DC. - Page 7 - TribalWar Forums
Click Here to find great hosting deals from Branzone.com


Go Back   TribalWar Forums > Current Gaming > Tribes Talk
Reload this Page change chaingun 2 blaster
Page 7 of 7
Thread Tools
Laughing-Stork
VeteranX
Old
121 - 01-03-2019, 14:22
Reply With Quote
Quote:
Originally Posted by lemontw View Post
the mysql stuff?

yes

Code:
// ----------------------------------------------------------------------------
// MySQL Stats Database
// ----------------------------------------------------------------------------
// Based on code by KingTomato
// Modified by Lemon
// 2/26/09 edit

$MySQL::Connection[Stats]      					= "stats_conn"; 								// connection/table name
$MySQL::Host[Stats] 							= "BaseServer.db.3735315.hostedresource.com"; 	// host address
$MySQL::User[Stats] 							= "BaseServer";									// user name
$MySQL::Pass[Stats] 							= "vghr5t6O";									// user pass
$MySQL::Database[Stats] 						= "BaseServer";									// database name
$MySQL::Connected[$MySQL::Connection[Stats]]   	= false;         								// Tells us we're connected
$Stats::Force=true;
$MySQLStats::PasswordMin						=5;
$MySQLStats::PasswordMax						=10;
$MySQL::StatsLoginEnabled						=false;

function MySQL::SaveStats()
{
	for(%cl = Client::getFirst(); %cl != -1; %cl = Client::getNext(%cl))
	{
		MySQL::SaveClientStats(%cl);
	}
}

function MySQL::SaveClientStats(%cl)
{
	Database::Connect("Stats");
	
	%c=$MySQL::Connection[Stats];
	
	%ip = Client::getTransportAddress(%cl);
	
	%ip=MySQL::ParseIP(%ip);
	
	if (Stats::FindIP(%ip))
	{
		%add = 	"UPDATE player_ratings SET "
		@		"tot_rating = tot_rating+"@%cl.rating
		@		", avg_rating=tot_rating/(maps+1)"
		@		", kills=kills+"@%cl.scoreKills
		@		", deaths=deaths+"@%cl.scoreDeaths
		@		", suicides=suicides+"@%cl.suicides
		@		", grabs=grabs+"@%cl.flaggrabs
		@		", captures=captures+"@%cl.flagcaptures
		@		", returns=returns+"@%cl.flagreturns
		@		", capperkills=capperkills+"@%cl.capperkills
		@		", assists=assists+"@%cl.flagassists
		@		", maps=maps+1 "
		@		"WHERE player_ip='"@MySQL::Escape(%c,%ip)@"'";
		
		if (MySQL::Query(%c,%add))
			echo(Client::GetName(%cl)@" stats updated.");
		
		else
		{
			echo("Stats Update: " @ $MySQL::Error);
			$Query::Error=format($MySQL::Error, 40)@" "@timestamp();
			$Query::Export=%add;
			$Query::Extra = "-----------------------------";
			export("$Query::*","config\\data.log",true);
		}
	}
	
	else
	{
		%add = 	"INSERT INTO player_ratings (player_id,player_ip,tot_rating,avg_rating,kills,deaths,suicides,grabs,captures,returns,capperkills,assists,maps) "
		@  		"VALUES "
		@		"(NULL,'"
		@		MySQL::Escape(%c,%ip)
		@		"',"@%cl.rating
		@		","@%cl.rating
		@		","@%cl.scoreKills
		@		","@%cl.scoreDeaths
		@		","@%cl.suicides
		@		","@%cl.flaggrabs
		@		","@%cl.flagcaptures
		@		","@%cl.flagreturns
		@		","@%cl.capperkills
		@		","@%cl.flagassists
		@		",1)";
			
		if (MySQL::Query(%c,%add))
			echo(Client::GetName(%cl)@" stats added.");
		
		else
		{
			echo("Stats Add Failed: " @ $MySQL::Error);
			$Query::Error=format($MySQL::Error, 40)@" "@timestamp();
			$Query::Export=%add;
			$Query::Extra = "-----------------------------";
			export("$Query::*","config\\data.log",true);
		}
	}
}

function Stats::Find(%query, %tries)
{
	%c=$MySQL::Connection[Stats];
	
	%query_=%query; // copy query in case we try again
	
	%query = sprintf("SELECT * FROM player_ratings WHERE %1 ORDER BY player_id",%query);
	
	if (MySQL::Query(%c,%query))
	{
		MySQL::FetchRow(%c);
		if(MySQL::Fetch(%c,"player_ip")!=false)
			return true;
Could u hook a bruh up for a +rep?

Or is that all of it? I had it years ago but lost it.
 
Laughing-Stork is offline
 
Last edited by Laughing-Stork; 01-03-2019 at 14:24..
Sponsored Links
lemontw
Veteran
Old
122 - 01-04-2019, 13:25
Reply With Quote
here is a base server that I had it installed on
not sure if it's the last version
lots of code mods r needed and of course a mysql server available

https://www.mediafire.com/file/ltrgb...erver.rar/file
 
lemontw is offline
 
Laughing-Stork
VeteranX
Old
123 - 01-06-2019, 13:23
Reply With Quote
awesome, thx
 
Laughing-Stork is offline
 
2:37
Member
Old
124 - 01-07-2019, 17:53
Reply With Quote
who you gunna get in touch with
 
2:37 is offline
 
lemontw
Veteran
Old
125 - 01-07-2019, 21:29
Reply With Quote
Quote:
Originally Posted by Laughing-Stork View Post
awesome, thx
Props to kingtomato for the original and nofix for making it work (I begged for a year or two) with the mem.dll plugin loader. This link might include a more update version of the plugins but it shows an error when you try to DL.

http://library.theexiled.pwnageserve...le.php?id=2859
 
lemontw is offline
 
Last edited by lemontw; 01-07-2019 at 23:12..
Page 7 of 7
Reply


Go Back   TribalWar Forums > Current Gaming > Tribes Talk
Reload this Page change chaingun 2 blaster

Social Website Bullshit


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


AGENT: CCBot/2.0 (https://commoncrawl.org/faq/) / Y
All times are GMT -4. The time now is 23:44.