Page 1 of 1

ChangeChar question

Posted: Wed Jan 06, 2016 9:24 pm
by pugzilla
Hey guys i know how to make the bot use for dailys

Code: Select all

      player:target_NPC(110691) -- Locken
      CompleteQuestByName(420424) -- Enduring Armor
      if 10 > RoMScript("Daily_count()") then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest"))
      else
         ChangeChar()
         loadProfile()
         player:update()
         __WPL:setWaypointIndex(__WPL:findWaypointTag("quest"))
      end
but my question is can i make it change char after i complete a quest, is there anyway for the bot to know that one quest is done then log on to the next.

Re: ChangeChar question

Posted: Thu Jan 07, 2016 3:24 am
by kenzu38
pugzilla wrote:but my question is can i make it change char after i complete a quest
Of course, you can. Just add ChangeChar() after CompleteQuestByName()
pugzilla wrote:is there anyway for the bot to know that one quest is done then log on to the next.
Looking at the code you posted, you're probably working with dailies, so you can just log the number of dailies done before you turn in a quest. So if the number increases right after you do CompleteQuestByName() then, you can be sure the quest was properly turned in.

Code: Select all

if 10 > RoMScript("Daily_count()") then
	local oldnum = RoMScript("Daily_count()")
	player:target_NPC()
	CompleteQuestByName()
	yrest(1000)
	if RoMScript("Daily_count()") > oldnum then
		-- quest was turned in successfully, do code here
	end
else
	print("Dailies limit reached")
end		
Edit: And btw, I also answered your question in the RoM General section regarding the SwitchRaid macro. Just in case, you still haven't solved that then just check out the thread.