Generally the biggest issue with a project like this is stopping and starting again. If the bot is stopped for what ever reason it then has to decide where to start from when you restart it.
Idea I have been working on is using a table of quest Id's that are being used in the project and stored in tables to do with zone ID.
So when bot is started it does a zone check and then looks at what quests are completed or not for that zone from the table. It can then hopefully start from where it was stopped.
CheckQuest(questID) should return 0 1 2
0 for not started quest,
1 is that you have quest in log
2 for completed (not in quest log anymore)
that isn't confirmed as yet but it is probably something like that anyway.
Remember no matter you do in life to always have a little fun while you are at it
local questcheck = RoMScript("CheckQuest("..questID..")")
if questcheck == 1 then
if getQuestStatus() ~= "complete" then
--do what is needed to completed quest
else
--go hand it in
end
elseif questcheck == 2 then
--ignore quest as it has been completed
else -- must be 0 and not in log or fully completed yet
--get quest and go and complete it
end
This won't work for daily quests.
Remember no matter you do in life to always have a little fun while you are at it
Well, based on all the great feedback and suggestions so far, looks like the bot is going to have to be a bit "smarter" than I was looking to do.
But that's a good thing, I guess.
Going to break it down into even smaller modules so I can start to get some releases out and some perfecting done.
So, changing focus, first things first:
Going to identify and store the primary, secondary, and third class into variables. If the character doesn't have these yet, they will be set as profile options and the bot will pick them up when ready.
Next, storing the level of all 3 for appropriate management.
Next, identifying "top 5" stats in prioritized order, depending on our class. This will be used to score gear and manage runes.
Then, depending on level, set up our skill profile. This will determine which moves we want to learn, and which moves should be leveled on levelup.
Then, based on our class levels, determine which class should be "focused". The exact formula for this is something I'm still determining. We'll probably have a few focus options in the profile, something to the effect of "Primary" "Primary and Secondary - Even" "Primary and Secondary - Optimal" "All Three - Even" and "All Three - Optimal". Optimal will likely lag one class 7-8 levels behind the other, to use quest turnins for boosting, etc.
So, we proceed to the nearest class hub (housemaid), and switch to the appropriate focus class.
Then, based on its level, we determine the appropriate target area. If we are less than 75% of a level before the next target area, we may proceed ahead. I will likely include a "risk magnitude" factor in the profile that determines skipping rates and fight difficulty levels, primarily for debugging so we can easily adjust it if we find the bot to be taking too many risks.
Next, we determine the zone that contains the target area, and setup a rescue path to the nearest long distance hub, then travel to other long distance hubs to reach the target zone.
Once we are in the target zone, we proceed to the nearest recovery waypoint (as there should be a path from the nearest hub to each waypoint). Once we've reached the recovery, we follow that to our (re)starting point.
Now the action begins. It checks to see if the "quest todo list" for this level is done, and acts accordingly. Once the quest todo is hit, it resorts to grinding away the rest of the level. It also checks if the quest is actually available, so if any pre-requisites were missed, it will not screw up trying to do that quest.
In addition, there will be a few behaviour changes made to the bot.
First, and simplest, it will auto-sit when resting. This increases regen speed, and should buy us a few seconds.
Second is a massive overhaul of the inventory system. This will likely involve a custom addon, which will add several new features.
Features of the new inventory system:
1.) Dynamic Loot Filtering - Basically, it will filter items differently based on how much space is left in the bag.
2.) Stat Scoring - Effectively scores items to a single, easy to compare number for each of our classes. (Rune slots are counted in scoring.)
3.) Equip Memory - "Remembers" the equipment for our 3 classes (uses bank slots 1-13 for the odd class out). This way we can score equipment against other classes current equipment.
4.) Auto Equip - If the latest equip is better than what we already had for any class, equip it if the class is currently active, or mark it for equip if the class is inactive.
5.) Auto Vendor - It will be able to autorepair, and autovendor items that are no longer useful (underscored equips, etc)
6.) Marking System - It will keep track of items in inventory and their "mark" status which determines what is planned for these items. Possible marks include "vendor" (would be sold to vendor on next visit), "potion" (the currently in-use stack of potions), "auction" (items to be posted on the AH at next visit), "bank" (items the bot should bank, such as guild runes), etc. This marking system will be updated with the inventory, meaning that when you approach a vendor, it already knows which slots to sell, rather than performing any comparisons on the spot. In addition, debug prints of the inventory will allow us to see and be aware of potential issues, such as a valuable item being marked as vendor, etc.
7.) Auto Rune - Each class will have a predefined list of "top runes" (say top 5 runes for this class). When we have a runeslot open, and we come into possession of one of these runes, it will be applied to the first available (and appropriate) rune slot.
So, the project has changed methods a bit, but the overall goal remains the same. Because of the mass increase of "intelligence" of the bot, modules will be reduced to single-level, plus hubs, etc. Therefore a release will be far more imminent as I might as well start with level 1. For initial release, supported zones will be Howling Mountains, Silverspring, and Elven Islands. You will have to be somewhere in one of these zones to start the bot. It *will* support the tutorial, thanks again to lisa for showing me how to do that.
Edit: I updated the first post to mark a few completed challenges. While I have race detection, I'm doing it via a skill check, there's probably a more reliable way? Thanks to everyone for their help, soon we'll start to show some real progress. (My day job needs me, been some long weeks here. I *promise* as soon as I get some time to actually sit down and work on this for a few, we'll have a release.)
I was trying to avoid having to set up a profile for a character. For now, it seems this is inevitable. Rather than delay release further while I automate the menial configuration, I'll go ahead and be character-specific for now.
Edit: Good news, I have a couple hours to work on it. Let's see what I can do.
Edit 2: Any way to tell what subzone we're in? I.e. Logar instead of Howling Mountains?
The Id is in the link. If you search for something on that site, you don't even need to click through to the item. Just point your mouse at the item link and the address should appear in the status bar and you can read the Id from that. Or you can click the item and read the Id from the address bar.
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.
1 more question to be sure .
This is how is done to be 100% sure i take the quest ?
( sometimes is a delay ...and she run but no quest taken and cant use a big yrest() i'm on timer )
old code :
player:target_NPC("NAME")
yrest(100)
RoMScript("OnClick_QuestListButton(1, 1)")
yrest(100)