Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
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.
Triggers
Trade Menu.w3x
Variables
Trade dialog <-- This
Tutorial to your map read this
Open menu
Gold
Gold Copier
Lumber
Lumber Copier
Close menu
Debug
EXTRA TIP (don't copy to your map)
Tip DONT
Entrez le code script personnalisé spécifique à la carte ci-dessous. Ce texte sera inclus dans le script de la carte après que les variables auront été déclarées et avant tout code de déclencheur.
Name
Type
is_array
initial_value
Close_menu
button
No
Gold_trade
button
No
Gold_trade_2
button
No
Lumber_trade
button
No
Lumber_trade_2
button
No
Player
player
No
Trade_dialog
dialog
No
1-Copy the trade dialog triggers to your map
2-Go to Sound Edit
3-Search and use all the three sound: Error, ReceiveGold and BundleOfLumber
4-Change the broken triggers with the good Sounds
5-Copy the Ability to your map : Trade Menu
6-Now go to Import (F12)
7-Export the imported files and import them to your map.
8- Double click on The DISBTN one and pastle this (Path) : ReplaceableTextures\CommandButtonsDisabled\DISBTNReturnResources2.blp
9- If you have any questions please go to www.Hiveworkshop.com and go to this spell topic. (Named Trade Menu)
Trigger By: Mouse1234
Open menu
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Trade menu (Neutral Hostile)
Actions
Dialog - Clear Trade_dialog
Dialog - Change the title of Trade_dialog to Trade menu
Dialog - Create a dialog button for Trade_dialog labelled Trade |c00FFFC01100 Gold|r for |c0000804050 Lumber|r
Set Variable Set Lumber_trade = (Last created dialog Button)
Dialog - Create a dialog button for Trade_dialog labelled Trade |c00008040100 Lumber|r for |c00FFFC0150 Gold|r
Set Variable Set Gold_trade = (Last created dialog Button)
Dialog - Create a dialog button for Trade_dialog labelled Trade |c00FFFC011000 Gold|r for |c00008040500 Lumber|r
Set Variable Set Lumber_trade_2 = (Last created dialog Button)
Dialog - Create a dialog button for Trade_dialog labelled Trade |c000080401000 Lumber|r for |c00FFFC01500 Gold|r
Set Variable Set Gold_trade_2 = (Last created dialog Button)
Dialog - Create a dialog button for Trade_dialog labelled Close menu
Set Variable Set Close_menu = (Last created dialog Button)
Dialog - Show Trade_dialog for (Owner of (Triggering unit))
Trigger by: Mouse1234
Gold
Events
Dialog - A dialog button is clicked for Trade_dialog
Conditions
(Clicked dialog button) Equal to Lumber_trade
Actions
Dialog - Clear Trade_dialog
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current gold) Greater than or equal to 100
Then - Actions
Player - Set (Triggering player) . Current gold to (((Triggering player) Current gold) - 100)
Player - Add 50 to (Triggering player) . Current lumber
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play BundleOfLumber <gen>
Custom script: endif
Else - Actions
Game - Display to (Player group((Triggering player))) for 8.00 seconds the text: |c00FFFC01You need 100 Gold|r
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play Error <gen>
Custom script: endif
Trigger by: Mouse1234
Gold Copier
Events
Dialog - A dialog button is clicked for Trade_dialog
Conditions
(Clicked dialog button) Equal to Lumber_trade_2
Actions
Dialog - Clear Trade_dialog
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current gold) Greater than or equal to 1000
Then - Actions
Player - Set (Triggering player) . Current gold to (((Triggering player) Current gold) - 1000)
Player - Add 500 to (Triggering player) . Current lumber
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play BundleOfLumber <gen>
Custom script: endif
Else - Actions
Game - Display to (Player group((Triggering player))) for 8.00 seconds the text: |c00FFFC01You need 1000 Gold|r
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play Error <gen>
Custom script: endif
Trigger by: Mouse1234
Lumber
Events
Dialog - A dialog button is clicked for Trade_dialog
Conditions
(Clicked dialog button) Equal to Gold_trade
Actions
Dialog - Clear Trade_dialog
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current lumber) Greater than or equal to 100
Then - Actions
Player - Set (Triggering player) . Current lumber to (((Triggering player) Current lumber) - 100)
Player - Add 50 to (Triggering player) . Current gold
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play ReceiveGold <gen>
Custom script: endif
Else - Actions
Game - Display to (Player group((Triggering player))) for 8.00 seconds the text: |c00008040You need 100 Lumber|r
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play Error <gen>
Custom script: endif
Trigger by: Mouse1234
Lumber Copier
Events
Dialog - A dialog button is clicked for Trade_dialog
Conditions
(Clicked dialog button) Equal to Gold_trade_2
Actions
Dialog - Clear Trade_dialog
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current lumber) Greater than or equal to 1000
Then - Actions
Player - Set (Triggering player) . Current lumber to (((Triggering player) Current lumber) - 1000)
Player - Add 500 to (Triggering player) . Current gold
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play ReceiveGold <gen>
Custom script: endif
Else - Actions
Game - Display to (Player group((Triggering player))) for 8.00 seconds the text: |c00008040You need 1000 Lumber|r
Set Variable Set Player = (Triggering player)
Custom script: if GetLocalPlayer() == udg_Player then
Sound - Play Error <gen>
Custom script: endif
Trigger by: Mouse1234
Close menu
Events
Dialog - A dialog button is clicked for Trade_dialog
Conditions
(Clicked dialog button) Equal to Close_menu
Actions
Dialog - Hide Trade_dialog for (Triggering player)
Dialog - Clear Trade_dialog
Trigger by: Mouse1234
Debug
Events
Player - Player 1 (Red) skips a cinematic sequence
Player - Player 2 (Blue) skips a cinematic sequence
Player - Player 3 (Teal) skips a cinematic sequence
Player - Player 4 (Purple) skips a cinematic sequence
Conditions
Actions
Dialog - Hide Trade_dialog for Player 1 (Red)
Dialog - Hide Trade_dialog for Player 2 (Blue)
Dialog - Hide Trade_dialog for Player 3 (Teal)
Dialog - Hide Trade_dialog for Player 4 (Purple)
Dialog - Clear Trade_dialog
By: Mouse1234
(Don't copy this to your map its only a tip)
Tip DONT
Events
Time - Every 7.00 seconds of game time
Conditions
Actions
Game - Display to (All players) for 12.00 seconds the text: For Easy cash/wood type in: Greedisgoodby: Mouse1234
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.