|
楼主 |
发表于 2008-1-19 13:02:05
|
显示全部楼层
OK,我还是没成功。。
帮我看看code 吧。。这是没改过的
[codes=jass]function Trig_test_3_Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitItemInSlotBJ(udg_sfUnit, udg_x3[2]) == null ) ) then
return false
endif
return true
endfunction[/codes]
[codes=jass]function Trig_test_3_Func002C takes nothing returns boolean
if ( not ( udg_x3[1] >= 5 ) ) then
return false
endif
return true
endfunction[/codes]
[codes=jass]function Trig_test_3_Actions takes nothing returns nothing
set udg_sfUnit = GetSpellAbilityUnit()
if ( Trig_test_3_Func002C() ) then
set udg_x3[2] = 1
loop
exitwhen udg_x3[2] > 6
if ( Trig_test_3_Func002Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'modt', udg_sfUnit )
else
endif
set udg_x3[2] = udg_x3[2] + 1
endloop
set udg_x3[1] = 0
else
endif
set udg_x3[1] = ( udg_x3[1] + 1 )
endfunction[/codes]
//===========================================================================
[codes=jass]function InitTrig_test_3 takes nothing returns nothing
set gg_trg_test_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_test_3, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( gg_trg_test_3, function Trig_test_3_Actions )
endfunction[/codes] |
|