Jump to content

Recommended Posts

  • Replies 104
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Oh wow, what are we going to do now the whole item text function has been removed and that was a main part of it. Im not fully aware of how its stored "in it" now either. God this blows /confused

Posted

Upon further "looking into" i forgot that when the player has a item that cant be loaded, or doesnt have room for the core sends it via mail so i looked up the function and found it, maybe this method can be useful in fixing this one?

http://paste2.org/p/767193

Of course modified some as thats pulling from item_instance to resend there own item.

Posted

I will test this on one of our development servers and let you know asap diablox.

EDIT - It works perfectly, except for the fact that it wont show the mail until you relog which isn't THAT big of a deal, but im more than sure that, that can be fixed.. Any ideas?

Posted

Bumps, i have a quesiton with the last patch, in my script PhP how have the good id mail_external with the good mail_id mail_external_items ?

I make this bur it's not good because the mail_id it's always = 0 >< ...

mysql_query("INSERT INTO mail_external (`id`, `receiver`, `subject`, `message`, `money`) VALUES
('', $guid, 'Items', 'Thanks for your items', 0)");

$mail_id_num = mysql_query("SELECT id FROM mail_external WHERE receiver='$guid'") or die("ERREUR SQL!!");    

mysql_query("INSERT INTO mail_external_items (`id`, `mail_id`, `item`, `count`) VALUES
('', '$mail_id_num', 29434, 10)");

Thanks if you can help :)

Posted

$mail_id_num = mysql_query("SELECT id FROM mail_external WHERE receiver='$guid'") or die("ERREUR SQL!!");    

You don't need use SELECT query , use this php function is the best way : mysql_insert_id
mysql_query("INSERT INTO mail_external_items (`id`, `mail_id`, `item`, `count`) VALUES
('', '$mail_id_num', 29434, 10)");

However the problem is here, you insert a SELECT result . You need a variable whith mysql_result. exemple : $mail_id_num_2 = mysql_result($mail_id_num,0); and add variable in mysql_query : mysql_query("INSERT INTO mail_external_items (`id`, `mail_id`, `item`, `count`) VALUES

('', '$mail_id_num_2', 29434, 10)"); but whith mysql_insert_id it's better.:)

Posted
Bumps, i have a quesiton with the last patch, in my script PhP how have the good id mail_external with the good mail_id mail_external_items ?

I make this bur it's not good because the mail_id it's always = 0 >< ...

mysql_query("INSERT INTO mail_external (`id`, `receiver`, `subject`, `message`, `money`) VALUES
('', $guid, 'Items', 'Thanks for your items', 0)");

$mail_id_num = mysql_query("SELECT id FROM mail_external WHERE receiver='$guid'") or die("ERREUR SQL!!");    

mysql_query("INSERT INTO mail_external_items (`id`, `mail_id`, `item`, `count`) VALUES
('', '$mail_id_num', 29434, 10)");

Thanks if you can help :)

That is not the best way to send mail. Insert mail is done this way

mysql_query('INSERT INTO mail_external (`receiver`, `subject`, `message`, `money`) VALUES
('.$reciver_guid.', "'.$subject.'", "'.$message.'", '.$money.')')or die(mysql_error());
$mail_id = mysql_insert_id();
mysql_query('INSERT INTO mail_external_items (`mail_id`, `item`, `count`) VALUES
('.$mail_id.', '.$item_id.', '.$count.')')or die(mysql_error());

Posted
I also had the problem that you need to relog with the original patch I wrote, any idea why that happens ?

You need to modify the mail function , I think maybe he check mail that the player send just a login in . You need analyse the code for auction house because the mail that is sent when the player buy is immediat.

Posted
Thanks i need Send Item or Money to the TABLE mail_external and mail_external_items

To Send Item or money :

<?php
//Variable
$receiver="The guid of character";
$subject="Subject of mail";
$message="The content mail whithout special char";
$money="The money that you want send (copper coin) , put 0 if you send just item ";  
$item_id="Your item id that you want send";
$count="The number of item , if you put 2 for example there is 2 x the same item ";
//Sql query
$database = mysql_connect('ip_server', 'login', 'password'); 
mysql_select_db('database name where the table are.',$database);
mysql_query('INSERT INTO mail_external (`receiver`, `subject`, `message`, `money`) VALUES
('$receiver', '$subject', '$message', '$money')');
$mail_id = mysql_insert_id();
mysql_query('INSERT INTO mail_external_items (`mail_id`, `item`, `count`) VALUES
('$mail_id', '$item_id', '$count')');
mysql_close();
?>

Its just the base for send mail , you can improve the code whith dynamic data (and other ) for this you need use form (GET or POST) .

Posted

My web developer made a complete mail index via php that connects the ids of the items to the mail but any who moving on from that.

Im surprised no one has figured out why you have to relog, im beginning to think its just not updating the session to the player.. The other external mail patch let you receive mail while logged in so something must be missing to update the player and say "hey you gots mail" sad thing is i haven't looked at it hard enough to see why it isn't pushing to the player unless they relog and it reloads all there mail, and other junk.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use