• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [NPC] Spells por NPC

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

    1default [NPC] Spells por NPC el Mar Jul 04, 2017 12:23 pm

    Mizulead

    avatar
    Nuevo Miembro
    Nuevo Miembro
    Hola buenas tardes, queria poner las spells por NPC. Creia que el servidor ya los traia, y los trae, pero solo el de Knight vende Spells en su script, los otros solo addon, ejemplo:

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

    function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
    function onThink() npcHandler:onThink() end

    local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
    return false
    end
    local player = Player(cid)
    if msgcontains(msg, "addon") or msgcontains(msg, "outfit") then
    if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) < 1 then
    npcHandler:say("Oh, my winged tiara? Those are traditionally awarded after having completed a difficult {task} for our guild, only to female aspirants though. Male warriors will receive a hooded cloak.", cid)
    npcHandler.topic[cid] = 1
    end
    elseif msgcontains(msg, "task") then
    if npcHandler.topic[cid] == 1 then
    npcHandler:say("So you are saying that you would like to prove that you deserve to wear such a hooded cloak?", cid)
    npcHandler.topic[cid] = 2
    end
    elseif msgcontains(msg, "crossbow") then
    if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 1 then
    npcHandler:say("I'm so excited! Have you really found my crossbow?", cid)
    npcHandler.topic[cid] = 4
    end
    elseif msgcontains(msg, "leather") then
    if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 2 then
    npcHandler:say("Did you bring me 100 pieces of lizard leather and 100 pieces of red dragon leather?", cid)
    npcHandler.topic[cid] = 5
    end
    elseif msgcontains(msg, "chicken wing") then
    if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 3 then
    npcHandler:say("Were you able to get hold of 5 enchanted chicken wings?", cid)
    npcHandler.topic[cid] = 6
    end
    elseif msgcontains(msg, "steel") then
    if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 4 then
    npcHandler:say("Ah, have you brought one piece of royal steel, draconian steel and hell steel each?", cid)
    npcHandler.topic[cid] = 7
    end
    elseif msgcontains(msg, "yes") then
    if npcHandler.topic[cid] == 2 then
    npcHandler:say({
    "Alright, I will give you a chance. Pay close attention to what I'm going to tell you now. ...",
    "Recently, one of our members moved to Liberty Bay out of nowhere, talking about some strange cult. That is not the problem, but he took my favourite crossbow with him. ...",
    "Please find my crossbow. It has my name engraved on it and is very special to me. ...",
    "Secondly, we need a lot of leather for new quivers. 100 pieces of lizard leather and 100 pieces of red dragon leather should suffice. ...",
    "Third, since we are giving out tiaras, we are always in need of enchanted chicken wings. Please bring me 5, that would help us tremendously. ...",
    "Lastly, for our arrow heads we need a lot of steel. Best would be one piece of royal steel, one piece of draconian steel and one piece of hell steel. ...",
    "Did you understand everything I told you and are willing to handle this task?"
    }, cid)
    npcHandler.topic[cid] = 3
    elseif npcHandler.topic[cid] == 3 then
    npcHandler:say("That's the spirit! I hope you will find my crossbow, |PLAYERNAME|!", cid)
    player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 1)
    player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests
    npcHandler.topic[cid] = 0
    elseif npcHandler.topic[cid] == 4 then
    if player:removeItem(5947, 1) then
    npcHandler:say("Yeah! I could kiss you right here and there! Besides, you're a handsome one. <giggles> Please bring me 100 pieces of lizard leather and 100 pieces of red dragon leather now!", cid)
    player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 2)
    npcHandler.topic[cid] = 0
    else
    npcHandler:say("You don't have it...", cid)
    end
    elseif npcHandler.topic[cid] == 5 then
    if player:getItemCount(5876) >= 100 and player:getItemCount(5948) >= 100 then
    npcHandler:say("Good work, |PLAYERNAME|! That is enough leather for a lot of sturdy quivers. Now, please bring me 5 enchanted chicken wings.", cid)
    player:removeItem(5876, 100)
    player:removeItem(5948, 100)
    player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 3)
    npcHandler.topic[cid] = 0
    else
    npcHandler:say("You don't have it...", cid)
    end
    elseif npcHandler.topic[cid] == 6 then
    if player:removeItem(5891, 5) then
    npcHandler:say("Great! Now we can create a few more Tiaras. If only they weren't that expensive... Well anyway, please obtain one piece of royal steel, draconian steel and hell steel each.", cid)
    player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 4)
    npcHandler.topic[cid] = 0
    else
    npcHandler:say("You don't have it...", cid)
    end
    elseif npcHandler.topic[cid] == 7 then
    if player:getItemCount(5887) >= 1 and player:getItemCount(5888) >= 1 and player:getItemCount(5889) >= 1 then
    npcHandler:say("Wow, I'm impressed, |PLAYERNAME|. Your really are a valuable member of our paladin guild. I shall grant you your reward now. Wear it proudly!", cid)
    player:removeItem(5887, 1)
    player:removeItem(5888, 1)
    player:removeItem(5889, 1)
    player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 5)
    player:addOutfitAddon(129, 1)
    player:addOutfitAddon(137, 2)
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    npcHandler.topic[cid] = 0
    else
    npcHandler:say("You don't have it...", cid)
    end
    end
    elseif msgcontains(msg, "no") then
    if npcHandler.topic[cid] > 1 then
    npcHandler:say("Then no.", cid)
    npcHandler.topic[cid] = 0
    end
    return true
    end
    end

    -- Sniper Gloves
    keywordHandler:addKeyword({'sniper gloves'}, StdModule.say, {npcHandler = npcHandler, text = 'We are always looking for sniper gloves. They are supposed to raise accuracy. If you find a pair, bring them here. Maybe I can offer you a nice trade.'}, function(player) return player:getItemCount(5875) == 0 end)

    local function addGloveKeyword(text, condition, action)
    local gloveKeyword = keywordHandler:addKeyword({'sniper gloves'}, StdModule.say, {npcHandler = npcHandler, text = text[1]}, condition)
    gloveKeyword:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = text[2], reset = true}, function(player) return player:getItemCount(5875) == 0 end)
    gloveKeyword:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = text[3], reset = true}, nil, action)
    gloveKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = text[2], reset = true})
    end

    -- Free Account
    addGloveKeyword({
    'You found sniper gloves?! Incredible! I would love to grant you the sniper gloves accessory, but I can only do that for premium warriors. However, I would pay you 2000 gold pieces for them. How about it?',
    'Maybe another time.',
    'Alright! Here is your money, thank you very much.'
    }, function(player) return not player:isPremium() end, function(player) player:removeItem(5875, 1) player:addMoney(2000) end
    )

    -- Premium account with addon
    addGloveKeyword({
    'Did you find sniper gloves AGAIN?! Incredible! I cannot grant you other accessories, but would you like to sell them to me for 2000 gold pieces?',
    'Maybe another time.',
    'Alright! Here is your money, thank you very much.'
    }, function(player) return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == 1 end, function(player) player:removeItem(5875, 1) player:addMoney(2000) end
    )

    -- If you don't have the addon
    addGloveKeyword({
    'You found sniper gloves?! Incredible! Listen, if you give them to me, I will grant you the right to wear the sniper gloves accessory. How about it?',
    'No problem, maybe another time.',
    'Great! I hereby grant you the right to wear the sniper gloves as an accessory. Congratulations!'
    }, function(player) return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == -1 end, function(player) player:removeItem(5875, 1) player:setStorageValue(Storage.OutfitQuest.Hunter.AddonGlove, 1) player:addOutfitAddon(129, 2) player:addOutfitAddon(137, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end
    )

    -- Basic
    keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, text = "I am the leader of the Paladins. I help our members."})
    keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = "I am the leader of the Paladins. I help our members."})
    keywordHandler:addKeyword({'paladins'}, StdModule.say, {npcHandler = npcHandler, text = "Paladins are great warriors and magicians. Besides that we are excellent missile fighters. Many people in Tibia want to join us."})
    keywordHandler:addKeyword({'warriors'}, StdModule.say, {npcHandler = npcHandler, text = "Of course, we aren't as strong as knights, but no druid or sorcerer will ever defeat a paladin with a sword."})
    keywordHandler:addKeyword({'magicians'}, StdModule.say, {npcHandler = npcHandler, text = "There are many magic spells and runes paladins can use."})
    keywordHandler:addKeyword({'missile'}, StdModule.say, {npcHandler = npcHandler, text = "Paladins are the best missile fighters in Tibia!"})
    keywordHandler:addKeyword({'news'}, StdModule.say, {npcHandler = npcHandler, text = "I am a paladin, not a storyteller."})
    keywordHandler:addKeyword({'members'}, StdModule.say, {npcHandler = npcHandler, text = "Every paladin profits from his vocation. It has many advantages to be a paladin."})
    keywordHandler:addKeyword({'advantages'}, StdModule.say, {npcHandler = npcHandler, text = "We will help you to improve your skills. Besides I offer spells for paladins."})
    keywordHandler:addKeyword({'general'}, StdModule.say, {npcHandler = npcHandler, text = "Harkath Bloodblade is the royal general."})
    keywordHandler:addKeyword({'army'}, StdModule.say, {npcHandler = npcHandler, text = "Some paladins serve in the kings army."})
    keywordHandler:addKeyword({'baxter'}, StdModule.say, {npcHandler = npcHandler, text = "He has some potential."})
    keywordHandler:addKeyword({'bozo'}, StdModule.say, {npcHandler = npcHandler, text = "How spineless do you have to be to become a jester?"})
    keywordHandler:addKeyword({'mcronald'}, StdModule.say, {npcHandler = npcHandler, text = "The McRonalds are simple farmers."})
    keywordHandler:addKeyword({'eclesius'}, StdModule.say, {npcHandler = npcHandler, text = "He must have been skilled before he became the way he is now. Such a pity."})
    keywordHandler:addKeyword({'elane'}, StdModule.say, {npcHandler = npcHandler, text = "Yes?"})
    keywordHandler:addKeyword({'frodo'}, StdModule.say, {npcHandler = npcHandler, text = "The alcohol he sells shrouds the mind and the eye."})
    keywordHandler:addKeyword({'galuna'}, StdModule.say, {npcHandler = npcHandler, text = "One of the most important members of our guild. She makes all the bows and arrows we need."})
    keywordHandler:addKeyword({'gorn'}, StdModule.say, {npcHandler = npcHandler, text = "He sells a lot of useful equipment."})
    keywordHandler:addKeyword({'gregor'}, StdModule.say, {npcHandler = npcHandler, text = "He and his guildfellows lack the grace of a true warrior."})
    keywordHandler:addKeyword({'harkath bloodblade'}, StdModule.say, {npcHandler = npcHandler, text = "A fine warrior and a skilled general."})
    keywordHandler:addKeyword({'king tibianus'}, StdModule.say, {npcHandler = npcHandler, text = "King Tibianus is a wise ruler."})
    keywordHandler:addKeyword({'lugri'}, StdModule.say, {npcHandler = npcHandler, text = "A follower of evil that will get what he deserves one day."})
    keywordHandler:addKeyword({'lynda'}, StdModule.say, {npcHandler = npcHandler, text = "Mhm, a little too nice for my taste. Still, it's amazing how she endures all those men stalking her, especially this creepy Oswald."})
    keywordHandler:addKeyword({'marvik'}, StdModule.say, {npcHandler = npcHandler, text = "A skilled healer, that's for sure."})
    keywordHandler:addKeyword({'muriel'}, StdModule.say, {npcHandler = npcHandler, text = "Just another arrogant sorcerer."})
    keywordHandler:addKeyword({'oswald'}, StdModule.say, {npcHandler = npcHandler, text = "If there wouldn't be higher powers to protect him..."})
    keywordHandler:addKeyword({'quentin'}, StdModule.say, {npcHandler = npcHandler, text = "A humble monk and a wise man."})
    keywordHandler:addKeyword({'sam'}, StdModule.say, {npcHandler = npcHandler, text = "Strong man. But a little shy."})

    npcHandler:setMessage(MESSAGE_GREET, "Welcome to the paladins' guild, |PLAYERNAME|! How can I help you?")
    npcHandler:setMessage(MESSAGE_FAREWELL, "Bye, |PLAYERNAME|.")
    npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye, |PLAYERNAME|.")

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

    ¿Alguien me puede pasar el script/Npc de addon+spells? Gracias.

    Ver perfil de usuario

    2default Re: [NPC] Spells por NPC el Mar Jul 04, 2017 2:11 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    primeramente a todas tus spells tendras que modificar esta tag

    Código:
    needlearn="0"

    por

    Código:
    needlearn="1"


    ahora vamos npc que vende spells de sorcerer

    Código:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
     
     
    function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
    function onThink() npcHandler:onThink() end
     
    function creatureSayCallback(cid, type, msg)
     
        if(npcHandler.focus ~= cid) then
            return false
        end
     
        if msgcontains(msg,'spells') then
            if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then
                selfSay('For which level would you like to learn spells 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 37, 38, 41, 45, 55, 60?')
            else
                selfSay('Sorry, I only sell spells to sorcerers.')
            end
        end
    return 1   
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
     
     
    local node1 = keywordHandler:addKeyword({'light healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light healing for 170 gp?'})
    node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Light Healing', vocation = 1, price = 170, level = 9})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node2 = keywordHandler:addKeyword({'find person'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to find person for 80 gp?'})
    node2:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Find Person', vocation = 1, price = 80, level = 8})
    node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node3 = keywordHandler:addKeyword({'light magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light magic missile for 500 gp?'})
    node3:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light magic missile', vocation = 1, price = 500, level = 15})
    node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node4 = keywordHandler:addKeyword({'antidote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn antidote for 150 gp?'})
    node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'antidote', vocation = 1, price = 150, level = 10})
    node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node5 = keywordHandler:addKeyword({'death strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn death strike for 800 gp?'})
    node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'death strike', vocation = 1, price = 800, level = 16})
    node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node6 = keywordHandler:addKeyword({'intense healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn intense healing for 350 gp?'})
    node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing', vocation = 1, price = 350, level = 11})
    node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node7 = keywordHandler:addKeyword({'energy strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy strike for 600 gp?'})
    node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'energy strike', vocation = 1, price = 800, level = 12})
    node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node8 = keywordHandler:addKeyword({'levitate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn levitate for 800 gp?'})
    node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'levitate', vocation = 1, price = 800, level = 12})
    node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node9 = keywordHandler:addKeyword({'flame strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn flame strike for 800 gp?'})
    node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'flame strike', vocation = 1, price = 800, level = 14})
    node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node10 = keywordHandler:addKeyword({'great light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great light for 500?'})
    node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great Light', vocation = 1, price = 500, level = 13})
    node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node11 = keywordHandler:addKeyword({'poison field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn poison field for 300 gp?'})
    node11:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'poison field', vocation = 1, price = 300, level = 14})
    node11:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node12 = keywordHandler:addKeyword({'magic shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic shield for 450 gp?'})
    node12:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'magic shield', vocation = 1, price = 300, level = 14})
    node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node13 = keywordHandler:addKeyword({'strong haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn strong haste for 1300 gp?'})
    node13:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'strong haste', vocation = 1, price = 1300, level = 20})
    node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
     local node14 = keywordHandler:addKeyword({'ultimate light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate light for 1600 gp?'})
    node14:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Ultimate Light', vocation = 1, price = 1600, level = 26})
    node14:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node15 = keywordHandler:addKeyword({'fire field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fire field for 500 gp?'})
    node15:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fire field', vocation = 1, price = 500, level = 15})
    node15:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node16 = keywordHandler:addKeyword({'fireball'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fireball for 1600 gp?'})
    node16:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fireball', vocation = 1, price = 1600, level = 27})
    node16:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node17 = keywordHandler:addKeyword({'destroy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn destroy Field for 700 gp?'})
    node17:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'destroy Field', vocation = 1, price = 700, level = 17})
    node17:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node18 = keywordHandler:addKeyword({'energy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy eield for 700 gp?'})
    node18:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy Field', vocation = 1, price = 700, level = 17})
    node18:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node19 = keywordHandler:addKeyword({'fire wave'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fire Wave for 850 gp?'})
    node19:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fire Wave', vocation = 1, price = 850, level = 18})
    node19:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node20 = keywordHandler:addKeyword({'ultimate healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate healing for 1000 gp?'})
    node20:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'ultimate healing', vocation = 1, price = 1000, level = 20})
    node20:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node21 = keywordHandler:addKeyword({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn haste for 600 gp?'})
    node21:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'haste', vocation = 1, price = 600, level = 14})
    node21:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node22 = keywordHandler:addKeyword({'desintegrate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn desintegrate for 900 gp?'})
    node22:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'desintegrate', vocation = 1, price = 900, level = 21})
    node22:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node23 = keywordHandler:addKeyword({'great fireball'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great fireball for 1200 gp?'})
    node23:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great fireball', vocation = 1, price = 1200, level = 23})
    node23:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node24 = keywordHandler:addKeyword({'creature illusion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn creature illusion for 1000 gp?'})
    node24:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'creature illusion', vocation = 1, price = 1000, level = 23})
    node24:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     local node25 = keywordHandler:addKeyword({'great energy beam'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great energy beam for 1800 gp?'})
    node25:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great energy beam', vocation = 1, price = 1800, level = 29})
    node25:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node26 = keywordHandler:addKeyword({'heavy magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn heavy magic missile for 1500 gp?'})
    node26:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'heavy magic missile', vocation = 1, price = 1500, level = 25})
    node26:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node27 = keywordHandler:addKeyword({'summon creature'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn summon creature for 2000 gp?'})
    node27:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'summon creature', vocation = 1, price = 2000, level = 25})
    node27:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node28 = keywordHandler:addKeyword({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light for 100 gp?'})
    node28:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = 1, price = 100, level = 8})
    node28:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node29 = keywordHandler:addKeyword({'cancel invisibility'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn cancel invisibility for 1600 gp?'})
    node29:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'cancel invisibility', vocation = 1, price = 1600, level = 26})
    node29:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node30 = keywordHandler:addKeyword({'soulfire'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn soulfire for 1800 gp?'})
    node30:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'soulfire', vocation = 1, price = 1800, level = 27})
    node30:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node31 = keywordHandler:addKeyword({'animate dead'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn animate dead for 1200 gp?'})
    node31:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'animate dead', vocation = 1, price = 1200, level = 27})
    node31:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node32 = keywordHandler:addKeyword({'firebomb'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn firebomb for 1500 gp?'})
    node32:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'firebomb', vocation = 1, price = 1500, level = 27})
    node32:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node33 = keywordHandler:addKeyword({'poison wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn poison wall for 1600 gp?'})
    node33:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Poison Wall', vocation = 1, price = 1600, level = 29})
    node33:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node34 = keywordHandler:addKeyword({'energy beam'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy beam for 1000 gp?'})
    node34:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy beam', vocation = 1, price = 1000, level = 23})
    node34:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node35 = keywordHandler:addKeyword({'magic wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic wall for 2100 gp?'})
    node35:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'magic wall', vocation = 1, price = 2100, level = 32})
    node35:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node36 = keywordHandler:addKeyword({'fire wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fire wall for 2000 gp?'})
    node36:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fire wall', vocation = 1, price = 2000, level = 33})
    node36:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node37 = keywordHandler:addKeyword({'invisibility'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn invisibility for 2000 gp?'})
    node37:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'invisibility', vocation = 1, price = 2000, level = 35})
    node37:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node38 = keywordHandler:addKeyword({'energy bomb'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy bomb for 2300 gp?'})
    node38:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'energy bomb', vocation = 1, price = 2300, level = 37})
    node38:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node39 = keywordHandler:addKeyword({'energy wave'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy wave for 2500 gp?'})
    node39:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy wave', vocation = 1, price = 2500, level = 38})
    node39:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node40 = keywordHandler:addKeyword({'enchant staff'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn enchant staff for 2000 gp?'})
    node40:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'enchant staff', vocation = 1, price = 2000, level = 41})
    node40:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node41 = keywordHandler:addKeyword({'energy wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy wall for 2500 gp?'})
    node41:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy wall', vocation = 1, price = 2500, level = 41})
    node41:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node42 = keywordHandler:addKeyword({'sudden death'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn sudden death for 3000 gp?'})
    node42:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'sudden death', vocation = 1, price = 3000, level = 45})
    node42:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node43 = keywordHandler:addKeyword({'explosion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn explosion for 1800 gp?'})
    node43:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'explosion', vocation = 1, price = 1800, level = 31})
    node43:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node44 = keywordHandler:addKeyword({'magic rope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic rope for 200 gp?'})
    node44:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'magic rope', vocation = 1, price = 200, level = 9})
    node44:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node45 = keywordHandler:addKeyword({'energy wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy wall for 2500 gp?'})
    node45:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy wall', vocation = 1, price = 2500, level = 41})
    node45:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node46 = keywordHandler:addKeyword({'sudden death'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn sudden death for 3000 gp?'})
    node46:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'sudden death', vocation = 1, price = 3000, level = 45})
    node46:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node47 = keywordHandler:addKeyword({'terra strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn terra strike for 800 gp?'})
    node47:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'terra strike', vocation = 1, price = 800, level = 13})
    node47:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node48 = keywordHandler:addKeyword({'ice strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ice strike for 800 gp?'})
    node48:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'ice strike', vocation = 1, price = 800, level = 15})
    node48:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node49 = keywordHandler:addKeyword({'stalagmite'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn stalagmite for 1400 gp?'})
    node49:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'stalagmite', vocation = 1, price = 1400, level = 24})
    node49:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node50 = keywordHandler:addKeyword({'rage of the skies'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn rage of the skies for 6000 gp?'})
    node50:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'rage of the skies', vocation = 1, price = 6000, level = 55})
    node50:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node51 = keywordHandler:addKeyword({'hells core'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn hells core for 8000 gp?'})
    node51:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'hells core', vocation = 1, price = 8000, level = 60})
    node51:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node52 = keywordHandler:addKeyword({'thunderstorm'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn thunderstorm for 1100 gp?'})
    node52:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'thunderstorm', vocation = 1, price = 1100, level = 28})
    node52:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node53 = keywordHandler:addKeyword({'death strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn death strike for 800 gp?'})
    node53:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'death strike', vocation = 1, price = 800, level = 16})
    node53:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node54 = keywordHandler:addKeyword({'intense healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn intense healing for 800 gp?'})
    node54:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing', vocation = 1, price = 350, level = 11})
    node54:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    npcHandler:addModule(FocusModule:new())

    Código:
    <npc name="Sorcerer spells" script="data/npc/scripts/sorcerer spells.lua" [COLOR=Black]walkinterval="2000"[/COLOR] floorchange="0">
    <health now="100" max="100"/>
    <look type="134" head="57" body="59" legs="40" feet="76" corpse="2212"/>
    <parameters>
    <parameter key="message_greet" value="Hello |PLAYERNAME|, For which level would you like to learn spells 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 20, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32 33, 35, 37, 38, 41, 45, 55 or 60?" />
    <parameter key="module_keywords" value="1" />
    <parameter key="keywords" value="60;55;45;41;38;37;35;33;32;31;29;28;27;26;25;24;23;21;20:18;17;16;15;14;13;12;11;10;9;8" />
     
    <parameter key="keyword_reply1" value="I can teach you, hells core." />
    <parameter key="keyword_reply2" value="I can teach you, rage of the skies." />
    <parameter key="keyword_reply3" value="I can teach you, sudden death." />
    <parameter key="keyword_reply4" value="I can teach you, energy wall." />
    <parameter key="keyword_reply5" value="I can teach you, energy wave and enchant staff." />
    <parameter key="keyword_reply6" value="I can teach you, energybomb." />
    <parameter key="keyword_reply7" value="I can teach you, invisibility." />
    <parameter key="keyword_reply8" value="I can teach you, Fire wall." />
    <parameter key="keyword_reply9" value="I can teach you, magic wall." />
    <parameter key="keyword_reply10" value="I can teach you, explosion." />
    <parameter key="keyword_reply11" value="I can teach you, poison wall and great energy beam." />
    <parameter key="keyword_reply12" value="I can teach you, thunderstrike." />
    <parameter key="keyword_reply13" value="I can teach you, soulfire, great fireball, animate dead and firebomb." />
    <parameter key="keyword_reply14" value="I can teach you, ultimate light and cancel invisibility." />
    <parameter key="keyword_reply15" value="I can teach you, heavy magic missile and summon creature." />
    <parameter key="keyword_reply16" value="I can teach you, stalagmite." />
    <parameter key="keyword_reply17" value="I can teach you, creature illusion and energy beam." />
    <parameter key="keyword_reply18" value="I can teach you, desintegrate." />
    <parameter key="keyword_reply19" value="I can teach you, ultimate healing, terra strike and strong haste." />
    <parameter key="keyword_reply20" value="I can teach you, energy field and fire wave." />
    <parameter key="keyword_reply21" value="I can teach you, death strike." />
    <parameter key="keyword_reply22" value="I can teach you, fireball and destroy field." />
    <parameter key="keyword_reply23" value="I can teach you, fire field, ice strike and light magic missile." />
    <parameter key="keyword_reply24" value="I can teach you, Haste, magic shield, flame strike and poison field." />
    <parameter key="keyword_reply25" value="I can teach you, great light." />
    <parameter key="keyword_reply26" value="I can teach you, energy strike and levitate." />
    <parameter key="keyword_reply27" value="I can teach you, death strike and intense healing." />
    <parameter key="keyword_reply28" value="I can teach you, Antidote." />
    <parameter key="keyword_reply29" value="I can teach you, light healing and magic rope." />
    <parameter key="keyword_reply30" value="I can teach you, light and find person." />
    </parameters>
    </npc>



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

    3default Re: [NPC] Spells por NPC el Mar Jul 04, 2017 2:13 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    npc que vende spells de druid

    Código:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
     
     
    function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
    function onThink() npcHandler:onThink() end
    function creatureSayCallback(cid, type, msg)
     
        if(npcHandler.focus ~= cid) then
            return false
        end
     
        if msgcontains(msg,'spells') then
            if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
                selfSay('For which level would you like to learn spells 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 41, 54, 55 or 60?')
            else
                selfSay('Sorry, I only sell spells to druids.')
            end
        end
    return 1
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
     
    local node1 = keywordHandler:addKeyword({'light healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light healing for 170 gp?'})
    node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light healing', vocation = 2, price = 170, level = 9})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node2 = keywordHandler:addKeyword({'find person'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn find person for 80 gp?'})
    node2:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'find person', vocation = 2, price = 80, level = 8})
    node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node3 = keywordHandler:addKeyword({'light magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light magic missile for 600 gp?'})
    node3:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light magic missile', vocation = 2, price = 600, level = 15})
    node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node4 = keywordHandler:addKeyword({'magic rope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic rope for 200 gp?'})
    node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'magic rope', vocation = 2, price = 200, level = 9})
    node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node5 = keywordHandler:addKeyword({'antidote rune'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn antidote rune for 600 gp?'})
    node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'antidote rune', vocation = 2, price = 600, level = 15})
    node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node6 = keywordHandler:addKeyword({'death strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn death strike for 800 gp?'})
    node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'death strike', vocation = 2, price = 800, level = 16})
    node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node7 = keywordHandler:addKeyword({'intense healing rune'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn intense healing rune for 600 gp?'})
    node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing rune', vocation = 2, price = 600, level = 15})
    node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node8 = keywordHandler:addKeyword({'energy strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy strike for 800 gp?'})
    node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'energy strike', vocation = 2, price = 800, level = 12})
    node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node9 = keywordHandler:addKeyword({'levitate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn levitate for 500 gp?'})
    node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'levitate', vocation = 2, price = 500, level = 12})
    node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node10 = keywordHandler:addKeyword({'flame strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn flame strike for 800 gp?'})
    node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'flame strike', vocation = 2, price = 800, level = 12})
    node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node11 = keywordHandler:addKeyword({'great light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great light for 500 gp?'})
    node11:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great light', vocation = 2, price = 500, level = 13})
    node11:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node12 = keywordHandler:addKeyword({'food'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn food for 300 gp?'})
    node12:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'food', vocation = 2, price = 300, level = 14})
    node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node13 = keywordHandler:addKeyword({'poison field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn poison field for 300 gp?'})
    node13:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'poison field', vocation = 2, price = 300, level = 14})
    node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node14 = keywordHandler:addKeyword({'magic shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic shield for 450 gp?'})
    node14:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'magic shield', vocation = 2, price = 450, level = 14})
    node14:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node15 = keywordHandler:addKeyword({'strong haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn strong haste for 1300 gp?'})
    node15:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'strong haste', vocation = 2, price = 1300, level = 20})
    node15:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node16 = keywordHandler:addKeyword({'antidote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn antidote for 150 gp?'})
    node16:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'antidote', vocation = 2, price = 150, level = 10})
    node16:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node17 = keywordHandler:addKeyword({'intense healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn intense healing for 350 gp?'})
    node17:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing', vocation = 2, price = 350, level = 11})
    node17:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node18 = keywordHandler:addKeyword({'ultimate light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate light for 1600 gp?'})
    node18:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'ultimate light', vocation = 2, price = 1600, level = 26})
    node18:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node19 = keywordHandler:addKeyword({'fire field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fire field for 500 gp?'})
    node19:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fire field', vocation = 2, price = 500, level = 15})
    node19:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node20 = keywordHandler:addKeyword({'convince creature'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn convince creature for 800 gp?'})
    node20:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'convince creature', vocation = 2, price = 800, level = 16})
    node20:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node21 = keywordHandler:addKeyword({'fireball'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fireball for 800?'})
    node21:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fireball', vocation = 2, price = 800, level = 17})
    node21:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node22 = keywordHandler:addKeyword({'destroy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn destroy field for 700 gp?'})
    node22:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'destroy Field', vocation = 2, price = 700, level = 17})
    node22:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node23 = keywordHandler:addKeyword({'energy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy field for 700 gp?'})
    node23:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy field', vocation = 2, price = 700, level = 18})
    node23:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node24 = keywordHandler:addKeyword({'heal friend'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn heal friend for 800?'})
    node24:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'heal friend', vocation = 2, price = 800, level = 18})
    node24:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node25 = keywordHandler:addKeyword({'ultimate healing rune'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate healing rune for 1500 gp?'})
    node25:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'ultimate healing rune', vocation = 2, price = 1500, level = 24})
    node25:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node26 = keywordHandler:addKeyword({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn haste for 600 gp?'})
    node26:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'haste', vocation = 2, price = 600, level = 14})
    node26:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    local node28 = keywordHandler:addKeyword({'desintegrate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn desintegrate for 900 gp?'})
    node28:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'desintegrate', vocation = 2, price = 900, level = 21})
    node28:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    local node30 = keywordHandler:addKeyword({'creature illusion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Creature illusion for 1000 gp?'})
    node30:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'creature illusion', vocation = 2, price = 1000, level = 23})
    node30:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node31 = keywordHandler:addKeyword({'ultimate healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate healing for 1000 gp?'})
    node31:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'ultimate healing', vocation = 2, price = 1000, level = 20})
    node31:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node32 = keywordHandler:addKeyword({'heavy magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn heavy magic missile for 1500 gp?'})
    node32:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'heavy magic missile', vocation = 2, price = 1500, level = 25})
    node32:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node33 = keywordHandler:addKeyword({'poison bomb'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn poison bomb for 1000 gp?'})
    node33:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'poison bomb', vocation = 2, price = 1000, level = 25})
    node33:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node34 = keywordHandler:addKeyword({'summon creature'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn summon creature for 2000 gp?'})
    node34:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'summon creature', vocation = 2, price = 2000, level = 25})
    node34:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node35 = keywordHandler:addKeyword({'wild growth'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn wild growth for 2000 gp?'})
    node35:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'wild growth', vocation = 2, price = 2000, level = 27})
    node35:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node36 = keywordHandler:addKeyword({'soulfire'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn soulfire for 1800 gp?'})
    node36:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'soulfire', vocation = 2, price = 1800, level = 27})
    node36:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node37 = keywordHandler:addKeyword({'animate dead'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn animate dead for 1200 gp?'})
    node37:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'animate dead', vocation = 2, price = 1200, level = 27})
    node37:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node38 = keywordHandler:addKeyword({'hameleon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn cameleon for 1300 gp?'})
    node38:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'chameleon', vocation = 2, price = 1300, level = 27})
    node38:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node39 = keywordHandler:addKeyword({'firebomb'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn firebomb for 1500 gp?'})
    node39:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'firebomb', vocation = 2, price = 1500, level = 27})
    node39:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node40 = keywordHandler:addKeyword({'poison wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn poison wall for 1600 gp?'})
    node40:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'poison wall', vocation = 2, price = 1600, level = 29})
    node40:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node41 = keywordHandler:addKeyword({'undead legion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn undead legion for 2000 gp?'})
    node41:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'undead legion', vocation = 2, price = 2000, level = 30})
    node41:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node42 = keywordHandler:addKeyword({'explosion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn explosion for 1800 gp?'})
    node42:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'explosion', vocation = 2, price = 1800, level = 31})
    node42:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node43 = keywordHandler:addKeyword({'fire wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fire wall for 2000 gp?'})
    node43:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fire wall', vocation = 2, price = 2000, level = 33})
    node43:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node44 = keywordHandler:addKeyword({'invisibility'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn invisibility for 2000 gp?'})
    node44:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'invisibility', vocation = 2, price = 2000, level = 35})
    node44:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node45 = keywordHandler:addKeyword({'mass healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn mass healing for 2200 gp?'})
    node45:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'mass healing', vocation = 2, price = 2200, level = 36})
    node45:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node46 = keywordHandler:addKeyword({'energy wall'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn energy wall for 2500 gp?'})
    node46:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'energy wall', vocation = 2, price = 2500, level = 41})
    node46:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node47 = keywordHandler:addKeyword({'paralyze'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn paralyze for 1900 gp?'})
    node47:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'paralyze', vocation = 2, price = 1900, level = 54})
    node47:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node48 = keywordHandler:addKeyword({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light for 100 gp?'})
    node48:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = 2, price = 100, level = 8})
    node48:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node49 = keywordHandler:addKeyword({'ice strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ice strike?'})
    node49:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'ice strike', vocation = 2, price = 800, level = 15})
    node49:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node50 = keywordHandler:addKeyword({'ice wave'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ice wave?'})
    node50:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'ice wave', vocation = 2, price = 850, level = 18})
    node50:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node51 = keywordHandler:addKeyword({'terra strike'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn terra strike?'})
    node51:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'terra strike', vocation = 2, price = 800, level = 13})
    node51:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node52 = keywordHandler:addKeyword({'stone shower'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn stone shower?'})
    node52:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'stone shower', vocation = 2, price = 1100, level = 28})
    node52:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node53 = keywordHandler:addKeyword({'icicle'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn icicle?'})
    node53:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'icicle', vocation = 2, price = 1700, level = 28})
    node53:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node54 = keywordHandler:addKeyword({'avalanche'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn avalanche?'})
    node54:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'avalanche', vocation = 2, price = 1200, level = 30})
    node54:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node55 = keywordHandler:addKeyword({'terra wave'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn terra wave?'})
    node55:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'terra wave', vocation = 2, price = 2500, level = 38})
    node55:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node56 = keywordHandler:addKeyword({'wrath of nature'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn wrath of nature?'})
    node56:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'wrath of nature', vocation = 2, price = 6000, level = 55})
    node56:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node57 = keywordHandler:addKeyword({'eternal winter'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn eternal winter?'})
    node57:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'eternal winter', vocation = 2, price = 8000, level = 60})
    node57:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    npcHandler:addModule(FocusModule:new())



    Código:
     <npc name="druid spells" script="data/npc/scripts/druid spells.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="134" head="57" body="59" legs="40" feet="76" corpse="2212"/>
    <parameters>
    <parameter key="message_greet" value="Hello |PLAYERNAME|, For which level would you like to learn spells 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 41, 54, 55 or 60?" />
    <parameter key="module_keywords" value="1" />
    <parameter key="keywords" value="60;55;54;41;38;36;35;33;31;30;29;28;27;26;25;24;23;21;20;18;17;16;15;14;13;12;11;10;9;8" />
     
    <parameter key="keyword_reply1" value="I can teach you, eternal winter" />
    <parameter key="keyword_reply2" value="I can teach you, wrath of nature" />
    <parameter key="keyword_reply3" value="I can teach you, paralyze" />
    <parameter key="keyword_reply4" value="I can teach you, energy wall" />
    <parameter key="keyword_reply5" value="I can teach you, mass healing" />
    <parameter key="keyword_reply6" value="I can teach you, terra wave" />
    <parameter key="keyword_reply7" value="I can teach you, invisibility" />
    <parameter key="keyword_reply8" value="I can teach you, Fire wall" />
    <parameter key="keyword_reply9" value="I can teach you, explosion" />
    <parameter key="keyword_reply10" value="I can teach you, undead legion" />
    <parameter key="keyword_reply11" value="I can teach you, poison wall and avalanche" />
    <parameter key="keyword_reply12" value="I can teach you, soulfire, animate dead, chameleon, firebomb and wild growth" />
    <parameter key="keyword_reply13" value="I can teach you, stone shower and icicle" />
    <parameter key="keyword_reply14" value="I can teach you, ultimate light" />
    <parameter key="keyword_reply15" value="I can teach you, heavy magic missile, poison bomb and summon creature" />
    <parameter key="keyword_reply16" value="I can teach you, Ultimate healing rune" />
    <parameter key="keyword_reply17" value="I can teach you, creature illusion" />
    <parameter key="keyword_reply18" value="I can teach you, envenom and desintegrate" />
    <parameter key="keyword_reply19" value="I can teach you, ultimate healing and strong haste" />
    <parameter key="keyword_reply20" value="I can teach you, energy field, ice wave and heal friend" />
    <parameter key="keyword_reply21" value="I can teach you, fireball and destroy field" />
    <parameter key="keyword_reply22" value="I can teach you, convince creature and death strike" />
    <parameter key="keyword_reply23" value="I can teach you, antidote rune, intense healing rune, fire field, ice strike and light magic missile" />
    <parameter key="keyword_reply24" value="I can teach you, Haste, food, magic shield and poison field" />
    <parameter key="keyword_reply25" value="I can teach you, great light" />
    <parameter key="keyword_reply26" value="I can teach you, energy strike, terra strike, levitate and flame strike" />
    <parameter key="keyword_reply27" value="I can teach you, intense healing" />
    <parameter key="keyword_reply28" value="I can teach you, Antidote" />
    <parameter key="keyword_reply29" value="I can teach you, light healing and magic rope." />
    <parameter key="keyword_reply30" value="I can teach you, light and find person" />
    </parameters>
    </npc>



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

    4default Re: [NPC] Spells por NPC el Mar Jul 04, 2017 2:14 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    knight spells​

    Código:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
     
     
    function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
    function onThink() npcHandler:onThink() end
    function creatureSayCallback(cid, type, msg)
     
        if(npcHandler.focus ~= cid) then
            return false
        end
     
        if msgcontains(msg,'spells') then
            if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
                selfSay('For which level would you like to learn spells, 8, 9, 10, 13, 14, 15, 20, 33, 35 or 70?')
            else
                selfSay('Sorry, I only sell spells to knights.')
            end
        end
    return 1   
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
     
    local node1 = keywordHandler:addKeyword({'find person'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to find person for 80 gp?'})
    node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Find Person', vocation = 4, price = 80, level = 8})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node2 = keywordHandler:addKeyword({'light healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light healing for 170 gp?'})
    node2:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Light Healing', vocation = 4, price = 170, level = 9})
    node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node3 = keywordHandler:addKeyword({'antidote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn antidote for 150 gp?'})
    node3:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Antidote', vocation = 4, price = 150, level = 10})
    node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node4 = keywordHandler:addKeyword({'great light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great light for 500 gp?'})
    node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Great Light', vocation = 4, price = 500, level = 13})
    node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node5 = keywordHandler:addKeyword({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn haste for 500 gp?'})
    node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'Haste', vocation = 4, price = 500, level = 13})
    node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node6 = keywordHandler:addKeyword({'whirlwind throw'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn whirlwind throw for 800 gp?'})
    node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'whirlwind throw', vocation = 4, price = 800, level = 15})
    node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node7 = keywordHandler:addKeyword({'challenge'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn challenge for 2000 gp?'})
    node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'challenge', vocation = 4, price = 2000, level = 20})
    node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node8 = keywordHandler:addKeyword({'groundshaker'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn groundshaker for 1500 gp?'})
    node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'groundshaker', vocation = 4, price = 1500, level = 33})
    node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    local node9 = keywordHandler:addKeyword({'fierce berserk'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fierce berserk for 5000 gp?'})
    node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'fierce berserk', vocation = 4, price = 5000, level = 70})
    node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    local node10 = keywordHandler:addKeyword({'berserk'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn berserk for 2500 gp?'})
    node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'berserk', vocation = 4, price = 2500, level = 35})
    node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node11 = keywordHandler:addKeyword({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light for 100 gp?'})
    node11:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = 4, cost = 100, level = 8})
    node11:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node12 = keywordHandler:addKeyword({'wound cleansing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn wound cleansing for 300 gp?'})
    node12:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'wound cleansing', vocation = 4, cost = 300, level = 30})
    node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node13 = keywordHandler:addKeyword({'levitate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn levitate for 500 gp?'})
    node13:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'levitate', vocation = 4, cost = 500, level = 12})
    node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
    npcHandler:addModule(FocusModule:new())



    Código:
    <npc name="Knight spells" script="data/npc/scripts/knight spells.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="134" head="57" body="59" legs="40" feet="76" corpse="2212"/>
    <parameters>
    <parameter key="message_greet" value="Hello |PLAYERNAME|, For which level would you like to learn spells 8, 9, 10, 13, 14, 15, 20, 30, 33, 35 or 70?" />
    <parameter key="module_keywords" value="1" />
    <parameter key="keywords" value="70;35;33;30;20;15;14;13;10;9;8;spells" />
     
    <parameter key="keyword_reply1" value="I can teach you, Fierce berserk." />
    <parameter key="keyword_reply2" value="I can teach you, Berserk." />
    <parameter key="keyword_reply3" value="I can teach you, Groundshaker" />
    <parameter key="keyword_reply4" value="I can teach you, wound cleansing." />
    <parameter key="keyword_reply5" value="I can teach you, Challenge." />
    <parameter key="keyword_reply6" value="I can teach you, Whirlwind throw." />
    <parameter key="keyword_reply7" value="I can teach you, Haste." />
    <parameter key="keyword_reply8" value="I can teach you, Great light." />
    <parameter key="keyword_reply9" value="I can teach you, Antidote." />
    <parameter key="keyword_reply10" value="I can teach you, light healing." />
    <parameter key="keyword_reply11" value="I can teach you, light and find person." />
    <parameter key="keyword_reply12" value="For which level would you like to learn spells 8, 9, 10 or 13?" />
    </parameters>
    </npc>



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

    5default Re: [NPC] Spells por NPC el Mar Jul 04, 2017 2:16 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    Paladin spells​


    Código:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    local talkNode = 0
    NpcSystem.parseParameters(npcHandler)
     
    function onCreatureAppear(cid)        npcHandler:onCreatureAppear(cid)        end
    function onCreatureDisappear(cid)    npcHandler:onCreatureDisappear(cid)        end
    function onCreatureSay(cid, type, msg)    npcHandler:onCreatureSay(cid, type, msg) end
    function onThink()            npcHandler:onThink()                end
    function creatureSayCallback(cid, type, msg)
     
        if(npcHandler.focus ~= cid) then
            return false
        end
     
        if msgcontains(msg,'spells') then
            if getPlayerVocation == 3 or getPlayerVocation == 7 then
                selfSay('For which level would you like to learn spells 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 23, 24, 33, 35, 40, 45, 50, 59?')
            else
                selfSay('Sorry, I only sell spells to paladins.')
            end
        end
    return 1       
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
     
    local node1 = keywordHandler:addKeyword({'light magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light magic missile for 500 gp?'})
        node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light magic missile',  vocation = 3, price = 500, level = 15})
        node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node2 = keywordHandler:addKeyword({'find person'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to find person for 80 gp?'})
        node2:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'find person', vocation = 3, price = 80, level = 8})
        node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node3 = keywordHandler:addKeyword({'light healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light healing for 170 gp?'})
        node3:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light healing', vocation = 3, price = 170, level = 9})
        node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node4 = keywordHandler:addKeyword({'antidote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn antidote for 150 gp?'})
        node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'antidote', vocation = 3, price = 150, level = 10})
        node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node5 = keywordHandler:addKeyword({'great light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great light for 500 gp?'})
        node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great light',  vocation = 3, price = 500, level = 13})
        node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node6 = keywordHandler:addKeyword({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn haste for 500 gp?'})
        node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'Haste',  vocation = 3, price = 500, level = 13})
        node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node7 = keywordHandler:addKeyword({'levitate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn levitate for 500 gp?'})
        node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'levitate',  vocation = 3, price = 500, level = 12})
        node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node8 = keywordHandler:addKeyword({'conjure arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure arrow for 450 gp?'})
        node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure arrow',  vocation = 3, price = 450, level = 13})
        node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node9 = keywordHandler:addKeyword({'magic shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic shield for 450 gp?'})
        node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'magic shield',  vocation = 3, price = 450, level = 14})
        node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node10 = keywordHandler:addKeyword({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light for 100 gp?'})
        node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = 3, cost = 100, level = 8})
        node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node11 = keywordHandler:addKeyword({'destroy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn destroy field for 700 gp?'})
        node11:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'destroy field',  vocation = 3, price = 700, level = 17})
        node11:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node12 = keywordHandler:addKeyword({'fireball'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fireball for 800 gp?'})
        node12:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fireball',  vocation = 3, price = 800, level = 17})
        node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node13 = keywordHandler:addKeyword({'poisoned arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to poisoned arrow for 700 gp?'})
        node13:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'poisoned arrow',  vocation = 3, price = 700, level = 16})
        node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node14 = keywordHandler:addKeyword({'ultimate healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate healing for 1000 gp?'})
        node14:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'ultimate healing',  vocation = 3, price = 1000, level = 20})
        node14:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node15 = keywordHandler:addKeyword({'desintegrate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn desintegrate for 900 gp?'})
        node15:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'desintegrate',  vocation = 3, price = 900, level = 21})
        node15:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node16 = keywordHandler:addKeyword({'ethereal spear'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ethereal spear for 1100 gp?'})
        node16:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'ethereal spear',  vocation = 3, price = 1100, level = 23})
        node16:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node17 = keywordHandler:addKeyword({'conjure sniper arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure sniper arrow for 1100 gp?'})
        node17:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure sniper arrow',  vocation = 3, price = 1100, level = 23})
        node17:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node18 = keywordHandler:addKeyword({'explosive arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn explosive arrow for 1000 gp?'})
        node18:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'explosive arrow',  vocation = 3, price = 1000, level = 25})
        node18:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node19 = keywordHandler:addKeyword({'heavy magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn heavy magic missile for 1500 gp?'})
        node19:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'heavy magic missile',  vocation = 3, price = 1500, level = 25})
        node19:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node20 = keywordHandler:addKeyword({'conjure piercing bolt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure piercing bolt for 850 gp?'})
        node20:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure piercing bolt',  vocation = 3, price = 850, level = 33})
        node20:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node21 = keywordHandler:addKeyword({'invisibility'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn invisibility for 2000 gp?'})
        node21:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'invisibility',  vocation = 3, price = 2000, level = 35})
        node21:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node22 = keywordHandler:addKeyword({'enchant spear'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn enchant spear for 2000 gp?'})
        node22:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = yes, spellName = 'enchant spear',  vocation = 3, price = 2000, level = 45})
        node22:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node23 = keywordHandler:addKeyword({'conjure power bolt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure power bolt for 2000 gp?'})
        node23:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'power bolt',  vocation = 3, price = 2000, level = 59})
        node23:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node24 = keywordHandler:addKeyword({'conjure bolt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure bolt for 750 gp?'})
        node24:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure bolt',  vocation = 3, price = 750, level = 17 })
        node24:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node25 = keywordHandler:addKeyword({'food'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn food for 300 gp?'})
        node25:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'food',  vocation = 3, price = 300, level = 14})
        node25:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node26 = keywordHandler:addKeyword({'magic rope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic rope for 200 gp?'})
        node26:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'magic rope',  vocation = 3, price = 200, level = 9})
        node26:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node27 = keywordHandler:addKeyword({'divine missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn divine missile for 1800 gp?'})
        node27:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'divine missile',  vocation = 3, price = 1800, level = 40})
        node27:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node28 = keywordHandler:addKeyword({'divine caldera'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn divine caldera for 3000 gp?'})
        node28:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'divine caldera',  vocation = 3, price = 3000, level = 50})
        node28:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
     
     
    local node29 = keywordHandler:addKeyword({'divine healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn divine healing for 3000 gp?'})
        node29:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'divine healing',  vocation = 3, price = 2100, level = 35})
        node29:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
       
     
    local node30 = keywordHandler:addKeyword({'intense healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn intense healing for 350 gp?'})
        node30:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing', vocation = 3, price = 350, level = 11})
        node30:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true}) 
     
    npcHandler:addModule(FocusModule:new())



    Código:
    <npc name="Paladin spells" script="data/npc/scripts/paladin spells.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="134" head="57" body="59" legs="40" feet="76" corpse="2212"/>
    <parameters>
    <parameter key="message_greet" value="Hello |PLAYERNAME|, For which level would you like to learn spells 8, 9, 10, 12, 13, 14, 15, 20, 21, 23, 24, 33, 35, 40, 45, 50 or 59 ?" />
    <parameter key="module_keywords" value="1" />
    <parameter key="keywords" value="59;50;45;40;35;33;24;23;21;20;17;16;15;14;13;12;11;10;9;8" />
     
    <parameter key="keyword_reply1" value="I can teach you, Power bolt" />
    <parameter key="keyword_reply2" value="I can teach you, divine caldera" />
    <parameter key="keyword_reply3" value="I can teach you, enchant spear" />
    <parameter key="keyword_reply4" value="I can teach you, divine missile" />
    <parameter key="keyword_reply5" value="I can teach you, invisibility and divine healing." />
    <parameter key="keyword_reply6" value="I can teach you, conjure piercing bolt" />
    <parameter key="keyword_reply7" value="I can teach you, explosive arrow and heavy magic missile" />
    <parameter key="keyword_reply8" value="I can teach you, conjure sniper arrow" />
    <parameter key="keyword_reply9" value="I can teach you, ethereal spear" />
    <parameter key="keyword_reply10" value="I can teach you, desintegrate" />
    <parameter key="keyword_reply11" value="I can teach you, ultimate healing" />
    <parameter key="keyword_reply12" value="I can teach you, destroy field and fireball" />
    <parameter key="keyword_reply13" value="I can teach you, poisoned arrow" />
    <parameter key="keyword_reply14" value="I can teach you, light magic missile" />
    <parameter key="keyword_reply15" value="I can teach you, Haste, food and magic shield" />
    <parameter key="keyword_reply16" value="I can teach you, conjure arrow and great light" />
    <parameter key="keyword_reply17" value="I can teach you, levitate" />
    <parameter key="keyword_reply18" value="I can teach you, intense healing" />
    <parameter key="keyword_reply19" value="I can teach you, Antidote" />
    <parameter key="keyword_reply20" value="I can teach you, light healing and magic rope." />
    <parameter key="keyword_reply21" value="I can teach you, light and find person" />
    </parameters>
    </npc>



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

    6default Re: [NPC] Spells por NPC el Mar Jul 04, 2017 2:29 pm

    Mizulead

    avatar
    Nuevo Miembro
    Nuevo Miembro
    ¡Mil gracias Maya! Justo lo que buscaba ^^

    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.