• 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!

NPC's only trading with a special storage value

Tarielle

New Member
Joined
Nov 4, 2007
Messages
214
Reaction score
0
Location
Sweden
Hi, how can I make so the NPC's only wants to trade with the player if he/she got a special storage value with LUA (or XML if possible):
Code:
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'item'}, item.id, price, 'item')

Thanks
 
Last edited by a moderator:
Hi, how can I make so the NPC's only wants to trade with the player if he/she got a special storage value with LUA (or XML if possible):
Code:
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'item'}, item.id, price, 'item')

Thanks



Code:
If getPlayerStorageValue(cid, 1337) == 1 then

Youcodehere
 
Thanks, but I know the storageValue function but I dont know how to use it with the shopModule function..

Do you mean it like this way:
Code:
if getPlayerStorageValue(cid, xxxx) == 1 then	
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'item'}, item.id, price, 'item')
end

Because that doesn't work for me :/
 
Back
Top