Getting QuestId from List

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Getting QuestId from List

#1 Post by dr-nuker » Sun Feb 03, 2013 1:57 pm

Hello folks.

I'm not clever enought and I like to spam the forum with questions...

So here I go:

I accept a quest in Dalanis and it is possible to result in 3 different quests.
So actually the event npc offers one quest out of a pool of three. All of the same name but different things to do.

I accept the quest anyways but want do decide by id it's Id which path to take.

Or is there something like AcceptQuestById() so that i just try all three and see qhich is possible to accept?

thanks in advance :)

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

Re: Getting QuestId from List

#2 Post by rock5 » Sun Feb 03, 2013 2:14 pm

Well, AcceptQuestByName(nameorid) will return true if a match is found. So you could do

Code: Select all

if AcceptQuestByName(id1) then
    -- do quest 1 stuff
elseif AcceptQuestByName(id2) then
    -- do quest 2 stuff
elseif AcceptQuestByName(id3) then
    -- do quest 3 stuff
end
  • 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

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Getting QuestId from List

#3 Post by dr-nuker » Tue Feb 05, 2013 4:13 pm

Well... not working for me :/

Code: Select all

		if AcceptQuestByName(423751) then
    			-- do chain
			__WPL:setWaypointIndex(__WPL:findWaypointTag("silverchain"));
		elseif AcceptQuestByName(423662) then
    			-- do wooden box
			__WPL:setWaypointIndex(__WPL:findWaypointTag("woodenbox"));
		elseif AcceptQuestByName(413859) then
    			-- do puppet
			player:sleep()
			__WPL:setWaypointIndex(__WPL:findWaypointTag("clothpuppet"));
		end
I definately gor the quest with finding cloth puppet, but the bot insists of saing he got another quest but not that one.
So now I'd like to recheck the Id of the quest with the given name.

Any idea? :)

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

Re: Getting QuestId from List

#4 Post by rock5 » Tue Feb 05, 2013 6:47 pm

I think maybe some offsets have changed. I'll look into it later.
  • 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: Getting QuestId from List

#5 Post by rock5 » Wed Feb 06, 2013 12:33 am

I see, they all have the same name. Similar to the Invaders bags quest.

I think the AcceptQuestByName compares the names so it probably always does the first one.

I think what you have to do is accept the quest first then see what id it has. I think getQuestStatus compares ids. Try

Code: Select all

      AcceptQuestByName("Auermo's Confession") -- Or use any of the 3 ids
      if getQuestStatus(423751) ~= "not accepted" then
         -- do chain
         __WPL:setWaypointIndex(__WPL:findWaypointTag("silverchain"));
      elseif getQuestStatus(423662) ~= "not accepted" then
         -- do wooden box
         __WPL:setWaypointIndex(__WPL:findWaypointTag("woodenbox"));
      elseif getQuestStatus(423859) ~= "not accepted" then
         -- do puppet
         player:sleep()
         __WPL:setWaypointIndex(__WPL:findWaypointTag("clothpuppet"));
      end  
Note: the last id was wrong.
  • 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

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Getting QuestId from List

#6 Post by dr-nuker » Wed Feb 06, 2013 5:40 pm

Thanks a lot.

Looks like it's working :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests