-
-
-
-
-
bug with compile tfs 0.4
Can you send here the CONFIGURE file? So we can analyze the requeriments and how is it finding the files.
-
-
-
-
-
(Resolvido)[RESOLVIDO] Present com % de chances
Erro de digitação meu, atualizei a resposta, só substituir
-
[OTClient] Nome e data
Mande o script /modules/client_background/background.lua. (Please, dentro de um spoiler)
-
(Resolvido)Pokeball com boost
Editei a resposta.
-
Globalevent timer
Cria um evento normal, e dentro da função dele, adicione isto: local day = os.date("%A") if day ~= "Tuesday" and day ~= "Saturday" then return true end Tuesday é terça, saturday é sabado. os.date("%A") retorna o dia da semana em forma de string.
-
(Resolvido)Pokeball com boost
Arquivo errado. É no "data/lib/catch system.lua". Em baixo de: doItemSetAttribute(item, "poke", poke) Adiciona: if typeee == "dark" then doItemSetAttribute(item, 'boost', 20) end
-
(Resolvido)[RESOLVIDO] Present com % de chances
local items = { --[numeração] = {id = ID DO ITEM, count = QUANTIDADE DO ITEM, c = CHANCE} [1]={id=5892, count=1, c=10}, -- item 1 [2]={id=2139, count=1, c=20}, -- item 2 [3]={id=10503, count=1, c=30}, -- item 3 [4]={id=2141, count=1, c=40}, -- item 4 [5]={id=12596, count=1, c=50}, -- item 5 [6]={id=12469, count=1, c=60}, -- item 6 } function getRandomItem(t) local i = math.random(1, #t) i = t[i] if math.random(1, 100) <= i.c then return i end return getRandomItem(t) end function onUse(cid, item, fromPosition, itemEx, toPosition) local i = getRandomItem(items) doPlayerAddItem(cid, i.id, i.count) doSendAnimatedText(getPlayerPosition(cid), "Box!", TEXTCOLOR_GREEN) doPlayerSendTextMessage(cid, 27, "Você abriu uma Box e Ganhou "..i.count.."x "..getItemNameById(i.id)..(i.count > 1 and "s" or "")..".") doRemoveItem(item.uid, 1) return true end
-
amoxicilina começou a seguir Featzen
-
Função de ler arquivo .txt
Não sei bem onde o arquivo tem que estar, porquê tô sem nenhum ot aqui, mas botei pra o script criar um arquivo caso não exista, provavelmente vai ficar na pasta da executável ou no creaturescripts. function getTableFromFile(filename) local t = {} local f = io.open(file, "rb") if f then f:close() end if f == nil then f = io.open("recusar.txt", "wb") f:close() end for line in io.lines(filename) do table.insert(t, line) end return t end local config = { max = 1, } local function antiMC(p) if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then doRemoveCreature(p.pid) end return true end function onLogin(cid) local recusar = getTableFromFile('recusar.txt') if isInArray(recusar,getCreatureName(cid)) then addEvent(antiMC, 1000, {pid = cid, max = config.max+1}) end return true end No arquivo de texto, bota um nome por linha. Espero que tenha ajudado \o
-
Npc que faz pergunta dps teleporta
Apareceu notificação, e respondi. Não era pra ter nada aqui. KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
-
Ajuda Sistema de Fly
Descubra onde esses storages estão sendo usados no seu servidor: 13241 e 102015 (Se quiser remover essas proteções do script, apague essas linhas): if getPlayerStorageValue(cid, 102015) == -1 or getPlayerStorageValue(cid,13241) == 1 then return false end
-
NPC cobra por level
Se postar o script atual do npc, posso tentar ajudar.
-
Como colocar pra exp shared party em time ganhar 2x de exp
Não tenho como testar, mas acho que deve funcionar adicionando: shareExperience = shareExperience * 2; Em baixo de: uint32_t shareExperience = static_cast<uint64_t>(std::ceil(((static_cast<double>(experience) / (memberList.size() + 1)) + (static_cast<double>(experience) * extraExpRate))));
-
Função de ler arquivo .txt
Acho que seria melhor usar globalStorage. Mas, aí está as funções que precisa, e um exemplo. function tableToString(t) -- Transforma uma tabela em string return ("{'" .. table.concat(t, "','") .. "'}") end function setFileTable(filename, t) -- Salva uma tabela em um arquivo local tmpStr = tableToString(t) local f = io.open(filename, "wb") f:write(tmpStr) f:close() end function getFileTable(filename) -- Carrega uma tabela de um arquivo local fileStr = "" local f = io.open(filename, "rb") fileStr = f:read("*a") f:close() if fileStr then return loadstring("return " .. fileStr)() end return {} end -- Exemplo de uso local exTable = {"Joao", "Pedro", "Lucas", "Derp"} setFileTable("test.txt", exTable) local exTable2 = getFileTable("test.txt") print(tableToString(exTable2)) edit: Não esquece de pôr a declaração da variável "recusar" dentro do onLogin.
-
Pokémon Origins [TFS 0.4]
Projeto interessante. Sou programador(e scripter(??)), se ainda estiver precisando, me adicione. Skype: gabriel.sales.01
-
Aumentar limite de efeitos
Valeu kk Mario?