Knutt
mapper/scripter
I post my Addoner it work on TFS 0.2 i just test him on it but i´m sure it will work at other TFS, too. It´s my own created all bugs fixed
i hope i can help you a lot
Created By Knutt
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(callback)
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('Hello ' .. getCreatureName(cid) .. '! Just say addon or first name addon')
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, 'first citizen addon') then
selfSay('Can you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, ' second citizen addon') then
selfSay('Can you bring me 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('Sorry, you dont have enough item!')
end
-- Mage
elseif msgcontains(msg, 'first mage addon') then
selfSay('You are have the 1 Soul Stone, 20 Ankh, 10 Magic Sulphur, All RODs WANDs?')
talk_state = 3
talk_start = os.clock()
elseif talk_state == 3 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, 1)
doPlayerAddOutfit(cid, 138, 1)
end
else
selfSay('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second mage addon') then
selfSay('Can you bring me Ferumbras Hat ?')
talk_state = 4
talk_start = os.clock()
elseif talk_state == 4 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, 2)
doPlayerAddOutfit(cid, 138, 2)
end
else
selfSay('Sorry, you dont have enough item!')
end
-- Hunter
elseif msgcontains(msg, 'first hunter addon') then
selfSay('You are have the Sniper Gloves needs for addon?')
talk_state = 5
talk_start = os.clock()
elseif talk_state == 5 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, 1)
doPlayerAddOutfit(cid, 137, 1)
end
else
selfSay('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second hunter addon') then
selfSay('Can you bring me engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings,piece of royal steel,piece of hell steel and piece of draconian steel?')
talk_state = 6
talk_start = os.clock()
elseif talk_state == 6 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, 2)
doPlayerAddOutfit(cid, 137, 2)
end
else
selfSay('Sorry, you dont have enough item!')
end
-- Knight
elseif msgcontains(msg, 'first knight addon') then
selfSay('Can you bring me huge 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second knight addon') then
selfSay('Can you bring me 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat, and piece of 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('Sorry, you dont have enough item!')
end
-- Wizard
elseif msgcontains(msg, 'first wizard addon') then
selfSay('Can you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second wizard addon') then
selfSay('Can you bring me 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('Sorry, you dont have enough item!')
end
-- Warrior
elseif msgcontains(msg, 'first warrior addon') then
selfSay('Can you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second warrior addon') then
selfSay('Can you bring me 100 iron ores and piece of 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('Sorry, you dont have enough item!')
end
-- Summoner
elseif msgcontains(msg, 'first summoner addon') then
selfSay('Can you bring me winning lottery ticket ?')
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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second summoner addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
-- Oriental
elseif msgcontains(msg, 'first oriental addon') then
selfSay('Did you bring me a 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second oriental addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
-- Druid
elseif msgcontains(msg, 'first druid addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second druid addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
-- Barbarian
elseif msgcontains(msg, 'first barbarian addon') then
selfSay('Did you bring me a 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second barbarian addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
-- Nobleman
elseif msgcontains(msg, 'first nobleman addon') 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second nobleman addon') 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('Sorry, you dont have enough item!')
end
-- Assassin
elseif msgcontains(msg, 'first assassin addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second assassin addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
--Beggar
elseif msgcontains(msg, 'first beggar addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second beggar addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
--Norseman
elseif msgcontains(msg, 'first norseman addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second norseman addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
--Pirate
elseif msgcontains(msg, 'first pirate addon') 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second pirate addon') 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('Sorry, you dont have enough item!')
end
--Shaman
elseif msgcontains(msg, 'first shaman addon') then
selfSay('Did you bring me 5 Pirate Voodoo Doll, 5 Dworc Voodoo Dolls, 1 Mandrake')
talk_state = 31
talk_start = os.clock()
elseif talk_state == 31 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5810) >= 5 and getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 then
if doPlayerRemoveItem(cid,5810,5) and doPlayerRemoveItem(cid,3955,5) and doPlayerRemoveItem(cid,5015,1) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 154, 1)
doPlayerAddOutfit(cid, 158, 1)
end
else
selfSay('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second shaman addon') then
selfSay('Did you bring me 5 Banana Staffs and 5 Tribal Masks')
talk_state = 32
talk_start = os.clock()
elseif talk_state == 32 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 then
if doPlayerRemoveItem(cid,3966,5) and doPlayerRemoveItem(cid,3967,5) then
selfSay('Congrations! You have acquired a new addon!')
doPlayerAddOutfit(cid, 154, 2)
doPlayerAddOutfit(cid, 158, 2)
end
else
selfSay('Sorry, you dont have enough item!')
end
-- Nightmare
elseif msgcontains(msg, 'first nightmare addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second nightmare addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
-- Brotherwood
elseif msgcontains(msg, 'first brotherhood addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second brotherhood addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
-- Jesker
elseif msgcontains(msg, 'first jester addon') then
selfSay('Did you bring me 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('Sorry, you dont have enough item!')
end
elseif msgcontains(msg, 'second jester addon') 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('Sorry, you dont have enough item!')
end
-- Demonhunter
elseif msgcontains(msg, 'second demonhunter addon') then
selfSay('Did you bring me 40 Vampire Dusts and 40 Demonic Essences')
talk_state = 39
talk_start = os.clock()
elseif talk_state == 39 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,6551) >= 40 and getPlayerItemCount(cid,6500) >= 40 then
if doPlayerRemoveItem(cid,6551,40) and doPlayerRemoveItem(cid,6500,40) then
selfSay('Congratulations,Here is Your Addon!')
doPlayerAddOutfit(cid, 288, 2)
doPlayerAddOutfit(cid, 289, 2)
end
else
selfSay('Sorry,you dont have enough item!')
end
elseif msgcontains(msg, 'first demonhunter addon') then
selfSay('Did you bring me 20 Vampire Dusts and 20 Demonic Essences ?')
talk_state = 40
talk_start = os.clock()
elseif talk_state == 40 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,5905) >= 20 and getPlayerItemCount(cid,6500) >= 20 then
if doPlayerRemoveItem(cid,5905,20) and doPlayerRemoveItem(cid,6500,20) then
selfSay('Congratulations,Here is Your Addon!')
doPlayerAddOutfit(cid, 288, 1)
doPlayerAddOutfit(cid, 289, 1)
end
else
selfSay('Sorry,you dont have enough item!')
end
elseif msgcontains(msg, 'first yalaharian addon') then
selfSay('Did you bring me vampiric crest ?')
talk_state = 41
talk_start = os.clock()
elseif talk_state == 41 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,9955) >= 1 then
if doPlayerRemoveItem(cid,9955,1) then
selfSay('Congratulations,Here is Your Addon!')
doPlayerAddOutfit(cid, 324, 1)
doPlayerAddOutfit(cid, 325, 1)
end
else
selfSay('Sorry,you dont have enough item!')
end
elseif msgcontains(msg, 'second yalaharian addon') then
selfSay('Did you bring me vampiric crest ?')
talk_state = 42
talk_start = os.clock()
elseif talk_state == 42 and msgcontains(msg, 'yes') then
if getPlayerItemCount(cid,9955) >= 1 then
if doPlayerRemoveItem(cid,9955,1) then
selfSay('Congratulations,Here is Your Addon!')
doPlayerAddOutfit(cid, 324, 2)
doPlayerAddOutfit(cid, 325, 2)
end
else
selfSay('Sorry,you dont have enough item!')
end
elseif msgcontains(msg, 'dfgdfg') 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
i hope i can help you a lot