Veiled Encampment Waypoint
Posted: Fri Oct 05, 2012 9:41 am
Placeholder, testing now.
Code: Select all
function waitForEventStart()
repeat
yrest(3000) -- check every second
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
if (ScorePE == nil) then
printf("Score is nil, oh no!");
<!-- # 2 --><waypoint x="-2804" z="-18154" y="836"> </waypoint>
<!-- # 3 --><waypoint x="-2926" z="-18034" y="836"> </waypoint>
<!-- # 4 --><waypoint x="-2813" z="-18155" y="836"> </waypoint>
<!-- # 5 --><waypoint x="-2666" z="-17962" y="837"> </waypoint>
end
if Count == 2 and YourTargetScore > ScorePE then break end
until false
end
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
YourTargetScore = 1776
function waitForEventStart()
repeat
yrest(1000) -- check every second
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
if Count == 2 and YourTargetScore > ScorePE then break end
until false
end
function isEventFinished()
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("WP1"));
end
end
</onload>
<!-- # 2 --><waypoint x="-2651" z="-17953" y="812">
inventory:useItem("Magic Circle Charge Rune");
if (isEventFinished()) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
end;
player:target_NPC("Forem Mone");
RoMScript("OnClick_QuestListButton(1, 1);");yrest(100)
RoMScript("OnClick_QuestListButton(3, 1);");yrest(100)
RoMScript("CompleteQuest();");yrest(500)
player:target_NPC("Forem Mone");
RoMScript("OnClick_QuestListButton(1, 1);");yrest(100)
RoMScript("OnClick_QuestListButton(1, 1);");
__WPL:setDirection(WPT_FORWARD);
inventory:useItem("Magic Circle Charge Rune");
</waypoint>
<!-- # 3 --><waypoint x="-2812" z="-18150" y="811">
inventory:useItem("Magic Circle Charge Rune");
</waypoint>
<!-- # 4 --><waypoint x="-2936" z="-18020" y="811">
inventory:useItem("Magic Circle Charge Rune");
__WPL:setDirection(WPT_BACKWARD);
</waypoint>
<!-- # 3 --><waypoint x="-2651" z="-17953" y="812" tag="WP1"> waitForEventStart(); </waypoint>
</waypoints>
Code: Select all
if (ScorePE == nil) then
printf("Score is nil, oh no!");
__WPL:setWaypointIndex(__WPL:findWaypointTag("WP1"));
end