View Full Version : energy ring if x amount of z monsters on screen
jollebollen
12-22-2015, 01:59 AM
heya,
just wondering if someone got a script that put on energy ring if X amount of "monster name" is on screen..
thank in advance guys!
jollebollen
12-22-2015, 10:11 PM
i even have this script built in in a solidscripts script. doesnt some1 have this? like if 4 dragon lord equip energy ring? :P
grave18
12-22-2015, 10:40 PM
local Ring_RingID = 3051 -- id ring
local MonsterList = {"Crypt Shambler", "Mummy", "Ghost"}
local MonsterCount = 3 -- How many monsters until you equip the special ring?
local MonsterRange = 2 -- Range of the monsters until you equip the special ring?
Module.New("RingEquip", function(module)
local mob = Self.GetTargets(MonsterRange)
local mobCount = 0
for i = 1, #mob do
if table.contains(MonsterList, mob[i]:Name()) then
mobCount = mobCount + 1
end
end
if (mobCount >= MonsterCount and Self.Ring().id ~= Item.GetRingActiveID(Ring_RingID) and Self.ItemCount(Ring_RingID) > 0) then
Self.Equip(Ring_RingID, "ring")
elseif (mobCount < MonsterCount and Self.Ring().id == Item.GetRingActiveID(Ring_RingID)) then
Self.Dequip("ring", MainBackpack)
end
module:Delay(1000, 1100)
end)
jollebollen
01-22-2016, 03:56 AM
local Ring_RingID = 3051 -- id ring
local MonsterList = {"Crypt Shambler", "Mummy", "Ghost"}
local MonsterCount = 3 -- How many monsters until you equip the special ring?
local MonsterRange = 2 -- Range of the monsters until you equip the special ring?
Module.New("RingEquip", function(module)
local mob = Self.GetTargets(MonsterRange)
local mobCount = 0
for i = 1, #mob do
if table.contains(MonsterList, mob[i]:Name()) then
mobCount = mobCount + 1
end
end
if (mobCount >= MonsterCount and Self.Ring().id ~= Item.GetRingActiveID(Ring_RingID) and Self.ItemCount(Ring_RingID) > 0) then
Self.Equip(Ring_RingID, "ring")
elseif (mobCount < MonsterCount and Self.Ring().id == Item.GetRingActiveID(Ring_RingID)) then
Self.Dequip("ring", MainBackpack)
end
module:Delay(1000, 1100)
end)
thank you very much i appreciate it more than you know :)
H4GSTROM
07-03-2017, 08:10 PM
grave18, do you have a simular lua script, but I want it to take off the e-ring when there's less than 4 monsters on screen.
Equip when there's 4 or more monsters.
Unequip when there's less than 4monsters.
Thanks!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.