Spell Meat Hook

Discussion in 'Spells' started by Tinki3, Mar 5, 2007.

  1. Tinki3 Special Member

    A DotA-like Meat Hook.

    Import Difficulty: Low - Medium

    Units Affected: Ground

    Target Type: Point

    Spell Info :

    Launches a bloody hook at a unit or location.
    The hook will snag the first target it encounters, dealing damage then dragging the victim back to the Butcher.

    Level 1 - 400 range, 100 damage.
    Level 2 - 600 range, 200 damage.
    Level 3 - 800 range, 300 damage.
    Level 4 - 1000 range, 400 damage.

    [IMG]

    JASS version updated: 18/05/08

    Attached Files:

    4 people like this.
  2. uberfoop ~=Admiral Stukov=~

    Not bad (the weird pause when the unit is hooked is strangely attractive, lol) but the site already has an MUI meathook template.
  3. Tinki3 Special Member

    I thought the same thing :D
    Template, but not a map.
  4. master maste New Member

    your good :)

    edit: nvm
  5. uberfoop ~=Admiral Stukov=~

    Whats the real difference though? And yours isn't MUI.
  6. Tinki3 Special Member

    nvm? :(

    Real difference is that you can use the spell, not look at a trigger.

    Yes, I know its not MUI. I could've made it MPI, but, no point IMO.
  7. trigger_newb Active Member

    damn mother [censored]er you damn good
    i wish i can be like you
    and i love you for making a map that i requested..
    i also think that this hooks looks cooler than the one in dota
    can you teach me how to make??
    i LOVE YOU<3 <3 <3

    i also like how its shorter (i think) than the one with GUI.
    plz teach me how to make..
  8. Tinki3 Special Member

    Ty :)
    Just copy the triggers?
  9. waaaks! Zinctified

    theres a GUI Meat hook already from emjl3 right? then what's the difference between yours and his?

    BTW, it is good, very nice
    but i don't need it anymore cause i have Meat hook already that was copied from emjlr3 Random DotA Spells......

    ill crave to death when i did'nt have any meat hook triggers and i saw yours....wow.....many ppl will download this map.....
  10. Demi666 New Member

    this is better gj tinki3 :)(L)
  11. trigger_newb Active Member

    actually its no prob.
    i alrady learned it..
    thank you for the map..
    i owe u
  12. SFilip Gone but not forgotten

    Approved, but...
    Set MeatHook_Group[2] = (Random 1 units from MeatHook_Group[1])
    This probably could've been just a unit variable, why is a group needed?
  13. Tinki3 Special Member

    Thanks for all the comments guys.
    I thought not using 2 groups would cause a leak?

    I'll remember to use a unit variable next time.
    1 people like this.
  14. Heyaheya321 New Member

    QUestion

    Do i need the meat hook dummy placed be4 the game starts?
  15. Tinki3 Special Member

    No you don't.

    I just placed it there to preload it ;)
  16. no0by Guest

    Very good

    Nice spell I haven't downloaded it but im sure its good

    P.S. I am making a spell just like this but the 'hook' will slide across the ground in stead of each link 'appering' after the next.

    P.S.S. How much time have you got spare anyway?
  17. Tinki3 Special Member

    Lots
  18. uberfoop ~=Admiral Stukov=~

    I have made said spell before, but with a hammer instead of a hook. Want it?

    edit: I may take time posting it because I'm screwed this week for school. But if I'm uber hardcore maybe like a days time or so. Maybe less. Depends how long it takes me to do this bloody AP work.
  19. Tinki3 Special Member

    Well, I do.

    For the thread anyway, since its related closely to Meat Hook.

    Upload it if you can, that would be great :D
  20. uberfoop ~=Admiral Stukov=~

    K. It's not well efficientized, and I made it a while ago. Still, it works. It isn't formatted to JESP btw.
    Requires the katanna handle variable system.

    Need to put in trigger called Sticky Hammer
    Also needs a standard dummy unit, flying type, no collision, looks like hammer (or whatever the heck you want. If you want a flying tree to hook people back...Go ahead.)

    The ability was designed for a mountain-king type guy. Cuz he already has an anim for this.

    JASS:
    function Trig_Sticky_Hammer_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A00L' //change ID to hook abil ID
    endfunction
    
    function stickycheck takes nothing returns boolean
    return  IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) == false and IsUnitDeadBJ(GetFilterUnit()) != true //change one ID to the hammer and another ID to the hook caster
    endfunction
    
    function stickyhammerloopin takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit h = GetHandleUnit(t,"h")
    local real a = GetHandleReal(t,"a")
    local group g
    local location l
    local unit uu
    local boolean b = false
    call SetUnitFacing(h,a)
    call SetUnitPosition(h,GetUnitX(h)+18*Cos(bj_DEGTORAD*a),GetUnitY(h)+18*Sin(bj_DEGTORAD*a)) //change all 18's to your distance per step
    set l = Location(GetUnitX(h),GetUnitY(h))
    set g = GetUnitsInRangeOfLocMatching(100,l,Condition(function stickycheck)) //100 is hooking range
    if GetHandleUnit(t,"v") == null then
    loop
    set uu = FirstOfGroup(g)
    if IsPlayerEnemy(GetOwningPlayer(uu),GetOwningPlayer(GetHandleUnit(t,"h"))) then
    call SetHandleHandle(t,"v",uu)
    call UnitDamageTargetBJ(h,uu,100*GetHandleReal(t,"d"),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC) //100 is dmg per level
    call SetUnitPathing(uu,false)
    set b = true
    else
    call GroupRemoveUnit(g,uu)
    endif
    exitwhen b == true or FirstOfGroup(g) == null
    endloop
    else
    call SetUnitPosition(GetHandleUnit(t,"v"),GetUnitX(h),GetUnitY(h))
    endif
    call RemoveLocation(l)
    call DestroyGroup(g)
    if GetHandleInt(t,"steps") < 1 then
    call SetUnitPathing(GetHandleUnit(t,"v"),true)
    call KillUnit(GetHandleUnit(t,"h"))
    call FlushHandleLocals(t)
    call DestroyTimer(t)
    endif
    call SetHandleInt(t,"steps",GetHandleInt(t,"steps")-1)
    set t = null
    set h = null
    set l = null
    set uu = null
    endfunction
    
    function stickyhammerloopout takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local timer tt
    local group g = GetUnitsInRangeOfLocMatching(100,GetUnitLoc(GetHandleUnit(t,"h")),Condition(function stickycheck)) //100 is the range that the hook unit detects stuff at
    local unit uu
    local boolean b = false
    local location l = GetUnitLoc(GetHandleUnit(t,"h"))
    local location ll
    call SetUnitPosition(GetHandleUnit(t,"h"),GetUnitX(GetHandleUnit(t,"h"))+(18*Cos(bj_DEGTORAD*GetHandleReal(t,"a"))),GetUnitY(GetHandleUnit(t,"h"))+18*Sin((bj_DEGTORAD*GetHandleReal(t,"a")))) //change all 18's to your distance per step
    loop 
    set uu = FirstOfGroup(g)
    if IsPlayerEnemy(GetOwningPlayer(uu),GetOwningPlayer(GetHandleUnit(t,"h"))) then
    set tt = CreateTimer()
    set ll = Location(GetHandleReal(t,"startx"),GetHandleReal(t,"starty"))
    call UnitDamageTargetBJ(GetHandleUnit(t,"h"),uu,100*GetHandleReal(t,"d"),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC) //damage dealing. 100 is the dmg per level.
    call SetHandleHandle(tt,"v",uu)
    call SetHandleHandle(tt,"h",GetHandleUnit(t,"h"))
    call SetHandleReal(tt,"a",GetHandleReal(t,"a")-180)
    call SetHandleInt(tt,"steps",R2I(DistanceBetweenPoints(l,ll)/18)) // Change 18 to your distance per step
    call SetHandleReal(tt,"d",GetHandleReal(t,"d"))
    call SetUnitPathing(uu,false)
    set b = true
    call TimerStart(tt,.02,true,function stickyhammerloopin)
    call FlushHandleLocals(t)
    call DestroyTimer(t)
    else
    call GroupRemoveUnit(g,uu)
    endif
    exitwhen b == true or FirstOfGroup(g) == null
    endloop
    if GetHandleInt(t,"steps") < 1 and b == false then
    set ll = Location(GetHandleReal(t,"startx"),GetHandleReal(t,"starty"))
    set tt = CreateTimer()
    call SetHandleHandle(tt,"h",GetHandleUnit(t,"h"))
    call SetHandleHandle(tt,"v",GetHandleUnit(t,"h"))
    call SetHandleReal(tt,"a",GetHandleReal(t,"a")-180)
    call SetHandleReal(tt,"d",GetHandleReal(t,"d"))
    call SetHandleInt(tt,"steps",R2I(DistanceBetweenPoints(l,ll)/18)) //change 18 to your distance per step
    call TimerStart(tt,.02,true,function stickyhammerloopin)
    call FlushHandleLocals(t)
    call DestroyTimer(t)
    endif
    call SetHandleInt(t,"steps",GetHandleInt(t,"steps")-1)
    set tt = null
    call DestroyGroup(g)
    call RemoveLocation(l)
    call RemoveLocation(ll)
    set l = null
    set ll = null
    set g = null
    set t = null
    set uu = null
    endfunction
    
    function Trig_Sticky_Hammer_Actions takes nothing returns nothing
    local unit u = GetSpellAbilityUnit()
    local location ll = GetSpellTargetLoc()
    local location l = GetUnitLoc(u)
    local integer steps = R2I(DistanceBetweenPoints(l,ll)/18) //change 18 to your distance per step
    local timer t = CreateTimer()
    local unit h = CreateUnitAtLoc(GetOwningPlayer(u),'h00V',l,GetUnitFacing(u))  //Set h00V to ID of your hammer dummy
    call SetHandleInt(t,"steps",steps)
    call SetHandleHandle(t,"h",h)
    call SetHandleReal(t,"startx",GetUnitX(u))
    call SetHandleReal(t,"starty",GetUnitY(u))
    call SetHandleReal(t,"a",AngleBetweenPoints(l,ll))
    call SetHandleReal(t,"d",GetUnitAbilityLevel(u,'A00L')) //change A00L to your main hook ability
    call TimerStart(t,.02,true,function stickyhammerloopout)
    set t = null
    call RemoveLocation(l)
    call RemoveLocation(ll)
    set u = null
    set h = null
    set l = null
    set ll = null
    endfunction
    
    function InitTrig_Sticky_Hammer takes nothing returns nothing
    set gg_trg_Sticky_Hammer = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Sticky_Hammer,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_Sticky_Hammer,Condition(function Trig_Sticky_Hammer_Conditions))
    call TriggerAddAction(gg_trg_Sticky_Hammer,function Trig_Sticky_Hammer_Actions)
    endfunction

Share This Page