Page 1 of 1
How to call on the addon Daily Notes?
Posted: Sat Jan 25, 2014 3:17 am
by ZZZZZ
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?
Re: How to call on the addon Daily Notes?
Posted: Sat Jan 25, 2014 6:00 am
by lolita
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
Deactivate auto accept
Re: How to call on the addon Daily Notes?
Posted: Sat Jan 25, 2014 6:23 am
by rock5
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.
Re: How to call on the addon Daily Notes?
Posted: Sat Jan 25, 2014 8:10 am
by ZZZZZ
Thanks, there are a few dailies that I spam with resets and this will make it far quicker.
Re: How to call on the addon Daily Notes?
Posted: Thu Jan 30, 2014 8:05 pm
by ZZZZZ
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
Re: How to call on the addon Daily Notes?
Posted: Thu Jan 30, 2014 8:43 pm
by rock5
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.
Re: How to call on the addon Daily Notes?
Posted: Fri Jan 31, 2014 3:01 am
by ZZZZZ
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.
Re: How to call on the addon Daily Notes?
Posted: Fri Jan 31, 2014 3:20 am
by rock5
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.
Re: How to call on the addon Daily Notes?
Posted: Fri Jan 31, 2014 3:48 am
by ZZZZZ
Ahh awesome, great to know that. Works spot on now, thank you.