Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
-- Change Profile Option
YourTargetScore = 6000
__WPL:setForcedWaypointType("RUN")
questName1 = "Killer in the Midst"
function waitForEventStart()
repeat
yrest(1000) -- check every second
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
if (ScorePE == nil) then
printf("Score is nil, oh no!")
__WPL:setWaypointIndex(__WPL:findWaypointTag("timer"));
return
end
if Count == 2 and YourTargetScore > ScorePE then break end
until false
end
if oldOnLeaveCombat == nil then oldOnLeaveCombat = settings.profile.events.onLeaveCombat end
function settings.profile.events.onLeaveCombat()
oldOnLeaveCombat()
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
if Count ~= 2 or ScorePE >= YourTargetScore then
__WPL:setForcedWaypointType("RUN")
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
end
end
function isEventFinished()
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
return (Count ~= 2 or ScorePE >= YourTargetScore);
end;
</onLoad>
<!-- # 1 --><waypoint x="-4449" z="-13713" y="350" tag= "Home Base">
waitForEventStart()
</waypoint>
<!-- # 2 --><waypoint x="-4487" z="-13760" y="350" tag= "start">
queststate = getQuestStatus(questName1);
if queststate == "complete" then
player:target_NPC("Antty");
CompleteQuestByName(questName1);
yrest(300);
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
else
player:target_NPC("Antty");
AcceptQuestByName(questName1,questEndNpcID1);
yrest(300);
if (isEventFinished()) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
end
end;
</waypoint>
<!-- # 3 --><waypoint x="-4415" z="-13900" y="357"> </waypoint>
<!-- # 4 --><waypoint x="-4518" z="-13944" y="356"> player:target_NPC("Telery Haz");
ChoiceOptionByName("Ask about the Garon Myrmex Egg")
yrest(200);
ChoiceOptionByName("Ask about the Garon Myrmex Egg")
yrest(200);
if inventory:itemTotalCount("Garon Myrmex Egg") > 0 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Telery"))
end
</waypoint>
<!-- # 5 --><waypoint x="-4394" z="-13979" y="360"> </waypoint>
<!-- # 6 --><waypoint x="-4297" z="-14061" y="366"> </waypoint>
<!-- # 7 --><waypoint x="-4305" z="-14149" y="386"> </waypoint>
<!-- # 8 --><waypoint x="-4767" z="-14650" y="548"> </waypoint>
<!-- # 9 --><waypoint x="-4917" z="-14829" y="551"> </waypoint>
<!-- # 10 --><waypoint x="-4874" z="-15056" y="542"> player:target_NPC("Folj May");
ChoiceOptionByName("Ask about the Garon Myrmex Egg")
yrest(200);
ChoiceOptionByName("Ask about the Garon Myrmex Egg")
yrest(200);
if inventory:itemTotalCount("Garon Myrmex Egg") > 0 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Folj"))
end
</waypoint>
<!-- # 11 --><waypoint x="-5010" z="-15043" y="542"> </waypoint>
<!-- # 12 --><waypoint x="-5275" z="-15161" y="570"> </waypoint>
<!-- # 13 --><waypoint x="-5504" z="-15248" y="608"> player:target_NPC("Navok Keff");
ChoiceOptionByName("Ask about the Garon Myrmex Egg")
yrest(200);
ChoiceOptionByName("Ask about the Garon Myrmex Egg")
yrest(200);
</waypoint>
<!-- # 14 --><waypoint x="-5162" z="-15085" y="555"> </waypoint>
<!-- # 15 --><waypoint x="-4974" z="-14953" y="548"> </waypoint>
<!-- # 16 --><waypoint x="-4767" z="-14626" y="553" tag= "Folj"> </waypoint>
<!-- # 17 --><waypoint x="-4293" z="-14125" y="377" tag= "Telery"> </waypoint>
<!-- # 18 --><waypoint x="-4487" z="-13764" y="349">
if (isEventFinished()) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
end
queststate = getQuestStatus(questName1);
if queststate == "complete" then
player:target_NPC("Antty");
CompleteQuestByName(questName1);
yrest(300);
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
else
player:target_NPC("Antty");
ChoiceOptionByName("Give the Garon Myrmex Egg to Antty")
yrest(200);
player:target_NPC("Antty");
CompleteQuestByName(questName1);
yrest(300);
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
end
</waypoint>
<!-- # 1 --><waypoint x="-4451" z="-13716" y="350" tag= "timer"> </waypoint>
<!-- # 2 --><waypoint x="-4387" z="-13925" y="356"> </waypoint>
<!-- # 3 --><waypoint x="-4284" z="-14103" y="373"> </waypoint>
<!-- # 4 --><waypoint x="-4794" z="-14667" y="548"> </waypoint>
<!-- # 5 --><waypoint x="-5162" z="-15099" y="556"> </waypoint>
<!-- # 6 --><waypoint x="-5509" z="-15231" y="607"> </waypoint>
<!-- # 7 --><waypoint x="-5221" z="-15105" y="563"> </waypoint>
<!-- # 8 --><waypoint x="-4992" z="-14991" y="545"> </waypoint>
<!-- # 9 --><waypoint x="-4625" z="-14469" y="591"> </waypoint>
<!-- # 10 --><waypoint x="-4254" z="-14095" y="371"> </waypoint>
<!-- # 11 --><waypoint x="-4481" z="-13765" y="347">
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
</waypoint>
</waypoints>thanks to lisa, rock5, and Jandrana for your help.....