CompleteAllQuests() problem

Talk about anything in Runes of Magic. This does not need to pertain to botting.
Post Reply
Message
Author
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

CompleteAllQuests() problem

#1 Post by beanybabe » Wed Oct 22, 2014 11:30 am

I tried to use CompleteAllQuests() on some pubilc/daily npcs and it would just get stuck.
This is how I tried to use it. So it would complete any open quests, then get more. I went back to ...questbyname for now.
...
player:target_NPC(xxx)
CompleteAllQuests()
AcceptAllQuests()
....

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

Re: CompleteAllQuests() problem

#2 Post by rock5 » Wed Oct 22, 2014 11:49 am

Are you using my QuestLogClass userfunction? If so, is it the latest version?
  • 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
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: CompleteAllQuests() problem

#3 Post by beanybabe » Thu Oct 23, 2014 9:54 pm

I was on ver.5 the current version was .6 was not even aware that was from a user function. here is link if anyone else needs http://solarstrike.net/phpBB3/viewtopic ... gClass.lua

AT one time I seen someone was working on way to check if user functions were update. Is there some easy way to check all of these? Some that I have may be old.

I'm finally starting to get the code a bit more and able to make more usable scripts.

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

Re: CompleteAllQuests() problem

#4 Post by rock5 » Thu Oct 23, 2014 11:30 pm

The QuestLogClass userfunction is not required for using the QuestByName functions. It's main purpose is just to provide more information about quests such as number of goals completed. But the QuestLogClass has a version of getQuestStatus that gets the status from memory. It took a few versions to get this working properly. The QuestByName functions use getQuestStatus so if you have an old version of QuestLogClass then it might cause the QuestByName functions not to work properly.

So I repeat, you don't need the QuestLogClass userfunction unless you need the extra information. I believe the QuestByName functions work correctly with the bots version of getQuestStatus.

As to when to update, it's pretty easy. If you have a problem, see if there is an update. Lisa set up a repository with some common userfunctions but I don't know if she still maintains it http://solarstrike.net/phpBB3/viewtopic ... 111#p47111. There was also a file repository in the wiki - which was a good idea - but no one ever uses it anymore. http://www.solarstrike.net/wiki/index.p ... Repository
  • 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
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: CompleteAllQuests() problem

#5 Post by beanybabe » Fri Oct 24, 2014 12:43 pm

strange on updateing QuestLogClass this stoped working

CompleteQuestByName(####,"public") I used public to stop completed daily problems
AcceptQuestByName(####,"public")



This works though.

CompleteQuestByName(####)
AcceptQuestByName(####,"public")

strange problem.

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

Re: CompleteAllQuests() problem

#6 Post by rock5 » Fri Oct 24, 2014 12:52 pm

I think the best solution to do the right quest is to use the quest id. The daily and public use different ids.
  • 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
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: CompleteAllQuests() problem

#7 Post by beanybabe » Sun Oct 26, 2014 4:58 am

ok i went back to the .5 version the .6 version messes up.

this "wf FjordMadBull swaping.xml" worked in 5. it will set at the quest bulletin board and just loop with .6

I ran a compare between 5 and 6 with notepad++ but that code is to complicated for me to follow yet.


this is a snip of mad bull that it must be affecting.

Code: Select all

	function getquest()
		quest = questlog:haveQuest(426557, questtype) -- Wanted: "Guargo the Mad Bull"
		if quest == false then 
			repeat
				player:target_Object(122806) -- Port Bulletin Board
				yrest(100)
				AcceptQuestByName(426557)
				yrest(200)
			until questlog:haveQuest(426557, questtype)
		end
	end
	
	function completequest()
		quest2 = questlog:getQuest(426557, questtype)
		if quest2:isComplete() then
			repeat
				player:target_NPC(122760) -- Chuck Willis
				yrest(200)
				CompleteQuestByName(426557) -- Wanted: "Guargo the Mad Bull"
			until not questlog:haveQuest(426557, questtype)
		end
		local roundTime = os.time()-restartTime
		cprintf (cli.pink,"Time spend for this round: %s Seconds\n",roundTime)
		restartTime = os.time()
		questsCompleted = questsCompleted + 1
		averageTime = (os.time()-time)/questsCompleted
		cprintf (cli.yellow,"Average time per round: %s Seconds\n",averageTime)
		checkToDoMore()
	end

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests