- Included in Very Vanilla
- Included! No need to download.
- Server Type
- Test Server
What is this?
MQ2Collections creates a number of collection types for MQ2 scripts. Out of the box MQ2 supports one collection: the array. Collection types enable script writers to use data structures that more naturally pair with the algorithm they are implementing. For example, if a script writer is implementing a first-in first-out structure for casting buffs, then a queue would be an appropriate structure. On the other hand, if he or she is maintaining a set of IDs representing mobs pulled to camp, then a set or list would be the natural mechanism.
Why did I write it?
My motivation in writing this plugin was to expose more powerful and natural data structuring tools to script writers. With these tools, script writers will be able to express solutions that solve the problem they want to solve rather than organizing data and building data structures.
What types are available?
The current release makes available the following data structures: the stack, set, list, queue and map. Iterators over the set, list and map are also provided. For those familiar with the C++ Standard Template Library (STL), the types and their semantics should seem natural. If they do not, please let me know by email at: [email protected].
At present, the collections hold strings. That is, if you want to store an integer, floating point value or an object, you have to first convert it (or serialize it) as a string.