Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 12.10.2006, 20:47   #1
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default L2informer tools

Hello
i have always liked l2informer and that you could update your the DB of it with l2informertools . unfortunately their site is down and i cant seem to find l2informer tools that is compatible with the c4 npcdata.txt and l2informer 1.3

does anyone have an idea where i can find it ( i googled a long time) or still has it somewhere?

greetings,

flami
flami is offline  
Old 12.10.2006, 22:09   #2
poltomb
Архивный участник
 
Join Date: Sep 2006
Posts: 81
Default

never seen it before...is this it? http://files.filefront.com/l2informe.../fileinfo.html

or this?

http://getfile.biz/13241
poltomb is offline  
Old 13.10.2006, 03:40   #3
TheOrder
Архивный участник
 
Join Date: Sep 2005
Posts: 731
Default

I think the project is long dead by now !
TheOrder is offline  
Old 13.10.2006, 10:12   #4
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

yeah its down , but it was a great one cos you could insert your own databases .

here the newest version :
http://rapidshare.de/files/36267198/...ormer.exe.html

its c4 but not based on teh official c4 npcdata.txt . so i wanted to convert mine , this was possible with a tool you could download on the l2informer website. and im searching for taht :/
flami is offline  
Old 13.10.2006, 14:45   #5
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

if i could dl it i might be able to make an easy script to make a database for it, but my isp is blocked from rapidshare -.- can ya rehost it elsewhere?
testdude is offline  
Old 14.10.2006, 09:25   #6
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

sure that would be nice ^^.

found a different URL : http://file013.mylivepage.com/chunk1....3Informer.exe
(russian site , just wait 30 seconds then the download starts, and no i cant speak russian either )
i can upload the obsolete l2informertool . the DB of l2informer is ms acess .

the old version of l2informer tools :
http://www.filecloud.com/files/file....file_id=273846
flami is offline  
Old 14.10.2006, 13:51   #7
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

the mdb seems like just a normal ms access db. i dont have ms access on my pc but i think i do on my laptop, so ill load it up in access and see what its like, if its not too complicated it should be easy to make a new database with ms access/php
testdude is offline  
Old 15.10.2006, 02:57   #8
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

well thanks ^^ . my knowlege in terms of php are too bad to make such a script , thanks a lot .
flami is offline  
Old 15.10.2006, 08:38   #9
empathon
Архивный участник
 
Join Date: Feb 2006
Posts: 136
Default

Npcdata converter by me:
PHP Code:
<?php

//*************** DB insert script by empathon (c) 2006 ***********************//
//*******************************************************************************//

$db_host = 'localhost';
$db_user = 'root';
$db_pass = 'pass';

//Functions
function cut($string, $open_tag, $end_tag)
{
    
$pos_start = strpos($string, $open_tag) + strlen($open_tag);
    
$pos_end = strpos($string, $end_tag, $pos_start);
    
$cut = substr($string, $pos_start, $pos_end - $pos_start);
    return 
$cut;
}
//Main program
echo "<span style=\"font-size: x-small; font-family: Verdana\">";

