Leazy
You can change this now in User CP.
- Reaction score
- 50
Hello!
Here is my 12 slots inventory system. It's very basic (even though, I added a lot of comments to help you if your completely new to the editor), use a skill, then all items you wear is stored into a variable, new items (if you carry any at this item page) is created and given to you. This system is MPI.
Triggers:
I hope this system has not been made like a million times Enjoy!
Changelog
Here is my 12 slots inventory system. It's very basic (even though, I added a lot of comments to help you if your completely new to the editor), use a skill, then all items you wear is stored into a variable, new items (if you carry any at this item page) is created and given to you. This system is MPI.
Triggers:
Code:
Inventory System
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
(Ability being cast) Equal to Inventory Page: 1
(Ability being cast) Equal to Inventory Page: 2
Actions
Trigger - Turn off Item Stacking System <gen>
-------- Above: Only add this line to your trigger if your using a item stacking system. --------
-------- -------------------- Use Bag One Skill -------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Inventory Page: 1
Then - Actions
Unit - Remove Inventory Page: 1 from (Triggering unit)
Unit - Add Inventory Page: 2 to (Triggering unit)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set InventorySystem_Integer = ((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))
-------- In the line above we set the number of the inventory slot which we will be working with. --------
Set InventorySystem_BagTwoItems[InventorySystem_Integer] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
-------- In the line above we store the item carried in slot integer A, so we can create it later when using bag page two. I set the variable to integer A + Player number x 20 so it won't get bugged when playing with more than one player. --------
Set InventorySystem_BagOneCharges[InventorySystem_Integer] = (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A)))
-------- In the line above we store the charges remaining of the item, so it won't be everlasting if you keep changing back and forward between the inventories. --------
Set InventorySystem_BagOneCustomVa[InventorySystem_Integer] = (Custom value of (Item carried by (Triggering unit) in slot (Integer A)))
-------- In the line above we store the custom value of the item, since some maps set custom values of items to work with their triggers. --------
Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
-------- In the line above we remove the item in slot integer A. --------
Hero - Create InventorySystem_BagOneItems[InventorySystem_Integer] and give it to (Triggering unit)
-------- In the line above we create the items that we stored when switching from page one to page two. --------
Item - Set charges remaining in (Last created item) to InventorySystem_BagTwoCharges[InventorySystem_Integer]
-------- In the line above we set the charges remaining of the new item to the amount we stored before switching inventory. --------
Item - Set the custom value of (Last created item) to InventorySystem_BagTwoCustomVa[InventorySystem_Integer]
-------- In the line above we set the custom value of the item to the value we stored before switching inventory. --------
Else - Actions
-------- -------------------- Use Bag Two Skill -------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Inventory Page: 2
Then - Actions
Unit - Remove Inventory Page: 2 from (Triggering unit)
Unit - Add Inventory Page: 1 to (Triggering unit)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set InventorySystem_Integer = ((Integer A) + ((Player number of (Owner of (Triggering unit))) x 20))
-------- In the line above we set the number of the inventory slot which we will be working with. --------
Set InventorySystem_BagOneItems[InventorySystem_Integer] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
-------- In the line above we store the item carried in slot integer A, so we can create it later when using bag page one. I set the variable to integer A + Player number x 20 so it won't get bugged when playing with more than one player. --------
Set InventorySystem_BagTwoCharges[InventorySystem_Integer] = (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A)))
-------- In the line above we store the charges remaining of the item, so it won't be everlasting if you keep changing back and forward between the inventories. --------
Set InventorySystem_BagTwoCustomVa[InventorySystem_Integer] = (Custom value of (Item carried by (Triggering unit) in slot (Integer A)))
-------- In the line above we store the custom value of the item, since some maps set custom values of items to work with their triggers. --------
Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
-------- In the line above we remove the item in slot integer A. --------
Hero - Create InventorySystem_BagTwoItems[InventorySystem_Integer] and give it to (Triggering unit)
-------- In the line above we create the items that we stored when switching from page two to page one. --------
Item - Set charges remaining in (Last created item) to InventorySystem_BagOneCharges[InventorySystem_Integer]
-------- In the line above we set the charges remaining of the new item to the amount we stored before switching inventory. --------
Item - Set the custom value of (Last created item) to InventorySystem_BagOneCustomVa[InventorySystem_Integer]
-------- In the line above we set the custom value of the item to the value we stored before switching inventory. --------
Else - Actions
Trigger - Turn on Item Stacking System <gen>
-------- Above: Only add this line to your trigger if your using a item stacking system. --------
I hope this system has not been made like a million times Enjoy!
Changelog
#Made this system work proper with charged items.
#This system now stores custom values.
#Made the system more user-friendly
#This system now stores custom values.
#Made the system more user-friendly