Npc Addons Por Items

kkk111
Por kkk111
em NPCs, monsters e raids

kkk111

LOL?
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/08/07Posts: 27

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

É por isso que eu gosto de ajudar (pelo menos tentar ajudar) este fórum, os caras sabe Agradecer né?

 

 

Att,

PẫulǾ

paulo.boc@hotmail.com

Alequinho

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/03/08Posts: 1

Vamu Ve C dah Certo +D

alissonlinneker

ñ frite bacon sem kmiza xP
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 15/12/07Posts: 239

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



Devo esquecer aqueles que me impuseram obstáculos infundados e agradecer àqueles que me impulsionaram adiante. É hora, mais do que nunca, de valorizar as amizades e os conhecimentos adquiridos aqui. Agradeço a todos que me apoiaram. Vlw xTibia!
Amais!
[Retired]



~~>Meus Trabalhos:

---Sistema De Domínio De Castelos. (Action)
---Sistema De Mineraçao (Action)
---Scroll Que Da X Exp Quando é Usada (Action)
---Portas Não Abrem? Venha Aqui Ver Como Arruma! (Action)
---Crie Suas Quest´s De Uma Maneira Rapida E Facil. (Action)
---The Demon OaK Quest (Action)

---Addon Por Item, Com Todos Os Outfits. (Npc)

---Aprenda a colocar suas quests no Quest Log (Tutorial+scripts _ data/xml/quests.xml)
---Conhecendo Melhor A Pasta Globalevents (Tutorial+scripts)
---Gerencie O Seu Mysql Como Se Fosse Sqlite (Tutorial)
---Multi World Sistem - Como Funciona. (Tutorial)

---Projeto de tradução do TFS 8.31 SQL - Inglês para o Portugês (Server 8.31)

---2 Templantes para Web Site de OT (Websites de OTserv)
---Atualização de sites do Gesior para sistema de mult-world (Websites de OTserv)

---Thyrania editado (Map)
---Yalahar Global Completo (Map)

---Pic Editor para Tibia 8.2+ (Programa)
---Ztracker - Clone mapas 8.4 (Programa)



charleschaleron

Call Are You!!!
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 05/01/08Posts: 226Char no Tibia: Brahamus

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!

^^

Chaleron Cronics Project 8.52...Venha conferir!

Meu fã? te impressionei? então use!




Sou fã deste grande jovem


um ótimo programador e editor de servidores em geral

funniesk

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/11/08Posts: 70

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

satan666

Antichrist Superstar
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 07/05/08Posts: 612Char no Tibia: leviana luciferiana

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

creationb.jpg

"Um Deus que usasse seu poder para criar seres humanos que de antemão sabia que seriam atormentados eternamente, e que os predestinasse a isso,



não poderia ser sábio, nem justo e tampouco amoroso.

Além de nos submeter a isso vim a nos julgar e condenar por nossos atos aos tormentos do inferno.

pra minha pessoa isso não é um Deus Pai amoroso e bondoso como o chaman, seu padrão seria muito mais inferior do que o de muitos homens."

leitoctba

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 02/11/07Posts: 33Char no Tibia: Elite'Mephisto

Funfa sim, obrigado.

Versus-


Felipedalvechio

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/12/08Posts: 9Char no Tibia: Byob-Karateca

não funciono aqui ! :S :blink:

Phgsoares

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 17/01/07Posts: 137Char no Tibia: Lanquick

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

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

Olá XTibiano:

Sua assinatura estava com um problema na TAG SPOILER e foi movida para a parte "Sobre mim".
Agradecemos a sua compreensão.

Atenciosamente,
JV Chequer

DaNDaNrOxX

oi mosso
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/01/08Posts: 1455Char no Tibia: Saint Claire

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

 

 

Entrada na equipe: 23/10/2008 Cargo: Estagiário

Promoção: 25/11/2008 Cargo: Moderador

Promoção: 21/10/2009 Cargo: Coordenador

Remoção: 09/05/2010 Motivo: Estudos

Retorno: 15/11/2010 Cargo: Moderador

Remoção: 20/12/2012.

 

 

satan666

Antichrist Superstar
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 07/05/08Posts: 612Char no Tibia: leviana luciferiana

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

creationb.jpg

"Um Deus que usasse seu poder para criar seres humanos que de antemão sabia que seriam atormentados eternamente, e que os predestinasse a isso,



não poderia ser sábio, nem justo e tampouco amoroso.

Além de nos submeter a isso vim a nos julgar e condenar por nossos atos aos tormentos do inferno.

pra minha pessoa isso não é um Deus Pai amoroso e bondoso como o chaman, seu padrão seria muito mais inferior do que o de muitos homens."

IcarooxDloll

GOD King
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 04/01/09Posts: 133Char no Tibia: GOD King

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

 

aa e seu scripter ta errado corrigi ai cara

GOD King





kingtower.no-ip.biz

WDDaniel

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/01/12Posts: 9Char no Tibia: Daan of Lucera - Retired

Funcionou, +REP