Ir para conteúdo

Addon Global...igualzin


RenatoPdz

Posts Recomendados

Meu primeiro topico aki....

Eu estava precisando de um npc q dece os addons igual a do global... eu proucurava no forum em todo lugar todos que eu achava nao dava certo... ai resolvi fazer um proprio. ( realmente demoro muiiito) mais due certo.

Primeiro.

Va no data/npc

Pegue um npc... e copieo.

Faça de sua preferencia...

Mais qualquer coisa use este.

 

<?xml version="1.0"?>

<npc name="Wizard of Sparta" script="data/npc/scripts/addon.lua" access="3">  autowalk="150" floorchange="0" access="5" lookdir="2">

<mana now="800" max="800"/>
<health now="800" max="800"/>
 <look type="279" head="114" body="94" legs="0" feet="0" addons="3" /> 
<parameters>
<parameter key="message_greet" value="Greetings |PLAYERNAME|. Will you help me? If you do, I'll reward you with nice addons! Just say 'addons' or 'help' if you don't know what to do." />
</parameters>

***
</npc>



 

Logo depois va em (data\npc\scripts)

Quase todos os otserver tem uma pasta chamada Addon.lua, abra-a, se nao tiver, renomeia para "addon.lua" e copie um arquivo lua e cole isto ai dentro:

 

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 ' .. getCreatureName(cid) .. '! Eu vendo addons diga exemplo: Mage 1, Assassin 2.')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! Eu falo com voce em um minuto.')


-- Citizen

elseif msgcontains(msg, 'citizen 1') then
selfSay('Poderia trazer 100 minotaur leathers?')
talk_state = 1
talk_start = os.clock()

elseif talk_state == 1 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5878) >= 100 then
if doPlayerRemoveItem(cid,5878,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 136, 1)
doPlayerAddAddon(cid, 128, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'citizen 2') then
selfSay('Poderia trazer 100 chicken feathers, 50 honeycombs and the legion helmet?')
talk_state = 2
talk_start = os.clock()

elseif talk_state == 2 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
if doPlayerRemoveItem(cid,5890,100) and doPlayerRemoveItem(cid,5902,50) and doPlayerRemoveItem(cid,2480,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAdAddon(cid, 136, 2)
doPlayerAddAddon(cid, 128, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end

-- Mage

elseif msgcontains(msg, 'mage 1') then
selfSay('Poderia trazer um Ferumbras Hat ?')
talk_state = 3
talk_start = os.clock()

elseif talk_state == 3 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5903) >= 1 then
if doPlayerRemoveItem(cid,5903,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 130, 1)
doPlayerAddAddon(cid, 138, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'mage 2') then
selfSay('You are have the 1 Soul Stone, 20 Ankh, 10 Magic Sulphur, Todas RODs WANDs?')
talk_state = 4
talk_start = os.clock()

elseif talk_state == 4 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5809) >= 1 and getPlayerItemCount(cid,2190) >= 1 and getPlayerItemCount(cid,2191) >= 1 and getPlayerItemCount(cid,2188) >= 1 and getPlayerItemCount(cid,2189) >= 1 and getPlayerItemCount(cid,2187) >= 1 and getPlayerItemCount(cid,2182) >= 1 and getPlayerItemCount(cid,2186) >= 1 and getPlayerItemCount(cid,2185) >= 1 and getPlayerItemCount(cid,2181) >= 1 and getPlayerItemCount(cid,2183) >= 1 and getPlayerItemCount(cid,6547) >= 10 and getPlayerItemCount(cid,2193) >= 20 then
if doPlayerRemoveItem(cid,5809,1) and doPlayerRemoveItem(cid,2190,1) and doPlayerRemoveItem(cid,2191,1) and doPlayerRemoveItem(cid,2188,1) and doPlayerRemoveItem(cid,2189,1) and doPlayerRemoveItem(cid,2187,1) and doPlayerRemoveItem(cid,2182,1) and doPlayerRemoveItem(cid,2186,1) and doPlayerRemoveItem(cid,2185,1) and doPlayerRemoveItem(cid,2181,1) and doPlayerRemoveItem(cid,2183,1) and doPlayerRemoveItem(cid,6547,10) and doPlayerRemoveItem(cid,2193,20) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 130, 2)
doPlayerAddAddon(cid, 138, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end

-- Hunter

elseif msgcontains(msg, 'hunter 1') then
selfSay('Poderia trazer the engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings, royal steel, hell steel and draconian steel?')
talk_state = 5
talk_start = os.clock()

elseif talk_state == 5 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5947) >= 1 and getPlayerItemCount(cid,5876) >= 100 and getPlayerItemCount(cid,5948) >= 100 and getPlayerItemCount(cid,5891) >= 5 and getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5888) >= 1 and getPlayerItemCount(cid,5889) then
if doPlayerRemoveItem(cid,5947,1) and doPlayerRemoveItem(cid,5876,100) and doPlayerRemoveItem(cid,5948,100) and doPlayerRemoveItem(cid,5891,5) and doPlayerRemoveItem(cid,5887,1) and doPlayerRemoveItem(cid,5888,1) and doPlayerRemoveItem(cid,5889,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 129, 1)
doPlayerAddAddon(cid, 137, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'hunter 2') then
selfSay('You are have the Sniper Gloves needs for addon?')
talk_state = 6
talk_start = os.clock()

elseif talk_state == 6 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5875) >= 1 then
if doPlayerRemoveItem(cid,5875,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 129, 2)
doPlayerAddAddon(cid, 137, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Knight

elseif msgcontains(msg, 'knight 1') then
selfSay('Poderia trazer the chunk of crude iron and 100 iron ores?')
talk_state = 7
talk_start = os.clock()

elseif talk_state == 7 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
if doPlayerRemoveItem(cid,5880,100) and doPlayerRemoveItem(cid,5892,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 131, 1)
doPlayerAddAddon(cid, 139, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'knight 2') then
selfSay('Poderia trazer 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat, and royal steel?')
talk_state = 8
talk_start = os.clock()

elseif talk_state == 8 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5893) >= 100 and getPlayerItemCount(cid,5924) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5887) >= 1 then
if doPlayerRemoveItem(cid,5893,100) and doPlayerRemoveItem(cid,5924,1) and doPlayerRemoveItem(cid,5885,1) and doPlayerRemoveItem(cid,5887,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 131, 2)
doPlayerAddAddon(cid, 139, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Wizard

elseif msgcontains(msg, 'wizard 1') then
selfSay('Poderia trazer medusa shield, a dragon scale mail, a ring of the sky and crown legs?')
talk_state = 9
talk_start = os.clock()

elseif talk_state == 9 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2488) >= 1 and getPlayerItemCount(cid,2492) >= 1 and getPlayerItemCount(cid,2123) >= 1 and getPlayerItemCount(cid,2536) >= 1 then
if doPlayerRemoveItem(cid,2488,1) and doPlayerRemoveItem(cid,2492,1) and doPlayerRemoveItem(cid,2123,1) and doPlayerRemoveItem(cid,2536,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 145, 1)
doPlayerAddAddon(cid, 149, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'wizard 2') then
selfSay('Poderia trazer 50 holy orchids?')
talk_state = 10
talk_start = os.clock()

