From 22eed3ecf274183eb9fae246ad26aa34b549cf57 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Mon, 6 Mar 2023 05:51:14 -0700 Subject: [PATCH] Add files via upload --- DinkleStone.lua | 118 +++++++++++++++++++++++++++++++++++++++++++++ Hardcore.lua | 43 +++++++++++++++++ LevelUpReward.lua | 6 +-- reload_scripts.lua | 10 ++-- 4 files changed, 167 insertions(+), 10 deletions(-) create mode 100644 DinkleStone.lua create mode 100644 Hardcore.lua diff --git a/DinkleStone.lua b/DinkleStone.lua new file mode 100644 index 0000000..747c33d --- /dev/null +++ b/DinkleStone.lua @@ -0,0 +1,118 @@ +local ItemEntry = 6948 -- Hearthstone. You can change this item ID to whatever. + +local T = { + [1] = { "|TInterface\\icons\\achievement_pvp_h_h:37:37:-23|t|cff610B0BHorde Cities|r", 1, + {"Orgrimmar", 1, 1503, -4415.5, 22, 0}, + {"Undercity", 0, 1831, 238.5, 61.6, 0}, + {"Thunderbluff", 1, -1278, 122, 132, 0}, + {"Silvermoon City", 530, 9487.69, -7279.2, 14.2866, 0}, + {"Shattrath", 530, -1838.16, 5301.79, -12.428, 0}, + {"Dalaran", 571, 5804.15, 624.771, 647.767, 0}, + }, + [2] = {"|TInterface\\icons\\achievement_pvp_a_a:37:37:-23|t|cff0101DFAlliance Cities|r", 0, + {"Stormwind", 0, -8905, 560, 94, 0.62}, + {"Ironforge", 0, -4795, -1117, 499, 0}, + {"Darnassus", 1, 9952, 2280.5, 1342, 1.6}, + {"Exodar", 530, -3965.7, -11653.6, -138.844, 0}, + {"Shattrath", 530, -1838.16, 5301.79, -12.428, 0}, + {"Dalaran", 571, 5804.15, 624.771, 647.767, 0}, + }, + [3] = { "|TInterface\\icons\\achievement_bg_winwsg:37:37:-23|t|cffC41F3BPvP Locations|r", 2, + {"Gurubashi Arena", 0, -13229, 226, 33, 1}, + {"Dire Maul Arena", 1, -3669, 1094, 160, 3}, + {"Nagrand Arena", 530, -1983, 6562, 12, 2}, + {"Blade's Edge Arena", 530, 2910, 5976, 2, 4}, + }, + [4] = {"|TInterface\\icons\\achievement_zone_elwynnforest:37:37:-23|t|cff0101DFAlliance Starter Areas|r", 0, + {"Northshire Valley", 0, -8921.09, -119.13, 82.2, 6}, + {"Coldridge", 0, -6231.77, 333, 383.17, 0}, + {"Shadowglen", 1, 10322.26, 831.4, 1326.37, 0}, + {"Ammen Vale", 530, -3961.64, -13931.2, 100.615, 0}, + }, + [5] = { "|TInterface\\icons\\achievement_zone_durotar:37:37:-23|t|cff610B0BHorde Starter Areas|r", 1, + {"Valley of Trials", 1, -618.518, -4251.67, 38.718, 0}, + {"Camp Narache", 1, -2917.58, -257.98, 52.9968, 0}, + {"Death Knell", 0, 1676.71, 1678.31, 121.67, 0}, + {"Sunstrider Isle", 530, 10349.6, -6357.29, 33.4026, 0}, + }, + [6] = {"|TInterface\\icons\\achievement_boss_ragnaros:37:37:-23|t|cff0101DFRaids|r", 2, + {"Molten Core", 230, 1126.64, -459.94, -102.535, 3.46095}, + {"Onyxia's Lair", 1, -4708.27, -3727.64, 54.5589, 3.72786}, + {"Blackwing Lair", 469, -7664.76, -1100.87,399.679, 0}, + {"Zul'Gurub", 309, -11916.9, -1248.36, 92.5334, 4.72417}, + {"Ahn'Qiraj", 1, -8253.067, 1538.91, -4.797, 3.065894}, + {"Naxx 40", 0, 3082.924316, -3746.725830, 133.52, 0}, + {"Karazhan", 0, -11118.9, -2010.33,47.0819, 0.649895}, + {"Magtheridon's Lair", 530, -312.7, 3087.26, -116.52, 5.19026}, + {"Gruul's Lair", 530, 3530.06, 5104.08, 3.50861, 5.51117}, + {"Zul'Aman", 530, 6851.78, -7972.57, 179.242, 4.64691}, + {"Serpentshrine Caverns", 530, 748.984436, 6870.443359, -68, 6.246}, + {"Tempest Keep", 530, 3088.49, 1381.57, 184.863, 4.61973}, + {"Hyjal Summit", 1, -8177.5, -4183, -168, 1}, + {"Black Temple", 530, -3649.92, 317.469, 35.2827, 2.94285}, + {"Sunwell Plateau", 530, 12574.1, -6774.81, 15.0904, 3.13788}, + {"Naxx Wotlk", 571, 3670.268066, -1263.276367, 243.52, 4.61}, + {"Obsidian Sanctum", 571, 3457.11, 262.394, -113.819, 3.28258}, + {"Eye of Eternity", 571, 3859.44, 6989.85, 152.041, 5.79635}, + {"Vault of Archavon", 571, 5453.72, 2840.79, 421.28, 0}, + {"Ulduar", 571, 9251.101562, -1112.424072, 1216.115479, 6.26}, + {"Trial of the Crusader", 571, 8515.68, 716.982, 558.248, 1.57315}, + {"Icecrown Citadel", 571, 5873.82, 2110.98, 636.011, 3.5523}, + {"Ruby Sanctum", 571, 3600.5, 197.34, -113.76, 5.29905}, + }, +} + +local function OnGossipHello(event, player, item) +-- Show main menu +for i, v in ipairs(T) do +if (v[2] == 2 or v[2] == player:GetTeam()) then +player:GossipMenuAddItem(0, v[1], i, 0) +end +end +player:GossipMenuAddItem(0, "|TInterface\\icons\\achievement_boss_lichking:37:37:-23|t|cff007d45Scourge Event", 150, 0) +player:GossipSendMenu(1, item) +end + +local function OnGossipSelect(event, player, item, sender, intid, code) +if (sender == 150) then +-- Show Scourge Event menu +player:GossipMenuAddItem(0, "|TInterface\\icons\\spell_misc_emotionhappy:37:37:-23|t|cff007d45Start Event for Bonus Lich Runes", 100, 0) +player:GossipMenuAddItem(0, "|TInterface\\icons\\spell_misc_emotionsad:37:37:-23|t|cffC41F3BStop Event but Die and Suffer", 101, 0) +player:GossipMenuAddItem(0, "Back", 0, 0) +player:GossipSendMenu(1, item) +return +elseif (sender == 100) then +-- Start the event +if not IsGameEventActive(17) then +player:AddItem(43949, 2) +StartGameEvent(17, true) +player:PlayDirectSound(14797) +end +player:GossipComplete() +elseif (sender == 101) then +-- Stop the event +if IsGameEventActive(17) then +StopGameEvent(17, true) +player:CastSpell(player, 13520, true) +player:CastSpell(player, 15007, true) +player:RemoveItem(43949, 2) +player:SetLevel(player:GetLevel()) +player:SendBroadcastMessage("2 Lich Runes have been removed, you've been given Resurrection Sickness and have lost your current level's experience progress. So sad :(") +player:PlayDirectSound(14776) +end +player:GossipComplete() +elseif (sender == 0) then +-- return to main menu +OnGossipHello(event, player, item) +return +else +-- teleport +local name, map, x, y, z, o = table.unpack(T[sender][intid]) +player:Teleport(map, x, y, z, o) +end + + player:GossipComplete() +end + +RegisterItemGossipEvent(ItemEntry, 1, OnGossipHello) +RegisterItemGossipEvent(ItemEntry, 2, OnGossipSelect) diff --git a/Hardcore.lua b/Hardcore.lua new file mode 100644 index 0000000..e78e1c7 --- /dev/null +++ b/Hardcore.lua @@ -0,0 +1,43 @@ +--NPC id +local hcNPC = 90000 +--This is how long the character is locked for - default is 32 years. +local banTimer = 999999999 + +--on death function - checks if player has token and bans character if it does. +local function PlayerDeath(event, killer, killed) +if(killed:HasItem(90000,1)) then +print(killed:GetName() .. " was killed by " .. killer:GetName()) +SendWorldMessage(killed:GetName() .. " was killed by " .. killer:GetName()) +Ban(1,killed:GetName(),banTimer) +end +end + +--First Gossip Screen for NPC +function OnFirstTalk(event, player, unit) +player:GossipMenuAddItem(0, "Looking for a challenge? Click here to try hardcore mode!", 0, 1) +player:GossipSendMenu(1, unit) +end + +--Selection for NPC gossip +function OnSelect(event, player, unit, sender, intid, code) +if (intid == 1) then +player:GossipMenuAddItem(0, "Just double checking to make sure that you want to turn on hardcore mode. This will lock the character after death to be no longer playable! I will likely be adding rewards for reaching certain stages of the game later...", 0, 2) +player:GossipMenuAddItem(0, "NO TAKE ME BACK!", 0, 3) +player:GossipSendMenu(2, unit) +end +end + +--if player chooses to do hardcore they receive the token +function OnHardCore(event, player, unit, sender, intid, code) +if (intid == 2) then +player:AddItem(90000, 1) +--else gossip ends +else +player:GossipComplete() +end +end + +RegisterCreatureGossipEvent(hcNPC, 1 , OnFirstTalk) +RegisterCreatureGossipEvent(hcNPC, 2, OnSelect) +RegisterCreatureGossipEvent(hcNPC, 2, OnHardCore) +RegisterPlayerEvent(8, PlayerDeath) \ No newline at end of file diff --git a/LevelUpReward.lua b/LevelUpReward.lua index 4e84bd2..b019b1f 100644 --- a/LevelUpReward.lua +++ b/LevelUpReward.lua @@ -58,7 +58,7 @@ Config_ItemId[70] = 9314 Config_ItemAmount[70] = 5 -- General Settings Config -local Config_mailText = 2 -- Which text to send in the mail to the player. +local Config_mailText = 1 -- Which text to send in the mail to the player. local Config_senderGUID = 10667 -- GUID/ID of the Player/Creature. If Config_preventReturn = true then you need to put Creature ID. If it's false Player GUID. 0 = No sender aka "From: Unknown". local Config_mailStationery = 41 -- Stationary used in the mail sent to the player. (41 Normal Mail, 61 GM/Blizzard Support, 62 Auction, 64 Valentines, 65 Christmas) Note: Use 62, 64, and 65 At your own risk. local Config_maxGMRank = 0 -- Checks the player's assigned GM rank. Anything above the assigned default will not receive mail/be counted for the player counter. Default 0 - Players Only. Max 3 - All GMS/Mods/Etc will receive as well. @@ -66,12 +66,12 @@ local Config_preventReturn = true -- Modify's the Mail database to prevent ret -- Config_mailText == 1 Config local Config_mailSubject1 = "Dinkledork's reward for You!" -local Config_mailText1 = "!\n\nYou've done well while advancing on ChromieCraft. Here is a small reward to celebrate your heroic deeds. Go forth!\n\nKind regards,\nChromie" +local Config_mailText1 = "!\n\nYou've done well while advancing on your journies. Here is a small reward to celebrate your heroic deeds. Go forth!\n\nKind regards,\nDinkledork" -- Config_mailText == 2 Config local Config_mailSubject2 = "Dinkledork's reward for You!" local Config_mailText2A = " and congratulations! \n\nThe bronze Dragonflight would like to inform you that you were the " local Config_mailText2B = " adventurer to reach the " -local Config_mailText2C = " level of mastery.\nYour adventures have made me take notice of you, take this small reward as a token of my appreciation.\nGo forth!\n\nKind regards,\nChromie" +local Config_mailText2C = " level of mastery.\nYour adventures have made me take notice of you, take this small reward as a token of my appreciation.\nGo forth!\n\nKind regards,\nDinkledork" -- Name of Eluna dB scheme local Config_customDbName = 'ac_eluna'; diff --git a/reload_scripts.lua b/reload_scripts.lua index 1b48b4f..216102a 100644 --- a/reload_scripts.lua +++ b/reload_scripts.lua @@ -1,11 +1,7 @@ function reloadElunaEngine(event, player, command) - if command == "reload scripts" or command == "reloadscripts" then - if player == nil or player:IsGM() then -- console or gm - ReloadEluna() - else - player:SendBroadcastMessage("Turn mode on for access to this command") - end - end +if command == "reload scripts" or command == "reloadscripts" then +ReloadEluna() +end end RegisterPlayerEvent(42, reloadElunaEngine) \ No newline at end of file