Postado Abril 27, 2018 7 anos Salve galera, tava procurando aqui um script de Kills & Deaths no look, e acabei achando uns bem interessantes, mas eu queria juntos todos ao mesmo tempo. Então resumindo tudo, eu queria que quando desse look, Mostrasse "[Frags],[Deaths],[Critical],[Dodge],[TaskP][VIP]/[FREE][QUANTASQUEST[0/30]. Então todos esses negocios ai que to pedindo pra aparecer, tem nesses scripts abaixo, eu só não sei juntar tudo, tmj ! Exemplo esse aqui é o do @KotZletY , nele aparece, quantas quests o player ja fez, exemplo, [0/30] Spoiler LimiteQuestCount = 30 -- coloque de acordo com a quantidade de quests existente no seu servidr QuestCountSystem = 123419 -- é a storage da system, lembre-se, não deve existe outra igual function getQuestCompletCount(uid, storage) if isPlayer(uid) then if getPlayerStorageValue(uid, storage) == -1 then return 0 end return getPlayerStorageValue(uid, storage) end end <event type="look" name="LookVoc" event="script" value="lookvoc.lua"/> registerCreatureEvent(cid, "LookVoc") function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nQuests Completas: ["..getQuestCompletCount(thing.uid, QuestCountSystem).."/"..LimiteQuestCount.."]") end return true end E nas quests tem que por isso if getQuestCompletCount(cid, QuestCountSystem) < LimiteQuestCount then doCreatureSetStorage(cid, QuestCountSystem, getQuestCompletCount(cid, QuestCountSystem)+1) end Dai tem o do @MaTTch, que aparece, Frags/Dodge/Critical. Spoiler function getPlayerFrags(cid) 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 local content = {date = result:getDataInt("date")} 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 size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,' [Frags: '..getPlayerFrags(thing.uid)..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48913)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48902)) or 0))..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,' [Frags: '..getPlayerFrags(cid)..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48913)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(cid,48902)) or 0))..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end Eu to usando esse mod de task do @Vodkart eu queria que fosse adaptado para ele. Spoiler <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Simple Task" version="4.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="task_func"><![CDATA[ task_sys = { [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll","Troll champion"}, level = 8, count = 120, points = 2, items = {{2448,1}}, reward = {{2645,1}}, exp = 100000, money = 20000}, [2] = {name = "rotworms", start = 176202, monsters_list = {"rotworm","carrion worm","Rotworm Queen"}, level = 8, count = 150, points = 2, items = {{2530,1}}, reward = {{2520,1}}, exp = 100000, money = 30000}, [3] = {name = "cyclops", start = 176203, monsters_list = {"cyclops","cyclops smith","cyclops drone"}, level = 8, count = 130, points = 2, items = {{2490,1}}, reward = {{2466,1}}, exp = 100000, money = 40000}, [4] = {name = "Dragon", start = 176204, monsters_list = {"dragon"}, level = 8, count = 150, points = 3, items = {{2397,1}}, reward = {{2195,1}}, exp = 150000, money = 50000}, [5] = {name = "Dragon Lord", start = 176205, monsters_list = {"Dragon Lord"}, level = 300, count = 200, points = 3, items = {{2528,3}}, reward = {{2470,1}}, exp = 150000, money = 60000}, [6] = {name = "Behemoth", start = 176206, monsters_list = {"Behemoth"}, level = 8, count = 150, points = 3, items = {{5930,3}}, reward = {{8889,1}}, exp = 150000, money = 70000}, [7] = {name = "Lizard Dragons" ,start = 176220, monsters_list = {"Lizard Chosen","Lizard Dragon Priest","Lizard High Guard","Lizard Legionnaire", "Lizard Zaogun"}, level = 8, count = 350, points = 3, items = {{11297,3}}, reward = {{2493,1}}, exp = 150000, money = 80000}, [8] = {name = "Defiler", start = 176208, monsters_list = {"Defiler"}, level = 8, count = 300, points = 3, items = {{6500,4}}, reward = {{2494,1}}, exp = 150000, money = 90000}, [9] = {name = "Hellfire Fighter", start = 176209, monsters_list = {"Hellfire Fighter"}, level = 8, count = 350, points = 4, items = {{2136,4}}, reward = {{2538,1}}, exp = 250000, money = 100000}, [10] = {name = "Hydra", start = 176210, monsters_list = {"Hydra"}, level = 100, count = 600, points = 4, items = {{4850,5}}, reward = {{6391,1}}, exp = 250000, money = 100000}, [11] = {name = "Medusa", start = 176211, monsters_list = {"Medusa"}, level = 100, count = 650, points = 5, items = {{2536,5}}, reward = {{2517,1}}, exp = 250000, money = 150000}, [12] = {name = "Frost Dragon", start = 176212, monsters_list = {"Frost Dragon"}, level = 100, count = 800, points = 5, items = {{1976,7}}, reward = {{1992,1}}, exp = 250000, money = 150000}, [13] = {name = "Warlock" ,start = 176213, monsters_list = {"Warlock"}, level = 200, count = 800, points = 5, items = {{2656,7}}, reward = {{2343,1}}, exp = 350000, money = 200000}, [14] = {name = "Grim Reaper" ,start = 176214, monsters_list = {"Grim Reaper"}, level = 250, count = 700, points = 6, items = {{2521,9}}, reward = {{2499,1}}, exp = 350000, money = 200000}, [15] = {name = "Demon" ,start = 176215, monsters_list = {"Demon"}, level = 300, count = 1000, points = 6, items = {{5954,9}}, reward = {{2644,1}}, exp = 450000, money = 300000}, [16] = {name = "Medusa Vip" ,start = 176216, monsters_list = {"Medusa Vip"}, level = 350, count = 1200, points = 6, items = {{7887,11}}, reward = {{6132,1}}, exp = 450000, money = 300000}, [17] = {name = "Hydra Vip" ,start = 176217, monsters_list = {"Hydra Vip"}, level = 350, count = 1200, points = 6, items = {{2498,11}}, reward = {{2527,1}}, exp = 550000, money = 400000}, [18] = {name = "Grim Reaper Vip" ,start = 176218, monsters_list = {"Grim Reaper Vip"}, level = 350, count = 1200, points = 8, items = {{6300,15}}, reward = {{2518,1}}, exp = 550000, money = 400000}, [19] = {name = "Warlock Vip" ,start = 176219, monsters_list = {"Warlock Vip"}, level = 350, count = 1200, points = 8, items = {{2466,15}}, reward = {{2519,1}}, exp = 650000, money = 500000}, [20] = {name = "Frost Dragon Vip" ,start = 176220, monsters_list = {"Frost Dragon Vip"}, level = 350, count = 1200, points = 8, items = {{2492,19}}, reward = {{8932,1}}, exp = 650000, money = 500000}, [21] = {name = "Demon Vip" ,start = 176221, monsters_list = {"Demon Vip"}, level = 350, count = 2000, points = 10, items = {{2418,19}}, reward = {{8926,1}}, exp = 750000, money = 600000}, [22] = {name = "Dragon Lord Vip II" ,start = 176222, monsters_list = {"Dragon Lord Vip II"}, level = 450, count = 1500, points = 10, items = {{2414,25}}, reward = {{2444,1}}, exp = 750000, money = 600000}, [23] = {name = "Frost Dragon Vip II" ,start = 176223, monsters_list = {"Frost Dragon Vip II"}, level = 450, count = 1500, points = 10, items = {{7290,25}}, reward = {{7367,1}}, exp = 850000, money = 700000}, [24] = {name = "Grim Reaper Vip II" ,start = 176224, monsters_list = {"Grim Reaper Vip II"}, level = 450, count = 1500, points = 10, items = {{5909,30}}, reward = {{7367,1}}, exp = 850000, money = 700000}, [25] = {name = "Hydra Vip II" ,start = 176225, monsters_list = {"Hydra Vip II"}, level = 450, count = 1500, points = 10, items = {{2476,30}}, reward = {{7414,1}}, exp = 2500000, money = 1000000}, [26] = {name = "Medusa Vip II" ,start = 176226, monsters_list = {"Medusa Vip II"}, level = 450, count = 1500, points = 10, items = {{2143,75}}, reward = {{2495,1},{2471,1}}, exp = 2500000, money = 1000000}, [27] = {name = "Lord Of Demon" ,start = 176227, monsters_list = {"Lord Of Demon"}, level = 500, count = 6666, points = 10, items = {{2462,120}}, reward = {{9969,5},{2366,1}}, exp = 10000000, money = 1000000}, [28] = {name = "Bossing Of Baiak" ,start = 176228, monsters_list = {"Bossing Of Baiak"}, level = 500, count = 30, points = 10, items = {{5903,5}}, reward = {{9969,5},{2366,1}}, exp = 20000000, money = 3000000}, [29] = {name = "Arabian" ,start = 176229, monsters_list = {"Arabian"}, level = 500, count = 30, points = 10, items = {{10521,10}}, reward = {{2523,1},{2263,1}}, exp = 20000000, money = 3000000}, [30] = {name = "Shadow Warrior" ,start = 176230, monsters_list = {"Shadow Warrior"}, level = 500, count = 70, points = 10, items = {{5875,25}}, reward = {{2298,1},{11114,1}}, exp = 20000000, money = 3000000}, [31] = {name = "Castle Guardian" ,start = 176231, monsters_list = {"Castle Guardian"}, level = 600, count = 25, points = 25, items = {{2520,100}}, reward = {{9969,15},{2366,2}}, exp = 20000000, money = 5000000} } daily_task = { [1] = {name = "Hydra Vip" ,monsters_list = {"Hydra Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [2] = {name = "Grim Reaper Vip" ,monsters_list = {"Grim Reaper Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [3] = {name = "Grim Reaper Vip II" ,monsters_list = {"Grim Reaper Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [4] = {name = "Frost Dragon Vip" ,monsters_list = {"Frost Dragon Vip"}, count = 750, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [5] = {name = "Dragon Lord Vip II" ,monsters_list = {"Dragon Lord Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [6] = {name = "Frost Dragon Vip II" ,monsters_list = {"Frost Dragon Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [7] = {name = "Frost Dragon" ,monsters_list = {"Frost Dragon"}, count = 300, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [8] = {name = "Hydra" ,monsters_list = {"Hydra"}, count = 700, points = 3, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [9] = {name = "Demon Vip" ,monsters_list = {"Demon Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [10] = {name = "Hydra Vip II" ,monsters_list = {"Hydra Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [11] = {name = "Medusa Vip" ,monsters_list = {"Medusa Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [12] = {name = "Warlock Vip" ,monsters_list = {"Warlock Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000} } task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, points, count, daily task, daily count, daily time , daily start, contador function getTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[1]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[1]) end function getDailyTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[4]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[4]) end function getTaskPoints(cid) return getPlayerStorageValue(cid,task_sys_storages[2]) < 0 and 0 or getPlayerStorageValue(cid,task_sys_storages[2]) end function doRandomDailyTask(cid) local t = { [{6,100}] = {1,3}, [{101,200}] = {4,6}, [{201,300}] = {7,9}, [{301,math.huge}] = {10,12} } for a , b in pairs(t) do if getPlayerLevel(cid) >= a[1] and getPlayerLevel(cid) <= a[2] then return math.random(b[1], b[2]) end end return 0 end function GetRankTask(cid) local ranks = { [{1, 40}] = "Leite com Pera", [{41, 80}] = "Iniciante", [{81, 120}] = "Intermediario", [{121, 200}] = "Fodao", [{201, math.huge}] = "Supremo Lord" } for v , r in pairs(ranks) do if getTaskPoints(cid) >= v[1] and getTaskPoints(cid) <= v[2] then return r end end return 0 end function getItemsFromList(items) local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. getItemNameById(items[i][1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function doRemoveItemsFromList(cid,items) local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid,items[i][1]) >= items[i][2] then count = count + 1 end end end if count == table.maxn(items) then for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[i][1],items[i][2]) end else return false end return true end function getMonsterFromList(monster) local str = '' if #monster > 0 then for i = 1, #monster do str = str .. monster[i] if i ~= #monster then str = str .. ', ' end end end return str end function GiveRewardsTask(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isSummon(cid) if(not isCreature(cid)) then return false end return getCreatureMaster(cid) ~= cid end function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end ]]></config> <event type="login" name="TaskLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "KillTask") registerCreatureEvent(cid, "TaskLook") return true end]]></event> <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('task_func') param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid) if isInArray({"counter","contador"},param) then setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true elseif isInArray({"daily","diaria"},param) then if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true end return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".") end if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then doPlayerSendCancel(cid, "você não está em nenhuma task.") return true end return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".") ]]></talkaction> <event type="look" name="TaskLook" event="script"><![CDATA[ domodlib('task_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and getTaskPoints(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").. " has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." is a "..GetRankTask(thing.uid)) end return true end]]></event> <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> <action actionid="60001;60002;60003;60004" event="script"><![CDATA[ domodlib('task_func') function onUse(cid, item, frompos, item2, topos) local t = {[60001] = 20, [60002] = 40, [60003] = 100, [60004] = 200} if not t[item.actionid] then return true end if getTaskPoints(cid) < t[item.actionid] then return doPlayerSendTextMessage(cid,22,"Você só pode passar se tiver " .. t[item.actionid] .. " Task Points.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, Task Hunter!") return true end]]></action> </mod> Tem esse tambem, mas é de outro forum de tibia, @Taag "esse mostra os FRAGS/VIP Se é VIP OU FREE Spoiler function getPlayerFrags(cid) 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 local content = {date = result:getDataInt("date")} 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 size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLook(cid, thing, position, lookDistance) local string = 'You see yourself.' if isPlayer(thing.uid) and thing.uid ~= cid then if getPlayerPremiumDays(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][VIP]') else doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][FREE]') end elseif thing.uid == cid then if getPlayerPremiumDays(cid) > 0 then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..'][VIP]') else doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..'][FREE]') end if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end MEXI MEXI MEXI MEXI E MEXI De tanto que eu mexi eu consegui entender um pouco, e adicionei oque eu queria, mas tem um problema, o "critical e o dodge" eles não estão mostrando o da pessoa que eu do LOOK, ele mostra o meu, mesmo eu dando look em outra pessoa, as linhas que ue mexi ta em verde. Spoiler Citar <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Simple Task" version="4.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="task_func"><![CDATA[ task_sys = { [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll","Troll champion"}, level = 8, count = 120, points = 2, items = {{2448,1}}, reward = {{2645,1}}, exp = 100000, money = 20000}, [2] = {name = "rotworms", start = 176202, monsters_list = {"rotworm","carrion worm","Rotworm Queen"}, level = 8, count = 150, points = 2, items = {{2530,1}}, reward = {{2520,1}}, exp = 100000, money = 30000}, [3] = {name = "cyclops", start = 176203, monsters_list = {"cyclops","cyclops smith","cyclops drone"}, level = 8, count = 130, points = 2, items = {{2490,1}}, reward = {{2466,1}}, exp = 100000, money = 40000}, [4] = {name = "Dragon", start = 176204, monsters_list = {"dragon"}, level = 8, count = 150, points = 3, items = {{2397,1}}, reward = {{2195,1}}, exp = 150000, money = 50000}, [5] = {name = "Dragon Lord", start = 176205, monsters_list = {"Dragon Lord"}, level = 300, count = 200, points = 3, items = {{2528,3}}, reward = {{2470,1}}, exp = 150000, money = 60000}, [6] = {name = "Behemoth", start = 176206, monsters_list = {"Behemoth"}, level = 8, count = 150, points = 3, items = {{5930,3}}, reward = {{8889,1}}, exp = 150000, money = 70000}, [7] = {name = "Lizard Dragons" ,start = 176220, monsters_list = {"Lizard Chosen","Lizard Dragon Priest","Lizard High Guard","Lizard Legionnaire", "Lizard Zaogun"}, level = 8, count = 350, points = 3, items = {{11297,3}}, reward = {{2493,1}}, exp = 150000, money = 80000}, [8] = {name = "Defiler", start = 176208, monsters_list = {"Defiler"}, level = 8, count = 300, points = 3, items = {{6500,4}}, reward = {{2494,1}}, exp = 150000, money = 90000}, [9] = {name = "Hellfire Fighter", start = 176209, monsters_list = {"Hellfire Fighter"}, level = 8, count = 350, points = 4, items = {{2136,4}}, reward = {{2538,1}}, exp = 250000, money = 100000}, [10] = {name = "Hydra", start = 176210, monsters_list = {"Hydra"}, level = 100, count = 600, points = 4, items = {{4850,5}}, reward = {{6391,1}}, exp = 250000, money = 100000}, [11] = {name = "Medusa", start = 176211, monsters_list = {"Medusa"}, level = 100, count = 650, points = 5, items = {{2536,5}}, reward = {{2517,1}}, exp = 250000, money = 150000}, [12] = {name = "Frost Dragon", start = 176212, monsters_list = {"Frost Dragon"}, level = 100, count = 800, points = 5, items = {{1976,7}}, reward = {{1992,1}}, exp = 250000, money = 150000}, [13] = {name = "Warlock" ,start = 176213, monsters_list = {"Warlock"}, level = 200, count = 800, points = 5, items = {{2656,7}}, reward = {{2343,1}}, exp = 350000, money = 200000}, [14] = {name = "Grim Reaper" ,start = 176214, monsters_list = {"Grim Reaper"}, level = 250, count = 700, points = 6, items = {{2521,9}}, reward = {{2499,1}}, exp = 350000, money = 200000}, [15] = {name = "Demon" ,start = 176215, monsters_list = {"Demon"}, level = 300, count = 1000, points = 6, items = {{5954,9}}, reward = {{2644,1}}, exp = 450000, money = 300000}, [16] = {name = "Medusa Vip" ,start = 176216, monsters_list = {"Medusa Vip"}, level = 350, count = 1200, points = 6, items = {{7887,11}}, reward = {{6132,1}}, exp = 450000, money = 300000}, [17] = {name = "Hydra Vip" ,start = 176217, monsters_list = {"Hydra Vip"}, level = 350, count = 1200, points = 6, items = {{2498,11}}, reward = {{2527,1}}, exp = 550000, money = 400000}, [18] = {name = "Grim Reaper Vip" ,start = 176218, monsters_list = {"Grim Reaper Vip"}, level = 350, count = 1200, points = 8, items = {{6300,15}}, reward = {{2518,1}}, exp = 550000, money = 400000}, [19] = {name = "Warlock Vip" ,start = 176219, monsters_list = {"Warlock Vip"}, level = 350, count = 1200, points = 8, items = {{2466,15}}, reward = {{2519,1}}, exp = 650000, money = 500000}, [20] = {name = "Frost Dragon Vip" ,start = 176220, monsters_list = {"Frost Dragon Vip"}, level = 350, count = 1200, points = 8, items = {{2492,19}}, reward = {{8932,1}}, exp = 650000, money = 500000}, [21] = {name = "Demon Vip" ,start = 176221, monsters_list = {"Demon Vip"}, level = 350, count = 2000, points = 10, items = {{2418,19}}, reward = {{8926,1}}, exp = 750000, money = 600000}, [22] = {name = "Dragon Lord Vip II" ,start = 176222, monsters_list = {"Dragon Lord Vip II"}, level = 450, count = 1500, points = 10, items = {{2414,25}}, reward = {{2444,1}}, exp = 750000, money = 600000}, [23] = {name = "Frost Dragon Vip II" ,start = 176223, monsters_list = {"Frost Dragon Vip II"}, level = 450, count = 1500, points = 10, items = {{7290,25}}, reward = {{7367,1}}, exp = 850000, money = 700000}, [24] = {name = "Grim Reaper Vip II" ,start = 176224, monsters_list = {"Grim Reaper Vip II"}, level = 450, count = 1500, points = 10, items = {{5909,30}}, reward = {{7367,1}}, exp = 850000, money = 700000}, [25] = {name = "Hydra Vip II" ,start = 176225, monsters_list = {"Hydra Vip II"}, level = 450, count = 1500, points = 10, items = {{2476,30}}, reward = {{7414,1}}, exp = 2500000, money = 1000000}, [26] = {name = "Medusa Vip II" ,start = 176226, monsters_list = {"Medusa Vip II"}, level = 450, count = 1500, points = 10, items = {{2143,75}}, reward = {{2495,1},{2471,1}}, exp = 2500000, money = 1000000}, [27] = {name = "Lord Of Demon" ,start = 176227, monsters_list = {"Lord Of Demon"}, level = 500, count = 6666, points = 10, items = {{2462,120}}, reward = {{9969,5},{2366,1}}, exp = 10000000, money = 1000000}, [28] = {name = "Bossing Of Baiak" ,start = 176228, monsters_list = {"Bossing Of Baiak"}, level = 500, count = 30, points = 10, items = {{5903,5}}, reward = {{9969,5},{2366,1}}, exp = 20000000, money = 3000000}, [29] = {name = "Arabian" ,start = 176229, monsters_list = {"Arabian"}, level = 500, count = 30, points = 10, items = {{10521,10}}, reward = {{2523,1},{2263,1}}, exp = 20000000, money = 3000000}, [30] = {name = "Shadow Warrior" ,start = 176230, monsters_list = {"Shadow Warrior"}, level = 500, count = 70, points = 10, items = {{5875,25}}, reward = {{2298,1},{11114,1}}, exp = 20000000, money = 3000000}, [31] = {name = "Castle Guardian" ,start = 176231, monsters_list = {"Castle Guardian"}, level = 600, count = 25, points = 25, items = {{2520,100}}, reward = {{9969,15},{2366,2}}, exp = 20000000, money = 5000000} } daily_task = { [1] = {name = "Hydra Vip" ,monsters_list = {"Hydra Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [2] = {name = "Grim Reaper Vip" ,monsters_list = {"Grim Reaper Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [3] = {name = "Grim Reaper Vip II" ,monsters_list = {"Grim Reaper Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [4] = {name = "Frost Dragon Vip" ,monsters_list = {"Frost Dragon Vip"}, count = 750, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [5] = {name = "Dragon Lord Vip II" ,monsters_list = {"Dragon Lord Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [6] = {name = "Frost Dragon Vip II" ,monsters_list = {"Frost Dragon Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [7] = {name = "Frost Dragon" ,monsters_list = {"Frost Dragon"}, count = 300, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [8] = {name = "Hydra" ,monsters_list = {"Hydra"}, count = 700, points = 3, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [9] = {name = "Demon Vip" ,monsters_list = {"Demon Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [10] = {name = "Hydra Vip II" ,monsters_list = {"Hydra Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [11] = {name = "Medusa Vip" ,monsters_list = {"Medusa Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [12] = {name = "Warlock Vip" ,monsters_list = {"Warlock Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000} } task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, points, count, daily task, daily count, daily time , daily start, contador function getTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[1]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[1]) end function getDailyTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[4]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[4]) end function getTaskPoints(cid) return getPlayerStorageValue(cid,task_sys_storages[2]) < 0 and 0 or getPlayerStorageValue(cid,task_sys_storages[2]) end function doRandomDailyTask(cid) local t = { [{6,100}] = {1,3}, [{101,200}] = {4,6}, [{201,300}] = {7,9}, [{301,math.huge}] = {10,12} } for a , b in pairs(t) do if getPlayerLevel(cid) >= a[1] and getPlayerLevel(cid) <= a[2] then return math.random(b[1], b[2]) end end return 0 end function GetRankTask(cid) local ranks = { [{1, 40}] = "Leite com Pera", [{41, 80}] = "Iniciante", [{81, 120}] = "Intermediario", [{121, 200}] = "Fodao", [{201, math.huge}] = "Supremo Lord" } for v , r in pairs(ranks) do if getTaskPoints(cid) >= v[1] and getTaskPoints(cid) <= v[2] then return r end end return 0 end function getItemsFromList(items) local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[2] .. ' ' .. getItemNameById(items[1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function doRemoveItemsFromList(cid,items) local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid,items[1]) >= items[2] then count = count + 1 end end end if count == table.maxn(items) then for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[1],items[2]) end else return false end return true end function getMonsterFromList(monster) local str = '' if #monster > 0 then for i = 1, #monster do str = str .. monster if i ~= #monster then str = str .. ', ' end end end return str end function GiveRewardsTask(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isSummon(cid) if(not isCreature(cid)) then return false end return getCreatureMaster(cid) ~= cid end function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d endLimiteQuestCount = 30 -- coloque de acordo com a quantidade de quests existente no seu servidr QuestCountSystem = 123419 -- é a storage da system, lembre-se, não deve existe outra igual function getQuestCompletCount(uid, storage) if isPlayer(uid) then if getPlayerStorageValue(uid, storage) == -1 then return 0 end return getPlayerStorageValue(uid, storage) end end ]]></config> <event type="login" name="TaskLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "KillTask") registerCreatureEvent(cid, "TaskLook") registerCreatureEvent(cid, "LookVoc") registerCreatureEvent(cid, "Fraglook") return true end]]></event> <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('task_func') param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid) if isInArray({"counter","contador"},param) then setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true elseif isInArray({"daily","diaria"},param) then if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true end return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".") end if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then doPlayerSendCancel(cid, "você não está em nenhuma task.") return true end return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".") ]]></talkaction> <event type="look" name="TaskLook" event="script"><![CDATA[ domodlib('task_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and getTaskPoints(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid, "\n[Critical: "..math.max(0,(tonumber(getCreatureStorage(cid,48913)) or 0)).."], [Dodge: "..math.max(0,(tonumber(getCreatureStorage(cid,48902)) or 0)).."]\n Frags: ["..getDeathsAndKills(thing.uid, "kill").."] Mortes: ["..getDeathsAndKills(thing.uid, "death").."]\n Quests Completas: ["..getQuestCompletCount(thing.uid, QuestCountSystem).."/"..LimiteQuestCount.."] Times.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." is a "..GetRankTask(thing.uid)) end return true end]]></event> <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> <action actionid="60001;60002;60003;60004" event="script"><![CDATA[ domodlib('task_func') function onUse(cid, item, frompos, item2, topos) local t = {[60001] = 20, [60002] = 40, [60003] = 100, [60004] = 200} if not t[item.actionid] then return true end if getTaskPoints(cid) < t[item.actionid] then return doPlayerSendTextMessage(cid,22,"Você só pode passar se tiver " .. t[item.actionid] .. " Task Points.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, Task Hunter!") return true end]]></action> </mod> Editado Abril 27, 2018 7 anos por Zzyzx alterei o script (veja o histórico de edições)
Postado Abril 28, 2018 7 anos MODS use assim: <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Simple Task" version="4.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="task_func"><![CDATA[ task_sys = { [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll","Troll champion"}, level = 8, count = 120, points = 2, items = {{2448,1}}, reward = {{2645,1}}, exp = 100000, money = 20000}, [2] = {name = "rotworms", start = 176202, monsters_list = {"rotworm","carrion worm","Rotworm Queen"}, level = 8, count = 150, points = 2, items = {{2530,1}}, reward = {{2520,1}}, exp = 100000, money = 30000}, [3] = {name = "cyclops", start = 176203, monsters_list = {"cyclops","cyclops smith","cyclops drone"}, level = 8, count = 130, points = 2, items = {{2490,1}}, reward = {{2466,1}}, exp = 100000, money = 40000}, [4] = {name = "Dragon", start = 176204, monsters_list = {"dragon"}, level = 8, count = 150, points = 3, items = {{2397,1}}, reward = {{2195,1}}, exp = 150000, money = 50000}, [5] = {name = "Dragon Lord", start = 176205, monsters_list = {"Dragon Lord"}, level = 300, count = 200, points = 3, items = {{2528,3}}, reward = {{2470,1}}, exp = 150000, money = 60000}, [6] = {name = "Behemoth", start = 176206, monsters_list = {"Behemoth"}, level = 8, count = 150, points = 3, items = {{5930,3}}, reward = {{8889,1}}, exp = 150000, money = 70000}, [7] = {name = "Lizard Dragons" ,start = 176220, monsters_list = {"Lizard Chosen","Lizard Dragon Priest","Lizard High Guard","Lizard Legionnaire", "Lizard Zaogun"}, level = 8, count = 350, points = 3, items = {{11297,3}}, reward = {{2493,1}}, exp = 150000, money = 80000}, [8] = {name = "Defiler", start = 176208, monsters_list = {"Defiler"}, level = 8, count = 300, points = 3, items = {{6500,4}}, reward = {{2494,1}}, exp = 150000, money = 90000}, [9] = {name = "Hellfire Fighter", start = 176209, monsters_list = {"Hellfire Fighter"}, level = 8, count = 350, points = 4, items = {{2136,4}}, reward = {{2538,1}}, exp = 250000, money = 100000}, [10] = {name = "Hydra", start = 176210, monsters_list = {"Hydra"}, level = 100, count = 600, points = 4, items = {{4850,5}}, reward = {{6391,1}}, exp = 250000, money = 100000}, [11] = {name = "Medusa", start = 176211, monsters_list = {"Medusa"}, level = 100, count = 650, points = 5, items = {{2536,5}}, reward = {{2517,1}}, exp = 250000, money = 150000}, [12] = {name = "Frost Dragon", start = 176212, monsters_list = {"Frost Dragon"}, level = 100, count = 800, points = 5, items = {{1976,7}}, reward = {{1992,1}}, exp = 250000, money = 150000}, [13] = {name = "Warlock" ,start = 176213, monsters_list = {"Warlock"}, level = 200, count = 800, points = 5, items = {{2656,7}}, reward = {{2343,1}}, exp = 350000, money = 200000}, [14] = {name = "Grim Reaper" ,start = 176214, monsters_list = {"Grim Reaper"}, level = 250, count = 700, points = 6, items = {{2521,9}}, reward = {{2499,1}}, exp = 350000, money = 200000}, [15] = {name = "Demon" ,start = 176215, monsters_list = {"Demon"}, level = 300, count = 1000, points = 6, items = {{5954,9}}, reward = {{2644,1}}, exp = 450000, money = 300000}, [16] = {name = "Medusa Vip" ,start = 176216, monsters_list = {"Medusa Vip"}, level = 350, count = 1200, points = 6, items = {{7887,11}}, reward = {{6132,1}}, exp = 450000, money = 300000}, [17] = {name = "Hydra Vip" ,start = 176217, monsters_list = {"Hydra Vip"}, level = 350, count = 1200, points = 6, items = {{2498,11}}, reward = {{2527,1}}, exp = 550000, money = 400000}, [18] = {name = "Grim Reaper Vip" ,start = 176218, monsters_list = {"Grim Reaper Vip"}, level = 350, count = 1200, points = 8, items = {{6300,15}}, reward = {{2518,1}}, exp = 550000, money = 400000}, [19] = {name = "Warlock Vip" ,start = 176219, monsters_list = {"Warlock Vip"}, level = 350, count = 1200, points = 8, items = {{2466,15}}, reward = {{2519,1}}, exp = 650000, money = 500000}, [20] = {name = "Frost Dragon Vip" ,start = 176220, monsters_list = {"Frost Dragon Vip"}, level = 350, count = 1200, points = 8, items = {{2492,19}}, reward = {{8932,1}}, exp = 650000, money = 500000}, [21] = {name = "Demon Vip" ,start = 176221, monsters_list = {"Demon Vip"}, level = 350, count = 2000, points = 10, items = {{2418,19}}, reward = {{8926,1}}, exp = 750000, money = 600000}, [22] = {name = "Dragon Lord Vip II" ,start = 176222, monsters_list = {"Dragon Lord Vip II"}, level = 450, count = 1500, points = 10, items = {{2414,25}}, reward = {{2444,1}}, exp = 750000, money = 600000}, [23] = {name = "Frost Dragon Vip II" ,start = 176223, monsters_list = {"Frost Dragon Vip II"}, level = 450, count = 1500, points = 10, items = {{7290,25}}, reward = {{7367,1}}, exp = 850000, money = 700000}, [24] = {name = "Grim Reaper Vip II" ,start = 176224, monsters_list = {"Grim Reaper Vip II"}, level = 450, count = 1500, points = 10, items = {{5909,30}}, reward = {{7367,1}}, exp = 850000, money = 700000}, [25] = {name = "Hydra Vip II" ,start = 176225, monsters_list = {"Hydra Vip II"}, level = 450, count = 1500, points = 10, items = {{2476,30}}, reward = {{7414,1}}, exp = 2500000, money = 1000000}, [26] = {name = "Medusa Vip II" ,start = 176226, monsters_list = {"Medusa Vip II"}, level = 450, count = 1500, points = 10, items = {{2143,75}}, reward = {{2495,1},{2471,1}}, exp = 2500000, money = 1000000}, [27] = {name = "Lord Of Demon" ,start = 176227, monsters_list = {"Lord Of Demon"}, level = 500, count = 6666, points = 10, items = {{2462,120}}, reward = {{9969,5},{2366,1}}, exp = 10000000, money = 1000000}, [28] = {name = "Bossing Of Baiak" ,start = 176228, monsters_list = {"Bossing Of Baiak"}, level = 500, count = 30, points = 10, items = {{5903,5}}, reward = {{9969,5},{2366,1}}, exp = 20000000, money = 3000000}, [29] = {name = "Arabian" ,start = 176229, monsters_list = {"Arabian"}, level = 500, count = 30, points = 10, items = {{10521,10}}, reward = {{2523,1},{2263,1}}, exp = 20000000, money = 3000000}, [30] = {name = "Shadow Warrior" ,start = 176230, monsters_list = {"Shadow Warrior"}, level = 500, count = 70, points = 10, items = {{5875,25}}, reward = {{2298,1},{11114,1}}, exp = 20000000, money = 3000000}, [31] = {name = "Castle Guardian" ,start = 176231, monsters_list = {"Castle Guardian"}, level = 600, count = 25, points = 25, items = {{2520,100}}, reward = {{9969,15},{2366,2}}, exp = 20000000, money = 5000000} } daily_task = { [1] = {name = "Hydra Vip" ,monsters_list = {"Hydra Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [2] = {name = "Grim Reaper Vip" ,monsters_list = {"Grim Reaper Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [3] = {name = "Grim Reaper Vip II" ,monsters_list = {"Grim Reaper Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [4] = {name = "Frost Dragon Vip" ,monsters_list = {"Frost Dragon Vip"}, count = 750, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [5] = {name = "Dragon Lord Vip II" ,monsters_list = {"Dragon Lord Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [6] = {name = "Frost Dragon Vip II" ,monsters_list = {"Frost Dragon Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [7] = {name = "Frost Dragon" ,monsters_list = {"Frost Dragon"}, count = 300, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [8] = {name = "Hydra" ,monsters_list = {"Hydra"}, count = 700, points = 3, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [9] = {name = "Demon Vip" ,monsters_list = {"Demon Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [10] = {name = "Hydra Vip II" ,monsters_list = {"Hydra Vip II"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [11] = {name = "Medusa Vip" ,monsters_list = {"Medusa Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000}, [12] = {name = "Warlock Vip" ,monsters_list = {"Warlock Vip"}, count = 700, points = 4, reward = {{9969,1}}, exp = 3000000, money = 3000000} } task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, points, count, daily task, daily count, daily time , daily start, contador function getTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[1]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[1]) end function getDailyTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[4]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[4]) end function getTaskPoints(cid) return getPlayerStorageValue(cid,task_sys_storages[2]) < 0 and 0 or getPlayerStorageValue(cid,task_sys_storages[2]) end function doRandomDailyTask(cid) local t = { [{6,100}] = {1,3}, [{101,200}] = {4,6}, [{201,300}] = {7,9}, [{301,math.huge}] = {10,12} } for a , b in pairs(t) do if getPlayerLevel(cid) >= a[1] and getPlayerLevel(cid) <= a[2] then return math.random(b[1], b[2]) end end return 0 end function GetRankTask(cid) local ranks = { [{0, 40}] = "Leite com Pera", [{41, 80}] = "Iniciante", [{81, 120}] = "Intermediario", [{121, 200}] = "Fodao", [{201, math.huge}] = "Supremo Lord" } for v , r in pairs(ranks) do if getTaskPoints(cid) >= v[1] and getTaskPoints(cid) <= v[2] then return r end end return 0 end function getItemsFromList(items) local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. getItemNameById(items[i][1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function doRemoveItemsFromList(cid,items) local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid,items[i][1]) >= items[i][2] then count = count + 1 end end end if count == table.maxn(items) then for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[i][1],items[i][2]) end else return false end return true end function getMonsterFromList(monster) local str = '' if #monster > 0 then for i = 1, #monster do str = str .. monster[i] if i ~= #monster then str = str .. ', ' end end end return str end function GiveRewardsTask(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isSummon(cid) if(not isCreature(cid)) then return false end return getCreatureMaster(cid) ~= cid end function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end ]]></config> <event type="login" name="TaskLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "KillTask") registerCreatureEvent(cid, "TaskLook") return true end]]></event> <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('task_func') param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid) if isInArray({"counter","contador"},param) then setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true elseif isInArray({"daily","diaria"},param) then if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true end return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".") end if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then doPlayerSendCancel(cid, "você não está em nenhuma task.") return true end return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".") ]]></talkaction> <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> <action actionid="60001;60002;60003;60004" event="script"><![CDATA[ domodlib('task_func') function onUse(cid, item, frompos, item2, topos) local t = {[60001] = 20, [60002] = 40, [60003] = 100, [60004] = 200} if not t[item.actionid] then return true end if getTaskPoints(cid) < t[item.actionid] then return doPlayerSendTextMessage(cid,22,"Você só pode passar se tiver " .. t[item.actionid] .. " Task Points.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, Task Hunter!") return true end]]></action> </mod> EXCLUA TOSOS OS SCRIPTS ANTERIORES DE DESCRIÇÃO DE LOOK EM CREATURESCRIPT E use somente esse: domodlib('task_func') LimiteQuestCount = 30 -- coloque de acordo com a quantidade de quests existente no seu servidr QuestCountSystem = 123419 -- é a storage da system, lembre-se, não deve existe outra igual function getQuestCompletCount(uid, storage) if isPlayer(uid) then if getPlayerStorageValue(uid, storage) == -1 then return 0 end return getPlayerStorageValue(uid, storage) end end function getPlayerFrags(cid) 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 local content = {date = result:getDataInt("date")} 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 size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,' [Frags: '..getPlayerFrags(thing.uid)..']['..(getPlayerPremiumDays(thing.uid) > 0 and 'VIP' or 'FREE')..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48913)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48902)) or 0))..']\nQuests Completas: ['..getQuestCompletCount(thing.uid, QuestCountSystem)..'/'..LimiteQuestCount..']\n'..(getPlayerSex(thing.uid) == 0 and 'She' or 'He')..' is a '..GetRankTask(thing.uid)) return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,' [Frags: '..getPlayerFrags(cid)..']['..(getPlayerPremiumDays(cid) > 0 and 'VIP' or 'FREE')..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48913)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(cid,48902)) or 0))..']\nQuests Completas: ['..getQuestCompletCount(cid, QuestCountSystem)..'/'..LimiteQuestCount..']\n'..(getPlayerSex(cid) == 0 and 'She' or 'He')..' is a '..GetRankTask(cid)) local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 28, 2018 7 anos Autor Caralho @Vodkart ficou melhor doque imaginei, hahaha, valeu brow, mas teria como mudar uma coisinha? essa parte da VIP/FREE ta contando como "PREMMY" teria como colocar por storage de area vip? "13540" valeu irmão. Aquele REP+ boladão
Postado Abril 29, 2018 7 anos 21 horas atrás, Zzyzx disse: Caralho @Vodkart ficou melhor doque imaginei, hahaha, valeu brow, mas teria como mudar uma coisinha? essa parte da VIP/FREE ta contando como "PREMMY" teria como colocar por storage de area vip? "13540" valeu irmão. Aquele REP+ boladão mas teu vip é os.time() ou só joga storage 13540? se der me mostra o script onde adc vip no seu ot. [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 29, 2018 7 anos Autor @Vodkart Então, esse é o script que eu uso pra adicionar a VIP, que é por itens. Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13540) local timenow = os.time() if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13540, time) local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end E esse é o script do TILE, pra só passar quem for VIP. Spoiler function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Pra acessar a area DONATE, você precisa acessar www.baiakstar.com , e comprar no SHOP!", msgWelcome = "Seja bem vindo a area DONATE" } if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end Editado Abril 29, 2018 7 anos por Zzyzx (veja o histórico de edições)
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.