Jump to content
  • 0

Display a message to a player after some hours


Question

Posted (edited)

A script that every hour/s it'll disp bottom a player/s that playing online. ( Except Vending and Afk'ed )

EG:

Server : You've already played 1 hour please take a rest.
Server : You've already played 2 hours please take a rest.

Server : You've already played 3 hours please take a rest.

and so on.

Edited by Dokiee

4 answers to this question

Recommended Posts

  • 1
Posted


OnCheck:

if( !checkvending() && !checkchatting() ){

set @hour,@hour + 1;

dispbotton "You have played for "+@hour+" hours. Please take a rest.";

OnPCLoginEvent:

addtimer ( 3600 * 1000 ),strnpcinfo(0)+"::OnCheck";

}

end;

Posted
-	script	Players	-1,{
OnMinute00:
	.u = getusers(1); .i = 0; .a = 0; addrid(0);
	if( checkvending() || checkidle() > 60 ) .i++; .a++;
	if( .u==.a ) announce "There are currently "+( .u=.a-.i )+" active player"+( .u==1?"":"s" )+" online!",bc_all;
}

 

Woops sorry, Dokiee, I read your request wrong. I think Emistry has the right idea. :D

Posted

@Skorm

Note the server will display an announce for each instance, even if you detach the rid

 

Yeah I figured, didn't bother to change it or even test because I read the request wrong. :)

 

@Capuche

I wanted to ask though are all players considered attached to that one instance? Would .@scope work Instead of an .npc_var? I rarely use Addrid and figured you might have more insight on the topic.

 

Had sometime and tested it- They aren't :(

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...