Page 1 of 3
Help need to make questbot
Posted: Sun Aug 01, 2010 11:50 am
by xwhizzah
Hello,
I need some help with my bot. Iam trying to create a bot not to farm mobs or items but actualy go quest. I had no problem to get my bot do the accept an deliver quest at the starting area. Like
Claim Your Potions
Claiming Armor
Claiming Weapons
Complete Preparations
I let the bot use the item by questname. but i think with id would be better because my way will only work on mage.
but now the hard part comes. a real quest. Iam trying to bot the following quest: Testing Your Skills
iam still unclear on the following.
- How to get Itemid from items
- how to travel to waypoint and then farm items till quest is done and then deliver the quest.
Re: Help need to make questbot
Posted: Sun Aug 01, 2010 12:48 pm
by rock5
bloodslain wrote:- How to get Itemid from items
- how to travel to waypoint and then farm items till quest is done and then deliver the quest.
One of the simplest ways to get item ids is to look them up on getbuffed.com. Once you have the item displayed you can see the item id in the address bar. It is not always up-to-date though. Another way is to use the ItemPreview addon.
After accepting the quest just move to the Fungus area then load your fungus file. You only need 5 fungus so you can make it a small loop. What I do is at each waypoint I check to see if I have enough, if I do I change the waypoint type to 'run' so it quickly goes to the end of the file. At the end of the file you load the next script if you have enough. The next script goes back in town and continues with the quests in town.
Re: Help need to make questbot
Posted: Sun Aug 01, 2010 1:42 pm
by xwhizzah
Thnx for your reply

ill download the addon as soon as iam ready at work.
could you give me an example how you did it. I tryed to get it to work for few hours, but still no result. Perhaps with an example ill get it to work. or an manual how to use the commands for questing. specialy the command that you use at your egg script wich checks if quest is completed, incompleted etc.
i also tryed to edit your eggquest waypoint file. but it results in errors
iam not the best scripter yet, still learning
BTW good work on the egg script, Works great! "_- only shame that the prices on the eggs are getting low now

Re: Help need to make questbot
Posted: Sun Aug 01, 2010 10:22 pm
by rock5
bloodslain wrote:Thnx for your reply

ill download the addon as soon as iam ready at work.
could you give me an example how you did it. I tryed to get it to work for few hours, but still no result. Perhaps with an example ill get it to work. or an manual how to use the commands for questing. specialy the command that you use at your egg script wich checks if quest is completed, incompleted etc.
i also tryed to edit your eggquest waypoint file. but it results in errors
iam not the best scripter yet, still learning
BTW good work on the egg script, Works great! "_- only shame that the prices on the eggs are getting low now

Mine looks something like this.
Code: Select all
<waypoints type="NORMAL">
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
<!-- # 2 --><waypoint x="-3068" z="-8846"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 3 --><waypoint x="-3021" z="-8993"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 4 --><waypoint x="-3034" z="-9131"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 5 --><waypoint x="-3045" z="-9270"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 6 --><waypoint x="-3204" z="-9059"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 7 --><waypoint x="-3166" z="-8983"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 8 --><waypoint x="-3224" z="-8832"> if sureRoMScript("GetBagItemCount(201171)") > 4 then __WPL:setForcedWaypointType("RUN") end
if RoMScript("GetBagItemCount(201171)") > 4 then
loadPaths("backtotown")
end
</waypoint>
</waypoints>
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 1:22 am
by xwhizzah
Cool, thnx mate! ill try it when i get home from work. Yours look much simpeler as the way i was trying to do it.
Itemcount is clear to me now i guess. How will i do monstercount? that would have to be with queststate or not?
thanks for your help this far!
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 2:11 am
by rock5
bloodslain wrote:Cool, thnx mate! ill try it when i get home from work. Yours look much simpeler as the way i was trying to do it.
Itemcount is clear to me now i guess. How will i do monstercount? that would have to be with queststate or not?
thanks for your help this far!
If a quest is a kill quest it's still easier to check the quest state than count kills. Rombot is not 100% reliable at counting kills.
I need to make a couple of points about the example I gave you.
1. 'sureRoMScript' does not exit, I forgot to change them. They are supposed to be just 'RoMScript'
2. I created this awhile ago. You should replace
Code: Select all
RoMScript("GetBagItemCount(201171)")
with
which is faster and more reliable.
Just in case I confused you, this is what I should have posted;
Code: Select all
<waypoints type="NORMAL">
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
<!-- # 2 --><waypoint x="-3068" z="-8846"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 3 --><waypoint x="-3021" z="-8993"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 4 --><waypoint x="-3034" z="-9131"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 5 --><waypoint x="-3045" z="-9270"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 6 --><waypoint x="-3204" z="-9059"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 7 --><waypoint x="-3166" z="-8983"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 8 --><waypoint x="-3224" z="-8832"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end
if inventory:itemTotalCount(201171) > 4 then
loadPaths("backtotown")
end
</waypoint>
</waypoints>
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 2:36 am
by xwhizzah
Still at work

