PHP:
-- OTServ event handling functions start
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
-- OTServ event handling functions end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:buyContainer({'bp mp'}, 2000, 7620, 1000, 20, 'Backpack of Mana Potions')
shopModule:buyContainer({'bp hp'}, 2000, 7618, 1000, 20, 'Backpack of Health Potions')
shopModule:buyContainer({'bp smp'}, 2000, 7589, 2200, 20, 'Backpack of Strong Mana Potions')
shopModule:buyContainer({'bp shp'}, 2000, 7588, 2200, 20, 'Backpack of Strong Health Potions')
shopModule:buyContainer({'bp gmp'}, 2000, 7590, 4400, 20, 'Backpack of Great Mana Potions')
shopModule:buyContainer({'bp ghp'}, 2000, 7591, 4400, 20, 'Backpack of Great Health Potions')
npcHandler:addModule(FocusModule:new())
PHP:
[31/08/2008 22:45:15] data/npc/scripts/bprune.lua:9: attempt to index global 'npcHandler' (a nil value)
[31/08/2008 22:45:15] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/bprune.lua
[31/08/2008 22:45:15] data/npc/scripts/IsimovK.lua:45: 'end' expected (to close 'function' at line 12) near 'elseif'
[31/08/2008 22:45:44] [Notice - Npc::Npc] NPC Name: Ulvhedin - autowalk has been deprecated, use walkinterval.
[31/08/2008 22:45:44] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/bprune.lua
[31/08/2008 22:45:44] data/npc/scripts/bprune.lua:18: '<eof>' expected near 'end'
What is wrong i this script ?
Thx for any help