ExibeR
Lua/C++/PHP Programmer
Greetings,
after answering about 20 threads today (70% of them alike), I decided to post all my solutions in one thread.
And if you get any errors that is not listed below, post here and I'll assist you.
Issue #1
Solution #1
a)
1. Go to DaoPay.com
2. Log in (Who would have guessed?)
3. Click on Websites, then configure websites.
4. Choose your Website, and click edit.
5. Choose EASYpin, and click continue.
6. Click continue 2 more times, until you arrive at the Allowed IP addresses page.
7. In nr. 1 insert your domain: http://domain.crap.com/ In nr. 2 insert your IP: x.x.x.x (You can find it at What Is My IP Address? - IP Address Lookup, Internet Speed Test, IP Info, plus more)
8. Under "Link back to your website" insert your domain crap.org
9. Click continue, then Save.
b)
1. Open buypoints.lua which is found in /xampp/htdocs/
2. Remember that the array must start with 0.
Etc:
Instead of:
Issue #2
Solution #2
1. Log into your DaoPay
2. Go to Products, then Manage Products
3. Select your product, and click edit
4. 3rd line you will find something called "Validity"
5. Change it from "1 Day" to "1 Counts"
Problem solved
Issue #3
Solution #3
1. Go to /xampp/htdocs/
2. Create a new folder called "trans"
What can this be used for?
A log called daopay.log will be written. Inside you can see all Pin Codes that has been used, and which account they were used on. You can use this to check if they actually used their code, or if they are just saying that it didn't work.
Issue #4
Solution #4
1. Log into DaoPay
2. Go to My Account and then Customer
3. Change "Payout Typ" to "PayPal"
4. Go to Payouts and then Bank Data
5. Write in your email, and save.
And your done! Money will be transferred every second month (60days).
Issue #5
Solution #5
In your MySQL database execute (in phpmyadmin):
and:
and:
and:
and:
Issue #6
Solution #6
1. Go to /xampp/htdocs/
2. Open buypoints.php and:
Change:
With:
3. Then try again, writing your Player Name instead of Account Number.
And your done!
Issue #7
IF YOU USE NEW VERSION OF TFS 0.3 (alpha1 or new)
1. Go to: /data/globalevents/scripts/
2. Create a new lua file, and call it shop.lua
3. Insert:
4. Go to /data/globalevents/ and open globalevents.xml
5. Insert:
It will give the players items every 30 seconds. Don't set it lower, will lag down the server.
IF YOU USE TFS 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.2.17, 0.2.18, 0.2.19 OR TFS 0.3 REV. under 815:
1. Go to /data/creaturescripts/scripts/ and open login.lua
2. Delete everything inside and insert:
Issue #8
Solution #8
1. Go to /xampp/htdocs/item_images/
2. Add the desired picture there called ID.jpg
Example:
Boots of Haste
Check id in the z_shop_offer table in your database for Boots of Haste. In this example they have ID 7. Then take your picture of the Boots Of Haste and insert it in item_images. Then rename the file to 7.jpg
That's it.
If you want to use .gif instead:
Open up shopsystem.php
Replace all lines:
With:
Issue #9
Solution #9
You can edit this in buypoints.lua
Replace the old links.
a href = The destination URL
img src = url of the image you want to show
width = width of the picture
height = height of the picture
alt = alternative text, in case they can't load the picture
So when you click that picture, you will get redirected to DaoPay or whatever you set the link to
Issue #10
Solution #10
Do not answer that mail. It is a scam. This can easily be seen as there are several writing and grammar mistakes in every line.
Hi, We have done further investigations, and due to fraud suspicious traffic for your application we are forced to request a passport copy and a copy of any kind of bill, like electricity bill, where we are able to see your address.This address will have to match with the entered address at the daopay controlcenter.Until we receive the requested documents we are forced to freeze your payouts.Thanks for your understanding Kind regards,Daopay Customer SupportJosef mailto: [email protected] daopay.com
W - Should continue with a small w
to fraud - Should contain and a to combine
.T - Missing space
daopay - Is written DaoPay
controlcenter - Two words
.U - Missing space
your payouts. - Should be your account
.T - Missing space
your understanding - Bad sentence
understanding Kind regards - Missing dot
,D - Missing space
Daopay - Is written DaoPay
[email protected] - Wrong email of DaoPay
Issue #11
a)
Solution #11
1. Open up your "php.ini" (xampp/php/php.ini)
2. Search for: memory_limit (Line 246)
3. Replace:
With:
4. Restart/reload your apache server.
after answering about 20 threads today (70% of them alike), I decided to post all my solutions in one thread.
And if you get any errors that is not listed below, post here and I'll assist you.
Issue #1
Warning: fopen(http://DaoPay.com/svc/PINcheck?appco...pin=vinnajseyt) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in C:\xampp\htdocs\buypoints.php on line 43
Errors occured:
* Wrong PIN code, try to enter code again.
Solution #1
a)
1. Go to DaoPay.com
2. Log in (Who would have guessed?)
3. Click on Websites, then configure websites.
4. Choose your Website, and click edit.
5. Choose EASYpin, and click continue.
6. Click continue 2 more times, until you arrive at the Allowed IP addresses page.
7. In nr. 1 insert your domain: http://domain.crap.com/ In nr. 2 insert your IP: x.x.x.x (You can find it at What Is My IP Address? - IP Address Lookup, Internet Speed Test, IP Info, plus more)
8. Under "Link back to your website" insert your domain crap.org
9. Click continue, then Save.
b)
1. Open buypoints.lua which is found in /xampp/htdocs/
2. Remember that the array must start with 0.
Etc:
PHP:
# example config for daopay
$config['daopay'][0]['appcode'] = xxxxx; #
$config['daopay'][0]['prodcode'] = 'xxxxx'; #
$config['daopay'][0]['addpoints'] = '2'; #
$config['daopay'][0]['cost'] = "2 euro inc. VAT"; #
PHP:
# example config for daopay
$config['daopay'][1]['appcode'] = xxxxx; #
$config['daopay'][1]['prodcode'] = 'xxxxx'; #
$config['daopay'][1]['addpoints'] = '2'; #
$config['daopay'][1]['cost'] = "2 euro inc. VAT"; #
Issue #2
Pincode can be used infinite times
Solution #2
1. Log into your DaoPay
2. Go to Products, then Manage Products
3. Select your product, and click edit
4. 3rd line you will find something called "Validity"
5. Change it from "1 Day" to "1 Counts"
Problem solved
Issue #3
Warning: fopen(trans/daopay.log) [function.fopen]: failed to open stream: No such file or directory in C:\xampp\htdocs\buypoints.php on line 35
Warning: fwrite(): supplied argument is not a valid stream resource in C:\xampp\htdocs\buypoints.php on line 37
Warning: fclose(): supplied argument is not a valid stream resource in C:\xampp\htdocs\buypoints.php on line 38
Solution #3
1. Go to /xampp/htdocs/
2. Create a new folder called "trans"
What can this be used for?
A log called daopay.log will be written. Inside you can see all Pin Codes that has been used, and which account they were used on. You can use this to check if they actually used their code, or if they are just saying that it didn't work.
Issue #4
How do I get DaoPay to transfer money to PayPal?
Solution #4
1. Log into DaoPay
2. Go to My Account and then Customer
3. Change "Payout Typ" to "PayPal"
4. Go to Payouts and then Bank Data
5. Write in your email, and save.
And your done! Money will be transferred every second month (60days).
Issue #5
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ots.z_shop_history_pacc' doesn't exist' in D:\xampp\htdocs\shopsystem.php:374 Stack trace: #0 D:\xampp\htdocs\shopsystem.php(374): PDO->query('SELECT * FROM `...') #1 D:\xampp\htdocs\index.php(184): include('D:\xampp\htdocs...') #2 {main} thrown in D:\xampp\htdocs\shopsystem.php on line 374
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'roxx.z_shop_offer' doesn't exist' in C:\xampp\htdocs\shopsystem.php:90 Stack trace: #0 C:\xampp\htdocs\shopsystem.php(90): PDO->query('SELECT * FROM `...') #1 C:\xampp\htdocs\shopsystem.php(174): getOfferArray() #2 C:\xampp\htdocs\index.php(187): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\shopsystem.php on line 90
Solution #5
In your MySQL database execute (in phpmyadmin):
Code:
CREATE TABLE `z_ots_comunication` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`param1` varchar(255) NOT NULL,
`param2` varchar(255) NOT NULL,
`param3` varchar(255) NOT NULL,
`param4` varchar(255) NOT NULL,
`param5` varchar(255) NOT NULL,
`param6` varchar(255) NOT NULL,
`param7` varchar(255) NOT NULL,
`delete_it` int(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code:
CREATE TABLE `z_shop_offer` (
`id` int(11) NOT NULL auto_increment,
`points` int(11) NOT NULL default '0',
`itemid1` int(11) NOT NULL default '0',
`count1` int(11) NOT NULL default '0',
`itemid2` int(11) NOT NULL default '0',
`count2` int(11) NOT NULL default '0',
`offer_type` varchar(255) default NULL,
`offer_description` text NOT NULL,
`offer_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Code:
ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';
Code:
CREATE TABLE `z_shop_history_item` (
`id` int(11) NOT NULL auto_increment,
`to_name` varchar(255) NOT NULL default '0',
`to_account` int(11) NOT NULL default '0',
`from_nick` varchar(255) NOT NULL,
`from_account` int(11) NOT NULL default '0',
`price` int(11) NOT NULL default '0',
`offer_id` int(11) NOT NULL default '0',
`trans_state` varchar(255) NOT NULL,
`trans_start` int(11) NOT NULL default '0',
`trans_real` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code:
CREATE TABLE `z_shop_history_pacc` (
`id` int(11) NOT NULL auto_increment,
`to_name` varchar(255) NOT NULL default '0',
`to_account` int(11) NOT NULL default '0',
`from_nick` varchar(255) NOT NULL,
`from_account` int(11) NOT NULL default '0',
`price` int(11) NOT NULL default '0',
`pacc_days` int(11) NOT NULL default '0',
`trans_state` varchar(255) NOT NULL,
`trans_start` int(11) NOT NULL default '0',
`trans_real` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Issue #6
Errors occured:
* Account/account of player with this name doesn't exist.
Solution #6
1. Go to /xampp/htdocs/
2. Open buypoints.php and:
Change:
PHP:
$main_content .= '<tr><td><b>Account name: </b></td><td><input type="text" size="20" value="'.$to_user.'" name="to_user" /></td></tr>
PHP:
$main_content .= '<tr><td><b>Player name: </b></td><td><input type="text" size="20" value="'.$to_user.'" name="to_user" /></td></tr>
And your done!
Issue #7
Solution #7Items are not sent in-game. Not realized yet.
IF YOU USE NEW VERSION OF TFS 0.3 (alpha1 or new)
1. Go to: /data/globalevents/scripts/
2. Create a new lua file, and call it shop.lua
3. Insert:
Code:
-- ### CONFIG ###
-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 19
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
function onThink(interval, lastExecution)
local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';")
if(result_plr:getID() ~= -1) then
while(true) do
id = tonumber(result_plr:getDataInt("id"))
action = tostring(result_plr:getDataString("action"))
delete = tonumber(result_plr:getDataInt("delete_it"))
cid = getCreatureByName(tostring(result_plr:getDataString("name")))
if isPlayer(cid) == TRUE then
local itemtogive_id = tonumber(result_plr:getDataInt("param1"))
local itemtogive_count = tonumber(result_plr:getDataInt("param2"))
local container_id = tonumber(result_plr:getDataInt("param3"))
local container_count = tonumber(result_plr:getDataInt("param4"))
local add_item_type = tostring(result_plr:getDataString("param5"))
local add_item_name = tostring(result_plr:getDataString("param6"))
local received_item = 0
local full_weight = 0
if add_item_type == 'container' then
container_weight = getItemWeightById(container_id, 1)
if isItemRune(itemtogive_id) == TRUE then
items_weight = container_count * getItemWeightById(itemtogive_id, 1)
else
items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count)
end
full_weight = items_weight + container_weight
else
full_weight = getItemWeightById(itemtogive_id, itemtogive_count)
if isItemRune(itemtogive_id) == TRUE then
full_weight = getItemWeightById(itemtogive_id, 1)
else
full_weight = getItemWeightById(itemtogive_id, itemtogive_count)
end
end
local free_cap = getPlayerFreeCap(cid)
if full_weight <= free_cap then
if add_item_type == 'container' then
local new_container = doCreateItemEx(container_id, 1)
local iter = 0
while iter ~= container_count do
doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
iter = iter + 1
end
received_item = doPlayerAddItemEx(cid, new_container)
else
local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
received_item = doPlayerAddItemEx(cid, new_item)
end
if received_item == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
end
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
end
end
if not(result_plr:next()) then
break
end
end
result_plr:free()
end
return TRUE
end
5. Insert:
Code:
<globalevent name="shop" interval="30" script="shop.lua"/>
IF YOU USE TFS 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.2.17, 0.2.18, 0.2.19 OR TFS 0.3 REV. under 815:
1. Go to /data/creaturescripts/scripts/ and open login.lua
2. Delete everything inside and insert:
Code:
-- ### CONFIG ###
-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 19
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
SQL_COMUNICATION_INTERVAL = SQL_interval * 1000
function onLogin(cid)
if(InitShopComunication == 0) then
local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, {})
InitShopComunication = eventServ
end
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
function sql_communication(parameters)
dofile("./config.lua")
env = assert(luasql.mysql())
con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
result_plr = assert(con:execute("SELECT * FROM z_ots_comunication WHERE `type` = 'login';"))
todo = result_plr:fetch({}, "a")
while todo do
id = tonumber(todo.id)
action = tostring(todo.action)
delete = tonumber(todo.delete_it)
cid = getPlayerByName(tostring(todo.name))
if isPlayer(cid) == TRUE then
local itemtogive_id = tonumber(todo.param1)
local itemtogive_count = tonumber(todo.param2)
local container_id = tonumber(todo.param3)
local container_count = tonumber(todo.param4)
local add_item_type = tostring(todo.param5)
local add_item_name = tostring(todo.param6)
local received_item = 0
local full_weight = 0
if add_item_type == 'container' then
container_weight = getItemWeight(container_id, 1)
if isItemRune(itemtogive_id) == TRUE then
items_weight = container_count * getItemWeight(itemtogive_id, 1)
else
items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count)
end
full_weight = items_weight + container_weight
else
full_weight = getItemWeight(itemtogive_id, itemtogive_count)
if isItemRune(itemtogive_id) == TRUE then
full_weight = getItemWeight(itemtogive_id, 1)
else
full_weight = getItemWeight(itemtogive_id, itemtogive_count)
end
end
local free_cap = getPlayerFreeCap(cid)
if full_weight <= free_cap then
if add_item_type == 'container' then
local new_container = doCreateItemEx(container_id, 1)
local iter = 0
while iter ~= container_count do
doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
iter = iter + 1
end
received_item = doPlayerAddItemEx(cid, new_container)
else
local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
received_item = doPlayerAddItemEx(cid, new_item)
end
if received_item == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
delete = assert(con:execute("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";"))
assert(con:execute("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";"))
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
end
else
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
end
end
todo = result_plr:fetch (todo, "a")
end
con:close()
env:close()
local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, parameters)
end
Issue #8
How do I get pictures in my shop?
Solution #8
1. Go to /xampp/htdocs/item_images/
2. Add the desired picture there called ID.jpg
Example:
Boots of Haste
Check id in the z_shop_offer table in your database for Boots of Haste. In this example they have ID 7. Then take your picture of the Boots Of Haste and insert it in item_images. Then rename the file to 7.jpg
That's it.
If you want to use .gif instead:
Open up shopsystem.php
Replace all lines:
Code:
['id'].'.jpg">
Code:
['id'].'.gif">
Issue #9
How do I make so there is a daopay logo in "buypoints" area, when you press it you will go to daopay.com to call or send sms?
Solution #9
You can edit this in buypoints.lua
Replace the old links.
Code:
<a href="WWW.URL.COM"><img src="IMAGE URL" width="1024" height="768" alt="" /></a>
img src = url of the image you want to show
width = width of the picture
height = height of the picture
alt = alternative text, in case they can't load the picture
So when you click that picture, you will get redirected to DaoPay or whatever you set the link to
Issue #10
I received this email from DaoPay:
Hi, We have done further investigations, and due to fraud suspicious traffic for your application we are forced to request a passport copy and a copy of any kind of bill, like electricity bill, where we are able to see your address.This address will have to match with the entered address at the daopay controlcenter.Until we receive the requested documents we are forced to freeze your payouts.Thanks for your understanding Kind regards,Daopay Customer SupportJosef mailto: [email protected] daopay.com
Solution #10
Do not answer that mail. It is a scam. This can easily be seen as there are several writing and grammar mistakes in every line.
Hi, We have done further investigations, and due to fraud suspicious traffic for your application we are forced to request a passport copy and a copy of any kind of bill, like electricity bill, where we are able to see your address.This address will have to match with the entered address at the daopay controlcenter.Until we receive the requested documents we are forced to freeze your payouts.Thanks for your understanding Kind regards,Daopay Customer SupportJosef mailto: [email protected] daopay.com
W - Should continue with a small w
to fraud - Should contain and a to combine
.T - Missing space
daopay - Is written DaoPay
controlcenter - Two words
.U - Missing space
your payouts. - Should be your account
.T - Missing space
your understanding - Bad sentence
understanding Kind regards - Missing dot
,D - Missing space
Daopay - Is written DaoPay
[email protected] - Wrong email of DaoPay
Issue #11
a)
b)Errors occured:
* Server has problem with connection to daopay.com, can't verify PIN code.
Warning: fopen(https://daopay.com/svc/pincheck?appc...pin=ecoabnaher) [function.fopen]: failed to open stream: Result too large in C:\xampp\htdocs\buypoints.php on line 43
Solution #11
1. Open up your "php.ini" (xampp/php/php.ini)
2. Search for: memory_limit (Line 246)
3. Replace:
Code:
memory_limit = 32M
Code:
memory_limit = 64M
Last edited: