Page 1 of 2

Syrbal Pass Daily quest - A Little Refreshment

Posted: Fri Jun 07, 2013 11:48 pm
by ZZZZZ
For anyone wanting a quick, spamable daily in the new zone there is one located at Old Border of Wylant (17.0, 49.0).

I just made simple functions for it.

Without Daily Notes addon:

Code: Select all

function DAILY()
repeat
inventory:update();
player:target_NPC("Lankor Forgia");
	local dqCount = RoMScript("Daily_count()");
	if 10 > dqCount then   
            queststate = getQuestStatus("A Little Refreshment");
        if queststate == "complete" then
            -- Complete quest
               player:target_NPC("Lankor Forgia");
               CompleteQuestByName("A Little Refreshment");  
			-- Accept quest
               player:target_NPC("Lankor Forgia");
               AcceptQuestByName("A Little Refreshment");
        else
            -- Accept quest
               player:target_NPC("Lankor Forgia");
               AcceptQuestByName("A Little Refreshment");
  	end
else
		inventory:update();
		player:update();
			inventory:useItem(202434);
	end
	repeat
	queststate = getQuestStatus("A Little Refreshment");
	SlashCommand("script TargetNearestFriend()");
	inventory:useItem("Energy Drink");
	until queststate == "complete"
	until inventory:itemTotalCount(202434) == 0
end
With Daily Notes addon:

Code: Select all

function DAILY1()
repeat
inventory:update();
player:target_NPC("Lankor Forgia");
player:target_NPC("Lankor Forgia");
	local dqCount = RoMScript("Daily_count()");
	if dqCount == 10 then   
		inventory:update();
		player:update();
		inventory:useItem(202434);
		player:target_NPC("Lankor Forgia");
	end
	if inventory:itemTotalCount("Energy Drink") < 1 then
		player:target_NPC("Lankor Forgia");
	end
	repeat
	queststate = getQuestStatus("A Little Refreshment");
	SlashCommand("script TargetNearestFriend()");
	inventory:useItem("Energy Drink");
	until queststate == "complete"
	until inventory:itemTotalCount(202434) == 0
end
Worked for me really well, both will keep using resets until you either pause or run out.

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sat Jun 08, 2013 10:34 am
by AngelDrago
Hello ZZZZZ

As for is this a function do you need to have an waypoint or how do you actually use it... thx for helping a noop..lol

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Tue Jun 11, 2013 9:32 am
by ZZZZZ
Run the 'StartCommandLine.bat' file and type in either DAILY() or DAILY1() depending.

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Thu Jun 13, 2013 12:46 am
by AngelDrago
ZZZZZ, great got it going but i noticed it will not accept the quest and than you have to manually accept it and once it finished it will not give the quest back and get an new one maybe i mist something... see below
Command> DAILY()
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
Command> DAILY()
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
Command> DAILY()
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
Command> DAILY()
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
We try to find NPC Lankor Forgia:
We successfully target NPC Lankor Forgia and try to open the dialog window.
Command>

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sat Jun 15, 2013 5:11 am
by Kosa
Very good job. This function working fine if I have min one Daily Quest Ticket. When I don't have this item - after complete one daily quest - function stopping and I must use next 9 DAILY() command manualy.

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sat Jun 15, 2013 7:07 am
by ZZZZZ
Yeh, i had the same lol. I was going to fix it but really couldn't have been bothered at the time xD Might get round to it in a bit. Also with the first one, without daily notes, i think it will stuff up after you finish 1 set of dailys.....so again i'll have a look at that 1 soon as well.

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sat Jun 15, 2013 1:57 pm
by kenzu38
Hehe, haven't even been to Wylant yet, my char's already at cap. But thanks for posting this, now I know there's a fast daily there.

Anyway, for those who want to, you can make the bot detect Daily Notes addon automatically with:

Code: Select all

if RoMScript("_G.DailyNotes ~= nil") then
        --  Daily notes present.
end

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sat Jun 15, 2013 2:44 pm
by s018mes
I am also working on this script, but my Function code was a lot simpler but worked way slower than yours. I am working on making it target 10 different NPCs in the area without moving. I will explain further after showing you my first attempt:

Code: Select all

   function ALR()
	repeat	
	queststate = getQuestStatus("A Little Refreshment","Daily");
               	if queststate == "incomplete" then
			player:target_NPC("Lankor Forgia");
			inventory:useItem("Energy Drink");
		else
		end
	until queststate == "complete"
   end
YEP, you can target Lankor herself to do the quest. Heck you can target yourself or any player in the area and spam the drink on them!

Here is my task, when you spam only one npc is takes way too long. I noticed yours is pretty quick if your facing the right way, by selecting different NPC's. How about having code to target every available NPC with an actual real Name and have the computer complete the quest even faster and more consistent? Here was my first attempt, but it wants to run up to the NPC to cast the "spell". So, first I tried changing the following items to have my guy stand in one place and complete the quest:
IN PROFILE:::
<option name="MAX_TARGET_DIST" value="600" />

but it doesn'tt work.