elseif talk_state == 10 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5922) >= 50 then
if doPlayerRemoveItem(cid,5922,50) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 145, 2)
doPlayerAddAddon(cid, 149, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Warrior

elseif msgcontains(msg, 'warrior 1') then
selfSay('Poderia trazer 100 hardened bones, 100 turtle shells, fighting spirit and a dragon claw?')
talk_state = 11
talk_start = os.clock()

elseif talk_state == 11 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5925) >= 100 and getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5899) >= 100 and getPlayerItemCount(cid,5919) >= 1 then
if doPlayerRemoveItem(cid,5919,1) and doPlayerRemoveItem(cid,5925,100) and doPlayerRemoveItem(cid,5899,100) and doPlayerRemoveItem(cid,5884,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 134, 1)
doPlayerAddAddon(cid, 142, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'warrior 2') then
selfSay('Poderia trazer 100 iron ores and royal steel?')
talk_state = 12
talk_start = os.clock()

elseif talk_state == 12 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5887) >= 1 then
if doPlayerRemoveItem(cid,5880,100) and doPlayerRemoveItem(cid,5887,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 134, 2)
doPlayerAddAddon(cid, 142, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Summoner

elseif msgcontains(msg, 'summoner 1') then
selfSay('Poderia trazer um bilhete de loteria premiado ?')
talk_state = 13
talk_start = os.clock()

elseif talk_state == 13 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5958) >= 1 then
if doPlayerRemoveItem(cid,5958,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 133, 1)
doPlayerAddAddon(cid, 141, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'summoner 2') then
selfSay('Poderia trazer 70 bat wings, 20 red pieces of cloth, 40 ape fur, 35 holy orchid, 10 spools of spider silk yarn, 60 lizard scales, 40 red dragon scales, 15 magic sulphurs and 30 vampire dusts?')
talk_state = 14
talk_start = os.clock()

elseif talk_state == 14 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5894) >= 70 and getPlayerItemCount(cid,5911) >= 20 and getPlayerItemCount(cid,5883) >= 40 and getPlayerItemCount(cid,5922) >= 35 and getPlayerItemCount(cid,5886) >= 10 and getPlayerItemCount(cid,5881) >= 60 and getPlayerItemCount(cid,5882) >= 40 and getPlayerItemCount(cid,5904) >= 15 and getPlayerItemCount(cid,5905) >= 30 then
if doPlayerRemoveItem(cid,5894,70) and doPlayerRemoveItem(cid,5911,20) and doPlayerRemoveItem(cid,5883,40) and doPlayerRemoveItem(cid,5922,35) and doPlayerRemoveItem(cid,5886,10) and doPlayerRemoveItem(cid,5881,60) and doPlayerRemoveItem(cid,5882,40) and doPlayerRemoveItem(cid,5904,15) and doPlayerRemoveItem(cid,5905,30) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 133, 2)
doPlayerAddAddon(cid, 141, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end



-- Oriental

elseif msgcontains(msg, 'oriental 1') then
selfSay('Poderia trazer um mermaid comb?')
talk_state = 15
talk_start = os.clock()

elseif talk_state == 15 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5945) >= 1 then
if doPlayerRemoveItem(cid,5945,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 146, 1)
doPlayerAddAddon(cid, 150, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'oriental 2') then
selfSay('Poderia trazer 100 ape furs, 100 fish fins, 2 enchanted chicken wings and 100 blue pieces of cloth?')
talk_state = 16
talk_start = os.clock()

elseif talk_state == 16 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5883) >= 100 and getPlayerItemCount(cid,5895) >= 100 and getPlayerItemCount(cid,5891) >= 2 and getPlayerItemCount(cid,5912) >= 100 then
if doPlayerRemoveItem(cid,5883,100) and doPlayerRemoveItem(cid,5895,100) and doPlayerRemoveItem(cid,5891,2) and doPlayerRemoveItem(cid,5912,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 146, 2)
doPlayerAddAddon(cid, 150, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Druid

elseif msgcontains(msg, 'druid 1') then
selfSay('Poderia trazer 50 wolf paws and 50 bear paws?')
talk_state = 17
talk_start = os.clock()

elseif talk_state == 17 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5897) >= 50 and getPlayerItemCount(cid,5896) >= 50 then
if doPlayerRemoveItem(cid,5897,50) and doPlayerRemoveItem(cid,5896,50) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 144, 1)
doPlayerAddAddon(cid, 148, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'druid 2') then
selfSay('You are have the 100 Demon Dust needs for addon?')
talk_state = 18
talk_start = os.clock()

elseif talk_state == 18 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5906) >= 100 then
if doPlayerRemoveItem(cid,5906,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 144, 2)
doPlayerAddAddon(cid, 148, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Barbarian

elseif msgcontains(msg, 'barbarian 1') then
selfSay('Poderia trazer o fighting spirit, the warrior\'s sweat, 50 red pieces of cloth, 50 green pieces of cloth and 10 spider silk yarns?')
talk_state = 19
talk_start = os.clock()

elseif talk_state == 19 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
if doPlayerRemoveItem(cid,5884,1) and doPlayerRemoveItem(cid,5885,1) and doPlayerRemoveItem(cid,5911,50) and doPlayerRemoveItem(cid,5910,50) and doPlayerRemoveItem(cid,5886,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 143, 1)
doPlayerAddAddon(cid, 147, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'barbarian 2') then
selfSay('Poderia trazer 100 iron ore, 1 chunk of crude iron, 50 behemoth fangs and 50 lizard leathers?')
talk_state = 20
talk_start = os.clock()

elseif talk_state == 20 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5893) >= 50 and getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5876) >= 50 then
if doPlayerRemoveItem(cid,5893,50) and doPlayerRemoveItem(cid,5880,100) and doPlayerRemoveItem(cid,5892,1) and doPlayerRemoveItem(cid,5876,50) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 143, 2)
doPlayerAddAddon(cid, 147, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Nobleman

elseif msgcontains(msg, 'nobleman 1') then
selfSay('You are have the 150k needs for addon?')
talk_state = 21
talk_start = os.clock()

elseif talk_state == 21 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) >= 15 then
if doPlayerRemoveItem(cid,2160,15) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 132, 1)
doPlayerAddAddon(cid, 140, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'nobleman 2') then
selfSay('You are have the 150k needs for addon?')
talk_state = 22
talk_start = os.clock()

