How to call on the addon Daily Notes?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

How to call on the addon Daily Notes?

#1 Post by ZZZZZ » Sat Jan 25, 2014 3:17 am

Ok, i know its too difficult/not worth trying to implement the accept and completing functions that daily notes uses, but is it possible to do something along the lines of

Code: Select all

If DailyNotes then
-- turn on daily notes auto accept for the desired daily quest
end
And just add another line: if daily's are finished/out of resets then turn off that quest in daily notes?

User avatar
lolita
Posts: 139
Joined: Thu Oct 20, 2011 5:39 am
Location: Serbia

Re: How to call on the addon Daily Notes?

#2 Post by lolita » Sat Jan 25, 2014 6:00 am

Idk how to accept specific quest with rombot in dailynotes, but you can accept all quest's with this

Code: Select all

function DailyNotesActivate(_arg)
	if RoMScript("DailyNotes") then
		RoMScript("DailyNotesFrame:Show()")
		cprintf(cli.lightblue,"Daily Notes addon instaled\n")
		if _arg then
			cprintf(cli.green,"AutoQuest Activated\n")
			RoMScript("DailyNotesAutoQuest:SetChecked(true)")
			RoMScript("DailyNotes.AutoQuest()")
			RoMScript("DailyNotes.AutoQuestSelectAll()")
		else
			cprintf(cli.red,"AutoQuest Deactivated\n")
			RoMScript("DailyNotes.AutoQuestClear()")
			RoMScript("DailyNotesAutoQuest:SetChecked(false)")
			RoMScript("DailyNotes.AutoQuest()")
		end
		RoMScript("DailyNotesFrame:Hide()")
	else
		print("Daily Notes addon not instaled")
	end
end
Activate auto accept

Code: Select all

DailyNotesActivate(true)
Deactivate auto accept

Code: Select all

DailyNotesActivate(false)
Life is a journey, not destination :D

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

Re: How to call on the addon Daily Notes?

#3 Post by rock5 » Sat Jan 25, 2014 6:23 am

I automatically set it in some of my waypoint files. Here is an example.

Code: Select all

	-- Make sure autoaccept/complete is enabled in DailyNotes
	RoMScript("} DN_Options_Of_Char.Angel.autoquest=true a={")
	local aq_accept = RoMScript("DN_Options_Of_Char.Angel.aq_accept")
	if aq_accept == nil then
		RoMScript("} DN_Options_Of_Char.Angel.aq_accept={["..quest.."]=1} a={")
	else
		RoMScript("} DN_Options_Of_Char.Angel.aq_accept["..quest.."]=1 a={")
	end
This assumes quest was assigned the quest id.

As you can see it requires you to know what server name it uses to save the quest state. In this case dailynotes uses "Angel" for "Angel City", the Nexon PvE server.
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: How to call on the addon Daily Notes?

#4 Post by ZZZZZ » Sat Jan 25, 2014 8:10 am

Thanks, there are a few dailies that I spam with resets and this will make it far quicker.

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: How to call on the addon Daily Notes?

#5 Post by ZZZZZ » Thu Jan 30, 2014 8:05 pm

Finally decided to put this into my daily waypoints but I keep getting this error:

Code: Select all

The game client did not crash.
11:57am - IGF:\} DN_Options_Of_Char.Angel.autoquest=true a={\ [string "local a={
} DN_Options_Of_Char.Angel.autoque..."]:1: attempt to index field 'Angel' (a nil
 value)
Currently trying to use it on Nexon to test.

function:

Code: Select all

function DailyNotesActivate(_ID);
	servername = RoMScript("GetServerName()")
	if servername == "Angel City" then
		DNserver = "Angel"
	else
		DNserver = servername
	end
		quest = _ID
		if RoMScript("DailyNotes") then
			-- Make sure autoaccept/complete is enabled in DailyNotes
			RoMScript("} DN_Options_Of_Char."..DNserver..".autoquest=true a={")
			local aq_accept = RoMScript("DN_Options_Of_Char."..DNserver..".aq_accept")
			if aq_accept == nil then
				RoMScript("} DN_Options_Of_Char."..DNserver..".aq_accept={["..quest.."]=1} a={")
			else
			RoMScript("} DN_Options_Of_Char."..DNserver..".aq_accept["..quest.."]=1 a={")
			end
			DailyNotesActive = true
		else
			cprintf(cli.yellow,"\nNo Daily Notes Addon found!\n")
			DailyNotesActive = false
		end
  end

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

