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

TFS 1.X+ Talk Actions Status TFS 1.3

adriez

New Member
Joined
Aug 14, 2011
Messages
73
Reaction score
1
port for tfs 1.3 and add show stamina, critical and dodge, my storage critical and dodge

DODGE = {
STORAGE = 48900, -- player storage do sistema


CRITICAL = {
STORAGE = 48901, -- player storage do sistema


Code:
function onSay(cid, words, param)

local level = getPlayerLevel(cid)
local vocation = getPlayerVocationName(cid)
local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid)
local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid)
local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3)
local distance, shield, fishing, magic =  getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid)
local function getResets(cid)
resets = getPlayerStorageValue(cid, 1020)
  if resets < 0 then
            resets = 0
          end
return resets
end

local cap = getPlayerFreeCap(cid)
local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nReset(s): "..getPlayerResets(cid).."\nCapacity: ".. cap .."\n\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing ..""
doShowTextDialog(cid, 5808, text)
return true
end
 
I think you can figure this one out bro, it's a good script to practice with.

Just use the functions library that I'll add below and use the find button in your browser (most meta function names aren't too far off from their legacy versions). If you run into any problems and you can't figure it out ask here and more people will be happy to help as long as you're attempting to learn.

Functions library: [Lua] TFS 1.3 Functions - Pastebin.com (https://pastebin.com/UNQc3Y7R)
Concatenation tutorial: Programming in Lua : 3.4 (https://www.lua.org/pil/3.4.html)
 
Back
Top