Killzon32
There killing our dudes.
Got 2 npc errors.
Seller.lua
Oracle Npc
I think its something in this script?
Rep++ if you can help me.
PHP:
[22/09/2010 10:44:59] Reloaded npcs.
[22/09/2010 10:44:59] [Error - Npc interface]
[22/09/2010 10:44:59] data/npc/scripts/seller.lua:onThink
[22/09/2010 10:44:59] Description:
[22/09/2010 10:44:59] data/npc/scripts/seller.lua:8: attempt to index a nil value
[22/09/2010 10:44:59] stack traceback:
[22/09/2010 10:44:59] data/npc/scripts/seller.lua:8: in function <data/npc/scripts/seller.lua:8>
[22/09/2010 10:44:59] [Error - Npc interface]
[22/09/2010 10:44:59] data/npc/scripts/seller.lua:onThink
[22/09/2010 10:44:59] Description:
[22/09/2010 10:44:59] Stack size changed!
Seller.lua
PHP:
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())
Oracle Npc
PHP:
[21/09/2010 07:54:13] [Error - CreatureScript Interface]
[21/09/2010 07:54:13] data/creaturescripts/scripts/oraclecheck.lua
[21/09/2010 07:54:13] Description:
[21/09/2010 07:54:13] (luaGetCreatureStorage) Creature not found
[21/09/2010 07:54:13] [Error - CreatureScript Interface]
[21/09/2010 07:54:13] data/creaturescripts/scripts/oraclecheck.lua
[21/09/2010 07:54:13] Description:
[21/09/2010 07:54:13] data/creaturescripts/scripts/oraclecheck.lua:2: attempt to compare boolean with number
[21/09/2010 07:54:13] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/oraclecheck.lua)
I think its something in this script?
PHP:
local oracleItems = 9011
if getPlayerStorageValue(cid,oracleItems) < 1 then
itemThinker(cid)
end
function itemThinker(cid)
local backpack = doCreateItemEx(1988, 1)
local giveItems = firstItems[getPlayerVocation(cid)]
if giveItems ~= nil then
for _, v in ipairs(giveItems) do
doAddContainerItem(backpack, v.itemid, v.count or 1)
end
local addItem = doPlayerAddItemEx(cid, backpack, 0)
if (addItem == RETURNVALUE_NOERROR and getPlayerStorageValue(cid,9011) < 1) then
setPlayerStorageValue(cid,9011,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You recieved items from the Oracle.')
return true
elseif (addItem == RETURNVALUE_NOTENOUGHCAPACITY and getPlayerStorageValue(cid,9011) < 1) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'you don\'t have enough capacity for your start items, please make capacity by dropping items.')
addEvent(itemThinker,10000,cid)
return true
end
end
return true
Rep++ if you can help me.