World of Warcraft [CLASSIC] plugin lua
World of Warcraft [CLASSIC] plugin lua 魔兽世界lua脚本插件
World of Warcraft API - Wowpedia - Your wiki guide to the World of Warcraft
D:\World of Warcraft\_classic_\Interface\AddOns
zwf.lua
function CountdownFunc()CountdownFrame = CreateFrame("Frame") FrameScript = function() if GetTime() - MarkTime > 1 then if S == 0 then SendChatMessage(">>烟雾弹<<结束", "YELL") FrameScript = nil CountdownFrame:SetScript("OnUpdate",FrameScript) else SendChatMessage(S,"YELL") end MarkTime = GetTime() S = S - 1 end end MarkTime = GetTime() S = 5 CountdownFrame:SetScript("OnUpdate",FrameScript) SendChatMessage(">>烟雾弹<<已释放", "YELL")
end MainFrame = CreateFrame("Frame")
MainFrame:RegisterEvent("UNIT_SPELLCAST_SENT")
MainFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
MainFrame:SetScript("OnEvent", function(_, _, a, b, _, c) if a == "player" and b== "烟雾弹" then n = type(c) == "string" and c or CountdownFunc() end
end)
zwf.toc
zwf.lua
==Console==
Console.lua
local PlayerName = GetUnitName("Player")
local _, PlayerClass = UnitClass("Player")
--print("ha")local Console = CreateFrame("Frame", nil, UIParent)
ConsolePointer = ConsoleConsole.isInit = false--Console:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
Console:RegisterEvent("PLAYER_LOGIN")
Console:RegisterEvent("ADDON_LOADED")
Console:SetScript("OnEvent", function(self,e,...) local func = self.HandleFunc[e]func(...)
end)
--[[
Console:SetScript("OnUpdate", function(self, elapsed)local func = self.HandleFunc["ON_UPDATE"]func(elapsed)
end
]]--
Console.HandleFunc = {ADDON_LOADED = function(...)local AddonName = ...if AddonName ~= "Console" then return end--Initialize Saved Variables if Necessaryif ConsoleData == nil then ConsoleData = {}ConsoleData.Position = {X = 335, Y = 155}if ConsoleData.CurrentText == nil then ConsoleData.CurrentText = ""endend--print("Spells:", type(ItIsReadyData["Spells"]))end,PLAYER_LOGIN = function (...)Console.Main = CreateFrame("Frame", nil, UIParent)Console.Main:SetHeight(500)Console.Main:SetWidth(500)Console.Main:SetBackdrop({bgFile = "Interface\\AddOns\\Sora's Threat\\Media\\Solid", -- 背景材质路径 insets = {left = 1,right = 1,top = 1,bottom = 1}, -- 背景收缩程度,单位为像素,例如,top = 1即背景材质的上边缘向内收缩1个像素 edgeFile = "Interface\\AddOns\\Sora's Threat\\Media\\Solid", -- 边框材质路径 edgeSize = 1, -- 边框宽度 })Console.Main:SetBackdropColor(0, 0, 0, 0.5)Console.Main:SetBackdropBorderColor(0, 0, 0, 0.7)Console.Main:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", ConsoleData.Position.X, ConsoleData.Position.Y)Console.Main:SetMovable(true)Console.Main:EnableMouse(true)Console.Main:RegisterForDrag("LeftButton")Console.Main:SetScript("OnDragStart", Console.Main.StartMoving)Console.Main:SetScript("OnDragStop", function()Console.Main:StopMovingOrSizing()ConsoleData.Position.Y = Console.Main:GetBottom() ConsoleData.Position.X = Console.Main:GetLeft() end)Console.Main.Title = Console.Main:CreateFontString(nil, "OVERLAY")Console.Main.Title:SetFont(GameTooltipText:GetFont(), 15, "THINOUTLINE")Console.Main.Title:SetText("Lua Console")Console.Main.Title:SetPoint("TOP" , Console.Main, "TOP", 0, -5)Console.ScriptFrame = CreateFrame("EditBox", nil, Console.Main)Console.ScriptFrame:SetSize(480, 450)--Console.ScriptFrame:SetPoint("CENTER", Console.Main, "CENTER", 0, 3)Console.ScriptFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Sora's Threat\\Media\\Solid", -- 背景材质路径 insets = {left = 1,right = 1,top = 1,bottom = 1}, -- 背景收缩程度,单位为像素,例如,top = 1即背景材质的上边缘向内收缩1个像素 edgeFile = "Interface\\AddOns\\Sora's Threat\\Media\\Solid", -- 边框材质路径 edgeSize = 1, -- 边框宽度 })Console.ScriptFrame:SetBackdropColor(0, 0, 0, 0.8)Console.ScriptFrame:SetBackdropBorderColor(0, 0, 0, 0.8)Console.ScriptFrame:ClearFocus()Console.ScriptFrame:SetMultiLine(true)Console.ScriptFrame:SetMaxBytes(0)Console.ScriptFrame:SetMaxLetters(0)Console.ScriptFrame:SetAutoFocus(false)Console.ScriptFrame:SetFontObject(ChatFontNormal)Console.ScriptFrame:EnableMouse(true)Console.ScriptFrame:SetText(ConsoleData.CurrentText)Console.ScriptScroll = CreateFrame("ScrollFrame", "ScrollHandle", Console.Main, "UIPanelScrollFrameTemplate")Console.ScriptScroll:SetPoint("TOPLEFT", Console.Main, "TOPLEFT", 10, -22)Console.ScriptScroll:SetPoint("BOTTOMRIGHT", Console.Main, "BOTTOMRIGHT", -30, 25)Console.ScriptScroll:SetScrollChild(Console.ScriptFrame)Console.HideAndShowButton = CreateFrame("Button", "ConsoleDisplayControl", UIParent, "UIPanelButtonTemplate")Console.HideAndShowButton:SetText("Hide")Console.HideAndShowButton:SetScript("OnClick", function() local func = Console.HandleFunc["HIDE_SHOW_BUTTON_CLICK"]func()end)Console.HideAndShowButton:SetPoint("BOTTOMLEFT", Console.Main, "BOTTOMLEFT", 5, -24)Console.HideAndShowButton:SetSize(55, 22)Console.RunBotton = CreateFrame("Button", "RunBotton", Console.Main, "UIPanelButtonTemplate")Console.RunBotton:SetText("Run!")Console.RunBotton:SetScript("OnClick", function()local func = Console.HandleFunc["RUN_BOTTON_CLICK"]func()end)Console.RunBotton:SetPoint("BOTTOMRIGHT", Console.Main, "BOTTOMRIGHT", -5, 2)Console.RunBotton:SetSize(55, 22)Console.ReloadUIButton = CreateFrame("Button", "ReloadUIButton", Console.Main, "UIPanelButtonTemplate")Console.ReloadUIButton:SetText("ReloadUI")Console.ReloadUIButton:SetScript("OnClick", function() ConsoleData.CurrentText = Console.ScriptFrame:GetText()ReloadUI()end)Console.ReloadUIButton:SetPoint("BOTTOMLEFT", Console.Main, "BOTTOMLEFT", 5, 2)Console.ReloadUIButton:SetSize(75, 22)print("Console has inicialized")--print(type(ConsoleData.CurrentText))end,HIDE_SHOW_BUTTON_CLICK = function()if Console.Main:IsShown() thenConsole.Main:Hide()Console.HideAndShowButton:SetText("Show")elseConsole.Main:Show()Console.HideAndShowButton:SetText("Hide")endend,RUN_BOTTON_CLICK = function()local code = Console.ScriptFrame:GetText()--code = string.gsub(code, "\t", "___")print(">> "..code)local f = assert(loadstring(code))f()end}
Console.toc
## Interface: 50300
## Version: 0.0.1
## Author: Wing
## Title: lua Console
## Notes: allows you to directly type lua script and run it in WOW
## SavedVariablesPerCharacter: ConsoleDataConsole.xml
Console.xml
<Ui xmlns="http://www.blizzard.com/wow/ui/"><Script file="Console.lua"/><Script file="Slash.lua"/></Ui>
Slash.lua
--[[SLASH_SAYSOMETHING1 = "/sayit"
SLASH_SAYSOMETHING2 = "/si"SlashCmdList["SAYSOMETHING"] = function(...)local msg = ...print(msg)ItIsReadyData.msg = msg
endSLASH_LOADSOMETHING1 = "/loadit"SlashCmdList["LOADSOMETHING"] = function(...)print(ItIsReadyData.msg)
end
]]--SLASH_RELOADUISHORT1 = "/rl"SlashCmdList["RELOADUISHORT"] = function(...)ReloadUI()
endlocal Console = ConsolePointer
local help_info1 = "\t To add spell watch, enter /iir add {spell id}.\n To remove spell watch, enter /iir rm {spell id}.\n To list all watch, enter /iir list.\n To open/close debug, enter /iir debug.\n"
local help_info2 = "\t To add spell watch group, enter /iir addg {group name}.\n To remove spell watch group, enter /iir rmg {group name}.\n To select a group, enter /iir sel {group name}"function Console:releaseOnUpdate()self:SetScript("OnUpdate", function(self, elapsed) end)
endSLASH_ITISREADY1 = "/console"
SLASH_ITISREADY2 = "/cmd"SlashCmdList["CONSOLE"] = function (...)local arg, var = ...arg, var = strsplit(" ", arg)--print(arg)--print(var)if arg == "add" then end
endConsole.SlashHandleFunc = {}
==督军战士,督军猎人==
相关文章:

