CompleteQuestByName Question

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

CompleteQuestByName Question

#1 Post by McGuffin »

This is my code...

Code: Select all

    player:target_NPC("120578");
    yrest(500);
    CompleteQuestByName(425504)
    yrest(500);
This is to turn in the Last Luck Daily. The bot targets correctly, then completes the quest, then re-targets the NPC and will not release. If I manually close the NPC quest window it just re-targets. If I close the bot, then restart the WP it will target the NPC but then say it can not find the quest Last Luck, which it would not since it has been completed. There is also a Last Luck public quest which you must have in order to accept the Daily. Not sure if CompleteQuestByName is getting hung up on the EoJ quest with the same name but different ID (425490). I have also tried using...

Code: Select all

sendMacro("SpeakFrame_ListDialogOption(1, 2)")
and

Code: Select all

sendMacro("ChoiceOption(2);");
Both do nothing. Any suggestions?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: CompleteQuestByName Question

#2 Post by lisa »

Code: Select all

AcceptQuestByName(questname,questtype)
CompleteQuestByName(questname,questtype)
questtype is "daily" or "public"

example

Code: Select all

AcceptQuestByName("Extinguish","public")
BTW for the quest you might want to use

Code: Select all

getTEXT("Sys425504_name")

Code: Select all

CompleteQuestByName(getTEXT("Sys425504_name"),"daily")
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#3 Post by McGuffin »

lisa wrote:

Code: Select all

AcceptQuestByName(questname,questtype)
CompleteQuestByName(questname,questtype)
questtype is "daily" or "public"
Thanks bunches. Will fire off a reset and give it a run through shortly.

Just ran a test and unfortunately it did not work. The quest completed as before, however, the bot is still locked into targeting the NPC. Manually closing the NPC Quest Completion window just causes the bot to target again and bring it back up and does not move forward in the WP file.

Clarification, it is bringing up the normal quest completion window when one targets the NPC as I still have the public quest active.
lisa wrote:BTW for the quest you might want to use

Code: Select all

getTEXT("Sys425504_name")

Code: Select all

CompleteQuestByName(getTEXT("Sys425504_name"),"daily")
And thanks for this. I can imagine it will be very helpful in the new area next Tuesday/Wednesday/whenever the patch finishes. Very nice explanation of it here for those interested...

http://www.solarstrike.net/phpBB3/viewt ... 848#p48848
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#4 Post by McGuffin »

OK, even more clarification. When the quest completes, it is not opening the normal NPC dialog box. It is opening the NPC quest offer for Last Luck Daily. Last Luck (Arrowheads) is only, technically, available by right clicking the Arrowhead and accepting the quest from the pop up. Do it once for the Public quest, and once you have the public quest, do it again for the daily.

Here is the pic of the screen that is popped up. I can manually close it but it comes right back up. I can not accept the quest or Leave Conversation. Also, note that the slider bar is down. I had to be quick with the screen gab because the slide bar keeps popping back to the top every second.

Image


When using player:target_NPC does it hit the NPC twice? I ask because on another character I am using Daily Notes to complete the quest. All I have to do is target the NPC that gives and accepts the quest once and the the quest is given and completed. I have Daily Notes turned off for the character doing Arrows though.


ETA: Here is the code I am now using and manually completing the quest...

Code: Select all

    player:target_NPC("Myan Kellas");
    yrest(6000);
    --CompleteQuestByName(getTEXT("Sys425504_name"),"daily")
    --yrest(1000);
When I complete it manually, still using the bot to target the NPC, the window does not pop up again.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: CompleteQuestByName Question

#5 Post by rock5 »

I went and had a look. That pic looks like it bugged. That looks like the screen you would see if you still hadn't completed the quest, ie. didn't have 10 arrowheads.

Does it happen every time or does it work for awhile?
  • 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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#6 Post by McGuffin »

Only happens when the bot completes the quest, either the way I initially did it or the way Lisa suggested. If I have the bot target the NPC and I then complete the quest it works just fine.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: CompleteQuestByName Question

