Stopping 'cast' when clicking item.
Re: Stopping 'cast' when clicking item.
There was a small bug in the quest functions fixed in revision 768. Have you done an SVN update recently?
- 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.
hello, and and updated to revision 770 but I still throwing an error but this is not lua.
If you think something is right just because everyone else believes,you're not thinking.
Re: Stopping 'cast' when clicking item.
You've duplicated this line. Delete one.
Code: Select all
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
- 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.
More specifically, the first line does not have a corresponding </waypoint> tag to close it, that's what caused the error. But having two tags with the same label would cause problems even if it was there.rock5 wrote:You've duplicated this line. Delete one.Code: Select all
<!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily"> <!-- # 8 --><waypoint x="-18547" z="-2824" y="805" tag="StartDaily">
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: Stopping 'cast' when clicking item.
at waypoint 8 is not working but as only I do with a character you can go in the onload?
If you think something is right just because everyone else believes,you're not thinking.
Re: Stopping 'cast' when clicking item.
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)
Code: Select all
<!-- # 9 --><waypoint x="-18512" z="-2820">
repeat
queststate = getQuestStatus("Meisterkoch","Daily")
if queststate == "incomplete" then
player:target_NPC("122170")
yrest(1000)
repeat
yrest(200)
until 3 > player:getRemainingCastTime()
keyboardPress(key.VK_DOWN)
yrest(200)
end
until queststate == "complete"
</waypoint>
Re: Stopping 'cast' when clicking item.
What do you mean? Did it work before and now it doesn't anymore? If so, what changed since it worked?AlterEgo95 wrote:normally your solution should work, but it doesn't.
Looks like it should step back when there is 3s remaining. Maybe you could add some prints to see what's going on. Try changing thisAlterEgo95 wrote: It is an 8 second cast and it takes a step backwards, when the cast reaches 6 seconds. The castbar counts down from 8 to 0. So it already steps backwards after 2 seconds. Or is anything else wrong in this code?
Code: Select all
repeat
yrest(200)
until 3 > player:getRemainingCastTime()
Code: Select all
local tmp
repeat
yrest(500)
tmp = player:getRemainingCastTime()
print(tmp)
until 3 > tmp
- 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.
Because I see this I have with rev 770 & Quest a problem. The bot say the Quest is complete when it isn't. If I ask again the bot know the right answer I don't know what cause this.
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Stopping 'cast' when clicking item.
Make sure you don't still have an old version of my questlogclass userfunction installed.
- 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.
I did update the function and when I do an quest:update() before I ask got the right answer but when I do it directly It is like I said.
The bot first thinks quest is complete ask again it know the right answer.
Okay to explain how I realized it I used this script http://www.solarstrike.net/phpBB3/viewt ... fly#p45920
To be short the char should be mount when the quest is finished in the garden to do that it check the quest on multiple spots . The bot does it at the first possible spot(this is wrong) then attack the next butterfly(unmount) and go on until quest is finished and then mount like it should.
I did make a test print to make sure what happening
The bot insist that the quest is finished at the first try.
The bot first thinks quest is complete ask again it know the right answer.
Okay to explain how I realized it I used this script http://www.solarstrike.net/phpBB3/viewt ... fly#p45920
To be short the char should be mount when the quest is finished in the garden to do that it check the quest on multiple spots . The bot does it at the first possible spot(this is wrong) then attack the next butterfly(unmount) and go on until quest is finished and then mount like it should.
I did make a test print to make sure what happening
![Confused :?](./images/smilies/icon_e_confused.gif)
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Stopping 'cast' when clicking item.
So I'm guessing if you used quest:update() then you are[/] using my questlogclass userfunction. So is it up to date? The current version is 0.06.
http://www.solarstrike.net/phpBB3/viewt ... 676#p40676
http://www.solarstrike.net/phpBB3/viewt ... 676#p40676
- 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.
@AlterEgo95
Looks like player:getRemainingCastTime() is only for skills. Player.Casting still works but only returns true or false. If you know how long the cast is you could do something like this.In this example it waits till it starts casting then waits 6 seconds and steps back. So for a cast time of 8 seconds it should move with less than 2s remaining.
Looks like player:getRemainingCastTime() is only for skills. Player.Casting still works but only returns true or false. If you know how long the cast is you could do something like this.
Code: Select all
player:target_NPC(122170)
repeat
yrest(200)
player:updateCasting()
until player.Casting
yrest(6000)
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
Re: Stopping 'cast' when clicking item.
i believe your problem with not accepting the quest lies here. the AcceptQuest is inside an IF statement.. Move it below the end and it will work.
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
you also have a small problem with too many waypoints.
if you start the script and your character is closer to waypoint 10, it also will not accept because that function is in waypoint 9
just my 2 cents
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
you also have a small problem with too many waypoints.
if you start the script and your character is closer to waypoint 10, it also will not accept because that function is in waypoint 9
just my 2 cents
Re: Stopping 'cast' when clicking item.
Both good points. ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
- 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.
Made some modifications to the code:
added a routine to get more eggs if you run out
removed code to use daily tickets, add back in if you need it
added a routine to get more eggs if you run out
removed code to use daily tickets, add back in if you need it
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="-18547" z="-2824" y="805">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if dailyQuestCount == 10 then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Done|r')")
error("Dailies done",2)
end
player:target_NPC(122168)
AcceptQuestByName(426333)
repeat
yrest(200)
player:target_NPC("Idle Campfire")
yrest(4500)
keyboardPress(key.VK_DOWN)
yrest(200)
keyboardPress(key.VK_DOWN)
if inventory:itemTotalCount("To-be-grilled Hardhorn Egg") == 0 then
player:target_NPC(122168)
ChoiceOptionByName(getTEXT("SC_Z24Q426168_01")) -- 'I need more eggs.'
end
until getQuestStatus("Top-Flight Chef","Daily") == "complete"
player:target_NPC("Madison Mull")
CompleteQuestByName("Top-Flight Chef","Daily")
</waypoint>
</waypoints>
- Attachments
-
- DailySarlo-TopFlightChef-v2.xml
- (1.02 KiB) Downloaded 189 times
Re: Stopping 'cast' when clicking item.
Whitewiz please use code tags when pasting code (the "Code" button at the top of the edit window).
- 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.
sorry for not answering. I have been very busy the last days. But this works great and is very reliable@AlterEgo95
Looks like player:getRemainingCastTime() is only for skills. Player.Casting still works but only returns true or false. If you know how long the cast is you could do something like this.
Code: Select all
player:target_NPC(122170) repeat yrest(200) player:updateCasting() until player.Casting yrest(6000) keyboardPress(key.VK_DOWN) yrest(200)
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: Stopping 'cast' when clicking item.
the v2 code will run 10 dailies without user intervention. On my druid it will not exit the code when 10 dailies are complete but on other characters it will. Just an odd thing.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests