• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help with my addon npc

Xerez

New Member
Joined
Mar 6, 2008
Messages
45
Reaction score
0
Hi, I need some help with my addon npc. This is the script to get the wizard shoulderpads after getting the "skull mask". But when I talk to the npc and I have the 50 holy orchids (5922) he just gives the msg as if I didn't have them, and in the server window it spamms alot of stuff like this:
Code:
[20/03/2008  17:58:21] luaGetCreatureOutfit(). Creature not found

[20/03/2008  17:58:21] Lua Script Error: [Npc interface] 
[20/03/2008  17:58:21] data/npc/scripts/addon.lua:onCreatureSay

[20/03/2008  17:58:21] luaGetCreatureOutfit(). Creature not found

[20/03/2008  17:58:21] Lua Script Error: [Npc interface] 
[20/03/2008  17:58:21] data/npc/scripts/addon.lua:onCreatureSay

[20/03/2008  17:58:21] luaGetCreatureOutfit(). Creature not found

[20/03/2008  17:58:21] Lua Script Error: [Npc interface] 
[20/03/2008  17:58:21] data/npc/scripts/addon.lua:onCreatureSay
over and over again..

heres the part of the script that shows about the shoulder pads. the whole script can be found on this forum I downloaded it here but I cant find it lol. At the top of the script it says this:

Code:
------------------------------------ Advanced Addon NPC ------------------------------------
--------------------------------- Script made by jkotni6 -----------------------------------
--------------- Special thanks to: mokerhamer, Xidaozu and Jiddo, deaths'life --------------
------------------------------- Thanks also to everyone else -------------------------------
-------------------------- NPC based on TFS 0.2.6 --------------------------


Code:
elseif msgcontains(msg, 'skull shoulder pad') or msgcontains(msg, 'wings') then
if isPremium(cid) then
if getCreatureOutfit(cid, 145) ~= 1 and getCreatureOutfit(cid, 145) ~= 3 and getCreatureOutfit(cid, 149) ~= 1 and getCreatureOutfit(cid, 149) ~= 3 then
if getPlayerItemCount(cid,5922) >= 50 and (getCreatureOutfit(cid, 145) == 2 or getCreatureOutfit(cid, 149) == 2) then
selfSay('Did you bring me 50 holy orchids? Also have you got the skull mask respectively snake tiara?')
talkState = 17
else
selfSay('Come back when you have 50 holy orchids and the skull mask respectively snake tiara.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 17 then
if getPlayerItemCount(cid,5922) >= 50 then
if doPlayerTakeItem(cid,5922,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 145, 1)
doPlayerAddOutfit(cid, 149, 1)
end
else
selfSay(addonItem)
end
 
Code:
--------------------------------------------------------------------------------------------
------------------------------------ Advanced Addon NPC ------------------------------------
--------------------------------- Script made by jkotni6 -----------------------------------
--------------- Special thanks to: mokerhamer, Xidaozu and Jiddo, deaths'life --------------
------------------------------- Thanks also to everyone else -------------------------------
-------------------------- NPC based on TFS 0.2.6 --------------------------
--------------------------------------------------------------------------------------------
------------------------------ Script edited by Ricky Mesny and michael  --------------------------------
--------------------------------------------------------------------------------------------
function getPlayerMoney(cid)
gold = getPlayerItemCount(cid,2148)
plat = getPlayerItemCount(cid,2152)*100
crys = getPlayerItemCount(cid,2160)*10000
money = gold + plat + crys
return money
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
return false
end
local addonItem = 'Sorry, you don\'t have the items I requested.' -- what will the NPC say if you don't have the items he wants
local addonHave = 'Sorry, you already have this addon.' -- what will the NPC say if you already have that addon
local addonPremium = 'Sorry, you need a premium account to get addons.' -- what will the NPC say if you aren't a premium player
local addonGive = 'Here you are.' -- what will the NPC say if he gives you the addon
local djinnStorage = 123456 -- djinn quest storage value
local useDjinn = false -- true/false
if msgcontains(msg, 'backpack') then
if isPremium(cid) then
if getCreatureOutfit(cid, 128) ~= 1 and getCreatureOutfit(cid, 128) ~= 3 and getCreatureOutfit(cid, 136) ~= 1 and getCreatureOutfit(cid, 136) ~= 3 then
if getPlayerItemCount(cid,5878) >= 100 then
selfSay('Did you bring me 100 minotaur leathers?')
talkState = 1
else
selfSay('Come back when you have 100 minotaur leathers.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 1 then
if getPlayerItemCount(cid,5878) >= 100 then
if doPlayerTakeItem(cid,5878,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 128, 1)
doPlayerAddOutfit(cid, 136, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'feather hat') then
if isPremium(cid) then
if getCreatureOutfit(cid, 128) ~= 2 and getCreatureOutfit(cid, 128) ~= 3 and getCreatureOutfit(cid, 136) ~= 2 and getCreatureOutfit(cid, 136) ~= 3 then
if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
selfSay('Did you bring me 100 chicken feathers, 50 honeycombs and a legion helmet?')
talkState = 2
else
selfSay('Come back when you have 100 chicken feathers, 50 honeycombs and a legion helmet.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 2 then
if getPlayerItemCount(cid,5890) >= 100 and getPlayerItemCount(cid,5902) >= 50 and getPlayerItemCount(cid,2480) >= 1 then
if doPlayerTakeItem(cid,5890,100) == 0 and doPlayerTakeItem(cid,5902,50) == 0 and doPlayerTakeItem(cid,2480,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 128, 2)
doPlayerAddOutfit(cid, 136, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'winged tiara') or msgcontains(msg, 'hooded cloak') then
if isPremium(cid) then
if getCreatureOutfit(cid, 129) ~= 1 and getCreatureOutfit(cid, 129) ~= 3 and getCreatureOutfit(cid, 137) ~= 2 and getCreatureOutfit(cid, 137) ~= 3 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) >= 1 then
selfSay('Did you bring me the engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings, royal, hell and draconian steel?')
talkState = 3
else
selfSay('Come back when you have the engraved crossbow, 100 lizard leathers, 100 red dragon leather, 5 enchanted chicken wings, royal, hell and draconian steel.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 3 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) >= 1 then
if doPlayerTakeItem(cid,5947,1) == 0 and doPlayerTakeItem(cid,5876,100) == 0 and doPlayerTakeItem(cid,5948,100) == 0 and doPlayerTakeItem(cid,5891,5) == 0 and doPlayerTakeItem(cid,5887,1) == 0 and doPlayerTakeItem(cid,5888,1) == 0 and doPlayerTakeItem(cid,5889,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 129, 1)
doPlayerAddOutfit(cid, 137, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'sniper gloves') then
if isPremium(cid) then
if getCreatureOutfit(cid, 129) ~= 2 and getCreatureOutfit(cid, 129) ~= 3 and getCreatureOutfit(cid, 137) ~= 1 and getCreatureOutfit(cid, 137) ~= 3 then
if getPlayerItemCount(cid,5875) >= 1 then
selfSay('Did you bring me the sniper gloves?')
talkState = 4
else
selfSay('Come back when you have the sniper gloves.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 4 then
if getPlayerItemCount(cid,5875) >= 1 then
if doPlayerTakeItem(cid,5875,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 129, 2)
doPlayerAddOutfit(cid, 137, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'sheathed sword') then
if isPremium(cid) then
if getCreatureOutfit(cid, 131) ~= 1 and getCreatureOutfit(cid, 131) ~= 3 and getCreatureOutfit(cid, 139) ~= 1 and getCreatureOutfit(cid, 139) ~= 3 then
if getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
selfSay('Did you bring me the chunk of crude iron and 100 iron ores?')
talkState = 5
else
selfSay('Come back when you have a chunk of crude iron and 100 iron ores.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 5 then
if getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
if doPlayerTakeItem(cid,5892,1) == 0 and doPlayerTakeItem(cid,5880,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 131, 1)
doPlayerAddOutfit(cid, 139, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'horned helmet') or msgcontains(msg, 'adorned helmet') then
if isPremium(cid) then
if getCreatureOutfit(cid, 131) ~= 2 and getCreatureOutfit(cid, 131) ~= 3 and getCreatureOutfit(cid, 139) ~= 2 and getCreatureOutfit(cid, 139) ~= 3 then
if getPlayerItemCount(cid,5893) >= 100 and getPlayerItemCount(cid,5924) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5887) >= 1 then
selfSay('Did you bring me 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat and royal steel?')
talkState = 6
else
selfSay('Come back when you have 100 behemoth fangs, the damaged steel helmet, warrior\'s sweat and royal steel.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 6 then
if getPlayerItemCount(cid,5893) >= 100 and getPlayerItemCount(cid,5924) >= 1 and getPlayerItemCount(cid,5885) >= 1 and getPlayerItemCount(cid,5887) >= 1 then
if doPlayerTakeItem(cid,5893,100) == 0 and doPlayerTakeItem(cid,5924,1) == 0 and doPlayerTakeItem(cid,5885,1) == 0 and doPlayerTakeItem(cid,5887,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 131, 2)
doPlayerAddOutfit(cid, 139, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'axe') then
if isPremium(cid) then
if getCreatureOutfit(cid, 143) ~= 1 and getCreatureOutfit(cid, 143) ~= 3 and getCreatureOutfit(cid, 147) ~= 1 and getCreatureOutfit(cid, 147) ~= 3 then
if getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5893) >= 50 and getPlayerItemCount(cid,5876) >= 50 then
selfSay('Did you bring me 100 iron ores, 1 chunk of crude iron, 50 behemoth fangs and 50 lizard leathers?')
talkState = 7
else
selfSay('Come back when you have 100 iron ores, 1 chunk of crude iron, 50 behemoth fangs and 50 lizard leathers.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 7 then
if getPlayerItemCount(cid,5880) >= 100 and getPlayerItemCount(cid,5892) >= 1 and getPlayerItemCount(cid,5893) >= 50 and getPlayerItemCount(cid,5876) >= 50 then
if doPlayerTakeItem(cid,5880,100) == 0 and doPlayerTakeItem(cid,5892,1) == 0 and doPlayerTakeItem(cid,5893,50) == 0 and doPlayerTakeItem(cid,5876,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 143, 1)
doPlayerAddOutfit(cid, 147, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'wig') then
if isPremium(cid) then
if getCreatureOutfit(cid, 143) ~= 2 and getCreatureOutfit(cid, 143) ~= 3 and getCreatureOutfit(cid, 147) ~= 2 and getCreatureOutfit(cid, 147) ~= 3 then
if useDjinn == true then
djinn = getPlayerStorageValue(uid,djinnStorage)
else
djinn = 1
end 
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 and djinn == 1 then
if useDjinn == true then
djinnText = ' Also did you do the djinn quest?'
else
djinnText = ''
end
selfSay('Did you bring me the fighting spirit, the warrior\'s sweat, 50 red pieces of cloth, 50 green pieces of cloth and 10 spider silk yarns?' .. djinnText)
talkState = 8
else
if useDjinn == true then
djinnText = ' Also please make sure that you do the djinn quest.'
else
djinnText = ''
end
selfSay('Come back when you have the fighting spirit, the warrior\'s sweat, 50 red pieces of cloth, 50 green pieces of cloth and 10 spider silk yarns.' .. djinnText)
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 8 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 doPlayerTakeItem(cid,5884,1) == 0 and doPlayerTakeItem(cid,5885,1) == 0 and doPlayerTakeItem(cid,5911,50) == 0 and doPlayerTakeItem(cid,5910,50) == 0 and doPlayerTakeItem(cid,5886,10) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 143, 2)
doPlayerAddOutfit(cid, 147, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'bear paws') or msgcontains(msg, 'paws') or msgcontains(msg, 'paw') then
if isPremium(cid) then
if getCreatureOutfit(cid, 144) ~= 1 and getCreatureOutfit(cid, 144) ~= 3 and getCreatureOutfit(cid, 148) ~= 1 and getCreatureOutfit(cid, 148) ~= 3 then
if getPlayerItemCount(cid,5897) >= 50 and getPlayerItemCount(cid,5896) >= 50 then
selfSay('Did you bring me 50 wolf paws and 50 bear paws?')
talkState = 9
else
selfSay('Come back when you have 50 wolf paws and 50 bear paws.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 9 then
if getPlayerItemCount(cid,5897) >= 50 and getPlayerItemCount(cid,5896) >= 50 then
if doPlayerTakeItem(cid,5897,50) == 0 and doPlayerTakeItem(cid,5896,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 144, 1)
doPlayerAddOutfit(cid, 148, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'animal fur') then
if isPremium(cid) then
if getCreatureOutfit(cid, 144) ~= 2 and getCreatureOutfit(cid, 144) ~= 3 and getCreatureOutfit(cid, 148) ~= 2 and getCreatureOutfit(cid, 148) ~= 3 then
if getPlayerItemCount(cid,5937) >= 1 and getPlayerItemCount(cid,5938) >= 1 and getPlayerItemCount(cid,5906) >= 100 and getPlayerItemCount(cid,5942) >= 1 and getPlayerItemCount(cid,5940) >= 1 then
selfSay('Did you bring me a Griffinclaw flower sample, water from the hydra island, 100 demon dusts, a blessed wooden stake and Ceiron\'s wolf tooth chain?')
talkState = 10
else
selfSay('Come back when you have a Griffinclaw flower sample, water from the hydra island, 100 demon dusts, a blessed wooden stake and Ceiron\'s wolf tooth chain.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 10 then
if getPlayerItemCount(cid,5937) >= 1 and getPlayerItemCount(cid,5939) >= 1 and getPlayerItemCount(cid,5906) >= 100 and getPlayerItemCount(cid,5942) >= 1 and getPlayerItemCount(cid,5940) >= 1 then
if doPlayerTakeItem(cid,5937,1) == 0 and doPlayerTakeItem(cid,5939,1) == 0 and doPlayerTakeItem(cid,5906,100) == 0 and doPlayerTakeItem(cid,5942,1) == 0 and doPlayerTakeItem(cid,5940,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 144, 2)
doPlayerAddOutfit(cid, 148, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'coat') or msgcontains(msg, 'dress') then
if isPremium(cid) then
if getCreatureOutfit(cid, 132) ~= 1 and getCreatureOutfit(cid, 132) ~= 3 and getCreatureOutfit(cid, 140) ~= 1 and getCreatureOutfit(cid, 140) ~= 3 then
if getPlayerMoney(cid) >= 150000 then
selfSay('Did you bring me 150000 gold?')
talkState = 11
else
selfSay('Come back when you have 150000 gold.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 11 then
if getPlayerMoney(cid) >= 150000 then
if doPlayerRemoveMoney(cid,150000) then
selfSay(addonGive)
doPlayerAddOutfit(cid, 132, 1)
doPlayerAddOutfit(cid, 140, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'top hat') then
if isPremium(cid) then
if getCreatureOutfit(cid, 132) ~= 2 and getCreatureOutfit(cid, 132) ~= 3 and getCreatureOutfit(cid, 140) ~= 2 and getCreatureOutfit(cid, 140) ~= 3 then
if getPlayerMoney(cid) >= 150000 then
selfSay('Did you bring me 150000 gold?')
talkState = 12
else
selfSay('Come back when you have 150000 gold.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 12 then
if getPlayerMoney(cid) >= 150000 then
if doPlayerRemoveMoney(cid,150000) then
selfSay(addonGive)
doPlayerAddOutfit(cid, 132, 2)
doPlayerAddOutfit(cid, 140, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'scimitar') or msgcontains(msg, 'jewelled belt') then
if isPremium(cid) then
if getCreatureOutfit(cid, 146) ~= 1 and getCreatureOutfit(cid, 146) ~= 3 and getCreatureOutfit(cid, 150) ~= 1 and getCreatureOutfit(cid, 150) ~= 3 then
if getPlayerItemCount(cid,5945) >= 1 then
selfSay('Did you bring me the mermaid comb?')
talkState = 13
else
selfSay('Come back when you have the mermaid comb.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 13 then
if getPlayerItemCount(cid,5945) >= 1 then
if doPlayerTakeItem(cid,5945,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 146, 1)
doPlayerAddOutfit(cid, 150, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'turban') or msgcontains(msg, 'veil') then
if isPremium(cid) then
if getCreatureOutfit(cid, 146) ~= 2 and getCreatureOutfit(cid, 146) ~= 3 and getCreatureOutfit(cid, 150) ~= 2 and getCreatureOutfit(cid, 150) ~= 3 then
if getPlayerItemCount(cid,5883) >= 100 and getPlayerItemCount(cid,5895) >= 100 and getPlayerItemCount(cid,5891) >= 2 and getPlayerItemCount(cid,5912) >= 100 then
selfSay('Did you bring me 100 ape furs, 100 fish fins, 2 enchanted chicken wings and 100 blue pieces of cloth?')
talkState = 14
else
selfSay('Come back when you have 100 ape furs, 100 fish fins, 2 enchanted chicken wings and 100 blue pieces of cloth.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 14 then
if getPlayerItemCount(cid,5883) >= 100 and getPlayerItemCount(cid,5895) >= 100 and getPlayerItemCount(cid,5891) >= 2 and getPlayerItemCount(cid,5912) >= 100 then
if doPlayerTakeItem(cid,5883,100) == 0 and doPlayerTakeItem(cid,5895,100) == 0 and doPlayerTakeItem(cid,5891,2) == 0 and doPlayerTakeItem(cid,5912,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 146, 2)
doPlayerAddOutfit(cid, 150, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'shoulder spike') then
if isPremium(cid) then
if getCreatureOutfit(cid, 134) ~= 1 and getCreatureOutfit(cid, 134) ~= 3 and getCreatureOutfit(cid, 142) ~= 1 and getCreatureOutfit(cid, 142) ~= 3 then
if getPlayerItemCount(cid,5925) >= 100 and getPlayerItemCount(cid,5899) >= 100 and getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5919) >= 1 then
selfSay('Did you bring me 100 hardened bones, 100 turtle shells, fighting spirit and a dragon claw?')
talkState = 15
else
selfSay('Come back when you have 100 hardened bones, 100 turtle shells, fighting spirit and a dragon claw.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 15 then
if getPlayerItemCount(cid,5925) >= 100 and getPlayerItemCount(cid,5899) >= 100 and getPlayerItemCount(cid,5884) >= 1 and getPlayerItemCount(cid,5919) >= 1 then
if doPlayerTakeItem(cid,5925,100) == 0 and doPlayerTakeItem(cid,5899,100) == 0 and doPlayerTakeItem(cid,5884,1) == 0 and doPlayerTakeItem(cid,5919,1) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 134, 1)
doPlayerAddOutfit(cid, 142, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'legendary sword') then
if isPremium(cid) then
if getCreatureOutfit(cid, 134) ~= 2 and getCreatureOutfit(cid, 134) ~= 3 and getCreatureOutfit(cid, 142) ~= 2 and getCreatureOutfit(cid, 142) ~= 3 then
if getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
selfSay('Did you bring me 100 iron ores and royal steel?')
talkState = 16
else
selfSay('Come back when you have 100 iron ores and royal steel.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 16 then
if getPlayerItemCount(cid,5887) >= 1 and getPlayerItemCount(cid,5880) >= 100 then
if doPlayerTakeItem(cid,5887,1) == 0 and doPlayerTakeItem(cid,5880,100) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 134, 2)
doPlayerAddOutfit(cid, 142, 2)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'skull shoulder pad') or msgcontains(msg, 'wings') then
if isPremium(cid) then
if getCreatureOutfit(cid, 145) ~= 1 and getCreatureOutfit(cid, 145) ~= 3 and getCreatureOutfit(cid, 149) ~= 1 and getCreatureOutfit(cid, 149) ~= 3 then
if getPlayerItemCount(cid,5922) >= 50 and (getCreatureOutfit(cid, 145) == 2 or getCreatureOutfit(cid, 149) == 2) then
selfSay('Did you bring me 50 holy orchids? Also have you got the skull mask respectively snake tiara?')
talkState = 17
else
selfSay('Come back when you have 50 holy orchids and the skull mask respectively snake tiara.')
end
else
selfSay(addonHave)
end
else
selfSay(addonPremium)
end
elseif msgcontains(msg, 'yes') and talkState == 17 then
if getPlayerItemCount(cid,5922) >= 50 then
if doPlayerTakeItem(cid,5922,50) == 0 then
selfSay(addonGive)
doPlayerAddOutfit(cid, 145, 1)
doPlayerAddOutfit(cid, 149, 1)
end
else
selfSay(addonItem)
end
talkState = 0
elseif msgcontains(msg, 'skull mask') or msgcontains(msg, 'snake tiara') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 145) ~= 2 and getCreatureOutfit(cid, 145) ~= 3 and getCreatureOutfit(cid, 149) ~= 2 and getCreatureOutfit(cid, 149) ~= 3 then
                if getPlayerItemCount(cid,2488) >= 1 and getPlayerItemCount(cid,2123) >= 1 and getPlayerItemCount(cid,2492) >= 1 and getPlayerItemCount(cid,2536) >= 1 then
                    selfSay('Did you bring me a medusa shield, a dragon scale mail, a ring of the sky and crown legs?')
                    talkState = 18
                else
                    selfSay('Come back when you have a medusa shield, a dragon scale mail, a ring of the sky and crown legs.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 18 then
        if getPlayerItemCount(cid,2488) >= 1 and getPlayerItemCount(cid,2123) >= 1 and getPlayerItemCount(cid,2492) >= 1 and getPlayerItemCount(cid,2536) >= 1 then
            if doPlayerTakeItem(cid,2488,1) == 0 and doPlayerTakeItem(cid,2123,1) == 0 and doPlayerTakeItem(cid,2492,1) == 0 and doPlayerTakeItem(cid,2536,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 145, 2)
                doPlayerAddOutfit(cid, 149, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'headpiece') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 152) ~= 1 and getCreatureOutfit(cid, 152) ~= 3 and getCreatureOutfit(cid, 156) ~= 1 and getCreatureOutfit(cid, 156) ~= 3 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
                    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?')
                    talkState = 19
                else
                    selfSay('Come back when you have 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.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 19 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 doPlayerTakeItem(cid,5909,50) == 0 and doPlayerTakeItem(cid,5910,50) == 0 and doPlayerTakeItem(cid,5911,50) == 0 and doPlayerTakeItem(cid,5912,50) == 0 and doPlayerTakeItem(cid,5913,50) == 0 and doPlayerTakeItem(cid,5914,50) == 0 and doPlayerTakeItem(cid,5886,10) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 152, 1)
                doPlayerAddOutfit(cid, 156, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'katana') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 152) ~= 2 and getCreatureOutfit(cid, 152) ~= 3 and getCreatureOutfit(cid, 156) ~= 2 and getCreatureOutfit(cid, 156) ~= 3 then
                if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 and (getCreatureOutfit(cid, 152) == 1 or getCreatureOutfit(cid, 156) == 1) then
                    selfSay('Did you bring me a nose ring, a behemoth claw and the headpiece?')
                    talkState = 20
                else
                    selfSay('Come back when you have a nose ring, a behemoth claw and the headpiece.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 20 then
        if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 then
            if doPlayerTakeItem(cid,5804,1) == 0 and doPlayerTakeItem(cid,5930,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 152, 2)
                doPlayerAddOutfit(cid, 156, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'beard') or msgcontains(msg, 'necklace') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 153) ~= 1 and getCreatureOutfit(cid, 153) ~= 3 and getCreatureOutfit(cid, 157) ~= 2 and getCreatureOutfit(cid, 157) ~= 3 then
                if getPlayerItemCount(cid,5883) >= 100 and getPlayerMoney(cid) >= 20000 then
                    selfSay('Did you bring me 100 ape furs and 20000 gold?')
                    talkState = 21
                else
                    selfSay('Come back when you have 100 ape furs and 20000 gold.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 21 then
        if getPlayerItemCount(cid,5883) >= 100 and getPlayerMoney(cid) >= 20000 then
            if doPlayerTakeItem(cid,5883,100) == 0 and doPlayerRemoveMoney(cid,20000) then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 153, 1)
                doPlayerAddOutfit(cid, 157, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'simons staff') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 153) ~= 2 and getCreatureOutfit(cid, 153) ~= 3 and getCreatureOutfit(cid, 157) ~= 1 and getCreatureOutfit(cid, 157) ~= 3 then
                if getPlayerItemCount(cid,6107) >= 1 and (getCreatureOutfit(cid, 153) == 1 or getCreatureOutfit(cid, 157) == 2) then
                    selfSay('Did you bring me Simon\'s favourite staff and the beard respectively necklace?')
                    talkState = 22
                else
                    selfSay('Come back when you have Simon\'s favourite staff and the beard respectively necklace.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 22 then
        if getPlayerItemCount(cid,6107) >= 1 then
            if doPlayerTakeItem(cid,6107,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 153, 2)
                doPlayerAddOutfit(cid, 157, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'sabre') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 151) ~= 1 and getCreatureOutfit(cid, 151) ~= 3 and getCreatureOutfit(cid, 155) ~= 1 and getCreatureOutfit(cid, 155) ~= 3 then
                if getPlayerItemCount(cid,6126) >= 100 and getPlayerItemCount(cid,6097) >= 100 and getPlayerItemCount(cid,6098) >= 100 then
                    selfSay('Did you bring me 100 eye patches, 100 peg legs and 100 hooks?')
                    talkState = 23
                else
                    selfSay('Come back when you have 100 eye patches, 100 peg legs and 100 hooks.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 23 then
        if getPlayerItemCount(cid,6126) >= 100 and getPlayerItemCount(cid,6097) >= 100 and getPlayerItemCount(cid,6098) >= 100 then
            if doPlayerTakeItem(cid,6126,100) == 0 and doPlayerTakeItem(cid,6097,100) == 0 and doPlayerTakeItem(cid,6098,100) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 151, 1)
                doPlayerAddOutfit(cid, 155, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'sea hat') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 151) ~= 2 and getCreatureOutfit(cid, 151) ~= 3 and getCreatureOutfit(cid, 155) ~= 2 and getCreatureOutfit(cid, 155) ~= 3 then
                if getPlayerItemCount(cid,6099) >= 1 and getPlayerItemCount(cid,6100) >= 1 and getPlayerItemCount(cid,6101) >= 1 and getPlayerItemCount(cid,6102) >= 1 then
                    selfSay('Did you bring me Ron the Ripper\'s sabre, Deadeye Devious\' eye patch, Lethal Lissy\'s shirt, Brutus Bloodbeard\'s hat?')
                    talkState = 24
                else
                    selfSay('Come back when you have Ron the Ripper\'s sabre, Deadeye Devious\' eye patch, Lethal Lissy\'s shirt, Brutus Bloodbeard\'s hat.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 24 then
        if getPlayerItemCount(cid,6099) >= 1 and getPlayerItemCount(cid,6100) >= 1 and getPlayerItemCount(cid,6101) >= 1 and getPlayerItemCount(cid,6102) >= 1 then
            if doPlayerTakeItem(cid,6099,1) == 0 and doPlayerTakeItem(cid,6100,1) == 0 and doPlayerTakeItem(cid,6101,1) == 0 and doPlayerTakeItem(cid,6102,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 151, 2)
                doPlayerAddOutfit(cid, 155, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'voodoo mask') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 154) ~= 1 and getCreatureOutfit(cid, 154) ~= 3 and getCreatureOutfit(cid, 158) ~= 1 and getCreatureOutfit(cid, 158) ~= 3 then
                if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 and (getCreatureOutfit(cid, 154) == 2 or getCreatureOutfit(cid, 158) == 2) then
                    selfSay('Did you bring me 5 banana staffs and 5 tribal masks and voodoo staff?')
                    talkState = 25
                else
                    selfSay('Come back when you have 5 banana staffs and 5 tribal masks and voodoo staff.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 25 then
        if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 then
            if doPlayerTakeItem(cid,3966,5) == 0 and doPlayerTakeItem(cid,3967,5) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 154, 1)
                doPlayerAddOutfit(cid, 158, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'voodoo staff') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 154) ~= 2 and getCreatureOutfit(cid, 154) ~= 3 and getCreatureOutfit(cid, 158) ~= 2 and getCreatureOutfit(cid, 158) ~= 3 then
                if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 then
                    selfSay('Did you bring me 5 dworc voodoo dolls and a mandrake?')
                    talkState = 26
                else
                    selfSay('Come back when you have 5 dworc voodoo dolls and a mandrake.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 26 then
        if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 then
            if doPlayerTakeItem(cid,3955,5) == 0 and doPlayerTakeItem(cid,5015,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 154, 2)
                doPlayerAddOutfit(cid, 158, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'fluid belt') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 138) ~= 1 and getCreatureOutfit(cid, 138) ~= 3 and getCreatureOutfit(cid, 133) ~= 1 and getCreatureOutfit(cid, 133) ~= 3 then
                if getPlayerItemCount(cid,5958) >= 1 then
                    selfSay('Did you bring me a winning lottery ticket?')
                    talkState = 27
                else
                    selfSay('Come back when you have a winning lottery ticket.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 27 then
        if getPlayerItemCount(cid,5958) >= 1 then
            if doPlayerTakeItem(cid,5958,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 138, 1)
                doPlayerAddOutfit(cid, 133, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'tiara') or msgcontains(msg, 'cape') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 138) ~= 2 and getCreatureOutfit(cid, 138) ~= 3 and getCreatureOutfit(cid, 133) ~= 2 and getCreatureOutfit(cid, 133) ~= 3 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
                    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?')
                    talkState = 28
                else
                    selfSay('Come back when you have 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.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 28 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 doPlayerTakeItem(cid,5894,70) and doPlayerTakeItem(cid,5911,20) and doPlayerTakeItem(cid,5883,40) and doPlayerTakeItem(cid,5922,35) and doPlayerTakeItem(cid,5886,10) and doPlayerTakeItem(cid,5881,60) and doPlayerTakeItem(cid,5882,40) and doPlayerTakeItem(cid,5904,15) and doPlayerTakeItem(cid,5905,30) then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 138, 2)
                doPlayerAddOutfit(cid, 133, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'wand') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 141) ~= 1 and getCreatureOutfit(cid, 141) ~= 3 and getCreatureOutfit(cid, 130) ~= 1 and getCreatureOutfit(cid, 130) ~= 3 then
                if getPlayerItemCount(cid,2181) >= 1 and getPlayerItemCount(cid,2182) >= 1 and getPlayerItemCount(cid,2183) >= 1 and getPlayerItemCount(cid,2185) >= 1 and getPlayerItemCount(cid,2186) >= 1 and getPlayerItemCount(cid,2187) >= 1 and getPlayerItemCount(cid,2188) >= 1 and getPlayerItemCount(cid,2189) >= 1 and getPlayerItemCount(cid,2190) >= 1 and getPlayerItemCount(cid,2191) >= 1 and getPlayerItemCount(cid,5904) >= 10 and getPlayerItemCount(cid,2193) >= 20 and getPlayerItemCount(cid,5809) >= 1 then
                    selfSay('Did you bring me all the wands and rods, 10 magic sulphors, 20 ankhs and a soul stone?')
                    talkState = 29
                else
                    selfSay('Come back when you have all the wands and rods, 10 magic sulphors, 20 ankhs and a soul stone.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 29 then
        if getPlayerItemCount(cid,2181) >= 1 and getPlayerItemCount(cid,2182) >= 1 and getPlayerItemCount(cid,2183) >= 1 and getPlayerItemCount(cid,2185) >= 1 and getPlayerItemCount(cid,2186) >= 1 and getPlayerItemCount(cid,2187) >= 1 and getPlayerItemCount(cid,2188) >= 1 and getPlayerItemCount(cid,2189) >= 1 and getPlayerItemCount(cid,2190) >= 1 and getPlayerItemCount(cid,2191) >= 1 and getPlayerItemCount(cid,5904) >= 10 and getPlayerItemCount(cid,2193) >= 20 and getPlayerItemCount(cid,5809) >= 1 then
            if doPlayerTakeItem(cid,2181,1) == 0 and doPlayerTakeItem(cid,2182,1) == 0 and doPlayerTakeItem(cid,2183,1) == 0 and doPlayerTakeItem(cid,2185,1) == 0 and doPlayerTakeItem(cid,2186,1) == 0 and doPlayerTakeItem(cid,2187,1) == 0 and doPlayerTakeItem(cid,2188,1) == 0 and doPlayerTakeItem(cid,2189,1) == 0 and doPlayerTakeItem(cid,2190,1) == 0 and doPlayerTakeItem(cid,2191,1) == 0 and doPlayerTakeItem(cid,5904,10) == 0 and doPlayerTakeItem(cid,2193,20) == 0 and doPlayerTakeItem(cid,5809,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 141, 1)
                doPlayerAddOutfit(cid, 130, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'ferumbras') or msgcontains(msg, 'ferumbras hat') or msgcontains(msg, 'ferumbras\' hat') or msgcontains(msg, 'mage hat') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 141) ~= 2 and getCreatureOutfit(cid, 141) ~= 3 and getCreatureOutfit(cid, 130) ~= 2 and getCreatureOutfit(cid, 130) ~= 3 then
                if getPlayerItemCount(cid,5903) >= 1 then
                    selfSay('Did you bring me Ferumbrass\' hat?')
                    talkState = 30
                else
                    selfSay('Come back when you have Ferumbrass\' hat.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 30 then
        if getPlayerItemCount(cid,5903) >= 1 then
            if doPlayerTakeItem(cid,5903,1) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 141, 2)
                doPlayerAddOutfit(cid, 130, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
     elseif msgcontains(msg, 'spear') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 251) ~= 1 and getCreatureOutfit(cid, 251) ~= 3 and getCreatureOutfit(cid, 252) ~= 1 and getCreatureOutfit(cid, 252) ~= 3 then
                if getPlayerItemCount(cid,7290) >= 5 then
                    selfSay('Did you bring me 5 shards?')
                    talkState = 31
                else
                    selfSay('Come back when you have 5 shards.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 31 then
        if getPlayerItemCount(cid,7290) >= 5 then
            if doPlayerTakeItem(cid,7290,5) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 251, 1)
                doPlayerAddOutfit(cid, 252, 1)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'hood') or msgcontains(msg, 'earmuffs') or msgcontains(msg, 'earmuff') then
        if isPremium(cid) then
            if getCreatureOutfit(cid, 251) ~= 2 and getCreatureOutfit(cid, 251) ~= 3 and getCreatureOutfit(cid, 252) ~= 2 and getCreatureOutfit(cid, 252) ~= 3 then
                if getPlayerItemCount(cid,7290) >= 10 then
                    selfSay('Did you bring me 10 shards?')
                    talkState = 32
                else
                    selfSay('Come back when you have 10 shards.')
                end
            else
                selfSay(addonHave)
            end
        else
            selfSay(addonPremium)
        end
    elseif msgcontains(msg, 'yes') and talkState == 32 then
        if getPlayerItemCount(cid,7290) >= 10 then
            if doPlayerTakeItem(cid,7290,10) == 0 then
                selfSay(addonGive)
                doPlayerAddOutfit(cid, 251, 2)
                doPlayerAddOutfit(cid, 252, 2)
            end
        else
            selfSay(addonItem)
        end
        talkState = 0
    elseif msgcontains(msg, 'no') and talkState >= 1 and talkState <= 32 then
        selfSay('Ok than.')
        talkState = 0
    end
    return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

heres the whole script.
 
Back
Top