![]() |
|
|
#1 |
|
Архивный участник
Join Date: Aug 2005
Posts: 42
|
On the server you can introduce /escape command. It allows one to escape when trapped in terrain.
Well....maybe implementing this on the exe would be better, but htat's the way I get a solution. The user send a petition via web with the email, account name and char name. After we check that all information is correct.....BLIM! I tried some random delta position and these are the best I got. If someone think about better delta...please tell me....maybe we'll discuss hehe. As always....much people may think this is a piece of crap...but it solves my problem ![]() Code:
<?php
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
$ip = "localhost";
$port = "2009";
$conn = mssql_connect ("127.0.0.1", "xxx", "yyy");
$db = mssql_select_db ("lin2db");
$account=$_GET['account'];
$char=$_GET['char'];
$email=$_GET['email'];
$sql = "select email from ssn where name='".$account."'";
$result = mssql_query ($sql, $conn);
if (mssql_result($result, 0,0)!=$email)
{
mail("<".$email.">", "Solicitud de desatrancar personaje de ##-Lineage2", "¡¡¡ATENCION!!! La Cuenta ".$account." no esta asociada al email ".$email, "From: Staff ##-Lineage2<".$dirmail.">\r\nReply-To: .$dirmail.\r\nReturn-Path: .$dirmail.\r\nErrors-To: .$dirmail.");
}
else
{
$db = mssql_select_db ("lin2world");
$sql = "select account_name, xloc, yloc, zloc from user_data where char_name='".$char."'";
$result = mssql_query ($sql, $conn);
if (mssql_result($result, 0,0)!=$account)
{
mail("<".$email.">", "Solicitud de desatrancar personaje de ##-Lineage2", "¡¡¡ATENCION!!! El personaje ".$char." no pertenece a la cuenta ".$account, "From: Staff ##-Lineage2<".$dirmail.">\r\nReply-To: .$dirmail.\r\nReturn-Path: .$dirmail.\r\nErrors-To: .$dirmail.");
}
else
{
srand(make_seed());
$xloc=mssql_result($result, 0,1)+rand(0,500)-250;
$yloc=mssql_result($result, 0,2)+rand(0,500)-250;
$zloc=mssql_result($result, 0,3)+rand(0,250);
$com="2;".$char.";1;".$xloc.";".$yloc.";".$zloc;
sleep(120);
$fp = fsockopen($ip, $port, $errno, $errstr);
if ($fp)
{
$out = str_replace(";", "\t", $com)."\r\n";
fwrite($fp, $out);
stream_set_timeout($fp, 2);
$answ = fgets($fp, 8);
}
fclose($fp);
}
}
}
?>
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Feb 2005
Posts: 766
|
Hum how about making a skill like return with a use delay of 5mins like off?
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 42
|
I heard of it, and prove it. But the skill solution only have one problem...lineage players usually are very clever. Players with return overuse the skill for other purposes different to "get escaped", and i want my server continue selling scrolls of escape
at the shops
|
|
|
|
|
#4 | |
|
Архивный участник
Join Date: May 2005
Posts: 315
|
Quote:
|
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Feb 2005
Posts: 766
|
With a skill that takes 5 mins to use (thats the time it takes in retail with /unstuck too) ppl will still use scrolls of escape
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Aug 2005
Posts: 605
|
I have made the skill return with less than 5 mins escape time, but they use it rarely.
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Aug 2005
Posts: 605
|
btw,have you found any petition server that actually works?
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Aug 2005
Posts: 30
|
Did you ever hear about SQL injection? You should make at least some basic checks on $char, $account and $email vars to avoid BIG security problems
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: Aug 2005
Posts: 42
|
Hehe, well....then we'll discuss it.
When a player is on Anthara's Lair, and get trapped, you let him use the skill and.....voila....he/she is at Giran.....wow....30 minutes later he/she is again at Lair, and oohhhh shit get trapped again....grgrgrg heheheh :P With this system, we teleport the player to a very close location. Pitagoras thx for the advise, but I only put the piece of code that solve the problem....we have other ways to prevent sql injection an other posible attacks to the server. Gracias por tu interés de todas formas, y a ver si nos animamos por estos lares y compartimos más información para mejorar nuestros servers , que hay poquitos españoles.
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|