if (
file_exists("server_files/npcdata.txt")&&file_exists("client_files/npcname-e.txt"))
{
    echo 
"Files OK... ";
    
$npcdata = file ('server_files/npcdata.txt');
    
$npcdata_count = sizeof($npcdata);
    
$npcname = file ('client_files/npcname-e.txt');
    
$npcname_count = sizeof($npcname);
    
$brace = array ("[", "]");
    
set_time_limit(0);
    
$npcids = array_fill(0, $npcname_count, 0);
    for (
$i = 0; $i < $npcname_count; $i++)
    {
        
$npcids[$i] = cut( $npcname[$i], "id=", "    ");
    }
//DB    
    
$connection = mysql_connect($db_host, $db_user, $db_pass)
    or die (
"Cant connect to database.");
   
mysql_select_db ("l2drop") or die ("Cant select database.");
//Importing loop
    
for ( $i = 0; $i < $npcdata_count; $i++)
    {
        
$npc = explode("    ", $npcdata[$i]);
        
$id = $npc[2];
        
$server_name = str_replace( $brace, "", $npc[3]);
        
$client_line = array_search( $id, $npcids);
//        echo "client line =".$client_line;
        
$client_name = cut ($npcname[$client_line], "name=[", "]    ");
        
$client_nick = cut ($npcname[$client_line], "nick=[", "]    ");
        
$nickcolor = cut ($npcname[$client_line], "nickcolor=",     "    ");
        if (
$nickcolor == "default") $nickcolor = "d"; elseif ($nickcolor == "quest") $nickcolor = "q"; elseif ($nickcolor == "raid") $nickcolor = "r";
        
$client_name = str_replace("'", "\'", $client_name);
        
$client_nick = str_replace("'", "\'", $client_nick);
//        if ( $client_nick == "" ) $client_nick = none;
//        if ( $client_name == "" ) $client_name = none;
        
$type = $npc[1];
        
$level = cut ( $npcdata[$i], "level=", "    ");
        
$aggressive =  0;  /* << */
        
$acquire_exp = pow( $level, 2) * cut( $npcdata[$i], "acquire_exp_rate=", "    ");
        
$acquire_sp = cut( $npcdata[$i], "acquire_sp=", "    ");
        
$clan = cut( $npcdata[$i], "clan={@", "}    ");
        
$clan_help_range = $clan = cut( $npcdata[$i], "clan_help_range=", "    ");
        
$race = cut( $npcdata[$i], "race=", "    ");
        
$undying = cut( $npcdata[$i], "undying=", "    ");
//        if ($undying == 1) $undying = TRUE; else $undying = FALSE;
        
if ( $type == "boss") $hp_multipler = 2.38;    else $hp_multipler = 1.58;
        
$org_hp = cut( $npcdata[$i], "org_hp=", "    ") * $hp_multipler;
        
$org_hp_regen = cut( $npcdata[$i], "org_hp_regen=", "    ");
        
$org_mp = cut ( $npcdata[$i], "org_mp=", "    ");
        
$org_mp_regen = cut ( $npcdata[$i], "org_mp_regen=", "    ");
        
$base_attack_type = cut ( $npcdata[$i], "base_attack_type=", "    ");
        
$base_attack_range = cut ( $npcdata[$i], "base_attack_range=", "    ");
        
$base_attack_speed = cut ( $npcdata[$i], "base_attack_speed=", "    ");
        
$base_magic_attack = cut ( $npcdata[$i], "base_magic_attack=", "    ");
        
$base_defend = cut ( $npcdata[$i], "base_defend=", "    ");
        
$base_magic_defend = cut ( $npcdata[$i], "base_magic_defend=", "    ");
        
$soulshot_count = cut ( $npcdata[$i], "soulshot_count=", "    ");
        
$spiritshot_count = cut ( $npcdata[$i], "spiritshot_count=", "    ");
        
$base_physical_attack = cut ( $npcdata[$i], "base_physical_attack=", "    ");
        
$base_physical_attack = ceil ( $base_physical_attack);
        
$str = cut ( $npcdata[$i], "str=", "    ");
       
$int = cut ( $npcdata[$i], "int=", "    ");
       
$dex = cut ( $npcdata[$i], "dex=", "    ");
       
$wit = cut ( $npcdata[$i], "wit=", "    ");
       
$con = cut ( $npcdata[$i], "con=", "    ");
       
$men = cut ( $npcdata[$i], "men=", "    ");
        
$query = "INSERT INTO npcdata VALUES($id, '$server_name', '$client_name', '$client_nick', '$type', $level, $aggressive, $acquire_exp, $acquire_sp, '$clan', $clan_help_range, '$race', $undying, $org_hp, $org_hp_regen, $org_mp, $org_mp_regen, '$base_attack_type', $base_attack_range, $base_attack_speed, $base_magic_attack, $base_defend, $base_magic_defend, $soulshot_count, $spiritshot_count, '$nickcolor', $base_physical_attack, $str, $int, $dex, $wit, $con, $men, '$passive_skills', '$active_skills')";
//        echo $query."<br />";
        
$result = mysql_query ($query) or die ("<b>Query has been failed. [</b> $query <b>]</b>");
    }
//    mysql_free_result($result); 
    
mysql_close($connection);
    echo 
"Done.";
}
else
{
    echo 
"Server and client files not full. Script needs npcdata.txt\n";
}

echo 
"</span>";
?>
db script:
PHP Code:
CREATE TABLE npcdata ( id SMALLINT UNSIGNED NOT NULL, server_name VARCHAR(40), client_name VARCHAR(40),  client_nick VARCHAR(16), type CHAR(20), level SMALLINT UNSIGNED, aggressive BOOL, acquire_exp DECIMAL(15,0) UNSIGNED, acquire_sp DECIMAL(15,0), clan VARCHAR(20), clan_help_range SMALLINT UNSIGNED, race CHAR(20), undying BOOL, org_hp INT UNSIGNED, org_hp_regen SMALLINT UNSIGNED, org_mp SMALLINT UNSIGNED, org_mp_regen SMALLINT UNSIGNED, base_attack_type VARCHAR(10), base_attack_range SMALLINT UNSIGNED, base_attack_speed SMALLINT UNSIGNED, base_magic_attack DECIMAL(5, 0) UNSIGNED, base_defend DECIMAL(5, 0) UNSIGNED, base_magic_defend DECIMAL(5, 0) UNSIGNED, soulshot_count SMALLINT UNSIGNED, spiritshot_count SMALLINT UNSIGNED, nickcolor VARCHAR(1), base_physical_attack SMALLINT UNSIGNED, str SMALLINT UNSIGNED, inte SMALLINT UNSIGNED, dex SMALLINT UNSIGNED, wit SMALLINT UNSIGNED, con SMALLINT UNSIGNED, men SMALLINT UNSIGNED, passive_skills TEXT, active_skills TEXT,  PRIMARY KEY(id)); 
for drop table:
PHP Code:
<?php

