XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 3 of 3

Thread: refillMana script

  1. #1

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    refillMana script

    i wanna script or fnuction that refill mana to almost full or the percent what i want like 70 % after killing the monster or when he killing them fast refill and use mana too when he run to next wp
    Can u help @Rif
    @eldera

  2. #2
    Monthly Subscriber
    Join Date
    Jun 2012
    Posts
    185
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    Haven't tested it but should work.

    lua code:
    local manaPotion = "mana potion" -- name or id of mana potion
    local upToMana = 70 -- percentagle amount
    local waitUntilManaIsNotRefiled = true -- if you want to wait when refilling mana (if you are ek use it)
    local monstersToRefilmana = 2 -- amount of monster to start mana refiller

    --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--

    function monstersInRange()
    local count = 0
    for name, obj in Creature.iMonsters() do
    count = count + 1
    end
    return count
    end

    Module.New("mana-refiller", function()
    if (monstersInRange() <= monstersToRefilmana and math.abs(Self.Mana()/(Self.MaxMana()*0.01)) < upToMana) then
    Self.UseItemWithMe(Item.GetItemIDFromDualInput(manaPotion))
    if (waitUntilManaIsNotRefiled) then
    Walker.Delay(500)
    end
    end
    end)

  3. #3

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thx @eldera

Posting Permissions

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