Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 22.11.2005, 21:58   #1
montejo1974
Архивный участник
 
Join Date: Aug 2005
Posts: 42
Default [SHARE] One way to get /escape

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);
			}  	
		}
	}
?>
montejo1974 is offline  
Old 22.11.2005, 23:35   #2
Metalmurphy
Архивный участник
 
Join Date: Feb 2005
Posts: 766
Default

Hum how about making a skill like return with a use delay of 5mins like off?
Metalmurphy is offline  
Old 23.11.2005, 08:35   #3
montejo1974
Архивный участник
 
Join Date: Aug 2005
Posts: 42
Default

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
montejo1974 is offline  
Old 23.11.2005, 09:57   #4
iamrend
Архивный участник
 
Join Date: May 2005
Posts: 315
Default

Quote:
Originally Posted by Metalmurphy
Hum how about making a skill like return with a use delay of 5mins like off?
Yes, is better i think :P
iamrend is offline  
Old 23.11.2005, 13:04   #5
Metalmurphy
Архивный участник
 
Join Date: Feb 2005
Posts: 766
Default

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
Metalmurphy is offline  
Old 23.11.2005, 13:11   #6
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

I have made the skill return with less than 5 mins escape time, but they use it rarely.
top-gear is offline  
Old 23.11.2005, 13:12   #7
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

btw,have you found any petition server that actually works?
top-gear is offline  
Old 23.11.2005, 15:34   #8
PiTaGoRaS
Архивный участник
 
Join Date: Aug 2005
Posts: 30
Default

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
PiTaGoRaS is offline  
Old 23.11.2005, 16:02   #9
montejo1974
Архивный участник
 
Join Date: Aug 2005
Posts: 42
Default

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.
montejo1974 is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 23:29.