cant wait to try it out!
alltough iam analysing the script and iam trying to understand the code
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
This changes the profile to an profile called fungus?
__WPL:setForcedWaypointType("RUN")
Changes the type of way point from travel to run?
if inventory:itemTotalCount(201171) > 4 then
when item is above 4. Can i also use other variables? like:
if inventory:itemTotalCount(201171) < 4 then
if inventory:itemTotalCount(201171) = 4 then
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 3:00 am
by xwhizzah
Also trying to get one waypoint file for each quest. i dont know if it works tough, cant try it out yet

but codewise is this correct?
Code: Select all
<waypoints type="NORMAL">
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
<!-- # 1 --><waypoint x="-3697" z="-8683" tag="qgiver">
player:clearTarget();
player:rest(2);
player:target_NPC("Leighton");
player:rest(2);
sendMacro("OnClick_QuestListButton(1,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
<!-- # 5 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 6 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 7 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 8 --><waypoint x="-????" z="-????"></waypoint>
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
<!-- # 9 --><waypoint x="-3068" z="-8846" tag="funguspath"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 10 --><waypoint x="-3021" z="-8993"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 11 --><waypoint x="-3034" z="-9131"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 12 --><waypoint x="-3045" z="-9270"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 13 --><waypoint x="-3204" z="-9059"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 14 --><waypoint x="-3166" z="-8983"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 15 --><waypoint x="-3224" z="-8832"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end
if inventory:itemTotalCount(201171) > 4 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("qgiver"));
__WPL:reverse();
end
</waypoint>
</waypoints>
Sorry if i messed up some code

still learning hahaha
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 3:56 am
by rock5
bloodslain wrote:<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
This changes the profile to an profile called fungus?
This tells the bot what to target. I usually put this at the start of waypoint files so the correct mobs are targeted for that particular waypoint file. I don't use the 'mobs' section in my characters profile.
bloodslain wrote:__WPL:setForcedWaypointType("RUN")
Changes the type of way point from travel to run?
Yes (from normal to run), so it stops wasting time attacking more mobs than it needs to. This is relevant to to whole waypoint file so if you want to attack some mobs later in the same waypoint file you will need to change it back.
bloodslain wrote:if inventory:itemTotalCount(201171) > 4 then
when item is above 4. Can i also use other variables? like:
if inventory:itemTotalCount(201171) < 4 then
if inventory:itemTotalCount(201171) = 4 then
Yes, except;
1. '<' sometimes doesn't work. It's safer to reverse it eg. instead of "if a < b then" use "if b > a then". It's exactly the same logically.
2. '=' is used to set a value. To compare values you use '=='. So it would be
if inventory:itemTotalCount(201171) == 4 then
You can also use '>=' and '~='. That's 'greater than or equal to' and 'not equal to'.
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 4:23 am
by rock5
Code: Select all
<!-- # 1 --><waypoint x="-3697" z="-8683" tag="qgiver">
player:clearTarget();
player:rest(2);
player:target_NPC("Leighton");
player:rest(2);
sendMacro("OnClick_QuestListButton(1,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
1. You don't need to clear the target.
2. You shouldn't need a pause after target_NPC because it includes a pause (Although it doesn't hurt).
3 Your missing the closing waypoint tag ie. </waypoint>
Code: Select all
<!-- # 8 --><waypoint x="-????" z="-????"></waypoint>
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
<!-- # 9 --><waypoint x="-3068" z="-8846" tag="funguspath"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
1. The point 8 command is outside of waypoint tags (should be between <waypoint> and </waypoint> tags). All commands must be between tags or they wont get executed.
2. That command is not necessary as the "funguspath" point is the next one anyway.
Code: Select all
__WPL:setForcedWaypointType("RUN") end
if inventory:itemTotalCount(201171) > 4 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("qgiver"));
__WPL:reverse();
end
</waypoint>
What you should be doing here is going back to point "funguspath" if you haven't got enough or going forward to complete the quest. eg.
Code: Select all
<!-- # 15 --><waypoint x="-3224" z="-8832">
if inventory:itemTotalCount(201171) > 4 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
end
</waypoint>
The waypoint should then continue to the npc to complete the quest. I know I use the same points to accept and complete quests but seeing as you are learning, don't get too ambitious. Keep them separate.
bloodslain wrote:Sorry if i messed up some code

