Page 1 of 1
Messagebox
Posted: Tue Oct 13, 2009 1:29 am
by skacke
Hello!
I've created a text-based game by following the mmo tutorials, + i've added some things,
but can anyone help me create a mail box, in which i can send, and read mail from other players in the game? Or maybe that takes to much space in the database?
Re: Messagebox
Posted: Tue Oct 13, 2009 1:52 am
by darspire
you can always put on your website the html code that lets them create an E-mail to send to you
<a href="mailto:
email@provider.com">send me an email!</a>
of course replace "
email@provider.com" with your email
with my computer it opens up outlook express and lets them send a message.
Re: Messagebox
Posted: Tue Oct 13, 2009 1:07 pm
by skacke
darspire wrote:you can always put on your website the html code that lets them create an E-mail to send to you
<a href="mailto:
email@provider.com">send me an email!</a>
of course replace "
email@provider.com" with your email
with my computer it opens up outlook express and lets them send a message.
Yea, i am aware of that, but i mean a mail box within the game. but thx!

Re: Messagebox
Posted: Tue Oct 13, 2009 1:37 pm
by hallsofvallhalla
just add a table called mail, with fields of
PID
sender
date
read
subject
body
then make a php page with a while statement much like the equipment where it queries select * from mail where pid = player id
if read = 1 then it hasn't been read and make it orange or something, then once you open it do a update and make read = 0
make another new page that they can make a new mail.
I could make a video tut on this but it may be a while.
Re: Messagebox
Posted: Tue Oct 13, 2009 6:00 pm
by skacke
hallsofvallhalla wrote:just add a table called mail, with fields of
PID
sender
date
read
subject
body
then make a php page with a while statement much like the equipment where it queries select * from mail where pid = player id
if read = 1 then it hasn't been read and make it orange or something, then once you open it do a update and make read = 0
make another new page that they can make a new mail.
I could make a video tut on this but it may be a while.
how do i make it so that it erases the mail after a week or something like that?
Re: Messagebox
Posted: Tue Oct 13, 2009 9:54 pm
by hallsofvallhalla
make a cron that runs every day,
make a while query
if date is older than 1 week delete
Re: Messagebox
Posted: Wed Oct 14, 2009 1:24 am
by Torniquet
oh yeah that reminds me.... i never got round to doing my tutorial on a pm system lol.
been so god damn busy, and my moods just not been quite up to scratch i completly forgot about it
i may post my code up for people to look through and if i get round to it. walk through it all in a vid.
its nothing fancy tho lol.