Famous Posted March 14, 2013 Posted March 14, 2013 Can I request Script every 5min log in BC online status? Quote
Capuche Posted March 15, 2013 Posted March 15, 2013 Can I request more informations about your request ? BC = ? Quote
Famous Posted March 15, 2013 Author Posted March 15, 2013 (edited) every 5 minute's there will be auto announcer that will broadcast the status online of the server in all maps.. Edited March 15, 2013 by zhen Quote
Skorm Posted March 16, 2013 Posted March 16, 2013 (edited) Untested. - script whoisonline -1,{ OnMinute05: set .@h, query_sql("SELECT `online` FROM `char` WHERE `online` = '1';"); announce "There "+(.@h>1)?"are":"is"+" currently "+.@h+" "+(.@h>1)?"people":"person"+" online!",0; end; } Edited March 16, 2013 by Skorm Quote
Capuche Posted March 16, 2013 Posted March 16, 2013 OnMinute05: He want every 5 min not at 5 min (I think) set .@h, query_sql("SELECT `online` FROM `char` WHERE `online` = '1';"); Use the command Getusers - script sample -1,{ OnInit: while(1) { sleep 1000 * 60 * 5; // delay = 5 mins .@count = getusers(1); announce "There "+ ( .@count > 1 ? "are" : "is" ) +" currently "+ .@count +" "+ ( .@count > 1 ? "people" : "person" ) +" online!",0; } } 1 Quote
nanakiwurtz Posted March 16, 2013 Posted March 16, 2013 It should be a waitingroom instead of broadcast Quote
Famous Posted March 17, 2013 Author Posted March 17, 2013 @nanakiwurtz its sounds great to make it waitingroom.. thanks Skorm and Capuche Quote
Skorm Posted March 17, 2013 Posted March 17, 2013 (edited) prontera.gat,146,163,3 script Online Users 833,{ OnInit: while (1) { .@u = getusers(1); delwaitingroom; waitingroom "There "+((.@u>1||.@u<1)?"are":"is")+" currently "+.@u+" "+((.@u>1||.@u<1)?"people":"person")+" online!",0; sleep 1000*60*5; } } Edited March 17, 2013 by Skorm Quote
Brian Posted March 17, 2013 Posted March 17, 2013 You could also trigger the count to update when a player logs in/out. prontera,155,180,0 script Online Count 837,{ end; OnPCLoginEvent: OnPCLogoutEvent: // sleep 1000; // I'm not sure if online count updates before or after Login/Logout events trigger delwaitingroom; waitingroom getusers(1)+" "+( (getusers(1)==1) ? "user" : "users" )+" online", 0; end; } Quote
Skorm Posted March 17, 2013 Posted March 17, 2013 You could also trigger the count to update when a player logs in/out. prontera,155,180,0 script Online Count 837,{ end; OnPCLoginEvent: OnPCLogoutEvent: // sleep 1000; // I'm not sure if online count updates before or after Login/Logout events trigger delwaitingroom; waitingroom getusers(1)+" "+( (getusers(1)==1) ? "user" : "users" )+" online", 0; end; } Yeah that would probably be best unless you had like 300+ players. Also I wanted to ask how to keep tabs in code posted O_O I remember from eAthena you had to use / that doesn't seem to work here. Quote
Brian Posted March 17, 2013 Posted March 17, 2013 Just use [ code ] You can also click the "code" button then paste your code there. If the Rich Text editor is removing your tabs, try switching to the plain text editor (click the first button that looks like a light switch). Quote
mrlongshen Posted March 21, 2013 Posted March 21, 2013 You could also trigger the count to update when a player logs in/out. prontera,155,180,0 script Online Count 837,{ end; OnPCLoginEvent: OnPCLogoutEvent: // sleep 1000; // I'm not sure if online count updates before or after Login/Logout events trigger delwaitingroom; waitingroom getusers(1)+" "+( (getusers(1)==1) ? "user" : "users" )+" online", 0; end; } i have to relog then will see how much online nice bro. haha~ Quote
Famous Posted March 22, 2013 Author Posted March 22, 2013 (edited) @brian and Skorm Thanks for the script Edited March 22, 2013 by zhen Quote
Question
Famous
Can I request Script every 5min log in BC online status?
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.