Okay danke ...
ich habs mal so probiert:
--[[ ShammyLoss ]]--
--[[ Settings ]]--
local Spells1 = {"Verhexen", "Verwandlung", "Wirbelsturm", Tieffrieren", "Streuschuss", "Stille", "Gegenzauber", "Unterdr\195\188ckender Schuss", "Strangulieren", "Sonnenstrahl", "Zaubersperre"}
local Spells2 = {"Verwandlung", "Verhexen", "Wirbelsturm", "Gedankenkontrolle"; "Böses vertreiben"}
local Spells3 = {"Drohruf"}
local Spells4 = {"Unterbrechender Ruf", "Tritt", "Zurechtweisung", "Windsto\195\188", "Zuschlagen", "Gedankenfrost", "Sch\195\164delsto\195\188"}
local ShowInfo = true; -- Prints information about taken actions in Chatwindow
local Delay = 0.002; -- The Delay the Script waits for casting in seconds.
local SetStopCasting = true;
function ACCprint(msg)
if ShowInfo == true then print("|cFF00CCFFAntiCC: |r" .. msg); end
end
function IsCastingOrChanneling()
if UnitCastingInfo("player") or UnitChannelInfo("player") and SetStopCasting == true then return 1; end
end
local Timer, Reset, ACCSpell = 0, true;
local type, hideCaster, srcGUID, srcName, srcFlags, srcFlags2, dstGUID, dstName, spellName, spellSchool, missType;
function Queue()
if GetTime() >= Timer and Reset == false then
if GetSpellCooldown(ACCSpell) == 0 then
if IsCastingOrChanneling() == 1 then SpellStopCasting(); end
ACCprint("|cFFFF6060" .. srcName .. "|r" .. " hits you with " .. "|cFFFFFF00" .. spellName .. "|r" .. ". Trying to cast " .. ACCSpell .. "...");
else
ACCprint("|cFFFF6060" .. srcName .. "|r" .. " hits you with " .. "|cFFFFFF00" .. spellName .. "|r" .. ". Unfortunately " .. ACCSpell .. " is on Cooldown. :(");
end
CCSrc = GetObjectFromGUID(srcGUID);
CCSrc:CastSpellByName(ACCSpell);
Reset = true;
end
end
SetTimerCallback (Queue, 1);
local frame = CreateFrame("FRAME", "AntiCC");
frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") ;
local function eventHandler(self, event, ...)
type, hideCaster, srcGUID, srcName, srcFlags, srcFlags2, dstGUID, dstName = select(2, ...); -- Read Combat Log
if type == "SPELL_CAST_SUCCESS" then
spellName = select(13, ...)
if dstName == UnitName("player") and tContains(Spells1, spellName) then
Timer = GetTime() + Delay;
Reset = false;
ACCSpell = "Totem der Erdung";
elseif dstName == UnitName("player") and tContains(Spells2, spellName) then
Timer = GetTime() + Delay;
Reset = false;
ACCSpell = "Windsto\195\188";
elseif dstName == UnitName("player") and tContains(Spells3, spellName) then
Timer = GetTime() + Delay;
Reset = false;
ACCSpell = "Totem des Erdstoßes";
elseif dstName == UnitName("player") and tContains(Spells4, spellName) then
Timer = GetTime() + Delay;
Reset = false;
ACCSpell = "Automatischer Angriff";
end
elseif type == "SPELL_MISSED" then
spellName, spellSchool, missType = select(13, ...)
if dstName == UnitName("player") and (tContains(Spells1, spellName) or tContains(Spells2, spellName) or tContains(Spells3, spellName) ) and not missType == "ABSORB" then
Reset = true;
ACCprint("|cFFFF6060" .. srcName .. "|r" .. " casted " .. "|cFFFFFF00" .. spellName .. "|r" .. " on you, but it failed (" .. missType .. ").");
end
end
end
frame:SetScript("OnEvent", eventHandler);
print("|cFF00CCFFShamyLoss: |r" .. "loaded.");
und hab dann ingame .luaload lol.lua (so heißt die datei bei mir) eingegeben...
leider kommt keine nachricht das es geladen wurde :/ es kommt aber auch nichts von wegen script name nicht gefunden oder so ... naja jedenfalls tut sich nichts hab ich was falsch gemacht? wäre dankbar für deine hilfe =D
noch ein Frage warum steht da zb Windsto\195\188 statt Windstoß? kann der kein ß lesen? welches programm nimmst du zum editieren? kann man das überhaupt wie ich mit editor einfach machen?