Guest User

Untitled

a guest
Nov 20th, 2013
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import app
  2. import net
  3. import thread
  4.  
  5. # wiadomosc gracza, twoja odpowiedz
  6. ANSWER_BOT_DICT = [
  7.     ["cześć", "witam"],
  8.     ["siema", "elo"],
  9. ]
  10.        
  11. def RUN(self, mode, name, text):
  12.     for m in ANSWER_BOT_DICT:
  13.         if m[0] in text: # text wiadomosc gracza
  14.             def msg():
  15.                 app.Sleep(3000) # czekanie 3 sekund
  16.                 net.SendWhisperPacket(name, m[1]) # wysylanie wiadomosci
  17.            
  18.             thread.start_new_thread(msg, ())
  19.             break
  20.            
  21.     return 0
Advertisement
Add Comment
Please, Sign In to add comment