• 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!

RevScripts Talkaction Crit/Life/mana (Chance/Amount)

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
549
Solutions
1
Reaction score
58
Location
Lo Mochis, Sinaloa
Can some one help me with a revscript or lua talkaction to show my actual % of crit or mana or life chance and amount?
Example:

!show crit

Your critical chance is 25% and your critical amount is 15%.

I am using tfs 1.3
 
Last edited:
Solution
Lua:
local talk = TalkAction("!show")

function talk.onSay(player, words, param)
  
local config = {
    ['criticalchance'] = { text = "Your critical chance : "..player:getSpecialSkill(SPECIALSKILL_CRITICALHITCHANCE)..""},
    ['criticalamount'] = { text = "Your critical amount : "..player:getSpecialSkill(SPECIALSKILL_CRITICALHITAMOUNT)..""},
    ['lifeleechchance'] = { text = "Your life leech chance : "..player:getSpecialSkill(SPECIALSKILL_LIFELEECHCHANCE)..""},
    ['lifeleechamount'] = { text = "Your life leech amount : "..player:getSpecialSkill(SPECIALSKILL_LIFELEECHAMOUNT)..""},
    ['manaleechchance'] = { text = "Your mana leech chance : "..player:getSpecialSkill(SPECIALSKILL_MANALEECHCHANCE)..""},
    ['manaleechamount'] = { text =...
Lua:
local talk = TalkAction("!show")

function talk.onSay(player, words, param)
  
local config = {
    ['criticalchance'] = { text = "Your critical chance : "..player:getSpecialSkill(SPECIALSKILL_CRITICALHITCHANCE)..""},
    ['criticalamount'] = { text = "Your critical amount : "..player:getSpecialSkill(SPECIALSKILL_CRITICALHITAMOUNT)..""},
    ['lifeleechchance'] = { text = "Your life leech chance : "..player:getSpecialSkill(SPECIALSKILL_LIFELEECHCHANCE)..""},
    ['lifeleechamount'] = { text = "Your life leech amount : "..player:getSpecialSkill(SPECIALSKILL_LIFELEECHAMOUNT)..""},
    ['manaleechchance'] = { text = "Your mana leech chance : "..player:getSpecialSkill(SPECIALSKILL_MANALEECHCHANCE)..""},
    ['manaleechamount'] = { text = "Your mana leech amount : "..player:getSpecialSkill(SPECIALSKILL_MANALEECHAMOUNT.."")}
}
  
    local p = config[param:lower()]
    if not p then
        player:sendTextMessage(36, "Does not exists")
        return false
    end
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, p.text)
    return false
end

talk:separator(" ")
talk:register()

usage:

!show criticalchance

and so on
 
Last edited:
Solution
Back
Top