A chatbot
#1

I wasent very spacific in the titile (spelling fail) but what i mean is a bot that talks every so often:
Код:
bob:hey
bob2:2 brb
YOUR BOT NAME HERE: hey why dont u go and jump off a cliff
bob2:bk
bob:wb
bob2:cheese...
bob:...
YOUR BOT NAME HERE: Whas you dropped when you was a child??
(Just an example (whent a bit overboard))
Reply
#2

https://sampwiki.blast.hk/wiki/Random_Messages

you could use this
https://sampwiki.blast.hk/wiki/Scripting...ns_Old#strfind
to check to see if someone says like brb or something
Reply
#3

Quote:
Originally Posted by iLinx
https://sampwiki.blast.hk/wiki/Random_Messages

you could use this
https://sampwiki.blast.hk/wiki/Scripting...ns_Old#strfind
to check to see if someone says like brb or something
Im new at this and dont know a lot where to put that
Reply
#4

place the array for your messages and the timer variable before main.
set the timer under ongamemodeinit
forward the message callback before main
create the message callback anywhere you want below main as long as its not inside another callback.

it goes more in depth of what to create in the random messages tutorial.
Reply
#5

You can check this: http://forum.sa-mp.com/index.php?topic=38096.0
Reply
#6

Код:
new RandomMSG[][] =
{
  "Wolf bot: Are you stuck? get help (/help) ^^",
  "Wolf bot: This server is english only",
  "Wolf bot: Visit our website www.wolvez.co.cc",
  "Wolf bot: Wanna know who made what? find out (/credits)",
  "Wolf bot: See a cheater? report them (/report)",
  "Wolf bot: The official braduz motto "Immah teh tech wolf round theese areas"
};
SetTimer("SendMSG", 200000, true);
forward SendMSG();
public SendMSG()
{
  
}
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
Ummm will this work?
Reply
#7

Do you mean the
Код:
[url]
?? No it wont work. If you want to add announcements follow the tutorial.
Reply
#8

Quote:
Originally Posted by Dark_Kostas
Do you mean the
Код:
[url]
?? No it wont work. If you want to add announcements follow the tutorial.
the wiki sa-mp one? -did do
Reply
#9

followed mthe announcement one too
you do know i need a chatbot that says a random message every minit or so
btw will this work
Код:
new Announcements[5][128] = { 
  "Wolf bot: Stuck, dont know where to start? (/help)",
  "Wolf bot: test",
  "Wolf bot: Another test",
  "Announcement: Type /commands to view the list of the server commands",
  "Announcement: Type /rules to read the server rules. Make sure to understand 'em!"
};
public GlobalAnnouncement()
{
  switch (Msg)
  {
    case 0: {SendClientMessageToAll(ANNOUNCEMENT,Announcements[0]); Msg++;} 
    case 1: {SendClientMessageToAll(ANNOUNCEMENT,Announcements[1]); Msg++;}
    case 2: {SendClientMessageToAll(ANNOUNCEMENT,Announcements[2]); Msg++;}
    case 3: {SendClientMessageToAll(ANNOUNCEMENT,Announcements[3]); Msg++;}
    case 4: {SendClientMessageToAll(ANNOUNCEMENT,Announcements[4]); Msg = 0;} 
  }
  return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)