Hi Tom, I think I have fixed the AVS program.
Download the Org AVS from the link linked above or
Mangos_AVS.rar - FileFactory
Now download my edited spend.php and replace it or make these fixes:
AFTER THESE LINES:
Code:
//send item.
$Con = mysql_connect($Realminfo['sqlhost'],$Realminfo['sqluser'],$Realminfo['sqlpass']);
mysql_select_db($Realminfo['chardb']);
$stack = 1;
$gold = 0;
$item = 1;
DELETE ALL LINES BETWEEN ABOVE AND BELOW (not incuding these):
Code:
// if ($result) {
// mysql_close();
// return $mail_id;
// } else {
// mysql_close();
// return 0;
// }
AND ADD THIS CODE IN BETWEEN THEM:
Code:
if ($item == 0) {
$has_items = 0;
} else {
$has_items = 1;
}
// create item first...
$result = mysql_query("SELECT MAX(`guid`) FROM item_instance");
$item_instance_id = (mysql_result($result, 0)) + 1;
$result = mysql_query("INSERT INTO `item_instance` (`guid`, `owner_guid`, `data`) VALUES ($item_instance_id , '{$Character}', '".$item_instance_id." 0 3 {$Rinfo['itemid']} 0 0 {$Character} 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ')");
// Write message
$result = mysql_query("SELECT MAX(`id`) FROM item_text");
$item_page_id = (mysql_result($result, 0)) + 1;
$result = mysql_query("INSERT INTO `item_text` (id, text) VALUES ($item_page_id,'".MAIL_BODY."')");
// Setup Mail entry
$result = mysql_query("SELECT MAX(`id`) FROM mail");
$mail_id = (mysql_result($result, 0)) + 1;
$result = mysql_query("INSERT INTO mail (id,messageType,stationery,mailTemplateId,sender,receiver,subject,itemTextId,has_items,expire_time,deliver_time,money,cod,checked) VALUES ($mail_id, 0, 61, 0, '{$Character}', '{$Character}', '".MAIL_SUBJECT."', '$item_page_id', '$has_items', '".(time() + (30*24*3600))."','".(time()+5)."', '$gold', 0, 0)");
if ($has_items) {
$result = mysql_query("INSERT INTO mail_items (mail_id,item_guid,item_template,receiver) VALUES ($mail_id, $item_instance_id, '{$Rinfo['itemid']}', '{$Character}')");
}
Or download the spend.php file here:
spend.rar - 0.0002 MB
EDIT:
I see you mentioned that you were considering paying or rewarding etc, you dont have to, but if you feel a tip is in need then send me a PM =)
Hope this fix works for you