Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Loop
  2. {
  3.  
  4. lastline := GetChatLine(% A_MyDocuments "\GTA San Andreas User Files\SAMP\chatlog.txt")
  5.  
  6. addChatMessage(lastline)
  7.  
  8. if lastline contains привет,здрав,здаров
  9. {
  10. RegExMatch(lastline, "i).*\[([0-9]*)\]: \{FFCD00\}.*", idPl)
  11. sendChat("Здравствуйте")
  12. }
  13.  
  14. if lastline contains пока,досвидани¤
  15. {
  16. RegExMatch(lastline, "i).*\[([0-9]*)\]: \{FFCD00\}.*", idPl)
  17. sendChat("До свидания!")
  18. }
  19.  
  20. }
  21.  
  22. GetNewLine(filename)
  23. {
  24. static old
  25. static new
  26. if !old
  27. {
  28. FileGetSize, old, %filename%
  29. new := old
  30. }
  31. while old = new
  32. {
  33. sleep 100
  34. FileGetSize, new, %filename%
  35. }
  36. old := new
  37. Loop, read, %filename%
  38. if A_LoopReadLine
  39. {
  40. last := A_LoopReadLine
  41. }
  42. return last
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement