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

NPC Ultimate Furniture shopkeeper

Ziggy

Member
Joined
Aug 11, 2007
Messages
49
Reaction score
6
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Queing" script="furniture.lua" walkinterval="2000" floorchange="0">
	<health now="150" max="150"/>
	<look type="133" head="35" body="50" legs="35" feet="80" addons="1" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell chairs, tables, plants, containers, pillows, tapestries and more. Everything for 500 gold pieces, just {trade}."/>
		<parameter key="shop_buyable" value="
			blue bed,7904,80;
			green bed,7905,80;
			red bed,7906,80;
			yellow bed,7907,80;

			Wooden chair,3901,15;
			Sofa chair,3902,30;
			Red cushioned chair,3903,40;
			Green cushioned chair,3904,40;
			Tusk chair,3905,25;
			Ivory chair,3906,25;
			Rocking chair,3925,25;
			trunk chair,3907,20;

			armor rack,6115,90;
			Barrel,3932,12;
			Box,1738,10;
			Box2,1741,10;
			Chest,1740,10;
			crate,1739,10;
			Drawer,1714,18;
			Dresser,3916,25;
			Locker,3918,30;
			trough,3937,7;
			trunk,3938,10;
			weapon rack,6114,90;
			Bird cage,2095,50;
			Water-pipe,2093,40;
			Coal basin,3912,25;
			chimney,8692,200;
			cuckoo clock,1877,40;
			Globe,3923,50;
			goldfish bowl,5929,50;
			oven,6372,80;
			Pendelum clock,3917,75;
			picture(portrait),1852,50;
			picture(landscape),1853,50;
			picture(still life),1854,50;
			rocking horse,3934,30;
			table lamp,3924,35;
			telescope,3935,70;
			Oval Mirror,1845,40;
			Edged mirror,1848,40;
			Round mirror,1851,40;

			Harp,3921,50;
			Piano,3926,200;

			Indoor plant,3931,8;
			Potted flower,2104,5;
			honey flower,2103,5;
			god flowers,2100,5;
			flower bowl,2102,6;

			small purple pillow,1678,20;
			small green pillow,1679,20;
			small red pillow,1680,20;
			small blue pillow,1681,20;
			small orange pillow,1682,20;
			small turquiose pillow,1683,20;
			small white pillow,1684,20;
			heart pillow,1685,30;
			blue pillow,1686,25;
			red pillow,1687,25;
			green pillow,1688,25;
			yellow pillow,1689,25;
			round blue pillow,1690,25;
			round red pillow,1691,25;
			round purple pillow,1692,25;
			round turquiose pillow,1693,25;

			Big table,3909,30;
			Square table,3910,25;
			Round table,3911,25;
			Small table,3908,20;
			Stone table,3913,30;
			Tusk table,3914,25;
			trunk table,3920,20;
			trophy stand,7936,50;

			blue tapestry,1872,25;
			green tapestry,1860,25;
			orange tapestry,1866,25;
			purple tapestry,1857,25;
			red tapestry,1869,25;
			white tapestry,1880,25;
			yellow tapestry,1863,25;
			
			amphora,2023,4,0;
			large amphora,3929,50;
			vase,2008,3,0;
			
			goblin statue,3930,50;
			knight statue,3927,50;
			minotaur statue,3928,50
		" />
	</parameters>
</npc>

He sells everything for the same price as in real tibia, there may be a few items that he does not sell but for the most part he sells everything buyable in tibia furniture shops for the right price, not 500 like the npc that comes with TFS
 
NPC: Ikea.xml
XML:
<npc name="Ikeria" script="ikea.lua" walkinterval="2000" floorchange="0">
    <health now="150" max="150"/>
    <look type="471" head="79" body="79" legs="88" feet="114" addons="0" mount="401"/>
    <parameters>
        <parameter key="message_greet" value="Welcome to my store, |PLAYERNAME|." />
    </parameters>
</npc>

npc/scripts: Ikea.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 shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

--Buyable Items:    Name, ID, Price
shopModule:addBuyableItem({'Blue bed'}, 7904, 80)
shopModule:addBuyableItem({'Green bed'}, 7905, 80)
shopModule:addBuyableItem({'Red bed'}, 7906, 80)
shopModule:addBuyableItem({'Yellow bed'}, 7907, 80)

shopModule:addBuyableItem({'Wooden chair'}, 3901, 15)
shopModule:addBuyableItem({'Sofa chair'}, 3902, 30)
shopModule:addBuyableItem({'Red cushioned chair'}, 3903, 40)
shopModule:addBuyableItem({'Green cushioned chair'}, 3904, 40)
shopModule:addBuyableItem({'Tusk chair'}, 3905, 25)
shopModule:addBuyableItem({'Ivory chair'}, 3906, 25)
shopModule:addBuyableItem({'Rocking chair'}, 3925, 25)
shopModule:addBuyableItem({'Trunk chair'}, 3907, 20)

shopModule:addBuyableItem({'Big table'}, 3909, 30)
shopModule:addBuyableItem({'Square table'}, 3910, 25)
shopModule:addBuyableItem({'Round table'}, 3911, 25)
shopModule:addBuyableItem({'Small table'}, 3908, 20)
shopModule:addBuyableItem({'Stone table'}, 3913, 30)
shopModule:addBuyableItem({'Tusk table'}, 3914, 25)
shopModule:addBuyableItem({'Trunk table'}, 3920, 20)
shopModule:addBuyableItem({'Trophy stand'}, 7936, 50)