elseif talk_state == 22 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) >= 15 then
if doPlayerRemoveItem(cid,2160,15) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 132, 2)
doPlayerAddAddon(cid, 140, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Assassin

elseif msgcontains(msg, 'assassin 1') then
selfSay('Poderia trazer 30 beholder eyes, 10 red dragon scales, 30 lizard scales, 20 fish fins, 20 vampire dusts, 10 demon dusts and Warrior\'s sweat?')
talk_state = 23
talk_start = os.clock()

elseif talk_state == 23 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5898) >= 30 and getPlayerItemCount(cid,5882) >= 10 and getPlayerItemCount(cid,5881) >= 30 and getPlayerItemCount(cid,5895) >= 20 and getPlayerItemCount(cid,5905) >= 20 and getPlayerItemCount(cid,5906) >= 10 and getPlayerItemCount(cid,5885) >= 1 then
if doPlayerRemoveItem(cid,5898,30) and doPlayerRemoveItem(cid,5882,10) and doPlayerRemoveItem(cid,5881,30) and doPlayerRemoveItem(cid,5895,20) and doPlayerRemoveItem(cid,5905,20) and doPlayerRemoveItem(cid,5906,10) and doPlayerRemoveItem(cid,5885,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 152, 1)
doPlayerAddAddon(cid, 156, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'assassin 2') then
selfSay('Poderia trazer 50 blue piece of cloth, 50 green piece of cloth, 50 red piece of cloth, 50 brown piece of cloth, 50 yellow piece of cloth, 50 white piece of cloth and 10 spider silk yarns?')
talk_state = 24
talk_start = os.clock()

elseif talk_state == 24 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5909) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5912) >= 50 and getPlayerItemCount(cid,5913) >= 50 and getPlayerItemCount(cid,5914) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
if doPlayerRemoveItem(cid,5909,50) and doPlayerRemoveItem(cid,5910,50) and doPlayerRemoveItem(cid,5911,50) and doPlayerRemoveItem(cid,5912,50) and doPlayerRemoveItem(cid,5913,50) and doPlayerRemoveItem(cid,5914,50) and doPlayerRemoveItem(cid,5886,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 152, 2)
doPlayerAddAddon(cid, 156, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Beggar

elseif msgcontains(msg, 'beggar 1') then
selfSay('Poderia trazer 100 ape furs and 20000 gold coins?')
talk_state = 25
talk_start = os.clock()

elseif talk_state == 25 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) >= 20 and getPlayerItemCount(cid,5883) >= 100 then
if doPlayerRemoveItem(cid,2160,20) and doPlayerRemoveItem(cid,5883,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 153, 1)
doPlayerAddAddon(cid, 157, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'beggar 2') then
selfSay('Poderia trazer Simon\'s favourite staff?')
talk_state = 26
talk_start = os.clock()

elseif talk_state == 26 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6107) >= 1 then
if doPlayerRemoveItem(cid,6107,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 153, 2)
doPlayerAddAddon(cid, 157, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Norseman

elseif msgcontains(msg, 'norseman 1') then
selfSay('Poderia trazer 5 Shards?')
talk_state = 27
talk_start = os.clock()

elseif talk_state == 27 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,7290) >= 5 then
if doPlayerRemoveItem(cid,7290,5) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 251, 1)
doPlayerAddAddon(cid, 252, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'norseman 2') then
selfSay('Poderia trazer 10 Shards?')
talk_state = 28
talk_start = os.clock()

elseif talk_state == 28 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,7290) >= 10 then
if doPlayerRemoveItem(cid,7290,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 251, 2)
doPlayerAddAddon(cid, 252, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Pirate

elseif msgcontains(msg, 'pirate 1') then
selfSay('Poderia trazer 100 eye patches, 100 peg legs and 100 hooks?')
talk_state = 29
talk_start = os.clock()

elseif talk_state == 29 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6126) >= 100 and getPlayerItemCount(cid,6097) >= 100 and getPlayerItemCount(cid,6098) >= 100 then
if doPlayerRemoveItem(cid,6126,100) and doPlayerRemoveItem(cid,6097,100) and doPlayerRemoveItem(cid,6098,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 151, 1)
doPlayerAddAddon(cid, 155, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'pirate 2') then
selfSay('Poderia trazer Ron the Ripper\'s sabre, Deadeye Devious\' eye patch, Lethal Lissy\'s shirt, Brutus Bloodbeard\'s hat?')
talk_state = 30
talk_start = os.clock()

elseif talk_state == 30 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6099) >= 1 and getPlayerItemCount(cid,6100) >= 1 and getPlayerItemCount(cid,6101) >= 1 and getPlayerItemCount(cid,6102) >= 1 then
if doPlayerRemoveItem(cid,6099,1) and doPlayerRemoveItem(cid,6100,1) and doPlayerRemoveItem(cid,6101,1) and doPlayerRemoveItem(cid,6102,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 151, 2)
doPlayerAddAddon(cid, 155, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Shaman

elseif msgcontains(msg, 'shaman 1') then
selfSay('Eu preciso 10 vampire dust')
talk_state = 31
talk_start = os.clock()

elseif talk_state == 31 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5905) >= 10 then
if doPlayerRemoveItem(cid,5905,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 154, 1)
doPlayerAddAddon(cid, 158, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'shaman 2') then
selfSay('Eu preciso 30 vampire dust')
talk_state = 32
talk_start = os.clock()

elseif talk_state == 32 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5905) >= 30 then
if doPlayerRemoveItem(cid,5905,30) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 154, 2)
doPlayerAddAddon(cid, 158, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Nightmare

elseif msgcontains(msg, 'nightmare 1') then
selfSay('Poderia trazer 100 Demonic essences?')
talk_state = 33
talk_start = os.clock()

elseif talk_state == 33 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 100 then
if doPlayerRemoveItem(cid,6500,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 268, 1)
doPlayerAddAddon(cid, 269, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'nightmare 2') then
selfSay('Poderia trazer 200 Demonic essences?')
talk_state = 34
talk_start = os.clock()

elseif talk_state == 34 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 200 then
if doPlayerRemoveItem(cid,6500,200) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 268, 2)
doPlayerAddAddon(cid, 269, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Brotherwood

elseif msgcontains(msg, 'brotherwood 1') then
selfSay('Poderia trazer 100 Demonic essences?')
talk_state = 35
talk_start = os.clock()

elseif talk_state == 35 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 100 then
if doPlayerRemoveItem(cid,6500,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 278, 1)
doPlayerAddAddon(cid, 279, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'brotherwood 2') then
selfSay('Poderia trazer 200 Demonic essences?')
talk_state = 36
talk_start = os.clock()

elseif talk_state == 36 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 200 then
if doPlayerRemoveItem(cid,6500,200) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 278, 2)
doPlayerAddAddon(cid, 279, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Jesker

elseif msgcontains(msg, 'jester 1') then
selfSay('Poderia trazer 1 red piece of cloth, 1 blue piece of cloth, 1 yellow piece of cloth, 1 green piece of cloth, 5 white piece of cloth, 1 giant spider silk and 4 minotaur leather?')
talk_state = 37
talk_start = os.clock()

elseif talk_state == 37 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5911) >= 1 and getPlayerItemCount(cid,5912) >= 1 and getPlayerItemCount(cid,5914) >= 1 and getPlayerItemCount(cid,5910) >= 1 and getPlayerItemCount(cid,5909) >= 5 and getPlayerItemCount(cid,5879) >= 1 and getPlayerItemCount(cid,5878) >= 4 then
if doPlayerRemoveItem(cid,5911,1) and doPlayerRemoveItem(cid,5912,1) and doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,5910,1) and doPlayerRemoveItem(cid,5909,5) and doPlayerRemoveItem(cid,5879,1) and doPlayerRemoveItem(cid,5878,4) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 273, 1)
doPlayerAddAddon(cid, 270, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'jester 2') then
selfSay('Poderia trazer 10 red piece of cloth, 10 blue piece of cloth, 10 yellow piece of cloth, 10 green piece of cloth, 25 white piece of cloth, 10 giant spider silk and 40 minotaur leather?')
talk_state = 38
talk_start = os.clock()

elseif talk_state == 38 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5911) >= 10 and getPlayerItemCount(cid,5912) >= 10 and getPlayerItemCount(cid,5914) >= 10 and getPlayerItemCount(cid,5910) >= 10 and getPlayerItemCount(cid,5909) >= 25 and getPlayerItemCount(cid,5879) >= 10 and getPlayerItemCount(cid,5878) >= 40 then
if doPlayerRemoveItem(cid,5911,10) and doPlayerRemoveItem(cid,5912,10) and doPlayerRemoveItem(cid,5914,10) and doPlayerRemoveItem(cid,5910,10) and doPlayerRemoveItem(cid,5909,25) and doPlayerRemoveItem(cid,5879,10) and doPlayerRemoveItem(cid,5878,40) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 273, 2)
doPlayerAddAddon(cid, 270, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end

[color="#FF00FF"]-- Demonhunter

elseif msgcontains(msg, 'demonhunter 1') then
selfSay('Poderia trazer 15 magic sulphur, 15 blue piece of cloth, 15 yellow piece of cloth, 15 green piece of cloth, 15 white piece of cloth, 15 red piece of cloth, 15 spider silk yarns, 15 fish fins, 15 demon dust, 15 vampire dust ?')
talk_state = 38
talk_start = os.clock()

elseif talk_state == 38 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6547) >= 15 and getPlayerItemCount(cid,5912) >= 10 and getPlayerItemCount(cid,5914) >= 15 and getPlayerItemCount(cid,5910) >= 15 and getPlayerItemCount(cid,5886) >= 15 and getPlayerItemCount(cid,5909) >= 15 and getPlayerItemCount(cid,5911) >= 15 and getPlayerItemCount(cid,5895) >= 15 and getPlayerItemCount(cid,5906) >= 15 and getPlayerItemCount(cid,5905) >= 15 then
if doPlayerRemoveItem(cid,6547,15) and doPlayerRemoveItem(cid,5912,15) and doPlayerRemoveItem(cid,5914,15) and doPlayerRemoveItem(cid,5910,15) and doPlayerRemoveItem(cid,5886,15) and doPlayerRemoveItem(cid,5909,15) and doPlayerRemoveItem(cid,5911,15) and doPlayerRemoveItem(cid,5895,15) and doPlayerRemoveItem(cid,5906,15) and doPlayerRemoveItem(cid,5905,15) then
selfSay('Parabens! Voce conseguiu o Demon Hunter 1')
doPlayerAddAddon(cid, 288, 1)
doPlayerAddAddon(cid, 289, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'demonhunter 2') then
selfSay('Poderia trazer 15 magic sulphur, 15 blue piece of cloth, 15 yellow piece of cloth, 15 green piece of cloth, 15 white piece of cloth, 15 red piece of cloth, 15 spider silk yarns, 15 fish fins, 15 demon dust, 15 vampire dust ?')
talk_state = 38
talk_start = os.clock()

elseif talk_state == 39 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6547) >= 20 and getPlayerItemCount(cid,5912) >= 20 and getPlayerItemCount(cid,5914) >= 20 and getPlayerItemCount(cid,5910) >= 20 and getPlayerItemCount(cid,5886) >= 20 and getPlayerItemCount(cid,5909) >= 20 and getPlayerItemCount(cid,5911) >= 20 and getPlayerItemCount(cid,5895) >= 20 and getPlayerItemCount(cid,5906) >= 20 and getPlayerItemCount(cid,5905) >= 20 then
if doPlayerRemoveItem(cid,6547,20) and doPlayerRemoveItem(cid,5912,20) and doPlayerRemoveItem(cid,5914,20) and doPlayerRemoveItem(cid,5910,20) and doPlayerRemoveItem(cid,5886,20) and doPlayerRemoveItem(cid,5909,20) and doPlayerRemoveItem(cid,5911,20) and doPlayerRemoveItem(cid,5895,20) and doPlayerRemoveItem(cid,5906,20) and doPlayerRemoveItem(cid,5905,20) then
selfSay('Parabens! Voce conseguiu o Demon Hunter 2')
doPlayerAddAddon(cid, 288, 2)
doPlayerAddAddon(cid, 289, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end
[/color]

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Bye ' .. getCreatureName(cid) .. ', Come back.')
focus = 0
talk_start = 0

elseif msgcontains(msg, 'kashfeioyorgheklçguyio') then
selfSay('What?')
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('Next...')
end
focus = 0
talk_start = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good Bye')
focus = 0
talk_start = 0
end
end
end

 

O script ai em cima foi testado no Ares 8.10 e deu certo. Para as pessoas que tentarem e nao conseguirem cola este daki de baixo! OBS : Se seu cliente for Menor que 8.30 vc retira a parte do DemonHunter

 

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 ' .. getCreatureName(cid) .. '! Eu vendo addons diga exemplo: Mage 1, Assassin 2.')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! Eu falo com voce em um minuto.')


-- Citizen

elseif msgcontains(msg, 'citizen 1') then
selfSay('Poderia trazer 100 minotaur leathers?')
talk_state = 1
talk_start = os.clock()

elseif talk_state == 1 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5878) >= 100 then
if doPlayerRemoveItem(cid,5878,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 136, 1)
doPlayerAddOutfit(cid, 128, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'citizen 2') then
selfSay('Poderia trazer 100 chicken feathers, 50 honeycombs and the legion helmet?')
talk_state = 2
talk_start = os.clock()

elseif talk_state == 2 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
if doPlayerRemoveItem(cid,5890,100) and doPlayerRemoveItem(cid,5902,50) and doPlayerRemoveItem(cid,2480,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 136, 2)
doPlayerAddOutfit(cid, 128, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end

-- Mage

elseif msgcontains(msg, 'mage 1') then
selfSay('Poderia trazer um Ferumbras Hat ?')
talk_state = 3
talk_start = os.clock()

elseif talk_state == 3 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5903) >= 1 then
if doPlayerRemoveItem(cid,5903,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 130, 1)
doPlayerAddOutfit(cid, 138, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'mage 2') then
selfSay('You are have the 1 Soul Stone, 20 Ankh, 10 Magic Sulphur, Todas RODs WANDs?')
talk_state = 4
talk_start = os.clock()

elseif talk_state == 4 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5809) >= 1 and getPlayerItemCount(cid,2190) >= 1 and getPlayerItemCount(cid,2191) >= 1 and getPlayerItemCount(cid,2188) >= 1 and getPlayerItemCount(cid,2189) >= 1 and getPlayerItemCount(cid,2187) >= 1 and getPlayerItemCount(cid,2182) >= 1 and getPlayerItemCount(cid,2186) >= 1 and getPlayerItemCount(cid,2185) >= 1 and getPlayerItemCount(cid,2181) >= 1 and getPlayerItemCount(cid,2183) >= 1 and getPlayerItemCount(cid,6547) >= 10 and getPlayerItemCount(cid,2193) >= 20 then
if doPlayerRemoveItem(cid,5809,1) and doPlayerRemoveItem(cid,2190,1) and doPlayerRemoveItem(cid,2191,1) and doPlayerRemoveItem(cid,2188,1) and doPlayerRemoveItem(cid,2189,1) and doPlayerRemoveItem(cid,2187,1) and doPlayerRemoveItem(cid,2182,1) and doPlayerRemoveItem(cid,2186,1) and doPlayerRemoveItem(cid,2185,1) and doPlayerRemoveItem(cid,2181,1) and doPlayerRemoveItem(cid,2183,1) and doPlayerRemoveItem(cid,6547,10) and doPlayerRemoveItem(cid,2193,20) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 130, 2)
doPlayerAddOutfit(cid, 138, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end

-- Hunter

elseif msgcontains(msg, 'hunter 1') then
selfSay('Poderia trazer the engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings, royal steel, hell steel and draconian steel?')
talk_state = 5
talk_start = os.clock()

elseif talk_state == 5 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5947) >= 1 and getPlayerItemCount(cid,5876) >= 100 and getPlayerItemCount(cid,5948) >= 100 and getPlayerItemCount(cid,5891) >= 5 and getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5888) >= 1 and getPlayerItemCount(cid,5889) then
if doPlayerRemoveItem(cid,5947,1) and doPlayerRemoveItem(cid,5876,100) and doPlayerRemoveItem(cid,5948,100) and doPlayerRemoveItem(cid,5891,5) and doPlayerRemoveItem(cid,5887,1) and doPlayerRemoveItem(cid,5888,1) and doPlayerRemoveItem(cid,5889,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 129, 1)
doPlayerAddOutfit(cid, 137, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'hunter 2') then
selfSay('You are have the Sniper Gloves needs for addon?')
talk_state = 6
talk_start = os.clock()

elseif talk_state == 6 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5875) >= 1 then
if doPlayerRemoveItem(cid,5875,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 129, 2)
doPlayerAddOutfit(cid, 137, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Knight

elseif msgcontains(msg, 'knight 1') then
selfSay('Poderia trazer the chunk of crude iron and 100 iron ores?')
talk_state = 7
talk_start = os.clock()

elseif talk_state == 7 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
if doPlayerRemoveItem(cid,5880,100) and doPlayerRemoveItem(cid,5892,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 131, 1)
doPlayerAddOutfit(cid, 139, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'knight 2') then
selfSay('Poderia trazer 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat, and royal steel?')
talk_state = 8
talk_start = os.clock()

elseif talk_state == 8 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5893) >= 100 and getPlayerItemCount(cid,5924) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5887) >= 1 then
if doPlayerRemoveItem(cid,5893,100) and doPlayerRemoveItem(cid,5924,1) and doPlayerRemoveItem(cid,5885,1) and doPlayerRemoveItem(cid,5887,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 131, 2)
doPlayerAddOutfit(cid, 139, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Wizard

elseif msgcontains(msg, 'wizard 1') then
selfSay('Poderia trazer medusa shield, a dragon scale mail, a ring of the sky and crown legs?')
talk_state = 9
talk_start = os.clock()

elseif talk_state == 9 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2488) >= 1 and getPlayerItemCount(cid,2492) >= 1 and getPlayerItemCount(cid,2123) >= 1 and getPlayerItemCount(cid,2536) >= 1 then
if doPlayerRemoveItem(cid,2488,1) and doPlayerRemoveItem(cid,2492,1) and doPlayerRemoveItem(cid,2123,1) and doPlayerRemoveItem(cid,2536,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 145, 1)
doPlayerAddOutfit(cid, 149, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'wizard 2') then
selfSay('Poderia trazer 50 holy orchids?')
talk_state = 10
talk_start = os.clock()

elseif talk_state == 10 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5922) >= 50 then
if doPlayerRemoveItem(cid,5922,50) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 145, 2)
doPlayerAddOutfit(cid, 149, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Warrior

elseif msgcontains(msg, 'warrior 1') then
selfSay('Poderia trazer 100 hardened bones, 100 turtle shells, fighting spirit and a dragon claw?')
talk_state = 11
talk_start = os.clock()

elseif talk_state == 11 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5925) >= 100 and getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5899) >= 100 and getPlayerItemCount(cid,5919) >= 1 then
if doPlayerRemoveItem(cid,5919,1) and doPlayerRemoveItem(cid,5925,100) and doPlayerRemoveItem(cid,5899,100) and doPlayerRemoveItem(cid,5884,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 134, 1)
doPlayerAddOutfit(cid, 142, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'warrior 2') then
selfSay('Poderia trazer 100 iron ores and royal steel?')
talk_state = 12
talk_start = os.clock()

elseif talk_state == 12 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5887) >= 1 then
if doPlayerRemoveItem(cid,5880,100) and doPlayerRemoveItem(cid,5887,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 134, 2)
doPlayerAddOutfit(cid, 142, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Summoner

elseif msgcontains(msg, 'summoner 1') then
selfSay('Poderia trazer um bilhete de loteria premiado ?')
talk_state = 13
talk_start = os.clock()

elseif talk_state == 13 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5958) >= 1 then
if doPlayerRemoveItem(cid,5958,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 133, 1)
doPlayerAddOutfit(cid, 141, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'summoner 2') then
selfSay('Poderia trazer 70 bat wings, 20 red pieces of cloth, 40 ape fur, 35 holy orchid, 10 spools of spider silk yarn, 60 lizard scales, 40 red dragon scales, 15 magic sulphurs and 30 vampire dusts?')
talk_state = 14
talk_start = os.clock()

elseif talk_state == 14 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5894) >= 70 and getPlayerItemCount(cid,5911) >= 20 and getPlayerItemCount(cid,5883) >= 40 and getPlayerItemCount(cid,5922) >= 35 and getPlayerItemCount(cid,5886) >= 10 and getPlayerItemCount(cid,5881) >= 60 and getPlayerItemCount(cid,5882) >= 40 and getPlayerItemCount(cid,5904) >= 15 and getPlayerItemCount(cid,5905) >= 30 then
if doPlayerRemoveItem(cid,5894,70) and doPlayerRemoveItem(cid,5911,20) and doPlayerRemoveItem(cid,5883,40) and doPlayerRemoveItem(cid,5922,35) and doPlayerRemoveItem(cid,5886,10) and doPlayerRemoveItem(cid,5881,60) and doPlayerRemoveItem(cid,5882,40) and doPlayerRemoveItem(cid,5904,15) and doPlayerRemoveItem(cid,5905,30) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 133, 2)
doPlayerAddOutfit(cid, 141, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end



-- Oriental

elseif msgcontains(msg, 'oriental 1') then
selfSay('Poderia trazer um mermaid comb?')
talk_state = 15
talk_start = os.clock()

elseif talk_state == 15 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5945) >= 1 then
if doPlayerRemoveItem(cid,5945,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 146, 1)
doPlayerAddOutfit(cid, 150, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'oriental 2') then
selfSay('Poderia trazer 100 ape furs, 100 fish fins, 2 enchanted chicken wings and 100 blue pieces of cloth?')
talk_state = 16
talk_start = os.clock()

elseif talk_state == 16 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5883) >= 100 and getPlayerItemCount(cid,5895) >= 100 and getPlayerItemCount(cid,5891) >= 2 and getPlayerItemCount(cid,5912) >= 100 then
if doPlayerRemoveItem(cid,5883,100) and doPlayerRemoveItem(cid,5895,100) and doPlayerRemoveItem(cid,5891,2) and doPlayerRemoveItem(cid,5912,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 146, 2)
doPlayerAddOutfit(cid, 150, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Druid

elseif msgcontains(msg, 'druid 1') then
selfSay('Poderia trazer 50 wolf paws and 50 bear paws?')
talk_state = 17
talk_start = os.clock()

elseif talk_state == 17 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5897) >= 50 and getPlayerItemCount(cid,5896) >= 50 then
if doPlayerRemoveItem(cid,5897,50) and doPlayerRemoveItem(cid,5896,50) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 144, 1)
doPlayerAddOutfit(cid, 148, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'druid 2') then
selfSay('You are have the 100 Demon Dust needs for addon?')
talk_state = 18
talk_start = os.clock()

elseif talk_state == 18 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5906) >= 100 then
if doPlayerRemoveItem(cid,5906,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 144, 2)
doPlayerAddOutfit(cid, 148, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Barbarian

elseif msgcontains(msg, 'barbarian 1') then
selfSay('Poderia trazer o fighting spirit, the warrior\'s sweat, 50 red pieces of cloth, 50 green pieces of cloth and 10 spider silk yarns?')
talk_state = 19
talk_start = os.clock()

elseif talk_state == 19 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
if doPlayerRemoveItem(cid,5884,1) and doPlayerRemoveItem(cid,5885,1) and doPlayerRemoveItem(cid,5911,50) and doPlayerRemoveItem(cid,5910,50) and doPlayerRemoveItem(cid,5886,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 143, 1)
doPlayerAddOutfit(cid, 147, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'barbarian 2') then
selfSay('Poderia trazer 100 iron ore, 1 chunk of crude iron, 50 behemoth fangs and 50 lizard leathers?')
talk_state = 20
talk_start = os.clock()

elseif talk_state == 20 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5893) >= 50 and getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5876) >= 50 then
if doPlayerRemoveItem(cid,5893,50) and doPlayerRemoveItem(cid,5880,100) and doPlayerRemoveItem(cid,5892,1) and doPlayerRemoveItem(cid,5876,50) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 143, 2)
doPlayerAddOutfit(cid, 147, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Nobleman

elseif msgcontains(msg, 'nobleman 1') then
selfSay('You are have the 150k needs for addon?')
talk_state = 21
talk_start = os.clock()

elseif talk_state == 21 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) >= 15 then
if doPlayerRemoveItem(cid,2160,15) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 132, 1)
doPlayerAddOutfit(cid, 140, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'nobleman 2') then
selfSay('You are have the 150k needs for addon?')
talk_state = 22
talk_start = os.clock()

elseif talk_state == 22 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) >= 15 then
if doPlayerRemoveItem(cid,2160,15) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 132, 2)
doPlayerAddOutfit(cid, 140, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Assassin

elseif msgcontains(msg, 'assassin 1') then
selfSay('Poderia trazer 30 beholder eyes, 10 red dragon scales, 30 lizard scales, 20 fish fins, 20 vampire dusts, 10 demon dusts and Warrior\'s sweat?')
talk_state = 23
talk_start = os.clock()

elseif talk_state == 23 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5898) >= 30 and getPlayerItemCount(cid,5882) >= 10 and getPlayerItemCount(cid,5881) >= 30 and getPlayerItemCount(cid,5895) >= 20 and getPlayerItemCount(cid,5905) >= 20 and getPlayerItemCount(cid,5906) >= 10 and getPlayerItemCount(cid,5885) >= 1 then
if doPlayerRemoveItem(cid,5898,30) and doPlayerRemoveItem(cid,5882,10) and doPlayerRemoveItem(cid,5881,30) and doPlayerRemoveItem(cid,5895,20) and doPlayerRemoveItem(cid,5905,20) and doPlayerRemoveItem(cid,5906,10) and doPlayerRemoveItem(cid,5885,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 152, 1)
doPlayerAddOutfit(cid, 156, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'assassin 2') then
selfSay('Poderia trazer 50 blue piece of cloth, 50 green piece of cloth, 50 red piece of cloth, 50 brown piece of cloth, 50 yellow piece of cloth, 50 white piece of cloth and 10 spider silk yarns?')
talk_state = 24
talk_start = os.clock()

elseif talk_state == 24 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5909) >= 50 and getPlayerItemCount(cid,5910) >= 50 and getPlayerItemCount(cid,5911) >= 50 and getPlayerItemCount(cid,5912) >= 50 and getPlayerItemCount(cid,5913) >= 50 and getPlayerItemCount(cid,5914) >= 50 and getPlayerItemCount(cid,5886) >= 10 then
if doPlayerRemoveItem(cid,5909,50) and doPlayerRemoveItem(cid,5910,50) and doPlayerRemoveItem(cid,5911,50) and doPlayerRemoveItem(cid,5912,50) and doPlayerRemoveItem(cid,5913,50) and doPlayerRemoveItem(cid,5914,50) and doPlayerRemoveItem(cid,5886,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 152, 2)
doPlayerAddOutfit(cid, 156, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Beggar

elseif msgcontains(msg, 'beggar 1') then
selfSay('Poderia trazer 100 ape furs and 20000 gold coins?')
talk_state = 25
talk_start = os.clock()

elseif talk_state == 25 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,2160) >= 20 and getPlayerItemCount(cid,5883) >= 100 then
if doPlayerRemoveItem(cid,2160,20) and doPlayerRemoveItem(cid,5883,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddAddon(cid, 153, 1)
doPlayerAddAddon(cid, 157, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'beggar 2') then
selfSay('Poderia trazer Simon\'s favourite staff?')
talk_state = 26
talk_start = os.clock()

elseif talk_state == 26 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6107) >= 1 then
if doPlayerRemoveItem(cid,6107,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 153, 2)
doPlayerAddOutfit(cid, 157, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Norseman

elseif msgcontains(msg, 'norseman 1') then
selfSay('Poderia trazer 5 Shards?')
talk_state = 27
talk_start = os.clock()

elseif talk_state == 27 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,7290) >= 5 then
if doPlayerRemoveItem(cid,7290,5) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 251, 1)
doPlayerAddOutfit(cid, 252, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'norseman 2') then
selfSay('Poderia trazer 10 Shards?')
talk_state = 28
talk_start = os.clock()

elseif talk_state == 28 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,7290) >= 10 then
if doPlayerRemoveItem(cid,7290,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 251, 2)
doPlayerAddOutfit(cid, 252, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Pirate

elseif msgcontains(msg, 'pirate 1') then
selfSay('Poderia trazer 100 eye patches, 100 peg legs and 100 hooks?')
talk_state = 29
talk_start = os.clock()

elseif talk_state == 29 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6126) >= 100 and getPlayerItemCount(cid,6097) >= 100 and getPlayerItemCount(cid,6098) >= 100 then
if doPlayerRemoveItem(cid,6126,100) and doPlayerRemoveItem(cid,6097,100) and doPlayerRemoveItem(cid,6098,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 151, 1)
doPlayerAddOutfit(cid, 155, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'pirate 2') then
selfSay('Poderia trazer Ron the Ripper\'s sabre, Deadeye Devious\' eye patch, Lethal Lissy\'s shirt, Brutus Bloodbeard\'s hat?')
talk_state = 30
talk_start = os.clock()

elseif talk_state == 30 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6099) >= 1 and getPlayerItemCount(cid,6100) >= 1 and getPlayerItemCount(cid,6101) >= 1 and getPlayerItemCount(cid,6102) >= 1 then
if doPlayerRemoveItem(cid,6099,1) and doPlayerRemoveItem(cid,6100,1) and doPlayerRemoveItem(cid,6101,1) and doPlayerRemoveItem(cid,6102,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 151, 2)
doPlayerAddOutfit(cid, 155, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


--Shaman

elseif msgcontains(msg, 'shaman 1') then
selfSay('Eu preciso 10 vampire dust')
talk_state = 31
talk_start = os.clock()

elseif talk_state == 31 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5905) >= 10 then
if doPlayerRemoveItem(cid,5905,10) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 154, 1)
doPlayerAddOutfit(cid, 158, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'shaman 2') then
selfSay('Eu preciso 30 vampire dust')
talk_state = 32
talk_start = os.clock()

elseif talk_state == 32 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5905) >= 30 then
if doPlayerRemoveItem(cid,5905,30) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 154, 2)
doPlayerAddOutfit(cid, 158, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Nightmare

elseif msgcontains(msg, 'nightmare 1') then
selfSay('Poderia trazer 100 Demonic essences?')
talk_state = 33
talk_start = os.clock()

elseif talk_state == 33 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 100 then
if doPlayerRemoveItem(cid,6500,100) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 268, 1)
doPlayerAddOutfit(cid, 269, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'nightmare 2') then
selfSay('Poderia trazer 200 Demonic essences?')
talk_state = 34
talk_start = os.clock()

elseif talk_state == 34 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 200 then
if doPlayerRemoveItem(cid,6500,200) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 268, 2)
doPlayerAddOutfit(cid, 269, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Brotherwood

elseif msgcontains(msg, 'brotherwood 1') then
selfSay('Poderia trazer 500 Demonic essences?')
talk_state = 35
talk_start = os.clock()

elseif talk_state == 35 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 500 then
if doPlayerRemoveItem(cid,6500,500) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 278, 1)
doPlayerAddOutfit(cid, 279, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'brotherwood 2') then
selfSay('Poderia trazer 1500 Demonic essences?')
talk_state = 36
talk_start = os.clock()

elseif talk_state == 36 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6500) >= 1500 then
if doPlayerRemoveItem(cid,6500,1500) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 278, 2)
doPlayerAddOutfit(cid, 279, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Jester

elseif msgcontains(msg, 'jester 1') then
selfSay('Poderia trazer 1 red piece of cloth, 1 blue piece of cloth, 1 yellow piece of cloth, 1 green piece of cloth, 5 white piece of cloth, 1 giant spider silk and 4 minotaur leather?')
talk_state = 37
talk_start = os.clock()

elseif talk_state == 37 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5911) >= 1 and getPlayerItemCount(cid,5912) >= 1 and getPlayerItemCount(cid,5914) >= 1 and getPlayerItemCount(cid,5910) >= 1 and getPlayerItemCount(cid,5909) >= 5 and getPlayerItemCount(cid,5879) >= 1 and getPlayerItemCount(cid,5878) >= 4 then
if doPlayerRemoveItem(cid,5911,1) and doPlayerRemoveItem(cid,5912,1) and doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,5910,1) and doPlayerRemoveItem(cid,5909,5) and doPlayerRemoveItem(cid,5879,1) and doPlayerRemoveItem(cid,5878,4) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 273, 1)
doPlayerAddOutfit(cid, 270, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end


elseif msgcontains(msg, 'jester 2') then
selfSay('Poderia trazer 10 red piece of cloth, 10 blue piece of cloth, 10 yellow piece of cloth, 10 green piece of cloth, 25 white piece of cloth, 10 giant spider silk and 40 minotaur leather?')
talk_state = 38
talk_start = os.clock()

elseif talk_state == 38 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5911) >= 10 and getPlayerItemCount(cid,5912) >= 10 and getPlayerItemCount(cid,5914) >= 10 and getPlayerItemCount(cid,5910) >= 10 and getPlayerItemCount(cid,5909) >= 25 and getPlayerItemCount(cid,5879) >= 10 and getPlayerItemCount(cid,5878) >= 40 then
if doPlayerRemoveItem(cid,5911,10) and doPlayerRemoveItem(cid,5912,10) and doPlayerRemoveItem(cid,5914,10) and doPlayerRemoveItem(cid,5910,10) and doPlayerRemoveItem(cid,5909,25) and doPlayerRemoveItem(cid,5879,10) and doPlayerRemoveItem(cid,5878,40) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 273, 2)
doPlayerAddOutfit(cid, 270, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end

[color="#FF00FF"]-- Demonhunter

elseif msgcontains(msg, 'demonhunter 1') then
selfSay('Poderia trazer 15 magic sulphur, 15 blue piece of cloth, 15 yellow piece of cloth, 15 green piece of cloth, 15 white piece of cloth, 15 red piece of cloth, 15 spider silk yarns, 15 fish fins, 15 demon dust, 15 vampire dust ?')
talk_state = 38
talk_start = os.clock()

elseif talk_state == 38 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6547) >= 15 and getPlayerItemCount(cid,5912) >= 10 and getPlayerItemCount(cid,5914) >= 15 and getPlayerItemCount(cid,5910) >= 15 and getPlayerItemCount(cid,5886) >= 15 and getPlayerItemCount(cid,5909) >= 15 and getPlayerItemCount(cid,5911) >= 15 and getPlayerItemCount(cid,5895) >= 15 and getPlayerItemCount(cid,5906) >= 15 and getPlayerItemCount(cid,5905) >= 15 then
if doPlayerRemoveItem(cid,6547,15) and doPlayerRemoveItem(cid,5912,15) and doPlayerRemoveItem(cid,5914,15) and doPlayerRemoveItem(cid,5910,15) and doPlayerRemoveItem(cid,5886,15) and doPlayerRemoveItem(cid,5909,15) and doPlayerRemoveItem(cid,5911,15) and doPlayerRemoveItem(cid,5895,15) and doPlayerRemoveItem(cid,5906,15) and doPlayerRemoveItem(cid,5905,15) then
selfSay('Parabens! Voce conseguiu o Demon Hunter 1')
doPlayerAddOutfit(cid, 288, 1)
doPlayerAddOutfit(cid, 289, 1)
end
else
selfSay('Descupe, voce nao tem os items!')
end

