local i,id

WhatsNext:AddConditionalStatement("ExtraActionButton Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		return ExtraActionButton1:IsVisible()
	end,
	text = function(checkTable) 
		return "player has an extra action button ability."
	end,
	arguments = {}
})

WhatsNext:AddConditionalStatement("Exists ExtraActionButton Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		return ExtraActionButton1:IsVisible() and WN_GetSpellName(checkTable.spellName) == WN_GetSpellName(select(2,GetActionInfo(169)))
	end,
	text = function(checkTable) 
		return "player has the extra action button ability " .. WN_GetSpellName(checkTable.spellName) .. "."
	end,
	arguments = {
		spellName = {type = "spell", default = ""}
	}
})

WhatsNext:AddConditionalStatement("ExtraActionBar Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		for i=121,144 do
			id = select(2,GetActionInfo(i))
			if id and id > 0 then
				return true
			end
		end
		return false
	end,
	text = function(checkTable) 
		return "player has an extra action bar ability."
	end,
	arguments = {}
})

WhatsNext:AddConditionalStatement("Exists ExtraActionBar Ability",{
	category = "Temp. Abilities",
	test = function(checkTable) 
		for i=121,144 do
			id = select(2,GetActionInfo(i))
			if id and id > 0 and WN_GetSpellName(checkTable.spellName) == WN_GetSpellName(id) then
				return true
			end
		end
		return false
	end,
	text = function(checkTable) 
		return "player has the extra action bar ability " .. WN_GetSpellName(checkTable.spellName) .. "."
	end,
	arguments = {
		spellName = {type = "spell", default = ""}
	}
})


