Closed xengine-qyt closed 2 months ago
I give up and use this way
local function ChangMapGiveBuff(event, player) local pGuid = player:GetGUIDLow() if PlayerJF[pGuid] and PlayerJF[pGuid][bufftime] and PlayerJF[pGuid][bufftime] > os.time() then player:AddAura(72221, player) player:AddAura(25392, player) player:AddAura(32999, player) player:AddAura(26991, player) player:AddAura(27127, player) player:AddAura(25898, player)
local PRangeList = player:GetPlayersInRange(40)
for _, v in ipairs(player:GetCreaturesInRange(40)) do
table.insert(PRangeList, v)
end
if PRangeList then
for k, menber in pairs(PRangeList) do
if not player:HasAura(27141) or player:GetAura(27141):GetDuration() < 900000 then
menber:CastCustomSpell(player, 27141, true, nil, nil, nil, nil, menber:GetGUID())
elseif not player:HasAura(27143) or player:GetAura(27143):GetDuration() < 900000 then
menber:CastCustomSpell(player, 27143, true, nil, nil, nil, nil, menber:GetGUID())
else
break
end
end
end
end
end
Is this using nearby NPCs to cast spells on oneself? What if there are not enough nearby NPCs... expand the range?
Is this using nearby NPCs to cast spells on oneself? What if there are not enough nearby NPCs... expand the range?
30 min normaly in group enough. this problem can not do by eluna self, becasue of AZ self buff limit. or use 2 can both can add to self buff, so it will double if other buff him, more than one same effect buff...
there is my script:
This buff command should perform certain checks, such as only allowing one type of Knight's Blessing or Warrior's Roar to be cast at a time. However, according to the game rules, multiple Knight's Blessings can be cast on a player as long as they are different types of blessings. What method should I use to implement this? I tried CastSpell, but the effect is always the same, and I can't set the buff duration. Can Lua implement the functionality I mentioned?