#7 Post by rock5 »

McGuffin wrote: If I have the bot target the NPC and I then complete the quest it works just fine.
Why, how were you trying to complete the quest without selecting the npc?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: CompleteQuestByName Question

#8 Post by lisa »

There is another topic about the arrowhead public, maybe the answer is in that topic.

http://www.solarstrike.net/phpBB3/viewt ... =arrowhead
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#9 Post by McGuffin »

rock5 wrote:
McGuffin wrote: If I have the bot target the NPC and I then complete the quest it works just fine.
Why, how were you trying to complete the quest without selecting the npc?

During the yrest in this bit of code I complete the quest manually...

Code: Select all

    player:target_NPC("Myan Kellas");
    yrest(6000);
    --CompleteQuestByName(getTEXT("Sys425504_name"),"daily")
    --yrest(1000);
If I were to un-comment the CompleteQuestByName line then that window appears after the bot completes the quest and the WP file will not move on. And the way that window behaves (if I scroll down it resets every second) it seems like the bot is hammering on the NPC.

To quickly re-cap...

Code: Select all

CompleteQuestByName(425504)
and

Code: Select all

CompleteQuestByName(getTEXT("Sys425504_name"),"daily")
causes that window to pop up and the WP file to stop in its tracks...

Code: Select all

sendMacro("SpeakFrame_ListDialogOption(1, 2)")
and

Code: Select all

sendMacro("ChoiceOption(2);");
do not influence this NPC at all. Starting to think this npc is buggy as all get out. I am gonna try the eggs NPC and see if that changes anything.
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#10 Post by McGuffin »

lisa wrote:There is another topic about the arrowhead public, maybe the answer is in that topic.

http://www.solarstrike.net/phpBB3/viewt ... =arrowhead
Yea, I did look through that post. Figured out how to accept the quest from Rock's "RoMScript("AcceptBorderQuest()")" post in it.

My initial problem was with using Daily Notes, which is what I believe they were using to turn in the public quests with in that post. When that (Daily Notes) was active and the bot targeted the NPC it completed both the Public and Daily quest (even with public unchecked), using 20 arrows instead of 10 and is why I was wondering if the NPC gets hit twice when it gets targeted. Not using Daily Notes and letting the bot handle the quest turn in is where I am now.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: CompleteQuestByName Question

#11 Post by rock5 »

I see, it completes it then opens the dialog again and gets stuck in some sort of loop.

Here are the ideas I can think of.
  • 1. Are you using an addon that auto completes the quest when you click on the npc, such as DailyNotes or Streamline?
    2. Are you using some sort of loop to make sure you complete the quest?
    3. Did you install the old QuestByName userfunction?
    4. You said that it completes the quest then opens the dialog to what looks like a bugged dialog. If you manually complete the quest then open the dialog again does it show the bugged dialog?
McGuffin wrote:Not using Daily Notes and letting the bot handle the quest turn in is where I am now.
So it's working now?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: CompleteQuestByName Question

#12 Post by lisa »

1. Are you using a loop of some sort, for the bot to retarget the NPC it must be told to do it somewhere in the code.

2. Do you have both the daily and public quest accepted when handing in the daily?
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#13 Post by McGuffin »

rock5 wrote:I see, it completes it then opens the dialog again and gets stuck in some sort of loop.

Here are the ideas I can think of.
  • 1. Are you using an addon that auto completes the quest when you click on the npc, such as DailyNotes or Streamline?
    2. Are you using some sort of loop to make sure you complete the quest?
    3. Did you install the old QuestByName userfunction?
    4. You said that it completes the quest then opens the dialog to what looks like a bugged dialog. If you manually complete the quest then open the dialog again does it show the bugged dialog?
1. I uninstalled Streamline and Daily Notes when bug hunting and the behavior remained. Reinstalled Daily Notes and but have had to turn it off for this character because it completes both Public and Daily when active.

