• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    Error en la consola de una mods Elemental Wand

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

    1Resuelto Error en la consola de una mods Elemental Wand el Miér Mayo 17, 2017 7:49 pm

    carataki

    avatar
    Nuevo Miembro
    Nuevo Miembro
    Mi Problema:
    Buenas Tardes amigos de TibiaFace espero que estén bien mi problema es el siguiente agregue una Mods de un Sr. de otro foros

    Este es el Origianl que encontré



    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 = {
          min1 = 0.2, -- multiplicador de tu ml
          min2 = 100, -- minimo de daño
          max1 = 1.2, -- multiplicador de tu lvl
          max2 = 300, -- maximo de daño
          storage = 6999,
          dinero = 10 * 1000 -- 1cc, pon 0 si no quieres que cobre.
          }
        par = {
          ["fisico"] = {1, CONST_ME_HITAREA},
          ["energy"] = {2, CONST_ME_ENERGYHIT},
          ["tierra"] = {3, CONST_ME_HITBYPOISON},
          ["fuego"] = {4, CONST_ME_HITBYFIRE},
          ["hielo"] = {5, CONST_ME_ICEATTACK},
          ["holy"] = {6, CONST_ME_HOLYDAMAGE},
          ["death"] = {7, CONST_ME_MORTAREA}
          }
     
    ]]></config>
       <talkaction words="!arma" 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, "necesitas " ..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, "Ahora usas daño ".. param ..".")
          else
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, tierra, fuego, hielo, holy y death.")
          end
          return 0
       end
       ]]></talkaction>
       <wand id="2190" level="1" mana="2" event="script"><![CDATA[
       domodlib('configuracion')
       local fisico = createCombatObject() -- 1
       setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
       setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
       setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
       setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       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)
       setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local tierra = createCombatObject() -- 3
       setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
       setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
       setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
       setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local fuego = createCombatObject() -- 4
       setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
       setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
       setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
       setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local hielo = createCombatObject()  -- 5
       setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
       setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
       setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
       setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       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)
       setCombatFormula(holy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       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)
       setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
    function onUseWeapon(cid, var)
       local valor = getPlayerStorageValue(cid, config.storage)
       doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
       return true
    end
     
       ]]>
       <vocation id="2"/>
       </wand>
       <item id="2190" article="a" name="Multi-Elements Wand" override="yes">
          <attribute key="description" value="Esta es un arma multi-elements." />
          <attribute key="weight" value="1900" />
          <attribute key="weaponType" value="wand" />
          <attribute key="range" value="3" />
       </item>
    </mod>

    Este fue el error que me salio en Consola

    Código:
    [17/5/2017 19:39:8] >>> Loading elementalwand.xml ...
    [17/5/2017 19:39:8] [Error - Test Interface]
    [17/5/2017 19:39:8] domodlib('configuracion')
    [17/5/2017 19:39:8]    function onSay(cid, words, param, channel)
    [17/5/2017 19:39:8]       local p = par[param]
    [17/5/2017 19:39:8]       if p then
    [17/5/2017 19:39:8]          if getPlayerMoney(cid) < config.dinero then
    [17/5/2017 19:39:8]             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "necesitas " ..config.dinero.. " gold coins.")
    [17/5/2017 19:39:8]          end  
    [17/5/2017 19:39:8]          doPlayerRemoveMoney(cid, config.dinero)
    [17/5/2017 19:39:8]          setPlayerStorageValue(cid, config.storage, p[1])
    [17/5/2017 19:39:8]          doSendMagicEffect(getCreaturePosition(cid), p[2])
    [17/5/2017 19:39:8]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ahora usas daño ".. param ..".")
    [17/5/2017 19:39:8]       else
    [17/5/2017 19:39:8]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
    [17/5/2017 19:39:8]       end
    [17/5/2017 19:39:8]       return 0
    [17/5/2017 19:39:8]    end

    [17/5/2017 19:39:8] Description:
    [17/5/2017 19:39:8] [string "..."]:8: '}' expected (to close '{' at line 2) near '0'

    [17/5/2017 19:39:8] [Error - TalkAction Interface]
    [17/5/2017 19:39:8] domodlib('configuracion')
    [17/5/2017 19:39:8]    function onSay(cid, words, param, channel)
    [17/5/2017 19:39:8]       local p = par[param]
    [17/5/2017 19:39:8]       if p then
    [17/5/2017 19:39:8]          if getPlayerMoney(cid) < config.dinero then
    [17/5/2017 19:39:8]             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "necesitas " ..config.dinero.. " gold coins.")
    [17/5/2017 19:39:8]          end  
    [17/5/2017 19:39:8]          doPlayerRemoveMoney(cid, config.dinero)
    [17/5/2017 19:39:8]          setPlayerStorageValue(cid, config.storage, p[1])
    [17/5/2017 19:39:8]          doSendMagicEffect(getCreaturePosition(cid), p[2])
    [17/5/2017 19:39:8]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ahora usas daño ".. param ..".")
    [17/5/2017 19:39:8]       else
    [17/5/2017 19:39:8]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
    [17/5/2017 19:39:8]       end
    [17/5/2017 19:39:8]       return 0
    [17/5/2017 19:39:8]    end

    [17/5/2017 19:39:8] Description:
    [17/5/2017 19:39:8] [string "..."]:8: '}' expected (to close '{' at line 2) near '0'

    [17/5/2017 19:39:8] [Error - Test Interface]
    [17/5/2017 19:39:8] domodlib('configuracion')
    [17/5/2017 19:39:8]    local fisico = createCombatObject() -- 1
    [17/5/2017 19:39:8]    setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    [17/5/2017 19:39:8]    setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    [17/5/2017 19:39:8]    setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
    [17/5/2017 19:39:8]    setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:8]  
    [17/5/2017 19:39:8]    local energy = createCombatObject() -- 2
    [17/5/2017 19:39:8]    setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    [17/5/2017 19:39:8]    setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
    [17/5/2017 19:39:8]    setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
    [17/5/2017 19:39:8]    setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local fuego = createCombatObject() -- 3
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
    [17/5/2017 19:39:9]    setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local death = createCombatObject()  -- 4
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
    [17/5/2017 19:39:9]    setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local hielo = createCombatObject()  -- 5
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
    [17/5/2017 19:39:9]    setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local tierra = createCombatObject() -- 6
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
    [17/5/2017 19:39:9]    setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9] function onUseWeapon(cid, var)
    [17/5/2017 19:39:9]    local valor = getPlayerStorageValue(cid, config.storage)
    [17/5/2017 19:39:9]    doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
    [17/5/2017 19:39:9]    return true
    [17/5/2017 19:39:9] end
    [17/5/2017 19:39:9]  

    [17/5/2017 19:39:9] Description:
    [17/5/2017 19:39:9] [string "..."]:8: '}' expected (to close '{' at line 2) near '0'

    [17/5/2017 19:39:9] [Error - Test Interface]
    [17/5/2017 19:39:9] domodlib('configuracion')
    [17/5/2017 19:39:9]    local fisico = createCombatObject() -- 1
    [17/5/2017 19:39:9]    setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    [17/5/2017 19:39:9]    setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
    [17/5/2017 19:39:9]    setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local energy = createCombatObject() -- 2
    [17/5/2017 19:39:9]    setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
    [17/5/2017 19:39:9]    setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
    [17/5/2017 19:39:9]    setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local fuego = createCombatObject() -- 3
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
    [17/5/2017 19:39:9]    setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local death = createCombatObject()  -- 4
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
    [17/5/2017 19:39:9]    setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local hielo = createCombatObject()  -- 5
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
    [17/5/2017 19:39:9]    setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local tierra = createCombatObject() -- 6
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
    [17/5/2017 19:39:9]    setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9] function onUseWeapon(cid, var)
    [17/5/2017 19:39:9]    local valor = getPlayerStorageValue(cid, config.storage)
    [17/5/2017 19:39:9]    doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
    [17/5/2017 19:39:9]    return true
    [17/5/2017 19:39:9] end
    [17/5/2017 19:39:9]  

    [17/5/2017 19:39:9] Description:
    [17/5/2017 19:39:9] [string "LuaInterface::loadBuffer"]:6: attempt to index global 'config' (a nil value)
    [17/5/2017 19:39:9] [Error - Event::checkScript] Cannot load script (domodlib('configuracion')
    [17/5/2017 19:39:9]    local fisico = createCombatObject() -- 1
    [17/5/2017 19:39:9]    setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    [17/5/2017 19:39:9]    setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
    [17/5/2017 19:39:9]    setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local energy = createCombatObject() -- 2
    [17/5/2017 19:39:9]    setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
    [17/5/2017 19:39:9]    setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
    [17/5/2017 19:39:9]    setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local fuego = createCombatObject() -- 3
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
    [17/5/2017 19:39:9]    setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
    [17/5/2017 19:39:9]    setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local death = createCombatObject()  -- 4
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
    [17/5/2017 19:39:9]    setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
    [17/5/2017 19:39:9]    setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local hielo = createCombatObject()  -- 5
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
    [17/5/2017 19:39:9]    setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
    [17/5/2017 19:39:9]    setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:9]    local tierra = createCombatObject() -- 6
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
    [17/5/2017 19:39:9]    setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
    [17/5/2017 19:39:9]    setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 19:39:9]  
    [17/5/2017 19:39:10] function onUseWeapon(cid, var)
    [17/5/2017 19:39:10]    local valor = getPlayerStorageValue(cid, config.storage)
    [17/5/2017 19:39:10]    doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
    [17/5/2017 19:39:10]    return true
    [17/5/2017 19:39:10] end
    [17/5/2017 19:39:10]  
    [17/5/2017 19:39:10]    )

    [17/5/2017 19:39:10] [Warning - Items::loadFromXml] Duplicate registered item with id 12678
    [17/5/2017 19:39:10]  (done).

    Y esta es la mods que puse a trabajar en mi server, con la edicion del Id y los únicos daño de elementos que quería poner en usar mi elemental wand

    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 = {
          min1 = 0.4, -- multiplicador de tu ml
          min2 = 180, -- minimo de daño
          max1 = 1.2, -- multiplicador de tu lvl
          max2 = 850, -- maximo de daño
          storage = 6999,
          dinero = 0, pon 0 si no quieres que cobre.
          }
        par = {
          ["fisico"] = {1, CONST_ME_HITAREA},
          ["energy"] = {2, CONST_ME_ENERGYHIT},
          ["fuego"] = {3, CONST_ME_HITBYFIRE},
          ["death"] = {4, CONST_ME_MORTAREA},
          ["hielo"] = {5, CONST_ME_ICEATTACK},
          ["tierra"] = {6, CONST_ME_HITBYPOISON}
          }
     
    ]]></config>
       <talkaction words="!elemental" 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, "necesitas " ..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, "Ahora usas daño ".. param ..".")
          else
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
          end
          return 0
       end
       ]]></talkaction>
       <wand id="12678" mana="115" event="script"><![CDATA[
       domodlib('configuracion')
       local fisico = createCombatObject() -- 1
       setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
       setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
       setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
       setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       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)
       setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local fuego = createCombatObject() -- 3
       setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
       setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
       setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
       setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local death = createCombatObject()  -- 4
       setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
       setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
       setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
       setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local hielo = createCombatObject()  -- 5
       setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
       setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
       setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
       setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local tierra = createCombatObject() -- 6
       setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
       setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
       setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
       setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
    function onUseWeapon(cid, var)
       local valor = getPlayerStorageValue(cid, config.storage)
       doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
       return true
    end
     
       ]]>
       <vocation id="2"/>
       </wand>
       <item id="12678" article="a" name="brutal elemental wand">
        <attribute key="attackspeed" value="2500" />
     <attribute key="description" value="It is filled with the elements pure and a range of a elemtal demonic being."/>
     <attribute key="weaponType" value="wand"/>
     <attribute key="weight" value="2850"/>
     <attribute key="range" value="6"/>
     </item>
    </mod>

    Antes de retirarme quisiera decirle que alguien con el conocimiento, podria ayudarme en hacer trabajar esta mods, oh que tenga la misma funcion pero por otros metodos.

    Sin mas nada que decir me retiro

    Gracias hermanos de Tibia Face


    Imagen de mi error:


    Esta en:
    Otro Problema

    Ver perfil de usuario

    Psycho

    avatar
    Moderador
    Moderador
    Tome un scream de su consola para poder ver bien el error!.



    AFC By Psycho & Alfa Server
    [Tienes que estar registrado y conectado para ver este vínculo]
    Ver perfil de usuario http://dio-pcl.ddns.net

    carataki

    avatar
    Nuevo Miembro
    Nuevo Miembro
    Buenas Psycho aqui esta las scream, esta en 3 partes porque se alojo mucho error.

    Imagen 1:

    Imagen 2:

    Imagen 3:

    Ver perfil de usuario

    Hokku

    avatar
    Miembro
    Miembro
    fail



    Última edición por Hokku el Miér Mayo 17, 2017 9:30 pm, editado 1 vez

    Ver perfil de usuario

    5Resuelto [Pedido] Error aun el Miér Mayo 17, 2017 9:22 pm

    carataki

    avatar
    Nuevo Miembro
    Nuevo Miembro
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:
    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 = {
          min1 = 0.4, -- multiplicador de tu ml
          min2 = 180, -- minimo de daño
          max1 = 1.2, -- multiplicador de tu lvl
          max2 = 850, -- maximo de daño
          storage = 6999,
          dinero = 0, pon 0 si no quieres que cobre.
          },
        par = {
          ["fisico"] = {1, CONST_ME_HITAREA},
          ["energy"] = {2, CONST_ME_ENERGYHIT},
          ["fuego"] = {3, CONST_ME_HITBYFIRE},
          ["death"] = {4, CONST_ME_MORTAREA},
          ["hielo"] = {5, CONST_ME_ICEATTACK},
          ["tierra"] = {6, CONST_ME_HITBYPOISON}
          },
     
    ]]></config>
       <talkaction words="!elemental" 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, "necesitas " ..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, "Ahora usas daño ".. param ..".")
          else
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
          end
          return 0
       end
       ]]></talkaction>
       <wand id="12678" mana="115" event="script"><![CDATA[
       domodlib('configuracion')
       local fisico = createCombatObject() -- 1
       setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
       setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
       setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
       setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       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)
       setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local fuego = createCombatObject() -- 3
       setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
       setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
       setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
       setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local death = createCombatObject()  -- 4
       setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
       setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
       setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
       setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local hielo = createCombatObject()  -- 5
       setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
       setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
       setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
       setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local tierra = createCombatObject() -- 6
       setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
       setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
       setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
       setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
    function onUseWeapon(cid, var)
       local valor = getPlayerStorageValue(cid, config.storage)
       doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
       return true
    end
     
       ]]>
       <vocation id="2"/>
       </wand>
       <item id="12678" article="a" name="brutal elemental wand">
           <attribute key="attackspeed" value="2500" />
          <attribute key="description" value="It is filled with the elements pure and a range of a elemtal demonic being."/>
          <attribute key="weaponType" value="wand"/>
          <attribute key="weight" value="2850"/>
          <attribute key="range" value="6"/>
       </item>
    </mod>

    Me Arroja esto en la Consola

    Código:
    [17/5/2017 21:19:57] >>> Loading elementalwand.xml ...
    [17/5/2017 21:19:57] [Error - Test Interface]
    [17/5/2017 21:19:57] domodlib('configuracion')
    [17/5/2017 21:19:57]    function onSay(cid, words, param, channel)
    [17/5/2017 21:19:57]       local p = par[param]
    [17/5/2017 21:19:57]       if p then
    [17/5/2017 21:19:57]          if getPlayerMoney(cid) < config.dinero then
    [17/5/2017 21:19:57]             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "necesitas " ..config.dinero.. " gold coins.")
    [17/5/2017 21:19:57]          end  
    [17/5/2017 21:19:57]          doPlayerRemoveMoney(cid, config.dinero)
    [17/5/2017 21:19:57]          setPlayerStorageValue(cid, config.storage, p[1])
    [17/5/2017 21:19:57]          doSendMagicEffect(getCreaturePosition(cid), p[2])
    [17/5/2017 21:19:57]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ahora usas daño ".. param ..".")
    [17/5/2017 21:19:57]       else
    [17/5/2017 21:19:57]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
    [17/5/2017 21:19:57]       end
    [17/5/2017 21:19:57]       return 0
    [17/5/2017 21:19:57]    end

    [17/5/2017 21:19:57] Description:
    [17/5/2017 21:19:57] [string "..."]:8: '}' expected (to close '{' at line 2) near '0'

    [17/5/2017 21:19:57] [Error - TalkAction Interface]
    [17/5/2017 21:19:57] domodlib('configuracion')
    [17/5/2017 21:19:57]    function onSay(cid, words, param, channel)
    [17/5/2017 21:19:57]       local p = par[param]
    [17/5/2017 21:19:57]       if p then
    [17/5/2017 21:19:57]          if getPlayerMoney(cid) < config.dinero then
    [17/5/2017 21:19:57]             return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "necesitas " ..config.dinero.. " gold coins.")
    [17/5/2017 21:19:57]          end  
    [17/5/2017 21:19:57]          doPlayerRemoveMoney(cid, config.dinero)
    [17/5/2017 21:19:57]          setPlayerStorageValue(cid, config.storage, p[1])
    [17/5/2017 21:19:57]          doSendMagicEffect(getCreaturePosition(cid), p[2])
    [17/5/2017 21:19:57]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ahora usas daño ".. param ..".")
    [17/5/2017 21:19:57]       else
    [17/5/2017 21:19:57]          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
    [17/5/2017 21:19:57]       end
    [17/5/2017 21:19:57]       return 0
    [17/5/2017 21:19:57]    end

    [17/5/2017 21:19:57] Description:
    [17/5/2017 21:19:57] [string "..."]:8: '}' expected (to close '{' at line 2) near '0'

    [17/5/2017 21:19:57] [Error - Test Interface]
    [17/5/2017 21:19:57] domodlib('configuracion')
    [17/5/2017 21:19:57]    local fisico = createCombatObject() -- 1
    [17/5/2017 21:19:57]    setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    [17/5/2017 21:19:57]    setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    [17/5/2017 21:19:57]    setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
    [17/5/2017 21:19:57]    setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:57]  
    [17/5/2017 21:19:57]    local energy = createCombatObject() -- 2
    [17/5/2017 21:19:57]    setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    [17/5/2017 21:19:57]    setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
    [17/5/2017 21:19:57]    setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
    [17/5/2017 21:19:57]    setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:57]  
    [17/5/2017 21:19:57]    local fuego = createCombatObject() -- 3
    [17/5/2017 21:19:57]    setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    [17/5/2017 21:19:57]    setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
    [17/5/2017 21:19:57]    setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
    [17/5/2017 21:19:57]    setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:57]  
    [17/5/2017 21:19:57]    local death = createCombatObject()  -- 4
    [17/5/2017 21:19:57]    setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
    [17/5/2017 21:19:57]    setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
    [17/5/2017 21:19:57]    setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
    [17/5/2017 21:19:57]    setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:57]  
    [17/5/2017 21:19:57]    local hielo = createCombatObject()  -- 5
    [17/5/2017 21:19:57]    setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    [17/5/2017 21:19:57]    setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
    [17/5/2017 21:19:57]    setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
    [17/5/2017 21:19:57]    setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:57]  
    [17/5/2017 21:19:57]    local tierra = createCombatObject() -- 6
    [17/5/2017 21:19:57]    setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    [17/5/2017 21:19:57]    setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
    [17/5/2017 21:19:57]    setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
    [17/5/2017 21:19:57]    setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:57]  
    [17/5/2017 21:19:57] function onUseWeapon(cid, var)
    [17/5/2017 21:19:57]    local valor = getPlayerStorageValue(cid, config.storage)
    [17/5/2017 21:19:57]    doCombat(cid, valor == 2 and energy or valor == 3 and fuego or valor == 4 and death or valor == 5 and hielo or valor == 6 and tierra or fisico, var)
    [17/5/2017 21:19:57]    return true
    [17/5/2017 21:19:57] end
    [17/5/2017 21:19:57]  

    [17/5/2017 21:19:57] Description:
    [17/5/2017 21:19:57] [string "..."]:8: '}' expected (to close '{' at line 2) near '0'

    [17/5/2017 21:19:57] [Error - Test Interface]
    [17/5/2017 21:19:57] domodlib('configuracion')
    [17/5/2017 21:19:57]    local fisico = createCombatObject() -- 1
    [17/5/2017 21:19:57]    setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    [17/5/2017 21:19:58]    setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
    [17/5/2017 21:19:58]    setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local energy = createCombatObject() -- 2
    [17/5/2017 21:19:58]    setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
    [17/5/2017 21:19:58]    setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
    [17/5/2017 21:19:58]    setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local fuego = createCombatObject() -- 3
    [17/5/2017 21:19:58]    setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
    [17/5/2017 21:19:58]    setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
    [17/5/2017 21:19:58]    setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local death = createCombatObject()  -- 4
    [17/5/2017 21:19:58]    setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
    [17/5/2017 21:19:58]    setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
    [17/5/2017 21:19:58]    setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local hielo = createCombatObject()  -- 5
    [17/5/2017 21:19:58]    setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
    [17/5/2017 21:19:58]    setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
    [17/5/2017 21:19:58]    setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local tierra = createCombatObject() -- 6
    [17/5/2017 21:19:58]    setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
    [17/5/2017 21:19:58]    setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
    [17/5/2017 21:19:58]    setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58] function onUseWeapon(cid, var)
    [17/5/2017 21:19:58]    local valor = getPlayerStorageValue(cid, config.storage)
    [17/5/2017 21:19:58]    doCombat(cid, valor == 2 and energy or valor == 3 and fuego or valor == 4 and death or valor == 5 and hielo or valor == 6 and tierra or fisico, var)
    [17/5/2017 21:19:58]    return true
    [17/5/2017 21:19:58] end
    [17/5/2017 21:19:58]  

    [17/5/2017 21:19:58] Description:
    [17/5/2017 21:19:58] [string "LuaInterface::loadBuffer"]:6: attempt to index global 'config' (a nil value)
    [17/5/2017 21:19:58] [Error - Event::checkScript] Cannot load script (domodlib('configuracion')
    [17/5/2017 21:19:58]    local fisico = createCombatObject() -- 1
    [17/5/2017 21:19:58]    setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
    [17/5/2017 21:19:58]    setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
    [17/5/2017 21:19:58]    setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local energy = createCombatObject() -- 2
    [17/5/2017 21:19:58]    setCombatParam(energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
    [17/5/2017 21:19:58]    setCombatParam(energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
    [17/5/2017 21:19:58]    setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local fuego = createCombatObject() -- 3
    [17/5/2017 21:19:58]    setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
    [17/5/2017 21:19:58]    setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
    [17/5/2017 21:19:58]    setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local death = createCombatObject()  -- 4
    [17/5/2017 21:19:58]    setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
    [17/5/2017 21:19:58]    setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
    [17/5/2017 21:19:58]    setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local hielo = createCombatObject()  -- 5
    [17/5/2017 21:19:58]    setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
    [17/5/2017 21:19:58]    setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
    [17/5/2017 21:19:58]    setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    local tierra = createCombatObject() -- 6
    [17/5/2017 21:19:58]    setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    [17/5/2017 21:19:58]    setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
    [17/5/2017 21:19:58]    setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
    [17/5/2017 21:19:58]    setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58] function onUseWeapon(cid, var)
    [17/5/2017 21:19:58]    local valor = getPlayerStorageValue(cid, config.storage)
    [17/5/2017 21:19:58]    doCombat(cid, valor == 2 and energy or valor == 3 and fuego or valor == 4 and death or valor == 5 and hielo or valor == 6 and tierra or fisico, var)
    [17/5/2017 21:19:58]    return true
    [17/5/2017 21:19:58] end
    [17/5/2017 21:19:58]  
    [17/5/2017 21:19:58]    )

    [17/5/2017 21:19:58]  (done).
    [17/5/2017 21:19:58] >>> Loading events_mods.xml ... (done).

    Ver perfil de usuario

    Hokku

    avatar
    Miembro
    Miembro
    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 = {
          min1 = 0.4, -- multiplicador de tu ml
          min2 = 180, -- minimo de daño
          max1 = 1.2, -- multiplicador de tu lvl
          max2 = 850, -- maximo de daño
          storage = 6999,
          dinero = 0 -- pon 0 si no quieres que cobre.
          }
        par = {
          ["fisico"] = {1, CONST_ME_HITAREA},
          ["energy"] = {2, CONST_ME_ENERGYHIT},
          ["fuego"] = {3, CONST_ME_HITBYFIRE},
          ["death"] = {4, CONST_ME_MORTAREA},
          ["hielo"] = {5, CONST_ME_ICEATTACK},
          ["tierra"] = {6, CONST_ME_HITBYPOISON}
          }
     
    ]]></config>
       <talkaction words="!elemental" 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, "necesitas " ..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, "Ahora usas daño ".. param ..".")
          else
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "los comandos son fisico, energy, fuego, death, hielo y tierra.")
          end
          return 0
       end
       ]]></talkaction>
       <wand id="12678" mana="115" event="script"><![CDATA[
       domodlib('configuracion')
       local fisico = createCombatObject() -- 1
       setCombatParam(fisico, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
       setCombatParam(fisico, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
       setCombatParam(fisico, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
       setCombatFormula(fisico, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       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)
       setCombatFormula(energy, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local fuego = createCombatObject() -- 3
       setCombatParam(fuego, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
       setCombatParam(fuego, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
       setCombatParam(fuego, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
       setCombatFormula(fuego, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local death = createCombatObject()  -- 4
       setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
       setCombatParam(death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
       setCombatParam(death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
       setCombatFormula(death, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local hielo = createCombatObject()  -- 5
       setCombatParam(hielo, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
       setCombatParam(hielo, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
       setCombatParam(hielo, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
       setCombatFormula(hielo, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
       local tierra = createCombatObject() -- 6
       setCombatParam(tierra, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
       setCombatParam(tierra, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON)
       setCombatParam(tierra, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)
       setCombatFormula(tierra, COMBAT_FORMULA_LEVELMAGIC, -config.min1, -config.min2, -config.max1, -config.max2)
     
    function onUseWeapon(cid, var)
       local valor = getPlayerStorageValue(cid, config.storage)
       doCombat(cid, valor == 2 and energy or valor == 3 and tierra or valor == 4 and fuego or valor == 5 and hielo or valor == 6 and holy or valor == 7 and death or fisico, var)
       return true
    end
     
       ]]>
       <vocation id="2"/>
       </wand>
       <item id="12678" article="a" name="brutal elemental wand">
           <attribute key="attackspeed" value="2500" />
          <attribute key="description" value="It is filled with the elements pure and a range of a elemtal demonic being."/>
          <attribute key="weaponType" value="wand"/>
          <attribute key="weight" value="2850"/>
          <attribute key="range" value="6"/>
       </item>
    </mod>

    Ver perfil de usuario

    carataki

    avatar
    Nuevo Miembro
    Nuevo Miembro
    Very Happy Resuelto Gracias Very Happy

    Ver perfil de usuario

    Contenido patrocinado


    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.