Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orc or dummy

Featured Replies

I am very unhappy with the enemy detection. Without any changes my fight class profile will work on enemys and training dummys . But it try to attack friendly Enemys like the Orcs on the Netherwing Ledge. Also I have problems with the Brawl'gar Arena. (nothing happens).

A workaround for the Brawl'gar Arena is to disable "only in combat" and using "targettargeting me" instead.

A workaround for the Orcs is "unitisEnemy" and "UnitCanAttack", but with this , the Profile doesnt work on Training dummys.

So i try to work on a lua-script solution like this:
 

local L = MyLocalizationTable
local frame = CreateFrame("Frame")
DEFAULT_CHAT_FRAME:AddMessage("start")
if (GetUnitName("target") == L["Training Dummy"]) or (GetUnitName("target") == L["Raider's Training Dummy"]) then
	DEFAULT_CHAT_FRAME:AddMessage("dummy")
	retV=1
else
	DEFAULT_CHAT_FRAME:AddMessage("target")
	retV=UnitIsEnemy("player","target")
end
DEFAULT_CHAT_FRAME:AddMessage("end")

(frameoutput is for test only)

 

if retV=1 all is fine

But this displays only "start" on the chat-frame. no "end", no "dummy", no "target". And the conditon is never true at a dummy .

Any Ideas?

print("start")
if (GetUnitName("target") == "Training Dummy") or (GetUnitName("target") == "Raider's Training Dummy") then
	print("dummy")
	retV=1
else
	print("target")
	retV=UnitIsEnemy("player","target")
end
print("end")

ps: You can test your script and get lua error in "Tools" > "Development tools", copy your code in text zone and click on buton "Lua (retu...".

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.