Ir para conteúdo
Banner com Efeitos

Navegante

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Navegante deu reputação a FlavioHulk em (Resolvido)check battle   
    local config = { lvl_min = 60 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.uid ~= 16049 then return false end if player:getStorageValue(16049) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você já pegou o pertence!") return true end if player:getLevel() < config.lvl_min then player:sendCancelMessage("Você não tem experiencia suficiente para pegar este item. Voltei quando estiver no mínimo nível ".. lvl_min ..".") return true end if player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) or player:isPzLocked() then player:sendCancelMessage('Você precisa estar sem battle.') return true end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você achou uma piece of archer armor!") player:addItem(12439, 1) item:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:setStorageValue(16049, 1) return true end  
  2. Gostei
    Navegante deu reputação a KotZletY em (Resolvido)power limiter   
    @Navegante acima de:
    function Player:onGainSkillTries(skill, tries) adicione:
    local skills_limit = { [SKILL_FIST] = 100, [SKILL_CLUB] = 100, [SKILL_SWORD] = 100, [SKILL_AXE] = 100, [SKILL_DISTANCE] = 100, [SKILL_SHIELD] = 100, [SKILL_FISHING] = 100, [SKILL_MAGLEVEL] = 100 } abaixo da function citada anteriormente, adicione:
     
  3. Obrigado
    Navegante deu reputação a Agaka em (Resolvido)power limiter   
    @NaveganteTenta com isso. Vá data/events/scripts/player.lua substitua onGainSkillTries por:
     
    skillStages = {} skillStages[SKILL_FIST] = {{0,8},{60,5},{80,3},{100,2}} skillStages[SKILL_CLUB] = {{0,8},{60,5},{80,2},{100,1}} skillStages[SKILL_SWORD] = {{0,8},{60,5},{80,2},{100,1}} skillStages[SKILL_AXE] = {{0,8},{60,5},{80,2},{100,1}} skillStages[SKILL_DISTANCE] = {{0,8},{60,5},{80,2},{100,1}} skillStages[SKILL_SHIELD] = {{0,9},{60,8},{80,7},{100,6},{110,3}} skillStages[SKILL_FISHING] = {{0,5},{60,4},{80,3},{100,2},{110,1}} skillStages[SKILL_MAGLEVEL] = {{0,10},{6,5},{15,7},{80,5},{90,2},{99,1}}     function Player:onGainSkillTries(skill, tries)     if APPLY_SKILL_MULTIPLIER == false then         return tries     end     local skillName local skillRate     if(skill==0)then         skillName=SKILL_FIST     elseif(skill==1)then         skillName=SKILL_CLUB     elseif(skill==2)then         skillName=SKILL_SWORD     elseif(skill==3)then         skillName=SKILL_AXE     elseif(skill==4)then         skillName=SKILL_DISTANCE     elseif(skill==5)then         skillName=SKILL_SHIELD     elseif(skill==6)then         skillName=FISHING     end      if(skillStages[skill] ~= nil) then         skillRate = 1         for i, skillRateInfo in pairs(skillStages[skill]) do             if(getPlayerSkill(self, skillName) >= skillRateInfo[1]) then                 skillRate = skillRateInfo[2]             else                 break             end         end     end         if skill == SKILL_MAGLEVEL then         return tries * configManager.getNumber(configKeys.RATE_MAGIC) * skillRate     end     return tries * configManager.getNumber(configKeys.RATE_SKILL) * skillRate end
  4. Gostei
    Navegante deu reputação a Dwarfer em (Resolvido)Bau inteligente   
    @Navegante
     
    Em actions/scripts crie um arquivo.lua e cole isto dentro:
     
     
    No actions.xml, coloque a tag como o exemplo abaixo, inserindo um actionid no lugar do XXXX e o mesmo valor para o actionid do baú.
    <action actionid="XXXX" script="NOMEDOSEUARQUIVO.lua"/>  
  5. Gostei
    Navegante recebeu reputação de Dev PHP em (Resolvido)Premium   
    Quero agradecer ao Vodkart, ricardo codenome e tataboy67 pela ajuda no tópico, muito obrigado!

    ate onde eu testei o sistema funcionou perfeitamente, testei primeiro com 2 personagens na mesma conta, depois testei desligando a distro sem salvar e por fim testei salvando a distro e desligando. Todos os métodos testados foram bem-sucedido!

     
  6. Obrigado
    Navegante recebeu reputação de tataboy67 em (Resolvido)Premium   
    Quero agradecer ao Vodkart, ricardo codenome e tataboy67 pela ajuda no tópico, muito obrigado!

    ate onde eu testei o sistema funcionou perfeitamente, testei primeiro com 2 personagens na mesma conta, depois testei desligando a distro sem salvar e por fim testei salvando a distro e desligando. Todos os métodos testados foram bem-sucedido!

     
  7. Gostei
    Navegante recebeu reputação de Vodkart em (Resolvido)Premium   
    Quero agradecer ao Vodkart, ricardo codenome e tataboy67 pela ajuda no tópico, muito obrigado!

    ate onde eu testei o sistema funcionou perfeitamente, testei primeiro com 2 personagens na mesma conta, depois testei desligando a distro sem salvar e por fim testei salvando a distro e desligando. Todos os métodos testados foram bem-sucedido!

     
  8. Gostei
    Navegante deu reputação a Vodkart em (Resolvido)Premium   
    executa no seu banco de dados:
     
     
    ALTER TABLE `accounts` ADD `premiumgift` INT NOT NULL DEFAULT '0'  
    usa o script assim:
     
    function getPremiumGift(player) local query = db.storeQuery("SELECT `premiumgift` FROM `accounts` WHERE `id` = "..player:getAccountId()) return result.getDataInt(query, "premiumgift") > 0 and true or false end local config = {level = 30, days = 7} function onAdvance(player, oldlevel, newlevel)     if player:getLevel() >= config.level and not getPremiumGift(player) then         player:addPremiumDays(config.days)         player:sendTextMessage(MESSAGE_INFO_DESCR, "Você ganhou "..config.days.." dias de premium por alcançar level "..config.level.." em pelo menos um char de sua account. Você não irá ganhar de novo caso upe level "..config.level.." em outro char para pegar sua premium basta relogar.")         db:query("UPDATE `accounts` SET `premiumgift` = 1 WHERE `id` = "..player:getAccountId())     end     return true end  
    caso não der certo troque essa linha:
     
    db:query("UPDATE `accounts` SET `premiumgift` = 1 WHERE `id` = "..player:getAccountId())  
    por
     
    db.query("UPDATE `accounts` SET `premiumgift` = 1 WHERE `id` = "..player:getAccountId())  
    ou
     
    db.asyncQuery("UPDATE `accounts` SET `premiumgift` = 1 WHERE `id` = "..player:getAccountId())  
  9. Gostei
    Navegante deu reputação a Storm em (Resolvido)monstros que brilham   
    @Navegante Utilize flags:
    <flag lightlevel="0"/> -- Intensidade da luz da criatura (5/10) <flag lightcolor="0"/> -- Cor da luz da criatura  
  10. Gostei
    Navegante deu reputação a tataboy67 em (Resolvido)advance   
    Opa rapaz beleza? Acabei de montar aqui pra você mas eu não sei qual o nome do parâmetro de mensagem amarela   Então resolvi fazer só com as skills ok?
    local config = { msg_levelup_level = true, msg_levelup_magic = true, msg_levelup_first = true, msg_levelup_club = true, msg_levelup_sword = true, msg_levelup_axe = true, heal = true, save = true, effect = true } function onAdvance(player, skill, oldLevel, newLevel) if skill ~= SKILL_LEVEL and newLevel <= oldLevel and config.msg_levelup_level then if config.effect then player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) player:say('LEVEL UP!', TALKTYPE_MONSTER_SAY) end if config.heal then player:addHealth(player:getMaxHealth()) end if config.save then player:save() end elseif skill ~= SKILL_MAGLEVEL and newLevel <= oldLevel and config.msg_levelup_magic then if config.effect then player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) player:say('+1 Magic!', TALKTYPE_MONSTER_SAY) end if config.heal then player:addHealth(player:getMaxHealth()) end if config.save then player:save() end elseif skill ~= SKILL_FIST and newLevel <= oldLevel and config.msg_levelup_first then if config.effect then player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) player:say('+1 Fist!', TALKTYPE_MONSTER_SAY) end if config.heal then player:addHealth(player:getMaxHealth()) end if config.save then player:save() end elseif skill ~= SKILL_CLUB and newLevel <= oldLevel and config.msg_levelup_club then if config.effect then player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) player:say('+1 Club!', TALKTYPE_MONSTER_SAY) end if config.heal then player:addHealth(player:getMaxHealth()) end if config.save then player:save() end elseif skill ~= SKILL_SWORD and newLevel <= oldLevel and config.msg_levelup_sword then if config.effect then player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) player:say('+1 Sword!', TALKTYPE_MONSTER_SAY) end if config.heal then player:addHealth(player:getMaxHealth()) end if config.save then player:save() end elseif skill ~= SKILL_AXE and newLevel <= oldLevel and config.msg_levelup_axe then if config.effect then player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) player:say('+1 Axe!', TALKTYPE_MONSTER_SAY) end if config.heal then player:addHealth(player:getMaxHealth()) end if config.save then player:save() end end return true end
    Bom a configuração ali eu adicionei 6, são as 5 skills e mais o levelup normal.
    Acho que deu pra entender kk
    OBs: Não testei, por favor faça o teste !
  11. Gostei
    Navegante recebeu reputação de KotZletY em (Resolvido)advance   
    fala aê mano tudo tranquilo? Eu fiz o teste e aproveitei para completar as outras skills seguindo o formato que você fez.


     


    O único problema é que qualquer skills que eu upar aparece a mensagem de todas 

    exemplo:

    upei mais 1 de magic level  ai vai fazer o efeito e na hora de aparecer o texto vai aparecer todos os texto "+1 sword", "+1 axe", "+1 magic", etc...

    um outro probleminha é essa parte>>>  player:say('xxxxxxxx', TALKTYPE_MONSTER_SAY) <<<<<< graças a essa função o texto fica saindo igual aquela cor laranja quando você usa um spells.
    Eu queria colocar pro texto sair com essa cor aqui >>>> TEXTCOLOR_LIGHTBLUE <<<<<< e somente o do "level up" sair essa cor >>>>> TEXTCOLOR_YELLOW <<<<<<
  12. Haha
    Navegante recebeu reputação de KotZletY em (Resolvido)effect e shoteffect nas wand   
    obrigado moderador!

    realmente era algo bobo, mas pra alguém sem experiencia como eu se tornou algo problemático!
  13. Gostei
    Navegante deu reputação a KotZletY em (Resolvido)effect e shoteffect nas wand   
    @Navegante verifique o script após copia ele, algumas vezes acaba vindo com caracteres indesejados:
     

Informação Importante

Confirmação de Termo