- Joined
- Nov 13, 2006
- Messages
- 1,814
somebody can move to correct section coz i dont watched i am in this section:/
item level is like item id, i mean each item in map got different item level, example heavy armor lv100-150, helmet 250-300 etc
i want make a multiboard inventory, each item got few integer array, example item_hp[100]=20=>armor what is lv100 item give +20 hp
but the equipment system take too much line, somebody can give ideea can i write shorter?
in my example i wrote only for 1 type of armor but still have 2 type armor, 3 type helm, 3type boot, 6-7 type weapon and etc etc etc
item level is like item id, i mean each item in map got different item level, example heavy armor lv100-150, helmet 250-300 etc
i want make a multiboard inventory, each item got few integer array, example item_hp[100]=20=>armor what is lv100 item give +20 hp
but the equipment system take too much line, somebody can give ideea can i write shorter?
in my example i wrote only for 1 type of armor but still have 2 type armor, 3 type helm, 3type boot, 6-7 type weapon and etc etc etc
-
Equip
-
Events
- Unit - A unit Uses an item
-
Conditions
- (Triggering unit) Equal to Hero[(Player number of (Owner of (Triggering unit)))]
- (Item level of (Item being manipulated)) Greater than or equal to 100
-
Actions
- Set ManItem = (Item being manipulated)
- Set TempNr = (Item level of ManItem)
- Set plNR = (Player number of (Triggering player))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempNr Greater than or equal to 100
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero level of (Triggering unit)) Greater than or equal to (Item level of ManItem)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempNr Less than 150
-
Or - Any (Conditions) are true
-
Conditions
- Class[plNR] Equal to 1
- Class[plNR] Equal to 2
-
Conditions
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Armor[plNR] Equal to 0
-
Then - Actions
- Set Armor[plNR] = TempNr
- Hero - Modify Agility of (Triggering unit): Add Item_Agi[TempNr]
- Hero - Modify Intelligence of (Triggering unit): Add Item_Int[TempNr]
- Hero - Modify Strength of (Triggering unit): Add Item_Str[exitemnr]
- Set Stat_AttackLv[plNR] = (Stat_AttackLv[plNR] + Item_AttLv[TempNr])
- Set Stat_AttackSpeed[plNR] = (Stat_AttackSpeed[plNR] + Item_AttackSpeed[TempNr])
- Unit - Set level of Passive Increased Attack Speed for (Triggering unit) to Stat_AttackSpeed[plNR]
- Set Stat_BlockDmg[plNR] = (Stat_BlockDmg[plNR] + Item_Block[TempNr])
- Set Stat_Crit[plNR] = (Stat_Crit[plNR] + Item_Crit[TempNr])
- Set Stat_RageDmg[plNR] = (Stat_RageDmg[plNR] + Item_CritDmg[TempNr])
- Set Stat_DefLv[plNR] = (Stat_DefLv[plNR] + Item_DefLv[TempNr])
- Set Stat_Evasion[plNR] = (Stat_Evasion[plNR] + Item_Eva[TempNr])
- Set Stat_HpRegen[plNR] = (Stat_HpRegen[plNR] + Item_HpRegen[TempNr])
- Set Stat_LifeSteal[plNR] = (Stat_LifeSteal[plNR] + Item_LSteal[TempNr])
- Set Stat_ManaSteal[plNR] = (Stat_ManaSteal[plNR] + Item_MSteal[TempNr])
- Set Stat_MpRegen[plNR] = (Stat_MpRegen[plNR] + Item_MpRegen[TempNr])
- Set Stat_Reflect[plNR] = (Stat_Reflect[plNR] + Item_Reflect[TempNr])
- Set Stat_Exp[plNR] = (Stat_Exp[plNR] + Item_Exp[TempNr])
- Set Stat_MovSpeed[plNR] = (Stat_MovSpeed[plNR] + Item_MovSpeed[TempNr])
- Unit - Set level of Passive Movement Speed Bonus for (Triggering unit) to Stat_AttackSpeed[plNR]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Item_HP[TempNr] Greater than 0
-
Then - Actions
- -------- here coming add hp loop --------
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Item_Mp[TempNr] Greater than 0
-
Then - Actions
- -------- here coming add mp loop --------
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Item_Dmg[TempNr] Greater than 0
-
Then - Actions
- -------- here coming add dmg loop --------
- Else - Actions
-
If - Conditions
-
Else - Actions
- Set exitemnr = Armor[plNR]
- Set aitem_diff1 = (Item_Agi[TempNr] - Item_Agi[exitemnr])
- Set aitem_diff2 = (Item_AttLv[TempNr] - Item_AttLv[exitemnr])
- Set aitem_diff3 = (Item_AttackSpeed[TempNr] - Item_AttackSpeed[exitemnr])
- Set aitem_diff4 = (Item_Block[TempNr] - Item_Block[exitemnr])
- Set aitem_diff5 = (Item_Crit[TempNr] - Item_Crit[exitemnr])
- Set aitem_diff6 = (Item_CritDmg[TempNr] - Item_CritDmg[exitemnr])
- Set aitem_diff7 = (Item_DefLv[TempNr] - Item_DefLv[exitemnr])
- Set aitem_diff8 = (Item_Dmg[TempNr] - Item_Dmg[exitemnr])
- Set aitem_diff9 = (Item_Eva[TempNr] - Item_Eva[exitemnr])
- Set aitem_diff10 = (Item_Exp[TempNr] - Item_Exp[exitemnr])
- Set aitem_diff11 = (Item_HP[TempNr] - Item_HP[exitemnr])
- Set aitem_diff12 = (Item_HpRegen[TempNr] - Item_HpRegen[exitemnr])
- Set aitem_diff13 = (Item_Int[TempNr] - Item_Int[exitemnr])
- Set aitem_diff14 = (Item_LSteal[TempNr] - Item_LSteal[exitemnr])
- Set aitem_diff15 = (Item_MSteal[TempNr] - Item_MSteal[exitemnr])
- Set aitem_diff16 = (Item_MovSpeed[TempNr] - Item_MovSpeed[exitemnr])
- Set aitem_diff17 = (Item_Mp[TempNr] - Item_Mp[exitemnr])
- Set aitem_diff18 = (Item_MpRegen[TempNr] - Item_MpRegen[exitemnr])
- Set aitem_diff19 = (Item_Str[TempNr] - Item_Str[exitemnr])
- Hero - Modify Strength of (Triggering unit): Add aitem_diff19
- Hero - Modify Agility of (Triggering unit): Add aitem_diff1
- Hero - Modify Intelligence of (Triggering unit): Add aitem_diff13
- Set Stat_AttackLv[plNR] = (Stat_AttackLv[plNR] + aitem_diff2)
- Set Stat_AttackSpeed[plNR] = (Stat_AttackSpeed[plNR] + aitem_diff3)
- Unit - Set level of Passive Increased Attack Speed for (Triggering unit) to Stat_AttackSpeed[plNR]
- Set Stat_BlockDmg[plNR] = (Stat_BlockDmg[plNR] + aitem_diff4)
- Set Stat_Crit[plNR] = (Stat_Crit[plNR] + aitem_diff5)
- Set Stat_RageDmg[plNR] = (Stat_RageDmg[plNR] + aitem_diff6)
- Set Stat_Evasion[plNR] = (Stat_Evasion[plNR] + aitem_diff9)
- Set Stat_DefLv[plNR] = (Stat_DefLv[plNR] + aitem_diff7)
- Set Stat_HpRegen[plNR] = (Stat_HpRegen[plNR] + aitem_diff12)
- Set Stat_LifeSteal[plNR] = (Stat_LifeSteal[plNR] + aitem_diff14)
- Set Stat_ManaSteal[plNR] = (Stat_ManaSteal[plNR] + aitem_diff15)
- Set Stat_MovSpeed[plNR] = (Stat_MovSpeed[plNR] + aitem_diff16)
- Unit - Set level of Passive Movement Speed Bonus for (Triggering unit) to Stat_AttackSpeed[plNR]
- Set Stat_MpRegen[plNR] = (Stat_MpRegen[plNR] + aitem_diff18)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- aitem_diff11 Greater than 0
-
Then - Actions
- -------- here coming add hp loop --------
-
Else - Actions
- -------- here coming decrease hp loop --------
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- aitem_diff7 Greater than 0
-
Then - Actions
- -------- here coming add mp loop --------
-
Else - Actions
- -------- here coming decrease mp loop --------
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- aitem_diff8 Greater than 0
-
Then - Actions
- -------- here coming add dmg loop --------
-
Else - Actions
- -------- here decrease dmg loop --------
-
If - Conditions
- Set Armor[plNR] = TempNr
- Game - Display to (All players) the text: Replaced with older...
- Hero - Create Item_Type[TempNr] and give it to (Triggering unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (All players) the text: Not your class armor
- Hero - Create Item_Type[TempNr] and give it to (Triggering unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (All players) the text: Your level too low ...
- Hero - Create Item_Type[TempNr] and give it to (Triggering unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Events
Last edited: