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

[Request] Addon NPC

nimedon

New Member
Joined
May 30, 2007
Messages
80
Reaction score
0
Hi, can anyone help me with an addon npc, I can't get working mine, here is the script of mine:

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 Evolutions V0.7.7 ------------------------------ 
-------------------------------------------------------------------------------------------- 
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 getPlayerOutfitAddon(cid, 128) ~= 1 and getPlayerOutfitAddon(cid, 128) ~= 3 and getPlayerOutfitAddon(cid, 136) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 128, 1) 
                doPlayerAddAddon(cid, 136, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'citizen hat') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 128) ~= 2 and getPlayerOutfitAddon(cid, 128) ~= 3 and getPlayerOutfitAddon(cid, 136) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 128, 2) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 129) ~= 1 and getPlayerOutfitAddon(cid, 129) ~= 3 and getPlayerOutfitAddon(cid, 137) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 129, 1) 
                doPlayerAddAddon(cid, 137, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'sniper gloves') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 129) ~= 2 and getPlayerOutfitAddon(cid, 129) ~= 3 and getPlayerOutfitAddon(cid, 137) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 129, 2) 
                doPlayerAddAddon(cid, 137, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'knight sword') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 131) ~= 1 and getPlayerOutfitAddon(cid, 131) ~= 3 and getPlayerOutfitAddon(cid, 139) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 131, 1) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 131) ~= 2 and getPlayerOutfitAddon(cid, 131) ~= 3 and getPlayerOutfitAddon(cid, 139) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 131, 2) 
                doPlayerAddAddon(cid, 139, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'barbarian axe') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 143) ~= 1 and getPlayerOutfitAddon(cid, 143) ~= 3 and getPlayerOutfitAddon(cid, 147) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 143, 1) 
                doPlayerAddAddon(cid, 147, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'barbarian wig') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 143) ~= 2 and getPlayerOutfitAddon(cid, 143) ~= 3 and getPlayerOutfitAddon(cid, 147) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 143, 2) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 144) ~= 1 and getPlayerOutfitAddon(cid, 144) ~= 3 and getPlayerOutfitAddon(cid, 148) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 144, 1) 
                doPlayerAddAddon(cid, 148, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'animal fur') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 144) ~= 2 and getPlayerOutfitAddon(cid, 144) ~= 3 and getPlayerOutfitAddon(cid, 148) ~= 2 and getPlayerOutfitAddon(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 cave, 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 cave, 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,5938) >= 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,5938,1) == 0 and doPlayerTakeItem(cid,5906,100) == 0 and doPlayerTakeItem(cid,5942,1) == 0 and doPlayerTakeItem(cid,5940,1) == 0 then 
                selfSay(addonGive) 
                doPlayerAddAddon(cid, 144, 2) 
                doPlayerAddAddon(cid, 148, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'coat') or msgcontains(msg, 'dress') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 132) ~= 1 and getPlayerOutfitAddon(cid, 132) ~= 3 and getPlayerOutfitAddon(cid, 140) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 132, 1) 
                doPlayerAddAddon(cid, 140, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'top hat') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 132) ~= 2 and getPlayerOutfitAddon(cid, 132) ~= 3 and getPlayerOutfitAddon(cid, 140) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 132, 2) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 146) ~= 1 and getPlayerOutfitAddon(cid, 146) ~= 3 and getPlayerOutfitAddon(cid, 150) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 146, 1) 
                doPlayerAddAddon(cid, 150, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'turban') or msgcontains(msg, 'veil') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 146) ~= 2 and getPlayerOutfitAddon(cid, 146) ~= 3 and getPlayerOutfitAddon(cid, 150) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 146, 2) 
                doPlayerAddAddon(cid, 150, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'shoulder spike') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 134) ~= 1 and getPlayerOutfitAddon(cid, 134) ~= 3 and getPlayerOutfitAddon(cid, 142) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 134, 1) 
                doPlayerAddAddon(cid, 142, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'warrior sword') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 134) ~= 2 and getPlayerOutfitAddon(cid, 134) ~= 3 and getPlayerOutfitAddon(cid, 142) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 134, 2) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 145) ~= 1 and getPlayerOutfitAddon(cid, 145) ~= 3 and getPlayerOutfitAddon(cid, 149) ~= 1 and getPlayerOutfitAddon(cid, 149) ~= 3 then 
                if getPlayerItemCount(cid,5922) >= 50 and (getPlayerOutfitAddon(cid, 145) == 2 or getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 145, 1) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 145) ~= 2 and getPlayerOutfitAddon(cid, 145) ~= 3 and getPlayerOutfitAddon(cid, 149) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 145, 2) 
                doPlayerAddAddon(cid, 149, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'assassin headpiece') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 152) ~= 1 and getPlayerOutfitAddon(cid, 152) ~= 3 and getPlayerOutfitAddon(cid, 156) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 152, 1) 
                doPlayerAddAddon(cid, 156, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'assassin katana') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 152) ~= 2 and getPlayerOutfitAddon(cid, 152) ~= 3 and getPlayerOutfitAddon(cid, 156) ~= 2 and getPlayerOutfitAddon(cid, 156) ~= 3 then 
                if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 then 
                    selfSay('Did you bring me a nose ring and a behemoth claw?') 
                    talkState = 20 
                else 
                    selfSay('Come back when you have a nose ring and a behemoth claw.') 
                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) 
                doPlayerAddAddon(cid, 152, 2) 
                doPlayerAddAddon(cid, 156, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'beard') or msgcontains(msg, 'necklace') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 153) ~= 1 and getPlayerOutfitAddon(cid, 153) ~= 3 and getPlayerOutfitAddon(cid, 157) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 153, 1) 
                doPlayerAddAddon(cid, 157, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'beggar staff') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 153) ~= 2 and getPlayerOutfitAddon(cid, 153) ~= 3 and getPlayerOutfitAddon(cid, 157) ~= 1 and getPlayerOutfitAddon(cid, 157) ~= 3 then 
                if getPlayerItemCount(cid,6107) >= 1 then 
                    selfSay('Did you bring me Simon's favourite staff?') 
                    talkState = 22 
                else 
                    selfSay('Come back when you have Simon's favourite staff.') 
                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) 
                doPlayerAddAddon(cid, 153, 2) 
                doPlayerAddAddon(cid, 157, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'pirate sabre') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 151) ~= 1 and getPlayerOutfitAddon(cid, 151) ~= 3 and getPlayerOutfitAddon(cid, 155) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 151, 1) 
                doPlayerAddAddon(cid, 155, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'pirate hat') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 151) ~= 2 and getPlayerOutfitAddon(cid, 151) ~= 3 and getPlayerOutfitAddon(cid, 155) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 151, 2) 
                doPlayerAddAddon(cid, 155, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'voodoo mask') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 154) ~= 1 and getPlayerOutfitAddon(cid, 154) ~= 3 and getPlayerOutfitAddon(cid, 158) ~= 1 and getPlayerOutfitAddon(cid, 158) ~= 3 then 
                if getPlayerItemCount(cid,3966) >= 5 and getPlayerItemCount(cid,3967) >= 5 then 
                    selfSay('Did you bring me 5 banana staffs and 5 tribal masks?') 
                    talkState = 25 
                else 
                    selfSay('Come back when you have 5 banana staffs and 5 tribal masks.') 
                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) 
                doPlayerAddAddon(cid, 154, 1) 
                doPlayerAddAddon(cid, 158, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'voodoo staff') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 154) ~= 2 and getPlayerOutfitAddon(cid, 154) ~= 3 and getPlayerOutfitAddon(cid, 158) ~= 2 and getPlayerOutfitAddon(cid, 158) ~= 3 then 
                if getPlayerItemCount(cid,3955) >= 5 and getPlayerItemCount(cid,5015) >= 1 then 
                    selfSay('Did you bring me 5 dworc vodoo dolls and a mandrake?') 
                    talkState = 26 
                else 
                    selfSay('Come back when you have 5 dworc vodoo 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) 
                doPlayerAddAddon(cid, 154, 2) 
                doPlayerAddAddon(cid, 158, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'fluid belt') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 138) ~= 1 and getPlayerOutfitAddon(cid, 138) ~= 3 and getPlayerOutfitAddon(cid, 133) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 138, 1) 
                doPlayerAddAddon(cid, 133, 1) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'cloak') or msgcontains(msg, 'tiara') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 138) ~= 2 and getPlayerOutfitAddon(cid, 138) ~= 3 and getPlayerOutfitAddon(cid, 133) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 138, 2) 
                doPlayerAddAddon(cid, 133, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'wand') then 
        if isPremium(cid) then 
            if getPlayerOutfitAddon(cid, 141) ~= 1 and getPlayerOutfitAddon(cid, 141) ~= 3 and getPlayerOutfitAddon(cid, 130) ~= 1 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 141, 1) 
                doPlayerAddAddon(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 getPlayerOutfitAddon(cid, 141) ~= 2 and getPlayerOutfitAddon(cid, 141) ~= 3 and getPlayerOutfitAddon(cid, 130) ~= 2 and getPlayerOutfitAddon(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) 
                doPlayerAddAddon(cid, 141, 2) 
                doPlayerAddAddon(cid, 130, 2) 
            end 
        else 
            selfSay(addonItem) 
        end 
        talkState = 0 
    elseif msgcontains(msg, 'no') and talkState >= 1 and talkState <= 30 then 
        selfSay('Ok than.') 
        talkState = 0 
    end 
    return true 
end 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) 
npcHandler:addModule(FocusModule:new())

