07-10-2019, 11:17 PM
local SafeList = { 'Player1', 'player2', 'pk3'}
local TextsSay = {
{ 'hello', 'hi', '^^', ':)' }, -- FIRST message, It's gonna say one of those things by random.
{ 'how can i help you?', 'sup mate', 'do you need something?' }, -- SECOND message, It's gonna say one of those things AFTER FIRST MESSAGE by random.
{ 'do you mind?', 'tell me', 'mind?' }, -- THIRD message, It's gonna say one of those things AFTER SECOND MESSAGE by random.
{ 'im doing some stuff.', 'working..', 'doing stuff', 'homework :s' }, -- FOURTH message, It's gonna say one of those things AFTER THIRD MESSAGE by random.
{ 'it can be boring', 'you may lose some time', 'wasting time?' },
{ 'well, told you so', 'just said', 'well...' },
{ 'must change windows', 'alt tab', 'must check something' },
{ 'bye mate', 'bye :(', 'see ya' },
}
local Times =
{
StartTalking = 3000, -- Time to wait before START saying something IN milliseconds!
BetweenMessages = 8000, -- Time to wait between says IN milliseconds!
}
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
table.lower(SafeList)
IGNORED_PLAYERS = IGNORED_PLAYERS or { }
local PlayersList = getcreatures('pfs')
local player_name = name()
local player_z = posz()
for _, player in ipairs(PlayersList) do
if player.name ~= player_name and player.visible and player.posz == player_z and table.find(IGNORED_PLAYERS, player.name) == nil and table.find(SafeList, player.name:lower()) == nil then
wait(Times.StartTalking)
for TALK_INDEX = 1, #TextsSay do
if paround(7, player.name) > 0 then
local sortText = random(1, #TextsSay[TALK_INDEX])
say(TextsSay[TALK_INDEX][sortText])
wait(Times.BetweenMessages)
if TALK_INDEX == #TextsSay then
table.insert(IGNORED_PLAYERS, player.name)
end
else
break
end
end
end
end