• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Lua TFS 1.5 - 12.X ORTS2 NPC Support. + TFS 1.5 Development progress regarding 12.x request

Bandytojas

Member
Joined
Jul 26, 2022
Messages
25
Reaction score
6
Hi guys I would like to request for some support regarding NPC's within ORTS2 and to request for some information regarding already know ORTS2 issues and about TFS 1.5 Development progress and if there are any updates coming up.

So I have issue with Djinn's quest - Ubaid does not reply to Djanni'hah

Error that I am getting:

Screen-Shot-2022-08-17-at-12-46-27-AM.png


Ubaid.Lua:
Lua:
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 greetCallback(cid, message)
    local player = Player(cid)
    if not msgcontains(message, 'djanni\'hah') and player:getStorageValue(PlayerStorageKeys.DjinnWar.Faction.Efreet) ~= 1 then
        npcHandler:say('Shove off, little one! Humans are not welcome here, |PLAYERNAME|!', cid)
        return false
    end

    if player:getStorageValue(PlayerStorageKeys.DjinnWar.Faction.Greeting) == -1 then
        npcHandler:say({
            'Hahahaha! ...',
            '|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!'
        }, cid)
        return false
    end

    if player:getStorageValue(PlayerStorageKeys.DjinnWar.Faction.Efreet) ~= 1 then
        npcHandler:setMessage(MESSAGE_GREET, 'What? You know the word, |PLAYERNAME|? All right then - I won\'t kill you. At least, not now. What brings you {here}?')
    else
        npcHandler:setMessage(MESSAGE_GREET, 'Still alive, |PLAYERNAME|? What brings you {here}?')
    end
    return true
end

local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end

    local player = Player(cid)
    if msgcontains(msg, 'passage') then
        if player:getStorageValue(PlayerStorageKeys.DjinnWar.Faction.Efreet) ~= 1 then
            npcHandler:say({
                'Only the mighty Efreet, the true djinn of Tibia, may enter Mal\'ouquah! ...',
                'All Marid and little worms like yourself should leave now or something bad may happen. Am I right?'
            }, cid)
            npcHandler.topic[cid] = 1
        else
            npcHandler:say('You already pledged loyalty to king Malor!', cid)
        end

    elseif msgcontains(msg, 'here') then
            npcHandler:say({
                'Only the mighty Efreet, the true djinn of Tibia, may enter Mal\'ouquah! ...',
                'All Marid and little worms like yourself should leave now or something bad may happen. Am I right?'
            }, cid)
            npcHandler.topic[cid] = 1

    elseif npcHandler.topic[cid] == 1 then
        if msgcontains(msg, 'yes') then
            npcHandler:say('Of course. Then don\'t waste my time and shove off.', cid)
            npcHandler.topic[cid] = 0

        elseif msgcontains(msg, 'no') then
            if player:getStorageValue(PlayerStorageKeys.DjinnWar.Faction.Marid) == 1 then
                npcHandler:say('Who do you think you are? A Marid? Shove off you worm!', cid)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say({
                    'Of cour... Huh!? No!? I can\'t believe it! ...',
                    'You... you got some nerves... Hmm. ...',
                    'Maybe we have some use for someone like you. Would you be interested in working for us. Helping to fight the Marid?'
                }, cid)
                npcHandler.topic[cid] = 2
            end
        end

    elseif npcHandler.topic[cid] == 2 then
        if msgcontains(msg, 'yes') then
            npcHandler:say('So you pledge loyalty to king Malor and you are willing to never ever set foot on Marid\'s territory, unless you want to kill them? Yes?', cid)
            npcHandler.topic[cid] = 3

        elseif msgcontains(msg, 'no') then
            npcHandler:say('Of course. Then don\'t waste my time and shove off.', cid)
            npcHandler.topic[cid] = 0
        end

    elseif npcHandler.topic[cid] == 3 then
        if msgcontains(msg, 'yes') then
            npcHandler:say({
                'Well then - welcome to Mal\'ouquah. ...',
                'Go now to general Baa\'leal and don\'t forget to greet him correctly! ...',
                'And don\'t touch anything!'
            }, cid)
            player:setStorageValue(PlayerStorageKeys.DjinnWar.Faction.Efreet, 1)
            player:setStorageValue(PlayerStorageKeys.DjinnWar.Faction.Greeting, 0)

        elseif msgcontains(msg, 'no') then
            npcHandler:say('Of course. Then don\'t waste my time and shove off.', cid)
        end
        npcHandler.topic[cid] = 0
    end
    return true
end

npcHandler:setMessage(MESSAGE_FAREWELL, 'Farewell human!')
npcHandler:setMessage(MESSAGE_WALKAWAY, 'Farewell human!')

npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

local focusModule = FocusModule:new()
focusModule:addGreetMessage('hi')
focusModule:addGreetMessage('hello')
focusModule:addGreetMessage('djanni\'hah')
npcHandler:addModule(focusModule)




Questlog: Some of the missions appears in quest log but some does't did someone noticed this issue any existing quick fix ?



TFS 1.5 Development and Tibia 12 client feature implementation.

So mainly people are looking for these features within Tibia 12.X is there any nearby plans to implement these and if there is possibility to speed this up. I was thinking if there is any possibility to sponsor developer and how much that would cost? Maybe we could chip in if someone else needs that? :)

Bestiaries:

Pray tasks:

Autoloot
:

Charm points:

Daily rewards:

Point store:
 
Top