Mr Tuzzz
New Member
- Joined
- Nov 30, 2008
- Messages
- 8
- Reaction score
- 1
Hello people! i'm returning to the world of ot after many years and i'm trying to host a 7.6 server just for fun, mostly for my friends but will open it up for any1! However, i'm getting a Npc error when i launch the server and i dont have the skills to solve it.
The server is The OTX Server Version: (2.100)
and the error in question is as follows.
"
[7/12/2025 20:25:37] [Error - NpcScript Interface]
[7/12/2025 20:25:37] data/npc/scripts/default.lua
[7/12/2025 20:25:37] Description:
[7/12/2025 20:25:37] data/npc/lib/npcsystem/modules.lua:1077: attempt to index local 'v' (a boolean value)
[7/12/2025 20:25:37] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/default.lua"
All the Npcs react when you say hi to them but nothing happend when i try to buy runes for example.
as far as my knowledge goes this is the part of the modules.lua that it's refering to?
I would really appreciate if some kind soul could help me find a solution for this.
Thank you
The server is The OTX Server Version: (2.100)
and the error in question is as follows.
"
[7/12/2025 20:25:37] [Error - NpcScript Interface]
[7/12/2025 20:25:37] data/npc/scripts/default.lua
[7/12/2025 20:25:37] Description:
[7/12/2025 20:25:37] data/npc/lib/npcsystem/modules.lua:1077: attempt to index local 'v' (a boolean value)
[7/12/2025 20:25:37] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/default.lua"
All the Npcs react when you say hi to them but nothing happend when i try to buy runes for example.
as far as my knowledge goes this is the part of the modules.lua that it's refering to?
LUA:
-- Adds a new buyable item.
-- names = A table containing one or more strings of alternative names to this item. Used only for old buy/sell system.
-- itemid = The itemid of the buyable item
-- cost = The price of one single item
-- subType - The subType of each rune or fluidcontainer item. Can be left out if it is not a rune/fluidcontainer. Default value is 0 and 1 (depending on shop mode)
-- realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used)
function ShopModule:addBuyableItem(names, itemid, cost, subType, realName)
if(type(subType) == 'string' and realName == nil) then
realName = subType
subType = nil
end
local v = getItemInfo(itemid)
if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then
local item = {
id = itemid,
buy = cost,
sell = -1,
subType = tonumber(subType) or (v.charges > 0 and v.charges or 0),
name = realName or v.name
}
for i, shopItem in ipairs(self.npcHandler.shopItems) do
if(shopItem.id == item.id and (shopItem.subType == item.subType or shopItem.subType == 0)) then
if(item.sell ~= shopItem.sell) then
item.sell = shopItem.sell
end
self.npcHandler.shopItems[i] = item
item = nil
break
end
end
if(item ~= nil) then
table.insert(self.npcHandler.shopItems, item)
end
end
if(names ~= nil and SHOPMODULE_MODE ~= SHOPMODULE_MODE_TRADE) then
local parameters = {
itemid = itemid,
cost = cost,
eventType = SHOPMODULE_BUY_ITEM,
module = self,
realName = realName or v.name,
subType = tonumber(subType) or (v.charges > 0 and v.charges or 1)
}
for i, name in pairs(names) do
local keywords = {}
table.insert(keywords, 'buy')
table.insert(keywords, name)
local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters)
node:addChildKeywordNode(self.yesNode)
node:addChildKeywordNode(self.noNode)
end
end
end
I would really appreciate if some kind soul could help me find a solution for this.
Thank you
Attachments
-
Skärmbild 2025-12-07 203630.webp61.4 KB · Views: 15 · VirusTotal -
Skärmbild 2025-12-07 210044.webp73.6 KB · Views: 13 · VirusTotal -
Skärmbild 2025-12-07 210057.webp29.3 KB · Views: 15 · VirusTotal