Re: How to call on the addon Daily Notes?

#6 Post by rock5 » Thu Jan 30, 2014 8:43 pm

Sorry I assumed you would have saved some settings for that server before and that 'Angel' would exist. So basically you have to create the entry if it doesn't exist.

I just found this function I created a while ago. Maybe you might want to use this.

Code: Select all

function SetUpDNAutoQuest(questid)
	local realm = string.match((RoMScript("GetCurrentRealm()") or ""),"(%w*)$") or ""
	local realmset = RoMScript("(DN_Options_Of_Char."..realm.." ~= nil)")
	if realmset then
		RoMScript("} DN_Options_Of_Char."..realm..".autoquest=true) a={")
	else
		RoMScript("} DN_Options_Of_Char."..realm.." = {autoquest=true) a={")
	end

	local aq_accept = RoMScript("(DN_Options_Of_Char."..realm..".aq_accept ~= nil)")
	if aq_accept then
		RoMScript("} DN_Options_Of_Char."..realm..".aq_accept["..questid.."]=1 a={")
	else
		RoMScript("} DN_Options_Of_Char."..realm..".aq_accept={["..questid.."]=1} a={")
	end
end
It doesn't include a check for dailynotes, though.
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: How to call on the addon Daily Notes?

#7 Post by ZZZZZ » Fri Jan 31, 2014 3:01 am

Ah right, didn't know you had to declare what Angel was. I tried your function and got this error:

Code: Select all

The game client did not crash.
6:57pm - IGF:\} DN_Options_Of_Char.City.autoquest=true) a={\ Error in command se
nt to IGF.
Im assuming "City" was supposed to be "Angel".

Using

Code: Select all

function DailyNotesActivate(questid);
	if RoMScript("DailyNotes") then
		local realm = string.match((RoMScript("GetCurrentRealm()") or ""),"(%w*)$") or ""
		local realmset = RoMScript("(DN_Options_Of_Char."..realm.." ~= nil)")
		if realmset then
			RoMScript("} DN_Options_Of_Char."..realm..".autoquest=true a={")
		else
			RoMScript("} DN_Options_Of_Char."..realm.." = {autoquest=true) a={")
		end

		local aq_accept = RoMScript("(DN_Options_Of_Char."..realm..".aq_accept ~= nil)")
		if aq_accept then
			RoMScript("} DN_Options_Of_Char."..realm..".aq_accept["..questid.."]=1 a={")
		else
			RoMScript("} DN_Options_Of_Char."..realm..".aq_accept={["..questid.."]=1} a={")
		end
		DailyNotesActive = true
	else
		cprintf(cli.yellow,"\nDaily Notes Addon is not installed!\n")
		DailyNotesActive = false
	end
end
What does the ' or ""),"(%w*)$") or "" ' do exactly? I wouldn't have a clue.

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

Re: How to call on the addon Daily Notes?

#8 Post by rock5 » Fri Jan 31, 2014 3:20 am

I wasn't sure. I saw both angel and city in the savevariables. I just double checked. The settings are saved under "City" the the function is correct.

The error is because this line has a mismatched bracket

Code: Select all

        RoMScript("} DN_Options_Of_Char."..realm..".autoquest=true) a={")
Should be

Code: Select all

        RoMScript("} DN_Options_Of_Char."..realm..".autoquest=true a={")
' or ""),"(%w*)$") or "" '
The %w* matches any set of alphanumeric characters, ie a word. The $ in (%w*)$ means end of line so this matches the last word. 'or ""' just means if it doesn't find a match then use "" instead.
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: How to call on the addon Daily Notes?

#9 Post by ZZZZZ » Fri Jan 31, 2014 3:48 am

Ahh awesome, great to know that. Works spot on now, thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest