<<bump>> noone?
function ShopModule:callbackOnBuy(cid, itemid, subType, amount)
if(getPlayerMoney(cid) < amount*self.npcHandler.shopItems[itemid].buyPrice) then
local msg = self.npcHandler:getMessage(MESSAGE_NEEDMOREMONEY)
msg = self.npcHandler:parseMessage(msg, parseInfo)
selfSay(msg, cid)
return false
end
if(self.npcHandler.shopItems[itemid].buyPrice ~= 666) then
if(getPlayerMoney(cid) < amount*self.npcHandler.shopItems[itemid].buyPrice) then
local msg = self.npcHandler:getMessage(MESSAGE_NEEDMOREMONEY)
msg = self.npcHandler:parseMessage(msg, parseInfo)
selfSay(msg, cid)
return false
end
end
if(i > 0) then
doPlayerRemoveMoney(cid, i*self.npcHandler.shopItems[itemid].buyPrice)
return true
end
if(i > 0) then
if(self.npcHandler.shopItems[itemid].buyPrice ~= 666) then
doPlayerRemoveMoney(cid, i*self.npcHandler.shopItems[itemid].buyPrice)
end
return true
end
doPlayerRemoveMoney(cid, amount*self.npcHandler.shopItems[itemid].buyPrice)
self.npcHandler.talkStart[cid] = os.time()
return true
if(self.npcHandler.shopItems[itemid].buyPrice ~= 666) then
doPlayerRemoveMoney(cid, amount*self.npcHandler.shopItems[itemid].buyPrice)
end
self.npcHandler.talkStart[cid] = os.time()
shopModule:addBuyableItem({'crystal coin'}, 2160, 666, 1, 'crystal coin')
very good idea. rep++ and this will help alot. i really wonder why i didnt think of that. oh and if you want, you can be first to test the beta form of my new server. im sending a pm to everyone that helps me on it.
EDIT : btw, erm how about making containers of items show up in the shopwindow?
Nothing in Lua is impossible.Containers of items in shopwindow?
Talaturen said that was impossible.