View Single Post
02/09/23, 02:54 PM   #6
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 252
haha ya i did test it but was testing other things at the same time and didnt. "clue in" that it was going inside till later.

I am however still having issues with some of the isunitonline and ingroup etc... its messy cuz ive been trying everything to get them passing and not passing when they should but heres a sample of what im trying todo. it shold not continue if im incombat or the target player isnt online or isnt in group and should execute the basic jumpto only giving the error in the top right corner which im happy with.

Code:
-- Travel to player
function RidinDirty.TravelToPlayer()
	local savedPlayer = RidinDirty.savedVariables.savedPlayer
	local effectId = RidinDirty.savedVariables.effectId
	local effectDelay = RidinDirty.savedVariables.effectDelay
	if savedPlayer  == nil or savedPlayer  == "" then return end
	if not IsUnitInCombat(player) then
		if IsUnitOnline(savedPlayer) then 
			if IsPlayerInGroup(savedPlayer) then
				if IsCollectibleUnlocked(effectId) and IsCollectibleUsable(effectId) and GetCollectibleCooldownAndDuration(effectId) == 0 then
					UseCollectible(effectId)
					zo_callLater(function() JumpToGroupMember(savedPlayer) end, effectDelay)
					if effectId == 347 then
						df("|c9900FF[RidinDirty]|r There's a blood mist forming near %s", savedPlayer)
					end
				else
					JumpToGroupMember(savedPlayer)
				end
			else
				JumpToGroupMember(savedPlayer)
			end
		else
			JumpToGroupMember(savedPlayer)
		end
	else
		JumpToGroupMember(savedPlayer)
	end
end
  Reply With Quote