2. No loop. Here is the entire wp...

Code: Select all

	<!-- # 40 --><waypoint x="-2704" z="-17954" y="834">
    yrest(500);
    player:target_NPC("Myan Kellas");
    yrest(6000);
    --CompleteQuestByName(getTEXT("Sys425504_name"),"daily")
    --sendMacro("CloseAllWindows()");
    --yrest(1000);
    --sendMacro("CloseAllWindows()");
	</waypoint>
Tried adding the sendMacro("CloseAllWindows()"); but they did nothing. The accepting of the quest is done back at the housemaid where I change back to main then back to sub for turn in.

3.I have not installed any QuestByName userfunction. Should I or is it bot internal now?

4.If I manually complete the quest the dialog does not pop up. It completes as normal.
rock5 wrote:
McGuffin wrote:Not using Daily Notes and letting the bot handle the quest turn in is where I am now.
So it's working now?
I miss-typed? Should have said "Not using Daily Notes and getting the bot handle the quest turn in is where I am now."

For Lisa's questions...
lisa wrote:1. Are you using a loop of some sort, for the bot to retarget the NPC it must be told to do it somewhere in the code.
If I follow, do I have an errant player:target_NPC in there somewhere? There is not. I did look hard for that and moved some things (potion use and re-mounting) out of that WP to another just to make sure (zero sleep so I was not trusting my own eyes).
lisa wrote:2. Do you have both the daily and public quest accepted when handing in the daily?
Yep.
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#14 Post by McGuffin »

Just tested on the Smuggled Myrmex Eggs daily and the same thing happened. Window pops up and continues to pop up. The WP file does not advance.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: CompleteQuestByName Question

#15 Post by rock5 »

I figured out what causes it. I think it has something to do with getQuestStatus which the QuestByName functions use. The bot version can't distinguish between daily and public quests so it causes a problem (although I'm not sure how it causes the bugged dialog). Just install my questlog userfunction which has a replacement for getQuestStatus that does work.
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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#16 Post by McGuffin »

rock5 wrote:I figured out what causes it. I think it has something to do with getQuestStatus which the QuestByName functions use. The bot version can't distinguish between daily and public quests so it causes a problem (although I'm not sure how it causes the bugged dialog). Just install my questlog userfunction which has a replacement for getQuestStatus that does work.
http://www.solarstrike.net/phpBB3/viewt ... 676#p40676
Installed but still no joy.

I also tried manually targeting and letting the bot complete the quest but it had the same outcome.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: CompleteQuestByName Question

#17 Post by rock5 »

It's strange because I was able to exactly reproduce your problem by disabling that userfunction. I even got the bugged dialog.
  • 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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#18 Post by McGuffin »

rock5 wrote:It's strange because I was able to exactly reproduce your problem by disabling that userfunction. I even got the bugged dialog.

How do you mean you disabled that userfunction? Is it by moving userfunction_QuestLogClass.lua into \userfunctions because that was all I did. I also exited the client if that matters.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: CompleteQuestByName Question

#19 Post by rock5 »

Yes, it goes in \userfunctions.

I already had it installed so I renamed it so it wouldn't get loaded and reran that script and got behavior similar to what you got. That's why I thought that was the cause.
  • 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
McGuffin
Posts: 46
Joined: Sat Mar 16, 2013 6:14 am

Re: CompleteQuestByName Question

#20 Post by McGuffin »

Gotcha.

I'll work on it some more after the patch. I tried using that same method of quest completion on a non-EoJ npc and it worked fine, no problems at all. Are there any EoJ/DQ NPCs you for sure know CompleteQuestByName works on?

One thing I did think of, perhaps it was completing too fast, if that is possible. Basically, if I stopped the bot, completed the quest, then started the bot it would recognize Last Luck was not there to be completed. I can not remember, but I think there was a profile setting for folks with high ping times that would compensate for lag. I'll look for that and see if it works.
Post Reply