Signup Now
Page 5 of 5 FirstFirst ... 345
Results 41 to 48 of 48

Thread: Skills Timer

  1. #41
    Free User
    Join Date
    Jun 2015
    Posts
    8
    Reputation
    10
    Rep Power
    0
    @Dehan, I'm not sure if the timers are right. I'm now Axe Fighting 82 with 69% to go. According to your HUD, it will take me around 10 hours to skill up, but according to online calculators, as Pskonejott's or Tibia-Stat's, it will take around 18h.


    @EdiT:
    I think the HUD upgrades as much time as I spend training. Now it's up to 11h

  2. #42
    Moderator Dehan's Avatar
    Join Date
    Dec 2013
    Posts
    1,404
    Reputation
    315
    Rep Power
    26
    Quote Originally Posted by Dohaeris View Post
    @Dehan, I'm not sure if the timers are right. I'm now Axe Fighting 82 with 69% to go. According to your HUD, it will take me around 10 hours to skill up, but according to online calculators, as Pskonejott's or Tibia-Stat's, it will take around 18h.


    @EdiT:
    I think the HUD upgrades as much time as I spend training. Now it's up to 11h
    It just gets more accurate while you train, it calculate the average time to advance in each % and multiplicate for the %'s left

    Level Latest Scripts by Dehan
    250+
    [EK & ED & MS & RP] [Navigation] Prison -1
    200+
    [EK & ED & MS] [Navigation] Asura Palace
    200+
    [EK & ED] [Navigation] Lower Roshamuul Softcore

  3. #43
    Free User
    Join Date
    Oct 2015
    Posts
    1
    Reputation
    10
    Rep Power
    0
    how can i copy the script without the number like 1...int ???

  4. #44
    Free User
    Join Date
    Jan 2014
    Posts
    16
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Dehan View Post
    Skills Timer


    Description

    Will show you the time left to advance on skills (Weapon Skill, Shielding and Magic Level).

    Configuration

    You Need to Add the Persistent Code on the tab Scripter -> Persistent and the HUD Code on the tab HUDs.
    You need to wait your character gain 1% full on the skill to calculate the time left.

    Codes

    Persistent Code:
    init start
    -- Version 2.0.1
    function GetWeaponPC()
    SkillType = findweapontype()
    local SkillNames = {'axe','sword','club','no weapon','distance weapon'}
    if table.find(SkillNames,SkillType) then
    if SkillType == 'axe' then
    return $axepc
    elseif SkillType == 'sword' then
    return $swordpc
    elseif SkillType == 'club' then
    return $clubpc
    elseif SkillType == 'no weapon' then
    return $fistpc
    elseif SkillType == 'distance weapon' then
    return $distancepc
    end
    else
    return $mlevelpc
    end
    end
    local Config = {
    {name = 'Weapon', _starttime = $timems, _skill = GetWeaponPC(), _traceskill = 0, _timers = {0}, _try = 0, _finalTime = {}},
    {name = 'Magic', _starttime = $timems, _skill = $mlevelpc, _traceskill = 0, _timers = {0}, _try = 0, _finalTime = {}},
    {name = 'Shielding', _starttime = $timems, _skill = $shieldingpc, _traceskill = 0, _timers = {0}, _try = 0, _finalTime = {}},
    {name = 'Fishing', _starttime = $timems, _skill = $fishingpc, _traceskill = 0, _timers = {0}, _try = 0, _finalTime = {}}
    }
    init end

    auto(100)
    local Skills = {
    {name = 'Weapon', _skill = GetWeaponPC(), _left = _left or 0, _avgTime = _avgTime or 0, _advanceTime = _advanceTime or 0},
    {name = 'Magic', _skill = $mlevelpc, _left = _left or 0, _avgTime = _avgTime or 0, _advanceTime = _advanceTime or 0},
    {name = 'Shielding', _skill = $shieldingpc, _left = _left or 0, _avgTime = _avgTime or 0, _advanceTime = _advanceTime or 0},
    {name = 'Fishing', _skill = $fishingpc, _left = _left or 0, _avgTime = _avgTime or 0, _advanceTime = _advanceTime or 0}
    }
    for ic = 1,#Config do
    for is = 1,#Skills do
    if Skills[is].name == Config[ic].name then
    if Config[ic]._skill ~= Skills[is]._skill then
    Config[ic]._traceskill = $timems - Config[ic]._starttime
    if Config[ic]._try > 0 then
    table.insert(Config[ic]._timers,Config[ic]._traceskill)
    end
    Config[ic]._starttime = $timems
    Config[ic]._skill = Skills[is]._skill
    for it = 1,#Config[ic]._timers do
    if it > 3 then
    table.remove(Config[ic]._timers,1)
    end
    end
    Config[ic]._try = Config[ic]._try + 1
    end

    Skills[is]._left = 100 - Skills[is]._skill
    Skills[is]._avgTime = table.average(Config[ic]._timers)
    Skills[is]._advanceTime = Skills[is]._left * Skills[is]._avgTime
    Skills[is]._timeLeft = math.floor(Skills[is]._advanceTime / 1000)

    end
    end
    end

    function SkillTimer(skill)
    curTime = math.floor($charactertime / 1000)
    if Skills[1]._timeLeft ~= _Tracker.lastSkillPrediction then
    _Tracker.lastSkillPrediction = Skills[1]._timeLeft
    _Tracker.timeSkillPredictionChanged = curTime
    end
    if Skills[2]._timeLeft ~= _Tracker.lastMagicPrediction then
    _Tracker.lastMagicPrediction = Skills[2]._timeLeft
    _Tracker.timeMagicPredictionChanged = curTime
    end
    if Skills[3]._timeLeft ~= _Tracker.lastShieldingPrediction then
    _Tracker.lastShieldingPrediction = Skills[3]._timeLeft
    _Tracker.timeShieldingPredictionChanged = curTime
    end
    if Skills[4]._timeLeft ~= _Tracker.lastFishingPrediction then
    _Tracker.lastFishingPrediction = Skills[4]._timeLeft
    _Tracker.timeFishingPredictionChanged = curTime
    end
    if skill == 'Weapon' then
    return math.max(math.round(Skills[1]._timeLeft - curTime + _Tracker.timeSkillPredictionChanged), 1)
    elseif skill == 'Magic' then
    return math.max(math.round(Skills[2]._timeLeft - curTime + _Tracker.timeMagicPredictionChanged), 1)
    elseif skill == 'Shielding' then
    return math.max(math.round(Skills[3]._timeLeft - curTime + _Tracker.timeShieldingPredictionChanged), 1)
    elseif skill == 'Fishing' then
    return math.max(math.round(Skills[4]._timeLeft - curTime + _Tracker.timeFishingPredictionChanged), 1)
    end
    end

    if time(SkillTimer('Weapon')) ~= '1' then
    showWeapon = time(SkillTimer('Weapon'))
    else
    showWeapon = 'Calculating'
    end

    if time(SkillTimer('Magic')) ~= '1' then
    showMagic = time(SkillTimer('Magic'))
    else
    showMagic = 'Calculating'
    end
    if time(SkillTimer('Shielding')) ~= '1' then
    showShielding = time(SkillTimer('Shielding'))
    else
    showShielding = 'Calculating'
    end
    if time(SkillTimer('Fishing')) ~= '1' then
    showFishing = time(SkillTimer('Fishing'))
    else
    showFishing = 'Calculating'
    end


    HUD Code
    init start
    -- DO NOT EDIT BELOW THIS LINE
    local HUD = {
    Restart = -1,
    Position = {$clientwin.left, $worldwin.bottom},
    Auxiliar = {0, 0},
    ColumnWidth = {125, 12},
    Moving = false,
    Blue = {0.0, color(90, 12, 15, 20), 0.23, color(98, 13, 17, 20), 0.76, color(52, 6, 9, 20)},
    Black = {0.0, color(75, 75, 75, 20), 0.23, color(45, 45, 45, 20), 0.76, color(19, 19, 19, 20)},
    Orange = {0.0, color(120, 120, 120, 20), 0.23, color(100, 100, 100, 20), 0.76, color(35, 35, 35, 20)},
    Green = {0.0, color(65, 96, 12, 20), 0.23, color(67, 99, 13, 20), 0.76, color(36, 52, 6, 20)},
    Red = {0.0, color(90, 12, 15, 20), 0.23, color(98, 13, 17, 20), 0.76, color(52, 6, 9, 20)},
    }
    showWeapon = showWeapon or 0
    showShielding = showShielding or 0
    showMagic = showMagic or 0
    showFishing = showFishing or 0
    local tempPos = $chardb:getvalue('SkillTimer.TH', 'POSITION')

    if tempPos then
    tempPos = tempPos:explode(":")
    HUD.Position = {tonumber(tempPos[1]), tonumber(tempPos[2])}
    end

    Time = Time or tosec(os.date("%X"))

    filterinput(false, true, false, false) setfontstyle('Tahoma', 8, 75) setfillstyle('gradient', 'linear', 2, 0, 0, 0, 14) setfontstyle('Tahoma', 8, 75, 0xFFFFFF, 1, color(0, 0, 0, 20))

    function inputevents(e)
    if e.type == IEVENT_RMOUSEDOWN or e.type == IEVENT_MMOUSEDOWN then
    HUD.Moving, HUD.Auxiliar = true, {$cursor.x - HUD.Position[1], $cursor.y - HUD.Position[2]}
    elseif e.type == IEVENT_RMOUSEUP or e.type == IEVENT_MMOUSEUP then
    HUD.Moving = false
    elseif e.type == IEVENT_LMOUSEUP then
    if e.elementid == HUD.Restart then
    SkillTable = {}
    CalculateTry = 0
    ShieldingTable = {}
    ShieldingCalculateTry = 0
    MagicTable = {}
    MagicCalculateTry = 0
    end
    end
    end

    local function displaytext(text, x, y, c)
    addgradcolors(unpack(c))
    local w, h = measurestring(text)
    HUD.ColumnWidth[1], HUD.ColumnWidth[2] = math.max(HUD.ColumnWidth[1], w or 0), math.max(HUD.ColumnWidth[2], h or 0)
    local t = drawroundrect(x, y, HUD.ColumnWidth[1] + 7, HUD.ColumnWidth[2], 2, 2)
    drawtext(text, x + 2, y + math.floor(HUD.ColumnWidth[2] / 4) - 2.55)
    return t
    end

    init end

    if HUD.Moving then
    auto(10)
    HUD.Position = {$cursor.x - HUD.Auxiliar[1], $cursor.y - HUD.Auxiliar[2]}
    $chardb:setvalue('SkillTimer.TH', 'POSITION', table.concat(HUD.Position, ':'))
    end

    local x, y = 0, 0
    displaytext(" Skill Timer", x, y, HUD.Blue)
    addgradcolors(unpack(HUD.Green))
    w, h = measurestring("RESET")
    HUD.Restart = drawroundrect(x - w + HUD.ColumnWidth[1], y, w + 7, h, 2, 2)
    drawtext("RESET", 5 + x - w + HUD.ColumnWidth[1], y + math.floor(h / 4) - 2.4)
    y = y + 16
    displaytext(' Weapon Timer: '..showWeapon, x, y, HUD.Black)
    y = y + 16
    displaytext(' Shielding Timer: '..showShielding, x,y, HUD.Black)
    y = y + 16
    displaytext(' Magic Level Timer: '..showMagic, x,y, HUD.Black)
    y = y + 16
    displaytext(' Fishing Timer: '..showFishing, x,y, HUD.Black)
    setposition(unpack(HUD.Position))


    Thanks

    I would like to thanks @Leonardo, @Lucas Terra and @Raphael for the assistance and for being awesome guys haha

    Notes
    Code:
    Version 2.0.1:
    - fix on table.average()
    
    Version 2.0.0:
    - code completely remade
    - hud adapted
    - added fishing
    
    Version 1.0.0:
    - initial release

    Hey very nice script, Ive tried to use it now and I cant make it work. Even though I have taken over 2% skill the HUD dosnt change. It only say "Calculation". Perhaps you have some library I require?
    Thx in advance

  5. #45
    Moderator Dehan's Avatar
    Join Date
    Dec 2013
    Posts
    1,404
    Reputation
    315
    Rep Power
    26
    @Roffe this code is kinda old... I will check it, maybe I even rewrite it

    Level Latest Scripts by Dehan
    250+
    [EK & ED & MS & RP] [Navigation] Prison -1
    200+
    [EK & ED & MS] [Navigation] Asura Palace
    200+
    [EK & ED] [Navigation] Lower Roshamuul Softcore

  6. #46
    Free User
    Join Date
    Jan 2014
    Posts
    16
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Dehan View Post
    @Roffe this code is kinda old... I will check it, maybe I even rewrite it
    Alright, i'll eagerly waiting

  7. #47
    Free User
    Join Date
    Jan 2014
    Posts
    16
    Reputation
    10
    Rep Power
    0
    If you rewrite it please add a timer /100 so we can see how long left to next percent too please =)

  8. #48
    Free User
    Join Date
    May 2016
    Posts
    3
    Reputation
    10
    Rep Power
    0
    works very well mate Thanks for this... reputation ofc..

 

 

Posting Permissions

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