Ir para conteúdo

Bruno Minervino

Membro
  • Registro em

  • Última visita

Solutions

  1. Bruno Minervino's post in (Resolvido)Treiners Anti AFK was marked as the answer   
    @fantomdruid,

    Como você usa TFS 1.2, tenta assim:

    local config = { time = 1, -- minutes str = 98765, -- storage pos = {x = 5, y = 6, z = 7} -- position } function onStepIn(creature, item, position, fromPosition) if not creature:isPlayer() then return false end local function isTraining(uid) local self = Player(uid) return self:getStorageValue(config.str) > 0 and self:teleportTo(config.pos) or true end check = addEvent(isTraining, config.time * 60 * 1000, creature.uid) return creature:setStorageValue(config.str, 1) end function onStepOut(creature, item, position, fromPosition) if not creature:isPlayer() then return false end return stopEvent(check) and creature:setStorageValue(config.str, -1) endEu tava precisando de algo assim no meu projeto, então decidi ajudar, porém os créditos são do Wise.
  2. Bruno Minervino's post in (Resolvido)Parte de Dodge System was marked as the answer   
    Olha fantomdruid, acho que funcionou:
    local lvldodge = 48902 local percent = 0.5 function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) if not isPlayer(creature) then return false end if isInArray({ORIGIN_SPELL, ORIGIN_MELEE, ORIGIN_RANGED}, origin) and isCreature(attacker) then if (creature:getStorage(lvldodge) * 3) >= math.random (0, 1000) then primaryDamage = primaryDamage - math.ceil(primaryDamage * percent) secondaryDamage = secondaryDamage - math.ceil(secondaryDamage * percent) creature:say("DODGE!", TALKTYPE_MONSTER_SAY) creature:getPosition():sendMagicEffect(CONST_ME_BLOCKHIT) return primaryDamage, primaryType, secondaryDamage, secondaryType end end return primaryDamage, primaryType, secondaryDamage, secondaryType end
  3. Bruno Minervino's post in (Resolvido)[PEDIDO]Item que ao dar USE ganha Pontos do shopping mysql was marked as the answer   
    Em data/actions/actions.xml adicione a seguinte tag:
    <action itemid="9930" event="script" value="ppoints.lua"/> Altere itemid para o id do item desejado.
     
    Agora em data/actions/scripts crie o arquivo ppoints.lua com o seguinte conteúdo:
    local pontos = 10 -- pontos que a account vai ganhar function onUse(cid, item, fromPosition, itemEx, toPosition) db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + ".. pontos .. " WHERE id = " .. getPlayerAccountId(cid) .. ";") doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 14) doPlayerSendTextMessage(cid, 22, "Você inseriu " .. pontos .." premium points em sua account.") end Bom, por falta de tempo fiz algo bem simples, porém deve ajudar.
    Qualquer problema reporte!
    Abs.
  4. Bruno Minervino's post in (Resolvido)Como alterar fonte da DLL Lua51 ? was marked as the answer   
    Amigo para ler a source de uma dll você precisa decompilar. Não há como lê-la sua source sem este procedimento, o máximo que você consegue é ler suas funções e métodos, na qual esta é a finalidade de utilizar uma dll.
  5. Bruno Minervino's post in (Resolvido)Problema script de remover skull was marked as the answer   
    Caso não funcione, e queira tentar:



  6. Bruno Minervino's post in (Resolvido)Remover red e blackskull por item was marked as the answer   
    Em data/actions/scripts crie um arquivo chamado removeskulls.lua com este conteúdo:



     
    Agora em data/actions/actions.xml adicione esta tag:
    <action itemid="9930" event="script" value="removeskulls.lua"/> Basta alterar itemid pelo item que você desejar.
  7. Bruno Minervino's post in (Resolvido){Ajuda} Step 3 Gesior was marked as the answer   
    Altera seu latestnews.php para este:



  8. Bruno Minervino's post in (Resolvido)Website esta co problemas no players online was marked as the answer   
    Recomendo Gesior ou Znote
    Acho melhor o Znote, pois o gesior não está sendo mais atualizado.
  9. Bruno Minervino's post in (Resolvido)Erro Gesior was marked as the answer   
    ScythePhantom, em relação a primeira dúvida, coloque o seu nome de usuário e senha que você configurou no momento de instalação do XAMPP, creio que deve ser root/sua senha.

    A segunda dúvida, são erros de javascripts/css, se você for pegar todos os servidores que utilizam gesior com layout global, a maioria tem esse problema, seja em todas as páginas ou apenas em algumas.

    E a última, há algo de errado com o css, poste o seu layout.php para que eu possa tentar ajudá-lo.
  10. Bruno Minervino's post in (Resolvido)Erro ao abrir o "Apache Admin" no Xampp was marked as the answer   
    @Claudio Marcelo,
    Isso já não é erro de WebSite,
    Abra um tópico na seção de Programação caso tenha problema.
    Como sua dúvida foi sanada, marque como melhor resposta para o tópico ficar como resolvido.
    Abraço!
  11. Bruno Minervino's post in (Resolvido)Ring was marked as the answer   
    @sxeinjected,
    Uma vez que você define que o ring vai ser um "scrip", você precisa definir que é uma "function" também, pois a função vai estar dentro do script.

    @ScythePhantom,
    Tente assim:
     

    <!-- Exp Ring --> <movevent type="Equip" itemid="76979" slot="ring" event="script" value="expring.lua" /> <movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="expring.lua" /> expring.lua:
    local config = { rate = 2.0, -- 2x de exp a mais itemEquip = 7697, -- item que voce vai equipar para ativar itemDeEquip = 7708 -- item que ele vai ser transformado apos estar equipado } function onEquip(cid, item, slot) doTransformItem(item.uid, config.itemDeEquip, 1) doPlayerSendTextMessage(cid, 22, 'Agora ganha 2x mais experiencia!') doPlayerSetExperienceRate(cid, getConfigValue("rateExperience") * config.rate) return true end function onDeEquip(cid, item, slot) doTransformItem(item.uid, config.itemEquip, 1) doPlayerSendTextMessage(cid, 22, 'Experiencia extra cancelada.') doPlayerSetExperienceRate(cid, 1.0) return true endUsando a mesma lógica do post acima, apenas alterando algumas coisas.
  12. Bruno Minervino's post in (Resolvido)Casa no rme nao funciona quando as protas estao viradas pra direita ou esquerda! was marked as the answer   
    Você precisa verificar no items.xml do seu servidor, se o ID's relacionados a estas portas estão configurados corretamente.
    Tome como base o que está funcionando e altere os atributos do que está com problema.
  13. Bruno Minervino's post in (Resolvido)Segurança (security) was marked as the answer   
    Amigo, ele não está encontrando o arquivo de tradução para o pt_br.
    Tente reinstalar e não alterar a língua, deixe em inglês mesmo.
    Abraço!
  14. Bruno Minervino's post in (Resolvido)Teleport !tp thais was marked as the answer   
    Pronto amigo, sem validação de string:
    local config = { ["thais"] = {x = 160, y = 54, z = 7}, -- [nome da cidade] = posição da cidade ["carlin"] = {x = 160, y = 54, z = 7} } function onSay(cid, words, param) local destino = config[param] if not destino then local str = "" for i, _ in pairs(config.types) do str = str .. ", ".. i end doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "Destinos disponiveis: ".. string.sub(str, 3, #str) ..".") return true elseif not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "Voce precisa estar em protection zone para usar este comando.") return true end doTeleportThing(cid, destino) doSendMagicEffect(getPlayerPosition(cid), 40) return true end
  15. Bruno Minervino's post in (Resolvido)Shop remover itens... was marked as the answer   
    Vá até o phpmyadmin e seleciona a tabela do shop e deleta manualmente.
  16. Bruno Minervino's post in (Resolvido)[Linux] Erro Gesior Acc was marked as the answer   
    Amigo, se você usa Linux, instale apenas o Apache e o MySQL,
    http://www.tibiaking.com/forum/topic/32635-compilando-otserver-linux-ubuntu-1310-64bits/

    Começa o tutorial a partir deste parágrafo:
    Att,
  17. Bruno Minervino's post in (Resolvido)Problema Again life por level was marked as the answer   
    Que isso amigo
    Clique no botão Melhor Resposta para marcar o tópico como Resolvido.
    Obrigado.
  18. Bruno Minervino's post in (Resolvido)Map Bug was marked as the answer   
    Amigo, vá na pasta items do seu ot e copia o arquivo items.otmb.
    Depois vá até a pasta do seu map editor, na versão utilizada e cole o items.otbm lá!
     
    Abraço.
  19. Bruno Minervino's post in (Resolvido)Erro page createaccount.php was marked as the answer   
    @erimyth,
     
    Tenta substituir seu createaccount.php por este:



  20. Bruno Minervino's post in (Resolvido)Erro na pasta Events no arquivo players (tfs 1.0) was marked as the answer   
    Vá em data/events/scripts e altere o seu player.lua para este:



  21. Bruno Minervino's post in (Resolvido)Error Mysql Player set LastLogin was marked as the answer   
    Agora este:
    ALTER TABLE `players` ADD `castDescription` varchar(255) NOT NULL
  22. Bruno Minervino's post in (Resolvido)Vender casa no OT was marked as the answer   
    Amigo, você já tinha outro tópico:
    http://www.tibiaking.com/forum/topic/52399-sistema-de-casa
     
    Não é abrindo vários tópicos que você vai ter resolução no seu problema.
     
    Vá em data/talkactions/scripts e crie um arquivo chamado leavehouse.lua com este conteúdo:

    function onSay(cid, words, param, channel) local house = getHouseFromPos(getCreaturePosition(cid)) if(not house) then doPlayerSendCancel(cid, "You are not inside a house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end local owner = getHouseInfo(house).owner if(owner ~= getPlayerGUID(cid) and (owner ~= getPlayerGuildId(cid) or getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER)) then doPlayerSendCancel(cid, "You are not the owner of this house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end setHouseOwner(house, 0) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You went out of your house.') return true end Agora em data/talkactions adicione a seguinte linha em talkactions.xml:
    <talkaction words="!sellhouse" filter="word-spaced" event="function" value="houseSell"/> <talkaction words="!leavehouse" event="script" value="leavehouse.lua"/> Pronto, agora basta o player usar !leavehouse dentro da house.
  23. Bruno Minervino's post in (Resolvido)comando !online help me was marked as the answer   
    @loreal,

    local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local strings, i, position, added = {""}, 1, 1, false for _, pid in ipairs(getPlayersOnline()) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end added = false if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) i = i + 1 added = true end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player" .. ((i - 1) > 1 and "s" or "") .. " Online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Total: " .. (i - 1) .. " player" .. ((i - 1) > 1 and "s" or "") .. " online.") return true end
  24. Bruno Minervino's post in (Resolvido)help comando !frags was marked as the answer   
    @loreal,
    Olha, peguei o que já existe e tentei deixar como você quer, como estou no trabalho não posso testar.
    Qualquer bug por favor poste uma print.
    local useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) function onSay(cid, words, param, channel) if(not 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), dayred = getConfigValue('fragsToRedSkull'), dayblack = getConfigValue('fragsToBlackSkull'), weekred = getConfigValue('fragsSecondToRedSkull'), weekblack = getConfigValue('fragsSecondToBlackSkull'), monthred = getConfigValue('fragsThirdToRedSkull'), monthblack = getConfigValue('fragsThirdToBlackSkull') } doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Day: " .. size.day .. " (red skull: " .. size.dayred .." / black skull: " .. size.dayblack .. ")") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Week: " .. size.week .. " (red skull: " .. size.weekred .. " / black skull: " .. size.weekblack .. ")") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Month: " .. size.month .. " (red skull: " .. size.monthred .. " / black skull: " .. size.monthblack .. ")") 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 return true end Abraço!
  25. Bruno Minervino's post in (Resolvido)[ERRO] Npc was marked as the answer   
    Segue:



Informação Importante

Confirmação de Termo