- Joined
- Jun 2, 2009
- Messages
- 1,193
Hello everyone. I have a system called Team Points. Team Point is the common point that can be used for various upgrades for the team.
For the create this system, first i have created shops, items and this trigger.
Players can be use these upgrade only once, so it can be removed from the shop when it's used (IF THEY HAVE THE REQUIRED TEAM POINTS)
Armor Upgrade
Hit Point Upgrade
Tower Upgrade
Slayer Upgrade
Guardian Upgrade
Guardian Transfer
And these upgrades can be used many times. These upgrades should not be removed from the shop.
Creep Upgrade
Rock
Ogre Mauler
Infernal
Here is the example.
If you don't have the specific Team Points, it will re-add this item to the shop again.
Additionally i have a several upgrades can be used more than one.
On secondary click nothing happend.
After this point, one of the items removes from the shop when everytime i have click on the armor upgrade.
It is complicated, i don't know how to explain. Just ask me for any details you want to learn.
When you click on the Creep Upgrade game checks Team Point (integer) value. When you have the required teampoint, it will add this upgrade into the shop again.
But many of the upgrades can be used only once. When you click on the Hit Point Upgrade when you have 600 Team Points, it will apply upgrade and removes the item from shop. But if you don't have required Team Points, game should add this upgrade again into the shop.
When i will add these upgrades as standard items, there are no way to check this >>> If the Team Point value lesser or equal to X, DO NOT BUY ITEM.
When you click the item, it simply checks your gold and lumber. If you have required lumber or gold, you can buy it. If you don't, you cannot. This is why i have created my own buy system.
I do not have to remove and add items. You can suggest different solution if you want.
This is the trigger of clicked item. (CHECK ATTACHMENT)
For the create this system, first i have created shops, items and this trigger.
Players can be use these upgrade only once, so it can be removed from the shop when it's used (IF THEY HAVE THE REQUIRED TEAM POINTS)
Armor Upgrade
Hit Point Upgrade
Tower Upgrade
Slayer Upgrade
Guardian Upgrade
Guardian Transfer
And these upgrades can be used many times. These upgrades should not be removed from the shop.
Creep Upgrade
Rock
Ogre Mauler
Infernal
-
LichDukkan
-
Events
- Map initialization
- Conditions
-
Actions
- -------- devil shoplar --------
- Neutral Building - Add Dragons to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Armor Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Creep Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Hit Point Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Tower Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Slayer Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Guardian Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Guardian Transfer to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Rock to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Ogre Mauler to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Infernal to Lich 0086 <gen> with 1 in stock and a max stock of 1
- -------- reaper shoplar --------
- Neutral Building - Add Dragons to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Armor Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Creep Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Hit Point Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Tower Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Slayer Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Guardian Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Guardian Transfer to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Rock to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Ogre Mauler to Lich 0078 <gen> with 1 in stock and a max stock of 1
- Neutral Building - Add Infernal to Lich 0078 <gen> with 1 in stock and a max stock of 1
-
Events
Here is the example.
-
Defense Upgrade
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
- (Item-type of (Sold Item)) Equal to Armor Upgrade
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Buying unit)) is an ally of ClanDevilPlayer) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[1] Greater than or equal to 500
- (Current research level of Defense Upgrade Devil for ClanDevilPlayer) Less than ((Max research level of Defense Upgrade Devil for ClanDevilPlayer) - 1)
-
Then - Actions
- Floating Text - Change text of FloatTeamPoints[1] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[1]))) using font size 10.00
- Player - Set the current research level of Defense Upgrade Devil to ((Current research level of Defense Upgrade Devil for ClanDevilPlayer) + 1) for ClanDevilPlayer
- Set StringTeamPoint[1] = (StringTeamPoint[1] - 500)
-
Else - Actions
- Neutral Building - Add Armor Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[2] Greater than or equal to 500
- (Current research level of Defense Upgrade Reaper for ClanReaperPlayer) Less than ((Max research level of Defense Upgrade Reaper for ClanReaperPlayer) - 1)
-
Then - Actions
- Floating Text - Change text of FloatTeamPoints[2] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[2]))) using font size 10.00
- Player - Set the current research level of Defense Upgrade Reaper to ((Current research level of Defense Upgrade Reaper for ClanReaperPlayer) + 1) for ClanReaperPlayer
- Set StringTeamPoint[2] = (StringTeamPoint[2] - 500)
-
Else - Actions
- Neutral Building - Add Armor Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Trigger - Run Table Update Lumbers <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
If you don't have the specific Team Points, it will re-add this item to the shop again.
Additionally i have a several upgrades can be used more than one.
-
Creep Upgrade
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
- (Item-type of (Sold Item)) Equal to Creep Upgrade
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Buying unit)) is an ally of ClanDevilPlayer) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[1] Greater than or equal to 200
-
Then - Actions
- Floating Text - Change text of FloatTeamPoints[1] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[1]))) using font size 10.00
- Player - Set the current research level of Creep Upgrade orta devil to ((Current research level of Creep Upgrade orta devil for ClanDevilPlayer) + 1) for ClanDevilPlayer
- Player - Set the current research level of Creep Upgrade alt devil to ((Current research level of Creep Upgrade alt devil for ClanDevilPlayer) + 1) for ClanDevilPlayer
- Player - Set the current research level of Creep Upgrade ust devil to ((Current research level of Creep Upgrade ust devil for ClanDevilPlayer) + 1) for ClanDevilPlayer
- Set StringTeamPoint[1] = (StringTeamPoint[1] - 200)
- Neutral Building - Add Creep Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
-
Else - Actions
- Neutral Building - Add Creep Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[2] Greater than or equal to 200
-
Then - Actions
- Floating Text - Change text of FloatTeamPoints[2] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[2]))) using font size 10.00
- Player - Set the current research level of Creep Upgrade alt reaper to ((Current research level of Creep Upgrade alt reaper for ClanReaperPlayer) + 1) for ClanReaperPlayer
- Player - Set the current research level of Creep Upgrade ust reaper to ((Current research level of Creep Upgrade ust reaper for ClanReaperPlayer) + 1) for ClanReaperPlayer
- Player - Set the current research level of Creep Upgrade orta reaper to ((Current research level of Creep Upgrade orta reaper for ClanReaperPlayer) + 1) for ClanReaperPlayer
- Set StringTeamPoint[2] = (StringTeamPoint[2] - 200)
- Neutral Building - Add Creep Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
-
Else - Actions
- Neutral Building - Add Creep Upgrade to Lich 0078 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Trigger - Run Table Update Lumbers <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
On secondary click nothing happend.
After this point, one of the items removes from the shop when everytime i have click on the armor upgrade.
It is complicated, i don't know how to explain. Just ask me for any details you want to learn.
This is how my system works.
When you click on the Creep Upgrade game checks Team Point (integer) value. When you have the required teampoint, it will add this upgrade into the shop again.
But many of the upgrades can be used only once. When you click on the Hit Point Upgrade when you have 600 Team Points, it will apply upgrade and removes the item from shop. But if you don't have required Team Points, game should add this upgrade again into the shop.
--- WHY I FEEL I NEED TO MANUALLY ADD AND REMOVE ITEMS TO THE SHOP ---
When i will add these upgrades as standard items, there are no way to check this >>> If the Team Point value lesser or equal to X, DO NOT BUY ITEM.
When you click the item, it simply checks your gold and lumber. If you have required lumber or gold, you can buy it. If you don't, you cannot. This is why i have created my own buy system.
I do not have to remove and add items. You can suggest different solution if you want.
This is the trigger of clicked item. (CHECK ATTACHMENT)
-
Slayer Upgrade Copy
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
- (Item-type of (Sold Item)) Equal to Slayer Upgrade
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Buying unit)) is an ally of ClanDevilPlayer) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[1] Greater than or equal to 300
-
Then - Actions
- Floating Text - Change text of FloatTeamPoints[1] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[1]))) using font size 10.00
- Player - Set the current research level of Hero Slayers Upgrade Devil to ((Current research level of Hero Slayers Upgrade Devil for ClanDevilPlayer) + 1) for ClanDevilPlayer
- Set StringTeamPoint[1] = (StringTeamPoint[1] - 300)
- Neutral Building - Remove Slayer Upgrade from Lich 0086 <gen>
-
Else - Actions
- Neutral Building - Add Slayer Upgrade to Lich 0086 <gen> with 1 in stock and a max stock of 1
- Game - Display to (Player group((Triggering player))) the text: Bunun için yeterli...
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[2] Greater than or equal to 300
-
Then - Actions
- Floating Text - Change text of FloatTeamPoints[2] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[2]))) using font size 10.00
- Player - Set the current research level of Hero Slayers Upgrade Reaper to ((Current research level of Hero Slayers Upgrade Reaper for ClanReaperPlayer) + 1) for ClanReaperPlayer
- Set StringTeamPoint[2] = (StringTeamPoint[2] - 300)
- Neutral Building - Remove Slayer Upgrade from Lich2 0105 <gen>
-
Else - Actions
- Neutral Building - Add Slayer Upgrade to Lich2 0105 <gen> with 1 in stock and a max stock of 1
- Game - Display to (Player group((Triggering player))) the text: Bunun için yeterli...
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Trigger - Run Table Update Lumbers <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Dragons
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
- (Item-type of (Sold Item)) Equal to Dragons
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Buying unit)) is an ally of ClanDevilPlayer) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[1] Greater than or equal to 300
-
Then - Actions
- Set TP_EjderDevil = True
- Floating Text - Change text of FloatTeamPoints[1] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[1]))) using font size 10.00
- Set StringTeamPoint[1] = (StringTeamPoint[1] - 300)
-
Else - Actions
- Neutral Building - Add Dragons to Lich 0086 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StringTeamPoint[2] Greater than or equal to 300
-
Then - Actions
- Set TP_EjderReaper = True
- Floating Text - Change text of FloatTeamPoints[2] to (|cffadff2fTeam Points|r: + (String(StringTeamPoint[2]))) using font size 10.00
- Set StringTeamPoint[2] = (StringTeamPoint[2] - 300)
-
Else - Actions
- Neutral Building - Add Dragons to Lich2 0105 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Trigger - Run Table Update Lumbers <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Attachments
Last edited: