fixed chat and other minor things

This commit is contained in:
jenzur 2020-09-20 23:04:35 +02:00
parent 5589a95a8f
commit 2ce3e073c0
2 changed files with 6 additions and 4 deletions

View File

@ -20,10 +20,9 @@ def colored(r, g, b, text):
def writeCfgInput(Input_user):
with open(looptestPath, 'w') as f:
if input == "wait 5;":
time.sleep(1)
time.sleep(0.2)
colored_text = colored(255, 0, 0, ('Input: ' + Input_user))
print(colored_text)
#print(colored_text)
f.write(Input_user)
def exit_handler():
@ -34,6 +33,7 @@ def joinTeam():
str = "jointeam 2; joinclass 3; zspawn;"
writeCfgInput(str)
print('jointeam func: ')
time.sleep(4.5)
writeCfgInput('wait 5;')
def bot_process_surf(input_line):
@ -144,6 +144,7 @@ def bot_connect_ze():
strdev = "connect 151.80.230.149:27019/test132;"
str1 = "connect 151.80.230.149:27015;"
writeCfgInput(str1)
time.sleep(0.4)
writeCfgInput('wait 5;')
print('not yet connected')
@ -175,6 +176,7 @@ if __name__ == '__main__':
response_msg = f"""say {data}"""
print("enabled remote UDP packet response_msg: ", response_msg)
writeCfgInput(response_msg)
time.sleep(1)
writeCfgInput("wait 5;")
if data == "autismo connected":
print('Bot connected!')

View File

@ -180,7 +180,7 @@ public Action permitStuck(Handle timer, any data)
public void OnMapStart()
{
//0.2 too spammmy, 1.5 too slow
CreateTimer(0.25, recursive_pressing, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
CreateTimer(0.85, recursive_pressing, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
CreateTimer(1.0, clients_coordinates, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
CreateTimer(10.0, bot_check_connect, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}