Codebox NPC


A module for AzerothCore by StygianTheBest.


Meet Retdream, the Keeper of Codes. She’s a codebox NPC that emotes and speaks. This NPC takes codes from the player and checks them against custom database tables to determine the loot. You can set charges for items to allow players to use the code once or a specific number of times. It also supports unique codes that can only be used once by any player.


  • Creates a CodeBox NPC with emotes
  • Gives items and/or gold to players if they enter the correct code
  • Reads/Writes code data from the database
  • Supports alpha-numeric codes
  • Supports multi-item codes
  • Supports # of charges per code
  • Supports unique codes to be given out only once to any player
  • Checks for already redeemed codes
  • Checks for # of charges used


  • Allow GM interaction with NPC to create, edit, and disable codes in game
  • If possible, create a way to prevent players from trading codes
  • Figure out a better way to handle codes multi-item codes with multiple charges
    • ex) You create a code that gives the player 3 items and can be used 3 times
    • A 3 item code with 3 charges MUST have charges set to 9 for each item
    • The first time the code is used it will record 3 items in the database with that code
    • The second time the code is used the database is checked for # of items with that code and returns 3
    • So, to allow 3 uses of the code, we need to set the # of charges to: # of charges * # of items (3 x 3 = 9)


  • Type: NPC
  • Script: codebox_npc
  • Config: Yes
    • Enable Module Announce
  • SQL: Yes
    • NPC (ID: 601021)
    • Add Table: lootcode_items (codes, items, charges, etc.)
    • Add Table: lootcode_player (tracks redeemed codes)


  • 2017.08.13 - Release

NOTE: This project is marked as archived. This means that this page may be limited or inaccurate, most likely due to updates that have been pushed to the source repository. In addition, downloads may be missing and/or incomplete if links have expired or files have been deleted or migrated to a new host.

Other Projects


Gambler NPC

A module for AzerothCore


Money For Kills

A module for AzerothCore

All code and scripts are released under GNU AGPL v3.
World of Warcraft© and Blizzard Entertainment© are all trademarks or registered trademarks of Blizzard Entertainment in the United States and/or other countries. These [terms] and all related materials, logos, and images are [copyright] © Blizzard Entertainment. This site is in no way associated with or endorsed by Blizzard Entertainment©.