DailyQuestCheck Userfunction

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.
Post Reply
Message
Author
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

DailyQuestCheck Userfunction

#1 Post by noobbotter » Mon Jan 25, 2016 11:41 pm

DailyQuestCheck Userfunction Version 1.0 by NoobBotter

Update: 1.1:
Waypoint arguments can now accept a waypoint number, or a waypoint tag name.

This is a custom userfunction you can use in any waypoint file to check if you've used all 10 of your daily quests. You can specify to use daily reset tickets, and set a minimum amount of tickets to keep in inventory (not use). You would put this in your waypoint file where you would normally finish a daily and check to see if you still have more available to do, and replaces the need to write custom functions to use daily repeat tickets.

Basic Construct:
DQC_DailyQuestCheck(_startWP,_endWP,_resetOrNot,_howManyToKeep)

Arguments:
_startWP - Name (Tag), or waypoint number of waypoint to go to, to restart, or accept the daily quest. If using Tag Name, it must be inside quotes.

_endWP - Name (Tag) or waypoint number of waypoint to go to, after completing all dailies and no more reset tickets remain. This is typically where you end the waypoint or go to load the next waypoint. If using Tag Name, it must be inside quotes.

_resetOrNot - Optional. Set to true to use Daily Reset Tickets, or false to not use any. Default (anything other than 'true') is to not use any.

_howManyToKeep - Optional. Set to the number of Daily Reset Tickets you want to keep in inventory and NOT use. Default is 0 which will use all you have.

Example Uses:
Example 1: To not use any daily resets and just do my 10 dailies:
DQC_DailyQuestCheck("acceptQuest","myfinish")

Example 2: To keep doing this quest until all Daily Reset Tickets have been used:
DQC_DailyQuestCheck("acceptQuest","myfinish",true)

Example 3: To use Daily Reset Tickets when needed but stop when I only have 5 reset tickets left:
DQC_DailyQuestCheck("acceptQuest","myfinish",true,5)

Example 4: To use Daily Reset Tickets when needed, stop when I only have 1 reset ticket left, and using waypoint numbers to specify the waypoints to go to:
DQC_DailyQuestCheck(14,28,true,5)


Here is the updated version 1.1 of the userfunction. To use this, download and copy into your rom/userfunctions directory.
userfunction_DailyQuestCheck.lua
DailyQuestCheck version 1.1
(4.51 KiB) Downloaded 165 times
For clarity's sake, here is an example of how you can use the userfunction. This is a daily waypoint to do the "Time for spice" daily in Splitwater Coast. Line 51 of that waypoint file has the new userfunction, and in this case it will use daily reset tickets when needed but will stop when there are only 10 left.
timeforspice.xml
TimeforSpice Daily Quest waypoint file
(2.72 KiB) Downloaded 160 times
I welcome any questions, comments, suggestions, or bugs.
Last edited by noobbotter on Thu Jan 28, 2016 8:19 pm, edited 1 time in total.

User avatar
sauhard
Posts: 130
Joined: Wed Mar 05, 2014 10:30 am

Re: DailyQuestCheck Userfunction

#2 Post by sauhard » Thu Jan 28, 2016 6:06 am

you used this one at the ending of your waypoint, could you break it down for me what does that mean? and btw nice work there

Code: Select all

DQC_DailyQuestCheck("startquest","endwp",true,10)
Satisfaction is the end of desire!!

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: DailyQuestCheck Userfunction

#3 Post by noobbotter » Thu Jan 28, 2016 8:46 am

The DWC_DailyQuestCheck is my userfunction, so that line will call the userfunction with the parameters specified. In the case of the Dailies Waypoint example I provided the line was:

Code: Select all

DQC_DailyQuestCheck("startquest","endwp",true,10)
In this case each time it turns in a quest it will call the function. The function will first check to see if I've done all 10 dailies. If I have not done all of them it will send me to the waypoint of my first argument, in this case, the waypoint named "startquest", which happens to be where it will accept the quest.
If all 10 dailies have been done, it will look at the third argument (true). The true means "yes, use daily reset tickets." If false it would not use any tickets. it would just do your normal 10 (or whatever dailies you have available to do, and then stop (stop meaning, go to waypoint specified in the 2nd argument).
But before it uses any tickets, it wants to make sure it doesn't use use more than you want it to. the 4th argument specifies how many tickets in your inventory to NOT USE. In this case, 10 means use all but 10 of my reset tickets. So if I start with 12 tickets, it will do 30 dailies. After the first 10 normal dailies, it will use a ticket bringing it down to 11 tickets. Then after those 10 are up, it will use another. After those 10 dailies are done it will see that it has 10 tickets remaining and will stop.

That 2nd argument of "endwp" is the tag name of the waypoint to go to when any conditions are not met. If not using tickets, or all tickets are used up, or you've used all down to your specified number of not to use, it will then go to this specified waypoint.

I thought about having a separate optional argument of how many tickets to use but I haven't added it yet. Not sure if it's needed yet or not. I have since made a modification where the waypoint arguments can be either the waypoint name or the waypoint number, but I haven't tested it yet.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests