- Joined
- Jun 7, 2008
- Messages
- 440
I got a herotavern that can sell heros. My problem is when a certain hero is sold, I want the computer to create the 4 spellbooks and give it to the hero. Ive tried triggering it, but im messing up somewhere. Any ideas?
-
Events
-

Unit - A unit owned by Neutral Passive Sells a unit
-
-
Conditions
-

((Unit-type of (Selling unit)) Equal to Hero Select 1 (Lordaeron Summer))
-
-
Actions
-

Unit - Remove (Buying unit) from the game
-

If (((Buying unit) belongs to an ally of Player 10 (Light Blue)) Equal to True) then do (Set RandomUnitLight = (Buying unit)) else do (Set RandomUnitDark = (Buying unit))
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



((Buying unit) belongs to an ally of Player 10 (Light Blue)) Equal to True
-
-


Then - Actions
-



Set RandomUnitLight = (Sold unit)
-



If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




If - Conditions
-





(Unit-type of (Sold unit)) Equal to Wizard
-
-




Then - Actions
-





Hero - Create Spellbooks[1] and give it to Hero
-





Hero - Create Spellbooks[2] and give it to Hero
-





Hero - Create Spellbooks[3] and give it to Hero
-





Hero - Create Spellbooks[4] and give it to Hero
-
-




Else - Actions
-
-



Unit - Move RandomUnitLight instantly to (Center of Light Teleport Base <gen>)
-



Camera - Pan camera for (Owner of RandomUnitLight) to (Center of Light No Entry Zone <gen>) over 2.00 seconds
-



Custom script: call SetPlayerPrefix(udg_RandomUnitLight)
-



Set Players_Hero[(Player number of (Owner of (Buying unit)))] = RandomUnitLight
-



Game - Display to (All allies of Player 12 (Brown)) the message: (Player_Color[(Player number of (Triggering player))] + ( has selected: |cffffcc00 + ((Name of RandomUnitLight) + |r)))
-



Unit - Set mana of RandomUnitLight to 100.00%
-



Unit Group - Add RandomUnitLight to LightHero
-



Set RandomUnitLight = No unit
-



Cinematic - Fade in over 2.00 seconds using texture Dream and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
-


Else - Actions
-



Set RandomUnitDark = (Sold unit)
-



Unit - Move RandomUnitDark instantly to (Center of Dark Teleport Base <gen>)
-



Camera - Pan camera for (Owner of (RandomUnitDark)) to (Center of Dark Teleport Base <gen>) over 2.00 seconds
-



Custom script: call SetPlayerPrefix(udg_RandomUnitDark)
-



Set Players_Hero[(Player number of (Owner of (Entering unit)))] = RandomUnitDark
-



Game - Display to (All allies of Player 10 (Light Blue)) the message: (Player_Color[(Player number of (Triggering player))] + ( has selected: |cffffcc00 + ((Name of RandomUnitDark) + |r)))
-



Unit - Set mana of RandomUnitDark to 100.00%
-



Unit Group - Add RandomUnitDark to DarkHero
-



Set RandomUnitDark = No unit
-



Cinematic - Fade in over 2.00 seconds using texture Dream and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
-
-

