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

TFS 1.X+ NPC Addon Problem !!

nuelma123

New Member
Joined
Jun 6, 2011
Messages
66
Reaction score
1
I don't understand where I fail...
I added the outfit "insectoid"
but the npc doesn't answer me...

I already copy script and edit NodeXX:
Lua:
 -- elementalist
    node49 = keywordHandler:addKeyword({'first elementalist addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To achieve the first Elementalist addon you need to give me 1 Elemental Spikes. Do you have them with you?'})
    node49:addChildKeyword({'yes'}, elementalistFirst, {})
    node49:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

    node50 = keywordHandler:addKeyword({'second elementalist addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To achieve the second Elementalist addon you need to give me 1 Mages Cap. Do you have them with you?'})
    node50:addChildKeyword({'yes'}, elementalistSecond, {})
    node50:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})
-- elementalist end
----insectoid star----
 node51 = keywordHandler:addKeyword({'first Insectoid addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To achieve the first Insectoid addon you need to give me 300 Kollos Shell. Do you have them with you?'})
    node51:addChildKeyword({'yes'}, InsectoidFirst, {})
    node51:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

 node52 = keywordHandler:addKeyword({'second Insectoid addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To achieve the second Insectoid addon you need to give me 500 spidris mandible, 100 compound eye and a Carapace Shield. Do you have them with you?'})
    node52:addChildKeyword({'yes'}, InsectoidSecond, {})
    node52:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

----insectoid end ----

Elementallist NPC ( ANSWER )
But with insectoid no!!!!!

What happen?

Do I need to edit anything else?.........

Also edit this as well as the other outfits

Code:
-- insectoid star --
function InsectoidFirst(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end

    if isPremium(cid) then
    addon = getPlayerStorageValue(cid,Insectoid)
    if addon == -1 then
        if getPlayerItemCount(cid,15480) >= 300 then
        if doPlayerRemoveItem(cid,15480,300) then
            selfSay(newaddon, cid)
              
            doSendMagicEffect(getCreaturePosition(cid), 13)
            doPlayerAddOutfit(cid, 465, 1)
            doPlayerAddOutfit(cid, 466, 1)
            setPlayerStorageValue(cid,Insectoid,1)
        end
        else
            selfSay(noitems, cid)
        end
    else
        selfSay(already, cid)
    end
    end

end

function InsectoidSecond(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end

    if isPremium(cid) then
    addon = getPlayerStorageValue(cid,Insectoid+1)
    if addon == -1 then
        if getPlayerItemCount(cid,15485) >= 500 and getPlayerItemCount(cid,15486) >= 100 and getPlayerItemCount(cid,15491) >= 1 then
        if doPlayerRemoveItem(cid,15485,500) and doPlayerRemoveItem(cid,15486,100) and doPlayerRemoveItem(cid,15491,1) then
            selfSay(newaddon, cid)
              
            doSendMagicEffect(getCreaturePosition(cid), 13)
            doPlayerAddOutfit(cid, 465, 2)
            doPlayerAddOutfit(cid, 466, 2)
            setPlayerStorageValue(cid,Insectoid+1,1)
        end
        else
            selfSay(noitems, cid)
        end
    else
        selfSay(already, cid)
    end
    end

end
-- insectoid end --
-- HUNTER START --
function HunterFirst(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end

    if isPremium(cid) then
    addon = getPlayerStorageValue(cid,hunter)
    if addon == -1 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 doPlayerRemoveItem(cid,5947,1) and doPlayerRemoveItem(cid,5876,100) and doPlayerRemoveItem(cid,5948,100) and doPlayerRemoveItem(cid,5891,5) and doPlayerRemoveItem(cid,5887,1) and doPlayerRemoveItem(cid,5888,1) and doPlayerRemoveItem(cid,5889,1) then
            selfSay(newaddon, cid)
              
            doSendMagicEffect(getCreaturePosition(cid), 13)
            doPlayerAddOutfit(cid, 129, 1)
doPlayerAddOutfit(cid, 137, 1)           
            setPlayerStorageValue(cid,hunter,1)
        end
        else
            selfSay(noitems, cid)
        end
    else
        selfSay(already, cid)
    end
    end

end

function HunterSecond(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end

    if isPremium(cid) then
    addon = getPlayerStorageValue(cid,hunter+1)
    if addon == -1 then
        if getPlayerItemCount(cid,5875) >= 1 then
        if doPlayerRemoveItem(cid,5875,1) then
            selfSay(newaddon, cid)
              
            doSendMagicEffect(getCreaturePosition(cid), 13)
            doPlayerAddOutfit(cid, 129, 2)
            doPlayerAddOutfit(cid, 137, 2)
            setPlayerStorageValue(cid,hunter+1,1)
        end
        else
            selfSay(noitems, cid)
        end
    else
        selfSay(already, cid)
    end
    end

end
-- HUNTER END --
 
@nuelma123

Try changing to lowercase the keywords for Insectoid outfit:
'first Insectoid addon'
to
'first insectoid addon'

and
'second Insectoid addon'
to
'second insectoid addon'
 
Solution
Back
Top