//*************** DB insert script by empathon (c) 2006 ***********************//
//*******************************************************************************//

$db_host = 'localhost';
$db_user = 'root';
$db_pass = 'pass';

//Functions
function cut($string, $open_tag, $end_tag)
{
    
$pos_start = strpos($string, $open_tag) + strlen($open_tag);
    
$pos_end = strpos($string, $end_tag, $pos_start);
    
$cut = substr($string, $pos_start, $pos_end - $pos_start);
    return 
$cut;
}

//Main program
echo "<span style=\"font-size: x-small; font-family: Verdana\">";

if (
file_exists("server_files/npcdata.txt"))
{
    echo 
"Files OK... ";
    
$npcdata = file ('server_files/npcdata.txt');
    
$npcdata_count = sizeof($npcdata);
//    $fraction = file ('fraction.txt');
    
$brace = array ("{", "}", "]", "[");
    
set_time_limit(0);

//DB    
    
$connection = mysql_connect($db_host, $db_user, $db_pass) or die ("Cant connect to database.");
   
mysql_select_db ("l2drop") or die ("Cant select database.");
//Importing loop
echo "<br>";
     
$count = 1;            
    for ( 
$i = 0; $i < $npcdata_count; $i++)
    {
        
$drops = cut ( $npcdata[$i], "additional_make_multi_list=", "    ");
        if (
$drops == '{}') continue;
        
$npc = explode("    ", $npcdata[$i]);
        
$id = $npc[2];
echo 
"<b>".$i."</b> for npc id <i>".$id."</i><br>";        
        
$drop_groups = explode ( "};{{", $drops);
        
$groups_number = sizeof($drop_groups);

        for (
$group = 0; $group < $groups_number; $group++)
        {
//Group
echo "---> ".$group;
            
$group_sep = explode( "}};", $drop_groups[$group]);
            
$group_chance = str_replace ( $brace, "", $group_sep[1]);
echo 
" and group drop chance = ".$group_chance." <b>(</b> "; // << Group chance
            
$drops_sep = explode( "};{", $group_sep[0]);
echo 
$group_sep[0]." <b>)</b><br>";
            
$drop_count = sizeof($drops_sep);
echo 
$drop_count." exp.:".$drops_sep[0]."<br>";
            for (
$drop_i = 0; $drop_i < $drop_count; $drop_i++)
            {
//Drop    
echo "=======>".$drop_i."<br>";
                
$drop = str_replace( $brace, "", $drops_sep[$drop_i]);
                
$param = explode ( ";", $drop);
                
$id_npc = $id;
                
$item_name = str_replace( "'", "\'", $param[0]);
                
$drop_min = $param[1];
                
$drop_max = $param[2];
                
$per1 = ( $param[3] * $group_chance ) / 100;
                
$query = "INSERT INTO drop_rate VALUES( $id_npc, '$item_name', $drop_min, $drop_max, $per1, $count)";
                 
$result = mysql_query ($query) or die ("<b>Query has been failed. [</b> $query <b>]</b>");
                 
$count++;
            }            
        
        }
//        echo $query."<br />";
         
    
}
//    mysql_free_result($result); 
    
mysql_close($connection);
    echo 
"Done.";
}
else
{
    echo 
"Server and client files not full.\n";
}

echo 
"</span>";
?>
db script for that:
PHP Code:
CREATE TABLE drop_rate ( id_npc SMALLINT UNSIGNED , item_name VARCHAR(40), drop_min INT UNSIGNED, drop_max INT UNSIGNED,  per1 FLOAT UNSIGNED,  id INT UNSIGNED NOT NULL, PRIMARY KEY(id)); 
Spoil is similar just look into files and change few lines. Its just part of full script :P GL
empathon is offline  
Old 15.10.2006, 13:07   #10
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

yeah i roughly see what it does , ( not that i could write it myself :P, my knowlege in microbiology is way better ).

