1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Some Spells

Discussion in 'Requests' started by Giantr, Dec 16, 2008.

  1. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Edit : I accidentally named the tread wrongly this is just for one spell

    I hope this isn't too much trouble I want a spell like DotA's berserker's call to help you I'll post here some info I found on the official site

    Berserker's Call (A0I6)
    Based on Channel.

    When it goes into effect, give it an item armor bonus ability (A0I5), set GlobalVariableUnit (OOO0IO) as Axe, GlobalVariableInt (I110I) as 0, and count enemy non ancient (except spirit bear) nondummy non structure alive non cycloned that is not under the effect of Shackles or cyclone. And for each unit on the group do the following: increase GlobalVariableInt by 1, show the FX on the EnumUnit's chest and tell the unit to attack GlobalVariableUnit. Now, save "MaxFX" (GlobalVariableInt), "Hero" (Axe) and "Group" (all the units just affected) to the cache, and create a new trigger which runs 1+0.5*Calllvl seconds later, or whenever a unit is issued an order.

    This newly created trigger recovers "Group", "Hero" and "MaxFX" from the cache, and then if it wasn't called because a unit has been issued an order, remove the armor bonus ability from "Hero", destroy the FX of all the units in the group and destroy the group "Group". Finally, disable this trigger. If it was called because a unit has been issued an order, Disable this trigger (to prevent looping), tell the Triggering unit to attack "Hero" and then reenable this trigger.

    Note that the standard trigger tries to account for non cycloned units but it fails (the reason I don't know, it checks if the unit has Bcyc buff and if that's false the check comes true), while this one doesn't affect cycloned units for real, the only change is that this one does this check: GetUnitAbilityLevel(GetFilterUnit(),1113815395)==0 (with 1113815395 being Bcyc), while the normal one has GetUnitAbilityLevel(u,1113815395)>0 that asks to be false.


    can be done differently it's up to you

    Thank you in advance