Jump to content
  • 0

Display a message to a player after some hours


Noire

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

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

4 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2352
  • Joined:  10/28/11
  • Last Seen:  


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;

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:  

-	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

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:  

@Skorm

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

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:  

@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 :(

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...