Rock5's Rent 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
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Rock5's Rent userfunction

#1 Post by rock5 » Sun Aug 26, 2012 3:51 am

Description:
  • This userfunction is for renting a portable mailbox, bank or auction house (currently disabled) and also for renting inventory bags and bank bags. You can open the portable rental interface and view the available options by entering the following command in the game chat.

Code: Select all

/script TimeFlagFrame:Show()
  • To view the inventory bag and bank bag options, click their rental buttons.

Rent
  • Rents the service specified for the number of days required.

    Syntax:
    • Rent (service, days, secondarypassword)
    Arguments:
    • service - The service you want to rent, "mail", "bank" or "auction" for the portable services. "bag3-6" and "bankbag2-5" for the inventory and bank bags. Required.

      days - The number of days you want to rent for. Must match a valid selection in the list in the rental interface. Required.

      secondarypassword - Needed to confirm your secondary password if your server requires it. For example ROM4U doesn't require it. Optional.

GetRent
  • Returns the number of days remaining of the service rent. Otherwise it returns 0.

    Syntax:
    • GetRent ( service )
    Arguments:
    • service - See "Rent".
Example:

Code: Select all

if GetRent("bank") < 0.5 then
    Rent("bank", 7, "mypassword")
end
  • Increases the portable bank rent by 7 days if there is only half a day left on the rent.
Notes:
  • - This is a very complete userfunction. If any value is entered incorrectly, it will let you know. It checks if you entered valid values, if the service is disabled or not, if your secondary password was entered wrong and if you have enough diamonds.
    - If the service is already rented, it will still do the rent which will increment the rental time. Use "GetRent" to check the rent first.
    - The function returns true if the service is rented or false if it failed to rent.
Attachments
userfunction_Rent.lua
Version 1.0 - Initial release
(3.4 KiB) Downloaded 235 times
  • 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

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: Rock5's Rent userfunction

#2 Post by Bot_romka » Tue Oct 09, 2012 3:31 am

To view the remainder of time of rent, enter the following command in the game chat.
for mailbox:

Code: Select all

/run DEFAULT_CHAT_FRAME:AddMessage("MailLet: "..math.floor(string.format("%.1f",TimeLet_GetLetTime("MailLet")/1440)).." days.");
for bank:

Code: Select all

/run DEFAULT_CHAT_FRAME:AddMessage("BankLet: "..math.floor(string.format("%.1f",TimeLet_GetLetTime("BankLet")/1440)).." days.");

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest