Page 1 of 2
Lil help in making first waypoint
Posted: Thu Jul 03, 2014 9:03 am
by sauhard
Ok i need to make a waypoint in which my char accepts the quest, kills the required mobs to kill and then submits it back. and repeats.
So here is what i tried:
i went to rombot > rom/createpath.lua > went near the npc> seleceted new waypoint in the bot> then i selected the command to target npc> then i selecte the command to accept the quest.
That's where i am till now
idk how i make waypint for killing mobs
and if i do make then how will it check the enough mobs have been killed for completing quest?
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 1:09 am
by lisa
There is many ways to do what you want but I will point you to the "examples" that are part of the bot files.
The file in question can be found here
waypoints/1-10PioneersQuests/l1_fungus.xml
In that file you will see this code.
Code: Select all
if getQuestStatus(420666) == "complete" then __WPL:setForcedWaypointType("RUN") end
Firstly note the number (420666) that is the quest ID number, you would need to make sure to get the correct number for your quest.
That code checks if you have done enough for the quest to be able to hand in to NPC (complete) and then it sets the bot to "RUN" so it doesn't attack anymore mobs, it will still continue on the same waypoints.
Another example is in the file
waypoints/1-10PioneersQuests/l5-7_BeetleBatSpider.xml
Code: Select all
if getQuestStatus(420068) ~= "incomplete" and -- A Bit Worrying
getQuestStatus(420075) ~= "incomplete" then -- Gathering Spider Venom
__WPL:setWaypointIndex(__WPL:findWaypointTag("Beetles"))
end
So you can see that it is checking if both quests are complete ( not incomplete, double negative) and so if it has both quests possible to hand in to NPC then it tells the bot to go to a waypoint tag, "Beetles" which looks like this
Code: Select all
<!-- # 59 --><waypoint x="-2707" z="-6346" y="55" tag="Beetles"> </waypoint>
These are just 2 examples I have picked out for you, I suguest having a look in the waypoint files in that folder and seeing what the code does and go from there

Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 4:21 am
by sauhard
ok lisa i tried this a small step .
I am doing this daily in chrysalia. npc Shass Web.
What i managed to do is
accept quest
and get in to running.
The problem atm i am facing is the bot is not killing:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
</waypoint>
<!-- # 2 --><waypoint x="-5558" z="-15201" y="601"> </waypoint>
<!-- # 3 --><waypoint x="-5580" z="-15181" y="601"> </waypoint>
<!-- # 4 --><waypoint x="-5611" z="-15160" y="601"> </waypoint>
<!-- # 5 --><waypoint x="-5649" z="-15123" y="602"> </waypoint>
<!-- # 6 --><waypoint x="-5705" z="-15113" y="601">
player:harvest()
</waypoint>
<!-- # 7 --><waypoint x="-5561" z="-15163" y="600"> </waypoint>
<!-- # 8 --><waypoint x="-5548" z="-15202" y="600">
player:target_NPC(120678) -- Shass Webb
CompleteQuestByName(425473) -- Garon Funerals
</waypoint>
</waypoints>
So what the bot does is keeps moving in from starting to a lil further and comes back.
WIll try userfunction as you said after this killing problem gets solved

Ty for quick response though
What
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 7:14 am
by lisa
<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN" >
That is your issue right there, type set to run won't attack.
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 1:03 pm
by sauhard
Well i used travel but then it would not accept the quest and simply attack as the mobs are nearby
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 4:38 pm
by lisa
you don't want travel or run.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 8:32 pm
by rock5
Just to elaborate, not specifying a waypoint type, as Lisa suggests, makes it default to type "NORMAL" which is what you want.
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 11:23 pm
by sauhard
Well i ran it with all 3 Normal , Run. travel. But got something wrong. But meh i edited the profile so that i aggros only mobs i want to kill .
Well i got it running though.. I have put in the getqueststatus thingy though now. The problem i am having now is :
First , it is still not running back to npc when quest gets completed.
Second , after running it for sometimes the script converts into RUN. Like it no longer aggros mobs and kills them.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
</waypoint>
<!-- # 2 --><waypoint x="-5558" z="-15201" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 3 --><waypoint x="-5580" z="-15181" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 4 --><waypoint x="-5611" z="-15160" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 5 --><waypoint x="-5649" z="-15123" y="602">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 6 --><waypoint x="-5705" z="-15113" y="601">
player:harvest()
if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 7 --><waypoint x="-5561" z="-15163" y="600">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 8 --><waypoint x="-5548" z="-15202" y="600">
player:target_NPC(120678) -- Shass Webb
CompleteQuestByName(425473) -- Garon Funerals
</waypoint>
</waypoints>
Re: Lil help in making first waypoint
Posted: Fri Jul 04, 2014 11:48 pm
by rock5
I don't see anything stopping it from going back to the npc. It looks like it accepts the quest, visits about 5 waypoints then goes back to the npc.
When you change the waypoint type to "RUN", to speed up it's return to the npc, you have to change it back to "NORMAL" when you want it to attack again. So after accepting the quest add
Code: Select all
__WPL:setForcedWaypointType("NORMAL")
Re: Lil help in making first waypoint
Posted: Sat Jul 05, 2014 2:41 am
by sauhard
Ok i changed it to normal but then i get a new problem. SInce mobs spwan rate is insane fast so it now keeps on killing mobs and doens't talk to npc

