Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Loop
- {
- lastline := GetChatLine(% A_MyDocuments "\GTA San Andreas User Files\SAMP\chatlog.txt")
- addChatMessage(lastline)
- if lastline contains привет,здрав,здаров
- {
- RegExMatch(lastline, "i).*\[([0-9]*)\]: \{FFCD00\}.*", idPl)
- sendChat("Здравствуйте")
- }
- if lastline contains пока,досвидани¤
- {
- RegExMatch(lastline, "i).*\[([0-9]*)\]: \{FFCD00\}.*", idPl)
- sendChat("До свидания!")
- }
- }
- GetNewLine(filename)
- {
- static old
- static new
- if !old
- {
- FileGetSize, old, %filename%
- new := old
- }
- while old = new
- {
- sleep 100
- FileGetSize, new, %filename%
- }
- old := new
- Loop, read, %filename%
- if A_LoopReadLine
- {
- last := A_LoopReadLine
- }
- return last
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement