• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [CreatureEvents] Advance Skills UP

    Compartir:

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

    1[CreatureEvents] Advance Skills UP Empty [CreatureEvents] Advance Skills UP Dom Abr 04, 2021 5:16 pm

    ioke

    ioke
    Miembro
    Miembro
    Hola buenas traigo este script porque me lo han pedido y espero que os sirva es para los mensajes cuando subes de skills o nivel.

    en la carpeta creaturescript crean un archivo llamado advance.lua y pegan esto

    Código:
    --Script made by Pitufo/Haifurer, edited by figaro!
    local config = {
        [0] = { "Fist skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [1] = { "Club skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [2] = { "Sword skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [3] = { "Axe skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [4] = { "Distance skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [5] = { "Shield skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [6] = { "Fishing skill UP", 30}, -- 30 = variable[2]  -- Animation effect
        [7] = { "Magic level UP", 30}, -- 30 = variable[2]  -- Animation effect
        [8] = { "Level UP", 30} -- 30 = variable[2]  -- Animation effect
    }


    function onAdvance(cid, skill, oldlevel, newlevel)

    local pos = getPlayerPosition(cid)
    local effectPositions = {
    {x = pos.x, y = pos.y - 3, z = pos.z},
    {x = pos.x, y = pos.y + 3, z = pos.z},
    {x = pos.x - 3, y = pos.y, z = pos.z},
    {x = pos.x + 3, y = pos.y, z = pos.z},
    {x = pos.x - 2, y = pos.y - 2, z = pos.z},
    {x = pos.x + 2, y = pos.y - 2, z = pos.z},
    {x = pos.x + 2, y = pos.y + 2, z = pos.z},
    {x = pos.x - 2, y = pos.y + 2, z = pos.z}
    }

           
        for type, variable in pairs(config) do
            if skill == type then
                doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
       for _, ePos in ipairs(effectPositions) do
          doSendDistanceShoot(pos, ePos, CONST_ANI_SMALLHOLY)
          doSendMagicEffect(ePos, CONST_ME_HOLYAREA)
                end

               
            end
        end   
    return TRUE
    end

    luego en creaturescript.xml añaden

    Código:
       <event type="advance" name="advance" script="advance.lua"/>

    y el script login.lua de creaturescript añaden

    Código:
    registerCreatureEvent(cid, "advance")

    espero les sirva y les guste

    +2
    SoyFabi
    ioke
    6 participantes
    http://baiakciteron.sytes.net

    2[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Dom Abr 04, 2021 6:50 pm

    SoyFabi

    SoyFabi
    Miembro
    Miembro
    lo que necesitaba Very Happy

    +2
    SoyFabi
    ioke
    6 participantes

    3[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Dom Abr 04, 2021 9:46 pm

    Memo

    Memo
    Nuevo Miembro
    Nuevo Miembro
    SoyFabi escribió: lo que necesitaba Very Happy

    Te funciono?

    +2
    SoyFabi
    ioke
    6 participantes

    4[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Lun Abr 05, 2021 2:23 pm

    akane

    akane
    Miembro
    Miembro
    hay un problema con el ml y el lvl, al subir uno de esos dos no aparece ni la animación ni el texto

    +2
    SoyFabi
    ioke
    6 participantes

    5[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Lun Abr 05, 2021 3:22 pm

    ioke

    ioke
    Miembro
    Miembro
    Yo lo uso en mi server y me va todo correcto versión theforgottenserver 0.4 compilado de trunk.r3777

    +2
    SoyFabi
    ioke
    6 participantes
    http://baiakciteron.sytes.net

    6[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Lun Abr 05, 2021 3:29 pm

    Memo

    Memo
    Nuevo Miembro
    Nuevo Miembro
    ioke escribió:Yo lo uso en mi server y me va todo correcto versión theforgottenserver 0.4 compilado de trunk.r3777
    como veo que tfs tiene mi ot

    +2
    SoyFabi
    ioke
    6 participantes

    7[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Lun Abr 05, 2021 3:34 pm

    ioke

    ioke
    Miembro
    Miembro
    Pues al iniciar la consola te lo pone



    prueba de añadir este script

    lvlup.lua

    Código:
    function onAdvance(cid, skill, oldlevel, newlevel)
    local pos = getCreaturePosition(cid)
    if skill == SKILL__LEVEL then
       doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
       doCreatureAddMana(cid, getCreatureMaxMana(cid))
       doSendAnimatedText(pos, "Level Up!", 180)
    elseif skill == SKILL__MAGLEVEL then
       doCreatureAddMana(cid, getCreatureMaxMana(cid))
       doSendAnimatedText(pos, "Magic Up!", 180)
    end
    end

    y en creaturescript.xml añadir

    Código:
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>


    si abeis puesto el otro script no hace falta que lo borreis poner los dos



    perdon tambien no os olvidéis de añadir en el login.lua

    Código:
    registerCreatureEvent(cid, "lvlup")

    +2
    SoyFabi
    ioke
    6 participantes
    http://baiakciteron.sytes.net

    8[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Mar Abr 06, 2021 12:41 am

    akane

    akane
    Miembro
    Miembro
    tampoco me funcionó :/

    +2
    SoyFabi
    ioke
    6 participantes

    9[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Mar Abr 06, 2021 3:08 am

    ioke

    ioke
    Miembro
    Miembro
    Pues es raro a piikedu le funcionó me.dijo y Ami me va 100%. Bien lo he probado y no da error y sale todos los mensajes quizás sea tu versión de tfs no se yo uso 0.4

    +2
    SoyFabi
    ioke
    6 participantes
    http://baiakciteron.sytes.net

    10[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Mar Abr 06, 2021 5:43 pm

    akane

    akane
    Miembro
    Miembro
    de hecho uso otx xD

    +2
    SoyFabi
    ioke
    6 participantes

    11[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Miér Abr 07, 2021 3:32 pm

    SoyFabi

    SoyFabi
    Miembro
    Miembro
    poncex escribió:de hecho uso otx xD

    Muy raro, aqui me va todo a la perfeccion ya sea subir ml e lvl.. y es otx 2

    +2
    SoyFabi
    ioke
    6 participantes

    12[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Miér Abr 07, 2021 5:52 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    SoyFabi escribió:
    poncex escribió:de hecho uso otx xD

    Muy raro, aqui me va todo a la perfeccion ya sea subir ml e lvl.. y es otx 2

    el usa seguro tfs 1.3



    [CreatureEvents] Advance Skills UP YNU5B25
    +2
    SoyFabi
    ioke
    6 participantes
    http://www.tibiaface.com

    13[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Jue Abr 08, 2021 12:59 pm

    akane

    akane
    Miembro
    Miembro
    uso otx 4

    +2
    SoyFabi
    ioke
    6 participantes

    14[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Jue Abr 08, 2021 3:27 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    poncex escribió:uso otx 4

    no es compatible



    [CreatureEvents] Advance Skills UP YNU5B25
    +2
    SoyFabi
    ioke
    6 participantes
    http://www.tibiaface.com

    15[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Sáb Feb 10, 2024 5:35 pm

    spenser

    spenser
    Nuevo Miembro
    Nuevo Miembro
    God Maya


    Nesecito crear un item que de experience... osea como el mana fluid que al tomarlo de experience

    +2
    SoyFabi
    ioke
    6 participantes

    16[CreatureEvents] Advance Skills UP Empty Re: [CreatureEvents] Advance Skills UP Sáb Feb 10, 2024 6:40 pm

    akane

    akane
    Miembro
    Miembro
    spenser escribió:God Maya


    Nesecito crear un item que de experience... osea como el mana fluid que al tomarlo de experience

    favor crear un post aparte ya que no tiene nada que ver con el post principal

    +2
    SoyFabi
    ioke
    6 participantes

    Contenido patrocinado


    +2
    SoyFabi
    ioke
    6 participantes

    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).