D.E.H.T.A challenge
Prevents you from selecting any hostile/non-friendly beasts as target during the D.E.H.T.A challenges.
|
|
| Quick Facts |
|---|
Prevents you from selecting any hostile/non-friendly beasts as target during the D.E.H.T.A challenges.
Contains custom functions.
Code has been reviewed and is safe to use, custom functions might affect in-game performance.
{
"m": "d",
"d": {
"outline": "OUTLINE",
"color": [
1,
0.05098,
0,
1
],
"customText": "function ()\n\n -- Safety text on screen\n local returntext = \"\";\n\n local badTarget;\n \n -- if we are in the challenge we should have this debuff\n if UnitDebuff(\"player\", \"Nightmare - D.E.H.T.A\") then\n \n -- Grab player info\n local playerRace = select(2, UnitRace(\"player\"));\n local playerRace2 = playerRace;\n if playerRace == \"Scourge\" then\n playerRace2 = \"Undead\";\n end\n local playerGender = UnitSex(\"player\") == 2 and \"Male\" or UnitSex(\"player\") == 3 and \"Female\" or \"Male\";\n \n local soundPath = \"Sound\/Character\/\".. playerRace.. \"\/\" ..playerRace..playerGender.. \"ErrorMessages\/\" ..playerRace2..playerGender.. \"_err_invalidattacktarget02.wav\";\n local soundPath2 = \"Sound\/Character\/\".. playerRace.. \"\/\" ..playerRace2..playerGender.. \"_err_invalidattacktarget02.wav\"; \n \n -- If we have a target\n if UnitExists(\"target\") then\n \n -- Whether our target is possible to harm\n local isBad = UnitIsEnemy(\"player\", \"target\") or not UnitIsFriend(\"player\", \"target\");\n \n -- If our target is a beast or a critter that we can harm\n if UnitCreatureType(\"target\") == \"Beast\" and isBad\n or UnitCreatureType(\"target\") == \"Critter\" and isBad then\n \n -- This is a bad D.H.E.T.A target\n badTarget = true;\n \n end\n\n end\n \n -- Should the warning text appear, make sure it's briefly readable\n if not aura_env.last2 or aura_env.last2 < GetTime() - 1 then\n aura_env.last2 = GetTime();\n \n -- Update warning text\n returntext = badTarget and \"D.H.E.T.A \\n WARNING\" or \"\";\n \n aura_env.returntext = returntext;\n else\n \n returntext = aura_env.returntext;\n \n end\n \n -- Clear the target and play an error message\n if badTarget then \n ClearTarget() \n PlaySoundFile(soundPath);\n PlaySoundFile(soundPath2);\n end\n \n end\n \n -- Display this on screen\n return returntext;\n\nend",
"yOffset": 0,
"anchorPoint": "CENTER",
"displayText_format_p_time_format": 0,
"customTextUpdate": "update",
"automaticWidth": "Auto",
"actions": {
"start": [],
"finish": [],
"init": []
},
"triggers": {
"1": {
"trigger": {
"debuffType": "HELPFUL",
"type": "aura2",
"spellIds": [],
"subeventSuffix": "_CAST_START",
"unit": "player",
"names": [],
"event": "Health",
"subeventPrefix": "SPELL"
},
"untrigger": []
},
"activeTriggerMode": -10
},
"displayText_format_p_format": "timed",
"useTooltip": false,
"selfPoint": "BOTTOM",
"desc": "Prevents you from targeting hostile\/non-friendly beasts.\nTo be used with the D.E.H.T.A challenges.",
"font": "Friz Quadrata TT",
"displayText_format_c_format": "none",
"load": {
"use_never": false,
"talent": {
"multi": []
},
"class": {
"multi": []
},
"spec": {
"multi": []
},
"size": {
"multi": []
}
},
"fontSize": 56,
"source": "import",
"shadowXOffset": 1,
"regionType": "text",
"internalVersion": 53,
"animation": {
"start": {
"easeStrength": 3,
"type": "none",
"duration_type": "seconds",
"easeType": "none"
},
"main": {
"easeStrength": 3,
"type": "none",
"duration_type": "seconds",
"easeType": "none"
},
"finish": {
"easeStrength": 3,
"type": "none",
"duration_type": "seconds",
"easeType": "none"
}
},
"conditions": [],
"displayText_format_p_time_precision": 1,
"displayText_format_p_time_dynamic_threshold": 60,
"shadowYOffset": -1,
"xOffset": 0,
"justify": "CENTER",
"tocversion": 30300,
"id": "D.E.H.T.A Challenge Warning",
"config": [],
"frameStrata": 1,
"anchorFrameType": "SCREEN",
"wordWrap": "WordWrap",
"uid": "EEFPuweibur",
"displayText": "%c",
"authorOptions": [],
"shadowColor": [
0,
0,
0,
1
],
"fixedWidth": 200,
"information": [],
"subRegions": [
{
"type": "subbackground"
}
]
},
"s": "4.2.5",
"v": 1421
}