Npc's Que Ensinam Magias

bruxo
Por bruxo
em NPCs, monsters e raids
  • 1
  • 2

bruxo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/12/05Posts: 45

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 = 0

local 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 = 0

local 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 = 0

local 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 = 0

local 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 = 0

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

~~Mundo de Mirage, online

Para mais informações: www.mundodemirage.com

cherife

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/10/05Posts: 79

Gigante x.x

Pra eles não ensinarem a mesma mágia, tu pode colocar um storage value em cada spell, ai se o player tentar comprar de novo, vai checar o storage e lhe dizer que já possue a mágia.

Você aprendeu a magia, para usá-la fale utevo gran lux

Ao inves de "para usa-la fale..." não ficaria melhor "Para usa-la, pronuncie..."

sign.jpg

[Inspire before you expire.]

myamnarbar.jpg

bruxo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/12/05Posts: 45

@Cherife

 

Eu pensei em fazer isso, mas ia ficar meio feiinho xD.

 

To pensando em usar a função:

 

getPlayerSpell(algo assim), mas quando eu tentei fazer deu bug, mas eu já vou tentar de novo.

 

Tipo, esse script é fácil de fazer, só é xato colocar tantas magias xD.

 

E é só editar como tu quiser, crtl+h rulez xD.

~~Mundo de Mirage, online

Para mais informações: www.mundodemirage.com

cherife

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/10/05Posts: 79

Eu acho mais feio falar "fale isto" ;)

getPlayerLearnedInstantSpell(cid, name)

sign.jpg

[Inspire before you expire.]

myamnarbar.jpg

galam

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/04/07Posts: 1

Bruxo, ja joguei teu server..

e isso ai foi muito útil para mim

obrigado kara

Narutinhu

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/05/08Posts: 82Char no Tibia: Kagero Sinx

UP

Procurando Ot Perfeito :D

A revolução do furuto õ/



QUOTE
15:28 Follow Me [101]: SELL MLS (15:29 You see a magic longsword (Atk:55, Def:40). It weighs 43.00 oz. It is the magic Cyclopmania Sword.)[OFFER YOU]


omg? noob de mais --'

765765

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/02/08Posts: 28

up

up

up

merece up gente vamo la

BY 765765




FanBar...Te ajudei ??? Gosta de min ??? Usa minha Fanbar



Sou Fan de...

XGuardians

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 22/06/08Posts: 16

Ótimo, mais com alguns ajustes meu ficaria mais legal ainda para meu gosto, já estou arrumando aqui e jajá salvo.

Abraços



Guardians
___________



"Mesmo estando no caminho certo, se você ficar sentado será atropelado."





fdpinho

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/10/07Posts: 19

Isso Funciona no Aries XML?

gustavocordeiro

Sei Lah
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 24/09/07Posts: 103Char no Tibia: Kirack Tyril

~> Que decepção mano

copiou o npc magias do meu ot -.-'

 

ExORi SeRv ¬¬*



OoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOo

~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º

Se eu lutar, lute ao meu lado
Se eu morrer, morra junto a mim
Se eu correr, corra que fudeu tudo...

~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º ~º

OoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOo





~>ExORi OT SeRv =D

manirao

Atualmente Design e Programador (Freelancer): Adalton Roosevelt
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 27/07/07Posts: 153

Nao Fica MuiTo legal Mais Vlw o EsforÇo FLw

 

Ficou Mto Bom FUi

DragoR

(¯`·._.·`¯) Rafa (¯`·._.·`¯)
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 25/11/07Posts: 125Char no Tibia: Lacookie

É optimo para Ot's que tem de se comprar as spells (o meu xD)

 

Vlw

Cumprimentos, ~DragoR~

usebar002yi5ch5jl9pt9ov6.gif

Meus Trabalhos:

Bill Gates com Guarda Costas

Minha 1ª Fake!

Monstros Do Update (e Muito +)

~~Metas:~~

 

[X]1post

[X]5 posts (SERVO)

[X]10 posts (CAMPONÊS)

[X]25 posts (CAÇADOR)

[X]50 posts (CAVALEIRO)

[X]100 posts (BARONETE)

[ ]200 posts (BARÃO)

[ ]300 posts (VISCONDE)

[ ]400 posts (DUQUE)

[ ]600 posts (ARQUEDUQUE)

[ ]800 posts (ARISTOCRATA)

[ ]1000 posts (REGENTE)

[ ]1400 posts (SÁBIO)

[ ]1800 posts (SACERDOTE)

[ ]2500 posts (PRÍNCIPE)

 

chaves1

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/05/08Posts: 9Char no Tibia: Lord Blad

Mtooo Leegal :)

Vinicius Chaves

Procuraaando Um Otserv COm MAaapa De Roockguard Ediiiteeeeeed ::(

lolzin159357

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 23/07/08Posts: 25

Bom mesmo.........Gostei

MaPpEr RoX




SOU MAPPER/HOSTER








By ChIckeN

FelipeAugustoGuimaraesGome

Eu??
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 30/06/08Posts: 117Char no Tibia: Menor De Rook

N gostei muito nao :surprised::surprised::surprised:

--------------------------------------------------------------------------------

Assinatura

 

fanbarlo0.png

 

Minha Fan Bar Te ajudei? Entao Use

  • 1
  • 2