still learning hahaha
No worries. Learning code takes time. You asked all the right questions. I hope you learn a lot.

Re: Help need to make questbot
Posted: Mon Aug 02, 2010 7:13 am
by xwhizzah
Really appreciate your help

didnt know what to do without you
So this will result in this.
Code: Select all
<waypoints type="NORMAL">
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
<!-- # 1 --><waypoint x="-3697" z="-8683" tag="qgiver">
player:target_NPC("Leighton");
sendMacro("OnClick_QuestListButton(1,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
</waypoint>
<!-- # 5 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 6 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 7 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 8 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 9 --><waypoint x="-3068" z="-8846" tag="funguspath"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 10 --><waypoint x="-3021" z="-8993"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 11 --><waypoint x="-3034" z="-9131"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 12 --><waypoint x="-3045" z="-9270"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 13 --><waypoint x="-3204" z="-9059"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 14 --><waypoint x="-3166" z="-8983"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 15 --><waypoint x="-3224" z="-8832"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end
if inventory:itemTotalCount(201171) > 4 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
end
</waypoint>
</waypoints>
The reason that i added
Code: Select all
<!-- # 8 --><waypoint x="-????" z="-????"></waypoint>
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
is that i tought with would result in a loop from waypoint 8 to 15 till it has the needed questitems.
Re: Help need to make questbot
Posted: Mon Aug 02, 2010 7:36 am
by rock5
bloodslain wrote:Code: Select all
<!-- # 15 --><waypoint x="-3224" z="-8832"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end
if inventory:itemTotalCount(201171) > 4 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
end
</waypoint>
I made a mistake. It's supposed to be
Code: Select all
if 5 > inventory:itemTotalCount(201171) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
end
Otherwise it looks like it should work. Now you just have to figure out what it does once it's finished.
Re: Help need to make questbot
Posted: Tue Aug 03, 2010 1:40 am
by xwhizzah
tryed to make the bot, still not working. No time to work on it today. i will puzzle some more on it tomorrow.
Ill let you know

Re: Help need to make questbot
Posted: Thu Aug 05, 2010 1:23 am
by xwhizzah
Hey rock, today i will work a bit on the bot

still havent got it to work. in the meantime iam studying your farmbot. and i have few questions again on what some things do
First at the <onload>
Code: Select all
<onLoad>
repeat questname=RoMScript("TEXT('Sys422343_name')"); yrest(500) until questname -- ie. "Sweet Milk"
repeat npcname=RoMScript("TEXT('Sys110789_name')"); yrest(500) until npcname -- ie. "Jessica Miller"
</onLoad>
1. What does those 2 lines do.
2. What does TEXT('Sys422343_name') stand for?
Where do you get the (112953,7000) value from?
and i also want to ask you for an favor

iam thinking about expiriment with the queststate function. Like you used here.
Code: Select all
<!-- # 2 --><waypoint x="4054" z="3353" tag="npc">
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if queststate == "complete" then
-- Complete quest
player:target_NPC(npcname);
sendMacro("CompleteQuest()"); yrest(2000);
-- Accept quest
player:target_NPC(npcname);
sendMacro("AcceptQuest()"); yrest(2000);
__WPL:setWaypointIndex(__WPL:findWaypointTag("npc"));
elseif queststate == "incomplete" then
-- Collect herb
inventory:update()
if 1 >= inventory:itemTotalCount(204788) then -- Get more herb
__WPL:setWaypointIndex(__WPL:findWaypointTag("get_herb"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("get_milk"));
end
So the favor iam asking you. could you make me example with the fungusquest

because the chickenquest is yet to hard for me to analyse hahahaha
Thnx in advance
Greetz
Blood
Re: Help need to make questbot
Posted: Thu Aug 05, 2010 2:07 am
by rock5
bloodslain wrote:Code: Select all
<onLoad>
repeat questname=RoMScript("TEXT('Sys422343_name')"); yrest(500) until questname -- ie. "Sweet Milk"
repeat npcname=RoMScript("TEXT('Sys110789_name')"); yrest(500) until npcname -- ie. "Jessica Miller"
</onLoad>
1. What does those 2 lines do.
2. What does TEXT('Sys422343_name') stand for?
Instead of saying questname ="Sweet Milk" and it only working in English clients, I used TEXT('Sys422343_name'). What this does is look up the ingame table of string variables (it's like a language file). That table is in the language of the client so it will successfully work in any language client.
bloodslain wrote:Where do you get the (112953,7000) value from?
To get the id of the object is easy. Just use rom/getid.lua and point at it with your mouse. The 7000 is 7 seconds. Just estimate how long it takes to collect and experiment until it works.
bloodslain wrote:So the favor iam asking you. could you make me example with the fungusquest

because the chickenquest is yet to hard for me to analyse hahahaha
There's no easy answer. For starters that script if for a repeatable quest and both accepts and completes a quest. What you need is to accept the quest and later on complete it. They wouldn't be in the same place in the script. Maybe if you explained the sequence of events you expect your script to take, I might be able to help you. And maybe explain why the previous scripts don't work.
Re: Help need to make questbot
Posted: Thu Aug 05, 2010 3:09 am
by xwhizzah
what i want to do is following. my previous waypoint ends up in front of the npc
at this point i want my bot to check if he accepted the quest if not accept it. then i want it to go to the fungus area and use 3 waypoints until quest is complete. if the quest isnt complete i want it to go to the first waypoint in the fungus area. if its complete i want to return to the questgiver.
The problem is i want to do 1 waypointfile for each quest. if i get more waypoints it would be an huge waypoint folder once i finished an few areas

Re: Help need to make questbot
Posted: Thu Aug 05, 2010 4:04 am
by xwhizzah
I made an new code, i cannot test while servers are offline

could you see into it if what i did is good. >.<
Code: Select all
<waypoints>
<!-- Quest 6 FUNGUS -->
<onLoad>
repeat questname="Report In"; yrest(500) until questname
repeat npcname="Jenna Miller"; yrest(500) until npcname
</onLoad>
<!-- # 1 --><waypoint x="-4054" z="-8282" tag="Main">
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if queststate == "complete" then
-- Complete quest
player:target_NPC(npcname); yrest(1000);
sendMacro("OnClick_QuestListButton(3,1)"); yrest(2000);
sendMacro("CompleteQuest()"); yrest(2000); sendMacro("CloseWindows()"); yrest(2000);
printf("completed quest report in in start waypoint");
loadPaths("Pioneers/quest7");
-- Accept quest
player:target_NPC(npcname); yrest(1000);
sendMacro("OnClick_QuestListButton(1, 1)"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000); printf("Accepted quest Report in");
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
elseif queststate == "incomplete" then
-- get questitems
__WPL:setWaypointIndex(__WPL:findWaypointTag("get questitems"))
else
-- Accept quest
player:target_NPC(npcname); yrest(1000);
sendMacro("OnClick_QuestListButton(1, 1)"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000); printf("Accepted quest Report in");
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
end
</waypoint>
<!-- # 2 --><waypoint x="-3808" z="8242"> __WPL:setForcedWaypointType("RUN")
</waypoint>
<!-- # 3 --><waypoint x="-3726" z="7959" tag="get questitems"> __WPL:setForcedWaypointType("TRAVEL")
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if queststate == "complete" then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
end
</waypoint>
<!-- # 4 --><waypoint x="-3726" z="7948">
repeat queststate = getQuestStatus(questname); yrest(500) until queststate
if queststate == "complete" then
__WPL:setWaypointIndex(__WPL:findWaypointTag("return"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("get questitems"))
end
</waypoint>
<!-- # 5 --><waypoint x="-3808" z="8242" tag="return"> __WPL:setForcedWaypointType("RUN")
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
</waypoint>
</waypoints>
Re: Help need to make questbot
Posted: Thu Aug 05, 2010 4:16 am
by rock5
bloodslain wrote:what i want to do is following. my previous waypoint ends up in front of the npc
at this point i want my bot to check if he accepted the quest if not accept it. then i want it to go to the fungus area and use 3 waypoints until quest is complete. if the quest isnt complete i want it to go to the first waypoint in the fungus area. if its complete i want to return to the questgiver.
The problem is i want to do 1 waypointfile for each quest. if i get more waypoints it would be an huge waypoint folder once i finished an few areas

I'll continue with our example above:
Code: Select all
<waypoints type="NORMAL">
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
<!-- # 1 --><waypoint x="-3697" z="-8683">
repeat queststate = getQuestStatus("Testing Your Skill"); yrest(500) until queststate
if queststate == "not accepted" then
player:target_NPC("Leighton");
sendMacro("OnClick_QuestListButton(1,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
end
</waypoint>
<!-- # 5 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 6 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 7 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 8 --><waypoint x="-????" z="-????"></waypoint>
<!-- # 9 --><waypoint x="-3068" z="-8846" tag="funguspath"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 10 --><waypoint x="-3021" z="-8993"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 11 --><waypoint x="-3034" z="-9131"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 12 --><waypoint x="-3045" z="-9270"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 13 --><waypoint x="-3204" z="-9059"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 14 --><waypoint x="-3166" z="-8983"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 15 --><waypoint x="-3224" z="-8832"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end
if 5 > inventory:itemTotalCount(201171) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
end
</waypoint>
...
Some points taking you back to lieghton
...
<!-- # xx --><waypoint x="-3697" z="-8683">
player:target_NPC("Leighton");
sendMacro("OnClick_QuestListButton(3,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
loadPaths("next_script");
</waypoint>
</waypoints>
I'm not sure if that is the correct quest name and I'm not sure of the options for OnClick_QuestListButton. Also I didin't check the quest state at the last point because it shouldn't need it.
I suspect, though, you want more than this. I suspect you want to bypass this quest if you have already done it. The problem is, if getQuestState returns "not accepted" it might be because it hasn't done the quest yet or it's already completed it. If this is what you are planning let me know and we'll think up some solutions.
Re: Help need to make questbot
Posted: Thu Aug 05, 2010 5:02 am
by xwhizzah
this seems to work, alltough one problem. at some point the bot stays at one waypoint and keep attacking the mobs there. i think its because of the fast and close respawns. this is at waypoint 7 is there a way to change the range the boss attacks the mobs inside the waypoint script?
Code: Select all
<waypoints type="NORMAL">
<onLoad>settings.profile.mobs = {"Fungus"};</onLoad>
<!-- # 1 --><waypoint x="-3699" z="-8676">
repeat queststate = getQuestStatus("Testing Your Skill"); yrest(500) until queststate
if queststate == "not accepted" then
player:target_NPC("Leighton");
sendMacro("OnClick_QuestListButton(1,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
end
</waypoint>
<!-- # 1 --><waypoint x="-3725" z="-8581"> </waypoint>
<!-- # 2 --><waypoint x="-3819" z="-8400"> </waypoint>
<!-- # 3 --><waypoint x="-3763" z="-8065"> </waypoint>
<!-- # 4 --><waypoint x="-3709" z="-7963"> </waypoint>
<!-- # 5 --><waypoint x="-3693" z="-7942" tag="funguspath"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 6 --><waypoint x="-3609" z="-7838"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 7 --><waypoint x="-3589" z="-7754"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 8 --><waypoint x="-3601" z="-7677"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 9 --><waypoint x="-3627" z="-7615"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 10 --><waypoint x="-3701" z="-7579"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 11 --><waypoint x="-3792" z="-7577"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 12 --><waypoint x="-3858" z="-7617"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 13 --><waypoint x="-3880" z="-7689"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 14 --><waypoint x="-3842" z="-7829"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end </waypoint>
<!-- # 15 --><waypoint x="-3731" z="-7963"> if inventory:itemTotalCount(201171) > 4 then __WPL:setForcedWaypointType("RUN") end
if 5 > inventory:itemTotalCount(201171) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("funguspath"));
end
</waypoint>
<!-- # 16 --><waypoint x="-3709" z="-7963"> </waypoint>
<!-- # 17 --><waypoint x="-3763" z="-8065"> </waypoint>
<!-- # 18 --><waypoint x="-3819" z="-8400"> </waypoint>
<!-- # 19 --><waypoint x="-3725" z="-8581"> </waypoint>
<!-- # 20 --><waypoint x="-3697" z="-8683">
player:target_NPC("Leighton");
sendMacro("OnClick_QuestListButton(3,1)"); yrest(2000);
sendMacro("AcceptQuest()"); yrest(2000);
sendMacro("CloseWindows()"); yrest(2000);
</waypoint>
</waypoints>
Re: Help need to make questbot
Posted: Thu Aug 05, 2010 5:31 am
by rock5
bloodslain wrote:this seems to work, alltough one problem. at some point the bot stays at one waypoint and keep attacking the mobs there. i think its because of the fast and close respawns. this is at waypoint 7 is there a way to change the range the boss attacks the mobs inside the waypoint script?
"the boss"?
You can change the max attack range with
Code: Select all
changeProfileOption("MAX_TARGET_DIST", 100)