Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.85 KB | None | 0 0
  1. import vk_api,asyncio
  2. from vk_api.utils import get_random_id
  3.  
  4. def send_vk(text):
  5.     vk.messages.send(
  6.         peer_id = -182653676467171,
  7.         random_id = get_random_id(),
  8.         message = text)
  9.  
  10. async def race(go_time):
  11.     await asyncio.sleep(go_time)
  12.     text = 'Гонка'
  13.     while True:
  14.          send_vk(text)
  15.          await asyncio.sleep(1202)
  16.  
  17. async def business(go_time):
  18.     await asyncio.sleep(go_time)
  19.     text = 'Бизнес снять'
  20.     while True:
  21.         send_vk(text)
  22.         await asyncio.sleep(3602)
  23.  
  24. async def makevideo(go_time):
  25.     await asyncio.sleep(go_time)
  26.     text = 'Снять видео'
  27.     while True:
  28.         send_vk(text)
  29.         await asyncio.sleep(2402)
  30.  
  31. async def mining(go_time):
  32.     await asyncio.sleep(go_time)
  33.     text = 'ферма'
  34.     while True:
  35.         send_vk(text)
  36.         await asyncio.sleep(3602)
  37.  
  38. async def job_taxi(go_time):
  39.     await asyncio.sleep(go_time)
  40.     text = ['Таксовать']
  41.     while True:
  42.         i = 0
  43.         while i <= 7:
  44.             send_vk(text)
  45.             i = i + 1
  46.             await asyncio.sleep(7)
  47.         await asyncio.sleep(3602)
  48.  
  49. async def pet_eat(go_time):
  50.     await asyncio.sleep(go_time)
  51.     text = ['Питомец кормить']
  52.     while True:
  53.         i = 0
  54.         while i <= 4:
  55.             send_vk(text)
  56.             i = i + 1
  57.             await asyncio.sleep(7)
  58.         await asyncio.sleep(14402)
  59.  
  60. async def pet_play(go_time):
  61.     await asyncio.sleep(go_time)
  62.     text = ['Питомец играть']
  63.     while True:
  64.         i = 0
  65.         while i <= 4:
  66.             send_vk(text)
  67.             i = i + 1
  68.             await asyncio.sleep(7)
  69.         await asyncio.sleep(14402)
  70.  
  71. async def pet_circus(go_time):
  72.     await asyncio.sleep(go_time)
  73.     text = 'Питомец цирк'
  74.     while True:
  75.         send_vk(text)
  76.         await asyncio.sleep(1202)
  77.  
  78. async def bonus_rent(go_time):
  79.     await asyncio.sleep(go_time)
  80.     texts = ['Бонус','аренда квартиры','аренда дом']
  81.     while True:
  82.         for text in texts:
  83.             send_vk(text)
  84.             await asyncio.sleep(7)
  85.         await asyncio.sleep(86402)
  86.  
  87.  
  88. async def vampire(go_time):
  89.     await asyncio.sleep(go_time)
  90.     text = 'Вампир купить'
  91.     while True:
  92.         send_vk(text)
  93.         await asyncio.sleep(172802)
  94.  
  95. async def potions(go_time):
  96.     await asyncio.sleep(go_time)
  97.     texts = ['зелье 1','зелье 2','зелье 3']
  98.     while True:
  99.         for text in texts:
  100.             send_vk(text)
  101.             await asyncio.sleep(7)
  102.         await asyncio.sleep(3602)
  103.  
  104. async def live(go_time):
  105.     await asyncio.sleep(go_time)
  106.     text = 'Начать стрим'
  107.     while True:
  108.         send_vk(text)
  109.         await asyncio.sleep(1500)
  110.  
  111. async def full(token):
  112.     global vk
  113.     token = token
  114.     vk_session = vk_api.VkApi(token=token)
  115.     vk = vk_session.get_api()
  116.  
  117.     task_race = asyncio.create_task(race(0))
  118.     task_business = asyncio.create_task(business(60))
  119.     task_video = asyncio.create_task(makevideo(120))
  120.     task_mining = asyncio.create_task(mining(180))
  121.     task_vampire = asyncio.create_task(vampire(240))
  122.     task_potions = asyncio.create_task(potions (300))
  123.     task_jobtaxi = asyncio.create_task(job_taxi(360))
  124.     task_rentb = asyncio.create_task(bonus_rent(400))
  125.     task_peteat = asyncio.create_task(pet_eat(460))
  126.     task_petplay = asyncio.create_task(pet_play(520))
  127.     task_petcircus = asyncio.create_task(pet_circus(580))
  128.     task_live = asyncio.create_task(live(640))
  129.  
  130.     await asyncio.gather(task_race,task_business,task_video,task_mining,task_vampire,task_potions,task_jobtaxi,task_rentb,task_peteat,task_petplay,task_petcircus,task_live)
  131.  
  132. if __init__ == __main__:
  133.     token = '6253'
  134.     token2 = '73'
  135.     asyncio.run(full(token))
  136.     asyncio.run(full(token2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement