KK

Npc Addons Por Items

Por kkk111, 16 de nov. de 2008 em NPCs, monsters e raids

script
13
4.2k
kkk111K
16 de novembro de 2008 às 11:11

Esse npc da addon por items

 

Npc

 

 

<?xml version="1.0"?>

<npc name="Varkhal" script="data/npc/scripts/addon.lua" walkinterval="25" floorchange="0" access="3" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="145" head="114" body="88" legs="0" feet="0" addons="3" corpse="2212"/>

<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|. Eu vendo addon!!" />

</npc>

 

 

Script

 

 

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: DemonHunter 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) .. '! I talk with you in one minute.')


-- 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!')
doPlayerAddOutfit(cid, 153, 1)
doPlayerAddOutfit(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 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!')
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 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!')
doPlayerAddOutfit(cid, 278, 2)
doPlayerAddOutfit(cid, 279, 2)
end
else
selfSay('Descupe, voce nao tem os items!')
end


-- Jesker

elseif msgcontains(msg, 'jesker 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, 'jesker 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


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

  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





 

Qualquer coisa poste aqui

2 semanas depois...
AlequinhoA
24 de novembro de 2008 às 13:14

Vamu Ve C dah Certo +D

alissonlinnekerA
26 de novembro de 2008 às 12:15

Brother...acho que ja tem um script desse aqui no forum...

naum sei se ta igual...mais tem um..

 

se não tiver igual, o que tem de mais nesse?

 

flws

charleschaleronC
29 de novembro de 2008 às 08:58

Não deu certo aqui no otserv que eu estou usando,

em um 8.31 deu certo mas no outro não, mas mesmo assim obrigado no otserv que pego essi script fico show.

falou!

^^

funnieskF
29 de novembro de 2008 às 10:10

Queria saber como faço isso pra versao 8.1!!!

satan666S
30 de novembro de 2008 às 14:28

nao funfa e esse script ai ja foi postado por outra pessoa..........

1 mês depois...
leitoctbaL
17 de dezembro de 2008 às 23:44

Funfa sim, obrigado.

2 semanas depois...
27 de dezembro de 2008 às 23:29

não funciono aqui ! :S :blink:

PhgsoaresP
27 de dezembro de 2008 às 23:45

O tópico que contém esse script é esse Aqui

Para que postar outro com a mesma função? :sad:

DaNDaNrOxXD
28 de dezembro de 2008 às 00:15

O NPC deste tópico citado acima está com alguns bugs, eu postei há muito tempo e éra para versão 8.1 !

-

Este NPC funciona em The Forgotten Server? É usado o jiddo system, não sei se npcs assim funcionam... Depois vou dar uma olhada.

Obrigado pelo script.

Abraço

1 mês depois...
satan666S
07 de janeiro de 2009 às 10:08

esse script ta errado o npc nao intrega o addon certo por exemplo quando um player arruma o ferumbras hat se ele for homen ele faz o addon do mage e se for mulher e o do summoner....

e tb a sniper gloves que homens faz o segundo addon com ela e mulheres fazem o primeiro....

entre outros...

IcarooxDlollI
12 de janeiro de 2009 às 16:26

aa seu Npc e bom mais eu prefiro o Npc que vende por dinhero mesmo =/

 

aa e seu scripter ta errado corrigi ai cara

3 anos depois...
WDDanielW
03 de fevereiro de 2012 às 18:13

Funcionou, +REP