I wrote the following short script to help me in an online game. It is designed to wait for a specific message and harvest a letter (A, B, or C) from that message, then use that to send a response at the proper time. For example: it will wait for the game server to send "Hit in range "A"" and then wait for the a series of As to send a space character. i.e.:
.........BBBBB........CCCCC......A <--- Now it should send the space character. I've posted the script below. The issue I'm having is that, while it works, it's kind of sluggish, and even though the server text is displayed at a reasonably slow rate, the script often is not able to respond until 3 or even 4 of the appropriate letters have been dispayed. Does anyone have any suggestions for speeding this script up? Is there anything I can change to make it more efficient?
.........BBBBB........CCCCC......A <--- Now it should send the space character. I've posted the script below. The issue I'm having is that, while it works, it's kind of sluggish, and even though the server text is displayed at a reasonably slow rate, the script often is not able to respond until 3 or even 4 of the appropriate letters have been dispayed. Does anyone have any suggestions for speeding this script up? Is there anything I can change to make it more efficient?
Code:
;Operation Overkill II Autofight script
string HitLtr
proc main
while $CARRIER == 1
waitfor "Hit range in `"" FOREVER
rget HitLtr 1
call Strike
endwhile
endproc
;
proc Strike
switch HitLtr
case "A"
waitfor "A"
endcase
case "B"
waitfor "B"
endcase
case "C"
waitfor "C"
endcase
endswitch
transmit " "
endproc