Dries390
Well-Known Member
- Joined
- Sep 8, 2007
- Messages
- 91
- Solutions
- 4
- Reaction score
- 70
My NPC has the following luascript:
On trying to sell eggs the error included occurs but the other items sell fine. Even worse; none of my NPCs seem capable of selling items (also included).
I'm using Nekiro's TFS 1.3 for Tibia 8.60 with Delusion's Item abilities via lua.
Any help would be greatly appreciated
Lua:
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:addSellableItem({'phoenix egg'}, 11400, 10000, 'phoenix egg')
shopModule:addSellableItem({'egg'}, 2695, 10, 'egg')
shopModule:addSellableItem({'hydra egg'}, 4850, 2000, 'hydra egg')
shopModule:addSellableItem({'tortoise egg'}, 5678, 250, 'tortoise egg')
shopModule:addSellableItem({'terramite egg'}, 11370, 50, 'terramite egg')
shopModule:addSellableItem({'tarantula egg'}, 11198, 75, 'tarantula egg')
shopModule:addSellableItem({'egg of the many'}, 10523, 3750, 'egg of the many')
shopModule:addSellableItem({'carniphila seeds'}, 11217, 175, 'carniphila seeds')
function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, "Calene") then
selfSay("I just love animals, that's why I set up this {shelter}.",cid)
selfSay("Just thinking about all the sad lonely creatures out there...",cid)
selfSay("It's almost too much to bear.",cid)
elseif(msgcontains(msg, "quest") or msgcontains(msg, "job") or msgcontains(msg, "mission")) then
selfSay("I'll have something to do for you later.",cid)
elseif msgcontains(msg, "shelter") then
selfSay("These animals are my children.",cid)
else
selfSay("I don't know anything about that subject, sorry.", cid)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
On trying to sell eggs the error included occurs but the other items sell fine. Even worse; none of my NPCs seem capable of selling items (also included).
I'm using Nekiro's TFS 1.3 for Tibia 8.60 with Delusion's Item abilities via lua.
[8.60] Latest forgottenserver 1.3/1.4. Clean downport.
I just downgraded the latest forgottenserver 1.3/1.4 and will keep it up to date to master branch. If you want to submit issue (bugs), do it in github repo, not here. Repository: https://github.com/nekiro/TFS-1.4-Downgrades/tree/8.60
otland.net
Lua Function - [TFS 1.3] Item abilities via Lua
SQL needed to execute in db: ALTER TABLE player_items ADD abilities BLOB NOT NULL; ALTER TABLE player_depotitems ADD abilities BLOB NOT NULL; ALTER TABLE player_inboxitems ADD abilities BLOB NOT NULL; C++ Code: infernumx/forgottenserver...
otland.net
Any help would be greatly appreciated
Attachments
-
egg.png24.8 KB · Views: 36 · VirusTotal
-
inventory.PNG39.3 KB · Views: 34 · VirusTotal