• 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 Jue Abr 30, 2015 2:15 am

    Juan Carlos

    Juan Carlos
    Miembro
    Miembro
    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'?

    2 participantes
    http://dybbuk.jimdo.com/

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

    [Admin] God Maya

    [Admin] God Maya
    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



    [Pedido] Spell Scroll para TFS 1.1 YNU5B25
    2 participantes
    http://www.tibiaface.com

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

    [Admin] God Maya

    [Admin] God Maya
    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

    [Pedido] Spell Scroll para TFS 1.1 ZDUid

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



    [Pedido] Spell Scroll para TFS 1.1 YNU5B25
    2 participantes
    http://www.tibiaface.com

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

    Juan Carlos

    Juan Carlos
    Miembro
    Miembro
    [Admin] God Maya 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

    [Pedido] Spell Scroll para TFS 1.1 ZDUid

    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?

    2 participantes
    http://dybbuk.jimdo.com/

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

    [Admin] God Maya

    [Admin] God Maya
    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



    [Pedido] Spell Scroll para TFS 1.1 YNU5B25
    2 participantes
    http://www.tibiaface.com

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

    Juan Carlos

    Juan Carlos
    Miembro
    Miembro
    [Admin] God Maya 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

    [Pedido] Spell Scroll para TFS 1.1 34yxxcj

    2 participantes
    http://dybbuk.jimdo.com/

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

    [Admin] God Maya

    [Admin] God Maya
    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



    [Pedido] Spell Scroll para TFS 1.1 YNU5B25
    2 participantes
    http://www.tibiaface.com

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

    Juan Carlos

    Juan Carlos
    Miembro
    Miembro
    ahhh Sad

    2 participantes
    http://dybbuk.jimdo.com/

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

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui lo tienes


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




    [Pedido] Spell Scroll para TFS 1.1 YNU5B25
    2 participantes
    http://www.tibiaface.com

    Contenido patrocinado


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