Re: Cyplops stronghold and zurhidon negotiator
Posted: Sun Aug 07, 2011 11:16 am
Well, I've done something similar to what botje has done. My problem is I don't have an AoE. So I began my journey into the frustrating realm of targeting...
I started off with the following code in my profile <onPreSkillCast>:
This seemed to work fairly well then I thought about it and took it a step further. I thought "why not make a function to detect what instance I'm in and have it automatically detect which target(s) I need to look for". So I came up with this function:
Then in the profile <onPreSkillCast> I only have to put
This is working quite well. So well, in fact, that when I tested the waypoint and gathered up the Protectors to summon Negotiator..... It wouldn't target/kill the Protectors because it was constantly trying to retarget on Negotiator.
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:
This is now working perfectly. But.... I'm running into a new problem.... I'm killing Negotiator too fast
... He's not getting to use the Protectors to heal himself so the fight gets reset. Any ideas?
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>