Jump to content
  • 0

Announcer Question Different Text Color


Yummy

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   12
  • Joined:  03/07/12
  • Last Seen:  

How to make the text in blue? + how can I make it announce every 3 hrs?

announcer.txt

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  383
  • Reputation:   109
  • Joined:  11/11/11
  • Last Seen:  

You have differents options for announces. The best is to use the hexadecimal colors system :

announce "TEXT",0,0xFF6600;

The FF6600 contains the color, change it for get a new color : http://www.2createawebsite.com/build/hex-colors.html

How get every 3 hours ? You can use a sleep2; command :

- script announcer-script -1,{
OnInit:
sleep2 10000;
donpcevent "announcer::OnEvent";
sleep2 10800000;
donpcevent "announcer::OnInit";
end;
OnEvent:
switch(rand(1,5)){
case 1:
announce "This is announcement one.",bc_all,bc_yellow;
break;
case 2:
announce "This is announcement two.",bc_all,bc_blue;
break;
case 3:
announce "This is announcement three.",bc_all,bc_yellow;
break;
case 4:
announce "This is announcement four.",bc_all,bc_blue;
break;
case 5:
announce "This is announcement five.",bc_all,bc_yellow;
break;
}
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   4
  • Joined:  12/05/11
  • Last Seen:  

You may also simply change each announcement line to:

announce "This is announcement X.",bc_blue;

But if you want to be more specific with the color, I suggest you go with Aerie's way.

An alternative for having the announcements every 3 hours is to use the OnClock event label.

So something like this:

-    script    announcer-script    -1,{
OnClock0000:
OnClock0300:
OnClock0600:
OnClock0900:
OnClock1200:
OnClock1500:
OnClock1800:
OnClock2100:
switch(rand(1,5)) {

This way you can specify the exact time a random announcement is broadcasted.

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