Syrbal Pass Daily quest - A Little Refreshment

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
Atraut
Posts: 4
Joined: Mon Jun 24, 2013 11:29 am

Re: Syrbal Pass Daily quest - A Little Refreshment

#21 Post by Atraut » Mon Jun 24, 2013 8:33 pm

Work`s well!! thak's for your help

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Syrbal Pass Daily quest - A Little Refreshment

#22 Post by kkulesza » Mon Jun 24, 2013 10:46 pm

ZZZZZ wrote:

Code: Select all

SlashCommand("script TargetNearestFriend()");
This command iterates over to few NPCs and You can't give a drink twice to the same NPC in a very short time.
You have to wait.

To avoid unnecessary waiting i've written this function:

Code: Select all

function tenDrinks()
	local objectList = CObjectList();
	objectList:update();
	count=0
	for i = 0,objectList:size() do
		obj = objectList:getObject(i);
		if( obj ~= nil ) then
			if( obj.Name == "Exhausted Alliance Warrior") then
				player:target(obj)
				inventory:useItem("Energy Drink");
				count=count+1;
				if count>=11 then --11th to be sure ;)
					return --break the For loop
				end
			end
		end
	end
end
BTW. This quest is super fast. Thx a lot for posting it

BorisValkov
Posts: 5
Joined: Wed Jun 12, 2013 1:10 pm

Re: Syrbal Pass Daily quest - A Little Refreshment

#23 Post by BorisValkov » Tue Jun 25, 2013 1:07 pm

Hola @ all...

I hate redundant code, so I decided to change the function part that s018mes posted earlier, with Lisa's idea, and rewrote the waypoint file...
btw. the quest and item names are in German... feel free to change them...

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>

 function ALRPP()
      _npc = {"Kaboy","Masaka Dogtail","Aidamus Schwartz","Kasamir Baschir","Banjen Shaven","Pagee Alon","Will Kanches","Nolis Alon","Lina Lukasz","Layla Lien"}
   repeat   
   queststate = getQuestStatus("Eine kleine Erfrischung","Daily");

	for _i = 1,10,1 do
		if queststate == "incomplete" then
         npc = player:findNearestNameOrId(_npc[_i])
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energietrank");
         end
         inventory:useItem("Energietrank");
		else
		end
	end
   until queststate == "complete"
   end
</onload>

   <!-- #  1 --><waypoint x="-11776" z="-5642">      
      player:target_NPC("Lankor Forgia");
      AcceptQuestByName("Eine kleine Erfrischung","Daily");
      yrest(1000);</waypoint>

   <!-- #  2 --><waypoint x="-11776" z="-5642"> ALRPP()
				</waypoint>

   <!-- #  3 --><waypoint x="-11776" z="-5642">
      player:target_NPC("Lankor Forgia");
      CompleteQuestByName("Eine kleine Erfrischung","Daily");
				</waypoint>
</waypoints>
only problem I have is that when you already have all 10 dailies done, that the script does not quit, if someone could give me a little nudge in the right direction I'd appreciate it...

Atraut
Posts: 4
Joined: Mon Jun 24, 2013 11:29 am

Re: Syrbal Pass Daily quest - A Little Refreshment

#24 Post by Atraut » Tue Jun 25, 2013 6:27 pm

You can add in waypoint #1 somethig like this:

Code: Select all

local dqCount, dqPerDay = RoMScript("Daily_count()");
	if dqCount ~= 10 then
		player:target_NPC(questGiverId);
      		AcceptQuestByName(questName,"Daily");
	else
		inventory:update();
		player:update();
		if inventory:itemTotalCount(202434) > 0 then
			inventory:useItem(202434);
			yrest(2000)
			player:target_NPC(questGiverId);
      			AcceptQuestByName(questName,"Daily");			
		else
			player:sleep();
		end 
	end

Try to use a tiket of daily mission o just remain stop.

Aron
Posts: 39
Joined: Tue Feb 19, 2013 10:30 am

Re: Syrbal Pass Daily quest - A Little Refreshment

#25 Post by Aron » Wed Jun 26, 2013 8:35 pm

Working great, thanks s018mes. How can I add Daily Quest Reset Ticket to the waypoint or userfunction so it can run by itself and use the Daily Tickets automatically. Now I'm stopping it after it reaches 10 dailies and then I use a Daily Reset Ticket and then start the script again.

ty in advance,

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

Re: Syrbal Pass Daily quest - A Little Refreshment

#26 Post by rock5 » Thu Jun 27, 2013 12:47 am

That's what that code does. If it hasn't finished it's dailies it accepts the quest. If it has finished dailies then it checks to see if you have 202434 which I assume is the daily ticket, uses it and accepts the quest. You just need to put that code in the waypoint near the accept npc.

If you also complete the quest with the same npc then you would add a 'CompleteQuestByName' before checking the dailies.
  • 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

Aron
Posts: 39
Joined: Tue Feb 19, 2013 10:30 am

Re: Syrbal Pass Daily quest - A Little Refreshment

#27 Post by Aron » Thu Jun 27, 2013 6:44 am

Hmm I cant find that rock, neither in functions or the waypoint file. How do I insert it, what do I have to write?

waypoint:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>

   <!-- #  1 --><waypoint x="-11776" z="-5642">      
      player:target_NPC("Lankor Forgia");
      AcceptQuestByName("A Little Refreshment","Daily");
      yrest(10000);</waypoint>

   <!-- #  2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>

   <!-- #  3 --><waypoint x="-11776" z="-5642">
      player:target_NPC("Lankor Forgia");
      CompleteQuestByName("A Little Refreshment","Daily");
   </waypoint>
   
</waypoints>
userfunction:

Code: Select all

-- Function to Change Channels
   function ALRPP()
   repeat   
   queststate = getQuestStatus("A Little Refreshment","Daily");
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Masaka Dogtail")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Kasamir Baschir")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Banjen Shaven")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Pagee Alon")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Will Kanchesr")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Nolis Alon")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Lina Lukasz")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Layla Lien")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Aidamus Schwartz")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
if queststate == "incomplete" then
         npc = player:findNearestNameOrId("Kaboy")
         if npc then
                player:target(npc.Address)
                inventory:useItem("Energy Drink");
         end
         inventory:useItem("Energy Drink");
      else
      end
   until queststate == "complete"
   end

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

Re: Syrbal Pass Daily quest - A Little Refreshment

#28 Post by rock5 » Thu Jun 27, 2013 8:39 am

First I would get rid of the last waypoint. You only need one at that location. I would do something like this.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onload>
		questGiverId = 121948 -- Lankor Forgia
		questName = 425961 -- A Little Refreshment - Daily
		dailyTicket = 202434
	</onload>

	<!-- #  1 --><waypoint x="-11776" z="-5642">   		
		player:target_NPC(questGiverId);
		CompleteQuestByName(questName);
		
		local dqCount, dqPerDay = RoMScript("Daily_count()");
		if dqCount ~= 10 then
			AcceptQuestByName(questName);
		else
			inventory:update();
			player:update();
			if inventory:itemTotalCount(dailyTicket) > 0 then
				inventory:useItem(dailyTicket);
				yrest(2000)
				AcceptQuestByName(questName);         
			else
				player:sleep();
			end
		end
		yrest(10000)
	</waypoint>

	<!-- #  2 --><waypoint x="-11776" z="-5642"> ALRPP()
	</waypoint>
</waypoints>
Notes:
  • - I put the variables in the onload for easy access. I also made them all ids. I don't think any of them need to be names.
    - I believe the QuestByName functions only require the npc to be targetted once.
    - I believe if you use the daily id you don't need to use "daily" with the QuestByName functions. Fixed as of revision 758.
    - Where it has "player:sleep()" you could load other characters if you have other characters you want to do this daily.
    - This code is untested.

Some notes about your userfunction:
  • - 'getQuestStatus' does not accept a second argument. Use the daily id instead of the quest name to differentiate between daily and public quest.
    - If it is your intention that it stop trying to interact with the npcs when the quest is complete, it wont work because you don't update 'queststate'. You would need to update it between each npc. Instead of using

    Code: Select all

    if queststate == "incomplete" then
    change them all to

    Code: Select all

    if getQuestStatus(questName) == "incomplete" then
    - You have a lot of

    Code: Select all

    else
    end
    If you are not going to have anything between the 'else' and the 'end' get rid of the 'else'. Although you could put 'break' between them so that it breaks from the loop right away after seeing that the quest is complete so it doesn't keep checking the rest of the npcs.
  • 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

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: Syrbal Pass Daily quest - A Little Refreshment

#29 Post by Sasuke » Fri Sep 20, 2013 7:48 pm

i need an help....how can i use a macro if i have it in action bar for example in 5 slot?
i have a macro for deliver in automatic energy drink without move...can you help me pls?

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

Re: Syrbal Pass Daily quest - A Little Refreshment

#30 Post by rock5 » Sat Sep 21, 2013 1:05 am

Sasuke wrote:i need an help....how can i use a macro if i have it in action bar for example in 5 slot?
i have a macro for deliver in automatic energy drink without move...can you help me pls?
Please don't double post. You were correct to start your own topic for an unrelated subject.
http://www.solarstrike.net/phpBB3/viewt ... 706#p52706
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests