got it working
Code:
ProbablyEngine.library.register('DGTLibary',
{
FakeCastCheck = function(SpellName, TimeLeftBeforeStopcast)
local spellID, _, _, _, _, endTime = UnitCastingInfo("player")
if spellID then
local finish = endTime/1000 - GetTime()
if spellID == tostring(SpellName) and finish < tonumber(TimeLeftBeforeStopcast) then
return true
end
end
return false
end,
})
Code:
{{
{"/stopcasting",{"@DGTLibary.FakeCastCheck('NAME OF FAKECAST SPELL',CANCELTIME)","modifier.lcontrol"},nil},
{"FAKECASTSPELLt",{"modifier.lcontrol"},"player"},
},"modifier.lcontrol"},