• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC [Release]Spell NPCs

only a few work of the spells :S like light, light healing but intense healing and higher wont work :S
 
I know, I've made some improvements, I'll edit the post in a sec. Sorry for not doing this sooner.
 
Here you got the full paladin spell teacher working for the newer TFS

-- Made by Empty with some help from Mokerhamer
-- May ONLY be released on OTland.net

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

-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end
-- OTServ event handling functions end


local node1 = keywordHandler:addKeyword({'light magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light magic missile?'})
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?'})
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?'})
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({'intense healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn intense healing?'})
node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Intense healing', vocation = 3, price = 200, level = 11})
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'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn antidote?'})
node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Antidote', vocation = 3, price = 150, level = 10})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node6 = keywordHandler:addKeyword({'great light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn great light?'})
node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'Great Light', 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({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn haste?'})
node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'Haste', vocation = 3, price = 500, level = 13})
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?'})
node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'levitate', vocation = 3, price = 500, 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({'conjure arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure arrow?'})
node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure arrow', vocation = 3, price = 450, level = 13})
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?'})
node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great light', vocation = 3, 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({'magic shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn magic shield?'})
node11:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'magic shield', vocation = 3, price = 450, 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({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light?'})
node12:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = 3, cost = 100, level = 8})
node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node13 = keywordHandler:addKeyword({'destroy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn destroy field?'})
node13:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'destroy field', vocation = 3, price = 700, level = 17})
node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node14 = keywordHandler:addKeyword({'fireball'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn fireball?'})
node14:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'fireball', vocation = 3, price = 800, level = 17})
node14:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node15 = keywordHandler:addKeyword({'poisoned arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to poisoned arrow?'})
node15:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure poison arrow', vocation = 3, price = 700, level = 16})
node15:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node16 = keywordHandler:addKeyword({'ultimate healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ultimate healing?'})
node16:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'ultimate healing', vocation = 3, price = 1000, level = 20})
node16:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node17 = keywordHandler:addKeyword({'desintegrate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn desintegrate?'})
node17:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'desintegrate', vocation = 3, price = 900, level = 21})
node17:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node18 = keywordHandler:addKeyword({'ethereal spear'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn ethereal spear?'})
node18:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'ethereal spear', vocation = 3, price = 1100, level = 23})
node18:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node19 = keywordHandler:addKeyword({'conjure sniper arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure sniper arrow?'})
node19:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure sniper arrow', vocation = 3, price = 1100, level = 23})
node19:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node20 = keywordHandler:addKeyword({'explosive arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn explosive arrow?'})
node20:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure explosive arrow', vocation = 3, price = 1000, level = 25})
node20:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node21 = keywordHandler:addKeyword({'heavy magic missile'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn heavy magic missile?'})
node21:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'heavy magic missile', vocation = 3, price = 1500, level = 25})
node21:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node22 = keywordHandler:addKeyword({'conjure piercing bolt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn conjure piercing bolt?'})
node22:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure piercing bolt', vocation = 3, price = 850, level = 33})
node22:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node23 = keywordHandler:addKeyword({'invisible'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn invisible?'})
node23:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'stealth', vocation = 3, price = 2000, level = 35})
node23:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node24 = keywordHandler:addKeyword({'enchant spear'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn enchant spear?'})
node24:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = yes, spellName = 'enchant spear', vocation = 3, price = 2000, level = 45})
node24:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})


local node25 = keywordHandler:addKeyword({'power bolt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Power bolt?'})
node25:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure power bolt', vocation = 3, price = 2000, level = 59})
node25:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})

local node26 = keywordHandler:addKeyword({'conjure bolt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Conjure bolt?'})
node26:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'conjure bolt', vocation = 3, price = 800, level = 17})
node26:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})



npcHandler:addModule(FocusModule:new())

All spells work 100% tested by myself
 
I've fixed all of them, and I know these works, since Radonia is currently using them.
 
the sorc one doesn't :S like 3/5 of spells work

here is an example:

20:26 Sorc [800]: force strike -NOPE
20:26 Sorc [800]: energy strike
20:26 Ferumbo: Would you like to learn energy strike for 600 gp?
20:26 Sorc [800]: yes
20:26 Ferumbo: You have learned energy strike.
20:26 Sorc [800]: intense healing -NOPE
20:27 Ferumbo: Good bye, Sorc!
Hi
20:28 Sorc [800]: magic rope
20:28 Sorc [800]: magic shield
no responds

I checked the config if all nodes were right, yup.. whats wrong? thanks for your fast reply

btw you made a typo at destroy field
you typed spellname = festroy field :p
 
Last edited:
Yes I did
The ones not working for sorc:

force Strike
intense healing
magic rope
magic shield

and u need to change the typo at destroy field (sorc) spellname = festroy field (already changed mine)
 
I've found the problem and will post the fixed script soon. Thanks for reporting this man.
 
