XenoBot Forums - Powered by vBulletin

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Use My Health potion on my friend

  1. #1

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

    Use My Health potion on my friend

    i wanna script that use my UHP on my Frined Name when his hp i low can?
    @Syntax
    @anoyn
    @shadowart
    @Rif

  2. #2
    kontgat's Avatar
    Join Date
    Dec 2015
    Posts
    49
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You just posted this thread 3x.

    You just posted this thread 3x.

    You just posted this thread 3x.
    DarkstaR, hook me up with a lifetime subscription bro. I'd suk yo nipples. #nohomo.

  3. #3

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kontgat View Post
    You just posted this thread 3x.

    You just posted this thread 3x.

    You just posted this thread 3x.
    i never post it before :S

  4. #4

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    i have this code but it doesnt working with me
    local friends = { -- add targets u want to heal and at what percent
    ['Joker'] = 100,
    ['Joker'] = 100
    }


    local option = {



    potion_id = 7643 -- what potion to heal friend
    }

    Module.New('HEAL', function(mod)
    for name, percent in pairs(friends) do
    local c = Creature.New(name)
    if (c:isOnScreen()) then
    if (c:HealthPercent() < percent and cistanceFromSelf() == 1) then
    Self.UseItemWithCreature(option['potion_id'], c:ID())
    breaking = true
    break
    end
    end
    end
    modelay(1000)
    end)

  5. #5

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    any one help please

  6. #6

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    any help? please

  7. #7
    Senior Member
    Join Date
    Sep 2012
    Posts
    1,070
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    @sholh
    Well, just a tip, it doesn't help to tag these people for these kind of stuffs, they most likely ignore you.

    Here is someting I used before to manapump my chars, abit modified.

    Code:
    function pumpMana()
        local charToPump = Creature.New("Friend Name")
        local charToPumpPos = charToPump:Position()
        local manaId = 268  -- rune, pot ID etc...
        local healthPercent = 50  -- friends hp % below this value to heal
        local distance = 2  -- range to target, if u want to limit it, otherwise set to 8
        local backpack = Container.GetByName("backpack")  -- Open backpack containing healing runes
        if (Self.DistanceFromPosition(charToPumpPos.x, charToPumpPos.y, charToPumpPos.z) <= distance) and (Self.Position().z == charToPumpPos.z) and (charToPump:HealthPercent() < healthPercent) then
            for spots = 0, backpack:ItemCount() do
                local item = backpack:GetItemData(spots)
                if (item.id == manaId) then
                    backpack:UseItemWithCreature(spots, charToPump:ID())
                    break
                end
            end
        end
    end 
    while true do
    pumpMana()
    wait(900,1100)
    end
    Also don't forget to change container name if u aren't using regular "backpack" to hold healing items.

  8. #8

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dinmamma View Post
    @sholh
    Well, just a tip, it doesn't help to tag these people for these kind of stuffs, they most likely ignore you.

    Here is someting I used before to manapump my chars, abit modified.

    Code:
    function pumpMana()
        local charToPump = Creature.New("Friend Name")
        local charToPumpPos = charToPump:Position()
        local manaId = 268  -- rune, pot ID etc...
        local healthPercent = 50  -- friends hp % below this value to heal
        local distance = 2  -- range to target, if u want to limit it, otherwise set to 8
        local backpack = Container.GetByName("backpack")  -- Open backpack containing healing runes
        if (Self.DistanceFromPosition(charToPumpPos.x, charToPumpPos.y, charToPumpPos.z) <= distance) and (Self.Position().z == charToPumpPos.z) and (charToPump:HealthPercent() < healthPercent) then
            for spots = 0, backpack:ItemCount() do
                local item = backpack:GetItemData(spots)
                if (item.id == manaId) then
                    backpack:UseItemWithCreature(spots, charToPump:ID())
                    break
                end
            end
        end
    end 
    while true do
    pumpMana()
    wait(900,1100)
    end
    Also don't forget to change container name if u aren't using regular "backpack" to hold healing items.
    at the first thx for help but its doesnt working with me :S

  9. #9
    Senior Member
    Join Date
    Sep 2012
    Posts
    1,070
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sholh View Post
    at the first thx for help but its doesnt working with me :S
    You probably did wrong with changing name on container in the script, i'll make it abit easier for you.
    Change the "Bag" to te right container... i.e "Backpack" or "Red Backpack"
    Code:
    function pumpMana()
        local charToPump = Creature.New("Friend Name")
        local charToPumpPos = charToPump:Position()
        local manaId = 268  -- rune, pot ID etc...
        local healthPercent = 50  -- friends hp % below this value to heal
        local bpName = "Bag" -- name of the container where the pots are
        local distance = 2  -- range to target, if u want to limit it, otherwise set to 8
        local backpack = Container.GetByName(bpName)
        if (Self.DistanceFromPosition(charToPumpPos.x, charToPumpPos.y, charToPumpPos.z) <= distance) and (Self.Position().z == charToPumpPos.z) and (charToPump:HealthPercent() < healthPercent) then
            for spots = 0, backpack:ItemCount() do
                local item = backpack:GetItemData(spots)
                if (item.id == manaId) then
                    backpack:UseItemWithCreature(spots, charToPump:ID())
                    break
                end
            end
        end
    end 
    while true do
    pumpMana()
    wait(900,1100)
    end

  10. #10

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dinmamma View Post
    You probably did wrong with changing name on container in the script, i'll make it abit easier for you.
    Change the "Bag" to te right container... i.e "Backpack" or "Red Backpack"
    Code:
    function pumpMana()
        local charToPump = Creature.New("Friend Name")
        local charToPumpPos = charToPump:Position()
        local manaId = 268  -- rune, pot ID etc...
        local healthPercent = 50  -- friends hp % below this value to heal
        local bpName = "Bag" -- name of the container where the pots are
        local distance = 2  -- range to target, if u want to limit it, otherwise set to 8
        local backpack = Container.GetByName(bpName)
        if (Self.DistanceFromPosition(charToPumpPos.x, charToPumpPos.y, charToPumpPos.z) <= distance) and (Self.Position().z == charToPumpPos.z) and (charToPump:HealthPercent() < healthPercent) then
            for spots = 0, backpack:ItemCount() do
                local item = backpack:GetItemData(spots)
                if (item.id == manaId) then
                    backpack:UseItemWithCreature(spots, charToPump:ID())
                    break
                end
            end
        end
    end 
    while true do
    pumpMana()
    wait(900,1100)
    end
    thx its working fine

Posting Permissions

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