• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
MQ2Collections

Plugin - MQ2Collections (1 Viewer)

TypePun

Member
Joined
May 16, 2019
RedCents
160¢
TypePun submitted a new resource:

MQ2Collections - Collection types for MQ2 -- useful for scripts to create stacks, queues, maps, lists.

MQ2Collections

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...

Read more about this resource...
 
This plugin needs a lot more documentation on the TLOs and Commands

There are tons of things I am seeing in the macro with no explanations anywhere I could find. Push, IsEnd, Count, etc.
 
Wow 10 pages. I didn't realize the wiki had so many pages.
I just saw the home page thinking the right sidebar was some git info.
 
MQ2Collections has been removed from Very Vanilla. If there's demand we can return it.

Here's the error stopping us from building,

Rich (BB code):
mq2main\mq2datatypes.h(4907,0): Error C2039: 'DZName': is not a member of 'EQData::_DYNAMICZONE'
mq2main\mq2datatypes.h(4907,0): Error C2660: 'strcpy_s': function does not take 2 arguments

If you're able to solve the issue please let me know.
 
Last edited:
And if you use the map, it auto sorts the list. What would be really nice with this is to able to use a structure that defines the layout of the data segment, that way you can store more than the key field and a single string type field for data.
 
So, in all fairness, @exspes007 found it and warned me about it. I took the opportunity to pass it on. He may be better at explaining the details but my minimal understanding is that the Map Add functions don't like commas in any strings being added.

I did find a potential other bug in Maps tonight that I developed a work around for. I'll try and remember to post something here the next time I'm at my PC. Ended up being an issue where the MapIterator.Key would return false until MapIterator.Reset is called.
 
@Redbot -- The Key returning false issue is as follows:

1) I define a 'map' and 'mapiterator' as outer scope variables in a .inc file. These variables are then used throughout the scope of the macro to handle iterating in a step-wise fashion through a map. I have some pseudocode below:

INI:
/declare mapIterName string local ${map_name}_Map_Iter
 
    /if (SomeCondition) {
        /echo "${${mapIterName}.Key}"
        |- Move to the next slot
        /invoke ${${mapIterName}.Advance}
    }

    |- If we're at the end of the map, loop us back to the beginning.
    /if (${${mapIterName}.IsEnd}) {
        /invoke ${${mapIterName}.Reset}
    }

The above code will actually return false for the first time I call /call SomeSub"${${mapIterName}.Key}" the ${mapiterator.Key} function will return FALSE. If I create an iterator, loop through the map, and advance the iterator, in the same while loop in the same Sub, I don't have this issue. I can put the following work around in the sub and it avoids the issue:

INI:
    /while (!${Bool[${${mapIterName}.Key}]}) {
        /invoke ${${mapIterName}.Reset}
        |- Tested and this is in fact needed...
        /delay 1
    }
 
Last edited:
Plugin - MQ2Collections

Users who are viewing this thread

Back
Top