TheShoppe
Events
Player - Player 1 (Red) types a chat message containing -shopmenu as An exact match
Conditions
Hero[(Player number of (Triggering player))] Not equal to No unit
Actions
Dialog - Clear ShopMenus[0]
Dialog - Change the title of ShopMenus[0] to Basic Equipment
Dialog - Create a dialog button for ShopMenus[0] labelled Basic Sword -- 300 Gold
Set MenuButtons[0] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[0] labelled Basic Bow -- 300 Gold
Set MenuButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[0] labelled Basic Staff -- 300 Gold
Set MenuButtons[2] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[0] labelled Basic Armor -- 500 Gold
Set MenuButtons[3] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[0] labelled Advanced Equipment
Set MenuButtons[4] = (Last created dialog Button)
Dialog - Show ShopMenus[0] for (Triggering player)
ShoppeButtonClick
Events
Dialog - A dialog button is clicked for ShopMenus[0]
Dialog - A dialog button is clicked for ShopMenus[1]
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[0]
((Triggering player) Current gold) Greater than or equal to 300
Then - Actions
Hero - Create Basic Sword and give it to Hero[(Player number of (Triggering player))]
Player - Add -300 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[1]
((Triggering player) Current gold) Greater than or equal to 300
Then - Actions
Hero - Create Basic Bow and give it to Hero[(Player number of (Triggering player))]
Player - Add -300 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[2]
((Triggering player) Current gold) Greater than or equal to 300
Then - Actions
Hero - Create Basic Staff and give it to Hero[(Player number of (Triggering player))]
Player - Add -300 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[3]
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Hero - Create Basic Armor and give it to Hero[(Player number of (Triggering player))]
Player - Add -500 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[4]
Then - Actions
Dialog - Clear ShopMenus[1]
Dialog - Change the title of ShopMenus[1] to Advanced Equipment
Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Sword -- 750 Gold
Set MenuButtons[5] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Bow -- 750 Gold
Set MenuButtons[6] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Staff -- 750 Gold
Set MenuButtons[7] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[1] labelled Advanced Armor -- 1000 Gold
Set MenuButtons[8] = (Last created dialog Button)
Dialog - Create a dialog button for ShopMenus[1] labelled Basic Equipment
Set MenuButtons[9] = (Last created dialog Button)
Dialog - Show ShopMenus[1] for (Triggering player)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[5]
((Triggering player) Current gold) Greater than or equal to 750
Then - Actions
Hero - Create Advanced Sword and give it to Hero[(Player number of (Triggering player))]
Player - Add -750 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[6]
((Triggering player) Current gold) Greater than or equal to 750
Then - Actions
Hero - Create Advanced Bow and give it to Hero[(Player number of (Triggering player))]
Player - Add -750 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[7]
((Triggering player) Current gold) Greater than or equal to 750
Then - Actions
Hero - Create Advanced Staff and give it to Hero[(Player number of (Triggering player))]
Player - Add -750 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[8]
((Triggering player) Current gold) Greater than or equal to 1000
Then - Actions
Hero - Create Advanced Armor and give it to Hero[(Player number of (Triggering player))]
Player - Add -1000 to (Triggering player) Current gold
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to MenuButtons[9]
Then - Actions
Trigger - Run TheShoppe <gen> (ignoring conditions)
Else - Actions