Jump to content
  • 0

Requesting Script That Count Highest Streak Player On Server


Checkmate

Question


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

Hiii rAthena Community..  ^ ^
 

I do thinking that is it possible to make Script That Count Highest Streak Player On Server and be announced about 5 time repeatly to tell all player that we all now are already in highest streak player online ??????

Btw.. I do asking this cuz only on almost website RO only shown thier hight streak example on CP FLUX...
 

Now.. Anyone have this script or my some proffesional scripter can come in to sharing some idea's and suggestion... ??

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

I didn't test it yet. Tell me if there's wrong alright? :)

/*
DROP TABLE IF EXISTS `player_count`;
CREATE TABLE IF NOT EXISTS `player_count` (
  `char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE = MYISAM;
*/
-	script	Online_Peak	-1,{
OnInit:
query_sql "CREATE TABLE IF NOT EXISTS `player_count` (`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`count` int(10) unsigned NOT NULL DEFAULT '0',`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (`char_id`)) ENGINE = MYISAM";
OnPCLoginEvent:
	set .CurrentOnline,getusers(1); 
	query_sql("SELECT `count` FROM `player_count` ORDER BY `count` LIMIT 1",.@CountUsers);
	set .OnlinePeak,.@CountUsers[0]; 
	if(getarraysize(.@CountUsers) == 0) {
		set .OnlinePeak,.CurrentOnline;
		query_sql("INSERT INTO `player_count`(count,date) VALUES("+.OnlinePeak+",NOW())");
	}
	else {
		if(.CurrentOnline>.OnlinePeak) {
			set .OnlinePeak,.CurrentOnline;		
			query_sql("UPDATE `player_count` SET count = '"+.OnlinePeak+"', date = NOW()");
			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
			sleep2 3000;
			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
			sleep2 3000;
			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
			sleep2 3000;
			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
			sleep2 3000;
			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
		}
	}
	
end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

/*
DROP TABLE IF EXISTS `player_count`;
CREATE TABLE IF NOT EXISTS `player_count` (
`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`count` int(10) unsigned NOT NULL DEFAULT '0',
`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE = MYISAM;
*/
-    script    Online_Peak    -1,{
OnInit:
query_sql "CREATE TABLE IF NOT EXISTS `player_count` (`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`count` int(10) unsigned NOT NULL DEFAULT '0',`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (`char_id`)) ENGINE = MYISAM";
OnPCLoginEvent:
    set .CurrentOnline,getusers(1);
    query_sql("SELECT `count` FROM `player_count` ORDER BY `count` LIMIT 1",.@CountUsers);
    set .OnlinePeak,.@CountUsers[0];
    if(getarraysize(.@CountUsers) == 0) {
        set .OnlinePeak,.CurrentOnline;
        query_sql("INSERT INTO `player_count`(count,date) VALUES("+.OnlinePeak+",NOW())");
    }
    else {
        if(.CurrentOnline>.OnlinePeak) {
            set .OnlinePeak,.CurrentOnline;        
            query_sql("UPDATE `player_count` SET count = '"+.OnlinePeak+"', date = NOW()");
            announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
            sleep2 3000;
            announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
            sleep2 3000;
            announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
            sleep2 3000;
            announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
            sleep2 3000;
            announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
        }
    }
    
end;
}

 

 

 

 

Lil Troll

Thanks Lil Troll  ^ ^

Im gonna test it.. but not now since i so lagging.. lol

Edited by CheckMate
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...