104,671pages on
this wiki
Add New Page
Talk0 Share
WoW API < GetPVPTimer

Returns the amount of time left on your PVP flag.

ms = GetPVPTimer()

Returns Edit

Numbers - Amount of time (in milliseconds) until your PVP flag wears off.

Details Edit

  • 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.

Example Edit

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")

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki