From 989a52db5b4407d272846e47119cea30de237c11 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Fri, 3 Mar 2023 16:35:23 -0700 Subject: [PATCH] Add files via upload --- LowCreatureXP.lua | 4 +-- WeaponMaster.lua | 71 +++++++++++++++++++++++++++++++++++++++++++++++ repair.lua | 2 +- teleporter.lua | 27 ------------------ 4 files changed, 74 insertions(+), 30 deletions(-) create mode 100644 WeaponMaster.lua diff --git a/LowCreatureXP.lua b/LowCreatureXP.lua index e6a5463..9e32215 100644 --- a/LowCreatureXP.lua +++ b/LowCreatureXP.lua @@ -7,8 +7,8 @@ --XP = (Char Level * 5) + 1878, where Char Level = Mob Level, for mobs in Cataclysm local ENABLED = true --change to true or false depending on whether or not you want the script enabled. -local XP_MODIFIER = 0.25 --change me to be whatever you want -local BASE_XP = 45 +local XP_MODIFIER = 0.05 --change me to be whatever you want +local BASE_XP = 15 --You don't need to modify anything below. diff --git a/WeaponMaster.lua b/WeaponMaster.lua new file mode 100644 index 0000000..675e5c8 --- /dev/null +++ b/WeaponMaster.lua @@ -0,0 +1,71 @@ +local NpcId = nil -- NPC ID The ID for the npc that will show you the menu + +local Weapon_Master = {} + +local CLASS_WARRIOR = 1 +local CLASS_PALADIN = 2 +local CLASS_HUNTER = 3 +local CLASS_ROGUE = 4 +local CLASS_PRIEST = 5 +local CLASS_DEATH_KNIGHT = 6 +local CLASS_SHAMAN = 7 +local CLASS_MAGE = 8 +local CLASS_WARLOCK = 9 +local CLASS_DRUID = 11 + +Skills = { + ["Menu"] = { + {"Warrior", 1}, + {"Paladin", 2}, + {"Hunter", 3}, + {"Rogue", 4}, + {"Priest", 5}, + {"Shaman", 7}, + {"Mage", 8}, + {"Warlock", 9}, + {"Druid", 11}, + {"Death Knight", 6} + }, + [CLASS_WARRIOR] = {202,199,197,227,200,201,198,196,266,15590,1180,5011,264}, + [CLASS_PALADIN] = {202, 199,197,200,201,198,196}, + [CLASS_HUNTER] = {202,197,227,200,201,196,266,15590,1180,5011,264}, + [CLASS_ROGUE] = {201,198,196,266,15590,1180,5011,264}, + [CLASS_PRIEST] = {227,198,1180}, + [CLASS_SHAMAN] = {199,197,227,198,196,15590,1180}, + [CLASS_MAGE] = {227,201,1180}, + [CLASS_WARLOCK] = {227,201,1180}, + [CLASS_DRUID] = {199,227,200,198,15590,1180}, + [CLASS_DEATH_KNIGHT] = {202,199,197,200,201,198,196} +} +function Weapon_Master.Hello(event, player, object) + for _, v in ipairs(Skills["Menu"]) do + player:GossipMenuAddItem(3, " " .. v[1] .. ".|R", 0, v[2]) + end + + player:GossipSendMenu(1, object) +end + +function Weapon_Master.Select(event, player, object, sender, intid, code, menu_id) + local playerclass = player:GetClass() + if (intid == playerclass) then + for k, v in pairs(Skills) do + if (k == playerclass) then + for _, v in ipairs(v) do + if player:HasSpell(v) == false then + player:LearnSpell(v) + end + + end + end + end + object:SendChatMessageToPlayer(8, 0, "You have learned all your weapon skills!", player) + player:GossipComplete() + else + object:SendChatMessageToPlayer(8, 0, "Wrong Class " .. player:GetName(), player) + + Weapon_Master.Hello(event, player, object) + end +end + +RegisterCreatureGossipEvent(NpcId, 1, Weapon_Master.Hello) +RegisterCreatureGossipEvent(NpcId, 2, Weapon_Master.Select) \ No newline at end of file diff --git a/repair.lua b/repair.lua index cd3b152..f048f6b 100644 --- a/repair.lua +++ b/repair.lua @@ -4,7 +4,7 @@ local function OnCommand(event, player, command) if command == cmd then if not player:IsInCombat() then player:DurabilityRepairAll( false ) - player:SendBroadcastMessage("Your items has been repaired.") + player:SendBroadcastMessage("Your equipment has been repaired.") end return false end diff --git a/teleporter.lua b/teleporter.lua index 1b78234..76ed3d0 100644 --- a/teleporter.lua +++ b/teleporter.lua @@ -1,27 +1,3 @@ ---[==[ - = How to add new locations = - - Example: - - The first line will be the main menu ID (Here [1], - increment this for each main menu option!), - the main menu gossip title (Here "Horde Cities"), - as well as which faction can use the said menu (Here 1 (Horde)). - 0 = Alliance, 1 = Horde, 2 = Both - - The second line is the name of the main menu's sub menus, - separated by name (Here "Orgrimmar") and teleport coordinates - using Map, X, Y, Z, O (Here 1, 1503, -4415.5, 22, 0) - - [1] = { "Horde Cities", 1, -- This will be the main menu title, as well as which faction can use the said menu. 0 = Alliance, 1 = Horde, 2 = Both - {"Orgrimmar", 1, 1503, -4415.5, 22, 0}, - }, - - You can copy paste the above into the script and change the values as informed. - - ItemEntry is set to Hearthstone. You may use another entry with a spell cast. -]==] - local ItemEntry = 6948 -- Hearthstone. You can change this item ID to whatever. local T = { @@ -86,9 +62,6 @@ local T = { }, } --- CODE STUFFS! DO NOT EDIT BELOW --- UNLESS YOU KNOW WHAT YOU'RE DOING! - local function OnGossipHello(event, player, item) -- Show main menu for i, v in ipairs(T) do