recipe items not work

Killer_n00b

New Member
im trying make a recipe item that when u dnt get the requirements it give u the recipe scroll this is hwat i have so far like the dotas recpie items:
I00N=light weigth boots the item that requires the recipe
I008=old ugged boots the item required
I007= the sroll or recpie scroll thing u get tell u what is needed until u get requirements

[jass]function Trig_Recipes_Func002Func001Func002001 takes nothing returns boolean
return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00N')) == true )
endfunction
function Trig_Recipes_Func002Func001Func002002 takes nothing returns boolean
return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I007')) == true )
endfunction
function Trig_Recipes_Func002Func001C takes nothing returns boolean
if ( not ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008')) == true ) ) then
return false
endif
if ( not GetBooleanOr( Trig_Recipes_Func002Func001Func002001(), Trig_Recipes_Func002Func001Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Recipes_Func002C takes nothing returns boolean
if ( not Trig_Recipes_Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Recipes_Func003001 takes nothing returns boolean
return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008')) == false )
endfunction
function Trig_Recipes_Func004001 takes nothing returns boolean
return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008')) == false )
endfunction
function Trig_Recipes_Actions takes nothing returns nothing
// Light Weight Boots
if ( Trig_Recipes_Func002C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I007') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00N') )
call UnitAddItemByIdSwapped( 'I00N', GetManipulatingUnit() )
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" )
call TriggerSleepAction( 0.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
else
call DoNothing( )
endif
if ( Trig_Recipes_Func003001() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00N') )
else
call DoNothing( )
endif
if ( Trig_Recipes_Func004001() ) then
call UnitAddItemByIdSwapped( 'I007', GetManipulatingUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Recipes takes nothing returns nothing
set gg_trg_Recipes = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Recipes, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Recipes, function Trig_Recipes_Actions )
endfunction[/jass]

it gives 6 of the srolls lol i dun no y
 
Werbung:
Top