Signup Now
Page 1 of 6 123 ... LastLast
Results 1 to 10 of 56
  1. #1
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25

    Smart Healing (ALL Vocations, ALL Spells, ALL Potions and much more)

    Boring to set Spells and Potions in your Scripts?

    Just Create a Persistent with action below and ENABLE!
    Feel free to change any value.

    Here we go!


    --Smart Healing by Borges

    --Knight Spells and Potions Configuration
    local UturaGranK = true -- Use Utura Gran? set true or false
    local UturaK = false -- Use Utura? set true or false
    local ExuraGranIcoK = 40 -- Percentage to use Exura Gran Ico
    local ExuraIcoK = 80 -- Percentage to use Exura Ico
    local ManaTrainK = 95 -- Percentage to Mana Train
    local ManaTrainSpellK = "utani hur" -- Spell to Mana Train

    local UltimateHealthPotionk = 30 -- Percentage to use Ultimate Health Potion
    local GreatHealthPotionk = 30 -- Percentage to use Great Health Potion
    local StrongHealthPotionk = 30 -- Percentage to use Strong Health Potion
    local HealthPotionk = 30 -- Percentage to use Health Potion

    local ManaPotionK = 70 -- Percentage to use Mana Potion

    --Mage Spells and Potions Configuration
    local ExuraVitaM = 40 -- Percentage to use Exura Vita
    local ExuraGranM = 70 -- Percentage to use Exura Gran
    local ExuraM = 90 -- Percentage to use Exura
    local ManaTrainM = 95 -- Percentage to Mana Train
    local ManaTrainSpellM = "exura vita" -- Spell to Mana Train

    local GreatManaPotionM = 70 -- Percentage to use Great Mana Potion
    local StrongManaPotionM = 70 -- Percentage to use Strong Mana Potion
    local ManaPotionM = 70 -- Percentage to use Mana Potion

    --Paladin Spells and Potions Configuration
    local UturaGranP = true -- Use Utura Gran? set true or false
    local UturaP = false -- Use Utura? set true or false
    local ExuraGranSanP = 30 -- Percentage to use Exura Gran San
    local ExuraSanP = 50 -- Percentage to use Exura San
    local ExuraGranP = 70 -- Percentage to use Exura Gran
    local ExuraP = 90 -- Percentage to use Exura
    local ManaTrainP = 95 -- Percentage to use Mana Train
    local ManaTrainSpellP = "utani hur" -- Spell to Mana Train

    local GreatSpiritPotionP = 30 -- Percentage to use Great Spirit Potion
    local StrongHealthPotionP = 30 -- Percentage to use Strong Health Potion
    local HealthPotionP = 30 -- Percentage to use Health Potion

    local StrongManaPotionP = 70 -- Percentage to use Strong Mana Potion
    local ManaPotionP = 70 -- Percentage to use Mana Potion

    ---------------------DO NOT EDIT BELOW---------------------
    auto(200,500)

    --Spells
    if $vocation == "knight" then
    if $hppc <= ExuraGranIcoK and cancast("exura gran ico") then
    cast("exura gran ico")
    elseif $hppc <= ExuraIcoK and cancast("exura ico") then
    cast("exura ico")
    end
    elseif $vocation == "druid" or $vocation == "sorcerer" then
    if $hppc <= ExuraVitaM and cancast("exura vita") then
    cast("exura vita")
    elseif $hppc <= ExuraGranM and cancast("exura gran") then
    cast("exura gran")
    elseif $hppc <= ExuraM and cancast("exura") then
    cast("exura")
    end
    elseif $vocation == "paladin" then
    if $hppc <= ExuraGranSanP and cancast("exura gran san") then
    cast("exura gran san")
    elseif $hppc <= ExuraSanP and cancast("exura san") then
    cast("exura san")
    elseif $hppc <= ExuraGranP and cancast("exura gran") then
    cast("exura gran")
    elseif $hppc <= ExuraP and cancast("exura") then
    cast("exura")
    end
    end

    if not $strenghtened and $vocation == 'knight' and $hppc <= 95 then
    if UturaGranK then
    cast("utura gran")
    elseif UturaK then
    cast("utura")
    end
    end

    if not $strenghtened and $vocation == 'paladin' and $hppc <= 95 then
    if UturaGranP then
    cast("utura gran")
    elseif UturaP then
    cast("utura")
    end
    end

    --Potions
    if $vocation == "knight" then
    if $hppc <= UltimateHealthPotionk and $level >= 130 and itemcount("ultimate health potion") >= 1 then
    pausewalking(200,500)
    useoncreature("ultimate health potion",$self)
    elseif $hppc <= GreatHealthPotionk and $level >= 80 and itemcount("great health potion") >= 1 then
    pausewalking(200,500)
    useoncreature("great health potion",$self)
    elseif $hppc <= StrongHealthPotionk and $level >= 50 and itemcount("strong health potion") >= 1 then
    pausewalking(200,500)
    useoncreature("strong health potion",$self)
    elseif $hppc <= HealthPotionk and itemcount("health potion") >= 1 then
    pausewalking(200,500)
    useoncreature("health potion",$self)
    elseif $mppc <= ManaPotionK and itemcount("mana potion") >= 1 then
    pausewalking(200,500)
    useoncreature("mana potion",$self)
    end
    elseif $vocation == "druid" or $vocation == "sorcerer" then
    if $mppc <= GreatManaPotionM and $level >= 80 and itemcount("great mana potion") >= 1 then
    pausewalking(200,500)
    useoncreature("great mana potion",$self)
    elseif $mppc <= StrongManaPotionM and $level >= 50 and itemcount("strong mana potion") >= 1 then
    pausewalking(200,500)
    useoncreature("strong mana potion",$self)
    elseif $mppc <= ManaPotionM and itemcount("mana potion") >= 1 then
    pausewalking(200,500)
    useoncreature("mana potion",$self)
    end
    elseif $vocation == "paladin"then
    if $hppc <= GreatSpiritPotionP and $level >= 80 and itemcount("great spirit potion") >= 1 then
    pausewalking(200,500)
    useoncreature("great spirit potion",$self)
    elseif $hppc <= StrongHealthPotionP and $level >= 50 and itemcount("strong health potion") >= 1 then
    pausewalking(200,500)
    useoncreature("strong health potion",$self)
    elseif $hppc <= HealthPotionP and itemcount("health potion") >= 1 then
    pausewalking(200,500)
    useoncreature("health potion",$self)
    elseif $mppc <= StrongManaPotionP and $level >= 50 and itemcount("strong mana potion") >= 1 then
    pausewalking(200,500)
    useoncreature("strong mana potion",$self)
    elseif $mppc <= ManaPotionP and itemcount("mana potion") >= 1 then
    pausewalking(200,500)
    useoncreature("mana potion",$self)
    end
    end

    --Mana Trainer
    if $vocation == "knight" then
    if $mppc >= ManaTrainK and cancast(ManaTrainSpellK) then
    cast(ManaTrainSpellK)
    end
    elseif ($vocation == "druid" or $vocation == "sorcerer") then
    if $mppc >= ManaTrainM and cancast(ManaTrainSpellM) then
    cast(ManaTrainSpellM)
    end
    elseif $vocation == "paladin" then
    if $mppc >= ManaTrainP and cancast(ManaTrainSpellP) then
    cast(ManaTrainSpellP)
    end
    end

    --Food Eater
    eatfoodfull()

    --Paralyze
    if $vocation == "knight" then
    if $hppc <= ExuraGranIcoK and $paralyzed and cancast("exura gran ico") then
    cast("exura gran ico")
    elseif $paralyzed then
    cast("exura ico")
    end
    elseif ($vocation == "druid" or $vocation == "sorcerer") then
    if $hppc <= ExuraVitaM and $paralyzed and cancast("exura vita") then
    cast("exura vita")
    elseif $hppc <= ExuraGranM and $paralyzed and cancast("exura gran") then
    cast("exura gran")
    elseif $paralyzed then
    cast("exura")
    end
    elseif $vocation == "paladin" then
    if $hppc <= ExuraGranSanP and $paralyzed and cancast("exura gran san") then
    cast("exura gran san")
    elseif $hppc <= ExuraSanP and $paralyzed and cancast("exura san") then
    cast("exura san")
    elseif $hppc <= ExuraGranP and $paralyzed and cancast("exura gran") then
    cast("exura gran")
    elseif $paralyzed then
    cast("exura")
    end
    end
    Last edited by Borges; 02-23-2016 at 04:35 PM. Reason: Fixed Recover Spell
    Helped you? REP+

  2. #2
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21
    Good code, ^^.

  3. #3
    Banned
    Join Date
    Aug 2014
    Posts
    315
    Reputation
    18
    Rep Power
    0
    @borges maybe you should add pausewalking(1000) when is using potions, because if the char is running can't use the potion and the char can't walk fine.

  4. #4
    Free User saiddias's Avatar
    Join Date
    Jul 2014
    Posts
    28
    Reputation
    10
    Rep Power
    0
    Nice Work !
    Live life hard!

  5. #5
    Free User
    Join Date
    Aug 2014
    Posts
    9
    Reputation
    10
    Rep Power
    0
    it is better than normal heling ? bot function?

  6. #6
    Free User
    Join Date
    Dec 2014
    Posts
    1
    Reputation
    10
    Rep Power
    0
    Captura.PNG

    look the picture is what appears to me when I put it , some solution
    Last edited by gothics; 01-14-2015 at 10:39 AM. Reason: cambio

  7. #7
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by gothics View Post
    Captura.PNG

    look the picture is what appears to me when I put it , some solution
    are you online in tibia?
    you put user options and persistent?
    Last edited by Borges; 01-14-2015 at 11:27 AM.
    Helped you? REP+

  8. #8
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Code:
    Update 1.0.4
    Changed UserOption
    Added Ant Paralyze
    Helped you? REP+

  9. #9
    Free User strahowski's Avatar
    Join Date
    Aug 2014
    Posts
    216
    Reputation
    27
    Rep Power
    20
    What's the "smart" part of this? Looks like a regular and unessecarily heavy action to me.

  10. #10
    Free User
    Join Date
    Dec 2014
    Posts
    66
    Reputation
    24
    Rep Power
    19
    Quote Originally Posted by strahowski View Post
    What's the "smart" part of this? Looks like a regular and unessecarily heavy action to me.
    Strahowski has a point there, I would sort them on vocation first and then put them in larger if statements, like that you won't have to iterature through all the statements that are virtually the same.
    And about the paralyzed part, don't do that. Just make a single paralyse condition with 'exura infir' and put it lower than your heal statements.
    That way it will never interfere if hp is low but will heal paralyse with a cheap spell if you hp if above exura hppc.

 

 

Posting Permissions

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