----------------------------------------------------------------------------------------------------------------
I'm working on this massive update. It's so large that I'm loosing track of everything I'm doing. So I'm going to list them here to help me keep them straight in my head and to give you guys a heads up on what to expect.
- - The first big thing I did was to add what I call mini updates for pawn and player class to avoid having to do full updates all the time. Full pawn and player updates do about 30-60 memory reads as well as a bunch of calculations. A classic example is waiting for casting to end
Now it will do something like
Code: Select all
repeat yrest(100) player:update() until player.Casting == false
Which will only update 1 value. This wont make things go faster, it will still take about 100ms per loop, but it will make it use a lot less cpu. Tests show a reduction in cpu usage to about 1/3 to 1/2 of what it was using before. So expect a significant performance improvement.Code: Select all
repeat yrest(100) player:updateCasting() until player.Casting == false
- The next big thing I'm doing is a total review and revamp of targeting and aggro detection. All weird targeting issues hopefully have been resolved.
- For devs who have multiple rombot installations I've added support for a 'romglobal' folder in the scripts folder. In there you can place waypoint, userfunctions and a userfunction.lua file to make them available to all bot installations.
- All energy types for skills are now gotten from memory, which means no longer needing to specify mana, rage, concentration, energy etc. in skills.xml, that includes the newly added warlock 'psi'. Also changed references to concentration to focus. Also means we don't need manainc anymore.
- Added all warlock skills including the ones that need psi and added support for them. The 2 willpower states will only cast if you have 6 psi. Any other skills that require psi wont cast if you don't have one of the 2 willpower states enabled, although it doesn't check to see if it is the right willpower state. I'll leave it to the user to make sure they only add psi skills that match the willpower state they are using.
- Added skill consumables support which it also gets from memory. If a skill needs arrows, projectiles or items to work, they wont cast if you don't have them.
- Added evalfunction option to player:merchant("npcname", option, evalfunction) and inventory:autoSell(evalfunction). If not specified then will sell based on profile autosell options as before. If specified then it will over-ride the autosell options and sell what that function passes.
- Added multi-page support for the guildbank class.
- Added itemTotalCount() functions to the bank and guildbank class.
Other minor changes:
- - Made changes to clicktocast handling to handle friendly clicktocast skills.
- Added itemshop items to the giftbags database. Now when using openGiftbags1To10, it moves itemshop items to the itemshop bag.
- Added some Warlock and Champion skills to levelupSkills1To10.
- Added support for leveling up buffs that are not in the database by allowing levelupSkill() to accept the real name of the buff and using info from memory instead of the skills database.
- I found that I usually levelup when completing quest and mounted. It would sometimes dismount when opening giftbags. So now, if you were mounted before opening giftbags then it will remount.
- Movements are now done via memory, no keypresses, so should be more reliable.
- Added my 1-10PioneersQuests waypoint folder. It does 1-10 by doing quests.
- Tweaked a few values in the profile "l1-10.xml".
- When pulled back when teleporting or going too fast to before your previous waypoint, it now winds back to a previous waypoint you were pulled back to.
- If a client change has been detected the bot will now attempt to update the addresses automatically.
- Added new macro function "RoMCode(script)". This is just to simplify when sending code to the client. Eg. Instead of RoMScript("} somevalue=10 a={") you can do RoMCode("somevalue=10").
- The players skills set is updated when the class changes, not only when the address changes.
- getpos, getid and rbassist are more robust to survive character changes and deaths.
- Added pawn functions, pawn:isFriend(aggroonly), pawn:targetIsFriend(aggroonly) and pawn:getRemainingCastTime().
- Added function player:waitTillStopMoving(maxtime)
- In preparation of future work to get more skill info from memory, I've been able to update obsolete data of most of the skills in the skills database.
- Added globalcooldown option to skills database. By default the bot assumes that instant cast skills trigger the global cooldown and that skills, with casttime, don't, which is most of them. If an instant skill doesn't trigger the global cooldown then it will need globalcooldown="false". If a casttime skill does trigger the global cooldown then it will need globalcooldown="true". All the skills should be correct as of now.
- Added function skill:getRemailingCooldown()
- changeProfileSkill now re-sorts the skills if you change a priority setting.
- Added function GetGameTime(). Returns the same value as GetTime() would return ingame.
- When using rbassist, if you want to run past some mobs while ignoring aggro, you used to have to pause the script first. Now you can run through mobs and, as long as you don't stop, it wont fight back.
- update.lua should be backward compatible to 5.0.1
- The initial waypoint list now lists folders and files. You select folders to view sub files. Use profile option WPL_SHOW_SUBFOLDER_FILES to revert to previous method that shows all files at once.
- Added function 'getTEXT' that uses the ingame function 'TEXT' to return the local language of a string. The strings are the ones you get from using the 'ROM .db LanguageFile Converter/Viewer' program.
- Wander mode now asks what distance you want to use so you don't have to keep changing the radius in your profile.
- Made errors returned from RoMScript more detailed to help troubleshooting.
- Made the mini functions more reliable by checking the address in each one.
- Added some mounts for player:mount()
Bug fixes:
- - Fixed when using skills in the onload of a waypoint, the skill set wasn't loaded yet.
- Fixed RoMScript would hang if the command send had an error that caused the game to error and not return any value. Now RoMScript will return an error if the game errors. This is the main issue that caused the system menu popup problem. Problem solved thanks to the patience and perseverance of Hetrix
- Fixed the new move while casting feature. Now it doesn't move forward sometimes when casting buffs out of combat.
- Fixed RoMscript returning negative whole numbers as a string.
- Fixed small bug in the Accept/CompleteQuestByName functions that were detecting the wrong questgroup type.
- createpath now correctly numbers the waypoints even when using all the options.
- The waypoint list displayed when starting the bot no longer has duplicates.
- Fixed wrong error message when getting an error in the onLevelUp section of the profile.
- Fixed bug in bank class that didn't allow fast moving of items.
- Fixed bug in autosell that could cause "Macro text too long" error.
- Fixed bug that caused occasional "Id not found" errors.
- Most skills can't be cast inside the house so now it wont attempt to anymore.
- Added check to stop player.Address being set to nil. Might have been the cause of occasional bot becoming frozen.
- Made changes that should improve stopping when an error or pause or exit happens.
- Skills 'autouse' option in skills.xml was not enabled even though it was being used. Now it is enabled.
- Fixed not seeing mobs engaged with npc, in certain situations.
Feel free to discuss or ask questions.