• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua [Solved] NpcSystem. Shop doesnt give money after taking an item.

jakub742

Member
Joined
May 1, 2010
Messages
144
Solutions
2
Reaction score
20
Location
Slovakia
Hello. Im using 7.72 OThire distro. In npc/scripts/lib/npcsystem/ is located a lua file called modules.lua with implemented functions for shopping. I created my own NPC using those functions in npcsystem. Everything works fine but player does not get a money for an item that he sold.

Here is the sample of my code where im using that function.
Code:
shopModule:addSellableItem({'knight axe'}, 2430, 2000,'Knight axe')

Modules.lua containing function addSellableItem - http://pastebin.com/S2x5Wi1W
My NPC lua script - http://pastebin.com/zBmx9QQP

Thanks for reply and sorry for bad english ;)
 
Code:
shopModule:addSellableItem({'knight axe'}, 2430, 2000, 1, 'Knight axe')
Doesnt work either.
Code:
 Nah'Bob: Do you want to sell 1 1 for 3000 gold coins?
Now Npc cant even use a proper name of item.

function ShopModule:addSellableItem(names, itemid, cost, realname). Function is using 4 parameters so that part is correct.
 
Problem is that function doPlayerAddMoney doesnt work. If im trying to use it in talkaction script it does not give a money and no error in console either. Any ideas ?
 
Back
Top