• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Windows Problems with recieving items from shop Tfs 0.3.6 and I'm using Znote acc

Fizzy

Member
Joined
Dec 27, 2012
Messages
200
Reaction score
16
Location
Sweden
Hello everyone. As you can see I bumped in into a new problem now again.
When you go to the shop and click on the Shop offers you can buy things there. It says " Say in the Server [!shop] etc " well I log in and write !shop but nothing happens, it only says you have to wait 15 seconds. I do not recieve any item or nothing. Nothing appears on the starter I do not get any bugs or nothing.. What's wrong? I'll rep++
 
I mean when you bought from the shop, in the database. See if it create a query of the item you bought. Should be in znote, znote_shop

As you see:
fvRRSkRL.png
 
I mean when you bought from the shop, in the database. See if it create a query of the item you bought. Should be in znote, znote_shop

As you see:
fvRRSkRL.png
E1d8VRVr.png

If you mean Shop orders so yeah It's creating it. but I ain't getting any items and I fixed firstitems.lua aswell. I took it at www/lua/talkactions 3.0 because my starter is 0.3.6, what's the problem?
 
post the talkaction/scripts/shop.lua
-- Znote Shop v1.0 for Znote AAC on TFS 0.3.6+ Crying Damson.
function onSay(cid, words, param)
local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks.
local cooldown = 15 -- in seconds.

if getPlayerStorageValue(cid, storage) <= os.time() then
setPlayerStorageValue(cid, storage, os.time() + cooldown)
local accid = getAccountNumberByPlayerName(getCreatureName(cid))

-- Create the query
local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. accid .. " LIMIT 1;")

-- Detect if we got any results
if orderQuery ~= false then
-- Fetch order values
local q_id = result.getDataInt(orderQuery, "id")
local q_type = result.getDataInt(orderQuery, "type")
local q_itemid = result.getDataInt(orderQuery, "itemid")
local q_count = result.getDataInt(orderQuery, "count")
result.free(orderQuery)

-- ORDER TYPE 1 (Regular item shop products)
if q_type == 1 then
-- Get wheight
local playerCap = getPlayerFreeCap(cid)
local itemweight = getItemWeightById(q_itemid, q_count)
if playerCap >= itemweight then
db.executeQuery("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";")
doPlayerAddItem(cid, q_itemid, q_count)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have recieved ".. q_count .." "..getItemNameById(q_itemid).."(s)!")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP!")
end
end
-- Add custom order types here
-- Type 2 is reserved for premium days and is handled on website, not needed here.
-- Type 3 is reserved for character gender(sex) change and is handled on website as well.
-- So use type 4+ for custom stuff, like etc packages.
-- if q_type == 4 then
-- end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have no orders.")
end

else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every "..cooldown.." seconds. Remaining cooldown: ".. getPlayerStorageValue(cid, storage) - os.time())
end
return false
end
I'm using this, Talkactions/Scripts/Znoteshop.lua
 
Back
Top