[release] -Lotf- reset character position (php)

10/29/2008 15:03 demonscim#1
This is something bloody requested and i totally forgot to do(sorry bud) but here it is now for all of you. You enter in your account name , and your character name and it will teleport you to twin city in case your stuck in a portal or something.. You must be logged out to make it work.

PHP Code:
<html>
<head>
<title>Teleport to twin city!</title>
</head>
<body>
<center>
<h1>Twin city teleportation</h1><br>
<form action="twincity.php?teled=yes" method="post">
Account Name : <input type="text" name="acc"><br>
Character Name: <input type="text" name="name"><br>
<input type="submit" value="To Tc!"><br>
</form>
</center>
</body>
</html>
<?php 
//Connect to database.
$dbhost 'localhost'//keep as localhost.
$dbuser 'root'//you should probabally keep root.
$dbpass ''//not sure what your pass is so I left blank.
$dbname 'coproj'//you should also keep this the same I believe.

$acc $_POST['acc'];
$name $_POST['name'];

$conn mysql_connect($dbhost$dbuser$dbpass);

    
mysql_select_db($dbname);

    
    
mysql_query("UPDATE characters SET LocationX = '429' WHERE Account = '$acc' AND CharName = '$name'");
    
mysql_query("UPDATE characters SET LocationY = '378' WHERE Account = '$acc' AND CharName = '$name'");
    
    if (
$_GET['teled'] == "yes") {
        echo 
"<center>You have been teleported to twin city. You may now login!</center>";
    }
    
mysql_close();
    
//created by Demonscim/Razar/Scim (please do not remove this).
?>
Thanks would be awesome btw :D.

EDIT:This was a 2 minute script, it works so if you get a problem thats not from the script don't bitch at me.
10/29/2008 15:06 µ~Xero~µ#2
mysql_query("UPDATE characters SET LocationX = '429' WHERE Account = '$acc' AND CharName = '$name'");

Better would be

mysql_query("UPDATE characters SET LocationX = '437' WHERE Account = '$acc' AND CharName = '$name'");

Coz some ppl have NPC´s on the middle :)

Thanks!!

:D
10/29/2008 15:08 demonscim#3
:D set it to your own preferences >.< but no problem.. just figured I'd release it.
10/29/2008 15:10 µ~Xero~µ#4
This wasn´t a attack against u :(
Just a try to help a bit :)
10/29/2008 15:14 demonscim#5
Oh i know :D just saying.. you can set to your own preferences if you want.. edit it do w/e just don't take out my little comment [//created by Demonscim/Razar/Scim (please do not remove this).]
10/29/2008 16:34 ahmadinho12#6
The Best Thing that i don't know anything at coding :)

Anyway it seems to be a good one ;)
10/29/2008 16:41 demonscim#7
Thank you :D
10/29/2008 16:56 XxArcherMasterxX#8
added to my all-in-1 thread under "HelpFull Threads"

nice release
10/29/2008 17:01 keving15#9
Quote:
Originally Posted by XxArcherMasterxX View Post
added to my all-in-1 thread at the "HelpFull Threads" section;)
Helpfull not for the User?
Its helpfull to Hackers to inject the Code i can give u an example how to drop database etc with that script but i dont show here :)
10/29/2008 17:13 Tw3ak#10
easier just to fix the portal code so people don't get stuck.
10/29/2008 18:24 © Haydz#11
Quote:
Originally Posted by Tw3ak View Post
easier just to fix the portal code so people don't get stuck.
i r agree with him :o
10/29/2008 18:45 demonscim#12
Lol.. true im just filling a request :p.. c# is not my thing YET >.< hopefully it will be eventually.. Emme is being really helpful in teaching me
11/05/2008 06:08 Bayer222#13
php code would like to change the password:rtfm:
11/05/2008 12:40 nTL3fTy#14
Quote:
Originally Posted by demonscim View Post
This is something bloody requested and i totally forgot to do(sorry bud) but here it is now for all of you. You enter in your account name , and your character name and it will teleport you to twin city in case your stuck in a portal or something.. You must be logged out to make it work.

PHP Code:
<html>
<head>
<title>Teleport to twin city!</title>
</head>
<body>
<center>
<h1>Twin city teleportation</h1><br>
<form action="twincity.php?teled=yes" method="post">
Account Name : <input type="text" name="acc"><br>
Character Name: <input type="text" name="name"><br>
<input type="submit" value="To Tc!"><br>
</form>
</center>
</body>
</html>
<?php 
//Connect to database.
$dbhost 'localhost'//keep as localhost.
$dbuser 'root'//you should probabally keep root.
$dbpass ''//not sure what your pass is so I left blank.
$dbname 'coproj'//you should also keep this the same I believe.

$acc $_POST['acc'];
$name $_POST['name'];

$conn mysql_connect($dbhost$dbuser$dbpass);

    
mysql_select_db($dbname);

    
    
mysql_query("UPDATE characters SET LocationX = '429' WHERE Account = '$acc' AND CharName = '$name'");
    
mysql_query("UPDATE characters SET LocationY = '378' WHERE Account = '$acc' AND CharName = '$name'");
    
    if (
$_GET['teled'] == "yes") {
        echo 
"<center>You have been teleported to twin city. You may now login!</center>";
    }
    
mysql_close();
    
//created by Demonscim/Razar/Scim (please do not remove this).
?>
Thanks would be awesome btw :D.

EDIT:This was a 2 minute script, it works so if you get a problem thats not from the script don't bitch at me.
...and what happens if the character isn't in TwinCity? :rolleyes:
11/05/2008 14:41 demonscim#15
lol.. than i screwed up or someone else screwed up...

@Bayer222 -
Quote:
php code would like to change the password:rtfm:
, umm yeh fuck you.. first off I can't do that because c# encrypts differently than php. second off you Read the fucking manual and do it your damn self.. Learn fucking english while your at it