Histórico de Curtidas
-
alexandrehc deu reputação a lordzetros em [PEDIDO] TELEPORT COM DELAY@alexandrehc lá no início do código, colega, 3° linha do código
edit: @alexandrehc dei uma modificada no código, testa lá.
-
alexandrehc deu reputação a lordzetros em [PEDIDO] TELEPORT COM DELAY@alexandrehc Opa, tu pegou esse último código aí que atualizei? A mensagem tem que está antes de criar o evento, viu? Caso já tenho pegado, ignore isso.
Para mudar a cor basta você mudar nessa parte:
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,
onde está em negrito, você pode trocar por:
MESSAGE_STATUS_CONSOLE_BLUE = 4, Mensagem azul no console MESSAGE_STATUS_CONSOLE_RED = 13, Mensagem vermelha no console MESSAGE_STATUS_DEFAULT = 17, Mensagem branca na parte inferior da tela do jogo e no console MESSAGE_STATUS_WARNING = 18, Mensagem vermelha no centro da tela do jogo e no console MESSAGE_EVENT_ADVANCE = 19, Mensagem branca no centro da tela do jogo e no console MESSAGE_INFO_DESCR = 22, Mensagem verde no centro da tela do jogo e no console Tem mais, só pesquisar os types de mensagens que você encontra outros, ^^. Caso queira colocar o número, não tem problema, por exemplo, na do código eu poderia colocar 22 (MESSAGE_INFO_DESCR), ficando: doPlayerSendTextMessage(cid, 22,
-
alexandrehc deu reputação a lordzetros em [PEDIDO] TELEPORT COM DELAY@alexandrehc Opa, tem sim, já já edito aqui.
elseif msgcontains(msg, "report") then local tempoTeleport = 5 -- em minutos local posTeleport = {x = 100, y = 100, z = 7} -- posicao que o player vai, apos ficar X minutos no boss for k, v in pairs(tasks) do if getCreatureStorage(cid, v.questStarted) == 1 then if getCreatureStorage(cid, v.questStorage) >= v.killsRequired then for i = 1, table.maxn(v.rewards) do if(v.rewards[i].enable) then if isInArray({"boss", "teleport", 1}, v.rewards[i].type) then doTeleportThing(cid, v.rewards[i].values) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem "..tempoTeleport.." minutos para matar o Boss, caso nao consiga nesse tempo, sera teleportado para o templo de Thais!") addEvent(function() if isPlayer(cid) then doTeleportThing(cid,posTeleport) end end, tempoTeleport * 60 * 1000) elseif isInArray({"exp", "experience", 2}, v.rewards[i].type) then doPlayerAddExperience(cid, v.rewards[i].values) elseif isInArray({"item", 3}, v.rewards[i].type) then doPlayerAddItem(cid, v.rewards[i].values[1], v.rewards[i].values[2]) elseif isInArray({"money", 4}, v.rewards[i].type) then doPlayerAddMoney(cid, v.rewards[i].values) elseif isInArray({"storage", "stor", 5}, v.rewards[i].type) then doCreatureSetStorage(cid, v.rewards[i].values[1], v.rewards[i].values[2]) elseif isInArray({"points", "rank", 2}, v.rewards[i].type) then doCreatureSetStorage(cid, rankStorage, getCreatureStorage(cid, rankStorage) + v.rewards[i].values) else print("[Warning - Error::Killing in the name of::Tasks config] Bad reward type: " .. v.rewards[i].type .. ", reward could not be loaded.") end end end local rank = getCreatureStorage(cid, rankStorage) selfSay("Great!... you have finished the task number " .. k .. "" .. (rank > 4 and ", you are a " or "") .. "" .. (((rank > 4 and rank < 10) and ("Huntsman") or (rank > 9 and rank < 20) and ("Ranger") or (rank > 19 and rank < 30) and ("Big Game Hunter") or (rank > 29 and rank < 50) and ("Trophy Hunter") or (rank > 49) and ("Elite Hunter")) or "") .. ". Good job.", cid) doCreatureSetStorage(cid, v.questStarted, 2) break else if getCreatureStorage(cid, v.questStorage) < 0 then doCreatureSetStorage(cid, v.questStorage, 0) end selfSay("Current " .. getCreatureStorage(cid, v.questStorage) .. " " .. v.raceName .. " killed, you need to kill " .. v.killsRequired .. ".", cid) break end end end end return true end @alexandrehc pronto, pode testar que provavelmente está 100%.
-
alexandrehc deu reputação a jeremias em (Resolvido)[DUVIDA] Adicionar storage de tempo ao usar !fragsOlá, acho que esse script ira resolver seu problema, apague esse ai e cole este no lugar.
---Script adaptado por Shazam // Tibiaking local config = { useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')), advancedFragList = getBooleanFromString(getConfigValue('advancedFragList')) } local tempo = 60 -- Tempo em segundos para usar o comando novamente. local storage = 5839 -- Storage function onSay(cid, words, param, channel) if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, 19, "Aguarde " .. exhaustion.get(cid, storage) .. " para usar o comando novamente!") return false end if(not config.useFragHandler) then return false 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 local content = { name = result:getDataString("name"), level = result:getDataInt("level"), 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) } if(config.advancedFragList) then local result = "Frags gained today: " .. size.day .. "." if(size.day > 0) then for _, content in ipairs(contents.day) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags gained this week: " .. (size.day + size.week) .. "." if(size.week > 0) then for _, content in ipairs(contents.week) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags gained this month: " .. (size.day + size.week + size.month) .. "." if(size.month > 0) then for _, content in ipairs(contents.month) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd) end doPlayerPopupFYI(cid, result) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") if(size.day > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").") end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end end exhaustion.set(cid, storage, tempo) return true end