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 镜像来提高下载速度。…...
web vue 项目 Docker化部署
Web 项目 Docker 化部署详细教程 目录 Web 项目 Docker 化部署概述Dockerfile 详解 构建阶段生产阶段 构建和运行 Docker 镜像 1. Web 项目 Docker 化部署概述 Docker 化部署的主要步骤分为以下几个阶段: 构建阶段(Build Stage):…...
基于ASP.NET+ SQL Server实现(Web)医院信息管理系统
医院信息管理系统 1. 课程设计内容 在 visual studio 2017 平台上,开发一个“医院信息管理系统”Web 程序。 2. 课程设计目的 综合运用 c#.net 知识,在 vs 2017 平台上,进行 ASP.NET 应用程序和简易网站的开发;初步熟悉开发一…...
IGP(Interior Gateway Protocol,内部网关协议)
IGP(Interior Gateway Protocol,内部网关协议) 是一种用于在一个自治系统(AS)内部传递路由信息的路由协议,主要用于在一个组织或机构的内部网络中决定数据包的最佳路径。与用于自治系统之间通信的 EGP&…...
oracle与MySQL数据库之间数据同步的技术要点
Oracle与MySQL数据库之间的数据同步是一个涉及多个技术要点的复杂任务。由于Oracle和MySQL的架构差异,它们的数据同步要求既要保持数据的准确性和一致性,又要处理好性能问题。以下是一些主要的技术要点: 数据结构差异 数据类型差异ÿ…...
Nginx server_name 配置说明
Nginx 是一个高性能的反向代理和负载均衡服务器,其核心配置之一是 server 块中的 server_name 指令。server_name 决定了 Nginx 如何根据客户端请求的 Host 头匹配对应的虚拟主机(Virtual Host)。 1. 简介 Nginx 使用 server_name 指令来确定…...
leetcodeSQL解题:3564. 季节性销售分析
leetcodeSQL解题:3564. 季节性销售分析 题目: 表:sales ---------------------- | Column Name | Type | ---------------------- | sale_id | int | | product_id | int | | sale_date | date | | quantity | int | | price | decimal | -…...
【Java_EE】Spring MVC
目录 Spring Web MVC 编辑注解 RestController RequestMapping RequestParam RequestParam RequestBody PathVariable RequestPart 参数传递 注意事项 编辑参数重命名 RequestParam 编辑编辑传递集合 RequestParam 传递JSON数据 编辑RequestBody …...
深度学习习题2
1.如果增加神经网络的宽度,精确度会增加到一个特定阈值后,便开始降低。造成这一现象的可能原因是什么? A、即使增加卷积核的数量,只有少部分的核会被用作预测 B、当卷积核数量增加时,神经网络的预测能力会降低 C、当卷…...
论文阅读:LLM4Drive: A Survey of Large Language Models for Autonomous Driving
地址:LLM4Drive: A Survey of Large Language Models for Autonomous Driving 摘要翻译 自动驾驶技术作为推动交通和城市出行变革的催化剂,正从基于规则的系统向数据驱动策略转变。传统的模块化系统受限于级联模块间的累积误差和缺乏灵活性的预设规则。…...
9-Oracle 23 ai Vector Search 特性 知识准备
很多小伙伴是不是参加了 免费认证课程(限时至2025/5/15) Oracle AI Vector Search 1Z0-184-25考试,都顺利拿到certified了没。 各行各业的AI 大模型的到来,传统的数据库中的SQL还能不能打,结构化和非结构的话数据如何和…...
