xoxdragonxox
New Member
- Reaction score
- 1
What it does is when you use the item Backpack(Must be in slot 6) it will give you another 5 slots free. My question is can someone help me modify it so the backpack can be anywhere in the inventory?
Trigger:
- Extra
- Events
- Unit - A unit Uses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Backpack
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Slot[(Player number of (Owner of (Hero manipulating item)))] Equal to 1
- Then - Actions
- Set Slot[(Player number of (Owner of (Hero manipulating item)))] = 2
- For each (Integer A) from 1 to 5, do (Actions)
- Loop - Actions
- Set InventorySystem_BagOneItems[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
- Set InventorySystem_BagTwoCharges[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] = (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A)))
- Set InventorySystem_BagTwoCustomVa[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] = (Custom value of (Item carried by (Triggering unit) in slot (Integer A)))
- Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
- Hero - Create InventorySystem_BagTwoItems[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] and give it to (Triggering unit)
- Item - Set charges remaining in (Last created item) to InventorySystem_BagOneCharges[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))]
- Item - Set the custom value of (Last created item) to InventorySystem_BagOneCustomVa[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))]
- Loop - Actions
- Do nothing
- Else - Actions
- Set Slot[(Player number of (Owner of (Hero manipulating item)))] = 1
- For each (Integer A) from 1 to 5, do (Actions)
- Loop - Actions
- Set InventorySystem_BagTwoItems[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
- Set InventorySystem_BagOneCharges[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] = (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A)))
- Set InventorySystem_BagOneCustomVa[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] = (Custom value of (Item carried by (Triggering unit) in slot (Integer A)))
- Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
- Hero - Create InventorySystem_BagOneItems[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))] and give it to (Triggering unit)
- Item - Set charges remaining in (Last created item) to InventorySystem_BagTwoCharges[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))]
- Item - Set the custom value of (Last created item) to InventorySystem_BagTwoCustomVa[((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))]
- Loop - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events