nxsupert wrote:
ProgrammingFreak wrote:
-=+Join+=-
![]()
are you good at php and MySQL.
(show some code so Rub0Gameton can see)
php? Oh yeah!
<html>
<head>
<title>Comment!</title>
</head>
<body>
<form>
<tr>
<td>
<p>Username:<input type="text" name="Username" size="50"> <br>
Subject:<input type="text" name="subject" size="50"> <br>
Comment: <br>
<textarea cols="70" rows="50" name="comment">Enter Comment Here!</textarea>
</p>
</form>
</body>
</html>
<?php
require("class.phpmailer.php");
$username= $_POST['Username'];
$subject= $_POST['subject'];
$comments= $_POST['comment'];
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->From = "";
$mail->FromName = "ProgrammingFreak";
$mail->AddAddress([removed],"ProgrammingFreak");
$mail->WordWrap = 50;
$mail->Subject = "Programmingfreak - $subject";
$mail->Body = "$username said '$comments'";
if(!$mail->Send())
{
echo "Message could not be sent.";
echo "Mailer Error!" . $mail->ErrorInfo;
} else {
echo "Message was sent!"}
?>Last edited by ProgrammingFreak (2011-06-29 07:05:26)
Offline
ProgrammingFreak wrote:
nxsupert wrote:
ProgrammingFreak wrote:
-=+Join+=-
![]()
are you good at php and MySQL.
(show some code so Rub0Gameton can see)php? Oh yeah!
Code:
<html> <head> <title>Comment!</title> </head> <body> <form> <tr> <td> <p>Username:<input type="text" name="Username" size="50"> <br> Subject:<input type="text" name="subject" size="50"> <br> Comment: <br> <textarea cols="70" rows="50" name="comment">Enter Comment Here!</textarea> </p> </form> </body> </html> <?php require("class.phpmailer.php"); $username= $_POST['Username']; $subject= $_POST['subject']; $comments= $_POST['comment']; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->From = ""; $mail->FromName = "ProgrammingFreak"; $mail->AddAddress("[removed by moderator]","ProgrammingFreak"); $mail->WordWrap = 50; $mail->Subject = "Programmingfreak - $subject"; $mail->Body = "$username said '$comments'"; if(!$mail->Send()) { echo "Message could not be sent."; echo "Mailer Error!" . $mail->ErrorInfo; } else { echo "Message was sent!"} ?>
how about MySQL(database).
i need some help building the exit code.
Last edited by Paddle2See (2011-06-29 08:22:51)
Offline
entrance code
<?php
$username="";
$password="";
$database="";
$randomid= rand(1, 1000000000000);
mysql_connect("host",$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$username=$_POST["username"];
$x=$_POST["x"];
$y=$_POST["y"];
/*$custom = $_GET['custom'];
optionle .
TO ADD JUST CHANGE query 1 TO insert into channel(username,x,y,randomid,custom) values ('$username','$x','$y',$randomid,$custom)"
*/
$query="insert into channel(username,x,y,randomid) values ('$username','$x','$y',$randomid)";
mysql_query($query) or die('Error, insert query 1 failed');
$query="SELECT * FROM table where randomid = $randomid";
$result = mysql_query($query) or die('Error, insert query 2 failed');
while ($i < $num) {
$ID=mysql_result($result,$i,"ID");
echo "$ID.0";
$i++;
}
mysql_close();
?>input:
username
x
y
*custom (if you want them)
outputs
ID (you must keep the id.)
randomid - you need to add this to the table as an int. this code helps you get your ID.
Last edited by nxsupert (2011-03-01 13:43:14)
Offline
nxsupert wrote:
hmm....
this is the list of php scripts we need.
1. enter - the code that is run when you enter the mmorpg. (adds you to the database)done
2. info getter- the code that gives you the data of over players.
3. exit - the code that is run when you exit. (deletes you from the database (we need a way to make this run when you click the red button) )
mmk, just a question, why should you be deleted from the database when you exit?
Offline
Rub0Gameton wrote:
nxsupert wrote:
hmm....
this is the list of php scripts we need.
1. enter - the code that is run when you enter the mmorpg. (adds you to the database)done
2. info getter- the code that gives you the data of over players.
3. exit - the code that is run when you exit. (deletes you from the database (we need a way to make this run when you click the red button) )mmk, just a question, why should you be deleted from the database when you exit?
do you want it so they are kept for ever and are online or offline ....
i may be good at mysql but i don't know how to fined out if you are getting requests from someone.
we would need to make an online detector script and cron job that runs every 5 seconds .
that would be too difficult for now.
we should do this in versions. we will do that in v 2.9.*.* .
Offline
nxsupert wrote:
Rub0Gameton wrote:
nxsupert wrote:
hmm....
this is the list of php scripts we need.
1. enter - the code that is run when you enter the mmorpg. (adds you to the database)done
2. info getter- the code that gives you the data of over players.
3. exit - the code that is run when you exit. (deletes you from the database (we need a way to make this run when you click the red button) )mmk, just a question, why should you be deleted from the database when you exit?
do you want it so they are kept for ever and are online or offline ....
i may be good at mysql but i don't know how to fined out if you are getting requests from someone.
we would need to make an online detector script and cron job that runs every 5 seconds .
that would be too difficult for now.
we should do this in versions. we will do that in v 2.9.*.* .
Ok, the information each player is...
ID (auto-increment)
X
Y
Money
Type (This one tells if a member is normal/admin/mod/banned)
Online (To see if theyre online or not)
Oh, and no, we want to keep each player's data when they exit the game
(I have a login verification script if you want it)
BTW, lets try to make the password with an md5 encryption (its the easiest/safest encryption type[I have a base script if you want it]), and BTW, Panther can not handle $_POST requests, so instead of using that, use $_GET. Also, can you get in Hamachi ASAP? I cant post the MMORPG project im making for this to public yet.
-------------------------------------------------------------------------------------------------------------------------
For ProgrammingFreak, you are in, can you be a spriter?
If you accept, I need you to do 40x40 tileblocks. Draw one for each of the next...
-Grass (Plain or if you want to, do some details. Light Green is best)
-Dirt (Brown)
-Stone (Gray, this would really be cool with effects)
-Tree
You can also make whichever tiles come to your mind
-------------------------------------------------------------------------------------------------------------------------
EDIT: Forgot to add, I may be less frequently on Scratch because my router went BANG, so I can only use wired connection. Ill continue working in the project now. I have made a script which loads the map data stored in the server. This gives us a HUGE advantage because we dont have to update the project if we want to expand the map!
Last edited by Rub0Gameton (2011-03-02 19:12:39)
Offline
Sorry! I was accidentally on my brothers account.
Anyway, disregard that Wicon name and substitute it with Necromaster.
Offline
Necromaster wrote:
Sorry! I was accidentally on my brothers account.
Anyway, disregard that Wicon name and substitute it with Necromaster.
Those would actually work if we are going to make a medieval game........ but I think its better making a futuristic/modern game. Think of names for those too
Offline
Necromaster wrote:
StarScape
Age of Stars
Final War: MMORPG
Future Darkness
Cataclyst
It wont be in space though
Its just a little futuristic but Earth-based
However you're doing pretty good!
EDIT: If you have Hamachi, can you join? Details in first post
Last edited by Rub0Gameton (2011-03-02 20:01:43)
Offline
Rub0Gameton wrote:
nxsupert wrote:
Rub0Gameton wrote:
mmk, just a question, why should you be deleted from the database when you exit?
do you want it so they are kept for ever and are online or offline ....
i may be good at mysql but i don't know how to fined out if you are getting requests from someone.
we would need to make an online detector script and cron job that runs every 5 seconds .
that would be too difficult for now.
we should do this in versions. we will do that in v 2.9.*.* .Ok, the information each player is...
ID (auto-increment)
X
Y
Money
Type (This one tells if a member is normal/admin/mod/banned)
Online (To see if theyre online or not)
Oh, and no, we want to keep each player's data when they exit the game(I have a login verification script if you want it)
BTW, lets try to make the password with an md5 encryption (its the easiest/safest encryption type[I have a base script if you want it]), and BTW, Panther can not handle $_POST requests, so instead of using that, use $_GET. Also, can you get in Hamachi ASAP? I cant post the MMORPG project im making for this to public yet.
-------------------------------------------------------------------------------------------------------------------------
For ProgrammingFreak, you are in, can you be a spriter?
If you accept, I need you to do 40x40 tileblocks. Draw one for each of the next...
-Grass (Plain or if you want to, do some details. Light Green is best)
-Dirt (Brown)
-Stone (Gray, this would really be cool with effects)
-Tree
You can also make whichever tiles come to your mind![]()
-------------------------------------------------------------------------------------------------------------------------
EDIT: Forgot to add, I may be less frequently on Scratch because my router went BANG, so I can only use wired connection. Ill continue working in the project now. I have made a script which loads the map data stored in the server. This gives us a HUGE advantage because we dont have to update the project if we want to expand the map!
hmmm......
the best way to make this work is to add an online/ofline column.
and how do you get into the Hamachi ASAP.
Last edited by nxsupert (2011-03-03 02:51:27)
Offline
here is the new entrance code:
<?php
$username="";
$password="";
$database="";
$randomid= rand(1, 1000000000000);
mysql_connect("host",$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$x=$_GET["x"];
$y=$_GET["y"];
$u=$_GET["u"];
$p=$_GET["p"];
/*$custom = $_GET['custom'];
optionle .
TO ADD JUST CHANGE query 1 TO insert into channel(username,x,y,randomid,custom) values ('$username','$x','$y',$randomid,$custom)"
*/
$query="UPDATE example SET randomid = '$randomid' and online='true' WHERE username='$u' and pasword='$p'";
mysql_query($query) or die('Error, insert query 1 failed');
$query="SELECT * FROM table where randomid = $randomid";
$result = mysql_query($query) or die('Error, insert query 2 failed');
while ($i < $num) {
$ID=mysql_result($result,$i,"ID");
echo "$ID.0";
$i++;
}
mysql_close();
?>
i do not know if this will work or not but i do not know how to do encryption.
Offline
nxsupert wrote:
sorry guys , lost Hamachi .
could we share the project via email.
Offline
Necromaster wrote:
nxsupert wrote:
sorry guys , lost Hamachi .
could we share the project via email.
Last edited by nxsupert (2011-03-09 11:59:24)
Offline
Ok, my email address is rub.gameton@gmail.com, however, I won't be able to send it to you until tonight, cause I won't be at home till then, I'm currently using my iPod touch
For moderators, I'm not using my personal email address, and I think no1 in here does, so there is no need to hide it.
Offline