Signup Now
Results 1 to 10 of 10
  1. #1
    Free User Riku's Avatar
    Join Date
    Nov 2014
    Posts
    365
    Reputation
    49
    Rep Power
    20

    Navigation Iteration (navchar)

    foreach navchar

    Currently gives you:

    {isleader = false, id = 268435457, creature = {walkblock = false, warbanner = 0, aggressortype = 0, dist = 3, addon = 3, legscolor = 61, ismonster = false, lightcolor = 0, skull = 0, headcolor = 0, isnpc = false, hppc = 100, issummon = false, hpcolor = 49152, id = 268435457, mount = 0, chestcolor = 43, speed = 750, posx = 33644, isreachable = true, posy = 31895, outfit = 432, party = 2, posz = 7, iswalking = false, isownsummon = false, isplayer = true, lastattacked = 1800000, ignored = false, feetcolor = 114, dir = "s", updated = true, lightintensity = 255, name = "X", isshootable = true}, isfriend = true, isneutral = false, team = 1, teamname = "ally", isenemy = false, posz = 7, icon = 221, glowcolor = 13520480, voc = 8, maxmp = 40, mp = 40, realname = "X", color = 5136590, posy = 31895, time = 2000, name = "WindBot", posx = 33644}

    It provides you with a players current mana (mp) but not health (hp). Would be awesome if you could implement this @Lucas Terra

  2. #2
    Free User ozzix's Avatar
    Join Date
    Jan 2014
    Location
    Sweden
    Posts
    4,769
    Reputation
    151
    Rep Power
    31
    and hppc aint enough because?

    Level Latest Scripts
    250+
    Oramond Sewers [MAGE |RP X1 | RP X2 |RP X3|EK X2 | EK X1]
    200+
    Banuta X2 [MAGE | RP]
    280+
    Roshamuul Mountain [RP]
    280+
    Ferumbras Lair [RP]
    250+
    Roshamuul North Silencers [RP]

  3. #3
    Free User Riku's Avatar
    Join Date
    Nov 2014
    Posts
    365
    Reputation
    49
    Rep Power
    20
    @ozzix

    It would be very nice to create a HUD that provides the real stats, that is my main idea right now.
    I could probably pull off some math that calculates the actual HP% to HP ratio and work from there.

    However, if this can get implemented saves me the work and will overall make this iteration more consistent with everything else it provides.
    Should be pretty easy to implement this feature (I'm guessing).

  4. #4
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Worth noting that you can find out the character's level having its maxmp and vocation and, having the user's level and hppc, calculate its hp (although with worse precision).

  5. #5
    Free User Riku's Avatar
    Join Date
    Nov 2014
    Posts
    365
    Reputation
    49
    Rep Power
    20
    @Raphael

    Every character at level 8 has 185HP.
    Assuming everyone left rook at level 8 the math should be pretty simple.

    Knight
    math.positive($level - 8) * 15 + 185


    Paladin
    math.positive($level - 8) * 10 + 185


    Mages
    math.positive($level - 8) * 5 + 185

  6. #6
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Riku View Post
    @Raphael

    Every character at level 8 has 185HP.
    Assuming everyone left rook at level 8 the math should be pretty simple.

    Knight
    math.positive($level - 8) * 15 + 185


    Paladin
    math.positive($level - 8) * 10 + 185


    Mages
    math.positive($level - 8) * 5 + 185
    You don't have the level though. You have to get it through the maxmp.

  7. #7
    Free User Riku's Avatar
    Join Date
    Nov 2014
    Posts
    365
    Reputation
    49
    Rep Power
    20
    @Raphael

    function findmaxhp()
    local MANA_GAIN = 0
    local MAX_MANA = 0
    local HEALTH_GAIN = 0
    local MAX_HEALTH = 0
    local LEVEL = 0

    if $vocshort == "D" or $vocshort == "S" then
    MANA_GAIN = 30
    HEALTH_GAIN = 5
    elseif $vocshort == "P" then
    MANA_GAIN = 15
    HEALTH_GAIN = 10
    elseif $vocshort == "K" then
    MANA_GAIN = 5
    HEALTH_GAIN = 15
    end

    foreach navchar p do
    if p.realname == "Riku" then
    MAX_MANA = p.maxmp
    break
    end
    end

    LEVEL = math.positive(MAX_MANA - 90) / MANA_GAIN + 8
    MAX_HEALTH = math.positive(LEVEL - 8) * HEALTH_GAIN + 185

    return MAX_HEALTH
    end

  8. #8
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    I don't think that's right. You should use voc from the navchar, not from your own char.

  9. #9
    Free User Riku's Avatar
    Join Date
    Nov 2014
    Posts
    365
    Reputation
    49
    Rep Power
    20
    @Raphael

    Ofcourse, but the idea still applies. It's not like I would use this to find out the HP of someone else.

  10. #10
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Riku View Post
    @Raphael

    Ofcourse, but the idea still applies. It's not like I would use this to find out the HP of someone else.
    Well, yes, but the code doesn't work. I just wanted to make that clear so that you don't have issues alter.

 

 

Posting Permissions

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