I've been trying to make what I thought would be a simple bot for me, but no.... not for the life of me can I do it.
All I need it to do is this:
1: Select NPC (done)
2: Select quest
3: Accept quest
4: Move to required NPC (done)
5: Select Required NPC (done)
6: Use item on selected NPC
7: Wait ~10 seconds
8: Move to next required NPC with same name
9: Use the same item in step 6
I then have to repeat the NPC selecting and item using another 3 times but I can do that when I know how to do these 9 steps.
Thanks
I'd really appreciate some help here please.
Re: I'd really appreciate some help here please.
2/3
6 Depends on the steps you need to take. I'm going to assume you use the item then click the target
7
8 use "rom/createpath" to create waypoints to travel.
9 Work it out using 6.
Code: Select all
CompleteQuestByName("quest name")Code: Select all
inventory:useItem("item name")
player:target_NPC("npc name")Code: Select all
yrest(10000) -- in ms9 Work it out using 6.
- 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.”
- Ronald Reagan
Re: I'd really appreciate some help here please.
You my sir, are a f*****g star. Thank you very much
Re: I'd really appreciate some help here please.
OK, Little progress. Here is the script I have now. I've simplified it by making it so my character only has to use the item on the same NPC as each NPC moves away from their co-ords for a few seconds.
What happens now: Character opens quest giver NPC but doesn't accept quest, then moves over to other NPC location but doesn't select it, then moves back over to the quest giver NPC and repeats...
Any ideas?
EDIT 2: I have it doing everything I want apart from selecting the second NPC and using the required item.
What happens now: Character opens quest giver NPC but doesn't accept quest, then moves over to other NPC location but doesn't select it, then moves back over to the quest giver NPC and repeats...
Any ideas?
EDIT 2: I have it doing everything I want apart from selecting the second NPC and using the required item.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="5150" z="3991" y="1421"> player:target_NPC("Clarence Ferrous");
AcceptQuestByName("Resisting the Outside Threat")
</waypoint>
<!-- # 2 --><waypoint x="5209" z="4017" y="1417"> player:target_NPC("Front Line Camp Guard");
</waypoint>
inventory:useItem("Magic Shield Potion")
yrest(13000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(13000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(13000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(13000) -- in ms
inventory:useItem("Magic Shield Potion")
<!-- # 3 --><waypoint x="5150" z="3991" y="1421"> player:target_NPC("Clarence Ferrous");
CompleteQuestByName("Resisting the Outside Threat")
</waypoint>
</waypoints>Re: I'd really appreciate some help here please.
OK, I have it now. Could may be do with some more tweaking but it's running flawlessly right now.
What do you think?
What do you think?
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="5150" z="3991" y="1421"> player:target_NPC("Clarence Ferrous");
AcceptQuestByName("Resisting the Outside Threat")
</waypoint>
<!-- # 2 --><waypoint x="5209" z="4017" y="1417"> player:target_NPC("Front Line Camp Guard");
yrest(1000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(16000) -- in ms
player:target_NPC("Front Line Camp Guard");
yrest(1000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(16000) -- in ms
player:target_NPC("Front Line Camp Guard");
yrest(1000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(16000) -- in ms
player:target_NPC("Front Line Camp Guard");
yrest(1000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(16000) -- in ms
player:target_NPC("Front Line Camp Guard")
yrest(1000) -- in ms;
inventory:useItem("Magic Shield Potion")
yrest(6000) -- in ms
</waypoint>
<!-- # 3 --><waypoint x="5150" z="3991" y="1421"> player:target_NPC("Clarence Ferrous");
CompleteQuestByName("Resisting the Outside Threat")
</waypoint>
</waypoints>
Re: I'd really appreciate some help here please.
I usually try to avoid having a 'accept' waypoint and a separate 'complete' waypoint. What happens if you have to restart the script and you currently have completed the quest and need to turn it in. If you start the script while standing near the npc there is no guarantee which waypoint it will start at, the first or the last. If it start at the first then it will try to accept and then go to the guards. I usually just have 1 waypoint that tries to complete first then accepts.
I usually like to make sure a quest is complete before going back to the npc and I like to put repetative tasks in a loop so I would do
Lastly you might want the script to stop when you run out of dailies. So I would change the first waypoint to
Code: Select all
<!-- # 1 --><waypoint x="5150" z="3991" y="1421"> player:target_NPC("Clarence Ferrous");
CompleteQuestByName("Resisting the Outside Threat")
AcceptQuestByName("Resisting the Outside Threat")
</waypoint> Code: Select all
while getQuestStatus("Resisting the Outside Threat") == "incomplete" do
player:target_NPC("Front Line Camp Guard");
yrest(1000) -- in ms
inventory:useItem("Magic Shield Potion")
yrest(16000) -- in ms
endCode: Select all
<!-- # 1 --><waypoint x="5150" z="3991" y="1421"> player:target_NPC("Clarence Ferrous");
CompleteQuestByName("Resisting the Outside Threat")
if RoMScript("Daily_count()") > 9 then error("Finished Dailys") end
AcceptQuestByName("Resisting the Outside Threat")
</waypoint> - 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.”
- Ronald Reagan