04-02-2015, 14:58 PM
Hi all, I was looking for some script or plugin, to answer for all , when they want to know if you are on or you´re bot. I was searching in this forum but don´t find anything... anyone know how? regards
(04-02-2015 14:58 PM)lord_knox Wrote: [ -> ]Hi all, I was looking for some script or plugin, to answer for all , when they want to know if you are on or you´re bot. I was searching in this forum but don´t find anything... anyone know how? regards
(04-02-2015 21:10 PM)lord_knox Wrote: [ -> ]Hello , I was looking for that but not whisp , to answer in all channel (i dont know how to do it).
function OnChatUserMessage(chatType, nick, msg)
if (chatType == 2) and (ShouldAnswerPM == false) then
Message = string.gsub(string.lower(msg)," ","");
if (string.lower(nick) ~= string.lower(GetMe():GetName())) and (AFKmode == true) then
if (oldnick ~= nick) then
oldnick = nick;
ChatCounter = 0;
end;
ChatCounter = ChatCounter+1;
if (ChatCounter <= MaxAutoAnswersForSameGuy) then
ShouldAnswerPM = true;
PlayerToAnswerName = nick;
MessageCurrentTime = os.time();
if (CheckIfInsideList(Message,HelloRList)) then
AnswerList = HelloSList;
DelayinAnswer = SaluteDelay; -- Delay in seconds
elseif CheckIfInsideList(Message,MockList) then
AnswerList = MockSList;
DelayinAnswer = OthersDelay; -- Delay in seconds
elseif CheckIfInsideList(Message,List2R) then
AnswerList = List2S;
DelayinAnswer = OthersDelay; -- Delay in seconds
elseif CheckIfInsideList(Message,List3R) then
AnswerList = List3S;
DelayinAnswer = OthersDelay; -- Delay in seconds
else
AnswerList = OthersSList;
DelayinAnswer = OthersDelay; -- Delay in seconds
end;
Answer = AnswerList[math.ceil(math.random(1,HowManyPossibleAnswersInTheList()))]; -- Choose Random Answer from the list.
end;
else
if (Message == GoAFKCommand) and (AFKmode == false) then
AFKmode = true;
ShowToClient("Auto Chat Script","Im on AFK mode now, Auto chat is now Activated.");
elseif (Message == ImBackCommand) and (AFKmode == true) then
AFKmode = false;
ShowToClient("Auto Chat Script","You Are Back, Auto chat is now Deactivated.");
end;
end;
end;
end;
function OnChatUserMessage(chatType, nick, msg)
if (chatType == 0) and (ShouldAnswerPM == false) and (GetUserByName(nick) ~= nil) and (GetMe():GetRangeTo(GetUserByName(nick)) < 1000) then
Message = string.gsub(string.lower(msg)," ","");
if (string.lower(nick) ~= string.lower(GetMe():GetName())) and (AFKmode == true) then
if (oldnick ~= nick) then
oldnick = nick;
ChatCounter = 0;
end;
ChatCounter = ChatCounter+1;
if (ChatCounter <= MaxAutoAnswersForSameGuy) then
ShouldAnswerPM = true;
PlayerToAnswerName = nick;
MessageCurrentTime = os.time();
if (CheckIfInsideList(Message,HelloRList)) then
AnswerList = HelloSList;
DelayinAnswer = SaluteDelay; -- Delay in seconds
elseif CheckIfInsideList(Message,MockList) then
AnswerList = MockSList;
DelayinAnswer = OthersDelay; -- Delay in seconds
elseif CheckIfInsideList(Message,List2R) then
AnswerList = List2S;
DelayinAnswer = OthersDelay; -- Delay in seconds
elseif CheckIfInsideList(Message,List3R) then
AnswerList = List3S;
DelayinAnswer = OthersDelay; -- Delay in seconds
else
AnswerList = OthersSList;
DelayinAnswer = OthersDelay; -- Delay in seconds
end;
Answer = AnswerList[math.ceil(math.random(1,HowManyPossibleAnswersInTheList()))]; -- Choose Random Answer from the list.
end;
else
if (Message == GoAFKCommand) and (AFKmode == false) then
AFKmode = true;
ShowToClient("Auto Chat Script","Im on AFK mode now, Auto chat is now Activated.");
elseif (Message == ImBackCommand) and (AFKmode == true) then
AFKmode = false;
ShowToClient("Auto Chat Script","You Are Back, Auto chat is now Deactivated.");
end;
end;
end;
end;
function OnLTick1s()
if (GetMe():GetCpPercent()>30) then
AmISafe = true;
end;
if (LastTalkBulshitTime + 15 < os.time()) and (BSAnswer > 0) then
Command(AnswerList[BSAnswer]);
BSAnswer = 0 ;
end;
if (AFKmode == true) then
if (ShouldAnswerPM == true) then
if (MessageCurrentTime+DelayinAnswer < os.time() ) then
ShouldAnswerPM = false;
SendPM(PlayerToAnswerName, Answer);
end;
end;
end;
end;
function OnLTick1s()
if (GetMe():GetCpPercent()>30) then
AmISafe = true;
end;
if (LastTalkBulshitTime + 15 < os.time()) and (BSAnswer > 0) then
Command(AnswerList[BSAnswer]);
BSAnswer = 0 ;
end;
if (AFKmode == true) then
if (ShouldAnswerPM == true) then
if (MessageCurrentTime+DelayinAnswer < os.time() ) then
ShouldAnswerPM = false;
Command(Answer);
end;
end;
end;
end;