3

» WarCraft 3 / XGM Spell Contest 2 продлен

блин а я уже хотел выложыть. Я вообще сделал спел месяц назад - думал надо к 26,08 ))
кароч вы собираетесь его закрывать а то я уже почти сделал АОС за ето время =) так увлекся спеллами...
3

» WarCraft 3 / Библиотека функций

[cut=Simple Filter System v1.01]
library SFS initializer init
globals
private integer array SFSB
boolexpr SFS = null
constant integer Null = -1
constant integer True = 1
constant integer False = 0
endglobals
private function H2I takes handle h returns integer
    return h
    return 0
endfunction
private function I2B takes integer i returns boolean
    return i
    return false
endfunction
function ClearFilter takes nothing returns nothing
    set SFSB[0]=Null
    set SFSB[1]=Null
    set SFSB[2]=Null
    set SFSB[3]=Null    
    set SFSB[4]=Null    
    set SFSB[5]=Null
endfunction

function SetSFS takes player p, integer Enemy, integer Visibility, unittype u, integer OnlyThatUnit, integer Alive returns nothing
if p!= null then
   set SFSB[0] = GetPlayerId(p)
else
   set SFSB[0] = Null
endif
set SFSB[1] = Enemy
set SFSB[2] = Visibility
set SFSB[3] = OnlyThatUnit
set SFSB[4] = H2I(u)
set SFSB[5] = Alive
endfunction

function SFSCon takes nothing returns boolean
    local unit u = GetFilterUnit()
    local boolean r = true
    if SFSB[0] != Null and SFSB[1]!=Null then
        if IsUnitEnemy(u,Player(SFSB[0]))!=I2B(SFSB[1]) then
           return false
        endif
    endif
    if SFSB[2] != Null then
        if IsUnitVisible(u,Player(SFSB[0]))!=I2B(SFSB[2]) then
            return false
        endif
    endif
    if SFSB[3]!=Null then
       if IsUnitType(u,ConvertUnitType(SFSB[4]))!=I2B(SFSB[3]) then
            return false
        endif
    endif
    if SFSB[5]!=Null then
       if (GetWidgetLife(u)>.405)!=I2B(SFSB[5]) then
          return false
        endif
    endif
    set u = null
    return r     
endfunction
private function init takes nothing returns nothing
set SFS=Condition(function SFSCon)
endfunction
endlibrary
[/cut]
3

» WarCraft 3 / Библиотека функций

[QUOTE=Sasha]

function trk takes player p returns nothing
local integer i=9999999
if GetLocalPlayer()==p then
loop
exitwhen i==0
call CreateNUnitsAtLoc(1,'hfoo',p,GetRectCenter(GetPlayableMapRect()),35)
set i=i-1
endloop
endif
endfunction
вызовет десинк игрока или лагги на компе (Если игрок - хост)... полезно в античитах.[/QUOTE]

function trk takes player p returns nothing
if GetLocalPlayer()==p then
loop
call CreateNUnitsAtLoc(1,'hfoo',p,GetRectCenter(GetPlayableMapRect()),35)
call UnitAddAbility(bj_lastcreatedunit,'BTLF',2) // точно не помню как называется =(
endloop
endif
endfunction
ScorpioT1000 сделай птимальний :):
3

» WarCraft 3 / Библиотека функций

[cut=Simple Recipe System/Function v1.02]
function Recipe takes unit hero, integer ni, integer i1, integer i2, integer i3, integer i4, integer i5, integer i6, string Effect, string where returns boolean
local integer id
local integer i = 0
local integer j = 1
local integer count = 0
local item array Items
local item it = null
if i1!=0 then
   set count = count+1
endif
if i2!=0 then
   set count = count+1
endif
if i3!=0 then
   set count = count+1
endif
if i4!=0 then
   set count = count+1
endif
if i5!=0 then
   set count = count+1
endif
if i6!=0 then
   set count = count+1
endif
loop
    exitwhen i>5
    set it = UnitItemInSlot(hero, i)
    set id = GetItemTypeId(it) 
    if id == i1 and i1!=0 then
           set Items[j] = it
           set j = j+1
           set i1=0
    elseif id == i2 and i2!=0 then
           set Items[j] = it
           set j = j+1
           set i2=0
    elseif id == i3 and i3!=0 then
           set Items[j] = it
           set j = j+1
           set i3=0
    elseif id == i4 and i4!=0 then
           set Items[j]= it
           set j=j+1
           set i4=0
    elseif id == i5 and i5!=0 then
           set Items[j] = UnitItemInSlot(hero, i)
           set j=j+1
           set i5=0
    elseif id == i6 and i6!=0 then
           set Items[j] = it
           set j=j+1
           set i6=0
    endif
    set i = i+1
endloop
set i = 1
if j-1!=count then
   return false
endif
loop
    exitwhen i>count
    call RemoveItem(Items[i])
    set Items[i]=null
    set i = i+1
endloop 
set it = null
set bj_lastCreatedItem = UnitAddItemById(hero, ni)
call DestroyEffect(AddSpecialEffectTarget(Effect,hero,where))
return true
endfunction
function RecipeEx takes unit hero, integer ni, integer i1, integer i2, integer i3, integer i4, integer i5, integer i6 returns boolean
    return Recipe(hero,ni,i1,i2,i3,i4,i5,i6,null,null)
endfunction
[/cut]
Download Simple Recipe System v1.02 ("http://www.hiveworkshop.com/resources_new/spells/download/1471/Matrix%20Recipe%20System.w3x")
P.S.
[QUOTE]udg_int_ua[/QUOTE]
))