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

Windows GNOMELVIS TFS 1.1

Simonalina

Member
Joined
May 10, 2008
Messages
180
Solutions
1
Reaction score
16
Location
Sweden
Gnomelvis tfs 1.1,

Questlog, Thats empty for some reason..

When i say:
Owner [1]: Hi
Gnomelvis: Hello. Is it me you're looking for??
Owner [1]: looking

He don't Reply, I did the full quest until this guy. (even with Another character, and Online characters help)

Nothing hapend, Some bugg.. If someone can help me out with

FULL Script. Or if someone KNOW the bug, please give me that, or tell me whats wrong.



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

local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end
    local player = Player(cid)
    if msgcontains(msg, "looking") then
        if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 11 then
            npcHandler:say("I'm the gnomish musical supervisor!", cid)
            npcHandler.topic[cid] = 1
        elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 13 then
            npcHandler:say("I'm the gnomish musical supervisor!", cid)
            npcHandler.topic[cid] = 2
        end
    elseif msgcontains(msg, "musical") then
        if npcHandler.topic[cid] == 1 then
            npcHandler:say({
                "Ah well. Everyone has a very personal melody in his soul. Only if you know your soul melody then you know yourself. And only if you know yourself will you be admitted to the Bigfoot company. ...",
                "So what you have to do is to find your soul melody. Do you see the huge crystals in this room? Those are harmonic crystals. Use them to deduce your soul melody. Simply use them to create a sound sequence. ...",
                "Every soul melody consists of seven sound sequences. You will have to figure out your correct soul melody by trial and error. If you hit a wrong note, you will have to start over."
            }, cid)
            player:setStorageValue(Storage.BigfootBurden.QuestLine, 12)
            player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1)
            for i = 0, 6 do
                player:setStorageValue(Storage.BigfootBurden.MelodyTone1 + i, math.random(3124, 3127))
            end
        elseif npcHandler.topic[cid] == 2 then
            npcHandler:say({
                "Congratulations on finding your soul melody. And a pretty one as far as I can tell. Now you are a true recruit of the Bigfoot company! Commander Stone might have some tasks for you to do! ...",
                "Look for him in the central chamber. I marked your map where you will find him."
            }, cid)
            player:setStorageValue(Storage.BigfootBurden.QuestLine, 14)
            player:setStorageValue(Storage.BigfootBurden.Rank)
            player:addAchievement('Becoming a Bigfoot')
        end
        npcHandler.topic[cid] = 0
    end
    return true
end

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


Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Gnomelvis" script="Gnomelvis.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100" />
    <look type="493" head="67" body="76" legs="105" feet="95" addons="0" />
    <parameters>
        <parameter key="message_greet" value="Hello. Is it me you're {looking} for??" />
    </parameters>
</npc>


Code:
local cToneStorages = {
    Storage.BigfootBurden.MelodyTone1,
    Storage.BigfootBurden.MelodyTone2,
    Storage.BigfootBurden.MelodyTone3,
    Storage.BigfootBurden.MelodyTone4,
    Storage.BigfootBurden.MelodyTone5,
    Storage.BigfootBurden.MelodyTone6,
    Storage.BigfootBurden.MelodyTone7
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 11 then
        local value = player:getStorageValue(Storage.BigfootBurden.MelodyStatus)
        if player:getStorageValue(cToneStorages[value]) == item.uid then
            player:setStorageValue(Storage.BigfootBurden.MelodyStatus, value + 1)
            toPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE)
            if value + 1 == 8 then
                player:setStorageValue(Storage.BigfootBurden.QuestLine, 13)
                player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found your melody!")
            end
        else
            player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1)
            toPosition:sendMagicEffect(CONST_ME_SOUND_RED)
        end
    end
    return true
end
 
Back
Top