- Joined
- Jan 1, 2008
- Messages
- 69
I've read that Neutral Building - Add item is extremely buggy, but is there any way to do this correctly? Currently it works fine with small amount of items, (1-5) but if i add too many different items or more than 6 items of the same type, the whole system gets messed up even though variables are correct. I've also tried adding wait 1 second action between remove item-type and add item-type actions. This only prevented game from adding items with 0 quantity.
You must have been wondering what these triggers are trying to do. Well, it's basically empty shop at the beginning but once a player sells items to it, other players can buy them from the same shop ^^ Only things which are working correctly (only with wait action):
-more than 1 item in the shop and there should be only 1-2 of each item in the shop
-1 item-type, 1-5 quantity
-Adding first item or new items
-Removing item (its not always possible because trigger might add item-type with 0 quantity)
Please don't suggest me to replace other neutral building add item actions with this:
My Trade Center currently has these abilities: (buggy)
Select Hero
Sell Items
Sell Units
Invulnerable (Neutral)
Shop Sharing
Shop Purchase Item
I've tested it with these: (was buggy)
Select Hero
Sell Items
Invulnerable (Neutral)
Shop Purchase Item
You must have been wondering what these triggers are trying to do. Well, it's basically empty shop at the beginning but once a player sells items to it, other players can buy them from the same shop ^^ Only things which are working correctly (only with wait action):
-more than 1 item in the shop and there should be only 1-2 of each item in the shop
-1 item-type, 1-5 quantity
-Adding first item or new items
-Removing item (its not always possible because trigger might add item-type with 0 quantity)
Please don't suggest me to replace other neutral building add item actions with this:
- Neutral Building - Add whatever to Trade Center 0013 <gen> 1 in stock and a max stock of 1
My Trade Center currently has these abilities: (buggy)
Select Hero
Sell Items
Sell Units
Invulnerable (Neutral)
Shop Sharing
Shop Purchase Item
I've tested it with these: (was buggy)
Select Hero
Sell Items
Invulnerable (Neutral)
Shop Purchase Item
-
Trade Center Buys
-
Events
- Unit - A unit Pawns an item (to shop)
-
Conditions
- (Buying unit) Equal to Trade Center 0013 <gen>
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemTotalTrade Greater than or equal to 1
-
Then - Actions
- Set FoundItem = False
-
For each (Integer IntegerC) from 0 to ItemTotalTrade, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Sold Item)) Equal to ItemTypeTrade[IntegerC]
- IntegerC Not equal to 0
-
Then - Actions
- Set FoundItem = True
- Set ItemAmountTrade[IntegerC] = (ItemAmountTrade[IntegerC] + (Charges remaining in (Sold Item)))
- Neutral Building - Remove (Item-type of (Sold Item)) from Trade Center 0013 <gen>
- Neutral Building - Add ItemTypeTrade[IntegerC] to Trade Center 0013 <gen> with ItemAmountTrade[IntegerC] in stock and a max stock of ItemAmountTrade[IntegerC]
- Game - Display to (All players) for 30.00 seconds the text: ((ShopValue + ((String(IntegerC)) + : )) + (String(ItemAmountTrade[IntegerC])))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FoundItem Equal to False
- ItemTotalTrade Less than 11
-
Then - Actions
- Game - Display to (All players) for 30.00 seconds the text: VITTU
- Set ItemTotalTrade = (ItemTotalTrade + 1)
- Set ItemTypeTrade[ItemTotalTrade] = (Item-type of (Sold Item))
- Set ItemAmountTrade[ItemTotalTrade] = (Charges remaining in (Sold Item))
- Neutral Building - Add ItemTypeTrade[ItemTotalTrade] to Trade Center 0013 <gen> with ItemAmountTrade[ItemTotalTrade] in stock and a max stock of ItemAmountTrade[ItemTotalTrade]
- Else - Actions
-
If - Conditions
-
Else - Actions
- Set ItemTotalTrade = 1
- Set ItemTypeTrade[1] = (Item-type of (Sold Item))
- Set ItemAmountTrade[1] = (Charges remaining in (Sold Item))
- Neutral Building - Add ItemTypeTrade[1] to Trade Center 0013 <gen> with 1 in stock and a max stock of 1
-
If - Conditions
-
For each (Integer A) from 0 to ItemTotalTrade, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer A) Not equal to 0
-
Then - Actions
- Game - Display to (All players) for 30.00 seconds the text: ((Final Value + ((String((Integer A))) + : )) + (String(ItemAmountTrade[(Integer A)])))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Trade Center Sells
-
Events
- Unit - A unit Sells an item (from shop)
-
Conditions
- (Selling unit) Equal to Trade Center 0013 <gen>
-
Actions
-
For each (Integer IntegerD) from 0 to ItemTotalTrade, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Sold Item)) Equal to ItemTypeTrade[IntegerD]
- IntegerD Not equal to 0
-
Then - Actions
- Game - Display to (All players) the text: Found
- Set ItemAmountTrade[IntegerD] = (ItemAmountTrade[IntegerD] - 1)
- Neutral Building - Remove (Item-type of (Sold Item)) from Trade Center 0013 <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemAmountTrade[IntegerD] Greater than or equal to 1
-
Then - Actions
- Neutral Building - Add ItemTypeTrade[IntegerD] to Trade Center 0013 <gen> with ItemAmountTrade[IntegerD] in stock and a max stock of ItemAmountTrade[IntegerD]
- Game - Display to (All players) for 30.00 seconds the text: ((ShopValue + ((String(IntegerD)) + : )) + (String(ItemAmountTrade[IntegerD])))
-
Else - Actions
- Game - Display to (All players) the text: zero remaining
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- IntegerD Less than ItemTotalTrade
-
Then - Actions
-
For each (Integer B) from (IntegerD - 1) to (ItemTotalTrade - 1), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer B) Not equal to (IntegerD - 1)
-
Then - Actions
- Set ItemAmountTrade[(Integer B)] = ItemAmountTrade[((Integer B) + 1)]
- Set ItemTypeTrade[(Integer B)] = ItemTypeTrade[((Integer B) + 1)]
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer B) from (IntegerD - 1) to (ItemTotalTrade - 1), do (Actions)
- Else - Actions
-
If - Conditions
- Set ItemTotalTrade = (ItemTotalTrade - 1)
- Skip remaining actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 0 to ItemTotalTrade, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer A) Not equal to 0
-
Then - Actions
- Game - Display to (All players) for 30.00 seconds the text: ((Final Value + ((String((Integer A))) + : )) + (String(ItemAmountTrade[(Integer A)])))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer IntegerD) from 0 to ItemTotalTrade, do (Actions)
-
Events
Last edited: