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

Shop System Full! [Modern AAC]

What do you mean by 'Product' => 'Donation for VipHera',?? what should i type there ??? :D Ill repp anyone that can help me!
 
According to the installation file, you should put htdocs content in ur htdocs folder but with Modern AAC there is no htdocs folder.

So where should the content of htdocs be when it comes to uniform?
 
uniform server ===>> (uniserv directory here)/www/
XamPP ===>> (XamPP directory here)/htdocs/
Modern AAC ==>> works on both xampp and uniform,,
Gesior AAc ==>> works on both xampp and uniform..
cheers :)
 
same for me, i bought one item on my GOD to try the system and my chat is getting spammed with 00:03 Sorry, you don't have enough space on container to receive >> 100 Crystal Coins << i even relogged and it is still spamming me!!


I have the same problem, would be nice if you could share your solve :D
 
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'product' in 'field list'' in C:\xampp\htdocs\gifts\gifts.php:285 Stack trace: #0 C:\xampp\htdocs\gifts\gifts.php(285): PDO->query('INSERT INTO sho...') #1 C:\xampp\htdocs\system\pages\gifts.php(2): include('C:\xampp\htdocs...') #2 C:\xampp\htdocs\system\application\controllers\p.php(13): include('C:\xampp\htdocs...') #3 [internal function]: p->v('gifts', 'buy', '24', 'send') #4 C:\xampp\htdocs\system\codeigniter\CodeIgniter.php(236): call_user_func_array(Array, Array) #5 C:\xampp\htdocs\index.php(165): require_once('C:\xampp\htdocs...') #6 {main} thrown in C:\xampp\htdocs\gifts\gifts.php on line 285

Error :(
 
post your globalevents shop.lua what distro u are using?


PHP:
function onThink(interval, lastExecution, thinkInterval)

	local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")
	
		if(result:getID() ~= -1) then
			while(true) do
				cid = getCreatureByName(tostring(result:getDataString("player")))
				product = tonumber(result:getDataInt("product"))
				itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")
					if isPlayer(cid) then
						local id = tonumber(itemr:getDataInt("item"))
						local tid = tonumber(result:getDataInt("id"))
						local count = tonumber(itemr:getDataInt("count"))
						local tipe = tonumber(itemr:getDataInt("type"))
						local productn = tostring(itemr:getDataString("name"))
							if isInArray({5,8},tipe) then
								if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then
									if isContainer(getPlayerSlotItem(cid, 3).uid) then
										received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count)
										if received then
											doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
											db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
										else
											doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<")
										end
									else
										doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<")
									end
								else
									doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
								end
							elseif isInArray({6,7},tipe) then
									if tipe == 6 then
										bcap = 8
										bid = 1987
									elseif tipe == 7 then
										bcap = 20
										bid = 1988
									end
									if isItemRune(id) then
										count = 1
									end
									if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then
										local bag = doCreateItemEx(bid, 1)
											for i = 1,bcap do
												doAddContainerItem(bag, id, count)
											end
										received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag)
										if received == RETURNVALUE_NOERROR then
											doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
											db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
										else
											doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<")
										end
									else
										doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
									end
							end
					end
				itemr:free()
				if not(result:next()) then
					break
				end
			end
			result:free()
		end
	return true
end

PHP:
	<globalevent name="shop" interval="30" script="shop.lua"/>
 
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'product' in 'field list'' in C:\xampp\htdocs\gifts\gifts.php:285 Stack trace: #0 C:\xampp\htdocs\gifts\gifts.php(285): PDO->query('INSERT INTO sho...') #1 C:\xampp\htdocs\system\pages\gifts.php(2): include('C:\xampp\htdocs...') #2 C:\xampp\htdocs\system\application\controllers\p.php(13): include('C:\xampp\htdocs...') #3 [internal function]: p->v('gifts', 'buy', '24', 'send') #4 C:\xampp\htdocs\system\codeigniter\CodeIgniter.php(236): call_user_func_array(Array, Array) #5 C:\xampp\htdocs\index.php(165): require_once('C:\xampp\htdocs...') #6 {main} thrown in C:\xampp\htdocs\gifts\gifts.php on line 285

