Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Hacks, Bots, Cheats & Exploits
You last visited: Today at 04:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] PHP Script for bot pickups

Discussion on [Release] PHP Script for bot pickups within the SRO Hacks, Bots, Cheats & Exploits forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2007
Posts: 12
Received Thanks: 3
[Release] PHP Script for bot pickups

***NOTE*** This is a PHP script, it will only work if you run it on a webserver with PHP enabled.

***DISCLAIMER***
If you don't know what PHP is, or a webserver, this tool is not for you.


**Edited 1/20/09**
Fixed an ordering issue on parsing so that equipment with the word "Gold" in it would not appear in the gold section.

Took "Elixirs" out of the items.txt file so they would no longer show up under equipment.
Links and source updated.
On to the meat:

The tool basically allows you to select your console logs from AGBot and view the parsed out files to show what and how many of each your bot has picked up during that bot session.

There is no javascript, there is no pretty. All it does is work.

The script will attempt to create 1 (one) file: "pickups.ini" in the same directory as itself to retain the path to the log files only.

Here's the link (which contains the script and an items.txt file:


Just in case you're bored or whatever and somehow think PHP is going to "ZOMG ITS A TROJANZ IT HAXx0R3D MY COMPUTARZz!!!1111ONE!!ELEVEN!!"
Here's the source for the script itself:

