• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Weapons] Elemental Spear o arrow

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1default [Weapons] Elemental Spear o arrow el Dom Ago 18, 2019 10:45 pm

    Sotomallor

    Sotomallor
    Nuevo Miembro
    Nuevo Miembro
    Descripcion escribió:Buenas noches a todos amigos, solicitaba nuevamente de su apoyo si me pudieran colaborar para mi servidor un script que requiero, bueno consiste en que quisiera una spear o ya sea un arrow que sea de multielementos al ejecutar un comando, es decir si yo ejecuto !spear holy cambia el elemento al holy logico, o death etc. algo similar al multielemental wand, solo que para paladin espero puedan apoyarme muchas gracias y buenas noches! version 8.60 tfs 0.4_dev
    Imagen Explicativa escribió:Imagen Explicativa: [Tienes que estar registrado y conectado para ver este vínculo]
    Version del Scripts: TFs 0.4.0

    Ver perfil de usuario

    2default Re: [Weapons] Elemental Spear o arrow el Dom Ago 18, 2019 11:36 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    a ver intenta con este

    Código:

    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="Weapon multi-elements" version="1.0" author="Leyendario." contact="otserv.es" enabled="yes">
    <config name="configuracion"><![CDATA[
     
      config = {
          storage = 6999,
          dinero = 0 * 1000 -- 1cc, pon 0 si no quieres que cobre.
          }
        par = {
          ["physic"] = {1, CONST_ME_HITAREA},
          ["energy"] = {2, CONST_ME_ENERGYHIT},
          ["earth"] = {3, CONST_ME_HITBYPOISON},
          ["fire"] = {4, CONST_ME_HITBYFIRE},
          ["ice"] = {5, CONST_ME_ICEATTACK},
          ["holy"] = {6, CONST_ME_HOLYDAMAGE},
          ["death"] = {7, CONST_ME_MORTAREA}
          }
     
    ]]></config>
      <talkaction words="!weapon" event="script"><![CDATA[
      domodlib('configuracion')
      function onSay(cid, words, param, channel)
          local p = par[param]
          if p then
            if getPlayerMoney(cid) < config.dinero then
                return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "need " ..config.dinero.. " gold coins.")
            end 
            doPlayerRemoveMoney(cid, config.dinero)
            setPlayerStorageValue(cid, config.storage, p[1])
            doSendMagicEffect(getCreaturePosition(cid), p[2])
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you are using  ".. param ..".")
          else
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "the commands are, physic, energy, earth, fire, ice, death and holy.")
          end
          return 0
      end
      ]]></talkaction>
      <item id="7450" level="150" mana="0" event="script"><![CDATA[
      domodlib('configuration')
      local physic = createCombatObject() -- 1
      setCombatParam(physic, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
      setCombatParam(physic, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
      setCombatParam(physic, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDCLUB)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
      local energy = createCombatObject() -- 2
      setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
      setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
      local earth = createCombatObject() -- 3
      setCombatParam(earth, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      setCombatParam(earth, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
      setCombatParam(earth, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
      local fire = createCombatObject() -- 4
      setCombatParam(fire, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
      setCombatParam(fire, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
      setCombatParam(fire, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLFIRE)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
      local ice = createCombatObject()  -- 5
      setCombatParam(ice, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      setCombatParam(ice, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
      setCombatParam(ice, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
      local holy = createCombatObject()  -- 6
      setCombatParam(holy, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      setCombatParam(holy, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      setCombatParam(holy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
      local death = createCombatObject()  -- 7
      setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
      setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
      setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
      function onGetFormulaValues(cid, level, skill, attack, factor)
       local skillTotal, levelTotal = skill + attack, level / 5
       return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
    end
      setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
     
    function onUseWeapon(cid, var)
      local valor = getPlayerStorageValue(cid, config.storage)
      doCombat(cid, valor == 2 and energy or valor == 3 and earth or valor == 4 and fire or valor == 5 and ice or valor == 6 and holy or valor == 7 and death or physic, var)
      return true
    end
     
      ]]>
      <vocation id="4"/>
       </item>
       <item id="7450" article="a" name="Elemental Hammer">
          <attribute key="description" value="The leyend tells that the blacksmith who forged it made a pact whith the gods, so his hammer could control every existant element." />
          <attribute key="weight" value="500" />
          <attribute key="defense" value="37" />
          <attribute key="attack" value="55" />
          <attribute key="weaponType" value="club" />
      </item>
    </mod>



    [Weapons] Elemental Spear o arrow YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

    Temas Recomendados×+

       

      BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).