• 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+ Hairycles cookie missing

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
922
Location
Chile
hello guys,i have tfs 1.3 and im trying to fix hairycles cos it isn't giving the cookie in the what a foolish quest, so this is the original:

Free Text Host - The Anonymous Text Hosting Service - No Registration Required


and this is my edit:
i made the edit based on the other npcs like Wyda and Avar Tar, but its not working :S any idea why isnt working? also it surprises me that doesnt work since this npc is from tibiarl and as far as i know, all work fine :O

Free Text Host - The Anonymous Text Hosting Service - No Registration Required
 
You had all these errors.
If you are using text you should always open and close with a Quotation mark and not an apostrophe as these are used in text more often.
As you the code kept opening and close too early.
Code is below, I haven't tested the NPC but it now runs fine through lua checker.
Code:
expected '}' (to close '{' on line 49) near 's'
expected ')' near 't'    82:31
expected '}' (to close '{' on line 98) near 'cap'    99:117
expected ')' near 'cap'    105:48
expected '}' (to close '{' on line 125) near 't'    130:70
expected ')' near 's'    242:69
expected ')' near 's'    247:30
expected '}' (to close '{' on line 270) near 's'    271:58
expected '}' (to close '{' on line 270) near 's'    273:91
expected ')' near 's'    297:22
expected ')' near 's'    307:22
expected ')' near 'cap'    369:65
expected ')' near 'cap'    373:52
expected ')' near 'cap'    377:50
expected ')' near 'd'    447:43
expected 'end' (to close 'function' on line 28) near <eof>    490:1

Code here.
[Lua] Hairycles cookie missing - Pastebin.com
 
Last edited:
You had all these errors.
If you are using text you should always open and close with a Quotation mark and not an apostrophe as these are used in text more often.
As you the code kept opening and close too early.
Code is below, I haven't tested the NPC but it now runs fine through lua checker.
Code:
expected '}' (to close '{' on line 49) near 's'
expected ')' near 't'    82:31
expected '}' (to close '{' on line 98) near 'cap'    99:117
expected ')' near 'cap'    105:48
expected '}' (to close '{' on line 125) near 't'    130:70
expected ')' near 's'    242:69
expected ')' near 's'    247:30
expected '}' (to close '{' on line 270) near 's'    271:58
expected '}' (to close '{' on line 270) near 's'    273:91
expected ')' near 's'    297:22
expected ')' near 's'    307:22
expected ')' near 'cap'    369:65
expected ')' near 'cap'    373:52
expected ')' near 'cap'    377:50
expected ')' near 'd'    447:43
expected 'end' (to close 'function' on line 28) near <eof>    490:1

Code here.
[Lua] Hairycles cookie missing - Pastebin.com
Hello! sorry the delay, i tested the Hairycles you sent me and transform all the dialog lines to "" instead of '', but still when you say cookie to the npc nothing happens :S
 
Well i don't know how your quest works. but cookie is under an elseif statement for
if it = 18 then it resets back to 0. and then checks if msg contains cookie.
Have you done the rest of the quest to get .top = 18?

or if cookie supposed to be on its own? as in. doesn't matter on the .topic number.

Cookie is inside topic 18 elseif
LUA:
elseif npcHandler.topic[cid] == 18 then
    if msgcontains(msg, 'yes') then
        npcHandler:say('Friend of the ape people! Take my gift and become me apprentice! Here is shaman clothing for you!', cid)
        player:addOutfit(154)
        player:addOutfit(158)
        player:setStorageValue(Storage.TheApeCity.ShamanOutfit, 1)
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    elseif msgcontains(msg, 'no') then
        npcHandler:say('Come back if change mind.', cid)
    end
    npcHandler.topic[cid] = 0

    if msgcontains(msg, 'cookie') then
        if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) == 31
                and player:getStorageValue(Storage.WhatAFoolishQuest.CookieDelivery.Hairycles) ~= 1 then
            npcHandler:say('You brought me a cookie?', cid)
            npcHandler.topic[cid] = 1
        end
    elseif msgcontains(msg, 'yes') then
        if npcHandler.topic[cid] == 1 then
            if not player:removeItem(8111, 1) then
                npcHandler:say("You have no cookie that I'd like.", cid)
                npcHandler.topic[cid] = 0
                return true
            end

            player:setStorageValue(Storage.WhatAFoolishQuest.CookieDelivery.Hairycles, 1)
            if player:getCookiesDelivered() == 10 then
                player:addAchievement('Allow Cookies?')
            end

            Npc():getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
            npcHandler:say('Thank you, you are ... YOU SON OF LIZARD!', cid)
            addEvent(releasePlayer, 1000, cid)
        elseif msgcontains(msg, 'no') then
            npcHandler:say('I see.', cid)
        end
        npcHandler.topic[cid] = 0
    end
    return true
end
 
Back
Top