i use modern acc i use paygol system
my shop.lua
Lua: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 doItemSetAttribute(received, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].') 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
Go to phpmyadmin.
And check if u got the tables: shop_history / shop_offer / etc.
<?php
/*
English:
This script will help you to integrate PayGol as your sms payment gateway in your Tibia, users can donate and they can have their points in-game, this mean they don't have to wait hours or even days to get their points.
Please read this link Paygol automatic sms payments in Tibia which will guide you step by step.
Note:Before starting you have to create an account at http://www.paygol.com/register
Espanol:
Este codigo te ayudara a integrar PayGol como tu plataforma de pagos por sms en tu Tibia, tus usuarios podran donar y podran obtener sus puntos de inmediato, no tendran que esperar horas o hasta dias para obtener sus puntos.
Por favor, lee esta guia Paygol pagos automaticos por sms en Tibia que te ayudara paso a paso..
Nota:Antes de comenzar, debes crear una cuenta en http://www.paygol.com/register
*/
// check that the request comes from PayGol server
if(!in_array($_SERVER['REMOTE_ADDR'],
array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
header("HTTP/1.0 403 Forbidden");
die("Error: Unknown IP");
}
//Get all parameters from PayGol
$message_id = $_GET[message_id];
$shortcode = $_GET[shortcode];
$keyword = $_GET[keyword];
$message = $_GET[message];
$sender = $_GET[sender];
$operator = $_GET[operator];
$country = $_GET[country];
$custom = $_GET[custom];//
$price = $_GET[price];
$currency = $_GET[currency];
$points = $_GET[points];
//Replace these parameters by your database details
$dbhost = "localhost"; //Your database domain
$dbuser = ""; //Database username
$dbpassword = ""; //Database password
$db = "rl"; //Database name
//Connect to Database
$conn = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($db);
$sql = "UPDATE accounts SET premium_points = premium_points+$points WHERE name = '$custom'";
mysql_query($sql);
mysql_close($conn);
?>
Uhm, u copied the .lua script from ur server. (the one which delivers items to the character).
But u didnt copy the .php scripts from ur site, since u said people wont receive their payment we're gonna need those php scripts. which u should configure with the right payment id etc, .
Idk how its called, probably something with "paygol".