Ir para conteúdo

FlavioHulk

Membro
  • Registro em

  • Última visita

Tudo que FlavioHulk postou

  1. FlavioHulk postou uma resposta no tópico em Suporte Bots
    Poste seu login.lua
  2. Posta o script, cara, minha bola de cristal está com defeito...
  3. A chance do paladin vai depender da arma que ele está, veja sua configuração das armas
  4. Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.
  5. Cara, posta seu script de movements, por favor
  6. Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.
  7. Acredito que o script do @Zzyzx esteja bem funcional, mas... local config = { removeOnUse = true -- Remover quando usar?, premiumAccumulated = true, -- Acumular dias vips ao player? days = 30 -- Dias adicionado ao player } function onUse(cid, item, fromPosition, itemEx, toPosition) if not premiumAccumulated and vip.hasVips(cid) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já tem premium e não poderá ser acumulado.") return true end vip.setVip(cid, config.days * 24 * 60 * 60) local amountPremium = vip.getVip(cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. config.days .." dias de VIP no seu character.") doSendMagicEffect(getPlayerPosition(cid), math.random(28, 30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (amountPremium / 3600 / 24) .." dias de VIP restantes.") if config.removeOnUse then doRemoveItem(item.uid, 1) end return true end
  8. local chest = { [8049] = { name = '[Event] BOX', container = 1738, items = { [1] = { chance = 100, itemId = 2160, amountMax = 10 } } } } function onUse(cid, item, frompos, item2, topos) local tmpConfig = chest[item.actionid] if not tmpConfig then return true end local container, str = doPlayerAddItem(cid, tmpConfig.container, 1), 'BackPack from '.. tmpConfig.name ..', Your Rewards:\n' for i = 1, #tmpConfig.items do local items = tmpConfig.items[i] if items.chance >= math.random(1, 100) then local amountRandom = math.random(1, items.amountMax) str = str .. amountRandom .. ' ' .. getItemNameById(items.itemId) .. ' '..(i ~= #tmpConfig.items and ', ' or '.') doAddContainerItem(container, items.itemId, amountRandom) else return true end end doSendMagicEffect(getPlayerPosition(cid), math.random(28, 30)) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '.. str) return true end Puts, erro meu! Não havia reparado, mas tudo bem, vida que segue... @KotZletY @Vodkart marcação aleatória, só saudades
  9. local chest = { [8049] = { name = '[Event] BOX', container = 1738, items = { [1] = { chance = 100, itemId = 2160, amountMax = 10 } } } } function onUse(cid, item, frompos, item2, topos) local tmpConfig = chest[item.actionid] if not tmpConfig then return true end local container, str = doPlayerAddItem(cid, tmpConfig.container, 1), 'BackPack from '.. tmpConfig.name ..', Your Rewards:\n' for i = 1, #tmpConfig.items do local items = tmpConfig.items[i] if tmpConfig.chance >= math.random(1, 100) then local amountRandom = math.random(1, items.amountMax) str = str .. amountRandom .. ' ' .. getItemNameById(items.itemId) .. ' '..(i ~= #tmpConfig.items and ', ' or '.') doAddContainerItem(tmpConfig.container, items.itemId, amountRandom) else return true end end doSendMagicEffect(getPlayerPosition(cid), math.random(28, 30)) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '.. str) return true end
  10. local chest = { [8049] = { name = '[Event] BOX', container = 1738, items = { [1] = { chance = 100, itemId = 2160, amountMax = 10 } } } } function onUse(cid, item, frompos, item2, topos) local tmpConfig = chest[item.actionid] if not tmpConfig then return true end local container, str = doPlayerAddItem(cid, tmpConfig.container, 1), 'BackPack from '.. tmpConfig.name ..', Your Rewards:\n' for i = 1, #tmpConfig.items do local items = tmpConfig.items[i] if chance >= math.random(1, 100) then local amountRandom = math.random(1, items.amountMax) str = str .. amountRandom .. ' ' .. getItemNameById(items.itemId) .. ' '..(i ~= #tmpConfig.items and ', ' or '.') doAddContainerItem(tmpConfig.container, items.itemId, amountRandom) else return true end end doSendMagicEffect(getPlayerPosition(cid), math.random(28, 30)) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '.. str) return true end
  11. Por que está tudo sublinhado?
  12. FlavioHulk postou uma resposta no tópico em Suporte OTServer Derivados
    Isso
  13. Amigo, poste a solução, mais alguém poderá precisar e isso ajudará bastante.
  14. FlavioHulk postou uma resposta no tópico em Suporte OTServer Derivados
    lootMonster vezes o rateLoot do config.lua 100000 = 100% * rateLoot, ou seja se o rate for 4, a porcentagem será 400%
  15. ALTER TABLE `accounts` ADD `vipdays` int(11) NOT NULL DEFAULT 0;
  16. Eu achei meio desrespeitoso, mas vindo de você eu adoro ?
  17. Qual a bronca?
  18. Aumentar a velocidade? Ser menor que 1 segundo?
  19. local config = { cooldown = 20, -- tempo entre uma magia e outra duration = 10, --- duração storage = 3482101, effect = 34 --- efeito que vai sair } function onCastSpell(cid, var) if os.time() - getPlayerStorageValue(cid, 55695) >= config.cooldown then setPlayerStorageValue(cid, 55695, os.time()) for i = 1, config.duration do addEvent(function(cid, effect) if not isCreature(cid) then return false end local pos = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(pos, effect) end, 1000 * i, cid, config.effect) end doPlayerSendTextMessage(cid, 27, "Seu kaiten vai durar ".. config.duration .." segundos.") setPlayerStorageValue(cid, config.storage, os.time() + config.duration) else doPlayerSendChannelMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce tem que esperar "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." segundos para usar novamente.", TALKTYPE_CHANNEL_O, CHANNEL_SPELL) return false end return true end
  20. local config = { cooldown = 20, -- tempo entre uma magia e outra duration = 10, --- duração storage = 3482101, effect = 34 --- efeito que vai sair } function onCastSpell(cid, var) if os.time() - getPlayerStorageValue(cid, 55695) >= config.cooldown then setPlayerStorageValue(cid, 55695, os.time()) for i = 1, config.duration do addEvent(function(cid, effect) if not isCreature(cid) then return false end local pos = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(pos, effect) end, 1000 * i, cid, config.effect) end end doPlayerSendTextMessage(cid, 27, "Seu kaiten vai durar ".. config.duration .." segundos.") setPlayerStorageValue(cid, config.storage, os.time() + config.duration) else doPlayerSendChannelMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce tem que esperar "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." segundos para usar novamente.", TALKTYPE_CHANNEL_O, CHANNEL_SPELL) return false end return true end
  21. data/lib/050-function.lua function getPoints(cid) local res = db.getResult('select `p_points` from accounts where name = \''..getPlayerAccount(cid)..'\'') if(res:getID() == -1) then return false end local ret = res:getDataInt("p_points") res:free() return tonumber(ret) end function doPlayerAddPoints(cid, quant) return db.executeQuery("UPDATE `accounts` SET `p_points` = '".. getPoints(cid) + quant .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end function doPlayerRemovePoints(cid, quant) return db.executeQuery("UPDATE `accounts` SET `p_points` = '".. getPoints(cid) - quant .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end
  22. Cara, não entendi bem... O efeito tem que durar 10 segundos ou sair após 10 segundos? Porque seu addEvent ali, você tá multiplicando o i * 1000, e tá acontecendo que o effect tá saindo a cada segundo durante 10 segundos... E seu cooldown está de 20 segundos no config, o que não baterá com os 10 segundos do effect... Você está utilizando uma storage dentro do addEvent, e utilizando outra storage para check de time.
  23. local chest = { [8049] = { name = '[Event] BOX', container = 1738, items = { [1] = { chance = 100, itemId = 2160, amountMax = 10 } } } } function onUse(cid, item, frompos, item2, topos) local tmpConfig = chest[item.actionid] if not tmpConfig then return true end local container, str = doPlayerAddItem(cid, tmpConfig.container, 1), 'BackPack from '.. tmpConfig.name ..', Your Rewards:\n' for i = 1, #tmpConfig.items do local items = tmpConfig.items[i]items if chance >= math.random(1, 100) then local amountRandom = math.random(1, items.amountMax) str = str .. amountRandom .. ' ' .. getItemNameById(items.itemId) .. ' '..(i ~= #tmpConfig.items and ', ' or '.') doAddContainerItem(tmpConfig.container, items.itemId, amountRandom) else return true end end doSendMagicEffect(getPlayerPosition(cid), math.random(28, 30)) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '.. str) return true end Quanto a tabela ter sido reduzida, você deve fazer o seguinte: Ir no RME e colocar somente aquela action em todas as caixas, e deixar os unique ids em 0 ou não inserir... Colocar somente as actionsIds nos boxes, não uniqueId !
  24. FlavioHulk postou uma resposta no tópico em Suporte Tibia OTServer
    Aqui no TibiaKing mensagens como UP e BUMP são proibidas, utilize o botão subir este tópico. Esta é uma mensagem automática! Pedimos que leia as regras do fórum! @edcaverna

Informação Importante

Confirmação de Termo