PDA

View Full Version : Firing a bow at a number of opponents



m1kinsey
11-26-2008, 05:06 AM
I have a simple firing script that allows me to shoot at one target using the
%1 symbol.

But I do not know how to set it up to hit a second or third subsequent target moving into a room.

Anyone have any suggestions/help?

Izzy
11-26-2008, 09:00 AM
%2, %3

BigWorm
11-26-2008, 12:52 PM
At work right now so I can't test, but this should give you an idea of how you can work with this. The IF_# instruction checks if there is an argument with that number and does the command if it does, nothing otherwise. The SHIFT instruction gets rid of what's in %1 and shifts all the other arguments down one spot.

# usage: .fire [target1] ... [targetN]

IF_1 GOTO FireLoop
ECHO I need at least one argument!
EXIT

FireLoop:
PUT fire %1
SHIFT
IF_1 GOTO FireLoop

ECHO All done!
EXIT