Hi, I was wondering if it would be possible to do a level scaling system on QuestAccept.
For some reason, my code does not work on Npc2 and only works for NpcId(sets NPC level to = player level)
And a little explanation what script should do, so basically on QuestAccept every NPC in the dungeon should be boosted to player level (Level 80) and ofc after the quest is completed mobs should scale down again to the there original level
This works
Code:
Code:
local NPC_ID = 11320
local Range = 500 -- Range in yards
function AreaTrigger(event, creature, plr)
if (plr:GetUnfriendlyUnitsInRange(NPC_ID, Range)) then
creature:SetLevel(22)
end
end
RegisterCreatureEvent(NPC_ID, 27, AreaTrigger)
ofc it only works on one NPC even if i make a list of NPCs,
and this code that I came up with in my head does not work as well . This should be so that NPC scale to level once a quest has been accepted
Code:
local QuestNpcId = 514
local QuestId = 1097
local MoltenElemental = 11321
local Range = 400 -- Range in yards
local Earthborer = 11320
function OnQuestAccept(event, plr, creature, quest)
if (quest:GetId() == QuestId) then
-- plr:GetUnfriendlyUnitsInRange(MoltenElemental, Range)
-- plr:GetUnfriendlyUnitsInRange(Earthborer, Range)
creature:SetLevel(88)
end
end
----------------------------------------------------------------
function Trigger(event, creature, plr)
if (OnQuestAccept == true) then
plr:GetUnfriendlyUnitsInRange(Earthborer, Range)
creature:SetLevel(50)
end
end
RegisterCreatureEvent(Earthborer, 27, Trigger)
RegisterCreatureEvent(QuestNpcId, 31, OnQuestAccept)