Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Problem z NPC od Addonow 8.1


TrybekGhost

Rekomendowane odpowiedzi

Opublikowano

Witam. Może ktoś rozwiąże mój problem. Działam na silniku Aries 0.4.5 wersja tibii 8.1 i mam 2 problemy. 1 to soft bootsy. Nie działają oraz po założeniu lub zdjęciu nie zmieniają id. Czyli jak mam nie świecące softy i założę je to dalej nie świecą i nie dodają many ani hp. 

Spoiler

<item id="2640" name="soft boots">
        <attribute key="weight" value="800"/>
        <attribute key="slotType" value="feet"/>
        <attribute key="decayTo" value="6530"/>
        <attribute key="transformDeEquipTo" value="6132"/>
        <attribute key="duration" value="14400"/>
        <attribute key="healthGain" value="1"/>
        <attribute key="healthTicks" value="2000"/>
        <attribute key="manaGain" value="2"/>
        <attribute key="manaTicks" value="1000"/>
        <attribute key="showduration" value="1"/>
    </item>
    <item id="6132" name="soft boots">
        <attribute key="weight" value="800"/>
        <attribute key="slotType" value="feet"/>
        <attribute key="transformEquipTo" value="2640"/>
        <attribute key="stopduration" value="1"/>
        <attribute key="showduration" value="1"/>
    </item>

 

Drugi problem to NPC od addonów. Czy ma ktoś skrypt, żeby npc dawał addony za addon itemy? Znalazłem taki skrypt, jednak NPC reaguje tylko na hi.

Spoiler

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
------------------------------ Npc de Addons/Outfits ------------------------------
---------------- Credits do addon.lua: Soulblaster[94%], Zorzin[6%] ---------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false


function onThingMove(creature, thing, oldpos, oldstackpos)
end


function onCreatureAppear(creature)
end


function onCreatureDisappear(cid, pos)
      if focus == cid then
                  selfSay('Good bye then.')
                  focus = 0
                  talk_start = 0
      end
end


function onCreatureTurn(creature)
end

function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
      msg = string.lower(msg)

      if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
         selfSay('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

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...