Jump to content
  • 0

Can I request Script every 5min log in BC online status


Famous

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

Can I request Script every 5min log in BC online status?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Can I request more informations about your request ?

BC = ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

every 5 minute's there will be auto announcer that will broadcast  the status online of the server in all maps.. 

Edited by zhen
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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 by Skorm
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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;
	}
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Broadcast every 5 min sounds annoying imo.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

It should be a waitingroom instead of broadcast  /whisp

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

@nanakiwurtz its sounds great to make it waitingroom..

 

thanks

Skorm and Capuche

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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 by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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;

}

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Just use [ code ]

You can also click the "code" button code.png 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).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

@brian and Skorm Thanks for the script

Edited by zhen
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...