PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: Herodes on 24 September, 2006, 12:27:40

Title: Policy Of Truth
Post by: Herodes on 24 September, 2006, 12:27:40
There goes one old script from the golden ages of the board ;)
-- PolicyOfTruth by Herodes and bastya_elvtars (the rock n' roll doctor)
-- puts some addition after mainchat lines
iChance = 6 -- the bigger the number is, the less the chance is that users text will be changed

tText = { -- up2u to add anything u like, it comes after users text and a space
" just kidding! :P",
" i am a fool and telling lies...",
" dont u believe what i say!",
" or not,...",
" i am being a dork",
" i dont really mean this ..",
}

function ChatArrival( user, data )
data = string.sub( data, 1, -2)
if not string.match( data, "%b<>%s+([%!%?%#%+%.%-]%S+)" ) then
SendToAll( user.sName, function() if (math.random(iChance) == 1) then return data..tText[math.random(#tText)];end;return data;end )
return 1;
end
end