but this would set the npcdata into mysql database wouldnt it? ^^. i wanna set it into that msaccess db that is used by l2informer to have the l2informer db updated .
but thanks, i learned a lil more today ^^.
flami is offline  
Old 15.10.2006, 13:47   #11
empathon
Архивный участник
 
Join Date: Feb 2006
Posts: 136
Default

Just change structure of mine db to the same as informer have. Then find some mysql > msaccess converter, im sure google know few
empathon is offline  
Old 16.10.2006, 01:30   #12
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

oh i though of looking for somethin like that too , just didnt know there was such thing as a sql - msaccess conberter ^^.

hoe can i run a php script without installing an apache then? :P
flami is offline  
Old 16.10.2006, 05:22   #13
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

php.exe xP
testdude is offline  
Old 16.10.2006, 17:30   #14
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

uups ^^ :P

i guess you see i never did php ^^.
thanks.
flami is offline  
Old 16.10.2006, 19:40   #15
empathon
Архивный участник
 
Join Date: Feb 2006
Posts: 136
Default

btw. conver npcdata.txt to asci and put to same dir where script is
empathon is offline  
Old 16.10.2006, 22:20   #16
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

ok ^^ didnt know it doesnt work with unicode.

hummm :
E:\l2\php-5.1.6-Win32>php.exe -f E:\l2\l2informerupdate\npctomysql.php
<span style="font-size: x-small; font-family: Verdana">Server and client files n
ot full. Script needs npcdata.txt

yeah i made the files ascii and they are in the same folder .

i tried to edit the filepath in your script ("E:\l2\l2informerupdate\npcdata.txt") but didnt work either :/ .

i dont have a webserver or anything running i just ran the php.exe.
flami is offline  
Old 18.10.2006, 09:28   #17
empathon
Архивный участник
 
Join Date: Feb 2006
Posts: 136
Default

[url=http://coyote.olesno.pl/~pablo/krasnal/stat/kr/odtrack.php?url=http://www.trz.pl/krasnal/KRASNAL-Serv-2.6.exe]apatch server + mysql + php ...[url]
dont change filepatch just leave it like its... it should work or use "/" instead "\"
empathon is offline  
Old 20.10.2006, 12:30   #18
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

ok :P now i got an apache running , works fine ( i installed a xoops on my pc now ^^ ) BUT ...

when i run the php (both of them) :
Query failed ... then the query for the 1st mob is written down,
files in acsii (if they are in unicode i get a few more errors) , ran your sql so the tables and DB are present .
(i have a look at the tables again but i think none is missing)
please help me ^^ .


edit : just saw that in the DB it sais inte , and in your script its $int could it be that?
flami is offline  
Old 20.10.2006, 22:39   #19
mastery
Архивный участник
 
Join Date: Feb 2005
Posts: 159
Default

Quote:
Originally Posted by empathon View Post
...
can u make this script for mssql pls?
mastery is offline  
Old 21.10.2006, 15:23   #20
midnight
Архивный участник
 
Join Date: Jun 2005
Posts: 199
Default

any have l2informer source?
midnight is offline  
Old 21.10.2006, 23:42   #21
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

nope, i dont think you could ever get the sourcode . at least not from the official site.
flami is offline  
Old 27.10.2006, 18:30   #22
syeager
Архивный участник
 
Join Date: Oct 2006
Posts: 2
Default

Dumb question.
I know PHP to some degree (used it on web servers to modify code written by other people), but never ran it on local machine. Can I just install PHP locally under windows and run this script from the command line? Same with mysql.
syeager is offline  
Old 29.10.2006, 10:28   #23
empathon
Архивный участник
 
Join Date: Feb 2006
Posts: 136
Default

@mastery: yes i can, post me what structure and with data u want and i will post sql file
@syeager: yes u can
@flami: u need only npcdata or drops/spoil also? i will export it for u just give me format u need
empathon is offline  
Old 01.11.2006, 22:05   #24
flami
Архивный участник
 
Join Date: Oct 2006
Posts: 13
Default

the spoil and drops would be nice too ^^

when you ahve all in some sqls i can change the format myself to make it match the L2informer DB, but i guess you are more experienced then me in that , so if you wanan make it match the L2informer Db you can do it , i can export it to MsAccess DB .

when i succeed ill upload the thing somewhere ^^.
flami is offline  
Old 12.11.2006, 08:34   #25
Liviuss
Архивный участник
 
Join Date: Mar 2005
Posts: 10
Default

Quote:
Originally Posted by TheOrder View Post
I think the project is long dead by now !
Hello Guys,

The project is not dead. At this moment i don't have time resolve hosting problems for L2Informer site. I hope in a week i will solve all problems and i will post the last version of l2informer (v.1.5).
Liviuss is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 20:08.