I had a friend help me make this script and I was wondering if it was clean, and if they are any bugs..
This script is made to use with halo. It uses "http://www.halostats.com/downloads/launcher.html" this is to launch halo from the browser. We are useing this script to do the necesry commands to run our server.
We have been haveing problems useing this to type text & commands into halo, as it will start typeing text before the text box is open, thus messing up the command, so we are useing the timers, and I was wondering is there a better way then the timers? Also is every thing in the code clean, and optimized?
Here is some basic Halo info:
To type to everyone in halo we would press "t" and to talk to our team we would press "y".
To get to the rcon you press "~".
And here are some of the rcon commands
http://www.bungie.net/Games/HaloPC/page ... eadme#rcon
To make a long story short I was wondering how to make sure the text get's into the input screen without the message or command to be cut up, and I am asking is the code clean and what to optimise. So please help me.
Code:
#z::Run, http://www.ferretwarez.com/ewclan/
#x::Run, halo://205.234.159.13:2304
#c::
InputBox, password, Team Speak - Pass, Please Enter Password, hide
if ErrorLevel <> 0
MsgBox, CANCEL was pressed.
else
Run,teamspeak://ServerIp/nickname=nick?password=pass?channel=chan?channelpassword="%password%""
^!n::
IfWinExist, AutoHotkey.ini - Notepad
WinActivate
else
Run, C:\Program Files\AutoHotkey\AutoHotkey.ini
return
IfWinNotExist, Autohotkey.ini - Notepad
Run, C:\Program Files\AutoHotkey\AutoHotkey.ini
$Numpad1:: Send,\
$Numpad1 Up:: SetTimer, Alert1, 100
return
Alert1:
Send rcon password sv_players
SetTimer, Alert1, Off
return
$Numpad2:: Send,\
$Numpad2 Up:: SetTimer, Alert2, 100
return
Alert2:
SendRaw rcon password sv_kick
SetTimer, Alert2, Off
return
$Numpad3:: Send,\
$Numpad3 Up:: SetTimer, Alert3, 100
return
Alert3:
SendRaw rcon password sv_ban
SetTimer, Alert3, Off
return
$Numpad4:: Send,\
$Numpad4 Up:: SetTimer, Alert4, 100
return
Alert4:
SendRaw rcon password sv_map_reset
SetTimer, Alert4, Off
return
$Numpad5:: Send,\
$Numpad5 Up:: SetTimer, Alert5, 100
return
Alert5:
SendRaw rcon password sv_map_next
SetTimer, Alert5, Off
return
$Numpad6:: Send,\
$Numpad6 Up:: SetTimer, Alert6, 100
return
Alert6:
SendRaw rcon password sv_mapcycle_begin
SetTimer, Alert6, Off
return
$Numpad7:: Send,T
$Numpad7 Up:: SetTimer, Alert7, 100
return
Alert7:
SendRaw,...STOP I'm using this Hog for Defense!!!
Send,{enter}
SetTimer, Alert7, Off
return
$Numpad8:: Send,T
$Numpad8 Up:: SetTimer, Alert8, 100
return
Alert8:
SendRaw,...Watch the language, Please!!!
Send,{enter}
SetTimer, Alert8, Off
return
$Numpad9:: Send,T
$Numpad9 Up:: SetTimer, Alert9, 100
return
Alert9:
SendRaw,...Next time you will be BANNED from the server!!!
Send,{enter}
SetTimer, Alert9, Off
return
<^>!$Numpad1:: Send,\
<^>!$Numpad1 Up:: SetTimer, Alert10, 100
return
Alert10:
SendRaw rcon password sv_ban 1
SetTimer, Alert10, Off
return
<^>!$Numpad2:: Send,\
<^>!$Numpad2 Up:: SetTimer, Alert11, 100
return
Alert11:
SendRaw rcon password sv_ban 2
SetTimer, Alert11, Off
return
<^>!$Numpad3:: Send,\
<^>!$Numpad3 Up:: SetTimer, Alert12, 100
return
Alert12:
SendRaw rcon password sv_ban 3
SetTimer, Alert12, Off
return
<^>!$Numpad4:: Send,\
<^>!$Numpad4 Up:: SetTimer, Alert13, 100
return
Alert13:
SendRaw rcon password sv_ban 4
SetTimer, Alert13, Off
return
<^>!$Numpad5:: Send,\
<^>!$Numpad5 Up:: SetTimer, Alert14, 100
return
Alert14:
SendRaw rcon password sv_ban 5
SetTimer, Alert14, Off
return
<^>!$Numpad6:: Send,\
<^>!$Numpad6 Up:: SetTimer, Alert15, 100
return
Alert15:
SendRaw rcon password sv_ban 6
SetTimer, Alert15, Off
return
<^>!$Numpad7:: Send,\
<^>!$Numpad7 Up:: SetTimer, Alert16, 100
return
Alert16:
SendRaw rcon password sv_ban 7
SetTimer, Alert16, Off
return
<^>!$Numpad8:: Send,\
<^>!$Numpad8 Up:: SetTimer, Alert17, 100
return
Alert17:
SendRaw rcon password sv_ban 8
SetTimer, Alert17, Off
return
<^>!$Numpad9:: Send,\
<^>!$Numpad9 Up:: SetTimer, Alert18, 100
return
Alert18:
SendRaw rcon password sv_ban 9
SetTimer, Alert18, Off
return
<^>!$Numpad0:: Send,\
<^>!$Numpad0 Up:: SetTimer, Alert19, 100
return
Alert19:
SendRaw rcon password sv_ban 10
SetTimer, Alert19, Off
return
<^>!$Insert:: Send,\
<^>!$Insert Up:: SetTimer, Alert20, 100
return
Alert20:
SendRaw rcon password sv_ban 11
SetTimer, Alert20, Off
return
<^>!$Home:: Send,\
<^>!$Home Up:: SetTimer, Alert21, 100
return
Alert21:
SendRaw rcon password sv_ban 12
SetTimer, Alert21, Off
return
<^>!$PgUp:: Send,\
<^>!$PgUp Up:: SetTimer, Alert22, 100
return
Alert22:
SendRaw rcon password sv_ban 13
SetTimer, Alert22, Off
return
<^>!$Delete:: Send,\
<^>!$Delete Up:: SetTimer, Alert23, 100
return
Alert23:
SendRaw rcon password sv_ban 14
SetTimer, Alert23, Off
return
<^>!$End:: Send,\
<^>!$End Up:: SetTimer, Alert24, 100
return
Alert24:
SendRaw rcon password sv_ban 15
SetTimer, Alert24, Off
return
<^>!$PgDn:: Send,\
<^>!$PgDn Up:: SetTimer, Alert25, 100
return
Alert25:
SendRaw rcon password sv_ban 6
SetTimer, Alert25, Off
return
^!$NumpadAdd:: SetTimer, Alert26, 1000000
^!$NumpadAdd Up:: SetTimer, Alert27, 1010000
return
Alert26:
Send, T
return
Alert27:
SendRaw, http://www.ferretwarez.com/ewclan
Send {enter}
return
^!$NumpadSub:: SetTimer, Alert27, Off
^!$NumpadSub Up:: SetTimer, Alert26, Off
return