Auto Messages

[VM_U]Spectra.PhantoM^

  • Full Member
  • Posts: 109
Auto Messages
« on December 21st, 2015, 11:46 AM »Last edited on December 22nd, 2015, 01:53 AM
This Makes Messages appear on the chat every (idk) 10 secs
Code: [Select]
auto_msgs <-
[
" Your message here."];
randcolors <-
[
        "[#DC143C]"
        "[#00CED1]"
        "[#FF69B4]"
        "[#FF8C00]"
        "[#FFFF00]"
        "[#800080]"
        "[#4169E1]"
        "[#2E8B57]"
        "[#8B4513]"
        "[#C0C0C0]"
 


        "[#FF0000]"
        "[#FF1493]"
        "[#FF4500]"
        "[#191970]"
        "[#8A2BE2]"
        "[#4B0082]"
        "[#ADFF2F]"
        "[#20B2AA]"
        "[#00FFFF]"
        "[#DAA520]"
        "[#696969]"


        "[#FF00FF]"
        "[#B22222]"
        "[#FF7F50]"
        "[#BDB76B]"
        "[#32CD32]"
        "[#1E90FF]"
        "[#008000]"
        "[#008080]"
        "[#B8860B]"
        "[#708090]"


        "[#8B0000]"
        "[#FFD700]"
        "[#BA55D3]"
        "[#9400D3]"
        "[#00BFFF]"
        "[#00FF00]"
        "[#00FA9A]"
        "[#D2691E]"


        "[#FA8072]"
        "[#C71585]"
        "[#FFA500]"
        "[#4682B4]"
        "[#7CFC00]"
        "[#3CB371]"
        "[#808000]"
        "[#9ACD32]"
        "[#8B4513]"
        "[#2F4F4F]"

      ];

      randcolorsirc <-
      [
      "\x000300"
      "\x000301"
      "\x000302"
      "\x000303"
      "\x000304"
      "\x000305"
      "\x000306"
      "\x000307"
      "\x000308"
      "\x000309"
      "\x000310"
      "\x000311"
      "\x000312"
      "\x000313"
      "\x000314"
      "\x000315"
      ]
       
  function sendmsgs()

  Message( auto_msgs[ rand() % auto_msgs.len() ]);
}     


Copy this all and make a different file rename it to .nut then do this:
Code: [Select]
function onScriptLoad()
{

dofile( "scripts/yourscriptnamehere.nut" )

Now messages will show up on ur screen :P

Remember always add , at the end of a message and ]; at the end of ur last message for example:

Code: [Select]
"yourmessage",
"yoursecondmessage"];

Wanna Talk To Me? Come At Irc #[email protected]

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,807
Re: Auto Messages
« Reply #1, on December 21st, 2015, 11:51 AM »
Are you sure it'll send the message? The script seems a bit (very) incomplete. And does that `randcolors` table have any purpose?
.

DizzasTeR

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,168
Re: Auto Messages
« Reply #2, on December 21st, 2015, 12:08 PM »
Quote from {ultimatejugo
link=msg=14414 date=1450698418]
This Makes Messages appear on the chat every (idk) 10 secs
Is that so? Makes alot of sense.

KAKAN

  • Wiki Contributor
  • Posts: 3,343
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

wilber32

  • Jr. Member
  • Posts: 56
Re: Auto Messages
« Reply #4, on December 21st, 2015, 04:06 PM »
Prefer the Kakan is simpler than this

[VM_U]Spectra.PhantoM^

  • Full Member
  • Posts: 109
Re: Auto Messages
« Reply #5, on December 22nd, 2015, 01:53 AM »
Quote from S.L.C on December 21st, 2015, 11:51 AM
Are you sure it'll send the message? The script seems a bit (very) incomplete. And does that `randcolors` table have any purpose?
Randcolors table just show's the one who doesnt know colours colour codes so they can coulour it as they wish.
And yes it will send message i tested it my self
Wanna Talk To Me? Come At Irc #[email protected]