Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#1
Post
by kuripot » Sun Jan 08, 2012 3:04 am
i want to learn how to make a waypoint by using player:target_NPC..
this is daily quest in heffner for level 5..
i try to get some idea from elf2.xml
but i dont know why the "Uncomfortable Adventurer" not follow the sendMacro("ChoiceOption(1);");
and i got error this my waypoint
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-7103" z="-4156" y="172">
queststate = getQuestStatus("Earn a Reputation");
if queststate == "complete" then
player:target_NPC("Hugope");
CompleteQuestByName("Earn a Reputation")
end
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount == 10 then
player:sleep();
else
player:target_NPC("Hugope");
AcceptQuestByName("Earn a Reputation")
end
</waypoint>
<!-- # 2 --><waypoint x="-7068" z="-4245" y="174"> </waypoint>
<!-- # 3 --><waypoint x="-7006" z="-4399" y="171">
player:target_NPC("Uncomfortable Adventurer");
sendMacro("ChoiceOption(1);");
yrest(3000);
end
</waypoint>
<!-- # 4 --><waypoint x="-7006" z="-4399" y="171">
player:target_NPC("Uncomfortable Adventurer");
sendMacro("ChoiceOption(1);");
yrest(5000);
end
</waypoint>
<!-- # 5 --><waypoint x="-7006" z="-4399" y="171"> </waypoint>
<!-- # 6 --><waypoint x="-7035" z="-4328" y="172"> </waypoint>
<!-- # 7 --><waypoint x="-7106" z="-4157" y="172"> </waypoint>
</waypoints>
and this is the error
-
Attachments
-
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#2
Post
by lisa » Sun Jan 08, 2012 4:34 am
the end shouldn't be there because there is nothing that needs to end.
try this
Code: Select all
player:target_NPC("Uncomfortable Adventurer");
sendMacro("ChoiceOption(1);");
yrest(3000);
things that need to have an end
if
for
while
probably more of them, can't think of them off the top of my head.
So
Code: Select all
if
blah blah blah
end
for
blah blah blah
end
while
blah blah blah
end
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#3
Post
by rock5 » Sun Jan 08, 2012 5:52 am
kuripot wrote:but i dont know why the "Uncomfortable Adventurer" not follow the sendMacro("ChoiceOption(1);");
Have you tried doing the quest manually? You need to select option 1 twice. So
Code: Select all
player:target_NPC("Uncomfortable Adventurer"); yrest(500)
RoMScript("ChoiceOption(1)") yrest(500)
RoMScript("ChoiceOption(1)") yrest(500)
That's what I use.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#4
Post
by kuripot » Sun Jan 08, 2012 7:41 am
thanks both of you now its working
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-7085" z="-4136" y="173">
queststate = getQuestStatus("Earn a Reputation");
if queststate == "complete" then
player:target_NPC("Hugope");
CompleteQuestByName("Earn a Reputation")
end
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount == 10 then
player:sleep();
else
player:target_NPC("Hugope");
AcceptQuestByName("Earn a Reputation")
end
</waypoint>
<!-- # 3 --><waypoint x="-7085" z="-4136" y="173"> </waypoint>
<!-- # 4 --><waypoint x="-7053" z="-4237" y="174"> </waypoint>
<!-- # 5 --><waypoint x="-7003" z="-4397" y="171">
player:target_NPC("Uncomfortable Adventurer");
sendMacro("ChoiceOption(1);");
yrest(500);
sendMacro("ChoiceOption(1);");
yrest(1000);
</waypoint>
<!-- # 9 --><waypoint x="-7003" z="-4397" y="171"> </waypoint>
<!-- # 10 --><waypoint x="-6991" z="-4227" y="170"> </waypoint>
<!-- # 11 --><waypoint x="-6972" z="-3949" y="167"> </waypoint>
<!-- # 12 --><waypoint x="-7122" z="-3892" y="147"> </waypoint>
<!-- # 13 --><waypoint x="-7131" z="-3865" y="146">
player:target_NPC("Uncomfortable Adventurer");
sendMacro("ChoiceOption(1);");
yrest(500);
sendMacro("ChoiceOption(1);");
yrest(1000);
</waypoint>
<!-- # 17 --><waypoint x="-7131" z="-3865" y="146"> </waypoint>
<!-- # 18 --><waypoint x="-6981" z="-3937" y="166"> </waypoint>
<!-- # 19 --><waypoint x="-6983" z="-4096" y="170"> </waypoint>
<!-- # 20 --><waypoint x="-7083" z="-4114" y="172"> </waypoint>
</waypoints>
but i can see the problem in future... if im not the only one doing quest... because after you talk to "Uncomfortable Adventurer" he will run away. so after im back again in his spot and he is not yet come back.. my character continue running and going somewhere..
-
CanceR
- Posts: 33
- Joined: Sun Jul 22, 2012 9:28 am
#5
Post
by CanceR » Thu Jul 26, 2012 12:37 pm
i am sorry for digging up this thread.
if i make this daily quest in party of 2(3-6) chars, and one of them is circulating to talk with NPC's on a mount, and others are passive chars, which just wait the daily quest to be finished?
i tried with only first waypoint of upper shown chain, but passive char constantly losses focus and get back focused to NPC Hugope, and constantly turns around the coordinates of the waypoint.
any idea how to make char to wait until quest is finished, to be able to finish it, without moving and focusing NPC?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#6
Post
by rock5 » Fri Jul 27, 2012 5:05 am
I suspect what you are doing is making it redo the waypoint again and again. What you should do is stay inside a loop until their dalies are completed.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
CanceR
- Posts: 33
- Joined: Sun Jul 22, 2012 9:28 am
#7
Post
by CanceR » Fri Jul 27, 2012 11:21 am
i did tried both ways: repeating waypoint (does upper explained effect), and tried for looping with "while .. do" and "repeat .. until" - micromacro crashes with error in "rom/bot.lua:792: Faild to compile and run Lua code for waypoint #1"
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-7139" z="-4111" y="172">
local dqCount = RoMScript("Daily_count()");
if dqCount == 10 then
player:sleep()
else
queststate = getQuestStatus("Earn a Reputation");
if (queststate != "complete") then
repeat
until queststate == "complete";
player:target_NPC("Hugope")
AcceptCompleteQuestByName("Earn a Reputation")
else
player:target_NPC("Hugope")
AcceptQuestByName("Earn a Reputation")
end
end
</waypoint>
</waypoints>
can you please advice what is proper syntax of loops or give me link to read it. thank you in advance
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#8
Post
by rock5 » Fri Jul 27, 2012 12:42 pm
Your best reference for lua is
http://www.lua.org/manual/5.1/
But basically the loops are
and the 'for' statement which can come in different flavours so I wont provide examples.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#9
Post
by lisa » Fri Jul 27, 2012 6:45 pm
Code: Select all
if (queststate != "complete") then
should be
~=
Code: Select all
if (queststate ~= "complete") then
you also need an end for that if statement but not at the end of all the code, needs to be before the next else as it is nested inside another if statement.
Something like this will work.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-7139" z="-4111" y="172">
player:target_NPC("Hugope")
CompleteQuestByName("Earn a Reputation")
local dqCount = RoMScript("Daily_count()");
if dqCount == 10 then
player:sleep()
else
player:target_NPC("Hugope")
AcceptQuestByName("Earn a Reputation")
repeat
yrest(1000)
until getQuestStatus("Earn a Reputation") == "complete";
end
</waypoint>
</waypoints>
Who is online
Users browsing this forum: No registered users and 0 guests