Added NPC SQL and the Lua script for him

This commit is contained in:
Manmadedrummer
2024-06-18 10:17:17 -04:00
parent 84dc706f0e
commit 4be4e5d502
2 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `creature_template` WHERE (`entry` = 800799);
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `speed_swim`, `speed_flight`, `detection_range`, `scale`, `rank`, `dmgschool`, `DamageModifier`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `spell_school_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(800799, 0, 0, 0, 0, 0, 1233, 0, 0, 0, 'Reed Zither', 'Arena Master', NULL, 2555, 80, 80, 0, 12, 1, 1, 1.14286, 1, 1, 18, 1.3, 1, 0, 1, 2000, 2000, 1, 1, 1, 768, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, '', 12340);

View File

@@ -0,0 +1,62 @@
--[[
Custom Arena Fighting Teleport NPC for Araxia - by Manmadedrummer
THis script is to a set area and spawns a custom boss to fight.
]]
-- Variables
local NPC_ID = 800799
local ZoneID = 33
local X = -13200.41
local Y = 279.175
local Z = 21.857
local O = 1.18
local Faction = 14 -- Hostile faction for both Alliance and Horde
local Duration = 600000 -- 10 minutes, adjust as needed
local ParticipationCost = 10000 -- How much gold it cost
-- On Triggers
function ArenaFightingGossipOnTalk(Unit, Event, player)
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "I want to fight Patchwerk (Level 83)", 1, 0)
Unit:GossipMenuAddItem(0, "I'd like to fight Festergut! (Level 83)", 2, 0)
Unit:GossipMenuAddItem(0, "I'd like to fight Lord Jaraxxus! (Level 83)", 3, 0)
Unit:GossipMenuAddItem(0, "I'd like to fight Deathbringer Saurfang! (Level 83)", 4, 0)
Unit:GossipMenuAddItem(0, "Maybe next time.", 500, 0)
Unit:GossipSendMenu(player)
end
function ArenaFightingGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
if (intid == 500) then
player:GossipComplete()
return
end
if player:GetCoinage() < ParticipationCost then
player:SendBroadcastMessage("You do not have enough gold to participate.")
player:GossipComplete()
return
end
player:ModifyMoney(-ParticipationCost)
player:SendBroadcastMessage("You're being teleported to the ring, get ready to fight!")
if (intid == 1) then
player:Teleport(ZoneID, X, Y, Z, O)
Unit:SpawnCreature(16028, X, Y, Z, O, Faction, Duration)
elseif (intid == 2) then
player:Teleport(ZoneID, X, Y, Z, O)
Unit:SpawnCreature(36626, X, Y, Z, O, Faction, Duration)
elseif (intid == 3) then
player:Teleport(ZoneID, X, Y, Z, O)
Unit:SpawnCreature(34780, X, Y, Z, O, Faction, Duration)
elseif (intid == 4) then
player:Teleport(ZoneID, X, Y, Z, O)
Unit:SpawnCreature(37813, X, Y, Z, O, Faction, Duration)
end
player:GossipComplete()
end
RegisterUnitGossipEvent(2555, 1, "ArenaFightingGossipOnTalk")
RegisterUnitGossipEvent(2555, 2, "ArenaFightingGossipOnSelect")