elseif msgcontains(msg, 'demonhunter 2') then
selfSay('Poderia trazer 15 magic sulphur, 15 blue piece of cloth, 15 yellow piece of cloth, 15 green piece of cloth, 15 white piece of cloth, 15 red piece of cloth, 15 spider silk yarns, 15 fish fins, 15 demon dust, 15 vampire dust ?')
talk_state = 38
talk_start = os.clock()

elseif talk_state == 39 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6547) >= 20 and getPlayerItemCount(cid,5912) >= 20 and getPlayerItemCount(cid,5914) >= 20 and getPlayerItemCount(cid,5910) >= 20 and getPlayerItemCount(cid,5886) >= 20 and getPlayerItemCount(cid,5909) >= 20 and getPlayerItemCount(cid,5911) >= 20 and getPlayerItemCount(cid,5895) >= 20 and getPlayerItemCount(cid,5906) >= 20 and getPlayerItemCount(cid,5905) >= 20 then
if doPlayerRemoveItem(cid,6547,20) and doPlayerRemoveItem(cid,5912,20) and doPlayerRemoveItem(cid,5914,20) and doPlayerRemoveItem(cid,5910,20) and doPlayerRemoveItem(cid,5886,20) and doPlayerRemoveItem(cid,5909,20) and doPlayerRemoveItem(cid,5911,20) and doPlayerRemoveItem(cid,5895,20) and doPlayerRemoveItem(cid,5906,20) and doPlayerRemoveItem(cid,5905,20) then
selfSay('Parabens! Voce conseguiu o Demon Hunter 2')
doPlayerAddOutfit(cid, 288, 2)
doPlayerAddOutfit(cid, 289, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end[/color]


elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Bye ' .. getCreatureName(cid) .. ', Come back.')
focus = 0
talk_start = 0

elseif msgcontains(msg, 'kashfeioyorgheklçguyio') then
selfSay('What?')
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('Next...')
end
focus = 0
talk_start = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good Bye')
focus = 0
talk_start = 0
end
end
end

O lugar que esta de Rosa e o addon que eu adicionei que estava faltando que era o Demon Hunter.

Obs: Quase todos os otserver nao dava para fazer o "Summoner Female" nesse da :p pede as msm coisas que o Male mais ta funfando...

Tomei a liberdade de Traduzir um pouco para "br". hehe

 

Creditos: Renato :)

Qualquer coisa comenta ai.

Espero que gostem. Pois demorei para fazer xD :blush: .

Editado por Perdizescapital
Link para o comentário
Compartilhar em outros sites

da um erro quando eu vou fazer o adon tipo o nobleman 1 ele pega meu dinheiro e n me da o addon ai da um erro mais ou menos assim :

 

 

[30/11/2008 14:20:26] Lua Script Error: [Npc interface]

[30/11/2008 14:20:26] data/npc/scripts/addon.lua:onCreatureSay

 

[30/11/2008 14:20:26] data/npc/scripts/addon.lua:433: attempt to call global 'doPlayerAddAddon' (a nil value)

[30/11/2008 14:20:26] stack traceback:

[30/11/2008 14:20:26] data/npc/scripts/addon.lua:433: in function <data/npc/scripts/addon.lua:37>

 

sabe arruma isos ae?

Link para o comentário
Compartilhar em outros sites

da um erro quando eu vou fazer o adon tipo o nobleman 1 ele pega meu dinheiro e n me da o addon ai da um erro mais ou menos assim :

 

 

[30/11/2008 14:20:26] Lua Script Error: [Npc interface]

[30/11/2008 14:20:26] data/npc/scripts/addon.lua:onCreatureSay

 

[30/11/2008 14:20:26] data/npc/scripts/addon.lua:433: attempt to call global 'doPlayerAddAddon' (a nil value)

[30/11/2008 14:20:26] stack traceback:

[30/11/2008 14:20:26] data/npc/scripts/addon.lua:433: in function <data/npc/scripts/addon.lua:37>

 

sabe arruma isos ae?

tpw no meu ... eu troquei o lugar q ta assim.... "doPlayerAddAddon" antes tava "doPlayerAddOutfit" .

Tenta trocar. Deve da certo.

Que no meu eu troquei todos para "doPlayerAddAddon" tenta colocar no seu "doPlayerAddOutfit"

Editado por Perdizescapital
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

cara , meu ot eh 8.31 com npc channel , ponho o npc tranquilo , mas quando do hi pra ele , ele nao respodne e aparece a seguinte msg no server:

 

[09/12/2008 14:33:14] Tupac has logged in.

 

[09/12/2008 14:33:16] Lua Script Error: [Npc interface]

[09/12/2008 14:33:16] data/npc/scripts/addon.lua:onCreatureSay

 

[09/12/2008 14:33:16] data/npc/lib/npc.lua:43: attempt to perform arithmetic on global 'cx' (a table value)

[09/12/2008 14:33:16] stack traceback:

[09/12/2008 14:33:16] data/npc/lib/npc.lua:43: in function 'getDistanceToCreature'

[09/12/2008 14:33:16] data/npc/scripts/addon.lua:40: in function <data/npc/scripts/addon.lua:37>

 

tem como da um help ai ?

agradeço desde jah ,abraço

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...