• 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 TFS 1.2 Talkaction Selfinfo.

Svira

Active Member
Joined
Jan 27, 2008
Messages
267
Solutions
11
Reaction score
36
Hello, I'm looking for a Talkactions script for character info, For example:
the player will use the !selfinfo command and get the answer you have xxLVL, XXMlvl and skills: xx, xx, xx, xx, xx, xx.
I want it to show skills already with bonuses from EQ and not download the result from the database, I can check the results from DB on www.
 

Lua:
local skills = {
    [1] = {SKILL_LEVEL, "level", Player.getLevel},
    [2] = {SKILL_MAGLEVEL, "magic level", Player.getMagicLevel},
    [3] = {SKILL_FIST, "fist fighting"},
    [4] = {SKILL_CLUB, "club fighting"},
    [5] = {SKILL_SWORD, "sword fighting"},
    [6] = {SKILL_AXE, "axe fighting"},
    [7] = {SKILL_DISTANCE, "distance fighting"},
    [8] = {SKILL_SHIELD, "shielding"},
    [9] = {SKILL_FISHING, "fishing"}
}

function onSay(player, words, param)

    local output = {}
    output[1] = "Your info:\n"

    for i = 1, #skills do
        output[#output + 1] = ("%s: %d"):format(skills[i][2], not skills[i][3] and player:getSkillLevel(skills[i][1]) or skills[i][3](player))
    end

    player:sendTextMessage(MESSAGE_INFO_DESCR, table.concat(output, "\n"))
    return false
end
 
Back
Top