/
spawnerBot.py
59 lines (45 loc) · 905 Bytes
/
spawnerBot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python
import sys
import os
import pygame
import string
import net
import gui
import player
import time
import random
from math import *
import troop
import speedster
import building
import vec
import netserver as NS
import netclient as NC
from pygame.locals import *
from pygame.color import THECOLORS
def main():
#connect to
print sys.argv[1]
#via this port
print sys.argv[2]
#wait before moveing around
print sys.argv[3]
playerList = []
n = NC.client_thread(sys.argv[1],int(sys.argv[2]))
n.connect()
time.sleep(int(sys.argv[3]))
cashRate = 50
cashTicks = 0
cash = 100
DONE = False
while not DONE:
n.send()
#Bot Logic Goes Here
n.minput(25, random.randint(0,1000), random.randint(0,1000))
#/Bot Logic
#Game Engine Logic Is Here
n.recv()
while not n.recv_queue.empty():
tempData = n.recv_queue.get()
if __name__ == "__main__":
main()