leoloves2
New Member
- Joined
- Jan 2, 2018
- Messages
- 23
- Reaction score
- 3
I would like to know if there is a function or way to check how many items with weaponType (sword, axe or club) are in the player's bag.
On my server, my idea is that each weapon has its spells and cooldown, so that's why I want to limit the number of weapons that the player can have inside the bag.
I tried using onMoveItem, but I couldn't understand how it works properly. My idea was to use a storage to know whether or not the player can pick up another weapon. So if the item went to the bag it added 1 to the storage value, if the item left the bag it removed 1 from the storage. But I couldn't understand how the function works, especially fromPosition, toPosition, fromCylinder, toCylinder.
I'm wondering if there's a way to check if there's a certain type of weapon inside the bag because that way it'll be easier to see if the player can get the item or not.
Sorry if it wasn't very clear, I'm using the translator. Thanks anyway.
On my server, my idea is that each weapon has its spells and cooldown, so that's why I want to limit the number of weapons that the player can have inside the bag.
I tried using onMoveItem, but I couldn't understand how it works properly. My idea was to use a storage to know whether or not the player can pick up another weapon. So if the item went to the bag it added 1 to the storage value, if the item left the bag it removed 1 from the storage. But I couldn't understand how the function works, especially fromPosition, toPosition, fromCylinder, toCylinder.
I'm wondering if there's a way to check if there's a certain type of weapon inside the bag because that way it'll be easier to see if the player can get the item or not.
Sorry if it wasn't very clear, I'm using the translator. Thanks anyway.