• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Character information skill stats

luigilc

Lua Learner
Joined
Mar 24, 2010
Messages
863
Reaction score
36
Location
A music box
I've made an script that when you say !stats you see your character stats(ml, hp, mp, guild, voc, skills) but I have a problem on the skill part, I can't make it to show the skills with equips that adds skills.
Example: I have a huntsman armor that adds +15 to your distance skill and you have 70 distance skill without items, so 85 with the armor, but when I say !stats with the armor equiped i only shows 70 and I want it to show the 85 when I equip the armor.
Here's the script:
Lua:
 --[ Made by Luigilc]--
function onSay(cid, words, param)
    local list = {
    name = getCreatureName(cid),
    level = getPlayerLevel(cid),
    moneyh = getPlayerMoney(cid),
    magic = getPlayerMagLevel(cid),
    skillSword = getPlayerSkillLevel(cid, SKILL_SWORD),
    skillAxe = getPlayerSkillLevel(cid, SKILL_AXE),
    skillDist = getPlayerSkillLevel(cid, SKILL_DIST),
    skillShield = getPlayerSkillLevel(cid, SKILL_SHIELD),
    health = getCreatureHealth(cid),
    maxhealth = getCreatureMaxHealth(cid),
    mana = getCreatureMana(cid),
    maxmana = getCreatureMaxMana(cid),
    guild = getPlayerGuildName(cid),
    vocation = getPlayerVocationName(cid),
    pos = getCreaturePos(cid),
}  
    function guild(cid)
        if getPlayerGuildName(cid) == '' then
            return 'None'
        else
            return getPlayerGuildName(cid)
        end
        return true
    end
    doSendMagicEffect(list.pos, 1)
    doPlayerPopupFYI(cid, "Player informations\n\nName: ".. list.name .."\nLevel: ".. list.level .."\nVocation: ".. list.vocation .."\nMoney: ".. list.moneyh .."\nGuild: ".. guild(cid) .."\nMagic level: ".. list.magic .."\nHealth: ".. list.health .."/".. list.maxhealth .."\nMana: ".. list.mana.."/".. list.maxmana .."\nSword Skill: ".. list.skillSword .."\nDistance Skill: ".. list.skillDist .."\nAxe Skill: ".. list.skillAxe .."\nShielding Skill: ".. list.skillShield .."\n")
        return true
end
Any help is apreciated.
 
Back
Top