Code:
<title>Pickups</title>
<title>Pickups</title>
<?php
/*
Created By: IGotArrows 
On: 1/19/08
Version: 1.0
Credits: The Rev6 AGBot Team for the original raw data file for the items list which the item names were parsed out of for the equipment portion of this script.
*/
if($_GET[submit] == 'Save' && $_GET[dir] <> ''){ #checking for valid form and non-empty
	$fp = fopen('pickups.ini','w');
	fwrite($fp,$_GET[dir]);	
	fclose($fp);
}
if(file_exists('pickups.ini') !== true){ # Checking for ini
	echo '<form method=get action=pickups.php>';
	echo '<b>Type in the complete path to the folder of your console logs.</b><p>';
	echo '<input type=text name=dir><br>';
	echo '<input type=submit name=submit value=Save>';
	echo '</form>';
	die;
}
$fini = file('pickups.ini'); # Read ini for location of logs.
$dir = $fini[0];
# $dir = 'c:\documents and settings\owner\desktop\silkroad\agbot';
$dirhandle = opendir($dir) or die('Unable to open directory.');
echo '<form method=get action=pickups.php>';
echo '<select name=log><option value="">Select File</a>';
while (false !== ($file = readdir($dirhandle))) { # Reading list of log files.
	if (strpos($file, 'LogConsol') !== false){
		# echo "<a href=\"chat.php?log=$dir\\$file\">" . $file . "</a><br>";
		echo "<option value=\"$dir\\$file\">$file</option>";
	}	
}
echo '</select>';
echo '<input type=submit name=submit value="View Log">';
echo '</form>';
?>
<?php
# Generating item hash.
$file = $_GET[log];
$raw = file($file) or die('Unable to open file.');
$itemdata = file('items.txt');
foreach($itemdata as $val){
	$items[trim($val)] = 1;
}
# Separate each "pickup" in to its own category.
foreach($raw as $val){
	if(strpos($val,'Pick up Item :') !== false){
	 	$temp = explode(': ',$val);
	 	$val = trim($temp[2]);
	 	if(array_key_exists(trim($val),$items)){
				$myitems[] = $val;
		}
	 	elseif(preg_match("/Gold /",$val)){
			$gold[] = $val;
		}
		elseif(preg_match("/HP Recovery /",$val)){
			$pots[] = $val;
		}
		elseif(preg_match("/Intensifing Elixir/",$val)){
			$elixers[] = $val;
		}
		elseif(preg_match("/Jade tablet of /",$val)){
			$tabs[] = $val;
		}
		elseif(preg_match("/MP Recovery /",$val)){
			$pots[] = $val;
		}
		elseif(preg_match("/Ruby tablet of /",$val)){
			$tabs[] = $val;
		}
		elseif(preg_match("/Vigor Recovery /",$val)){
			$pots[] = $val;
		}
		elseif(preg_match("/Universal Pill /",$val)){
			$pots[] = $val;
		}
		else{
			$misc[] = $val;
		}
		$full[] = $val;
	}
}
# Sorting and creating hash tables for categories. 
natcasesort($gold);
natcasesort($pots);
natcasesort($elixers);
natcasesort($tabs);
natcasesort($misc);
natcasesort($myitems);
$uniquegold = array_unique($gold);
$uniquepots = array_unique($pots);
$uniqueelixers = array_unique($elixers);
$uniquetabs = array_unique($tabs);
$uniquemyitems = array_unique($myitems);
$uniquemisc = array_unique($misc);
/* OUTPUT FUNCTIONS BELOW THIS */
# GOLD
$tdcount = 0;
foreach($gold as $val){
	$uniquegold[$val] = ++$uniquegold[$val];
}
echo '<table  width=100% border=1><tr><caption>Gold</caption></tr><tr>';
foreach($uniquegold as $key => $val){
 	if (is_numeric($key) === false){
 	 	if($tdcount < 3){
			echo "<td><b>$key: </b>$val</td>";
			++$tdcount;
		}
		else{
			echo "</tr><tr><td><b>$key: </b>$val</td>";
			$tdcount = 1;
		}
	}
}
echo '</tr></table><p>';
# EQUIPMENT
$tdcount = 0;
foreach($myitems as $val){
	$uniquemyitems[$val] = ++$uniquemyitems[$val];
}
echo '<table  width=100% border=1><tr><caption>Equipment</caption></tr><tr>';
foreach($uniquemyitems as $key => $val){
 	if (is_numeric($key) === false){
 	 	if($tdcount < 3){
			echo "<td><b>$key: </b>$val</td>";
			++$tdcount;
		}
		else{
			echo "</tr><tr><td><b>$key: </b>$val</td>";
			$tdcount = 1;
		}
	}
}
echo '</tr></table><p>';
# POTS
$tdcount = 0;
foreach($pots as $val){
	$uniquepots[$val] = ++$uniquepots[$val];
}
echo '<table width=100% border=1><tr><caption>Pots</caption></tr><tr>';
foreach($uniquepots as $key => $val){
 	if (is_numeric($key) === false){
 	 	if($tdcount < 3){
			echo "<td><b>$key: </b>$val</td>";
			++$tdcount;
		}
		else{
			echo "</tr><tr><td><b>$key: </b>$val</td>";
			$tdcount = 1;
		}
	}
}
echo '</tr></table><p>';
# Elixers
$tdcount = 0;
foreach($elixers as $val){
	$uniqueelixers[$val] = ++$uniqueelixers[$val];
}
echo '<table width=100% border=1><tr><caption>Elixers</caption></tr><tr>';
foreach($uniqueelixers as $key => $val){
 	if (is_numeric($key) === false){
 	 	if($tdcount < 3){
			echo "<td><b>$key: </b>$val</td>";
			++$tdcount;
		}
		else{
			echo "</tr><tr><td><b>$key: </b>$val</td>";
			$tdcount = 1;
		}
	}
}
echo '</tr></table><p>';
# TABS
$tdcount = 0;
foreach($tabs as $val){
	$uniquetabs[$val] = ++$uniquetabs[$val];
}
echo '<table width=100% border=1><tr><caption>Tabs</caption></tr><tr>';
foreach($uniquetabs as $key => $val){
 	if (is_numeric($key) === false){
 	 	if($tdcount < 3){
			echo "<td><b>$key: </b>$val</td>";
			++$tdcount;
		}
		else{
			echo "</tr><tr><td><b>$key: </b>$val</td>";
			$tdcount = 1;
		}
	}
}
echo '</tr></table><p>';
# MISC
$tdcount = 0;
foreach($misc as $val){
	$uniquemisc[$val] = ++$uniquemisc[$val];
}
echo '<table width=100% border=1><tr><caption>Ingredients/Items</caption></tr><tr>';
foreach($uniquemisc as $key => $val){
 	if (is_numeric($key) === false){
 	 	if($tdcount < 3){
			echo "<td><b>$key: </b>$val</td>";
			++$tdcount;
		}
		else{
			echo "</tr><tr><td><b>$key: </b>$val</td>";
			$tdcount = 1;
		}
	}
}
echo '</tr></table><p>';
?>
kodosai is offline  
Thanks
1 User
Old 01/20/2009, 11:36   #2
 
elite*gold: 0
Join Date: Dec 2007
Posts: 46
Received Thanks: 2
Thnx but this tool isn't for me (

i don't know php
necro_3 is offline  
Old 01/20/2009, 14:16   #3
 
elite*gold: 0
Join Date: Jun 2008
Posts: 188
Received Thanks: 106
You could atleast add some CSS style to the tables ;p
maxbot is offline  
Old 01/20/2009, 15:29   #4
 
elite*gold: 0
Join Date: Nov 2007
Posts: 158
Received Thanks: 21
**** I would like to see something like this for sbot when it's clientless
wopa is offline  
Old 01/20/2009, 17:09   #5
 
elite*gold: 0
Join Date: Oct 2007
Posts: 12
Received Thanks: 3
Quote:
You could atleast add some CSS style to the tables ;p
I provide the scripting, if someone wants "pretty", they're more than welcome to make it the way they want it to look. I only care about the data honestly. If I wanted a pretty internet, I'd use AOL and be a friendwhxre on myspace.

