XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 5 of 5

Thread: energy ring if x amount of z monsters on screen

  1. #1

    Join Date
    Nov 2012
    Posts
    332
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    energy ring if x amount of z monsters on screen

    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!

  2. #2

    Join Date
    Nov 2012
    Posts
    332
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    i even have this script built in in a solidscripts script. doesnt some1 have this? like if 4 dragon lord equip energy ring? :P

  3. #3
    grave18's Avatar
    Join Date
    Mar 2014
    Posts
    74
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    lua code:

    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)

  4. #4

    Join Date
    Nov 2012
    Posts
    332
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by grave18 View Post
    lua code:

    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

  5. #5

    Join Date
    Oct 2016
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •