• 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? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->
MQ2Collections

Plugin - MQ2Collections (1 Viewer) 1.2.0.0

Joined
May 16, 2019
RedCents
90¢
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...
 

Maskoi

So old and salty he grew scales
Joined
Sep 28, 2005
RedCents
70,984¢
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.
 

ihc385

Moderator
Joined
Dec 4, 2016
RedCents
7,563¢
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.
Check the link to the API documentation
 

Maskoi

So old and salty he grew scales
Joined
Sep 28, 2005
RedCents
70,984¢
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.
 

Redbot

🖥️💖
Moderator
Joined
Oct 15, 2004
RedCents
50,576¢
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:

ctaylor22

Moderator
Joined
Mar 21, 2014
RedCents
13,739¢
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.
 

drwhomphd

Moderator
Joined
Oct 4, 2019
RedCents
1,817¢
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.
 

drwhomphd

Moderator
Joined
Oct 4, 2019
RedCents
1,817¢
@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:

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

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top