Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Come and join our gamer community by
registering for free here
Other Gaming Forum
PC games
WarCraft III Modding
recipe items not work
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Killer_n00b" data-source="post: 125470" data-attributes="member: 6682"><p>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:</p><p>I00N=light weigth boots the item that requires the recipe</p><p>I008=old ugged boots the item required</p><p>I007= the sroll or recpie scroll thing u get tell u what is needed until u get requirements</p><p> </p><p>[jass]function Trig_Recipes_Func002Func001Func002001 takes nothing returns boolean</p><p>return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00N')) == true )</p><p>endfunction</p><p>function Trig_Recipes_Func002Func001Func002002 takes nothing returns boolean</p><p>return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I007')) == true )</p><p>endfunction</p><p>function Trig_Recipes_Func002Func001C takes nothing returns boolean</p><p>if ( not ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008')) == true ) ) then</p><p>return false</p><p>endif</p><p>if ( not GetBooleanOr( Trig_Recipes_Func002Func001Func002001(), Trig_Recipes_Func002Func001Func002002() ) ) then</p><p>return false</p><p>endif</p><p>return true</p><p>endfunction</p><p>function Trig_Recipes_Func002C takes nothing returns boolean</p><p>if ( not Trig_Recipes_Func002Func001C() ) then</p><p>return false</p><p>endif</p><p>return true</p><p>endfunction</p><p>function Trig_Recipes_Func003001 takes nothing returns boolean</p><p>return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008')) == false )</p><p>endfunction</p><p>function Trig_Recipes_Func004001 takes nothing returns boolean</p><p>return ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008')) == false )</p><p>endfunction</p><p>function Trig_Recipes_Actions takes nothing returns nothing</p><p>// Light Weight Boots</p><p>if ( Trig_Recipes_Func002C() ) then</p><p>call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I007') )</p><p>call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I008') )</p><p>call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00N') )</p><p>call UnitAddItemByIdSwapped( 'I00N', GetManipulatingUnit() )</p><p>call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" )</p><p>call TriggerSleepAction( 0.50 )</p><p>call DestroyEffectBJ( GetLastCreatedEffectBJ() )</p><p>else</p><p>call DoNothing( )</p><p>endif</p><p>if ( Trig_Recipes_Func003001() ) then</p><p>call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00N') )</p><p>else</p><p>call DoNothing( )</p><p>endif</p><p>if ( Trig_Recipes_Func004001() ) then</p><p>call UnitAddItemByIdSwapped( 'I007', GetManipulatingUnit() )</p><p>else</p><p>call DoNothing( )</p><p>endif</p><p>endfunction</p><p>//===========================================================================</p><p>function InitTrig_Recipes takes nothing returns nothing</p><p>set gg_trg_Recipes = CreateTrigger( )</p><p>call TriggerRegisterAnyUnitEventBJ( gg_trg_Recipes, EVENT_PLAYER_UNIT_PICKUP_ITEM )</p><p>call TriggerAddAction( gg_trg_Recipes, function Trig_Recipes_Actions )</p><p>endfunction[/jass]</p><p> </p><p>it gives 6 of the srolls lol i dun no y</p></blockquote><p></p>
[QUOTE="Killer_n00b, post: 125470, member: 6682"] 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 [/QUOTE]
Verification
Post reply
Other Gaming Forum
PC games
WarCraft III Modding
recipe items not work
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top