Error :(

Anyone? :(
 
help .. when adding an item to a player .... when it enters the player is given the item .. but it is giving and giving .. and fix this?
 
If people donate with paypal, how do they recieve the points instantly? Right now I have to do each transaction manually and add the points myself.
 
Would it perhaps be possible to instead of items being added to the players backback, they where added to the depot of the player's home town? (Shop.lua-> something with doPlayerAddDepotItems I guess)?

EDIT:
If people donate with paypal, how do they recieve the points instantly? Right now I have to do each transaction manually and add the points myself.

I have this problem aswell.
 
Last edited:
how do i fix paypal problem ?
what if i wana add other payment method ?
how i do it manually ?
 
Hello,

I got a problem i use this shop but i got 2 Errors! See here:

function onThink(interval, lastExecution, thinkInterval)

local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")

if(result:getID() ~= -1) then
while(true) do
cid = getCreatureByName(tostring(result:getDataString("player")))
product = tonumber(result:getDataInt("product"))
itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")
if isPlayer(cid) then
local id = tonumber(itemr:getDataInt("item"))
local tid = tonumber(result:getDataInt("id"))
local count = tonumber(itemr:getDataInt("count"))
local tipe = tonumber(itemr:getDataInt("type"))
local productn = tostring(itemr:getDataString("name"))
if isInArray({5,8},tipe) then
if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then
if isContainer(getPlayerSlotItem(cid, 3).uid) then
received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count)
if received then
doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
elseif isInArray({6,7},tipe) then
if tipe == 6 then
bcap = 8
bid = 1987
elseif tipe == 7 then
bcap = 20
bid = 1988
end
if isItemRune(id) then
count = 1
end
if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then
local bag = doCreateItemEx(bid, 1)
for i = 1,bcap do
doAddContainerItem(bag, id, count)
end
received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag)
if received == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
end
end
itemr:free()
if not(result:next()) then
break
end
end
result:free()
end
return true
end

and in server console: (0.4 r3884)

[1:21:42.964] [Error - GlobalEvent Interface]
[1:21:42.964] data/globalevents/scripts/shop.lua:eek:nThink
[1:21:42.964] Description:
[1:21:42.964] (luaDoPlayerAddItemEx) Player not found

and it dont stop,it spamm that i dont have space in my backpack!!

please help!
 
Someone had the Same Problem of Ur's on this Thread and Got Solved.(look In the Thread)
 
Cloning Item Is Still On.
I looked up The Thread And All the Fixe's Didnt Work.
Could someone Post His Shop.lua Please.
 
Mine is
function onThink(interval, lastExecution, thinkInterval)

local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")

if(result:getID() ~= -1) then
while(true) do
cid = getCreatureByName(tostring(result:getDataString("player")))
product = tonumber(result:getDataInt("product"))
itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")
if isPlayer(cid) then
local id = tonumber(itemr:getDataInt("item"))
local tid = tonumber(result:getDataInt("id"))
local count = tonumber(itemr:getDataInt("count"))
local tipe = tonumber(itemr:getDataInt("type"))
local productn = tostring(itemr:getDataString("name"))
if isInArray({5,8},tipe) then
if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then
if isContainer(getPlayerSlotItem(cid, 3).uid) then
received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count)
if received then
doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
elseif isInArray({6,7},tipe) then
if tipe == 6 then
bcap = 8
bid = 1987
elseif tipe == 7 then
bcap = 20
bid = 1988
end
if isItemRune(id) then
count = 1
end
if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then
local bag = doCreateItemEx(bid, 1)
for i = 1,bcap do
doAddContainerItem(bag, id, count)
end
received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag)
if received == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
end
end
itemr:free()
if not(result:next()) then
break
end
end
result:free()
end
return true
end
Took It From Polat Alemdar
And i still Have the Cloning Bug.
I got
<globalevent name="shop" interval="30" script="shop.lua" />
Post ur Shop System if it's WOrking Fine.
 
Back
Top