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

Lua NPC CEIRON'S.

ribeiiro02

New Member
Joined
May 21, 2014
Messages
44
Reaction score
1
I want ceiron's give the water skin and recipient for get griffinclaw, but doesnt work.. can help me?


Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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


-- Storage IDs --

fdruid        = 22041
sdruid        = 22042
psceiron      = 60162

newaddon    = 'Ah, right! The druid bear fur or druid wolf fur! Here you go.'
noitems        = 'You do not have all the required items.'
noitems2    = 'You do not have all the required items or you do not have the outfit, which by the way, is a requirement for this addon.'
already        = 'It seems you already have this addon, don\'t you try to mock me son!'

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

    if(not npcHandler:isFocused(cid)) then
        return false
    end   
    if getPlayerStorageValue(cid,waterceiron ) == -1 then      
            setPlayerStorageValue(cid,waterceiron , 1)
    player:addItem(5938, 1) >1 then
            npcHandler:say('Good work, Player! This water looks indeed extremely clear. I will examine it right away. If you are ready to help me again, just ask me for a task.', cid)
    else
        npcHandler:say('I already give you information about my water skin.')
   
       end
    end

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

    if(not npcHandler:isFocused(cid)) then
        return false
    end   
    if getPlayerStorageValue(cid,griceiron ) == -1 then      
            setPlayerStorageValue(cid,griceiron , 1)
    player:addItem(4869, 1)
            npcHandler:say('Crunor be praised! The Griffinclaw really exists! Now, I will make sure that it will not become extinct. If you are ready to help me again, just ask me for a task.', cid)
    else
        npcHandler:say('I already give you information about my plant.')
   
       end
    end

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

    if(not npcHandler:isFocused(cid)) then
        return false
    end   
    if getPlayerStorageValue(cid,psceiron ) == -1 then      
            setPlayerStorageValue(cid,psceiron , 1)
            npcHandler:say('Thank you so much. I can\'t wait to wear it around my neck again, it was a special present from Faolan.', cid)
    else
        npcHandler:say('I alrealy give you information about my wolf tooth chain.')
   
       end
    end


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

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

    if isPremium(cid) then
    addon = getPlayerStorageValue(cid,sdruid)
    if addon == -1 then
        if getPlayerItemCount(cid,5937) >= 1 and getPlayerItemCount(cid,5939) >= 1 and getPlayerItemCount(cid,5906) >= 100 and getPlayerItemCount(cid,5940) >= 1 then
        if doPlayerRemoveItem(cid,5937,1) and doPlayerRemoveItem(cid,5939,1) and doPlayerRemoveItem(cid,5906,100) and doPlayerRemoveItem(cid,5940,1) then
            npcHandler:say('Ah, right! The druid bear fur or druid wolf fur! Here you go.')
            
            doSendMagicEffect(getCreaturePosition(cid), 13)
            setPlayerStorageValue(cid,sdruid,1)
            if getPlayerSex(cid) == 1 then
            doPlayerAddOutfit(cid, 144, 2)
            elseif getPlayerSex(cid) == 0 then
            doPlayerAddOutfit(cid, 148, 2)
        end   
        end
        else
            selfSay(noitems)
        end
    else
        selfSay(already)
    end
    end

end



node1 = keywordHandler:addKeyword({'second druid addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get druid bear fur you need give me Griffinclaw flower sample, water from the hydra cave, 100 demon dusts and Ceirons wolf tooth chain. Do you have them with you?'})
node1:addChildKeyword({'yes'}, DruidSecond, {})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node2 = keywordHandler:addKeyword({'wolf tooth chain'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you really want found my wolf tooth chain?'})
node2:addChildKeyword({'yes'}, CeironWolfStorage, {})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you are ready.', reset = true})

node3 = keywordHandler:addKeyword({'Griffinclaw'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Were you able to obtain a sample of the Griffinclaw?'})
node3:addChildKeyword({'yes'}, GriffinclawStorage, {})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Crunor be praised! The Griffinclaw really exists! Now, I will make sure that it will not become extinct. If you are ready to help me again, just ask me for a task.', reset = true})

node4 = keywordHandler:addKeyword({'water skin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get druid bear fur you need give me Griffinclaw flower sample, water from the hydra cave, 100 demon dusts and Ceirons wolf tooth chain. Do you have them with you?'})
node4:addChildKeyword({'yes'}, WaterStorage, {})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})


npcHandler:addModule(FocusModule:new())
 
Back
Top