Interrupting channeling spells menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Lightbrand's Avatar Member
    Reputation
    3
    Join Date
    Oct 2008
    Posts
    55
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Interrupting channeling spells

    I've looked through the core.lua for PE to get a sense of how it handles its custom condition "interruptat":

    At first we've got
    Code:
    ProbablyEngine.condition.register('interruptAt', function (target, spell)
        if ProbablyEngine.condition['modifier.toggle']('interrupt') then
        if UnitName('player') == UnitName(target) then return false end
        local stopAt = tonumber(spell) or 95
        local secondsLeft, castLength = ProbablyEngine.condition['casting.delta'](target)
        if secondsLeft and 100 - (secondsLeft / castLength * 100) > stopAt then
            return true
        end
        end
        return false
    end)
    So it checks whether the toggle button is pressed, then it checks if your target is yourself. If so then don't execute. Of course.
    Then it sets up local the variables to do the calculations for the countdown timer (the interrupt at "x percent during cast")

    Here it calls upon a separate custom condition named "casting.delta" to get the cast time variables for the calculation.
    Then it does the math, and execute, we'll get our interrupt. Cool.


    So let's head over to "ProbablyEngine.condition['casting.delta'](target)" to see how that work.
    Code:
    ProbablyEngine.condition.register('casting.delta', function(target, spell)
        local name, startTime, endTime, notInterruptible = checkCasting(target)
        if name and not notInterruptible then
        local castLength = (endTime - startTime) / 1000
        local secondsLeft = endTime / 1000  - GetTime()
        return secondsLeft, castLength
        end
        return false
    end)
    Here we see it call upon another custom function called checkCasting(target), then it checks if the name of the spell is the same, and if it is interruptible (not notinterruptible, double negative) if both pass, then it'll do its own calculation and return value for cast length and seconds left (which was utilized in the earlier code)

    Then let's go check out what that checkCasting(target) function is all about
    Code:
    local function checkCasting(target)
        local name, startTime, endTime, notInterruptible = checkChanneling(target)
        if name then return name, startTime, endTime, notInterruptible end
    
        local name, _, _, _, startTime, endTime, _, _, notInterruptible = UnitCastingInfo(target)
        if name then return name, startTime, endTime, notInterruptible end
    
        return false
    end
    Whoa, we have two things here, first it stores all these variables from checkChanneling(target) custom function.
    Then it does the same for Unitcastinginfo(target), this one is a command from WoW protected lua.

    Okay then our final stop is checkChanneling(target)
    Code:
    local function checkChanneling(target)
        local name_, _, _, _, startTime, endTime, _, notInterruptible = UnitChannelInfo(target)
        if name then return name, startTime, endTime, notInterruptible end
    
        return false
    end
    Huh...that's the same code except replace Unitcastinginfo(target) from checkCasting(target), with Unitchannelinfo(target). Seems to me this could've been fitted into the previous codes. Oh well, probably this is for organization purpose.


    So what I want to do is add something inside the interrupt custom condition like
    elseif checkchanneling(target) and not notInterruptible then return true.

    But that doesn't seem to work.
    Last edited by Lightbrand; 01-18-2015 at 12:56 AM.

    Interrupting channeling spells

Similar Threads

  1. Channeling spells
    By xzidez in forum Diablo 3 Memory Editing
    Replies: 2
    Last Post: 02-12-2013, 02:50 AM
  2. [Exploit] [Post 3.0.8] [Priest] Interrupting spells with levitate
    By Kunstbanause in forum World of Warcraft Exploits
    Replies: 25
    Last Post: 02-01-2009, 07:29 PM
  3. Spell interrupted, cast same school spell anyways!
    By Trufox in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 01-31-2009, 07:22 AM
  4. [Lua] Make mobs channel spell then cast?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 01-18-2008, 03:24 PM
All times are GMT -5. The time now is 02:48 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search