Functions for auto use of 30 Day Mounts (From AT Minigame)

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

Functions for auto use of 30 Day Mounts (From AT Minigame)

#1 Post by noobbotter » Thu May 21, 2015 7:47 am

UPDATED: Version 1.1

This update will now use item ID for the horse rental tickets. Also fixed it so it will look for at least 1 in inventory (when needed) instead of more than 1.

I have some functions I use in my bots' daily scripts for mounting that utilize the 30 Day mounts, and creates new ones when needed so I thought I'd share it. I made this so I wouldn't have to manually go in to each bot every 30 days to build their 30 Day Mount, and it also removes my need for constantly worrying about sending horse rental tickets to them all.

I made this as a userfunction so if you add this file to your userfunctions directory, then all you have to do is any time you want your bot to mount, type "doMount()

doMount() will first check if the player is already mounted. If not, it will then check for a mount in inventory. If one is found, it will mount. If no mount is found in inventory, it will check inventory for both the Abysmal and Infernal mounts. If found, it will mount up. If not found, it will then check inventory for the items needed to create one. It will first check for Abysmal and if all needed items are found, it will create the mount. If not, it will then check for the items for an Infernal, and if found will create that one. Afterward, if there is still no mount it will check for any horse rental tickets and use one if found. At the end, after mounting, it will apply the speed() function.


***NOTE: the items required to create the 30 Day Mounts must be in the bot's bag inventory (not the bank) for this to create the 30 day mount when needed. If your bot does AT regularly and has all items needed to create both mounts, that uses 11 bag slots.

If you have any questions about this, feel free to ask here. I know my code may not be optimized, but it works and saves me a lot of time from worrying about if my bot has a mount or not.
Attachments
userfunction_30daymounts.lua
30 Day Mounts Userfunction Version 1.1
(3.92 KiB) Downloaded 153 times
Last edited by noobbotter on Tue Jun 02, 2015 12:03 pm, edited 3 times in total.

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

Re: Functions for auto use of 30 Day Mounts (From AT Minigam

#2 Post by rock5 » Thu May 21, 2015 12:06 pm

Why not just take the extra step and make a userfunctions file? Just put those functions in file, call it userfunction_yourname.lua then post it.

Edit: Glancing over it I just noticed a bug.

Code: Select all

				check30daymounts()
				--after running function above, if it has or created a mount, havemount will now be "yes"
				if havemount == "no" then
havemount is a local variable in check30daymounts. It has no value in doMount. You run the check30daymounts function but don't accept the returned value. You could just change it to

Code: Select all

local havemount = check30daymounts()
or make havemount a global variable.
  • 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

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

Re: Functions for auto use of 30 Day Mounts (From AT Minigam

#3 Post by noobbotter » Thu May 21, 2015 1:01 pm

Oh, interesting. Didn't think about that. Well, I could jsut combine both functions into one. Maybe I'll do it that way, then repost it, as well as make a userfunction version and post that as well. Thanks Rock5.

*** Update: Edited the functions, made it all a single userfunction and edited first post.

Celesteria
Posts: 36
Joined: Mon Jun 01, 2015 7:44 am

Re: Functions for auto use of 30 Day Mounts (From AT Minigam

#4 Post by Celesteria » Tue Jun 02, 2015 9:05 am

please use the item-ids for "horse rental ticket" which are 205821 and 203033
I am a botter, but no cheater. So none of my scripts ever use any of the hacks like swimhack, speedhack, wallhack...
I hope you can understand my english. Its not my native language and it has been a long time since I used it the last time :)

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

Re: Functions for auto use of 30 Day Mounts (From AT Minigam

#5 Post by noobbotter » Tue Jun 02, 2015 12:04 pm

Good idea Celesteria. I updated it with the item ID's and I also noticed I had that part set for if there was more than 1 in inventory. I corrected that to be it there is 1 or more in inventory...

i updated the first post with the new version (1.1) and the changes.

Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest