HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help an big NOOB!

02-18-2004, 05:15 PM#1
Alk_High_Elf
I got dl this cool trigger Alcemy.
Since i dont know a thing of making your own spell trigger then i would see if any could help me here.

THats how it looks.

//============================================================================
// Trigger: Alchemie
// Script Author: Darky26
// Info:
//============================================================================

function Trig_Spell_Imunity_Conditions takes nothing returns boolean
return ( GetUnitTypeId(GetSummonedUnit()) == 'nbal' )
endfunction

function Trig_Spell_Imunity_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
if (udg_AlchemieLevel == 1) then
call CreateItemLoc( 'phea', GetUnitLoc(GetSummoningUnit()) )
elseif (udg_AlchemieLevel == 2) then
call CreateItemLoc( 'pghe', GetUnitLoc(GetSummoningUnit()) )
elseif (udg_AlchemieLevel == 3) then
call CreateItemLoc( 'pres', GetUnitLoc(GetSummoningUnit()) )
endif
call UnitAddItemSwapped( GetLastCreatedItem(), GetSummoningUnit() )
endfunction

function Trig_Alchemie_Research_Conditions takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'SPOT' )
endfunction

function Trig_Alchemie_Research_Actions takes nothing returns nothing
set udg_AlchemieLevel = udg_AlchemieLevel + 1
endfunction

//===========================================================================
function InitTrig_Alchemie takes nothing returns nothing
local trigger Alchemie_Research = CreateTrigger( )
set gg_trg_Alchemie = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Alchemie, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Alchemie, Condition( function Trig_Spell_Imunity_Conditions ) )
call TriggerAddAction( gg_trg_Alchemie, function Trig_Spell_Imunity_Actions )
call TriggerRegisterPlayerUnitEventSimple( Alchemie_Research, Player(0), EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( Alchemie_Research, Condition( function Trig_Alchemie_Research_Conditions ) )
call TriggerAddAction( Alchemie_Research, function Trig_Alchemie_Research_Actions )
endfunction


If you can help then i say :D
Right at the time i need a lot of help and that is because im making an Rpg. :ggani:
02-19-2004, 09:44 AM#2
Swine
Hmmm, I'm sure if my JASS scripting wasn't stuffed up i could help...
02-20-2004, 01:49 PM#3
Alk_High_Elf
Well can someone help?
I have waiting for ages... emote_sweat
02-20-2004, 08:08 PM#4
Fladian
... Right...
I think this should be placed in the map development forum :D