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.
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)
any one help please
any help? please
@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.
Also don't forget to change container name if u aren't using regular "backpack" to hold healing items.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
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