Package-level declarations

Types

Link copied to clipboard

Properties

Link copied to clipboard

The local time when server save happens.

Link copied to clipboard

The timezone Tibia time is based on.

Functions

Link copied to clipboard
fun buildTibiaUrl(section: String, vararg params: Pair<String, Any?>, test: Boolean = false, anchor: String? = null): String
fun buildTibiaUrl(section: String, subtopic: String, vararg params: Pair<String, Any?>, test: Boolean = false, anchor: String? = null): String

Build a URL to Tibia.com.

Link copied to clipboard

Clean the string of non-breaking spaces and trims whitespace.

Link copied to clipboard

Find and parse an integer from a string, ignoring everything that is not a digit.

Link copied to clipboard
fun getAuctionUrl(auctionId: Int): String

Get the URL to a specific auction.

Link copied to clipboard
fun getBazaarUrl(type: BazaarType = BazaarType.CURRENT, filters: BazaarFilters? = null, page: Int = 1): String

Get the URL to the character bazaar.

Link copied to clipboard

Get the URL to the Creatures section in Tibia.com.

Link copied to clipboard

Get the URL to specific character.

Link copied to clipboard
fun getCMPostArchiveUrl(startDate: LocalDate, endDate: LocalDate, page: Int = 1): String

Get the URL to the CM Post Archive in Tibia.com.

Link copied to clipboard
fun <V> Map<String, V>.getContaining(key: String, default: V? = null): V?

Get a mapping's key containing the string.

Link copied to clipboard

Get the URL to the Creatures section in Tibia.com.

Link copied to clipboard
fun getCreatureUrl(identifier: String): String

Get the URL to a specific creature in Tibia.com.

Link copied to clipboard
fun getEventsScheduleUrl(yearMonth: YearMonth? = null): String

Get the URL to the events schedule.

Link copied to clipboard
fun getForumAnnouncementUrl(announcementId: Int): String

Get the URL to a forum announcement.

Link copied to clipboard
fun getForumBoardUrl(boardId: Int, page: Int = 1, threadAge: Int? = null): String

Get the URL to a forum board.

Link copied to clipboard
fun getForumPostUrl(postId: Int): String

Get the URL of a forum post with a specific postId in Tibia.com.

Link copied to clipboard
fun getForumSectionUrl(sectionId: Int): String

Get the URL to a specific forum section.

fun getForumSectionUrl(sectionName: String): String

Get the URL to a specific forum section by its name.

Link copied to clipboard
fun getForumThreadUrl(threadId: Int, page: Int = 1): String

Get the URL to a specific thread in the forums.

Link copied to clipboard

Get the URL to a specific guild.

Link copied to clipboard
fun getHighscoresUrl(world: String?, category: HighscoresCategory = HighscoresCategory.EXPERIENCE_POINTS, vocations: HighscoresProfession = HighscoresProfession.ALL, page: Int = 1, battleEye: HighscoresBattlEyeType = HighscoresBattlEyeType.ANY_WORLD, worldTypes: Set<PvpType>? = null): String

Get the URL to the highscores, with the specified parameters.

Link copied to clipboard
fun getHousesSectionUrl(world: String, town: String, type: HouseType? = null, status: HouseStatus? = null, order: HouseOrder? = null): String

Get the URL to the houses section with the provided parameters.

Link copied to clipboard
fun getHouseUrl(world: String, houseId: Int): String

Get the URL to a house on a specific world.

Link copied to clipboard

Get the URL to the kill statistics of a specific world.

Link copied to clipboard
fun getLastServerSaveTime(currentTime: ZonedDateTime = ZonedDateTime.now(TIBIA_TIMEZONE)): ZonedDateTime
fun getLastServerSaveTime(currentTime: Instant): Instant

Get the time of the last server save from a currentTime.

Link copied to clipboard
fun getLeaderboardUrl(world: String, rotation: Int? = null, page: Int = 1): String

Get the URL to the Leaderboard of a specific world in Tibia.com.

Link copied to clipboard
fun getNewArchiveFormData(startDate: LocalDate, endDate: LocalDate, categories: Set<NewsCategory>? = null, types: Set<NewsType>? = null): List<Pair<String, String>>

Get the post parameters to filter news in the News Archive.

Link copied to clipboard

Get the URL to the News Archive.

Link copied to clipboard
fun getNewsUrl(newsId: Int): String

Get the URL to a specific news article.

Link copied to clipboard
fun getNextServerSaveTime(currentTime: ZonedDateTime = ZonedDateTime.now(TIBIA_TIMEZONE)): ZonedDateTime
fun getNextServerSaveTime(currentTime: Instant): Instant

Get the time of the next server save from a currentTime.

Link copied to clipboard
fun getStaticFileUrl(vararg path: String, test: Boolean = false): String
fun getStaticFileUrl(path: String, test: Boolean = false): String

Get the URL of a static asset in Tibia.com.

Link copied to clipboard

Get the local datetime in Tibia's servers.

Link copied to clipboard

Get the current day of the week in Tibia

Link copied to clipboard

Get the URL to the list of guilds for a specific world.

Link copied to clipboard

Get the URL to the World Overview section.

Link copied to clipboard

Get the URL to a specific world.

Link copied to clipboard

Return null if the string is blank.

Link copied to clipboard
fun <T> List<T>.offsetStart(offset: Int): List<T>

Get a sublist from the receiver, starting at a certain offset.

Link copied to clipboard

Parse a string into an integer, removing any thousand separators.

Link copied to clipboard

Parse a string into a long integer, removing any thousand separators.

Link copied to clipboard

Parses strings with numbers using "k" as suffix to represent thousands.

Link copied to clipboard

Parses a string containing date from Tibia.com into an LocalDate instance.

Link copied to clipboard
fun parseTibiaDateTime(input: String): Instant

Parses a string containing date and time from Tibia.com into an Instant instance.

Link copied to clipboard
fun parseTibiaForumDateTime(input: String): Instant

Parses a string containing a date time from Tibia.com forums into an Instant instance.

Link copied to clipboard

Parses a string containing date from Tibia.com into an LocalDate instance.

Link copied to clipboard
fun String.remove(value: String, ignoreCase: Boolean = false): String

Remove an arbitrary string from a string, as many times as it is found.

Link copied to clipboard
fun String?.splitList(separator: String = ",", lastSeparator: String = " and "): List<String>

Split a string enumerating elements, using a different separator for the last item.