- Joined
- Apr 1, 2009
- Messages
- 201
What I'm trying to do is to display information about a stored string. For example in my trigger I have an item named "WoodenSword". Under the item wooden sword are its stats. So when a player types "dis" as a substring adding "WoodenSword" at the end to make "diswoodensword" it displays the amount of damage and armor that item has. I was hoping it was possible to use integer A, instead of the if its equal to this exact line under the conditions because there would be a very long list of them. I know there are probally a lot of things wrong with the trigger and I am sorry for that. I attempted to do it on my own and are confused about it. I built off an old trigger I had gotten some help on.
-
Storage
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Set Items[1] = WoodenSword
-


Set DamageAmount[1] = 1
-


Set ArmorAmount[1] = 0
-


For each (Integer A) from 1 to 12, do (Actions)
-



Loop - Actions
-




Trigger - Add to DIS <gen> the event (Player - (Player((Integer A))) types a chat message containing dis as A substring)
-
-
-
-
-
DIS
-

Events
-

Conditions
-

Actions
-


Set CommandString = (Substring((Entered chat string), 12, (Length of (Entered chat string))))
-


For each (Integer A) from 1 to 2, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






CommandString Equal to Items[(Integer A)]
-
-





Then - Actions
-






Game - Display to (Player group((Triggering player))) the text: (ArmorAmount[(Integer A)] + DamageAmount[(Integer A)])
-
-





Else - Actions
-
-
-
-
-








