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('Good bye then.')
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('Ola ' .. creatureGetName(cid) .. '! Eu tenho todos os addons é só falar o nome da roupa e primeiro pro addon 1 e segundo pro addon 2 exemplo: warrior primeiro...Aviso: Nao vendo addon de summoner Female por ela nao ter a roupa!!!')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe-me, ' .. creatureGetName(cid) .. '! Falo com voce em um minuto.')
-- Citizen
elseif msgcontains(msg, 'citizen primeiro') then
selfSay('Voce tem as 100 Chiken Feathers necessarias para conseguir o addon?')
talk_state = 1
talk_start = os.clock()
elseif talk_state == 1 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5890) == 100 then
doPlayerRemoveItem(cid,5890,100)
doPlayerAddAddon(cid, 136, 1)
doPlayerAddAddon(cid, 128, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'citizen segundo') then
selfSay('Você tem os 100 minotaur leather necessarios para conseguir o addon?')
talk_state = 2
talk_start = os.clock()
elseif talk_state == 1 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5878) == 100 then
doPlayerRemoveItem(cid,5878,100)
doPlayerAddAddon(cid, 136, 2)
doPlayerAddAddon(cid, 128, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Mage
elseif msgcontains(msg, 'mage primeiro') then
selfSay('Você tem as 100 Holy Orchid necessarias para conseguir o addon?')
talk_state = 3
talk_start = os.clock()
elseif talk_state == 3 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5922) == 100 then
doPlayerRemoveItem(cid,5922,100)
doPlayerAddAddon(cid, 130, 1)
doPlayerAddAddon(cid, 138, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'mage segundo') then
selfSay('Você tem os 100 ape fur necessario para conseguir o addon?')
talk_state = 4
talk_start = os.clock()
elseif talk_state == 4 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5883) == 100 then
doPlayerRemoveItem(cid,5883,100)
doPlayerAddAddon(cid, 130, 2)
doPlayerAddAddon(cid, 138, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Hunter
elseif msgcontains(msg, 'hunter primeiro') then
selfSay('Você tem as 100 honeycombs necessarias para conseguir o addon?')
talk_state = 5
talk_start = os.clock()
elseif talk_state == 5 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5902) == 100 then
doPlayerRemoveItem(cid,5902,100)
doPlayerAddAddon(cid, 129, 1)
doPlayerAddAddon(cid, 137, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'hunter segundo') then
selfSay('Você tem a Sniper Gloves necessaria para conseguir o addon?')
talk_state = 6
talk_start = os.clock()
elseif talk_state == 6 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5875) == 1 then
doPlayerRemoveItem(cid,5875,1)
doPlayerAddAddon(cid, 129, 2)
doPlayerAddAddon(cid, 137, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Knight
elseif msgcontains(msg, 'knight primeiro') then
selfSay('Você tem os 100 Iron Ores necessarios para conseguir o addon?')
talk_state = 7
talk_start = os.clock()
elseif talk_state == 7 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5880) == 100 then
doPlayerRemoveItem(cid,5880,100)
doPlayerAddAddon(cid, 131, 1)
doPlayerAddAddon(cid, 139, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'knight segundo') then
selfSay('Você tem os 100 demon horn necessarios para conseguir o addon?')
talk_state = 8
talk_start = os.clock()
elseif talk_state == 8 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5954) == 100 then
doPlayerRemoveItem(cid,5954,100)
doPlayerAddAddon(cid, 131, 2)
doPlayerAddAddon(cid, 139, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Wizard
elseif msgcontains(msg, 'wizard primeiro') then
selfSay('Você tem os 100 Green Dragon Scale necessario para conseguir o addon?')
talk_state = 9
talk_start = os.clock()
elseif talk_state == 9 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5920) == 100 then
doPlayerRemoveItem(cid,5920,100)
doPlayerAddAddon(cid, 145, 1)
doPlayerAddAddon(cid, 149, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'wizard segundo') then
selfSay('Você tem os 50 Holy Orchids necessarios para conseguir o addon?')
talk_state = 10
talk_start = os.clock()
elseif talk_state == 10 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5922) == 50 then
doPlayerRemoveItem(cid,5922,50)
doPlayerAddAddon(cid, 145, 2)
doPlayerAddAddon(cid, 149, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Warrior
elseif msgcontains(msg, 'warrior primeiro') then
selfSay('Você tem as 50 Turtle Shells necessarias para conseguir o addon?')
talk_state = 11
talk_start = os.clock()
elseif talk_state == 11 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5899) == 50 then
doPlayerRemoveItem(cid,5899,50)
doPlayerAddAddon(cid, 134, 1)
doPlayerAddAddon(cid, 142, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'warrior segundo') then
selfSay('Você tem os 50 Ape Fur necessarios para conseguir o addon?')
talk_state = 12
talk_start = os.clock()
elseif talk_state == 12 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5877) == 50 then
doPlayerRemoveItem(cid,5877,50)
doPlayerAddAddon(cid, 134, 2)
doPlayerAddAddon(cid, 142, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Summoner
elseif msgcontains(msg, 'summoner primeiro') then
selfSay('Você tem os 50 Green Dragon Leather necessarios para conseguir o addon?')
talk_state = 13
talk_start = os.clock()
elseif talk_state == 13 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5877) == 50 then
doPlayerRemoveItem(cid,5877,50)
doPlayerAddAddon(cid, 133, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'summoner segundo') then
selfSay('Você tem os 200 bat wings necessarios para conseguir o addon?')
talk_state = 14
talk_start = os.clock()
elseif talk_state == 14 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5894) == 200 then
doPlayerRemoveItem(cid,5894,200)
doPlayerAddAddon(cid, 133, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Oriental
elseif msgcontains(msg, 'oriental primeiro') then
selfSay('Você tem os 100 Giant Spider Silk para conseguir o addon?')
talk_state = 15
talk_start = os.clock()
elseif talk_state == 15 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5879) == 100 then
doPlayerRemoveItem(cid,5879,100)
doPlayerAddAddon(cid, 146, 1)
doPlayerAddAddon(cid, 150, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'oriental segundo') then
selfSay('Você tem os 100 Blue Piece Of Cloth necessarios para conseguir o addon?')
talk_state = 16
talk_start = os.clock()
elseif talk_state == 16 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5912) == 100 then
doPlayerRemoveItem(cid,5912,100)
doPlayerAddAddon(cid, 146, 2)
doPlayerAddAddon(cid, 150, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Druid
elseif msgcontains(msg, 'druid primeiro') then
selfSay('Você tem as 100 Wolf Paws necessarias para conseguir o addon?')
talk_state = 17
talk_start = os.clock()
elseif talk_state == 17 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5897) == 100 then
doPlayerRemoveItem(cid,5897,100)
doPlayerAddAddon(cid, 144, 1)
doPlayerAddAddon(cid, 148, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'druid segundo') then
selfSay('Você tem os 100 Demon Dust necessarios para conseguir o addon?')
talk_state = 18
talk_start = os.clock()
elseif talk_state == 18 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5906) == 100 then
doPlayerRemoveItem(cid,5906,100)
doPlayerAddAddon(cid, 144, 2)
doPlayerAddAddon(cid, 148, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Barbarian
elseif msgcontains(msg, 'barbarian primeiro') then
selfSay('Você tem os 100 Giant Spider Silks necessarios para conseguir o addon?')
talk_state = 19
talk_start = os.clock()
elseif talk_state == 19 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5879) == 100 then
doPlayerRemoveItem(cid,5879,100)
doPlayerAddAddon(cid, 143, 1)
doPlayerAddAddon(cid, 147, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'druid segundo') then
selfSay('Você tem os 50 Green Piece of Cloth necessarios para conseguir o addon?')
talk_state = 20
talk_start = os.clock()
elseif talk_state == 20 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5910) == 50 then
doPlayerRemoveItem(cid,5910,50)
doPlayerAddAddon(cid, 143, 2)
doPlayerAddAddon(cid, 147, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Nobleman
elseif msgcontains(msg, 'nobleman primeiro') then
selfSay('Você tem os 100 brown piece of cloth necessarios para conseguir o addon?')
talk_state = 21
talk_start = os.clock()
elseif talk_state == 21 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5913) == 100 then
doPlayerRemoveItem(cid,5913,100)
doPlayerAddAddon(cid, 132, 1)
doPlayerAddAddon(cid, 140, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'nobleman segundo') then
selfSay('Você tem os 100 demonic essence necessarios para conseguir o addon?')
talk_state = 22
talk_start = os.clock()
elseif talk_state == 22 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) == 100 then
doPlayerRemoveItem(cid,6500,100)
doPlayerAddAddon(cid, 132, 2)
doPlayerAddAddon(cid, 140, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Assassin
elseif msgcontains(msg, 'assassin primeiro') then
selfSay('Você tem os 100 Red Dragon Leather necessarios para conseguir o addon?')
talk_state = 23
talk_start = os.clock()
elseif talk_state == 23 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5948) == 100 then
doPlayerRemoveItem(cid,5948,100)
doPlayerAddAddon(cid, 152, 1)
doPlayerAddAddon(cid, 156, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'assassin segundo') then
selfSay('Você tem os 100 White Pieces of Cloth necessarios para conseguir o addon?')
talk_state = 24
talk_start = os.clock()
elseif talk_state == 24 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5909) == 100 then
doPlayerRemoveItem(cid,5909,100)
doPlayerAddAddon(cid, 152, 2)
doPlayerAddAddon(cid, 156, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
--Beggar
elseif msgcontains(msg, 'beggar primeiro') then
selfSay('Você tem as 100 Minotaur Leather necessarias para conseguir o addon?')
talk_state = 25
talk_start = os.clock()
elseif talk_state == 25 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5878) == 100 then
doPlayerRemoveItem(cid,5878,100)
doPlayerAddAddon(cid, 153, 1)
doPlayerAddAddon(cid, 157, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'beggar segundo') then
selfSay('Você tem os 2000k necessarios para conseguir o addon?')
talk_state = 26
talk_start = os.clock()
elseif talk_state == 26 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) == 200 then
doPlayerRemoveItem(cid,2160,200)
doPlayerAddAddon(cid, 153, 2)
doPlayerAddAddon(cid, 157, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
--Norseman
elseif msgcontains(msg, 'norseman primeiro') then
selfSay('Você tem os 100 Red Dragon Scale necessarios para conseguir o addon?')
talk_state = 27
talk_start = os.clock()
elseif talk_state == 27 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5882) == 100 then
doPlayerRemoveItem(cid,5882,100)
doPlayerAddAddon(cid, 251, 1)
doPlayerAddAddon(cid, 252, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'norseman segundo') then
selfSay('Você tem as 100 iron ore necessarias para conseguir o addon?')
talk_state = 28
talk_start = os.clock()
elseif talk_state == 28 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5880) == 100 then
doPlayerRemoveItem(cid,5880,100)
doPlayerAddAddon(cid, 251, 2)
doPlayerAddAddon(cid, 252, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
--Pirate
elseif msgcontains(msg, 'pirate primeiro') then
selfSay('Você tem os 100 vampire dust necessarios para conseguir o addon?')
talk_state = 29
talk_start = os.clock()
elseif talk_state == 29 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6551) == 100 then
doPlayerRemoveItem(cid,6551,100)
doPlayerAddAddon(cid, 151, 1)
doPlayerAddAddon(cid, 155, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'pirate segundo') then
selfSay('Você tem as 100 demon dust necessarias para conseguir o addon?')
talk_state = 30
talk_start = os.clock()
elseif talk_state == 30 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5906) == 100 then
doPlayerRemoveItem(cid,5906,100)
doPlayerAddAddon(cid, 151, 2)
doPlayerAddAddon(cid, 155, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
--Shaman
elseif msgcontains(msg, 'shaman primeiro') then
selfSay('Você tem as 50 Behemonth Claw necessarias para conseguir o addon?')
talk_state = 31
talk_start = os.clock()
elseif talk_state == 31 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5930) == 50 then
doPlayerRemoveItem(cid,5930,50)
doPlayerAddAddon(cid, 154, 1)
doPlayerAddAddon(cid, 158, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'shaman segundo') then
selfSay('Você tem as 50 Staffs necessarias para conseguir o addon?')
talk_state = 32
talk_start = os.clock()
elseif talk_state == 32 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2401) == 50 then
doPlayerRemoveItem(cid,2401,50)
doPlayerAddAddon(cid, 154, 2)
doPlayerAddAddon(cid, 158, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Nightmare
elseif msgcontains(msg, 'nightmare primeiro') then
selfSay('Você tem os 50 Demoniac Essences necessarios para conseguir o addon?')
talk_state = 33
talk_start = os.clock()
elseif talk_state == 33 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) == 50 then
doPlayerRemoveItem(cid,6500,50)
doPlayerAddAddon(cid, 268, 1)
doPlayerAddAddon(cid, 269, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'nightmare segundo') then
selfSay('Você tem o 10000k necessario para conseguir o addon?')
talk_state = 34
talk_start = os.clock()
elseif talk_state == 34 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) == 1000 then
doPlayerRemoveItem(cid,2160,1000)
doPlayerAddAddon(cid, 268, 2)
doPlayerAddAddon(cid, 269, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Brotherwood
elseif msgcontains(msg, 'brotherwood primeiro') then
selfSay('Você tem os 200 Red Dragon Leather necessarios para conseguir o addon?')
talk_state = 35
talk_start = os.clock()
elseif talk_state == 35 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5948) == 200 then
doPlayerRemoveItem(cid,5948,200)
doPlayerAddAddon(cid, 278, 1)
doPlayerAddAddon(cid, 279, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'brotherwood segundo') then
selfSay('Você tem as 500 chicken feather necessarias para conseguir o addon?')
talk_state = 36
talk_start = os.clock()
elseif talk_state == 36 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5890) == 500 then
doPlayerRemoveItem(cid,5890,500)
doPlayerAddAddon(cid, 278, 2)
doPlayerAddAddon(cid, 279, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
-- Jesker
elseif msgcontains(msg, 'jesker primeiro') then
selfSay('Você tem os 100 Yellow Piece of Cloth necessarios para conseguir o addon?')
talk_state = 37
talk_start = os.clock()
elseif talk_state == 37 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5914) == 100 then
doPlayerRemoveItem(cid,5914,100)
doPlayerAddAddon(cid, 273, 1)
doPlayerAddAddon(cid, 270, 1)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'jesker segundo') then
selfSay('Você tem os 100 Green Piece of Cloth necessarios para conseguir o addon?')
talk_state = 38
talk_start = os.clock()
elseif talk_state == 38 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5910) == 100 then
doPlayerRemoveItem(cid,5910,100)
doPlayerAddAddon(cid, 273, 2)
doPlayerAddAddon(cid, 270, 2)
selfSay('Parabens !!! Voce Adiquiriu um novo addon.')
talk_state = 0
talk_start = os.clock()
else
selfSay('Desculpe Você nao tem o necessario para esse addon.')
talk_state = 0
talk_start = os.clock()
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 5 then
selfSay('Ate mais, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'nao') and getDistanceToCreature(cid) < 5 then
selfSay('Desculpe, ' .. creatureGetName(cid) .. '! Volte aqui quando tiver os itens nescessarios.')
talk_start = os.clock()
talk_state = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Ate mais.')
focus = 0
end
end
end