World of Warcraft [CLASSIC] plugin lua
World of Warcraft [CLASSIC] plugin lua 魔兽世界lua脚本插件 World of Warcraft API - Wowpedia - Your wiki guide to the World of Warcraft D:\World of Warcraft\_classic_\Interface\AddOns zwf.lua function CountdownFunc()CountdownFrame CreateFrame("Fram…...

背靠广汽、小马智行,如祺出行打得过滴滴和百度吗?
©自象限原创 作者丨艾AA 编辑丨薛黎 北京时间6月14日凌晨,在特斯拉股东大会上,马斯克阐述了对Robotaxi(自动驾驶出租车)商业模式的构想——特斯拉不仅会运营自己的无人驾驶出租车车队,还可以让特斯拉车主们的爱…...

CCSP自考攻略+经验总结
备考攻略 备考攻略准备阶段通读阶段精度阶段总复习阶段刷题阶段命运审判 写到最后 备考攻略 趁着对ssp知识点的理解还在,开始ccsp的考证之路,文章结构还是按照cissp备考篇的结构梳理。本次备考和cissp的离职在家备考不同,ccsp是在职利用非工…...

面试突击:ArrayList源码详解
本文已收录于:https://github.com/danmuking/all-in-one(持续更新) 前言 哈喽,大家好,我是 DanMu。ArrayList 是我们日常开发中不可避免要使用到的一个类,并且在面试过程中也是一个非常高频的知识点&#…...
力扣每日一题:2734. 执行子串操作后的字典序最小字符串
题目链接 脑子比较笨,分三种情况考虑: 以a开头。xxa,a在中间。 对于情况2还有两种可能: 1. 全是a,最后一个元素需要替换成z,因为必须执行一次操作。 2. aaaxxa,中间有一段非a,将这…...
C++11中std::thread的使用
C11 引入了 std::thread,它是用于创建和管理线程的标准库类。以下是详细的讲解,包括如何使用 std::thread 进行线程创建、管理和参数传递等操作。 1. 包含必要的头文件 在使用 std::thread 前,需要包含 <thread> 头文件: …...

酷瓜云课堂(内网版)v1.1.5 发布,局域网在线学习+考试系统
更新内容 更新layui-v2.9.10更新docker国内镜像地址增加导入镜像构建容器的方式教师不批阅非首次考试试卷轮播图增加专栏类型目标链接增加课程能否发布检查去除初始化kindeditor语言文件去除选择题EF选项优化富文本内容显示样式优化内容图片点击放大监听优化试题题干答案等图片…...

大数据之Hadoop部署
文章目录 服务器规划服务器环境准备1. 网络测试2. 安装额外软件包3. 安装基础工具4. 关闭防火墙5. 创建用户并配置权限6. 创建目录并设置权限7. 卸载JDK8. 修改主机名9. 配置hosts文件10. 重启服务器 配置免密登录安装Java安装Hadoop1. Hadoop部署2. 配置Hadoop3. 格式化Hadoop…...
Java异常处理中的“throw”与“throws”的区别
在Java中,throw 和 throws 是两个用于处理异常的关键词,它们的使用场景和目的有所不同 1. throw throw 关键字用于在Java程序中显式地抛出一个异常。当你检测到某些条件(通常是错误条件)时,你可以使用 throw 来抛出一…...

英语智汇学习系统
目 录 1 软件概述 1.1 项目研究背景及意义 2 系统相关技术 2.1 HTML、WXSS、JAVASCRIPT技术 2.2 Vanilla框架 2.3 uni-app框架 2.4 MYSQL数据库 3 需求分析 3.1 可行性分析 3.2 功能需求分析 3.3 系统用户及用例分析 3.4 非功能需求分析 3.5 数据流图…...
ExtractAItoTEXT 提取Adobe illustrator AI文件中的文字到文本文件翻译并写回到Adobe illustrator AI文件
Extract Text from Adobe illustrator to text for translate and write back to Adobe illustrator after translate in text file. Originally script from marceloliaohotmail.com during his work in SDL. Updated by me. 从Adobe illustrator中提取文本以进行翻译&#x…...
ms17-010 ms12-020 ms-08-067
MS17-010是一个由微软发布的安全公告编号,它指代了一个严重级别的安全漏洞,该漏洞存在于Microsoft Windows的Server Message Block 1.0 (SMBv1)协议处理中。这个漏洞被命名为“永恒之蓝”(EternalBlue),因为它最初是由…...

【海思Hi3403V100】多目拼接相机套板硬件规划方案
海思Hi3403V100 是专业超高清智能网络摄像头 SoC。该芯片最高支持四路 sensor 输入,支持最高 4K60fps 的 ISP 图像处理能力,支持 3F 、WDR、多级降噪、六轴防抖、硬件拼接、多光谱融合等多种传统图像增强和处理算法,支持通过AI 算法对输入图像…...
AI的赚钱风向,彻底变了!
从2023年3月起,生成式AI技术的浪潮席卷全球,让不少人开始焦虑中国AI技术与美国的差距。然而,最近的趋势显示,AI创业的盈利模式已经发生了根本性的变化。今年,我们见证了AIGC(人工智能生成内容)企…...
服务器重启后jenkins任务内容不见了,并且新建任务也不见了
服务器centos7.4 背景:服务器异常重启后,jenkins上面的任务只剩下一些前端项目,后端的任务都不展示了,jenkins版本是Jenkins 2.346.3 解决方案:根据显示,jenkins很多的插件引用失败,显示需要升…...

如何选择合适的WordPress主机?
选择合适的WordPress主机需要考虑多个因素,包括性能、速度、存储空间、带宽、硬件配置、操作系统、支持的软件版本以及安全性等。以下是一些详细的建议: 性能和速度:选择一个能够提供快速加载速度和稳定性能的主机至关重要。快速加载的网站不…...

面试突击:Java 集合知识体系梳理
本文已收录于:https://github.com/danmuking/all-in-one(持续更新) 前言 哈喽,大家好,我是 DanMu。在 Java 开发中,集合类对象绝对是被使用最频繁的对象之一。因此,深入了解集合类对象的底层数…...
AI智能管理系统设计文档
AI智能管理系统设计文档 1. 引言 本设计文档旨在开发一套全面的AI智能管理系统,以优化生产运营效率和决策质量。该系统将利用先进的AI技术和数据分析能力,提供自动化流程控制、预测性维护、智能决策支持等功能。 2. 需求分析与目标设定 2.1 业务需求…...

干涉阵型成图参数记录【robust】
robust 这个玩意经常忘记,就是取2的时候是更加显示大尺度的结构,取-2更加显示小尺度结果,一般取0就是正常就好了...
React Native工程运行时下载gradle超时问题
React Native工程在运行Android的时候会下载gradle,但是由于众所周知的问题,总是下载失败,这时可以通过修改 <APP_ROOT>/android/wrapper/gradle-wrapper.properties 文件中 distributionUrl 参数使用国内 gradle 镜像来提高下载速度。…...

多云管理“拦路虎”:深入解析网络互联、身份同步与成本可视化的技术复杂度
一、引言:多云环境的技术复杂性本质 企业采用多云策略已从技术选型升维至生存刚需。当业务系统分散部署在多个云平台时,基础设施的技术债呈现指数级积累。网络连接、身份认证、成本管理这三大核心挑战相互嵌套:跨云网络构建数据…...

高危文件识别的常用算法:原理、应用与企业场景
高危文件识别的常用算法:原理、应用与企业场景 高危文件识别旨在检测可能导致安全威胁的文件,如包含恶意代码、敏感数据或欺诈内容的文档,在企业协同办公环境中(如Teams、Google Workspace)尤为重要。结合大模型技术&…...

Module Federation 和 Native Federation 的比较
前言 Module Federation 是 Webpack 5 引入的微前端架构方案,允许不同独立构建的应用在运行时动态共享模块。 Native Federation 是 Angular 官方基于 Module Federation 理念实现的专为 Angular 优化的微前端方案。 概念解析 Module Federation (模块联邦) Modul…...

(转)什么是DockerCompose?它有什么作用?
一、什么是DockerCompose? DockerCompose可以基于Compose文件帮我们快速的部署分布式应用,而无需手动一个个创建和运行容器。 Compose文件是一个文本文件,通过指令定义集群中的每个容器如何运行。 DockerCompose就是把DockerFile转换成指令去运行。 …...

安宝特案例丨Vuzix AR智能眼镜集成专业软件,助力卢森堡医院药房转型,赢得辉瑞创新奖
在Vuzix M400 AR智能眼镜的助力下,卢森堡罗伯特舒曼医院(the Robert Schuman Hospitals, HRS)凭借在无菌制剂生产流程中引入增强现实技术(AR)创新项目,荣获了2024年6月7日由卢森堡医院药剂师协会࿰…...

基于Java+MySQL实现(GUI)客户管理系统
客户资料管理系统的设计与实现 第一章 需求分析 1.1 需求总体介绍 本项目为了方便维护客户信息为了方便维护客户信息,对客户进行统一管理,可以把所有客户信息录入系统,进行维护和统计功能。可通过文件的方式保存相关录入数据,对…...

STM32HAL库USART源代码解析及应用
STM32HAL库USART源代码解析 前言STM32CubeIDE配置串口USART和UART的选择使用模式参数设置GPIO配置DMA配置中断配置硬件流控制使能生成代码解析和使用方法串口初始化__UART_HandleTypeDef结构体浅析HAL库代码实际使用方法使用轮询方式发送使用轮询方式接收使用中断方式发送使用中…...

TSN交换机正在重构工业网络,PROFINET和EtherCAT会被取代吗?
在工业自动化持续演进的今天,通信网络的角色正变得愈发关键。 2025年6月6日,为期三天的华南国际工业博览会在深圳国际会展中心(宝安)圆满落幕。作为国内工业通信领域的技术型企业,光路科技(Fiberroad&…...

Golang——7、包与接口详解
包与接口详解 1、Golang包详解1.1、Golang中包的定义和介绍1.2、Golang包管理工具go mod1.3、Golang中自定义包1.4、Golang中使用第三包1.5、init函数 2、接口详解2.1、接口的定义2.2、空接口2.3、类型断言2.4、结构体值接收者和指针接收者实现接口的区别2.5、一个结构体实现多…...

实战三:开发网页端界面完成黑白视频转为彩色视频
一、需求描述 设计一个简单的视频上色应用,用户可以通过网页界面上传黑白视频,系统会自动将其转换为彩色视频。整个过程对用户来说非常简单直观,不需要了解技术细节。 效果图 二、实现思路 总体思路: 用户通过Gradio界面上…...