mirror of
https://github.com/araxiaonline/RandomScriptsforAzerothCore.git
synced 2026-06-13 02:22:19 -04:00
Add files via upload
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
--XP = (Char Level * 5) + 1878, where Char Level = Mob Level, for mobs in Cataclysm
|
--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 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 XP_MODIFIER = 0.05 --change me to be whatever you want
|
||||||
local BASE_XP = 45
|
local BASE_XP = 15
|
||||||
|
|
||||||
--You don't need to modify anything below.
|
--You don't need to modify anything below.
|
||||||
|
|
||||||
|
|||||||
71
WeaponMaster.lua
Normal file
71
WeaponMaster.lua
Normal file
@@ -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)
|
||||||
@@ -4,7 +4,7 @@ local function OnCommand(event, player, command)
|
|||||||
if command == cmd then
|
if command == cmd then
|
||||||
if not player:IsInCombat() then
|
if not player:IsInCombat() then
|
||||||
player:DurabilityRepairAll( false )
|
player:DurabilityRepairAll( false )
|
||||||
player:SendBroadcastMessage("Your items has been repaired.")
|
player:SendBroadcastMessage("Your equipment has been repaired.")
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -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 ItemEntry = 6948 -- Hearthstone. You can change this item ID to whatever.
|
||||||
|
|
||||||
local T = {
|
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)
|
local function OnGossipHello(event, player, item)
|
||||||
-- Show main menu
|
-- Show main menu
|
||||||
for i, v in ipairs(T) do
|
for i, v in ipairs(T) do
|
||||||
|
|||||||
Reference in New Issue
Block a user