# RPG Items - main hand slots etc.

#### Krakenn99

Level 11
I want to make RPG items that have different slots like main hand, off hand, chest, head ect. ...

For my main hand I have set all items to be level 4. So if any items are main hand items their level is ''4''.
Why is the following trigger not working? How do I fix it?

• Mainhand 4
• Events
• Unit - A unit Acquires an item
• Conditions
• (Item level of (Item carried by (Triggering unit) in slot 1)) Equal to 4
• (Item level of (Item carried by (Triggering unit) in slot 2)) Equal to 4
• (Item level of (Item carried by (Triggering unit) in slot 3)) Equal to 4
• (Item level of (Item carried by (Triggering unit) in slot 4)) Equal to 4
• (Item level of (Item carried by (Triggering unit) in slot 5)) Equal to 4
• (Item level of (Item carried by (Triggering unit) in slot 6)) Equal to 4
• Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Item level of (Item being manipulated)) Equal to 4
• Then - Actions
• Hero - Drop (Item being manipulated) from (Triggering unit)
• Player Group - Add (Owner of (Triggering unit)) to PlayerGroup[1]
• Game - Display to PlayerGroup[1] for 10.00 seconds the text: You can only carry ...
• Player Group - Remove (Owner of (Triggering unit)) from PlayerGroup[1]
• Else - Actions

#### Krakenn99

Level 11
I figured it out, if anyone needs the solution here it is:
• Mainhand 4
• Events
• Unit - A unit Acquires an item
• Conditions
• (Item level of (Item being manipulated)) Equal to 4
• Actions
• Set Integer = 0
• For each (Integer A) from 1 to 6, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Item level of (Item carried by (Triggering unit) in slot (Integer A))) Equal to 4
• Then - Actions
• Set Integer = (Integer + 1)
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Integer Greater than or equal to 2
• Then - Actions
• Hero - Drop (Item being manipulated) from (Triggering unit)
• Player Group - Add (Owner of (Triggering unit)) to PlayerGroup[1]
• Game - Display to PlayerGroup[1] for 10.00 seconds the text: You can only carry ...
• Player Group - Remove (Owner of (Triggering unit)) from PlayerGroup[1]
• Else - Actions
Sorry for double post will not do again!!!

Replies
6
Views
794
Replies
10
Views
616
Replies
3
Views
270
Replies
10
Views
809
Replies
9
Views
382