Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'mace'}, 2398, 40, 'mace')
shopModule:addBuyableItem({'spike sword'}, 2383, 1500, 'spike sword')
shopModule:addBuyableItem({'battle axe'}, 2378, 500, 'serpent sword')
shopModule:addSellableItem({'mace'}, 2398, 30, 'mace')
shopModule:addSellableItem({'katana'}, 2412, 45, 'katana')
shopModule:addSellableItem({'scimitar'}, 2419, 120, 'scmitar')
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

-- Made by Coltain13 // Coltain --
-- If you use or edit, please give credit to me --
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)
local node1 = keywordHandler:addKeyword({'food'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I have Fish, Brown Mushrooms, White Mushrooms, Bread, Rolls, Cherries, Bananas, Dragon Ham, Meat, and Ham.'})
shopModule:addBuyableItem({'fish', 'fish'},2667,82,'fish')
shopModule:addBuyableItem({'brown mushroom', 'brown mushrooms'},2789, 100,'brown mushroom')
shopModule:addBuyableItem({'white mushroom', 'white mushrooms'},2787, 80,'white mushroom')
shopModule:addBuyableItem({'bread', 'breads'},2689, 50,'bread')
shopModule:addBuyableItem({'roll', 'rolls'},2690, 25,'roll')
shopModule:addBuyableItem({'cherry', 'cherries'},2679, 10,'cherry')
shopModule:addBuyableItem({'banana', 'bananas'},2676, 25,'banana')
shopModule:addBuyableItem({'dragon ham', 'dragon hams'},2672, 150,'dragon ham')
shopModule:addBuyableItem({'meat', 'meat'},2666, 60,'meat')
shopModule:addBuyableItem({'ham', 'hams'},2671, 80,'ham')
npcHandler:addModule(FocusModule:new())
) i wklej tam:<?xml version="1.0" encoding="UTF-8"?>
<npc name="[COLOR="Red"]nazwa_npc[/COLOR]" script="data/npc/scripts/food.lua" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="325" head="0" body="114" legs="114" feet="114" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="shop_buyable" value="fish,2667,82;brown mushroom,2789,100;white mushroom,2787,80;bread,2689,50;roll,2690,25;cherry,2679,10;banana,2676,25;dragon ham,2672,150;meat,2666,60;ham,2671,80" />
</parameters>
</npc>
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
npcHandler:addModule(FocusModule:new())




<npc name="Amuletseller" script="data/npc/scripts/[B]amulet.lua[/B]" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="134" head="114" body="113" legs="113" feet="113" addons="3" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell amulet of loss,dwarven ring,might ring,key ring,time ring,energy ring,stealth ring,life ring, ring of healing, club ring ,sword ring and axe ring." />
<parameter key="shop_buyable" value="vial,2006,10;flask,2006,10" />
<parameter key="shop_buyable" value="amulet of loss,2173,50000;dwarven ring,2213,2000;might ring,2164,5000,20;key ring,5801,10000;time ring,2169,2000;energy ring,2167,2000;stealth ring,2165,2000;life ring,2168,1000;ring of healing,2214,2000;axe ring,2208,200;club ring,2209,200;sword ring,2207,200;stone skin,2197,5000,5" />
</parameters>
</npc>
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({'amulet of loss', 'amulet of loss'}, 2173, 50000, 'amulet of loss')
shopModule:addBuyableItem({'stone skin amulet', 'stone skin amulet'}, 2197, 2500, 'stone skin amulet')
shopModule:addBuyableItem({'might ring', 'might ring'}, 2164, 10000, 'might ring')
shopModule:addBuyableItem({'stealth ring', 'stealth ring'}, 2165, 10000, 'stealth ring')
shopModule:addBuyableItem({'power ring', 'power ring'}, 2166, 10000, 'power ring')
shopModule:addBuyableItem({'energy ring', 'energy ring'}, 2167, 10000, 'energy ring')
shopModule:addBuyableItem({'life ring', 'life ring'}, 2168, 5000, 'life ring')
shopModule:addBuyableItem({'time ring', 'time ring'}, 2169, 10000, 'time ring')
shopModule:addBuyableItem({'sword ring', 'sword ring'}, 2207, 10000, 'sword ring')
shopModule:addBuyableItem({'axe ring', 'axe ring'}, 2208, 10000, 'axe ring')
shopModule:addBuyableItem({'club ring', 'club ring'}, 2209, 1000, 'club ring')
shopModule:addBuyableItem({'dwarven ring', 'dwarven ring'}, 2213, 1000, 'dwarven ring')
shopModule:addBuyableItem({'crystal ring', 'crystal ring'}, 2124, 500, 'crystal ring')
npcHandler:addModule(FocusModule:new())