F
Forsakenfate
Guest
Hello I'm working on a proffession system in my server. It is nearly done but my npc doesn't seem to work. he only buys the items per 1, so if you have a stack of 100 herbs, you have to click 100 times.. Does anyone know what I have to change in these scripts to just sell 100 at once?
Proffession npc:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Ankorah" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="80" head="0" body="0" legs="0" feet="0" addons="0"/>
<parameters>
<parameter key="module_shop" value="2"/>
<parameter key="shop_buyable" value="Scythe,2550,200;Iron hammer,2422,200;Pick,2553,200"/>
<parameter key="shop_sellable" value="Fern,2801,30;Powder herb,2803,50;Shadow herb,2804,50;Stone herb,2799,50;Sling herb,2802,75;Star herb,2800,100;Blood herb,2798,250;Troll greens,2805,500;Marijuana,5953,1000"/>
</parameters>
</npc>
Default.lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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
npcHandler:addModule(FocusModule:new())
Someone knows what I did wrong? Reply please ^^
Proffession npc:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Ankorah" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="80" head="0" body="0" legs="0" feet="0" addons="0"/>
<parameters>
<parameter key="module_shop" value="2"/>
<parameter key="shop_buyable" value="Scythe,2550,200;Iron hammer,2422,200;Pick,2553,200"/>
<parameter key="shop_sellable" value="Fern,2801,30;Powder herb,2803,50;Shadow herb,2804,50;Stone herb,2799,50;Sling herb,2802,75;Star herb,2800,100;Blood herb,2798,250;Troll greens,2805,500;Marijuana,5953,1000"/>
</parameters>
</npc>
Default.lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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
npcHandler:addModule(FocusModule:new())
Someone knows what I did wrong? Reply please ^^
Last edited by a moderator: