Ir para conteúdo

luanluciano93

Héroi
  • Registro em

  • Última visita

Solutions

  1. luanluciano93's post in (Resolvido)Database was marked as the answer   
    CREATE TABLE IF NOT EXISTS `z_ots_comunication` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=230 ;  
  2. luanluciano93's post in SpellBook Dando Debug - Muita Magia no OT Alguem Pode Simplifica Pra Mim Por Favor was marked as the answer   
    tente aumentar esse valor
     
    e este
  3. luanluciano93's post in (Resolvido)Sprites e Versões de Clientes Diferentes 8.60 - 12x was marked as the answer   
    como sabe que é 12x?

    Basta add as novas sprites ao cliente com obj builder .. 
  4. luanluciano93's post in (Resolvido)Ot Server no VPS não abre was marked as the answer   
    Normalmente isso acontece quando os dados para conexão com o servidor mysql estão incorretos no config.lua ...
  5. luanluciano93's post in procuro DataBase Clean, só com o necessário was marked as the answer   
    Aqui está uma database limpa do otx2 direto do github do mattyx14: https://github.com/mattyx14/otxserver/blob/otxserv2/schemas/mysql.sql
     
    Link do branch do otx2: https://github.com/mattyx14/otxserver/tree/otxserv2

    Tem também esse tópico de um script que faz a limpeza de coisas desnecessárias conforme o tempo .... você pode adaptar a a sua OTX se quiser: https://tibiaking.com/forums/topic/99960-clean-database-by-luanluciano93/

     
  6. luanluciano93's post in Exp bônus was marked as the answer   
    a variável BaseExp leva o valor da porcentagem da experiência do jogador .... depois do último END ali da foto você poderia colocar uma condição:
     
    SE JOGADOR PREMIUM ENTÃO     BASE EXP = BASE EXP * 0,10 FIM
    Desta forma, você daria 10% de experiência para o jogador premium .... 

    a função para verificar se o jogador é premium é player:isPremium()
  7. luanluciano93's post in adicionar mais horarios was marked as the answer   
    config_boosted = { ["11:30:00"] = { -- Horario de cada dia que irá ocorrer a troca dos monstros pos_monster = {x=992,y=997,z=7, stackpos = 253}, -- a posição aonde ficara o monstro informando a quantidade de exp e loot time_effects = 2 -- tempo em segundos que ficará saindo os efeitos }, ["12:30:00"] = { -- Horario de cada dia que irá ocorrer a troca dos monstros pos_monster = {x=992,y=997,z=7, stackpos = 253}, -- a posição aonde ficara o monstro informando a quantidade de exp e loot time_effects = 2 -- tempo em segundos que ficará saindo os efeitos } }  
  8. luanluciano93's post in Eficácia de scripts globalEvents ou CreatureScripts was marked as the answer   
    Algo assim 
    function ResetSystem:applyBonuses(pid) local bonus = self:getInfo(pid) if (bonus and bonus.damage_percent) then local storageTime = getPlayerStorageValue(pid, 1111) - os.time() if storageTime >= 1 then --se a storage da quest for mais ou igual a 1 bonusquest = getPlayerStorageValue(pid, 888251) -- recebe conforme a quantidade de vezes que fez a quest else bonusquest = 0; --se não seta pra 0 end setPlayerDamageMultiplier(pid, 1.0 + ((bonus.damage_percent+bonusquest) / 100.0)) else setPlayerDamageMultiplier(pid, 1.0) end end  
  9. luanluciano93's post in (Resolvido)[TFS 1.3] [AJUDA] Sumonar NPC por tempo was marked as the answer   
    ótimo, editei aqui ... 
    function onUse(player, item, fromPosition, target, toPosition, isHotkey) local storage = "2252" local playerPos = player:getPosition() if player:getStorageValue(storage) < os.time() then local position = Position(playerPos.x, playerPos.y + 1, playerPos.z) local npcName = "Mad" local npc = Game.createNpc(npcName, position) function removeNpc(creature) local target = Npc(npc) target:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:setStorageValue(storage, 0) target:remove() end if npc then npc:setMasterPos(position) position:sendMagicEffect(CONST_ME_MAGIC_RED) player:say("can you help me?", TALKTYPE_MONSTER_SAY) player:setStorageValue(storage, os.time() + 1*60) addEvent(removeNpc, 1*60*1000, npcName) return true else player:sendCancelMessage("There is not enough room.") playerPos:sendMagicEffect(CONST_ME_POFF) end else player:sendCancelMessage("You need to wait a minute.") playerPos:sendMagicEffect(CONST_ME_POFF) end end  
  10. luanluciano93's post in (Resolvido)Action Script outfits was marked as the answer   
    Você tem que coloca-lo na pasta script pq é um revscript.
  11. luanluciano93's post in (Resolvido)[Pedido] Reward Level TFS 1.3 was marked as the answer   
  12. luanluciano93's post in (Resolvido)[SYNTAX} Error alguém me manja? was marked as the answer   
    Deixa o caminho do ot com a ultima barra invertida C:\Users\Client4\Desktop\Baiak 8.60\home\otserver/
  13. luanluciano93's post in (Resolvido)[AJUDA] Erro ao clicar em objetos: "You are too far to complete this action". was marked as the answer   
    Faça isso para testar se o erro é na sua source.
  14. luanluciano93's post in (Resolvido)Códigos da raiz do Tibia & Derivados pls was marked as the answer   
    Atualmente, existe um repositório no github do projeto FORFGOTTENSERVER, vulgo TFS ... ele está na versão 1.3 e tem atualizações quase que diárias .. e quiser acompanhar: https://github.com/otland/forgottenserver

    Aqui segue o wiki deles com as funções atuais do projeto: https://github.com/otland/forgottenserver/wiki/Script-Interface
  15. luanluciano93's post in (Resolvido)Como abrir site was marked as the answer   
    Qual o sistema operacional do seu VPS? tenta ver algum tutorial na seção de infraestrutura https://tibiaking.com/forums/forum/123-tutoriais-infraestrutura-proteção/
  16. luanluciano93's post in (Resolvido)[TFS1.2] Summonar criatura em action was marked as the answer   
    function onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.itemid == 35082 then local position = player:getPosition() local summon = Game.createMonster("Fire Elemental", position, true) if not summon then player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) position:sendMagicEffect(CONST_ME_POFF) return false end player:say('The branch increased the fire.', TALKTYPE_MONSTER_SAY) item:remove() end return true end  
  17. luanluciano93's post in (Resolvido)[TFS1.2] Precisa de certa looktype para acessar was marked as the answer   
    local lookType = 567 function onStepIn(creature, item, position, fromPosition) if not creature:isPlayer() then return false end local playerOutfit = creature:getOutfit() if playerOutfit.lookType ~= lookType then creature:sendTextMessage(MESSAGE_INFO_DESCR, "Você não esta com o outfit correto.") creature:teleportTo(fromPosition, true) return false end return true end  
  18. luanluciano93's post in (Resolvido)[TFS1.2] Outfit Movement was marked as the answer   
    local config = { outfit = {lookType = 567, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}, -- Outfit time = 10 -- Tempo em segundos } function onStepIn(creature, item, position, fromPosition) if not creature:isPlayer() then return false end local condition = Condition(CONDITION_OUTFIT) condition:setTicks(config.time) condition:setOutfit(config.outfit) creature:addCondition(condition) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) return true end  
  19. luanluciano93's post in (Resolvido)[TFS1.2] Bug script !bless was marked as the answer   
    function onSay(cid) local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.5 if player:getBlessings() == 5 then player:sendCancelMessage("You already have been blessed!", cid) elseif player:removeMoneyNpc(totalBlessPrice) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!") for b = 1, 8 do if not player:hasBlessing(b) then player:addBlessing(b, 1) end end player:setStorageValue(999563, 1) player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) else player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid) end return false end  
  20. luanluciano93's post in (Resolvido)[Action] Help Problem was marked as the answer   
    @underewarr estranho, pode ser ... 
  21. luanluciano93's post in (Resolvido)Alavanca Leader Da Guild was marked as the answer   
    local config = { positionStone = Position(947, 1102, 9), stoneId = 1355, } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getGuildLevel() ~= 3 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[Castle] Somente o Leader! ") return true end local position = config.positionStone if not position then return true end local tile = position:getTile() if tile then local stone = tile:getItemById(config.stoneId) if stone then stone:remove() else Game.createItem(config.stoneId, 1, position) end end item:transform(item.itemid == 1945 and 1946 or 1945) return true end  
  22. luanluciano93's post in (Resolvido)Memorial was marked as the answer   
    local storage = 9999 function onUse(cid, item, frompos, item2, topos) local result = db.getResult("SELECT `player_id` FROM `player_storage` WHERE `key` = " .. storage .. " AND `value` = 1;") if(result:getID() ~= -1) then local message = "Em memória de:\n\n" repeat local playerId = result:getDataInt("player_id") local database = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(playerId) .. ";") if(database:getID() ~= -1) then local playerName = database:getDataString("name") message = ""..message.."".. playerName ..".\n" database:free() end until not(result:next()) result:free() doPlayerPopupFYI(cid, message) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não existe nenhum nome gravado.") end return true end  
  23. luanluciano93's post in (Resolvido)Nivel alto não atacar nivel baixo was marked as the answer   
    -- <event type="attack" name="onAttack" script="onAttack.lua"/> local level = 450 function onAttack(cid, target) if not isPlayer(cid) or not isPlayer(target) then return true end if getPlayerLevel(cid) >= level and getPlayerLevel(target) < level then return false elseif getPlayerLevel(target) >= level and getPlayerLevel(cid) < level then return false end return true end  
  24. luanluciano93's post in (Resolvido)Adaptar código was marked as the answer   
    Tudo como o @Lyu comentou ... 
    local config = { magic_effect = 15, -- magic effect you want to send when critical hit lands damage_multiplier = 10 -- default damage * 10 = critical damage } function onStatsChange(cid, attacker, type, combat, value) if attacker and value > 0 then if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) then local skillSword = getPlayerSkillLevel(attacker, SKILL_SWORD) local chance = (skillSword * 0.1) if math.random(100) <= chance then value = math.floor(value * config.damage_multiplier) doSendMagicEffect(getPlayerPosition(attacker), config.magic_effect) doTargetCombatHealth(attacker, cid, combat, -value, -value, CONST_ME_NONE) end end end return true end  
  25. luanluciano93's post in (Resolvido)Check de Outfit em spell was marked as the answer   
    local outfit = 267 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatParam(combat, COMBAT_PARAM_EFFECT, 64) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) function onGetFormulaValues(cid, level, skill, attack, factor) local skillTotal, levelTotal = skill + attack, level / 10 return -(skillTotal / 10 + levelTotal), -(skillTotal + levelTotal) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getCreatureOutfit(cid).lookType == outfit then return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não tem o outfit x.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end  

Informação Importante

Confirmação de Termo