• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Pedido] Spell Scroll para TFS 1.1

    Compartir:

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

    1Resuelto [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 2:15 am

    Hola

    bueno me he estado interesando por un tema en especial.
    un spellscroll.

    que al usarlo te de nuevas spells

    no se si exista script para tfs 1.1 podrian ayudarme'?

    Ver perfil de usuario http://dybbuk.jimdo.com/

    2Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 10:06 am

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    la verdad no se si las spells en tfs 1.1 funcionan con storange para que puedan ser habilitadas con un actions scrolls



    Ver perfil de usuario http://www.tibiaface.com

    3Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 11:28 am

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    bueno aqui un npc que te tradea las spells no se la verda si funciona con tfs 1.1 ya que no lo he testeado



    Código:
    <?xml version="1.0"?>
    <npc name="Spell Seller" script="data/npc/scripts/spell_trade.lua" walkinterval="50000" floorchange="0">
    <health now="100" max="100"/>
    <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/>
    <parameters>
    <parameter key="message_greet" value="Hello |PLAYERNAME|.I have many {spells} to sell for you! {trade}" />
    </parameters>
    </npc>


    Código:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)

    function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
    function onThink() npcHandler:eek:nThink() end

    function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
    return false
    end

    local shopWindow = {}
    local spells = {
    {id=1950, buy = 150, name = "Exana Pox", spell = "Andidote", vocations = {1,2,3,4,5,6,7,8}, level = 10},
    {id=1950, buy = 2500, name = "Exori", spell = "Berserk", vocations = {4,8}, level = 35},
    {id=1950, buy = 80, name = "Exiva", spell = "Find Person", vocations = {1,2,3,4,5,6,7,8}, level = 8},
    {id=2182, buy = 5000, name = "Exori Flam", spell = "Flame Strike", vocations = {1,2,5,6}, level = 12},
    {id=1950, buy = 8000, name = "Utito Tempo", spell = "Blood Rage", vocations = {4,8}, level = 60},
    {id=1950, buy = 2000, name = "Exeta Res", spell = "Challenge", vocations = {8}, level = 20},
    {id=1950, buy = 5000, name = "Exori Gran", spell = "Fierce Berserk", vocations = {4,8}, level = 70},
    {id=1950, buy = 500, name = "Utevo Gran Lux", spell = "Great Light", vocations = {1,2,3,4,5,6,7,8}, level = 13},
    {id=1950, buy = 1500, name = "Exori Mas", spell = "Groundshaker", vocations = {4,8}, level = 33},
    {id=1950, buy = 1500, name = "Exana Mort", spell = "Wound Cleansing", vocations = {4,8}, level = 30}
    }

    local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    if not getPlayerLearnedInstantSpell(cid, shopWindow[item].Words) then
    if getPlayerLevel(cid) >= shopWindow[item].Level then
    if isInArray(shopWindow[item].Vocs, getPlayerVocation(cid)) then
    doPlayerRemoveMoney(cid, shopWindow[item].Price)
    doPlayerLearnInstantSpell(cid, shopWindow[item].Words)
    npcHandler:say("You have learned " .. shopWindow[item].Words, cid)
    else
    npcHandler:say("This spell is not for your vocation.", cid)
    end
    else
    npcHandler:say("You need to obtain a level of " .. shopWindow[item].Level .. " or higher to be able to learn this spell.", cid)
    end
    else
    npcHandler:say("You already know this spell.", cid)
    end
    return true
    end

    if msgcontains(msg, 'trade') or msgcontains(msg, 'spells') then
    for var, item in pairs(spells) do
    shopWindow[item.id] = {Level = item.level, Vocs = item.vocations, Price = item.buy, subType = 0, Words = item.spell, SpellName = item.name}
    end
    openShopWindow(cid, spells, onBuy, onSell) end
    return true
    end

    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())



    Ver perfil de usuario http://www.tibiaface.com

    4Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 12:15 pm

    [Tienes que estar registrado y conectado para ver este vínculo] escribió:bueno aqui un npc que te tradea las spells no se la verda si funciona con tfs 1.1 ya que no lo he testeado



    Código:
    <?xml version="1.0"?>
    <npc name="Spell Seller" script="data/npc/scripts/spell_trade.lua" walkinterval="50000" floorchange="0">
    <health now="100" max="100"/>
    <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/>
    <parameters>
    <parameter key="message_greet" value="Hello |PLAYERNAME|.I have many {spells} to sell for you! {trade}" />
    </parameters>
    </npc>


    Código:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)

    function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
    function onThink() npcHandler:eek:nThink() end

    function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
    return false
    end

    local shopWindow = {}
    local spells = {
    {id=1950, buy = 150, name = "Exana Pox", spell = "Andidote", vocations = {1,2,3,4,5,6,7,8}, level = 10},
    {id=1950, buy = 2500, name = "Exori", spell = "Berserk", vocations = {4,8}, level = 35},
    {id=1950, buy = 80, name = "Exiva", spell = "Find Person", vocations = {1,2,3,4,5,6,7,8}, level = 8},
    {id=2182, buy = 5000, name = "Exori Flam", spell = "Flame Strike", vocations = {1,2,5,6}, level = 12},
    {id=1950, buy = 8000, name = "Utito Tempo", spell = "Blood Rage", vocations = {4,8}, level = 60},
    {id=1950, buy = 2000, name = "Exeta Res", spell = "Challenge", vocations = {8}, level = 20},
    {id=1950, buy = 5000, name = "Exori Gran", spell = "Fierce Berserk", vocations = {4,8}, level = 70},
    {id=1950, buy = 500, name = "Utevo Gran Lux", spell = "Great Light", vocations = {1,2,3,4,5,6,7,8}, level = 13},
    {id=1950, buy = 1500, name = "Exori Mas", spell = "Groundshaker", vocations = {4,8}, level = 33},
    {id=1950, buy = 1500, name = "Exana Mort", spell = "Wound Cleansing", vocations = {4,8}, level = 30}
    }

    local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    if not getPlayerLearnedInstantSpell(cid, shopWindow[item].Words) then
    if getPlayerLevel(cid) >= shopWindow[item].Level then
    if isInArray(shopWindow[item].Vocs, getPlayerVocation(cid)) then
    doPlayerRemoveMoney(cid, shopWindow[item].Price)
    doPlayerLearnInstantSpell(cid, shopWindow[item].Words)
    npcHandler:say("You have learned " .. shopWindow[item].Words, cid)
    else
    npcHandler:say("This spell is not for your vocation.", cid)
    end
    else
    npcHandler:say("You need to obtain a level of " .. shopWindow[item].Level .. " or higher to be able to learn this spell.", cid)
    end
    else
    npcHandler:say("You already know this spell.", cid)
    end
    return true
    end

    if msgcontains(msg, 'trade') or msgcontains(msg, 'spells') then
    for var, item in pairs(spells) do
    shopWindow[item.id] = {Level = item.level, Vocs = item.vocations, Price = item.buy, subType = 0, Words = item.spell, SpellName = item.name}
    end
    openShopWindow(cid, spells, onBuy, onSell) end
    return true
    end

    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())

    Me parece perfecto lo probare. pero tengo que poner algo en spells.xml? para que no les aparesca automaticamente?

    Ver perfil de usuario http://dybbuk.jimdo.com/

    5Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 12:21 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    ese es el problema que tfs 1.1 no trae la opcion en la config.lua de quiatr las spells apra que puedan ser compradas tendria que montarle storange a cada spells con lo servidores que usan rebirth



    Ver perfil de usuario http://www.tibiaface.com

    6Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 12:51 pm

    [Tienes que estar registrado y conectado para ver este vínculo] escribió:la verdad no se si las spells en tfs 1.1 funcionan con storange para que puedan ser habilitadas con un actions scrolls

    Ya lo edite me qedo asi:



    y solo a la hora de comprar me manda el siguiente error

    Ver perfil de usuario http://dybbuk.jimdo.com/

    7Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 1:23 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    esta esta fallando ya que el npc es apra tfs 0.3.7/0.4 o tfs 1.0


    Código:
    local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    if not getPlayerLearnedInstantSpell(cid, shopWindow[item].Words) then
    if getPlayerLevel(cid) >= shopWindow[item].Level then
    if isInArray(shopWindow[item].Vocs, getPlayerVocation(cid)) then
    doPlayerRemoveMoney(cid, shopWindow[item].Price)
    doPlayerLearnInstantSpell(cid, shopWindow[item].Words)
    npcHandler:say("You have learned " .. shopWindow[item].Words, cid)
    else
    npcHandler:say("This spell is not for your vocation.", cid)
    end
    else
    npcHandler:say("You need to obtain a level of " .. shopWindow[item].Level .. " or higher to be able to learn this spell.", cid)
    end
    else
    npcHandler:say("You already know this spell.", cid)
    end
    return true
    end


    tienes que traspasarlo tfs 1.1



    Ver perfil de usuario http://www.tibiaface.com

    8Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Jue Abr 30, 2015 2:44 pm

    ahhh Sad

    Ver perfil de usuario http://dybbuk.jimdo.com/

    9Resuelto Re: [Pedido] Spell Scroll para TFS 1.1 el Vie Mayo 01, 2015 12:16 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    aqui lo tienes


    [Tienes que estar registrado y conectado para ver este vínculo]




    Ver perfil de usuario http://www.tibiaface.com

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