• 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.5 armor/weapons npc

Idletibia

Banned User
Joined
Apr 17, 2023
Messages
74
Reaction score
31
Willard npc shop list from rl tibia datapack
for latest tfs 1.5

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 voices = { {text = "Come and take a look at my items!"} }
npcHandler:addModule(VoiceModule:new(voices))

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, text = 'I buy most of things and I sell: spellbook, magic lightwand, mana fluid , staff , crossbow, bow ,blank rune, spear , arrow , bolts and (tools).'})
keywordHandler:addKeyword({'tools'}, StdModule.say, {npcHandler = npcHandler, text = 'I got shovel, rope, scythe, fishing rod what do you want?'})
keywordHandler:addKeyword({'name'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Greetings, traveler. The name's Galen Ironhide."})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I specialize in weapons, armors and shields, equipping warriors like you with the finest protection for your daring adventures."})
keywordHandler:addKeyword({'king'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "The king, a beacon of strength and leadership. It's an honor to serve those who defend our realm in his name."})
keywordHandler:addKeyword({'tibianus'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "The king, a beacon of strength and leadership. It's an honor to serve those who defend our realm in his name."})
keywordHandler:addKeyword({'army'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I provide the bravest soldiers with armors and shields, ensuring their safety in the heat of battle. A well-protected warrior is a formidable force!"})
keywordHandler:addKeyword({'ferumbras'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Ferumbras, the embodiment of darkness and chaos. May we never cross paths with such a malevolent being."})
keywordHandler:addKeyword({'excalibug'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Excalibug, the legendary weapon said to possess incredible power. Alas, its existence remains a myth, yet a captivating one."})
keywordHandler:addKeyword({'thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Thais, the bustling capital, once a prime source of armors and shields. But now, my craftsmanship sustains our city's defense."})
keywordHandler:addKeyword({'timadria'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Timadria, a city that appreciates the art of war. Their demand for exceptional armors and shields fuels my passion for craftsmanship."})
keywordHandler:addKeyword({'tibia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Tibia, a vast realm filled with challenges and battles. My purpose is to provide warriors like you with the means to face those perils head-on."})
keywordHandler:addKeyword({'kordodzon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Kordodzon, a city renowned for its mastery in forging weapons and armors. Their expertise inspires me to refine my own craft."})
keywordHandler:addKeyword({'faelmath'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Faelmath, a place of tranquility and harmony. The protection it offers attracts those who seek refuge from the dangers beyond its borders."})
keywordHandler:addKeyword({'new'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Rumors circulate of mighty adversaries lurking in the uncharted realms of Faelmath. Ensure you're well-equipped before venturing into the unknown."})
keywordHandler:addKeyword({'rumo'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Rumors circulate of mighty adversaries lurking in the uncharted realms of Faelmath. Ensure you're well-equipped before venturing into the unknown."})
keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Step right up! Witness the array of superior armors and shields displayed on the blackboard before you."})



shopModule:addSellableItem({'two handed sword'}, 2377, 450)
shopModule:addSellableItem({'battle axe'}, 2386, 80)
shopModule:addSellableItem({'dagger'}, 2379, 2)
shopModule:addSellableItem({'hand axe'}, 2380, 4)
shopModule:addSellableItem({'halberd'}, 2381, 400)
shopModule:addSellableItem({'spike sword'}, 2383, 240)
shopModule:addSellableItem({'rapier'}, 2384, 5)
shopModule:addSellableItem({'sabre'}, 2385, 12)
shopModule:addSellableItem({'spear'}, 2389, 3)
shopModule:addSellableItem({'morning star'}, 2394, 90)
shopModule:addSellableItem({'short sword'}, 2406, 10)
shopModule:addSellableItem({'battle hammer'}, 2417, 120)
shopModule:addSellableItem({'clerical mace'}, 2423, 170)
shopModule:addSellableItem({'barbarian axe'}, 2429, 185)
shopModule:addSellableItem({'leather armor'}, 2467, 12)
shopModule:addSellableItem({'chain armor'}, 2464, 70)
shopModule:addSellableItem({'brass armor'}, 2465, 150)
shopModule:addSellableItem({'plate armor'}, 2463, 400)
shopModule:addSellableItem({'chain legs'}, 2648, 25)
shopModule:addSellableItem({'leather helmet'}, 2461, 4)
shopModule:addSellableItem({'iron helmet'}, 2459, 150)
shopModule:addSellableItem({'chain helmet'}, 2458, 17)
shopModule:addSellableItem({'steel helmet'}, 2456, 190)
shopModule:addSellableItem({'wooden shield'}, 2512, 5)
shopModule:addSellableItem({'battle shield'}, 2513, 95)
shopModule:addSellableItem({'steel shield'}, 2511, 80)
shopModule:addSellableItem({'viking shield'}, 2531, 85)
shopModule:addSellableItem({'sword'}, 2376, 25)
shopModule:addSellableItem({'mace'}, 2398, 30)
shopModule:addSellableItem({'axe'}, 2386, 7)
shopModule:addSellableItem({'club'}, 2382, 1)

shopModule:addBuyableItem({'dagger'}, 2379, 5)
shopModule:addBuyableItem({'hand axe'}, 2380, 8)
shopModule:addBuyableItem({'spear'}, 2389, 10)
shopModule:addBuyableItem({'rapier'}, 2384, 15)
shopModule:addBuyableItem({'barbarian axe'}, 2429, 590)
shopModule:addBuyableItem({'sabre'}, 2385, 35)
shopModule:addBuyableItem({'clerical mace'}, 2423, 540)
shopModule:addBuyableItem({'mace'}, 2398, 90)
shopModule:addBuyableItem({'battle hammer'}, 2417, 350)
shopModule:addBuyableItem({'crossbow'}, 2455, 500)
shopModule:addBuyableItem({'bow'}, 2456, 400)
shopModule:addBuyableItem({'arrow'}, 2544, 2)
shopModule:addBuyableItem({'bolt'}, 2543, 3)
shopModule:addBuyableItem({'throwing star'}, 2399, 50)
shopModule:addBuyableItem({'chain armor'}, 2464, 200)
shopModule:addBuyableItem({'brass armor'}, 2465, 450)
shopModule:addBuyableItem({'leather armor'}, 2467, 35)
shopModule:addBuyableItem({'chain helmet'}, 2458, 52)
shopModule:addBuyableItem({'leather helmet'}, 2461, 12)
shopModule:addBuyableItem({'steel shield'}, 2511, 240)
shopModule:addBuyableItem({'wooden shield'}, 2512, 15)
shopModule:addBuyableItem({'viking shield'}, 2531, 260)
shopModule:addBuyableItem({'chain legs'}, 2648, 80)
shopModule:addBuyableItem({'sword'}, 2376, 85)
shopModule:addBuyableItem({'axe'}, 2386, 20)


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

        if msgcontains(msg, 'text') then
            npcHandler:say("text text?", cid)
            npcHandler.topic[cid] = 1
            

        elseif msgcontains(msg, 'ltext') then
            -- add code for longsword here
            npcHandler.topic[cid] = 2

        elseif msgcontains(msg, 'eetext') then
            -- add code for exp scroll here
            npcHandler.topic[cid] = 3

        --elseif npcHandler.topic[cid] == 1 and msgcontains(msg, 'yes') then
        --    if doPlayerRemoveMoney(cid, 100) then
        --        doPlayerAddItem(cid, 2554, 1)
        --        npcHandler:say("Here's your shovel.", cid)
        --    else
        --        npcHandler:say("You don't have enough gold coins.", cid)
        --    end

        end

return true
end

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