- Joined
- Aug 7, 2009
- Messages
- 380
Hello,
I have triggers like these:
Hopefully someone can help me out.
Credits and rep shall come
I have triggers like these:
-
CS Setup
-
Events
- Map initialization
- Conditions
-
Actions
- Custom script: set udg_CS_Hashtable = InitHashtable()
- Set CS_ItemType = Crown of Kings +5
- Set CS_CritDamage = 0.00
- Set CS_BlockChance = 100.00
- Set CS_EvasionChance = 0.00
- Set CS_BlockDamage = 30.00
- Trigger - Run CS Save <gen> (ignoring conditions)
-
Events
-
CS Save
- Events
- Conditions
-
Actions
- Custom script: set udg_CS_Key = udg_CS_ItemType
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_EvasionChance as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_BlockDamage as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_BlockChance as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_CritChance as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_CritDamage as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_SpellPower as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = (CS_PlusUp + 1)
- Hashtable - Save CS_SpellCritChance as CS_PlusUp of CS_Key in CS_Hashtable
- Set CS_PlusUp = 0
- Set CS_SpellPower = 0.00
- Set CS_SpellCritChance = 0.00
- Set CS_CritDamage = 0.00
- Set CS_CritChance = 0.00
- Set CS_BlockChance = 0.00
- Set CS_EvasionChance = 0.00
- Set CS_BlockDamage = 0.00
-
CS Get
- Events
- Conditions
-
Actions
- Custom script: set udg_CS_Key = GetHandleId(udg_CS_Unit)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CSC_EvasionChance = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CS_BlockDamage = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CSC_BlockChance = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CSC_CritChance = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CSC_CritDamage = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CSC_SpellPower = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = (CS_PlusUp + 1)
- Set CSC_SpellCritChance = (Load CS_PlusUp of CS_Key from CS_Hashtable)
- Set CS_PlusUp = 0
-
Block
-
Events
- Game - DamageModifierEvent becomes Equal to 1.00
- Conditions
-
Actions
- Set CS_Unit = DamageEventTarget
- Trigger - Run CS Get <gen> (ignoring conditions)
- Set DMGS_BlockChance = CSC_BlockChance
-
Set DMGS_BlockDamage = CSC_BlockDamage
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random percentage) Less than or equal to (<=) DMGS_BlockChance
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DMGS_BlockDamage Less than (<) DamageEventAmount
-
Then - Actions
- Set DMGS_BlockEvent = 1.00
- Set DamageEventAmount = (DamageEventAmount - DMGS_BlockDamage)
-
Else - Actions
- Set DamageEventAmount = 0.00
-
If - Conditions
- Set DMGS_BlockEvent = 2.00
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Hopefully someone can help me out.
Credits and rep shall come