• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Ayuda] script mount 8.6

    Compartir:

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

    1Resuelto [Ayuda] script mount 8.6 Mar Nov 11, 2014 2:29 pm

    Invitado

    Anonymous
    Invitado
    Hola que tal tengo este script de mount system funciona bien solamente que no me da la speed al momento de usarla y trate de ponerle la speed y si me la daba pero al momento de demontar no regresaba a su velocidad normal ayuda por favor

    Código:
    --------------------
    ---- CONDITION -----
    --------------------
    local wolfCondition = createConditionObject(CONDITION_OUTFIT)
    setConditionParam(wolfCondition, CONDITION_PARAM_TICKS, -1)
    addOutfitCondition(wolfCondition, {lookType = 342, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
    --------------------
    ----- config -------
    --------------------
    local t = {
     [11211] = {article='a' ,name='Draptor', text='Mount!', dtext='Demount!', s=149, condition=wolfCondition},
    }      
     
    ------------------------------------
    --- don't change if you are noob ---
    ------------------------------------
    function onUse(cid, item, fromPosition, itemEx, toPosition)
     local v, r = getCreaturePosition(cid), t[item.itemid]
     local s = r.s
     local pos = {x = v.x, y = v.y, z = v.z}
     if r then
     if getPlayerStorageValue(cid, s) <= 0 then
     doSendMagicEffect(pos, 10)
     doCreatureSay(cid, r.text, 19)
                            doChangeSpeed(cid, speed)
     setPlayerStorageValue(cid, s, 1)
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
     return doAddCondition(cid, r.condition)  
     elseif getPlayerStorageValue(cid, s) == 1 then
     doSendMagicEffect(pos, 10)
     doCreatureSay(cid, r.dtext, 19)
     setPlayerStorageValue(cid, s, 0)
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have demounted ' .. r.article .. ' '.. r.name .. '.')
     return doRemoveCondition(cid, CONDITION_OUTFIT)
     else
     return doPlayerSendCancel(cid, 'You can\'t do this.')
     end
     else
     return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
     end
    end

    2Resuelto Re: [Ayuda] script mount 8.6 Mar Nov 11, 2014 3:32 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    te falto añadir esto

    Código:
    doRemoveCondition(cid, CONDITION_HASTE)

    para que cuando se quite el objeto o se termine su tiempo vuelva ala normalidad



    [Ayuda] script mount 8.6 YNU5B25
    http://www.tibiaface.com

    3Resuelto Re: [Ayuda] script mount 8.6 Mar Nov 11, 2014 4:25 pm

    Invitado

    Anonymous
    Invitado
    Sigue igual amigo :/ no quita la velocidad cuando la desmontas no se que hice mal

    Código:
    --------------------
    ---- CONDITION -----
    --------------------
    local wolfCondition = createConditionObject(CONDITION_OUTFIT)
    setConditionParam(wolfCondition, CONDITION_PARAM_TICKS, -1)
    addOutfitCondition(wolfCondition, {lookType = 342, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
    --------------------
    ----- config -------
    --------------------
    local t = {
       [11211] = {article='a' ,name='Draptor', text='Mount!', dtext='Demount!', s=149, condition=wolfCondition},
    }      
     
    ------------------------------------
    --- don't change if you are noob ---
    ------------------------------------
    function onUse(cid, item, fromPosition, itemEx, toPosition)
       local v, r = getCreaturePosition(cid), t[item.itemid]
            local speed = 150 getCreatureSpeed(cid)
       local pos = {x = v.x, y = v.y, z = v.z}
       if r then
          if getPlayerStorageValue(cid, s) <= 0 then
             doSendMagicEffect(pos, 10)
             doCreatureSay(cid, r.text, 19)
                            doChangeSpeed(cid, speed)
             setPlayerStorageValue(cid, s, 1)
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
                  return doAddCondition(cid, r.condition)
          elseif getPlayerStorageValue(cid, s) == 1 then
             doSendMagicEffect(pos, 10)
             doCreatureSay(cid, r.dtext, 19)
             setPlayerStorageValue(cid, s, 0)
                            doRemoveCondition(cid, CONDITION_HASTE)
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have demounted ' .. r.article .. ' '.. r.name .. '.')
             return doRemoveCondition(cid, CONDITION_OUTFIT)
          else
             return doPlayerSendCancel(cid, 'You can\'t do this.')
          end
       else
          return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
       end
    end

    4Resuelto Re: [Ayuda] script mount 8.6 Miér Nov 12, 2014 12:57 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador


    intenta con este te pedira que tenga en tu backpack glod nugget
    para poder tranformarte ten cuidado que ocasiona conflictos si lo colocas en baul para una quest ponlo con una bag al recoger por si no lo haces crashea el servidor.

    Código:
    -- >> Config --

    local outfit =
    {
    -- Girls
    {
    lookType = 240,
    lookHead = 0,
    lookBody = 0,
    lookLegs = 0,
    lookFeet = 0,
    lookAddons = 0
    },
    -- Boys
    {
    lookType = 240,
    lookHead = 0,
    lookBody = 0,
    lookLegs = 0,
    lookFeet = 0,
    lookAddons = 0
    }
    }

    local coinID = 2157
    local wastingInterval = 100000
    local wastingQuantity = 0
    local triggerQuantity = 0
    local warnOnLowSupply = FALSE
    local lowSupplyMargin = 200
    local storage = 50780

    -- Config << --

    local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
    setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 0)
    setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 0)
    setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS, 2)

    local condition2 = createConditionObject(CONDITION_HASTE)
    setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
    setConditionFormula(condition2, 0.3, 0, 0.5, 0)


    local area = createCombatArea({
    {0, 0, 0, 1, 0, 0, 0},
    {0, 1, 0, 0, 0, 1, 0},
    {0, 0, 0, 0, 0, 0, 0},
    {1, 0, 0, 2, 0, 0, 1},
    {0, 0, 0, 0, 0, 0, 0},
    {0, 1, 0, 0, 0, 1, 0},
    {0, 0, 0, 1, 0, 0, 0}
    })

    local animCombat =
    {
    createCombatObject(),
    createCombatObject()
    }

    local sexyEffect =
    {
    CONST_ME_FIREWORK_RED,
    23,
    CONST_ME_MAGIC_RED,
    CONST_ME_MAGIC_GREEN
    }

    setCombatParam(animCombat[2], COMBAT_PARAM_EFFECT, 1)
    setCombatParam(animCombat[2], COMBAT_PARAM_DISTANCEEFFECT, 1)
    setCombatParam(animCombat[1], COMBAT_PARAM_EFFECT, 23)
    setCombatParam(animCombat[1], COMBAT_PARAM_DISTANCEEFFECT, 1)

    setCombatArea(animCombat[2], area)
    setCombatArea(animCombat[1], area)

    local function StopSuperForm(cid)
    if (getPlayerStorageValue(cid, storage) == 1) then
    setPlayerStorageValue(cid, storage, 0)
    doRemoveCondition(cid, CONDITION_OUTFIT)
    doRemoveCondition(cid, CONDITION_ATTRIBUTES)
    doRemoveCondition(cid, CONDITION_HASTE)
    end
    return TRUE
    end

    local function SuperForm(cid, sexIndex)
    if (isCreature(cid)) then
    if (getPlayerStorageValue(cid, storage) == 1) then
    local goldLeft = getPlayerItemCount(cid, coinID)
    if (goldLeft >= wastingQuantity) then
    local position = getCreaturePosition(cid)
    doPlayerRemoveItem(cid, coinID, wastingQuantity)
    doSendMagicEffect(position, sexyEffect[sexIndex + 2])
    doSendMagicEffect(position, sexyEffect[sexIndex])
    if (goldLeft <= lowSupplyMargin and warnOnLowSupply == TRUE) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Coins left: " ..(goldLeft - wastingQuantity) .. "!")
    end
    addEvent(SuperForm, wastingInterval, cid, sexIndex)
    else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "tu garra se ha destruido!")
    doPlayerRemoveItem(cid, 10502, 1)
    return StopSuperForm(cid)
    end
    end
    end
    end

    function onEquip(cid, item, slot)
    if (getPlayerItemCount(cid, coinID) > triggerQuantity and getPlayerStorageValue(cid, storage) ~= 1) then
    local sexIndex = getPlayerSex(cid) + 1
    doCombat(cid, animCombat[sexIndex], numberToVariant(cid))
    doSetCreatureOutfit(cid, outfit[sexIndex], -1)
    setPlayerStorageValue(cid, storage, 1)
    doAddCondition(cid, condition1)
    doAddCondition(cid, condition2)
    doPlayerRemoveItem(cid, coinID, triggerQuantity)
    SuperForm(cid, sexIndex)
    elseif (getPlayerStorageValue(cid, storage) == 1) then
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Usted es una bestia  ahora!")
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ESTOS ANILLOS SOLO FUNSIONAN CON (gold nugget) POR FAVOR DEJA UN gold nugget EN TU BACKPACK!")
    end
    return TRUE
    end

    function onDeEquip(cid, item, slot)
    return StopSuperForm(cid)
    end



    [Ayuda] script mount 8.6 YNU5B25
    http://www.tibiaface.com

    5Resuelto Re: [Ayuda] script mount 8.6 Miér Nov 12, 2014 3:17 am

    Invitado

    Anonymous
    Invitado
    Ya logre que reduzca la velocidad pero la reduce de mas xD de lo que debe de ser ajajaja mira

    Código:
    --------------------
    ---- CONDITION -----
    --------------------
    local wolfCondition = createConditionObject(CONDITION_OUTFIT)
    setConditionParam(wolfCondition, CONDITION_PARAM_TICKS, -1)
    addOutfitCondition(wolfCondition, {lookType = 342, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
    --------------------
    ----- config -------
    --------------------
    local t = {
       [11211] = {article='a' ,name='Draptor', text='Mount!', dtext='Demount!', s=150, condition=wolfCondition},
    }     
     
    ------------------------------------
    --- don't change if you are noob ---
    ------------------------------------
    function onUse(cid, item, fromPosition, itemEx, toPosition)
       local v, r = getCreaturePosition(cid), t[item.itemid]
       local speed = r.s
       local pos = {x = v.x, y = v.y, z = v.z}
       if r then
          if getPlayerStorageValue(cid, s) <= 0 then
             doSendMagicEffect(pos, 10)
             doCreatureSay(cid, r.text, 19)
                            doChangeSpeed(cid, speed)
             setPlayerStorageValue(cid, s, 1)
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
             return doAddCondition(cid, r.condition) 
          elseif getPlayerStorageValue(cid, s) == 1 then
             doSendMagicEffect(pos, 10)
             doCreatureSay(cid, r.dtext, 19)
             setPlayerStorageValue(cid, s, 0)
                            local delSpeed = 150
                            doChangeSpeed(cid, (-getCreatureSpeed(cid)+getCreatureBaseSpeed(cid)-delSpeed))
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have demounted ' .. r.article .. ' '.. r.name .. '.')
             return doRemoveCondition(cid, CONDITION_OUTFIT)
          else
             return doPlayerSendCancel(cid, 'You can\'t do this.')
          end
       else
          return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
       end
    end

    6Resuelto Re: [Ayuda] script mount 8.6 Miér Nov 12, 2014 12:12 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui tiene espero te sirva

    elimina esta linea

    Código:
                           doChangeSpeed(cid, (-getCreatureSpeed(cid)+getCreatureBaseSpeed(cid)-delSpeed))

    cambia por esta :

    y la añades debajo de es ta linea:

    Código:
    doRemoveCondition(cid, CONDITION_OUTFIT)


    Código:
    doChangeSpeed(cid, -speed)



    [Ayuda] script mount 8.6 YNU5B25
    http://www.tibiaface.com

    7Resuelto Re: [Ayuda] script mount 8.6 Miér Nov 12, 2014 1:47 pm

    Invitado

    Anonymous
    Invitado
    ya lo solucione muchas gracias amigo Smile

    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.

     

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