Bukz

Auto respond to "sorry" after TK concept...

Mar 24th, 2011
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. alias tk_list [fragged gibbed headshot splattered slashed]
  2. alias sry_list [Sorry sorry Sry sry Soz soz]
  3. alias np_msg "No problem mate, it happens. :)"
  4. alias s_reply 0
  5.  
  6. alias check_for_tks [
  7.   loop cft 5 [
  8.     if_conline_has (format "you were %1 by teammate" (at $tk_list $cft)) [
  9.       alias your_tker (at $conline 5)
  10.       alias tk_time (millis)
  11.       init_reply
  12.     ] []
  13.   ]
  14. ]
  15.  
  16. alias init_reply [
  17.   if (<= (- (millis) $tk_time) 5000) [
  18.     loop irl (listlen $sry_list) [
  19.       if_conline_has (at $sry_list $irl) [
  20.         if (&& (strstr (at $conline 0) $your_tker) (= $s_reply 0)) [
  21.           say $np_msg
  22.           alias s_reply 1
  23.         ]
  24.       ] []
  25.     ]
  26.     sleep 0 [init_reply]
  27.   ] [
  28.     alias your_tker []
  29.     alias s_reply 0
  30.   ]
  31. ]
  32.  
  33. add2conloop check_for_tks
Advertisement
Add Comment
Please, Sign In to add comment