Spell/Quest turnin functions for e3

Discussion in 'E3' started by tibbs, Aug 23, 2023.

  1. tibbs

    tibbs Orc Centurion

    Messages:
    83
    Hey all,

    I wrote the following as an additional include with some functions for PoP spell quest turnins on my own server, and now that PoK is era-accurate and DoN is out on PEQ, I think others might find it useful.

    To use:
    add the attached file (e3_Quests.inc) to `e3 Includes` folder in your `Macros` directory in your Mq2 install and add:
    Code:
    #include e3 Includes\e3_Quests.inc
    to the e3_Setup.inc file

    In game, use
    Code:
    /turnin <name of item>
    and it will find ALL of the given item in your inventory, and turn them in to your currently targeted NPC until you don't have any more. This also works for dark reign or norrath's keepers tokens.

    So you can target an NPC with all your toons using
    Code:
    /bcaa //tar id ${Target.ID}
    from your driver, type
    Code:
    /turnin Dark Reign Token
    and all your characters will turn in their Dark Reign Tokens to the NPC.

    Since this was originally built for PoP spell quest turnins, the command is "Spell Turnin" in eqbc, but the mechanics work for any item turnin to an NPC.

    Additionally, for convenience, I added
    Code:
    /checkqspells <name of item>
    so your bots can echo back which spells for a given turnin are missing, so you can use
    Code:
    /checkqspells Glyphed Rune Word
    and all your toons will /bc back whatever lvl 65 PoP spells they're missing. (note i've only added support/lists for PoP spell turnins, not GoD or OoW... yet)

    Lastly, for mq2nav users, I added
    Code:
    /spellnav
    that moves all toons to their respective spell turnin NPC in PoP (assuming you are running mq2nav and have a navmesh available for PoK).

    There's some other goodies in there for drop-spells (so you can check from your looter to see if anyone needs any spells you looted) but i didn't add aliases so i'll just leave it there for people who want to explore and benefit.
     

    Attached Files:

    Last edited: Aug 23, 2023
    • Like Like x 4
  2. graphia

    graphia Orc Pawn

    Messages:
    21
    Thank you for making this! It will save me a bunch of time if I can get it to work.

    I added e3_Quests.inc to the e3 Includes folder and added the #include e3 Includes\e3_Quests.inc to e3_Setup.Inc. I target Tatsujiro the Serene from my driver and type /turnin Norrath's Keepers Token but it says "that is not a valid command". Any clue what I might be missing?
     
    Last edited: Aug 29, 2023
  3. Yalenos

    Yalenos Orc Pawn

    Messages:
    37
    same error here :/
     
  4. tibbs

    tibbs Orc Centurion

    Messages:
    83
    So there's some nuance here, sorry. the event triggers off the following:

    Code:
    #event spellTurnins "<#1#> Spell Turnin #2#"
    #event spellTurnins "[#1#] Spell Turnin #2#"
    
    With #1# being the character that sends the command, and #2# being the item to turn in

    And I attempted to create an alias for this at the bottom during the setup phase:

    Code:
        /squelch /alias /turnin /echo [${Me}] Spell Turnin
    
    But if the alias isn't working, it could be for a few reasons. First, what you should do to make it work *without an alias*:

    To do it for all your characters with their currently targeted NPC:
    Code:
    /bc Spell Turnin Norrath's Keepers Token
    or
    /bc Spell Turnin Dark Reign Token
    
    Small nuance, I have no idea if Norrath's Keepers uses an apostrophe (') or a backtick (`). They render the same on the client and spell/item names vary wildly, there seems to be no consistency. I did dark reign on my toons, so I haven't tested it whatsoever for Norrath's Keepers

    Now, the nuance - to do it for your current toon, you should do:
    Code:
    /echo Spell Turnin Norath's Keepers Token
    or
    /echo [${Me}] Spell Turnin Norrath's Keepers Token
    
    Based on whether your mq2 is configured to add the sender in [] brackets for /echo statements or not. My alias in my file is setup assuming that /echo statements do NOT add the sender in echo statements.
    If you're getting a "no such command" error, it's because the alias section of the file above didn't get triggered, since it only triggers on e3 setup, which I believe only triggers when a toon without an existing ini loads into game. That's probably the issue here.

    So to summarize, there's a few reasons why it might not work out of the box for everyone. But the /bc and /echo statements above will work regardless. You can add your own /alias with the /alias command rather than relying on e3 setup process to setup the one I created. I also never used "Norrath's Keepers Token" so I dunno if it's an apostrophe or a backtick.

    Anyways, hope this helps y'all!
     
  5. graphia

    graphia Orc Pawn

    Messages:
    21
    Hrm, I can't seem to get it to work even without the alias. I tried all variations of the Spell Turnin command with /bc and with /echo and nothing registered.
     
  6. tibbs

    tibbs Orc Centurion

    Messages:
    83
    If that's the case, then for whatever reason, the e3_Quests.inc file isn't being recognized when you run e3. I THOUGHT the #include directive was the only thing needed for that to happen, but tbh I wrote the file and incorporated it into my build years ago and haven't attempted to add another file since then.

    It'll require some deep dive and some debugging on my part to figure it out, which may take a while (I'm currently working off about 45min/day of total eq time, whether I spend it on macros or actually playing) but in the meantime, at least all the working event code is there, so if you wanted to add it to an existing inc and properly setup the event, feel free to do so!
     
  7. tibbs

    tibbs Orc Centurion

    Messages:
    83
    Ahhhh, that's what it is (I think, at least it's yet another thing you gotta add for setup). In Advanced Settings.ini, under [Included Setups], add an Include= (or Include###= depending on version) for "quests"

    So your Advanced Settings file should look something like this:

    Code:
    ...
    ...
    Debug Wait4Rez (On/Off)=Off
    [Included Setups]
    Include#1=background
    Include#2=basics
    ...
    ...
    Include#20=quests
    
    and THAT should get the file recognized. /sigh e3 is so poorly designed/architected. To add a file you gotta update multiple spots /sigh. Anyways, maybe this'll fix it and get it running for you!
     
  8. graphia

    graphia Orc Pawn

    Messages:
    21
    Thank you, that did the trick! E3 is recognizing the Quests include and it's working beautifully.
     
    Last edited: Aug 30, 2023