Code
function Trig_and_Func001C takes nothing returns boolean
if ( not ( true == true ) ) then
return false
endif
if ( not ( false == false ) ) then
return false
endif
return true
endfunction
function Trig_and_Conditions takes nothing returns boolean
if ( not Trig_and_Func001C() ) then
return false
endif
return true
endfunction
function Trig_and_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_and takes nothing returns nothing
set gg_trg_and = CreateTrigger( )
call TriggerAddCondition( gg_trg_and, Condition( function Trig_and_Conditions ) )
call TriggerAddAction( gg_trg_and, function Trig_and_Actions )
endfunction
Code
function Trig_without_Conditions takes nothing returns boolean
if ( not ( true == true ) ) then
return false
endif
if ( not ( false == false ) ) then
return false
endif
return true
endfunction
function Trig_without_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_without takes nothing returns nothing
set gg_trg_without = CreateTrigger( )
call TriggerAddCondition( gg_trg_without, Condition( function Trig_without_Conditions ) )
call TriggerAddAction( gg_trg_without, function Trig_without_Actions )
endfunction
В if/then/else то же самое.