PDA

View Full Version : Script to ambush leg if prone, head/eyes/whatever if not?



Zhiart
03-24-2016, 11:08 AM
I saw someone mention in another thread that they had wrote a script like this, but I can't seem to find that thread again to ask them for the script. Does anyone have a script like this?

Mogonis
03-24-2016, 01:57 PM
If it's already prone, why are you going for its legs? This seems backwards.

Zhiart
03-24-2016, 02:06 PM
Whoops. Need the opposite of what I said.

Haldrik
03-24-2016, 02:29 PM
Many many ways to do this.

One way that hasnt been mentioned is that you can do

ambush_location = head
ambush_location = leg if target.status != "prone" <------ this is pseudo code, and getting the target status depends on how you are targeting the mob
fput "hide"
fput "attack #{ambush_location}"

SashaFierce
03-24-2016, 02:34 PM
You can add these parts to bigshot, but you'll have to figure out where.



elsif( command =~ /^ambush/i )
cmd_ambush(npc)



#ADDED
def cmd_ambush(target)
critter_needs_to_be_legged = true
waitrt?
if (target.status =~ /prone|sit|lay|kneel|stun|sleep/i)
result = dothistimeout "ambush ##{target.id} head", 2, /round(time)?/i
if result =~ /round(time)?/i
critter_needs_to_be_legged = nil
elsif result.nil?
nil
end
end
if (critter_needs_to_be_legged)
result = dothistimeout "ambush ##{target.id} right leg", 2, /round(time)?/i
if result =~ /round(time)?/i
nil
elsif result.nil?
fput "ambush ##{$my_target.id} right leg"
end
end
end

Haldrik
03-24-2016, 02:48 PM
You can add these parts to bigshot, but you'll have to figure out where.



elsif( command =~ /^ambush/i )
cmd_ambush(npc)



#ADDED
def cmd_ambush(target)
critter_needs_to_be_legged = true
waitrt?
if (target.status =~ /prone|sit|lay|kneel|stun|sleep/i)
result = dothistimeout "ambush ##{target.id} head", 2, /round(time)?/i
if result =~ /round(time)?/i
critter_needs_to_be_legged = nil
elsif result.nil?
nil
end
end
if (critter_needs_to_be_legged)
result = dothistimeout "ambush ##{target.id} right leg", 2, /round(time)?/i
if result =~ /round(time)?/i
nil
elsif result.nil?
fput "ambush ##{$my_target.id} right leg"
end
end
end


Very nice.

Zhiart
03-24-2016, 03:42 PM
That's exactly what I was looking for! Thanks Sasha!

trueoutsoldier
03-25-2016, 06:46 PM
;fire is the script you are looking for, you would need to edit it to use it without a bow+arrow