Stopping 'cast' when clicking item.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#21 Post by rock5 » Thu Dec 19, 2013 10:34 am

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

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: Stopping 'cast' when clicking item.

#22 Post by Lamkefyned » Sun Dec 22, 2013 7:08 am

hello, and and updated to revision 770 but I still throwing an error but this is not lua.
Sin título.png
Daily-Sarlo-Top Flight Chef.xml
(1.96 KiB) Downloaded 200 times
If you think something is right just because everyone else believes,you're not thinking.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#23 Post by rock5 » Sun Dec 22, 2013 7:24 am

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

User avatar
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.

#24 Post by Bill D Cat » Sun Dec 22, 2013 7:27 am

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.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: Stopping 'cast' when clicking item.

#25 Post by Lamkefyned » Wed Dec 25, 2013 11:02 am

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.

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Stopping 'cast' when clicking item.

#26 Post by Ego95 » Thu Jan 09, 2014 9:15 am

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>

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#27 Post by rock5 » Thu Jan 09, 2014 9:45 am

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
  • 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

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Stopping 'cast' when clicking item.

#28 Post by BlubBlab » Thu Jan 09, 2014 11:19 am

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 :D

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#29 Post by rock5 » Thu Jan 09, 2014 11:24 am

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

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Stopping 'cast' when clicking item.

#30 Post by BlubBlab » Thu Jan 09, 2014 11:28 am

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.
Jack-of-all-trades, but master-of-only of a few :D

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#31 Post by rock5 » Thu Jan 09, 2014 10:55 pm

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
  • 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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#32 Post by rock5 » Fri Jan 10, 2014 5:10 am

@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.
  • 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

whitewiz
Posts: 11
Joined: Fri Jan 10, 2014 2:36 pm

Re: Stopping 'cast' when clicking item.

#33 Post by whitewiz » Fri Jan 10, 2014 3:15 pm

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#34 Post by rock5 » Fri Jan 10, 2014 9:58 pm

Both good points. :)
  • 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

whitewiz
Posts: 11
Joined: Fri Jan 10, 2014 2:36 pm

Re: Stopping 'cast' when clicking item.

#35 Post by whitewiz » Sat Jan 11, 2014 2:00 pm

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>
Attachments
DailySarlo-TopFlightChef-v2.xml
(1.02 KiB) Downloaded 189 times

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stopping 'cast' when clicking item.

#36 Post by rock5 » Sat Jan 11, 2014 10:23 pm

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

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Stopping 'cast' when clicking item.

#37 Post by Ego95 » Sun Jan 12, 2014 12:50 am

@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

whitewiz
Posts: 11
Joined: Fri Jan 10, 2014 2:36 pm

Re: Stopping 'cast' when clicking item.

#38 Post by whitewiz » Sun Jan 12, 2014 3:26 pm

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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests