Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetPVPTimer

Last wiki revision 2022-07-21

Returns the time left in milliseconds until the player is unflagged for PvP. ms = GetPVPTimer

  • ms:Numbers - Amount of time (in milliseconds) until your PVP flag wears off.
  • If you are flagged for PVP permanently, the function returns 301000.
  • If you are not flagged for PVP the function returns either 301000 or -1.

The following snippet displays your current PVP status: local sec = math.floor(GetPVPTimer/1000) local msg = (not UnitIsPVP("player")) and "You are not flagged for PVP" or (sec==301 and "You are perma-flagged for PVP" or "Your PVP flag wears off in "..(sec>60 and math.floor(sec/60).." minutes " or "")..(sec%60).." seconds") DEFAULT_CHAT_FRAME:AddMessage(msg)

Source

https://warcraft.wiki.gg/wiki/API_GetPVPTimer · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.