Page 1 of 1

Rock5's Rent userfunction

Posted: Sun Aug 26, 2012 3:51 am
by rock5
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.

Re: Rock5's Rent userfunction

Posted: Tue Oct 09, 2012 3:31 am
by Bot_romka
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.");