shopModule:addBuyableItem({'Indoor plant'}, 3931, 8)
shopModule:addBuyableItem({'Potted flower'}, 2104, 5)
shopModule:addBuyableItem({'Honey flower'}, 2103, 5)
shopModule:addBuyableItem({'God flowers'}, 2100, 5)
shopModule:addBuyableItem({'Flower bowl'}, 2102, 6)

shopModule:addBuyableItem({'Harp'}, 3921, 50)
shopModule:addBuyableItem({'Piano'}, 3926, 200)

shopModule:addBuyableItem({'Armor rack'}, 6115, 90)
shopModule:addBuyableItem({'Barrel'}, 3932, 12)
shopModule:addBuyableItem({'Box'}, 1738, 10)
shopModule:addBuyableItem({'Box II'}, 1741, 10)
shopModule:addBuyableItem({'Chest'}, 1740, 10)
shopModule:addBuyableItem({'Crate'}, 1739, 10)
shopModule:addBuyableItem({'Drawer'}, 1714, 18)
shopModule:addBuyableItem({'Dresser'}, 3916, 25)
shopModule:addBuyableItem({'Locker'}, 3918, 30)
shopModule:addBuyableItem({'Trough'}, 3937, 7)
shopModule:addBuyableItem({'Trunk'}, 3938, 10)
shopModule:addBuyableItem({'Weapon rack'}, 6114, 90)
shopModule:addBuyableItem({'Bird cage'}, 2095, 50)
shopModule:addBuyableItem({'Water-pipe'}, 2093, 40)
shopModule:addBuyableItem({'Coal basin'}, 3912, 25)
shopModule:addBuyableItem({'Chimney'}, 8692, 200)
shopModule:addBuyableItem({'Cuckoo clock'}, 1877, 40)
shopModule:addBuyableItem({'Globe'}, 3923, 50)
shopModule:addBuyableItem({'Goldfish bowl'}, 5929, 50)
shopModule:addBuyableItem({'Oven'}, 6372, 80)
shopModule:addBuyableItem({'Pendelum clock'}, 3917, 75)
shopModule:addBuyableItem({'Picture(portrait)'}, 1852, 50)
shopModule:addBuyableItem({'Picture(landscape)'}, 1853, 50)
shopModule:addBuyableItem({'Picture(still life)'}, 1854, 50)
shopModule:addBuyableItem({'Rocking horse'}, 3934, 30)
shopModule:addBuyableItem({'Table lamp'}, 3924, 35)
shopModule:addBuyableItem({'Telescope'}, 3935, 70)
shopModule:addBuyableItem({'Oval Mirror'}, 1845, 40)
shopModule:addBuyableItem({'Edged mirror'}, 1848, 40)
shopModule:addBuyableItem({'Round mirror'}, 1851, 40)

shopModule:addBuyableItem({'Small purple pillow'}, 1678, 20)
shopModule:addBuyableItem({'Small green pillow'}, 1679, 20)
shopModule:addBuyableItem({'Small red pillow'}, 1680, 20)
shopModule:addBuyableItem({'Small blue pillow'}, 1681, 20)
shopModule:addBuyableItem({'Small orange pillow'}, 1682, 20)
shopModule:addBuyableItem({'Small turquiose pillow'}, 1683, 20)
shopModule:addBuyableItem({'Small white pillow'}, 1684, 20)
shopModule:addBuyableItem({'Heart pillow'}, 1685, 30)
shopModule:addBuyableItem({'Blue pillow'}, 1686, 25)
shopModule:addBuyableItem({'Red pillow'}, 1687, 25)
shopModule:addBuyableItem({'Green pillow'}, 1688, 25)
shopModule:addBuyableItem({'Yellow pillow'}, 1689, 25)
shopModule:addBuyableItem({'Round blue pillow'}, 1690, 25)
shopModule:addBuyableItem({'Round red pillow'}, 1691, 25)
shopModule:addBuyableItem({'Round purple pillow'}, 1692, 25)
shopModule:addBuyableItem({'Round turquiose pillow'}, 1693, 25)

shopModule:addBuyableItem({'Blue tapestry'}, 1872, 25)
shopModule:addBuyableItem({'Green tapestry'}, 1860, 25)
shopModule:addBuyableItem({'Orange tapestry'}, 1866, 25)
shopModule:addBuyableItem({'Purple tapestry'}, 1857, 25)
shopModule:addBuyableItem({'Red tapestry'}, 1869, 25)
shopModule:addBuyableItem({'White tapestry'}, 1880, 25)
shopModule:addBuyableItem({'Yellow tapestry'}, 1863, 25)

shopModule:addBuyableItem({'Amphora'}, 2023, 40)
shopModule:addBuyableItem({'Large amphora'}, 3929, 50)
shopModule:addBuyableItem({'Vase'}, 2008, 30)

shopModule:addBuyableItem({'Goblin statue'}, 3930, 50)
shopModule:addBuyableItem({'Knight statue'}, 3927, 50)
shopModule:addBuyableItem({'Minotaur statue'}, 3928, 50)

    if not npcHandler:isFocused(cid) then
        return false
    end

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