Make script
Posted: Mon Jan 03, 2011 7:19 am
Hi. i wanna make script to do daily quest: Helping Them Grow in Elven Island. I dont know how to make accept quest, use quest items, etc . Can any one help me? Thanks
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onLoad>
levelupSkills1To10();
repeat questname=RoMScript("TEXT('Sys422340_name')"); yrest(500) until questname
changeProfileOption("HARVEST_DISTANCE", 30)
</onLoad>
<!-- # 1 --><waypoint x="31841" z="4593" tag="start">
repeat dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()") until dailyQuestCount and dailyQuestsPerDay
if (dailyQuestsPerDay - dailyQuestCount) > 0 then
player:target_NPC("Blinsik"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);
else
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();"); yrest(3*60*1000) -- wait 3m for next character to load
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("tiering"); -- Profile name
yrest (4000)
loadPaths("tier"); -- First script
end
</waypoint>
<!-- # 2 --><waypoint x="31897" z="4620"> </waypoint>
<!-- # 3 --><waypoint x="31932" z="4642"> </waypoint>
<!-- # 4 --><waypoint x="31923" z="4686"> </waypoint>
<!-- # 5 --><waypoint x="31846" z="4860"> </waypoint>
<!-- # 6 --><waypoint x="31814" z="4993"> </waypoint>
<!-- # 7 --><waypoint x="31784" z="5096"> </waypoint>
<!-- # 8 --><waypoint x="31718" z="5227"> </waypoint>
<!-- # 9 --><waypoint x="31644" z="5373"> </waypoint>
<!-- # 10 --><waypoint x="31561" z="5508"> </waypoint>
<!-- # 11 --><waypoint x="31472" z="5638"> </waypoint>
<!-- # 12 --><waypoint x="31419" z="5728" tag="pick"> player:target_Object(112976,7000,true);
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if queststate == "complete" then
__WPL:setWaypointIndex(__WPL:findWaypointTag("return"));
else __WPL:setWaypointIndex(__WPL:findWaypointTag("pick"));
end
</waypoint>
<!-- # 11 --><waypoint x="31472" z="5638" tag="return"> </waypoint>
<!-- # 12 --><waypoint x="31561" z="5508"> </waypoint>
<!-- # 13 --><waypoint x="31644" z="5373"> </waypoint>
<!-- # 14 --><waypoint x="31718" z="5227"> </waypoint>
<!-- # 15 --><waypoint x="31784" z="5096"> </waypoint>
<!-- # 16 --><waypoint x="31814" z="4993"> </waypoint>
<!-- # 17 --><waypoint x="31846" z="4860"> </waypoint>
<!-- # 18 --><waypoint x="31923" z="4686"> </waypoint>
<!-- # 19 --><waypoint x="31932" z="4642"> </waypoint>
<!-- # 20 --><waypoint x="31897" z="4620"> </waypoint>
<!-- # 21 --><waypoint x="31841" z="4593">
player:target_NPC("Blinsik"); yrest(1000); sendMacro("CompleteQuest()"); yrest(2000);
</waypoint>
<!-- # 21 --><waypoint x="31841" z="4593">
repeat dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()") until dailyQuestCount and dailyQuestsPerDay
if (dailyQuestsPerDay - dailyQuestCount) == 0 then
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();"); yrest(3*60*1000) -- wait 3m for next character to load
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("tiering"); -- Profile name
yrest (4000)
loadPaths("tier"); -- First script
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
end
</waypoint>
</waypoints>Find this line;darkjack wrote:Where in this sricpt i should use this comand:
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if queststate == "not accepted" then
because i have problem, some times bot dont accept quest and offcorse stuck
Code: Select all
player:target_NPC("Blinsik"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);Code: Select all
repeat
player:target_NPC("Blinsik"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
until queststate == "incomplete"