Stopping 'cast' when clicking item.
Stopping 'cast' when clicking item.
Im trying to make a waypoint for an easy daily in Sarlo zone.
For this daily you need to click a campfire 5 times to get 5 grilled eggs.
When you click the campfire a 8 second 'cast' wil start. That 'cast' needs to be interupted by movement after 5 seconds otherwise you dont get a good grilled egg.
Manually its easy, click campfire and after about 5sec move char and its done. Repeat 4 times.
With the bot clicking the campfire i can do with: player:target_Object("Idle Campfire")
However i cant get that 8 second 'cast' to stop. It seems execution of code is stopped while that 'cast' is running.
Any thought how this could be fixed?
The daily is at NPC Madison Mull. You get it after you done 2 normal quests, the daily is called Top-Flight Chef.
For this daily you need to click a campfire 5 times to get 5 grilled eggs.
When you click the campfire a 8 second 'cast' wil start. That 'cast' needs to be interupted by movement after 5 seconds otherwise you dont get a good grilled egg.
Manually its easy, click campfire and after about 5sec move char and its done. Repeat 4 times.
With the bot clicking the campfire i can do with: player:target_Object("Idle Campfire")
However i cant get that 8 second 'cast' to stop. It seems execution of code is stopped while that 'cast' is running.
Any thought how this could be fixed?
The daily is at NPC Madison Mull. You get it after you done 2 normal quests, the daily is called Top-Flight Chef.
Re: Stopping 'cast' when clicking item.
Try target_NPC
Code: Select all
player:target_NPC("Idle Campire")
yrest(6000)
- 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: Stopping 'cast' when clicking item.
Rock5, any idea how to code action like "keypressed Backward", like char is going backwards, i just want to interupt cast, initiated by "player:target_NPC("Idle Campire")". , because player:moveTo() makes char to turn viewpoint at direction of coordinates, and i do not want to do that, need to interupt cast only
Re: Stopping 'cast' when clicking item.
Code: Select all
keyboardPress(key.VK_S)
- 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: Stopping 'cast' when clicking item.
works like charm, thx a lot again Rock
Re: Stopping 'cast' when clicking item.
I ended up with this waypoint file. It starts from housemaid.
If you have problems getting the good eggs try adjusting the yrest values in waypoint 9.
Only thing I dont understand is why it tries to click the campfire 1 more time after the daily is done, but i can live with a few sec delay
If you have problems getting the good eggs try adjusting the yrest values in waypoint 9.
Only thing I dont understand is why it tries to click the campfire 1 more time after the daily is done, but i can live with a few sec delay
- Attachments
-
- Daily-Sarlo-Top Flight Chef.xml
- (1.65 KiB) Downloaded 191 times
Re: Stopping 'cast' when clicking item.
It's probably because there might be a small delay before it registers that the action is complete, so it ends up looping one last time. You could add a pause after each action but then each loop will take longer so it might not save you any time anyway.
If you want to make the timing of the movement better, you can actually check the remaining time on the casting bar. Eg.
If you want to make the timing of the movement better, you can actually check the remaining time on the casting bar. Eg.
Code: Select all
player:target_NPC("Idle Campfire")
yrest(1000)
repeat
yrest(200)
until 3 > player:getRemainingCastTime() -- Less than 3s on castbar
keyboardPress(key.VK_DOWN)
yrest(200)
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
hi, how I can put that lame "repeat daily tiquet" when you finish 10 daily mission
If you think something is right just because everyone else believes,you're not thinking.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
You can go as well?
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
settings.profile.options.WAYPOINT_DEVIATION = 5
settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
<!-- # 1 --><waypoint x="-18048" z="-2706" y="797"> </waypoint>
<!-- # 2 --><waypoint x="-18162" z="-2663" y="792"> </waypoint>
<!-- # 3 --><waypoint x="-18261" z="-2692" y="787"> </waypoint>
<!-- # 4 --><waypoint x="-18323" z="-2722" y="783"> </waypoint>
<!-- # 5 --><waypoint x="-18392" z="-2774" y="775"> </waypoint>
<!-- # 6 --><waypoint x="-18450" z="-2814" y="787"> </waypoint>
<!-- # 7 --><waypoint x="-18490" z="-2832" y="799"> </waypoint>
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
player:target_NPC(122168)
AcceptQuestByName(426333)
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
</waypoint>
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus(426333)
if queststate == "incomplete" then
yrest(200)
player:target_NPC(122170)
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
end
until queststate == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-18531" z="-2823">
player:target_NPC(122168)
CompleteQuestByName(426333)
__WPL:setWaypointIndex(__WPL:findWaypointTag("StartDaily"))
</waypoint>
</waypoints>
================>>>>>>>>>>>>>>>> This is correct?
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
settings.profile.options.WAYPOINT_DEVIATION = 5
settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
<!-- # 1 --><waypoint x="-18048" z="-2706" y="797"> </waypoint>
<!-- # 2 --><waypoint x="-18162" z="-2663" y="792"> </waypoint>
<!-- # 3 --><waypoint x="-18261" z="-2692" y="787"> </waypoint>
<!-- # 4 --><waypoint x="-18323" z="-2722" y="783"> </waypoint>
<!-- # 5 --><waypoint x="-18392" z="-2774" y="775"> </waypoint>
<!-- # 6 --><waypoint x="-18450" z="-2814" y="787"> </waypoint>
<!-- # 7 --><waypoint x="-18490" z="-2832" y="799"> </waypoint>
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
player:target_NPC(122168)
AcceptQuestByName(426333)
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
</waypoint>
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus(426333)
if queststate == "incomplete" then
yrest(200)
player:target_NPC(122170)
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
end
until queststate == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-18531" z="-2823">
player:target_NPC(122168)
CompleteQuestByName(426333)
__WPL:setWaypointIndex(__WPL:findWaypointTag("StartDaily"))
</waypoint>
</waypoints>
================>>>>>>>>>>>>>>>> This is correct?
If you think something is right just because everyone else believes,you're not thinking.
Re: Stopping 'cast' when clicking item.
AcceptQuestByName should be after the green bit.
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
200 tickets and now I have to spend.
Thank you
Thank you
If you think something is right just because everyone else believes,you're not thinking.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
Error
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
settings.profile.options.WAYPOINT_DEVIATION = 5
settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
<!-- # 1 --><waypoint x="-18048" z="-2706" y="797"> </waypoint>
<!-- # 2 --><waypoint x="-18162" z="-2663" y="792"> </waypoint>
<!-- # 3 --><waypoint x="-18261" z="-2692" y="787"> </waypoint>
<!-- # 4 --><waypoint x="-18323" z="-2722" y="783"> </waypoint>
<!-- # 5 --><waypoint x="-18392" z="-2774" y="775"> </waypoint>
<!-- # 6 --><waypoint x="-18450" z="-2814" y="787"> </waypoint>
<!-- # 7 --><waypoint x="-18490" z="-2832" y="799"> </waypoint>
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
player:target_NPC(122168)
AcceptQuestByName(426333)
</waypoint>
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus(426333)
if queststate == "incomplete" then
yrest(200)
player:target_NPC(122170)
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
end
until queststate == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-18531" z="-2823">
player:target_NPC(122168)
CompleteQuestByName(426333)
__WPL:setWaypointIndex(__WPL:findWaypointTag("StartDaily"))
</waypoint>
</waypoints>
If you think something is right just because everyone else believes,you're not thinking.
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: Stopping 'cast' when clicking item.
Missing and "end" command at the end of waypoint #8.
Code: Select all
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
player:target_NPC(122168)
AcceptQuestByName(426333)
end <-- MISSING -->
</waypoint>
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
hello, works well but not gets the daily mission and not know why.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
settings.profile.options.WAYPOINT_DEVIATION = 5
settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
<!-- # 1 --><waypoint x="-18048" z="-2706" y="797"> </waypoint>
<!-- # 2 --><waypoint x="-18162" z="-2663" y="792"> </waypoint>
<!-- # 3 --><waypoint x="-18261" z="-2692" y="787"> </waypoint>
<!-- # 4 --><waypoint x="-18323" z="-2722" y="783"> </waypoint>
<!-- # 5 --><waypoint x="-18392" z="-2774" y="775"> </waypoint>
<!-- # 6 --><waypoint x="-18450" z="-2814" y="787"> </waypoint>
<!-- # 7 --><waypoint x="-18490" z="-2832" y="799"> </waypoint>
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
player:target_NPC(122168)
AcceptQuestByName(426333)
end
</waypoint>
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus(426333)
if queststate == "incomplete" then
yrest(200)
player:target_NPC(122170)
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
end
until queststate == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-18531" z="-2823">
player:target_NPC(122168)
CompleteQuestByName(426333)
__WPL:setWaypointIndex(__WPL:findWaypointTag("StartDaily"))
</waypoint>
</waypoints>
If you think something is right just because everyone else believes,you're not thinking.
Re: Stopping 'cast' when clicking item.
I can find 2 quests with the name of "Top-Flight Chef"; 426333 and 426338. Maybe one is a prequest and the other is the actual daily. Maybe you have the wrong id.
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
and if I put it in an onload?
If you think something is right just because everyone else believes,you're not thinking.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
settings.profile.options.WAYPOINT_DEVIATION = 5
settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
<!-- # 1 --><waypoint x="-18048" z="-2706" y="797"> </waypoint>
<!-- # 2 --><waypoint x="-18162" z="-2663" y="792"> </waypoint>
<!-- # 3 --><waypoint x="-18261" z="-2692" y="787"> </waypoint>
<!-- # 4 --><waypoint x="-18323" z="-2722" y="783"> </waypoint>
<!-- # 5 --><waypoint x="-18392" z="-2774" y="775"> </waypoint>
<!-- # 6 --><waypoint x="-18450" z="-2814" y="787"> </waypoint>
<!-- # 7 --><waypoint x="-18490" z="-2832" y="799"> </waypoint>
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
player:target_NPC(122168)
AcceptQuestByName(426333)
</waypoint>
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus(426333)
if queststate == "incomplete" then
yrest(200)
player:target_NPC(122170)
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
end
until queststate == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-18531" z="-2823">
player:target_NPC(122168)
CompleteQuestByName(426333)
yrest(200)
__WPL:setWaypointIndex(__WPL:findWaypointTag("StartDaily"))
</waypoint>
</waypoints>
<onLoad>
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434)
end
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
if 10 == dailyQuestCount then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
settings.profile.options.WAYPOINT_DEVIATION = 5
settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
<!-- # 1 --><waypoint x="-18048" z="-2706" y="797"> </waypoint>
<!-- # 2 --><waypoint x="-18162" z="-2663" y="792"> </waypoint>
<!-- # 3 --><waypoint x="-18261" z="-2692" y="787"> </waypoint>
<!-- # 4 --><waypoint x="-18323" z="-2722" y="783"> </waypoint>
<!-- # 5 --><waypoint x="-18392" z="-2774" y="775"> </waypoint>
<!-- # 6 --><waypoint x="-18450" z="-2814" y="787"> </waypoint>
<!-- # 7 --><waypoint x="-18490" z="-2832" y="799"> </waypoint>
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
player:target_NPC(122168)
AcceptQuestByName(426333)
</waypoint>
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus(426333)
if queststate == "incomplete" then
yrest(200)
player:target_NPC(122170)
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
end
until queststate == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-18531" z="-2823">
player:target_NPC(122168)
CompleteQuestByName(426333)
yrest(200)
__WPL:setWaypointIndex(__WPL:findWaypointTag("StartDaily"))
</waypoint>
</waypoints>
If you think something is right just because everyone else believes,you're not thinking.
Re: Stopping 'cast' when clicking item.
The onload is run only when the file is loaded so that's no good. That code needs to run between completing the quest and accepting it again.
- 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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: Stopping 'cast' when clicking item.
You can define it as a function inside the onload section and then call it from inside a waypoint. But as rock5 said, the code in the onload section only gets run when the waypoint is first loaded UNLESS it is a function that is called later from a waypoint.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
is that it does not accept the mission
If you think something is right just because everyone else believes,you're not thinking.
Who is online
Users browsing this forum: No registered users and 1 guest