NPC's do Mundo de Mirage feitos 100% por bruxo
Como meu primeiro post útil aqui, eu venho postar pela primeira vez em um fórum os meus NPC's que ensinam magias , notem que as mensagens estão configuradas para o Mundo de Mirage, mas vocês podem mudá-los fácilmente:
IMPORTANTE: Isso só funcionará em servidores The Forgotten Server, não funcionará em Evolutions, para funcionar você terá que trocar a função playerLearnInstantSpell pela do Evolutions que ensina spells.
Esses 4 NPC's vocês podem colocar em qualquer lugar, eles ensinam magias para free accounts:
Para Sorcerers:
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Adeus.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Olá meu jovem, eu sou o mais poderoso sorcerer de Morgdah, posso lhe ensinar muitas magias. Você quer ser meu aprendiz?')
focus = cid
talk_state = 0
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Agora estou ocupado.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('Fale o nome de qualquer magia e eu lhe ensinarei por uma certa quantia de ouro.')
talk_state = 1
vocation = getPlayerVocation(cid)
elseif msgcontains(msg, 'great light') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo gran lux.')
playerLearnInstantSpell(cid, 'Great Light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'light healing') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,170) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura.')
playerLearnInstantSpell(cid, 'Light Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'intense healing') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,350) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura gran.')
playerLearnInstantSpell(cid, 'Intense Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'heavy magic missile') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran.')
playerLearnInstantSpell(cid, 'Heavy Magic Missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'ultimate healing') and talk_state == 1 and string.len(msg) == 16 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura vita.')
playerLearnInstantSpell(cid, 'Ultimate Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'great fireball') and talk_state == 1 and string.len(msg) == 14 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1200) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran flam.')
playerLearnInstantSpell(cid, 'Great Fireball')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'magic shield') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,450) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utamo vita.')
playerLearnInstantSpell(cid, 'Magic Shield')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'sudden death') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,3000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori vita vis.')
playerLearnInstantSpell(cid, 'Sudden Death')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'explosion') and talk_state == 1 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas hur.')
playerLearnInstantSpell(cid, 'Explosion')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'light') and talk_state == 1 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,100) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo lux.')
playerLearnInstantSpell(cid, 'Light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'cancel invisibility') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana ina.')
playerLearnInstantSpell(cid, 'Cancel Invisibility')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'summon creature') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo res "nomedobixo.')
playerLearnInstantSpell(cid, 'Summon Creature')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'find person') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,80) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exiva "nome da pessoa.')
playerLearnInstantSpell(cid, 'Find Person')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'antidote') and talk_state == 1 and string.len(msg) == 8 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,150) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana pox.')
playerLearnInstantSpell(cid, 'Antidote')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'destroy field') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,700) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adito grav.')
playerLearnInstantSpell(cid, 'Destroy Field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'great energy beam') and talk_state == 1 and string.len(msg) == 17 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo gran vis lux.')
playerLearnInstantSpell(cid, 'Great Energy Beam')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'energy field') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,700) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav vis.')
playerLearnInstantSpell(cid, 'Energy Field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'energy wave') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo mort hur.')
playerLearnInstantSpell(cid, 'Energy Wave')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'energy wall') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas grav vis.')
playerLearnInstantSpell(cid, 'Energy Wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'fire field') and talk_state == 1 and string.len(msg) == 10 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav flam.')
playerLearnInstantSpell(cid, 'Fire Field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'fire wall') and talk_state == 1 and string.len(msg) == 9 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas grav flam.')
playerLearnInstantSpell(cid, 'Fire Wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'fire wave') and talk_state == 1 and string.len(msg) == 9 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,850) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo flam hur.')
playerLearnInstantSpell(cid, 'Fire Wave')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'fireball') and talk_state == 1 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori flam.')
playerLearnInstantSpell(cid, 'Fireball')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'firebomb') and talk_state == 1 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas flam.')
playerLearnInstantSpell(cid, 'Fire Bomb')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'great energy beam') and talk_state == 1 and string.len(msg) == 17 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo gran vis lux.')
playerLearnInstantSpell(cid, 'Great Energy Beam')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'great fireball') and talk_state == 1 and string.len(msg) == 14 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1200) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran flam.')
playerLearnInstantSpell(cid, 'Great Fireball')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'light magic missile') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori.')
playerLearnInstantSpell(cid, 'Light Magic Missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'poison field') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,300) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav pox.')
playerLearnInstantSpell(cid, 'Poison Field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'poison wall') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas grav pox.')
playerLearnInstantSpell(cid, 'Poison Wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Que Fleros o guie em seu árduo caminho.')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Adeus.')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Que a sabedoria de Aisha ilumine o seu caminho.')
focus = 0
end
end
end
Para druids:
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Adeus.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Seja bem vindo a nossa humilde guilda, eu mesmo posso lhe ensinar várias magias, você quer aprender alguma?')
focus = cid
talk_state = 0
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Agora estou ocupado.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('Fale o nome dela e eu verei o que eu posso fazer.')
talk_state = 1
vocation = getPlayerVocation(cid)
elseif msgcontains(msg, 'light healing') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,170) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura.')
playerLearnInstantSpell(cid, 'light healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'intense healing') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,350) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura gran.')
playerLearnInstantSpell(cid, 'intense healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'heavy magic missile') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran.')
playerLearnInstantSpell(cid, 'heavy magic missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'ultimate healing') and talk_state == 1 and string.len(msg) == 16 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura vita.')
playerLearnInstantSpell(cid, 'ultimate healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'great fireball') and talk_state == 1 and string.len(msg) == 14 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1200) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran flam.')
playerLearnInstantSpell(cid, 'great fireball')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'magic shield') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,450) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utamo vita.')
playerLearnInstantSpell(cid, 'magic shield')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'create food') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,150) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo pan.')
playerLearnInstantSpell(cid, 'create food')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'explosion') and talk_state == 1 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas hur.')
playerLearnInstantSpell(cid, 'explosion')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'light') and talk_state == 1 and string.len(msg) == 5 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,100) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo lux.')
playerLearnInstantSpell(cid, 'light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'invisible') and talk_state == 1 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana ina.')
playerLearnInstantSpell(cid, 'invisible')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'summon creature') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo res "nome do monstro.')
playerLearnInstantSpell(cid, 'summon creature')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'find person') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,80) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exiva "nome da pessoa.')
playerLearnInstantSpell(cid, 'find person')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'antidote') and talk_state == 1 and string.len(msg) == 8 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,150) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana pox.')
playerLearnInstantSpell(cid, 'antidote')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'destroy field') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,700) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adito grav.')
playerLearnInstantSpell(cid, 'destroy field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'intense healing rune') and talk_state == 1 and string.len(msg) == 20 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adura gran.')
playerLearnInstantSpell(cid, 'intense Healing rune')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'energy field') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,700) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav vis.')
playerLearnInstantSpell(cid, 'energy field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'energy wall') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas grav vis.')
playerLearnInstantSpell(cid, 'energy wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'ultimate healing rune') and talk_state == 1 and string.len(msg) == 21 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adura vita.')
playerLearnInstantSpell(cid, 'ultimate healing rune')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'fire field') and talk_state == 1 and string.len(msg) == 10 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav flam.')
playerLearnInstantSpell(cid, 'fire field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'fire wall') and talk_state == 1 and string.len(msg) == 9 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas grav flam.')
playerLearnInstantSpell(cid, 'fire wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'create illusion') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,850) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo res ina "nome da criatura.')
playerLearnInstantSpell(cid, 'create illusion')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'fireball') and talk_state == 1 and string.len(msg) == 8 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori flam.')
playerLearnInstantSpell(cid, 'fireball')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'firebomb') and talk_state == 1 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas flam.')
playerLearnInstantSpell(cid, 'fire bomb')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'convince creature') and talk_state == 1 and string.len(msg) == 17 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adeta sio.')
playerLearnInstantSpell(cid, 'convince creature')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'great fireball') and talk_state == 1 and string.len(msg) == 14 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1200) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran flam.')
playerLearnInstantSpell(cid, 'great fireball')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'great light') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo gran lux.')
playerLearnInstantSpell(cid, 'great light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'light magic missile') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori.')
playerLearnInstantSpell(cid, 'light magic missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'poison field') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,300) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav pox.')
playerLearnInstantSpell(cid, 'poison field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
elseif msgcontains(msg, 'poison wall') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas grav pox.')
playerLearnInstantSpell(cid, 'poison wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druida para aprender.')
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Que Fleros o guie em sua jornada!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Próximo por favor.')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Que a sabedoria de Aisha ilumine o seu caminho.')
focus = 0
end
end
end
Para paladins:
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Adeus.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Migsh, seja bem vindo a nossa guilda, eu posso lhe ensinar algumas magias, você quer aprender?')
focus = cid
talk_state = 0
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Agora estou ocupado.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('São várias magias, fale o nome de uma delas e começaremos.')
talk_state = 1
vocation = getPlayerVocation(cid)
elseif msgcontains(msg, 'great light') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo gran lux.')
playerLearnInstantSpell(cid, 'great light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender..')
end
elseif msgcontains(msg, 'ultimate healing') and talk_state == 1 and string.len(msg) == 16 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura vita.')
playerLearnInstantSpell(cid, 'Ultimate Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'light healing') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,100) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura.')
playerLearnInstantSpell(cid, 'Light Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você não é paladino.')
end
elseif msgcontains(msg, 'light') and talk_state == 1 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,170) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo lux.')
playerLearnInstantSpell(cid, 'Light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'intense healing') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,350) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura gran.')
playerLearnInstantSpell(cid, 'Intense Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'heavy magic missile') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori gran.')
playerLearnInstantSpell(cid, 'Heavy Magic Missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'create food') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,150) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo pan.')
playerLearnInstantSpell(cid, 'Create Food')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'magic shield') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,450) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utamo vita.')
playerLearnInstantSpell(cid, 'Magic Shield')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'conjure arrow') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,450) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo con.')
playerLearnInstantSpell(cid, 'Conjure Arrow')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'explosive arrow') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo con flam.')
playerLearnInstantSpell(cid, 'Explosive Arrow')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'find person') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exiva "nome da pessoa.')
playerLearnInstantSpell(cid, 'Find Person')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'antidote') and talk_state == 1 and string.len(msg) == 8 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,150) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana pox.')
playerLearnInstantSpell(cid, 'antidote')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'destroy field') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,700) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adito grav.')
playerLearnInstantSpell(cid, 'Destroy Field')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'light magic missile') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adori.')
playerLearnInstantSpell(cid, 'Light Magic Missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
elseif msgcontains(msg, 'invisible') and talk_state == 1 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utana vid.')
playerLearnInstantSpell(cid, 'Invisible')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladino para aprender.')
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Que Fleros esteja sempre em seu coração!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Próximo por favor.')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Que a sabedoria de Aisha ilumine o seu caminho.')
focus = 0
end
end
end
Para Knights:
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Adeus.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Força meu jovem, eu ensino magias para knight, você quer aprender alguma?')
focus = cid
talk_state = 0
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Agora estou ocupado.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('Eu posso lhe ensinar muitas magias, qual você quer aprender?')
talk_state = 1
vocation = getPlayerVocation(cid)
elseif msgcontains(msg, 'light healing') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,170) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura.')
playerLearnInstantSpell(cid, 'light healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
elseif msgcontains(msg, 'great light') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo gran lux.')
playerLearnInstantSpell(cid, 'great light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
elseif msgcontains(msg, 'light') and talk_state == 1 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,100) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo lux.')
playerLearnInstantSpell(cid, 'light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
elseif msgcontains(msg, 'find person') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,80) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exiva "nome.')
playerLearnInstantSpell(cid, 'find person')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
elseif msgcontains(msg, 'antidote') and talk_state == 1 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,150) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana pox.')
playerLearnInstantSpell(cid, 'antidote')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Que Fleros una todos de seu povo!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Próximo por favor.')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Que o ódio de Leshiro não tome seu coração.')
focus = 0
end
end
end
Esse npc, você põe na área premium de seu servidor:
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Adeus.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Seja bem vindo a maior guilda de magias de todo o Mundo de Mirage, eu posso lhe ensinar várias magias que você nunca irá aprender em outras guildas, você quer aprender?')
focus = cid
talk_state = 0
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Agora estou ocupado.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sim') then
selfSay('Fale o nome dela, e veremos se você é forte o suficiente.')
talk_state = 1
vocation = getPlayerVocation(cid)
elseif msgcontains(msg, 'berserk') and talk_state == 1 and string.len(msg) == 7 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,170) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exori.')
playerLearnInstantSpell(cid, 'Berserk')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
elseif msgcontains(msg, 'cancel invisibility') and talk_state == 1 and string.len(msg) == 19 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,1600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana ina.')
playerLearnInstantSpell(cid, 'Cancel Invisibility')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'challenge') and talk_state == 1 and string.len(msg) == 9 then
if vocation == 4 then
if doPlayerRemoveMoney(cid,200) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exeta res.')
playerLearnInstantSpell(cid, 'Heavy Magic Missile')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser knight para aprender.')
end
elseif msgcontains(msg, 'conjure bolt') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,750) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo con mort.')
playerLearnInstantSpell(cid, 'Ultimate Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladin para aprender.')
end
elseif msgcontains(msg, 'desintegrate') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 or 2 or 3 then
if doPlayerRemoveMoney(cid,900) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adito tera.')
playerLearnInstantSpell(cid, 'Desintegrate')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer, druid ou paladin para aprender.')
end
elseif msgcontains(msg, 'enchant staff') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exeta vis.')
playerLearnInstantSpell(cid, 'Enchant Staff')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'energy strike') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 1 or 2 then
if doPlayerRemoveMoney(cid,800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exori vis.')
playerLearnInstantSpell(cid, 'Energy Strike')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer ou druid para aprender.')
end
elseif msgcontains(msg, 'energy bomb') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2300) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas vis.')
playerLearnInstantSpell(cid, 'Energy Bomb')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'envenom') and talk_state == 1 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo res pox.')
playerLearnInstantSpell(cid, 'Envenom')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'flame strike') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 or 2 then
if doPlayerRemoveMoney(cid,800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exori flam.')
playerLearnInstantSpell(cid, 'Flame Strike')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer ou druid para aprender.')
end
elseif msgcontains(msg, 'force strike') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exori mort.')
playerLearnInstantSpell(cid, 'Force Strike')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'haste') and talk_state == 1 and string.len(msg) == 5 then
if doPlayerRemoveMoney(cid,600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utani hur.')
playerLearnInstantSpell(cid, 'Haste')
else
selfSay('Você não tem dinheiro.')
end
elseif msgcontains(msg, 'heal friend') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura sio "nome da pessoa.')
playerLearnInstantSpell(cid, 'Heal Friend')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
elseif msgcontains(msg, 'levitate') and talk_state == 1 and string.len(msg) == 8 then
if doPlayerRemoveMoney(cid,500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exani hur "up ou down')
playerLearnInstantSpell(cid, 'Levitate')
else
selfSay('Você não tem dinheiro.')
end
elseif msgcontains(msg, 'magic rope') and talk_state == 1 and string.len(msg) == 10 then
if doPlayerRemoveMoney(cid,200) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exani tera.')
playerLearnInstantSpell(cid, 'Magic Rope')
else
selfSay('Você não tem dinheiro.')
end
elseif msgcontains(msg, 'magic wall') and talk_state == 1 and string.len(msg) == 10 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,2100) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo grav tera.')
playerLearnInstantSpell(cid, 'Magic Wall')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'mass healing') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2500) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exura gran mas res.')
playerLearnInstantSpell(cid, 'Mass Healing')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
elseif msgcontains(msg, 'paralyze') and talk_state == 1 and string.len(msg) == 8 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1900) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adana ani.')
playerLearnInstantSpell(cid, 'Paralyze')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
elseif msgcontains(msg, 'poison bomb') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,1000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo mas pox.')
playerLearnInstantSpell(cid, 'Poison Bomb')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
elseif msgcontains(msg, 'poison storm') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,3400) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo gran mas pox.')
playerLearnInstantSpell(cid, 'Poison Storm')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
elseif msgcontains(msg, 'power bolt') and talk_state == 1 and string.len(msg) == 10 then
if vocation == 3 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo con vis.')
playerLearnInstantSpell(cid, 'Power Bolt')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser paladin para aprender.')
end
elseif msgcontains(msg, 'soul fire') and talk_state == 1 and string.len(msg) == 9 then
if vocation == 1 or 2 then
if doPlayerRemoveMoney(cid,1800) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale adevo res flam.')
playerLearnInstantSpell(cid, 'Soul Fire')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer ou druid para aprender.')
end
elseif msgcontains(msg, 'strong haste') and talk_state == 1 and string.len(msg) == 12 then
if vocation == 1 or 2 then
if doPlayerRemoveMoney(cid,1300) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utani gran hur.')
playerLearnInstantSpell(cid, 'Strong Haste')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer ou druid para aprender.')
end
elseif msgcontains(msg, 'ultimate explosion') and talk_state == 1 and string.len(msg) == 18 then
if vocation == 1 then
if doPlayerRemoveMoney(cid,8000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo gran mas vis.')
playerLearnInstantSpell(cid, 'Ultimate Explosion')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer para aprender.')
end
elseif msgcontains(msg, 'ultimate light') and talk_state == 1 and string.len(msg) == 15 then
if vocation == 1 or 2 then
if doPlayerRemoveMoney(cid,1600) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale utevo vis lux.')
playerLearnInstantSpell(cid, 'Ultimate Light')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser sorcerer ou druid para aprender.')
end
elseif msgcontains(msg, 'undead legion') and talk_state == 1 and string.len(msg) == 13 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exana mas mort.')
playerLearnInstantSpell(cid, 'Undead Legion')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
elseif msgcontains(msg, 'wild growth') and talk_state == 1 and string.len(msg) == 11 then
if vocation == 2 then
if doPlayerRemoveMoney(cid,2000) == 1 then
selfSay('Você aprendeu a magia, para usá-la fale exevo grav vita.')
playerLearnInstantSpell(cid, 'Wild Growth')
else
selfSay('Você não tem dinheiro.')
end
else
selfSay('Você tem que ser druid para aprender.')
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Que Leshiro o guie em seu caminho!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Próximo por favor.')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Que a sabedoria de Aisha ilumine o seu caminho.')
focus = 0
end
end
end
Espero que gostem xD, eu pretendo trazer muitos outros trabalhos meus para cá.
Bugs conhecidos:
- Eles ensinam mais de uma vez a mesma magia.