• 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 --->
Resource icon

Broadcast (DanNet or EQBC) 2023-07-11

Other Authors
Knightly
Server Type
🏢 Live 🏘️ Emu TLP Test
Library to help broadcast important information to all DanNet/EQBC connected toons, or a single defined toon (driver).

Heavily inspired by Knightly's 'Write' lua script

Installation
Add broadcast.lua and broadcastinterface.lua to the lua folder of your MQ directory.

Broadcast Usage
Lua:
local broadcast = require('broadcast')

broadcast.Info("Information for all")
broadcast.Success("We succeded")
broadcast.Fail("I failed")
broadcast.Warn("Im in trouble")
broadcast.Error("Something went horribly wrong")

-- Handle string formatting too
broadcast.Success("%s successully cast %s", mq.TLO.Me.Name, 'Complete Heal')

Setting reciever in config will attempt to send broadcast only to this character:
Lua:
local defaultConfig = {
  usecolors = true,
  usetimestamp = false,
  broadcastLevel = 'success',
  separator = '::',
  reciever = nil  -- Used to specify a list of recievers (not broadcast to all), comma separated
}

BroadcastInterface Usage

Lua:
local broadCastInterfaceFactory = require 'broadcast/broadcastinterface'

---@alias ColorName 'Previous'|'Black'|'Blue'|'Cyan'|'Green'|'Maroon'|'Orange'|'Red'|'White'|'Yellow'

---@class BroadCastInterface
---@field Broadcast fun(message: string, recievers?: string[])
---@field ExecuteCommand fun(executeCommand: string, recievers: string[])
---@field ExecuteAllCommand fun(executeCommand: string, includeSelf?: boolean)
---@field ConnecteClients fun(): string[]
---@field ColorWrap fun(self: BroadCastInterface, text: string, color: ColorName): string
---@field ColorCodes table<ColorName, string>
local bci = broadCastInterfaceFactory() -- instatiate a new broadcast interface (requires DanNet or NetBots to be loaded, DanNet is preferred protocol)

local command = string.format('/say %s', "This is triggered remotly")
bci.ExecuteAllCommand(command, true) -- 2nd parameter is to include self and is optional (default false)
bci.ExecuteCommand(command, {"Toon1", "Toon2"}) -- 2nd parameter is a list of toons that should execute the command
Author
Wednesday
First release
Last update
Rating
0.00 star(s) 0 ratings

Share this resource

Latest updates

  1. Added functionality to run slash commands remotely with DanNet / NetBots abstraction

    BroadcastInterface Usage local broadCastInterfaceFactory = require...
  2. Now supporting both EQBC and DanNet

    Now supporting both EQBC and DanNet DanNet is the preferred method if both are loaded. If none...
  3. Change to github repository download

    Change to github repository download for better change tracking
Back
Top