Np I really like those scripts, were looking for those :)
Testing the druid one now, then I will test the knight one


Druid so far:
Energy strike - Not working
Flame strike - Not working
Magic Shield - Not working
Poison Field - Not working
Fire Field - Not working
Convince Creature - Not working
Destroy Field - Not working
Ultimate Healing - Not working (Exura Vita)
Heavy Magic Missile - Not working
Chameleon - Not working





20:44 Druid [9999]: antidote rune
20:44 Alice: Would you like to learn antidote for 150 gp?
20:44 Druid [9999]: yes

20:43 Alice: I can teach you, great light
20:43 Druid [9999]: great light
20:43 Alice: Would you like to learn light for 100 gp?

20:45 Druid [9999]: light magic misile
20:45 Alice: Would you like to learn light for 100 gp?
20:45 Druid [9999]: light magic missile
20:45 Alice: Would you like to learn light for 100 gp?

20:48 Druid [9999]: 26
20:48 Alice: I can teach you, ultimate light
20:48 Druid [9999]: ultimate light
20:48 Alice: Would you like to learn light for 100 gp?


20:50 Alice: Would you like to learn iInvisible for 2000 gp?

20:50 Alice: You have learned fire fall. :p


Thats it for the druids
 
Last edited:
Edited the Sorc NPC now, it should work, I just had a few really small typos in it. were stressed when I made them.

EDIT: Druid NPC fixed, I must've been drunk when I edited those scripts for 8.0. o_O Druid should be working now

EDIT2: I've checked all the NPCs and updated the last one at the same time this edit was done, please update the scripts if you copied them before.
 
Last edited:
Testing the knight one right now :)
Only light doesnt work for the knight one.
 
Last edited:
Druid still not working properly.

Ultimate Healing - Not working (Exura Vita)
Heavy Magic Missile - Not working
Chameleon - Not working





20:44 Druid [9999]: antidote rune
20:44 Alice: Would you like to learn antidote for 150 gp?
20:44 Druid [9999]: yes


20:45 Druid [9999]: light magic misile
20:45 Alice: Would you like to learn light for 100 gp?
20:45 Druid [9999]: light magic missile
20:45 Alice: Would you like to learn light for 100 gp?

20:48 Druid [9999]: 26
20:48 Alice: I can teach you, ultimate light
20:48 Druid [9999]: ultimate light
20:48 Alice: Would you like to learn light for 100 gp?

Those things are still same. Please fix them :)


Edit:


Sorcerer magic shield not working
Knight light not working
Druid (SEE ABOVE)

Edit2:
Sorcerer magic shield isnt even added (i added it now)
 
Last edited:
It should work, I can't see anything wrong with it. o_O (knight problem)
 
Modified Druid's and it should work. What about the magic shield? what does it say? And also, what does the knight spell NPC say?

EDIT:
Edit2:
Sorcerer magic shield isnt even added (i added it now)

it is added, node12 o_O
 
Last edited:
The sorcerer magic shield just wont work in some way..
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 = 450, level = 15})
node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})

He just doesn't respond when you say magic shield, same for the knight light
 
weird, let me have a look at it again.


EDIT: edited the script now, try again.
 
Last edited:
Druid is still same..

Ultimate Healing Rune - Not working (RUNE) (NO RESPOND)
Heavy Magic Missile - Not working (NO RESPOND
Chameleon - Not working (NO RESPOND)





20:44 Druid [9999]: antidote rune
20:44 Alice: Would you like to learn antidote for 150 gp?
20:44 Druid [9999]: yes


20:45 Druid [9999]: light magic misile
20:45 Alice: Would you like to learn light for 100 gp?
20:45 Druid [9999]: light magic missile
20:45 Alice: Would you like to learn light for 100 gp?

20:48 Druid [9999]: 26
20:48 Alice: I can teach you, ultimate light
20:48 Druid [9999]: ultimate light
20:48 Alice: Would you like to learn light for 100 gp?


Edit: I changed ultimate healing rune to UH rune
21:18 Druid [9999]: uh rune
21:18 Alice: Would you like to learn ultimate healing rune for 1500 gp?
21:18 Druid [9999]: hmm
21:18 Alice: Would you like to learn heavy magic missile for 1500 gp?
 
Last edited:
I think I found the source of the problem..

When there are 2 or more spells with one or more of the same word it wont work.

Look, MAGIC SHIELD doesn't work, but MAGIC ROPE does because it's on lower node.. Same for Heavy magic misile and light, antidote spells. can you make it if msgcontains?

Altough haste and strong haste works :S
 
You're correct in one of the statements, the light spell errors are caused by that, I can explain how the server "thinks" when it reads the scripts, it goes after keywords, and if it's searching for 'light' healing, it scans the list and finds one of the keywords, in this case light it just goes with that. That's why the light spell should be after all the others that begins with light. And I think all of them are now, try it again, and the Antidote is the same. But I still don't get why Magic shield and Magic rope collides, it shouldn't be possible.
 
Back
Top