Ir para conteúdo

shumagora

Campones
  • Total de itens

    89
  • Registro em

  • Última visita

Posts postados por shumagora

  1. Olá Camaradagem do XTibia.

    Venho disponibilizar um sistema muito útil para servidores fiéis ao Tibia(CipSoft).

    Ele consiste em não atacar membros da party, ótimo para quest, pvp e hunt's.

    Não posso afirmar se funcionará em todos os servidores, testado somente em 10.1.

     

    config.lua

    noDamageToPartyMembers = true

    data/creaturescripts/creaturescripts.xml

    <event type="combat" name="partyAndGuildProtection" event="script" value="partyAndGuildProtection.lua"/>

    data/creaturescripts/scripts/partyAndGuildProtection.lua

    function onCombat(cid, target)
    if(isInParty(target)) then
    if(getConfigValue("noDamageToPartyMembers")) then
    if(isInParty(cid)) then
    return false
    end
    end
    end
    return true
    end
    
    data/creaturescripts/scripts/login.lua
    registerCreatureEvent(cid, "partyAndGuildProtection")
    Créditos ao Global 10.1 por conter partyAndGuildProtection.lua, porém contia bugs e não atacava nem player.
    Créditos a mim por fixar esse problema e disponibilizar.
    partyAndGuildProtection.lua bugado do servidor.

    function onCombat(cid, target)
    if(isPlayer(cid) and isPlayer(target)) then
    if(getConfigValue("noDamageToGuildMates")) then
    if(getPlayerGuildId(cid) == getPlayerGuildId(target)) then
    return false
    end
    end
    if(getConfigValue("noDamageToPartyMembers")) then
    if(getPlayerParty(cid) == getPlayerParty(target)) then
    return false
    end
    end
    end
    return true
    end

  2. local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    
    function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)        end
    function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)        end
    function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    function onThink()                npcHandler:onThink()                end
    
    -- XVX FORGER START --
    
    function amulet(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
           if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,8266,1)
           end
           else
               npcHandler:say('You don\'t have these items!', cid)
       end
    end
    
    function royal(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,2487) >= 1 then
           if doPlayerRemoveItem(cid,2487,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,5887,1)
           end
           else
               npcHandler:say('You don\'t have this item!', cid)
       end
    end 
    
    function crude(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,2393) >= 1 then
           if doPlayerRemoveItem(cid,2393,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,5892,1)
           end
           else
               npcHandler:say('You don\'t have this item!', cid)
       end
    end
    
    function draconian(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,2516) >= 1 then
           if doPlayerRemoveItem(cid,2516,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,5889,1)
           end
           else
               npcHandler:say('You don\'t have this item!', cid)
      end   
    end
    
    function hell(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,2462) >= 1 then
           if doPlayerRemoveItem(cid,2462,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,5888,1)
           end
           else
               npcHandler:say('You don\'t have this item!', cid)
      end   
    end
    
    function infernal(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,5944) >= 1 then
           if doPlayerRemoveItem(cid,5944,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,6529,3)
           end
           else
               npcHandler:say('You don\'t have this item!', cid)
      end   
    end
    
    function melt(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
           return false
       end
           if getPlayerItemCount(cid,9971) >= 1 then
           if doPlayerRemoveItem(cid,9971,1) then
               npcHandler:say('Here is your item!', cid)
               doPlayerAddItem(cid,13941,1)
           end
           else
               npcHandler:say('You don\'t have this item!', cid)
      end   
    end
    
    -- XVX FORGER END --
    
    keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can forge {piece of royal steel}, {piece of draconian steel}, {piece of hell steel}, {huge chunk of crude iron}, {infernal bolt} and {amulet}."})
    
    local node1 = keywordHandler:addKeyword({'amulet'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Hum Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no??'})
       node1:addChildKeyword({'yes'}, amulet, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
    
    local node2 = keywordHandler:addKeyword({'royal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Crown Armor for a Piece of Royal Steel?'})
       node2:addChildKeyword({'yes'}, royal, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
    
    local node3 = keywordHandler:addKeyword({'crude'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Giant Sword for a Huge Chunk of Crude Iron?'})
       node3:addChildKeyword({'yes'}, crude, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
    
    local node4 = keywordHandler:addKeyword({'draconian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield for a Piece of Draconian Steel?'})
       node4:addChildKeyword({'yes'}, draconian, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
    
    local node5 = keywordHandler:addKeyword({'hell'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Devil Helmet for a Piece of Hell Steel?'})
       node5:addChildKeyword({'yes'}, hell, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 
    
    local node6 = keywordHandler:addKeyword({'infernal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Soul Orb for 3 Infernal Bolts?'})
       node6:addChildKeyword({'yes'}, infernal, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 
    
    local node7 = keywordHandler:addKeyword({'melt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Gold Ingot for a Cup of Molten Gold?'})
       node7:addChildKeyword({'yes'}, melt, {npcHandler = npcHandler, onlyFocus = true, reset = true})
       node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 
    
    
    npcHandler:addModule(FocusModule:new())

  3. magia do paladin spell.xml

    <instant name="Sharpshooter" words="utito tempo san" lvl="60" mana="450" prem="0" aggressive="0" selftarget="1" exhaustion="2000" groups="2,10000;3,10000" icon="135" needlearn="0" event="script" value="support/sharpshooter.lua">
    <vocation id="3"/>
    <vocation id="7"/>
    </instant>

  4. ficou bom, mas atrapalha. pq se deixar dessa forma junto ao personagem, você não consegue atacar monster, pessoas, abrir loot se estiverem "embaixo" do bar. tinha que ter uma função que isso se torne "invisível" ao mouse.

    um exemplo vc clicasse hp,mp,ou xp, ele ja ficaria fixo em volta do char. acho q isso tornaria invisível aos clicks do mouse.

    tem um bug, se sair do jogo para a tela principal, o bar continua la com a vida do personagem.

     

     

    uma outra ideia, seria fazer esse bar igual flash do tibia, circular em volta do char. ficaria show fi.

  5. não é open source? :/

    Nunca foi =/

     

    eu não sei onde e que colocar a quele codigo que vc postou onde e que eu colo ele ?

    mano se de me encina tanbem como e que eu posso deminuir o xp que os bichos dão

    É para remover aquilo no arquivo que vc colocou...

    Pra diminui o xp é só abaixar a xp ._.

     

    só diminuir xp?

    como que faz isso?

    acho que a pergunta foi relacionada a isso.

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...