Page 2 of 2
Re: Stopping 'cast' when clicking item.
Posted: Thu Dec 19, 2013 10:34 am
by rock5
There was a small bug in the quest functions fixed in revision 768. Have you done an SVN update recently?
Re: Stopping 'cast' when clicking item.
Posted: Sun Dec 22, 2013 7:08 am
by Lamkefyned
hello, and and updated to revision 770 but I still throwing an error but this is not lua.
Re: Stopping 'cast' when clicking item.
Posted: Sun Dec 22, 2013 7:24 am
by rock5
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">
Re: Stopping 'cast' when clicking item.
Posted: Sun Dec 22, 2013 7:27 am
by Bill D Cat
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">
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.
Re: Stopping 'cast' when clicking item.
Posted: Wed Dec 25, 2013 11:02 am
by Lamkefyned
at waypoint 8 is not working but as only I do with a character you can go in the onload?
Re: Stopping 'cast' when clicking item.
Posted: Thu Jan 09, 2014 9:15 am
by Ego95
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)
Rock, normally your solution should work, but it doesn't. 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
<!-- # 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.
Posted: Thu Jan 09, 2014 9:45 am
by rock5
AlterEgo95 wrote:normally your solution should work, but it doesn't.
What do you mean? Did it work before and now it doesn't anymore? If so, what changed since it worked?
AlterEgo95 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?
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 this
Code: Select all
repeat
yrest(200)
until 3 > player:getRemainingCastTime()
to
Code: Select all
local tmp
repeat
yrest(500)
tmp = player:getRemainingCastTime()
print(tmp)
until 3 > tmp
Re: Stopping 'cast' when clicking item.
Posted: Thu Jan 09, 2014 11:19 am
by BlubBlab
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.
Re: Stopping 'cast' when clicking item.
Posted: Thu Jan 09, 2014 11:24 am
by rock5
Make sure you don't still have an old version of my questlogclass userfunction installed.
Re: Stopping 'cast' when clicking item.
Posted: Thu Jan 09, 2014 11:28 am
by BlubBlab
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.
Re: Stopping 'cast' when clicking item.
Posted: Thu Jan 09, 2014 10:55 pm
by rock5
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
Re: Stopping 'cast' when clicking item.
Posted: Fri Jan 10, 2014 5:10 am
by rock5
@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)
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.
Re: Stopping 'cast' when clicking item.
Posted: Fri Jan 10, 2014 3:15 pm
by whitewiz
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
Re: Stopping 'cast' when clicking item.
Posted: Fri Jan 10, 2014 9:58 pm
by rock5
Both good points.

Re: Stopping 'cast' when clicking item.
Posted: Sat Jan 11, 2014 2:00 pm
by whitewiz
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
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>
Re: Stopping 'cast' when clicking item.
Posted: Sat Jan 11, 2014 10:23 pm
by rock5
Whitewiz please use code tags when pasting code (the "Code" button at the top of the edit window).
Re: Stopping 'cast' when clicking item.
Posted: Sun Jan 12, 2014 12:50 am
by Ego95
@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)
sorry for not answering. I have been very busy the last days. But this works great and is very reliable

Thank you
Re: Stopping 'cast' when clicking item.
Posted: Sun Jan 12, 2014 3:26 pm
by whitewiz
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.