- Joined
- Jun 26, 2019
- Messages
- 318
Hello all. I need help with Buying Unit I am working on for a shop with ships. I want the shop to have 2 requirements before sell a ship to buy a new ship for players. "Change ship." So. The 2 requirements I want on players for their ships are: The ship's LIFE % has to be at max (100%) and all the player's ship's abilities has to be finished cooling down. I tried this and it didn't work. Help please? Thank you.
-
Shops Not Buyable1
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Percentage life of (Buying unit)) Equal to 100.00
- (Ability Cooldown of (Buying unit) for ability Captain's Cannon , Level: 1.) Equal to 0.00
-
Or - Any (Conditions) are true
-
Conditions
- (Selling unit) Equal to Main Harbor 0018 <gen>
- (Selling unit) Equal to Main Harbor 0020 <gen>
-
Conditions
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Player - Add (Integer((Current life of (Sold Item)))) to (Owner of (Buying unit)).Current gold
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-class of (Sold Item)) Equal to Campaign
-
Then - Actions
- Player - Add (0 - (Integer((Current life of (Sold Item))))) to (Owner of (Buying unit)).Current gold
- Else - Actions
-
If - Conditions
- Game - Display to (Player group((Owner of (Buying unit)))) the text: |cffFF3333Your ship...
- Wait 0.10 seconds
- Item - Remove (Sold Item)
-
Events