- Joined
- Mar 17, 2012
- Messages
- 582
Hi there!
I have a problem with item charges. Take a look please:
Tell me where I have a mistake?
I have a problem with item charges. Take a look please:
Tell me where I have a mistake?
-
aquire
-
Events
- Unit - A unit Acquires an item
- Conditions
-
Actions
- -------- Bag of Carrots --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to Bag of Carrots
-
Then - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item being manipulated)) Equal to 1
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
- (Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
- ((Triggering unit) has an item of type Bag of Carrots) Equal to True
-
Then - Actions
- Set Carrots_Triggered = (Item being manipulated)
- Set Carrots_Int = 0
- Set Carrots_Owner = (Triggering unit)
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer A)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) + 1)
- Item - Remove (Item being manipulated)
- Unit - Add Weight 5 hero to (Triggering unit)
- Unit - Set level of Weight 5 hero for Carrots_Owner to (0 + (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))))
-
Else - Actions
- Set Carrots_Triggered = (Item being manipulated)
- Set Carrots_Int = 0
- Set Carrots_Owner = (Triggering unit)
- Unit - Add Weight 5 hero to (Triggering unit)
- Unit - Set level of Weight 5 hero for Carrots_Owner to (0 + (Charges remaining in (Item being manipulated)))
-
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
- (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
- (Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
- ((Triggering unit) has an item of type Bag of Carrots) Equal to True
-
Then - Actions
- Set Carrots_Triggered = (Item being manipulated)
- Set Carrots_Int = (Charges remaining in (Item being manipulated))
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer A)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
- Item - Remove (Item being manipulated)
- Unit - Add Weight 5 hero to Carrots_Owner
- Unit - Set level of Weight 5 hero for Carrots_Owner to (0 + (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))))
-
Else - Actions
- Set Carrots_Triggered = (Item being manipulated)
- Set Carrots_Int = (Charges remaining in (Item being manipulated))
- Unit - Add Weight 5 hero to Carrots_Owner
- Unit - Set level of Weight 5 hero for Carrots_Owner to ((Charges remaining in (Item being manipulated)) + 0)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
- Else - Actions
-
If - Conditions
-
Events
-
lose
-
Events
- Unit - A unit Loses an item
- Conditions
-
Actions
- -------- Bag of Carrots --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to Bag of Carrots
-
Then - Actions
- Set Carrots_Int = 0
- Unit - Remove Weight 5 hero from (Triggering unit)
- Else - Actions
-
If - Conditions
-
Events
-
sell
-
Events
- Unit - A unit Pawns an item (to shop)
- Conditions
-
Actions
- -------- Bag of Carrots --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Sold Item)) Equal to Bag of Carrots
-
Then - Actions
- Set Carrots_Int = 0
- Unit - Remove Weight 5 hero from (Triggering unit)
- Else - Actions
-
If - Conditions
-
Events