• 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 sell furniture

Npc=
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="*" script="data/npc/scripts/*.lua" autowalk="1" floorchange="0">
	<health now="100" max="100"/>
	<look type="130" head="39" body="122" legs="125" feet="57" addons="0"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell modification kids and tapestryes. What do you want?"/>
		<parameter key="message_needmoremoney" value="You do not have enough money."/>
		<parameter key="message_decline" value="Is |TOTALCOST| gold coins too much for you? Get out of here!"/>
	</parameters>
</npc>
...and Script=
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 shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'green modification'},		7904, 500,		'furniture package')
shopModule:addBuyableItem({'yellow modification'},		7906, 500,		'furniture package')
shopModule:addBuyableItem({'red modification'},			7905, 500,		'furniture package')
shopModule:addBuyableItem({'pirate tapestry'},			7907, 500,		'pirate tapestry')
shopModule:addBuyableItem({'green tapestry'},			5616, 500,		'green tapestry')
shopModule:addBuyableItem({'red tapestry'},			1869, 500,		'red tapestry')
shopModule:addBuyableItem({'blue tapestry'},			1872, 500,		'blue tapestry')
shopModule:addBuyableItem({'orange tapestry'},			1866, 500,		'orange tapestry')
shopModule:addBuyableItem({'white tapestry'},			1880, 500,		'white tapestry')
shopModule:addBuyableItem({'yellow tapestry'},			1863, 500,		'yellow tapestry')
shopModule:addBuyableItem({'purple tapestry'},			1857, 500,		'purple tapestry')

npcHandler:addModule(FocusModule:new())
 
Last edited:
Back
Top