Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. property predictTrigger : "!PREDICT "
  2. property predictList : {"That's not for me to say.", "Most likely.", "Ask me again later", "Well, uhm, er, no.", "ROTFL", "Sure", "My sources say no.", "Hmmm, that's a tough question.", "Not really.", "Yes.", "No.", "Outlook so so.", "Absolutely.", "Yes definitely.", "Very doubtful.", "Forget about it.", "Are you kidding?", "Who knows.", "I have my doubts."}
  3.  
  4. using terms from application "Colloquy"
  5.    
  6.     on process incoming chat message theMessage from theUser in theView
  7.         set theText to HTML of theMessage as string
  8.         set c to count of predictList
  9.         set r to random number from 1 to c
  10.         set i to item r of predictList
  11.         set n to theUser's name
  12.         if theText starts with predictTrigger then
  13.             tell theView
  14.                 send message "" & n & ", " & i & ""
  15.             end tell
  16.         end if
  17.     end process incoming chat message
  18. end using terms from
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement