Jump to content
  • 0

Cooldown for everyone


Yuna

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   5
  • Joined:  03/16/16
  • Last Seen:  

How do you make the time delay in the following script effect all players, instead of individually?

prontera,97,101,4	script	DooDoo#D2	459,{

	set .delaytime,60;
	mes "[DooDoo]";
	mes ".......";
	next;
	menu "broadcast",L_bcast;

L_bcast:
	if(bc_delay > gettimetick(2)){
	mes "[DooDoo]";
	mes "you gotta wait!";
	close;
	}
	announce "bla bla bla bla bla bla",bc_all,0x00B4FF;
	set bc_delay,gettimetick(2)+.delaytime;
	close;
}
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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

change

bc_delay 

to

$bc_delay    // <--- permanent , remain even after server restart/reloaded.
$@bc_delay   // <--- temporary , reset after server restart/reloaded.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

prontera,97,101,4	script	DooDoo#D2	459,{

	set .delaytime,60;
	mes "[DooDoo]";
	mes ".......";
	next;
	menu "broadcast",L_bcast;

L_bcast:
	if(bc_delay > gettimetick(2) || &bc_delay > gettimetick(2)){
	mes "[DooDoo]";
	mes "you gotta wait!";
	close;
	}
	announce "bla bla bla bla bla bla",bc_all,0x00B4FF;
	set bc_delay,gettimetick(2)+.delaytime;
	set $bc_delay,gettimetick(2)+.delaytime;
	close;
}

 

 

Use &global_variable

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   5
  • Joined:  03/16/16
  • Last Seen:  

@Promise & @Emistry: Thank you both~

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