Combat Timer
just a normal combat timer
work everywhere
|
|
| Quick Facts |
|---|
Contains custom functions.
Code has been reviewed and is safe to use, custom functions might affect in-game performance.
{
"m": "d",
"d": {
"outline": "None",
"wagoID": "UDf-_2sy_",
"color": [
0.61569,
0.61569,
0.61569,
0.32
],
"displayText_format_c_gcd_hide_zero": false,
"customText": "function()\n if aura_env.frameCount == 20 then\n -- reset the frame count\n aura_env.frameCount = 1\n \n if WeakAuras.IsOptionsOpen() then return \"00:00\" end \n local runningClock\n \n if aura_env.activate == nil then return \"00:00\" end\n if not aura_env.startTime then aura_env.startTime = GetTime() end\n if aura_env.activate == true then \n runningClock = GetTime() - aura_env.startTime\n elseif aura_env.activate == false then \n runningClock = aura_env.endTime - aura_env.startTime \n \n end\n \n aura_env.display = format(\"%02.f:%02.f\", floor(runningClock \/ 60) , floor(runningClock % 60))\n else\n aura_env.frameCount = aura_env.frameCount + 1\n end\n return aura_env.display\nend\n\n\n\n",
"shadowYOffset": -1,
"anchorPoint": "CENTER",
"displayText_format_c_gcd_gcd": true,
"displayText_format_p_time_format": 0,
"customTextUpdate": "update",
"url": "https:\/\/discord.gg\/byqFz9nRfD",
"actions": {
"start": {
"custom": "--aura_env.region.myBackground:Show()\n",
"do_custom": false
},
"init": {
"custom": "aura_env.display = \"00:00\"\naura_env.frameCount = 0",
"do_custom": true
},
"finish": {
"custom": "--aura_env.region.myBackground:Hide()\n",
"do_custom": false
}
},
"displayText_format_c_gcd_channel": false,
"displayText_format_p_format": "timed",
"internalVersion": 59,
"selfPoint": "CENTER",
"width": 38,
"desc": "simple combat timer ",
"displayText_format_c_gcd_cast": false,
"font": "PT Sans Narrow",
"version": 9,
"displayText_format_c_format": "Number",
"height": 15,
"triggers": {
"1": {
"trigger": {
"use_alwaystrue": true,
"duration": "1",
"genericShowOn": "showOnActive",
"names": [],
"debuffType": "HELPFUL",
"type": "custom",
"subeventSuffix": "_CAST_START",
"custom": "function(e) \n \n if e == \"ENCOUNTER_START\" then\n if not InCombatLockdown() then\n aura_env.startTime = GetTime()\n aura_env.activate = true\n return true\n end \n end\n \n if e == \"PLAYER_REGEN_DISABLED\" then\n if not WeakAuras.CurrentEncounter then\n aura_env.startTime = GetTime()\n aura_env.activate = true\n return true\n end\n end\n \n --fixes login into combat\n if e == \"PLAYER_ENTERING_WORLD\" and InCombatLockdown() then\n aura_env.startTime = GetTime()\n aura_env.activate = true\n return true\n end\n \n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"event": "Conditions",
"custom_type": "event",
"unit": "player",
"unevent": "auto",
"spellIds": [],
"use_unit": true,
"check": "event",
"subeventPrefix": "SPELL",
"events": "PLAYER_ENTERING_WORLD ENCOUNTER_START ENCOUNTER_END PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED",
"custom_hide": "custom"
},
"untrigger": {
"custom": "function(e)\n \n if e == \"ENCOUNTER_END\" then \n if not InCombatLockdown() then\n aura_env.endTime = GetTime() \n aura_env.activate = false\n return true\n end\n \n end\n \n if e == \"PLAYER_REGEN_ENABLED\" then\n if not WeakAuras.CurrentEncounter then\n aura_env.endTime = GetTime()\n aura_env.activate = false\n return true\n end \n end\n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
}
},
"2": {
"trigger": {
"type": "unit",
"use_incombat": true,
"subeventSuffix": "_CAST_START",
"use_absorbMode": true,
"event": "Conditions",
"unit": "player",
"subeventPrefix": "SPELL",
"use_unit": true,
"genericShowOn": "showOnActive",
"unevent": "auto",
"duration": "1"
},
"untrigger": []
},
"disjunctive": "any",
"activeTriggerMode": -10
},
"load": {
"ingroup": {
"single": "group",
"multi": {
"group": true,
"raid": true
}
},
"talent": {
"multi": []
},
"spec": {
"multi": []
},
"use_combat": true,
"class": {
"multi": []
},
"size": {
"multi": []
}
},
"fixedWidth": 58,
"displayText_format_c_decimal_precision": 1,
"fontSize": 36,
"source": "import",
"shadowXOffset": 1,
"semver": "1.0.9",
"uid": "C(ANTnTRIfr",
"anchorFrameFrame": "ElvUF_Player",
"regionType": "text",
"yOffset": -115,
"animation": {
"start": {
"type": "none",
"easeStrength": 3,
"duration_type": "seconds",
"easeType": "none"
},
"main": {
"type": "none",
"easeStrength": 3,
"duration_type": "seconds",
"easeType": "none"
},
"finish": {
"type": "none",
"easeStrength": 3,
"duration_type": "seconds",
"easeType": "none"
}
},
"automaticWidth": "Auto",
"displayText_format_p_time_precision": 1,
"xOffset": 10,
"displayText_format_c_color": true,
"displayText": "%c",
"conditions": [
{
"check": {
"trigger": 1,
"variable": "show",
"value": 1
},
"changes": [
{
"property": "color"
}
]
}
],
"justify": "LEFT",
"displayText_format_c_abbreviate": false,
"tocversion": 30300,
"id": "Combat Timer",
"subRegions": [
{
"type": "subbackground"
}
],
"frameStrata": 3,
"anchorFrameType": "SCREEN",
"displayText_format_c_abbreviate_max": 8,
"config": [],
"displayText_format_p_time_dynamic_threshold": 60,
"authorOptions": [],
"shadowColor": [
0,
0,
0,
0
],
"displayText_format_c_realm_name": "never",
"information": {
"forceEvents": true,
"ignoreOptionsEventErrors": true
},
"wordWrap": "WordWrap"
},
"s": "4.2.5",
"v": 1421
}