Code: Select all

   function ALRP()
	repeat	
	queststate = getQuestStatus("A Little Refreshment","Daily");
               	if queststate == "incomplete" then
			player:target_NPC("Masaka Dogtail");
			inventory:useItem("Energy Drink");
			player:target_NPC("Kasamir Baschir");
			inventory:useItem("Energy Drink");
			player:target_NPC("Kaboy");
			inventory:useItem("Energy Drink");
			player:target_NPC("Banjen Shaven");
			inventory:useItem("Energy Drink");
			player:target_NPC("Pagee Alon");
			inventory:useItem("Energy Drink");
			player:target_NPC("Will Kanchesr");
			inventory:useItem("Energy Drink");
			player:target_NPC("Nolis Alon");
			inventory:useItem("Energy Drink");
			player:target_NPC("Lina Lukasz");
			inventory:useItem("Energy Drink");
			player:target_NPC("Layla Lien");
			inventory:useItem("Energy Drink");
			player:target_NPC("Aidamus Schwartz");
			inventory:useItem("Energy Drink");
				else
		end
	until queststate == "complete"
   end
You can target a NPC 500 or 600 distance away. But how can we use inventory:useItem("Energy Drink"); on an NPC 500 way?

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sun Jun 16, 2013 4:14 am
by grande
You can target a NPC 500 or 600 distance away. But how can we use inventory:useItem("Energy Drink"); on an NPC 500 way?
So you are saying you can target the NPC but the item to use indicates that you are too far away from the NPC? In that case the only option would seem to be move closer to the NPC. Maybe add a waypoint tag and indicate that you want it to do something like use the inventory item?

maybe inject this into your function somewhere:

Code: Select all

__WPL:setWaypointIndex(__WPL:findWaypointTag("your-waypoint-tag-Name-Goes-Here"))
Or maybe since everyone wants to be odd and not use Waypoints then maybe there's a way to inject a go to position code... sure there is but I can't think of it right now.

found this: http://solarstrike.net/phpBB3/viewtopic ... 398#p39398 (Lisa saves the day again! LOVE)

maybe it will help:

Code: Select all

player:moveTo({X=2282,Z=2418},true)
run rom/getpos in the micromacro to see what values you need for X and Y?

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sun Jun 16, 2013 7:35 am
by lisa
grande wrote:(Lisa saves the day again! LOVE)
I did? yay ;)

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sun Jun 16, 2013 7:58 am
by ZZZZZ
It doesnt matter what distance you are from the NPC. As long as you have it targeted you can use the Energy Drink. Its the same as the wedding food, when you want to place some you can just target 1 of the spots and use it from any range and it will work.

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Sun Jun 16, 2013 8:16 pm
by s018mes
ZZZZZ wrote:It doesnt matter what distance you are from the NPC. As long as you have it targeted you can use the Energy Drink. Its the same as the wedding food, when you want to place some you can just target 1 of the spots and use it from any range and it will work.

Correct. However, when I have it target an NPC 500units away, manually I CAN use the food on it. No Problem. BUT, when I use the bot, the bot wants to move closer to the NPC. So, somewhere in the bot there has to be a setting I can change to run the bot to use food on a specific NPC, without moving a single step.

I thought it was :

<option name="MAX_TARGET_DIST" value="600" />

But that does NOT work.

Any ideas where else to look in the bot?

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 17, 2013 12:38 am
by rock5
I suspect it is because you are using player:target_NPC. This function targets the npc and then tries to open a dialog. To open a dialog it has to be within a certain distance. If it's not in distance then it moves closer. Try this.

Code: Select all

npc = player:findNearestNameOrId("npc name")
if npc then
    player:target(npc.Address)
    inventory:useItem("Energy Drink");
end

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 17, 2013 12:14 pm
by s018mes
Thanks rock5! That was the solution I was looking for. It now does the quest fast.

You must use my userfunction and just add it to your Waypoint. I included both.

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

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>

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 17, 2013 6:53 pm
by grande
Nice progress there!

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 17, 2013 7:53 pm
by lisa
s018mes wrote:You must use my userfunction and just add it to your Waypoint.
You can add the userfunction into the WP so it is just 1 file, just add an onload section to the WP and put the function in there.

Code: Select all

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

--add function here

</onload>
<!-- #  1 --><waypoint x="-11776" z="-5642"> 

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 24, 2013 11:44 am
by Atraut
Hy, i have a problem with the names of the things and npc, im using the game in spanish and the names appears with accents. The code give me an error when i use the name "Bebida energética" for example... the solution is use the reference code of the object, but the RomDatabase is not actualiced. Where i can get this codes for use?

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 24, 2013 11:47 am
by rock5
Try replacing the accented characters with a dot '.', eg. "Bebida energ.tica".

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 24, 2013 12:08 pm
by Atraut
Ok, i wil try this night. Also i have th same problem with "Un pequeño refresco" the sistem give me an error with "ñ" character.

In this post i see that other users can get the namesid. From where?

Thanks!!

Re: Syrbal Pass Daily quest - A Little Refreshment

Posted: Mon Jun 24, 2013 1:53 pm
by rock5
For npcs you can use getid.lua.

Code: Select all

rom/getid
It will show the id of anything you point the mouse at.

For other ids, such at items and quests, I prefer to use the 'ItemPreview' addon. There are other ways but I find this the easiest.
http://rom.curseforge.com/addons/itempreview/