Quote:
Originally Posted by wopa View Post
**** I would like to see something like this for sbot when it's clientless
If it has logfiles, pm me a link to the logfiles that you want parsed and I'll see what I can whip up for you.
kodosai is offline  
Old 01/20/2009, 17:14   #6
 
theoneofgod's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 3,940
Received Thanks: 2,212
Quote:
Originally Posted by kodosai View Post
If it has logfiles, pm me a link and I'll see what I can whip up for you.
there are no logs....
theoneofgod is offline  
Old 01/20/2009, 17:30   #7
 
elite*gold: 0
Join Date: Oct 2007
Posts: 12
Received Thanks: 3
Quote:
Originally Posted by theoneofgod View Post
there are no logs....
A program with no logging? WTH? I somewhere remember reading that sbot has output at some point because it switches from verbose to minimal output depending on whether it's clientless or not. Perhaps the data is not as detailed as AG's though, still I would like to see it at least match up (maybe not logging every attack string as that would be good usually only for debugging. S'why I like free and opensource stuff, typically they *want* you to know what's going on, as opposed to commercially available products.
kodosai is offline  
Old 01/21/2009, 11:17   #8
 
elite*gold: 0
Join Date: Aug 2005
Posts: 28
Received Thanks: 0
well i ran this on my site as well . and now what it asked me to type the console maybe u could tell me or show us demonstration on what server are u running it on.

btw what ami suppose to put ont he pickups.ini on the webserver.
dj30324 is offline  
Old 01/23/2009, 21:39   #9
 
elite*gold: 0
Join Date: Oct 2007
Posts: 12
Received Thanks: 3
Quote:
Originally Posted by dj30324 View Post
well i ran this on my site as well . and now what it asked me to type the console maybe u could tell me or show us demonstration on what server are u running it on.

btw what ami suppose to put ont he pickups.ini on the webserver.
The pickups.ini is automatically created if it's not there. You chose not to read what the script asked of you when you first ran it.

It specifically states: "Type in the complete path to the folder of your console logs." You chose to enter "agbot" as the full path, which is not correct.

Your full path is always going to start with a drive letter, and go from there.

For example: Say I put a folder called agbot in my silkroad folder (default install), then the full path to the log files would be c:\Program Files\Silkroad\agbot
kodosai is offline  
Old 01/24/2009, 13:14   #10
 
SpInKsTaR's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 125
Received Thanks: 165
There is logging in Sbot but it does not get output to a file
It wouldnt be hard to grab that data and output it with an external app tho

SpInKsTaR is offline  
Reply


Similar Threads Similar Threads
[Release]Homepage Script
08/01/2010 - Metin2 PServer Designs, Websites & Scripts - 33 Replies
Hallo, Ich habe mal ein Homepage Skript gemacht. Das Design ist von Runky2 hier nochmal den Link http://www.elitepvpers.com/forum/metin2-pserver-gui des-strategies/430231-release-homepage-design.html . Ich habe jegendlich die Tools gemacht! Aktuelle Version: 1.0v Inhalt der Version 1.0: -Registrieren
[Release] PSC Database Script
02/27/2010 - Metin2 PServer Guides & Strategies - 56 Replies
Hallo, ich hatte langeweile und hab euch mal ein Paysafecard-Script geschrieben, das die Accountid und die Paysafecard-Nummer in der Database speichert ;) Es ist nichts besonderes aber könnte anderen helfen. Anleitung: Die config.php in dem Ordner 'inc' anpassen. Die install.php im Ordner 'install' über xampp/webspace oder sonstiges ausführen (Xampp: http://localhost/install/install.php) Danach könnt ihr das Script benutzen ;) MFG P.S. Datei im Anhang!
[Release][GC PH] Script and Char script
10/22/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 27 Replies
Here's the Script and Char_script with yellow lines hope it helped paki crch2 na lang po kasi na delete ko ung crch2 ko if any problems paki post na lang agad Credits to :handsdown::handsdown:Brian~ and Craymel:handsdown::handsdown: Btw... pang range po yan pede rin ung jump attack(Down) ng Dk,ragna bolt,block attack ng Ak,jump attack ng lass ung iba ko pang d nsabi paki banggit na rin
[Release] 1000x 115 Map Vac Script.
12/08/2008 - Dekaron Private Server - 22 Replies
Hello all here is Vac for 115 Map works for me good. First use Dekaronwztz Client. then Open ur Data.pak by Winhex go to Offset 43c463f0 press alt+1 go offset 43ca69d0 press alt+2(Thanks For MasterShouter) and Drag there Vac Script then Winhex will Freeze couple Min after it done Close ur Winhex and go into the game. Enjoy Vaccing at 115 map ^^ Thanks me if i helped ^^
[release] script only
12/27/2007 - General Gaming Discussion - 0 Replies
this hack is very glitchy. useless hack or not...i dont know this is -1hit Ko -Power User -Sudden Death what it does (dont need to be master)



All times are GMT +1. The time now is 04:24.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.