| 02-20-2004, 12:16 AM | #1 |
I found this trigger while looking through one of Blizzard's campaign maps for inspiration. It's on RoC's 8th Orc Mission(Sorry if it's been posted before, but hey): Code:
Comment: This was the handy-dandy Magic Box item/unit bonus randomizer that never found a place in the game. Hopefully, someone will stumble across this and resurrect it for a casino area on one of their RPG maps. One can only hope...
[font=courier]MagicVault Randomizer
Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
(Unit-type of (Dying unit)) Equal to Magic Vault
Actions
Set VaultRandomizer = (Random integer number between 1 and 20)
Wait 0.10 seconds
If (VaultRandomizer Equal to 1) then do (Unit - Create 1 Shadow Wolf (Level 3) for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 2) then do (Item - Create Stone Token at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 3) then do (Unit - Create 1 Murloc Nightcrawler for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 4) then do (Item - Create Talisman of Evasion at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 5) then do (Unit - Create 1 Flying Sheep for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 6) then do (Item - Create Health Stone at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 7) then do (Unit - Create 1 Captain for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 8) then do (Item - Create Khadgar's Pipe of Insight at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 9) then do (Unit - Create 1 Dire Frost Wolf for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 10) then do (Item - Create Boots of Quel'Thalas +6 at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 11) then do (Unit - Create 1 Kobold Geomancer for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 12) then do (Item - Create Belt of Giant Strength +6 at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 13) then do (Unit - Create 1 Goblin Shredder for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 14) then do (Item - Create Robe of the Magi +6 at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 15) then do (Unit - Create 1 Ogre Lord for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 16) then do (Item - Create Khadgar's Gem of Health at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 17) then do (Unit - Create 1 Gnoll Overseer for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 18) then do (Item - Create Boots of Speed at (Position of (Dying unit))) else do (Do nothing)
If (VaultRandomizer Equal to 19) then do (Unit - Create 1 Magic Vault for Player at (Position of (Dying unit)) facing Default building facing degrees) else do (Do nothing)
If (VaultRandomizer Equal to 20) then do (Item - Create Mana Stone at (Position of (Dying unit))) else do (Do nothing)
[/font]What this does is create a fun-tastic casino thing where when you kill a Magic Vault(or any unit of your choice) when used in conjunction with an Integer Variable. Logically, you could also use it to create things like super-rare item drops. For instance, you could set the value to a random integer between 1 and 100, and set it so an item drops when the random number hits 1. This gives the item a 1% chance to drop in a game, respectively. |
| 02-20-2004, 01:47 PM | #2 |
Yeah sure its a fun trigger, but not really a new idea. |
| 02-20-2004, 01:56 PM | #3 |
it is fun, but next time use the # button instead of the quote button for code. |
| 03-16-2004, 08:47 AM | #4 |
Hey now that gives me a good idea for a map CASIONO FOR CASH.w3x whoever gets the most cash wins weeeee! lol But anyway i quite like that trigger but could anyone give me a quick tutorial on using integers and loops and stuff |
