• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

NPC System [TFS 1.2]

flaviiojr

Active Member
Joined
Jan 20, 2017
Messages
230
Solutions
13
Reaction score
39
my doubt is this:
player when talking hi and the player already has the storage npc responds and loses the focus of the player, as if the player had given bye
how to proceed in this script?

TFS 1.3
Client 10.98

LUA:
    if msgcontains(msg, 'temple') then
        if player:getStorageValue(50730) > 0 then
            npcHandler:say({
                "The temple has been restored to its former glory, yet we strife to live and praise in the Shaper ways. Do you still need me to take some old tomes from you my child?"
            }, cid)
            npcHandler.topic[cid] = 1
        elseif player:getStorageValue(50730) < 0 then
            npcHandler:say({
                "You already offered enough tomes for us to study and rebuild this temple. Thank you, my child."
            }, cid)
        elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 1 then
            npcHandler:say({
                "Thank you very much for your contribution, child. Your first step in the ways of the {Shapers} has been taken."
            }, cid)
            --player:setStorageValue(14251,1)
        end
    end

I thank you all
 
LUA:
    if msgcontains(msg, 'temple') then
        if player:getStorageValue(50730) > 0 then
            npcHandler:say({
                "The temple has been restored to its former glory, yet we strife to live and praise in the Shaper ways. Do you still need me to take some old tomes from you my child?"
            }, cid)
            npcHandler.topic[cid] = 1
            if msgcontains(msg, 'yes') and npcHandler.topic[cid] == 1 then
                npcHandler:say({
                    "Thank you very much for your contribution, child. Your first step in the ways of the {Shapers} has been taken."
                }, cid)
                --player:setStorageValue(14251,1)
            end
        elseif player:getStorageValue(50730) < 0 then
            npcHandler:say({
                "You already offered enough tomes for us to study and rebuild this temple. Thank you, my child."
            }, cid)
        end
    end
 
Back
Top