• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Cero

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Jass,MUI Spell.
Cero from bleach.
[jass=Cero]
function Trig_Spell_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A001'
endfunction

function Trig_Spell_Actions2 takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local unit u = LoadUnitHandle(udg_Hash,id,0)
local real x = LoadReal(udg_Hash,id,1)
local real y = LoadReal(udg_Hash,id,2)
local real a = Atan2(LoadReal(udg_Hash,id,4)-y,LoadReal(udg_Hash,id,3)-x)
local real d = LoadReal(udg_Hash,id,5)
local group g = LoadGroupHandle(udg_Hash,id,6)
local integer idg = GetHandleId(g)
local unit e
local player p = GetOwningPlayer(u)
local unit n
local integer ide
if d < 2000 then
set n = CreateUnit(p,'h002',x+d*Cos(a),y+d*Sin(a),a*bj_RADTODEG)
call UnitAddAbility(n,'Arav')
call SetUnitTimeScale(n,0)
call UnitApplyTimedLife(n,1,0.75)
call SaveReal(udg_Hash,id,5,d+40)
call GroupEnumUnitsInRange(g,x+d*Cos(a),y+d*Sin(a),125,null)
loop
set e = FirstOfGroup(g)
exitwhen e == null
set ide = GetHandleId(e)
if (IsUnitEnemy(e,p) and e != LoadUnitHandle(udg_Hash,idg,ide)) then
call UnitDamageTarget(u,e,150*GetUnitAbilityLevel(u,'A001'),false,false,null,null,null)
call SaveUnitHandle(udg_Hash,idg,ide,e)
endif
call GroupRemoveUnit(g,e)
endloop
else
call DestroyTimer(t)
call DestroyGroup(g)
call FlushChildHashtable(udg_Hash,id)
call FlushChildHashtable(udg_Hash,idg)
call ResetTerrainFog()
endif
set n = null
set p = null
set u = null
set e = null
set g = null
endfunction

function Trig_Spell_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local timer t = CreateTimer()
local integer id = GetHandleId(t)
local group g = CreateGroup()
call SetTerrainFogEx(0,0,8000,25,100,0,0)
call SaveGroupHandle(udg_Hash,id,6,g)
call SaveReal(udg_Hash,id,5,100)
call SaveUnitHandle(udg_Hash,id,0,u)
call SaveReal(udg_Hash,id,1,GetUnitX(u))
call SaveReal(udg_Hash,id,2,GetUnitY(u))
call SaveReal(udg_Hash,id,3,GetSpellTargetX())
call SaveReal(udg_Hash,id,4,GetSpellTargetY())
call TimerStart(t,0.008,true,function Trig_Spell_Actions2)
set u = null
set t = null
set g = null
endfunction

//===========================================================================
function InitTrig_Spell takes nothing returns nothing
set gg_trg_Spell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spell, Condition( function Trig_Spell_Conditions ) )
call TriggerAddAction( gg_trg_Spell, function Trig_Spell_Actions )
endfunction
[/code]

Keywords:
Cero,Bleach,Ichigo
Contents

Еще одна карта (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 21st May 2012 Bribe: Indent your blocks. Let me know when you do and I will come back and review your spell.

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

21st May 2012
Bribe: Indent your blocks. Let me know when you do and I will come back and review your spell.
 
Top