Postado Janeiro 8, 2015 10 anos Tente assim Usarei seu Script Bruno Minervino Certo ? function onSay(cid, words, param) local level = getPlayerLevel(cid) local voc = getPlayerVocationName(cid) local health, healthmax = getCreatureMaxHealth(cid), getCreatureMaxHealth(cid) local mana, manamax = getCreatureMaxMana(cid), getCreatureMaxMana(cid) local fist, club, sword, axe, distance, shield, fishing, mlvl = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3), getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid) local resets = getResets(cid) local result = "Level: "..level.."\nVocation: ".. voc .."\nHealth: ".. health .."/".. healthmax .."\nMana: ".. mana .."/".. manamax .."\nResets: "..resets.."\n\nOutros:\nMagic Level: ".. mlvl .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing.."" doPlayerPopupFYI(cid, result) return true end Porém se O Distro Dele não Reconhece getCreatureHealth então so dá pra ver o Máximo... teste ! Editado Janeiro 9, 2015 10 anos por misticoxx (veja o histórico de edições)
Postado Janeiro 9, 2015 10 anos @xWhiteWolf, Eu tinha visto isso, primeiro coloquei a versão funcionando para ele ver o resultado... Depois ensinei ele a pegar a versão do servidor dele pra ver qual a função correta que pega o valor do Health...@Rikikajimo, Uma forma mais fácil, você baixou esse servidor aqui no TK ? Se sim, aponte-nos o tópico. Abraço! Editado Janeiro 9, 2015 10 anos por Bruno Minervino (veja o histórico de edições)
Postado Janeiro 9, 2015 10 anos essa script fuinciono perfeitamente pra mim eu gostaria de pedir + uma coisa sei que o topico não é meu + tem como colocar para aparecer se o player é VIP ou Free e quantos frags ele tem agradeço rep + 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, 2310) 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): "..getResets(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
Postado Janeiro 9, 2015 10 anos @Tuka, function onSay(cid, words, param) local level = getPlayerLevel(cid) local vocation = getPlayerVocationName(cid) local status = (vip.hasVip(cid) == FALSE) and "Free Account" or "VIP Acccount" 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 cap = getPlayerFreeCap(cid) local function getResets(cid) resets = getPlayerStorageValue(cid, 2310) if resets < 0 then resets = 0 end return resets end local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local total = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nReset(s): "..getResets(cid).."\nCapacity: ".. cap .."\nAccount Status: ".. status .."\n\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing .."\n\nFrags\nToday: " .. total.day .. "\nThis week: " .. total.week .. " This month: " .. total.month .."" doShowTextDialog(cid, 5808, text) return true end Usei como exemplo deste sistema VIP: http://www.tibiaking.com/forum/topic/20589-vip-system-by-mock-100/ Editado Janeiro 9, 2015 10 anos por Bruno Minervino (veja o histórico de edições)
Postado Janeiro 9, 2015 10 anos man deu esse erro aki [09/01/2015 14:16:53] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/statusplayer.lua:5: unexpected symbol near '?' [09/01/2015 14:16:53] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/statusplayer.lua) [09/01/2015 14:16:53] data/talkactions/scripts/statusplayer.lua:5: unexpected symbol near '?'
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.