Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API GetPVPTimer
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} Returns the amount of time left on your PVP flag. ms = GetPVPTimer() == Returns == ;ms : Numbers - Amount of time (in milliseconds) until your PVP flag wears off. == Details == * 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 == 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)
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)