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.

Attack marked Target

Featured Replies

local SpellName = GetSpellInfo(109259)
for i = 1, 4, 1 do
	local UnitIdString = "party" .. i .. "target"
    if UnitExists(UnitIdString) then
		if GetRaidTargetIndex(UnitIdString) == 8 then
			CastSpellByName(SpellName, UnitIdString)
			return
		end
	end
end

hi

how can i use this code in fight class or party command plug in

 

Thanks

Hello,

put this code instead of spell name, and use option spell option 'Not spell, is lua...':

local SpellName = GetSpellInfo(109259)
for i = 1, 4, 1 do
	local UnitIdString = "party" .. i .. "target"
    if UnitExists(UnitIdString) then
		if GetRaidTargetIndex(UnitIdString) == 8 and IsSpellInRange(SpellName,UnitIdString) then
			CastSpellByName(SpellName, UnitIdString)
			return
		end
	end
end

(I have added IsSpellInRange)

And add "lua script" condition:

Lua script:

needToCast=false;
local SpellName = GetSpellInfo(109259)
for i = 1, 4, 1 do
	local UnitIdString = "party" .. i .. "target"
    if UnitExists(UnitIdString) then
		if GetRaidTargetIndex(UnitIdString) == 8 and IsSpellInRange(SpellName,UnitIdString) then
			needToCast=true;
			return
		end
	end
end

Return value research:

true

Return value var:

needToCast

 

 

To use this code in party chat command just use "Action command type" > "Lua" with the first code of this post.

 

of course, replace 109259 by your spell in in all codes.

  • 3 months later...
  • 6 months later...

Does not work for me either.

Can anyone confirm this is working?

I tried several spell IDs and raid target indexes.

 

TBC Private Bot. 

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.