thanks
 
I got this large code but im not sure if it works. I might try it again later.

Here is it.
Code:
ocal 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('Hello ' .. creatureGetName(cid) .. '! I give the all "addons" and "outfits". If you dont know how to buy, say "help".')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0

elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'addons') then
if isPremium(cid) then
selfSay('You can buy the first and the second addon. I can give you the Citizen, Hunter, Mage, Knight, Nobleman, Summoner, Warrior, Barbarian, Druid, Wizard, Oriental, Pirate, Assassin, Beggar, Shaman addons.')
talk_state = 0
else
selfSay('I have nothing for you.')
talk_state = 0
end
elseif msgcontains(msg, 'outfits') then
if isPremium(cid) then
selfSay('I can give you the Pirate, Assassin, Beggar, Shaman outfits.')
talk_state = 0
else
selfSay('I have nothing for you.')
talk_state = 0
end
elseif msgcontains(msg, 'help') then
if isPremium(cid) then
selfSay('To buy the first addon, say: "first NAME addon" and to buy the second addon, say: "second NAME addon. You can see the NAMES when you say: "addons".')
talk_state = 0
else
selfSay('I have nothing for you.')
talk_state = 0
end
end

------------------------------------start addons-------------------------------------------

if msgcontains(msg, 'first citizen addon') then
if isPremium(cid) then
if haveItem(cid, 5878, 100, 0, 1) == 1 then
selfSay('Did you bring me 100 minotaur leathers?')
talk_state = 1
else
selfSay('I need 100 minotaur leather, to give you the first addon of Citizen Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second citizen addon') then
if isPremium(cid) then
if haveItem(cid, 5890, 100, 0, 1) == 1 and haveItem(cid, 5902, 50, 0, 1) == 1 and haveItem(cid, 2480, 1, 0, 0) == 1 then
selfSay('Did you bring me 100 chicken feathers, 50 honeycombs and 1 legion helmet?')
talk_state = 2
else
selfSay('I need 100 chicken feathers, 50 honeycombs and 1 legion helmet, to give you the second addon of Citizen Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first hunter addon') then
if isPremium(cid) then
if haveItem(cid, 5947, 1, 0, 0) == 1 and haveItem(cid, 5876, 100, 0, 1) == 1 and haveItem(cid, 5948, 100, 0, 1) == 1 and haveItem(cid, 5891, 5, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 and haveItem(cid, 5889, 1, 0, 1) == 1 and haveItem(cid, 5888, 1, 0, 1) == 1 then
selfSay('Did you bring me 1 engraved crossbow, 100 pieces of lizard leather, 100 pieces of red dragon leather, 5 enchanted chicken wings, 1 piece of royal stell, 1 piece of dragonian stell and 1 piece of hell stell?')
talk_state = 3
else
selfSay('I need 1 engraved crossbow, 100 pieces of lizard leather, 100 pieces of red dragon leather, 5 enchanted chicken wings, 1 piece of royal stell, 1 piece of dragonian stell and 1 piece of hell stell, to give you the first addon of Hunter Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second hunter addon') then
if isPremium(cid) then
if haveItem(cid, 5875, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 pair of sniper gloves?')
talk_state = 4
else
selfSay('I need 1 pair of sniper gloves, to give you the second addon of Hunter Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first mage addon') then
if isPremium(cid) then
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone?')
talk_state = 5
else
selfSay('I need 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone, to give you the first addon of Mage Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second mage addon') then
if isPremium(cid) then
if haveItem(cid, 5903, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 ferumbras hat?')
talk_state = 6
else
selfSay('I need 1 ferumbras hat, to give you the second addon of Mage Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first knight addon') then
if isPremium(cid) then
if haveItem(cid, 5880, 100, 0, 1) == 1 then
selfSay('Did you bring me 100 iron ore?') --falta 1 crude iron
talk_state = 7
else
selfSay('I need 100 iron ore, to give you the first addon of Knight Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second knight addon') then
if isPremium(cid) then
if haveItem(cid, 5893, 100, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
selfSay('Did you bring me 100 behemoth fangs, 1 flask of warrior sweat and 1 royal steal?')
talk_state = 8
else
selfSay('I need 100 behemoth fangs, 1 flask of warrior sweat and 1 royal steal, to give you the second addon of Knight Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first nobleman addon') then
if isPremium(cid) then
selfSay('I need 150000gp, to give you the first addon of Nobleman Outfit. Did you bring me 150000gp?')
talk_state = 9
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second nobleman addon') then
if isPremium(cid) then
selfSay('I need 150000gp, to give you the second addon of Nobleman Outfit. Did you bring me 150000gp?')
talk_state = 10
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first summoner addon') then
if isPremium(cid) then
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone?')
talk_state = 11
else
selfSay('I need 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone, to give you the first addon of Summoner Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second summoner addon') then
if isPremium(cid) then
if haveItem(cid, 5903, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 ferumbras hat?')
talk_state = 12
else
selfSay('I need 1 ferumbras hat, to give you the second addon of Summoner Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first warrior addon') then
if isPremium(cid) then
if haveItem(cid, 5925, 100, 0, 1) == 1 and haveItem(cid, 5899, 100, 0, 1) == 1 and haveItem(cid, 5884, 1, 0, 0) == 1 and haveItem(cid, 5919, 1, 0, 0) == 1 then
selfSay('Did you bring me 100 hardened bones, 100 turtle shells, 1 fighting spirit and 1 dragon claw?')
talk_state = 13
else
selfSay('I need 100 hardened bones, 100 turtle shells, 1 fighting spirit and 1 dragon claw, to give you the first addon of Warrior Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second warrior addon') then
if isPremium(cid) then
if haveItem(cid, 5880, 100, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
selfSay('Did you bring me 100 iron ore and 1 royal stell?')
talk_state = 14
else
selfSay('I need 100 iron ore and 1 royal stell, to give you the second addon of Warrior Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first barbarian addon') then
if isPremium(cid) then
preco_addon = 90000
addon_id = 1
outfit_id = 8
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second barbarian addon') then
if isPremium(cid) then
preco_addon = 110000
addon_id = 2
outfit_id = 8
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end


elseif msgcontains(msg, 'first druid addon') then
if isPremium(cid) then
preco_addon = 110000
addon_id = 1
outfit_id = 9
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second druid addon') then
if isPremium(cid) then
preco_addon = 130000
addon_id = 2
outfit_id = 9
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first wizard addon') then
if isPremium(cid) then
preco_addon = 170000
addon_id = 1
outfit_id = 10
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second wizard addon') then
if isPremium(cid) then
preco_addon = 200000
addon_id = 2
outfit_id = 10
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first oriental addon') then
if isPremium(cid) then
preco_addon = 160000
addon_id = 1
outfit_id = 11
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second oriental addon') then
if isPremium(cid) then
preco_addon = 170000
addon_id = 2
outfit_id = 11
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end


elseif msgcontains(msg, 'first pirate addon') then
if isPremium(cid) then
preco_addon = 210000
addon_id = 1
outfit_id = 12
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second pirate addon') then
if isPremium(cid) then
preco_addon = 220000
addon_id = 2
outfit_id = 12
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end


elseif msgcontains(msg, 'first assassin addon') then
if isPremium(cid) then
preco_addon = 190000
addon_id = 1
outfit_id = 13
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second assassin addon') then
if isPremium(cid) then
preco_addon = 200000
addon_id = 2
outfit_id = 13
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first beggar addon') then
if isPremium(cid) then
preco_addon = 175000
addon_id = 1
outfit_id = 14
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second beggar addon') then
if isPremium(cid) then
preco_addon = 190000
addon_id = 2
outfit_id = 14
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first shaman addon') then
if isPremium(cid) then
preco_addon = 210000
addon_id = 1
outfit_id = 15
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second shaman addon') then
if isPremium(cid) then
preco_addon = 230000
addon_id = 2
outfit_id = 15
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end
end

------------------------------------start outfits-------------------------------------------

if msgcontains(msg, 'pirate outfit') then
if isPremium(cid) then
if haveItem(cid, 6096, 1, 0, 0) == 1 and haveItem(cid, 6095, 1, 0, 0) == 1 and haveItem(cid, 5918, 1, 0, 0) == 1 and haveItem(cid, 5462, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 pirate hat, 1 pirate shirt, 1 pirate knee legs and 1 pirate boots?')
talk_state = 31
else
selfSay('I need 1 pirate hat, 1 pirate shirt, 1 pirate knee legs and 1 pirate boots, to give you the Pirate Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end

elseif msgcontains(msg, 'assassin outfit') then
if isPremium(cid) then
if haveItem(cid, 2420, 1, 0, 0) == 1 and haveItem(cid, 5898, 30, 0, 1) == 1 and haveItem(cid, 5948, 10, 0, 1) == 1 and haveItem(cid, 5881, 30, 0, 1) == 1 and haveItem(cid, 5895, 20, 0, 1) == 1 and haveItem(cid, 5905, 20, 0, 1) == 1 and haveItem(cid, 5906, 10, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 machete, 30 beholder eyes, 10 red dragon scale, 30 lizard scale, 20 fish fin, 20 vampire dust, 10 demon dust and 1 flask of warrior sweat?')
talk_state = 32
else
selfSay('I need 1 machete, 30 beholder eyes, 10 red dragon scale, 30 lizard scale, 20 fish fin, 20 vampire dust, 10 demon dust and 1 flask of warrior sweat, to give you the Assassin Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end

elseif msgcontains(msg, 'beggar outfit') then
if isPremium(cid) then
if haveItem(cid, 5878, 50, 0, 1) == 1 and haveItem(cid, 5921, 30, 0, 1) == 1 and haveItem(cid, 5913, 20, 0, 1) == 1 and haveItem(cid, 5894, 10, 0, 1) == 1 then
selfSay('Did you bring me 50 minothaur leather, 30 heaven blossoms, 20 brown pieces of cloth and 10 bat wings?')
talk_state = 33
else
selfSay('I need 50 minothaur leather, 30 heaven blossoms, 20 brown pieces of cloth and 10 bat wings, to give you the Beggar Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end

elseif msgcontains(msg, 'shaman outfit') then
if isPremium(cid) then
if getPlayerStorageValue(cid,6000) == 1 then
selfSay('Me truly proud of you, friend. You learn many about plants, charms and ape people. Me want grant you shamanic power now. You ready?')
talk_state = 34
else
selfSay('You have not complete the quest.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end
end

------------------------------------message confirmation-------------------------------------------

if msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
selfSay('Ok than.')
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 1 then
talk_state = 0
if haveItem(cid, 5878, 100, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 1, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5878, 100) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 2 then
talk_state = 0
if haveItem(cid, 5890, 100, 0, 1) == 1 and haveItem(cid, 5902, 50, 0, 1) == 1 and haveItem(cid, 2480, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 1, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5890, 100) == 1 and doPlayerRemoveItem(cid, 5902, 50) == 1 and doPlayerRemoveItem(cid, 2480, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 3 then
talk_state = 0
if haveItem(cid, 5947, 1, 0, 0) == 1 and haveItem(cid, 5876, 100, 0, 1) == 1 and haveItem(cid, 5948, 100, 0, 1) == 1 and haveItem(cid, 5891, 5, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 and haveItem(cid, 5889, 1, 0, 1) == 1 and haveItem(cid, 5888, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 2, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5947, 1) == 1 and doPlayerRemoveItem(cid, 5876, 100) == 1 and doPlayerRemoveItem(cid, 5948, 100) == 1 and doPlayerRemoveItem(cid, 5891, 5) == 1 and doPlayerRemoveItem(cid, 5887, 1) == 1 and doPlayerRemoveItem(cid, 5889, 1) == 1 and doPlayerRemoveItem(cid, 5888, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 4 then
talk_state = 0
if haveItem(cid, 5875, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 2, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5875, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 5 then
talk_state = 0
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 3, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 2183, 1) == 1 and doPlayerRemoveItem(cid, 2187, 1) == 1 and doPlayerRemoveItem(cid, 5904, 10) == 1 and doPlayerRemoveItem(cid, 2193, 20) == 1 and doPlayerRemoveItem(cid, 5809, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 6 then
talk_state = 0
if haveItem(cid, 5903, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 3, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5903, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 7 then
talk_state = 0
if haveItem(cid, 5880, 100, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 4, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5880, 100) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 8 then
talk_state = 0
if haveItem(cid, 5893, 100, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 4, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5893, 100) == 1 and doPlayerRemoveItem(cid, 5885, 1) == 1 and doPlayerRemoveItem(cid, 5887, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 9 then
talk_state = 0
if getPlayerMoney(cid, 150000) == 1 then
xx = doPlayerAddAddon(cid, 5, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveMoney(cid, 150000) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have enought money.')
end

elseif msgcontains(msg, 'yes') and talk_state == 10 then
talk_state = 0
if getPlayerMoney(cid, 150000) == 1 then
xx = doPlayerAddAddon(cid, 5, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveMoney(cid, 150000) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have enought money.')
end

elseif msgcontains(msg, 'yes') and talk_state == 11 then
talk_state = 0
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 6, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 2183, 1) == 1 and doPlayerRemoveItem(cid, 2187, 1) == 1 and doPlayerRemoveItem(cid, 5904, 10) == 1 and doPlayerRemoveItem(cid, 2193, 20) == 1 and doPlayerRemoveItem(cid, 5809, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 12 then
talk_state = 0
if haveItem(cid, 5903, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 6, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5903, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 13 then
talk_state = 0
if haveItem(cid, 5925, 100, 0, 1) == 1 and haveItem(cid, 5899, 100, 0, 1) == 1 and haveItem(cid, 5884, 1, 0, 0) == 1 and haveItem(cid, 5919, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 7, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5925, 100) == 1 and doPlayerRemoveItem(cid, 5899, 100) == 1 and doPlayerRemoveItem(cid, 5884, 1) == 1 and doPlayerRemoveItem(cid, 5919, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 14 then
talk_state = 0
if haveItem(cid, 5880, 100, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 7, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5880, 100) == 1 and doPlayerRemoveItem(cid, 5887, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 31 then
talk_state = 0
if haveItem(cid, 6096, 1, 0, 0) == 1 and haveItem(cid, 6095, 1, 0, 0) == 1 and haveItem(cid, 5918, 1, 0, 0) == 1 and haveItem(cid, 5462, 1, 0, 0) == 1 then
if doPlayerAddExtraOutfit(cid, 1) == 1 then
if doPlayerRemoveItem(cid, 6096, 1) == 1 and doPlayerRemoveItem(cid, 6095, 1) == 1 and doPlayerRemoveItem(cid, 5918, 1) == 1 and doPlayerRemoveItem(cid, 5462, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this outfit.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 32 then
talk_state = 0
if haveItem(cid, 2420, 1, 0, 0) == 1 and haveItem(cid, 5898, 30, 0, 1) == 1 and haveItem(cid, 5948, 10, 0, 1) == 1 and haveItem(cid, 5881, 30, 0, 1) == 1 and haveItem(cid, 5895, 20, 0, 1) == 1 and haveItem(cid, 5905, 20, 0, 1) == 1 and haveItem(cid, 5906, 10, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 then
if doPlayerAddExtraOutfit(cid, 2) == 1 then
if doPlayerRemoveItem(cid, 2420, 1) == 1 and doPlayerRemoveItem(cid, 5898, 30) == 1 and doPlayerRemoveItem(cid, 5948, 10) == 1 and doPlayerRemoveItem(cid, 5881, 30) == 1 and doPlayerRemoveItem(cid, 5895, 20) == 1 and doPlayerRemoveItem(cid, 5905, 20) == 1 and doPlayerRemoveItem(cid, 5906, 10) == 1 and doPlayerRemoveItem(cid, 5885, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this outfit.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 33 then
talk_state = 0
if haveItem(cid, 5878, 50, 0, 1) == 1 and haveItem(cid, 5921, 30, 0, 1) == 1 and haveItem(cid, 5913, 20, 0, 1) == 1 and haveItem(cid, 5894, 10, 0, 1) == 1 then
if doPlayerAddExtraOutfit(cid, 3) == 1 then
if doPlayerRemoveItem(cid, 2878, 50) == 1 and doPlayerRemoveItem(cid, 5921, 30) == 1 and doPlayerRemoveItem(cid, 5913, 20) == 1 and doPlayerRemoveItem(cid, 5894, 10) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this outfit.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 89 then
talk_state = 0
if getPlayerMoney(cid, preco_addon) == 1 then
xx = doPlayerAddAddon(cid, outfit_id, addon_id)
if xx == addon_id or xx == 3 then
if doPlayerRemoveMoney(cid, preco_addon) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have enought money.')
end

elseif msgcontains(msg, 'yes') and talk_state == 34 then
talk_state = 0
if doPlayerAddExtraOutfit(cid, 4) == 1 then
selfSay('Here you are.')
else
selfSay('Sorry, you already have this outfit.')
end
end
end
end


function onCreatureChangeOutfit(creature)
end


function onThink()
if focus > 0 then
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
--npc by Soulblaster and Zorzin--

if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(1)
end
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(3)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(0)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(2)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(0)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(3)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(1)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(2)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(0)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(3)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(1)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(2)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(0)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(3)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(1)
end
end

if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end

if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
 
Back
Top