- Joined
- Apr 1, 2009
- Messages
- 201
I am in the process of developing a custom item system. In this part of the system after the object has been cleaned, it can now be identified. What I mean by this is you dig up items that are unknown, which then have to be cleaned, turning it into a "General Item", and from there it is inspected to determine what the item is exactly. Part 3 is the inspecting process. Below is PART of my trigger. I was wondering if there was an easier way to do this or to store different "General Items" in another trigger so this part doesn't get any longer. I have about 16 "General Items" which will each have about 5-15 Items that can be identified from 1 "General Item".
-
Inspect
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Inspect
-
-

Actions
-


-------- Set Unit --------
-


Set InspectUnit = (Triggering unit)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Item-type of (Target item of ability being cast)) Equal to |c00FFFF00Amulet|R
-
-



Then - Actions
-




-------- Set Insepct Chance --------
-




Set InspectChances = (Random integer number between 1 and 100)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






InspectChances Greater than 0
-






InspectChances Less than or equal to 45
-
-





Then - Actions
-






-------- Remove "General Item" --------
-






Item - Remove (Target item of ability being cast)
-






-------- Add Identified Item --------
-






Hero - Create |cff32cd32Regular Amulet|r and give it to InspectUnit
-






-------- Display to player item name --------
-






Game - Display to (Player group((Owner of InspectUnit))) the text: |c00FFFF00Appears t...
-
-





Else - Actions
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






InspectChances Greater than 45
-






InspectChances Less than or equal to 60
-
-





Then - Actions
-






Item - Remove (Target item of ability being cast)
-






Hero - Create |cff32cd32Silver Necklace|r and give it to InspectUnit
-






Game - Display to (Player group((Owner of InspectUnit))) the text: |c00FFFF00Appears t...
-
-





Else - Actions
-
-
-
-
-

