ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: NObama on February 14, 2010, 02:52:52 PM
-
Greetings, fellow cheaters.
I am creating a script that will:
a) Find the target
b) Cast a summons to kill the target
c) recast the summons if the target isn't dead yet
The third bit is my stumbling block. How can I monitor the follower count and the status of the monster I'm killing and re-cast if the summons died before the target did?
Obviously, #followers is involved...this snippet *appears* to be working, but if someone like EN, TM, Twinkle McNugget or another code god could double check me I'd appreciate it. This feels like I'm missing something...unfortunately, the set of circumstances I'm coding to avoid is rare and tough to test in game land.
sub castRev
while #followers = 1
{
event macro 15 114
wait 3s
while #targetcurs = 1
wait 1
set #ltargetid #findid
event macro 22 0
wait 5
}
return
Hmm...maybe it should be:
While #followers = 1
gosub CastRev
:)
-
Edit: New version of code posted, please review this one:
sub castRev
finditem XXX G_10
while #followers = 1 && #findkind = 1
{
event macro 15 114
wait 3s
while #targetcurs = 1
wait 1
set #ltargetid #findid
event macro 22 0
wait 5
finditem RGB G_10
}
return
-
Something like this maybe? Don't use waits to wait for target cursors. Use
target 5s
or something. The target command just tells EUO to wait for however long you put for a target. So target 5s is wait 5s for a target, if none there after 5s, it continues. That's off the top of my head below... just guessing it might work if you cast and target correctly in the middle there... :)
sub revkill
repeat
finditem %monster G_ , %range
if %monster
{
set %findcnt #findcnt
if #followers > 1
{
cast rev stuff...
target %monster... blah blah :)
}
}
wait 10
until %findcnt < 1