Re: Lil help in making first waypoint
Posted: Sat Jul 05, 2014 3:31 am
by rock5
Where did you put the command I showed you? You should have left the rest of the waypoint file the way it was and just add that command just after accepting the quest. So unless the mobs spawn so fast that it never gets to the next waypoint, it should eventually go into run mode and run back.
Re: Lil help in making first waypoint
Posted: Sat Jul 05, 2014 7:54 am
by sauhard
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
</waypoint>
<!-- # 2 --><waypoint x="-5558" z="-15201" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 3 --><waypoint x="-5580" z="-15181" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 4 --><waypoint x="-5611" z="-15160" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 5 --><waypoint x="-5649" z="-15123" y="602">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 6 --><waypoint x="-5705" z="-15113" y="601">
player:harvest()
if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 7 --><waypoint x="-5561" z="-15163" y="600">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 8 --><waypoint x="-5548" z="-15202" y="600">
player:target_NPC(120678) -- Shass Webb
CompleteQuestByName(425473) -- Garon Funerals
</waypoint>
</waypoints>
Re: Lil help in making first waypoint
Posted: Sat Jul 05, 2014 7:56 am
by rock5
Go back to this version
http://www.solarstrike.net/phpBB3/viewt ... 678#p58678 and add that command after accepting the quest. Like this,
Code: Select all
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
__WPL:setForcedWaypointType("NORMAL") end
</waypoint>
Re: Lil help in making first waypoint
Posted: Mon Jul 07, 2014 2:14 am
by sauhard
Ok now i got a compilation error.
But what i want is
1)the bot should first target npc
2)Then check for acc/completing quest
3) Then Kill mobs
4) Then when completed shall return to npc
What is happening now is
1) Compilation error

2) Bot targets nearby mobs and kills them even without checking if quest is completed or not.Here is the script i used.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
__WPL:setForcedWaypointType("NORMAL") end
</waypoint>
<!-- # 2 --><waypoint x="-5558" z="-15201" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 3 --><waypoint x="-5580" z="-15181" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 4 --><waypoint x="-5611" z="-15160" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 5 --><waypoint x="-5649" z="-15123" y="602">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 6 --><waypoint x="-5705" z="-15113" y="601">
player:harvest()
if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 7 --><waypoint x="-5561" z="-15163" y="600">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 8 --><waypoint x="-5548" z="-15202" y="600">
player:target_NPC(120678) -- Shass Webb
CompleteQuestByName(425473) -- Garon Funerals
</waypoint>
</waypoints>
Re: Lil help in making first waypoint
Posted: Mon Jul 07, 2014 2:35 am
by ZZZZZ
sauhard wrote:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
__WPL:setForcedWaypointType("NORMAL") end
</waypoint>
That end should not be there. There is no
if statement.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
__WPL:setForcedWaypointType("NORMAL");
</waypoint>
Re: Lil help in making first waypoint
Posted: Mon Jul 07, 2014 2:47 am
by rock5
Sorry I accidentally copied the "end" after the command I added. Really? You didn't see that?
Assuming you can go directly from waypoint 7 to waypoint 2, what you could do is this at waypoint 7.
Code: Select all
<!-- # 7 --><waypoint x="-5561" z="-15163" y="600">
if getQuestStatus(425473) == "complete" then
__WPL:setForcedWaypointType("RUN")
else
__WPL:setWaypointIndex(2)
end
</waypoint>
What this does is repeat waypoints 2 to 7 until the quest is complete. Then it goes to the npc.
Re: Lil help in making first waypoint
Posted: Mon Jul 07, 2014 3:29 am
by lisa
sauhard wrote:Bot targets nearby mobs and kills them even without checking if quest is completed or not.Here is the script i used.
Is micromacro printing that it is going to a waypoint or does it just keep killing and killing.
If there are many mobs for it to kill then it may never go to the next waypoint, if that is the case you may need to use the profile event onleavecombat.
Re: Lil help in making first waypoint
Posted: Tue Jul 08, 2014 11:33 am
by sauhard
Ok now i am using this.. But i am still have the same problem.. even if the quest gets completed, the bot continues targeting mobs and kills them and is not going to npc as it should after killing 10 mobs.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="-5550" z="-15213" y="601">
player:target_NPC(120678) -- Shass Webb
AcceptQuestByName(425473) -- Garon Funerals
__WPL:setForcedWaypointType("NORMAL")
</waypoint>
<!-- # 2 --><waypoint x="-5558" z="-15201" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 3 --><waypoint x="-5580" z="-15181" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 4 --><waypoint x="-5611" z="-15160" y="601">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 5 --><waypoint x="-5649" z="-15123" y="602">if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 6 --><waypoint x="-5705" z="-15113" y="601">
player:harvest()
if getQuestStatus(425473) == "complete" then __WPL:setForcedWaypointType("RUN") end
</waypoint>
<!-- # 7 --><waypoint x="-5561" z="-15163" y="600">
if getQuestStatus(425473) == "complete" then
__WPL:setForcedWaypointType("RUN")
else
__WPL:setWaypointIndex(2)
end
</waypoint>
<!-- # 8 --><waypoint x="-5548" z="-15202" y="600">
player:target_NPC(120678) -- Shass Webb
CompleteQuestByName(425473) -- Garon Funerals
</waypoint>
</waypoints>
Re: Lil help in making first waypoint
Posted: Tue Jul 08, 2014 12:09 pm
by rock5
So when it reaches waypoint 7 it's skipping waypoint 8 and 1 and going directly to waypoint 2, even though the quest is complete?
Re: Lil help in making first waypoint
Posted: Tue Jul 08, 2014 12:27 pm
by sauhard
yep.