Untitled Trigger 003
Events
Conditions
Actions
Set TempPlayer = (Triggering player)
Set TempString = (Entered chat string)
Set TempUnitGroup = (Units owned by TempPlayer matching (((Matching unit) is A Hero) Equal to True))
Set TempInteger = (Integer((Substring(TempString, 5, (Length of TempString)))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempInteger Greater than (TempPlayer Current lumber)
Then - Actions
Set TempInteger = (TempPlayer Current lumber)
Else - Actions
Player - Add (-1 x TempInteger) to TempPlayer Current lumber
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring(TempString, 1, 4)) Equal to -str
Then - Actions
Unit Group - Pick every unit in TempUnitGroup and do (Hero - Modify Strength of (Picked unit): Add TempInteger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring(TempString, 1, 4)) Equal to -int
Then - Actions
Unit Group - Pick every unit in TempUnitGroup and do (Hero - Modify Intelligence of (Picked unit): Add TempInteger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring(TempString, 1, 4)) Equal to -agi
Then - Actions
Unit Group - Pick every unit in TempUnitGroup and do (Hero - Modify Agility of (Picked unit): Add TempInteger)
Else - Actions
Custom script: call DestroyGroup( udg_TempUnitGroup )