I started off with the following code in my profile <onPreSkillCast>:
Code: Select all
zneg = player:findNearestNameOrId("Zurhidon Negotiator")
if zneg then
player:target(zneg)
player:update()
player:fight();
end;
Code: Select all
--=<< Mob check for profile onPreSkillCast >>=--
function psmc()
-- Origin
local zoneid = RoMScript("GetZoneID()")
if zoneid == 116 then
printf("Looking for dark blood bug().\n")
bug = player:findNearestNameOrId("Dark Blood Bug")
if bug then
player:target(bug)
player:update()
player:fight();
end;
-- Cyclops Stronghold
elseif zoneid == 252 then
printf("Looking for zurhidon negotiator().\n")
zneg = player:findNearestNameOrId("Zurhidon Negotiator")
if zneg then
player:target(zneg)
player:update()
player:fight();
end;
end;
end;
Code: Select all
<onPreSkillCast><![CDATA[
-- This event receives the skill your going to cast and is accessible using arg1
-- Ex arg1.Name is the name of the skill
-- Add lua code you want to execute here
psmc();
]]></onPreSkillCast>
Well, since I have no AoE skill to use I had to come up with something to kill the little buggers because there was no way I wanted to mess up my previous code that was working so well. So I put the following into my waypoint once I had all 4 gathered up:
Code: Select all
<!-- # 91 --><waypoint x="5378" z="3159" y="47">
__WPL:setForcedWaypointType("TRAVEL")
</waypoint>
<!-- # 92 --><waypoint x="5565" z="3351" y="47"> </waypoint>
<!-- # 93 --><waypoint x="5618" z="3310" y="47"> </waypoint>
<!-- # 5 --><waypoint x="5735" z="3327" y="47"> </waypoint>
<!-- # 6 --><waypoint x="5833" z="3367" y="47"> </waypoint>
<!-- # 7 --><waypoint x="5836" z="3187" y="47"> </waypoint>
<!-- # 8 --><waypoint x="5842" z="3003" y="47"> </waypoint>
<!-- # 9 --><waypoint x="5738" z="2989" y="47"> </waypoint>
<!-- # 10 --><waypoint x="5577" z="2975" y="47"> </waypoint>
<!-- # 11 --><waypoint x="5451" z="3146" y="47">
__WPL:setForcedWaypointType("NORMAL")
repeat
player:findNearestNameOrId("Zurhidon Protector")
player:target("Zurhidon Protector")
player:fight();
until player:findNearestNameOrId("Zurhidon Negotiator")
yrest(4000);
</waypoint>