Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 09.06.2006, 19:44   #1
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default [SHARE] L2J -> OFF converters pack

Converters pack 1.1 released.
--------
Version 1.1:
added droplist converter (create off-like droplist for each mob, you need install a db 'itemname' to database (setted up to $dbname), you may download db 'itemname' from https://postpacific.loc-online.com/f...pic.php?t=4992 (Thanks for Firedaemon).
fixed $step bug on all scripts (thanks for Bruenor).
fixed set_time_limit(30) to set_time_limit(0) and small mistakes on all scripts (thanks for RipperX)
--------
Version 1.0:
fixed npcpos converter (Gets npc names from npc table l2jdb, autogenerate territory for each mob, autodeletion empty territorries).
added petdata converter.
added skillacquire converter (Gets class_ids from class_list table l2jdb, smart placing learn spellbooks by using skill_spellbooks table checking, also create itemdata for spellbooks).

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
l2j_to_off_converters_pack_1.1_217.zip — 9314 байт
drops_112.zip — 95727 байт
hel is offline  
Old 09.06.2006, 20:28   #2
SImon
Архивный участник
 
Join Date: Apr 2006
Posts: 100
Default

Пасиб.Глянем
SImon is offline  
Old 09.06.2006, 20:35   #3
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Oh, my mistake:
In skillacquire.php change it:
$sbname="[sb_".$skillname."];1";
To:
$sbname="{[sb_".$skillname."];1}";
hel is offline  
Old 09.06.2006, 23:00   #4
NN4e
Архивный участник
 
Join Date: Feb 2006
Posts: 207
Default

Nice tools
check PM
NN4e is offline  
Old 10.06.2006, 05:11   #5
nick0179
Архивный участник
 
Join Date: Mar 2006
Posts: 57
Default

hmm.....how can i use this tool?
anyway thanx for sharing......hel~
nick0179 is offline  
Old 10.06.2006, 05:47   #6
Validator
Архивный участник
 
Join Date: Dec 2005
Posts: 88
Default

share last j server for this
Validator is offline  
Old 10.06.2006, 05:54   #7
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

tip to hel:

[php:1:3db66e0707]<? set_time_limit(0); ?>[/php:1:3db66e0707] =)

Edit: Add RaidBoss Spawn =)
RipperX is offline  
Old 10.06.2006, 06:03   #8
NN4e
Архивный участник
 
Join Date: Feb 2006
Posts: 207
Default

Quote:
Originally Posted by Validator
share last j server for this
Why your cant download last datapack yourself?
h..p://l2jdp.com/nightly/
NN4e is offline  
Old 10.06.2006, 06:27   #9
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

RipperX:
Thanks for tip, I was searched this string by hour in the php manual (www.superbest.ru) and finded nothing.
I'll add it in the next version of my pack.
---
Why peoples isn't report, works it, or not?
It's just not interesting. :P
hel is offline  
Old 10.06.2006, 06:50   #10
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

Quote:
Originally Posted by hel
RipperX:
Thanks for tip, I was searched this string by hour in the php manual (www.superbest.ru) and finded nothing.
I'll add it in the next version of my pack.
---
Why peoples isn't report, works it, or not?
It's just not interesting. :P
In respawn section add "sec".

For example:

[php:1:bb0c09070c]
.$row["respawn_delay"]."sec npc_end\r\nnpcmaker_end\r\n");} [/php:1:bb0c09070c]

and This not work, I get an error.

Code:
06/10/2006 03:47:xx.xx1, -_- goblin  (2621952)
i don't know what is it.
RipperX is offline  
Old 10.06.2006, 07:28   #11
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Sec mistake solved. Thanks.
I don't have any idea about "goblin error".
You have switched txt to unicode?
hel is offline  
Old 10.06.2006, 07:32   #12
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

Quote:
Originally Posted by hel
Sec mistake solved. Thanks.
I don't have any idea about "goblin error".
You have switched txt to unicode?
yeah, i think maybe it's a ram problem. but this load 120 npcs and crash.
RipperX is offline  
Old 10.06.2006, 17:59   #13
katso
Архивный участник
 
Join Date: Mar 2006
Posts: 70
Default

I have a problem with this pack, with previous run without problems, but to this when I press “next” so that it makes the conversion, nothing happens. From already thanks, Hel.

<spanish>Tengo un problema con este pack, con el anterior lo corria sin problemas, pero con este cuando presiono "next" para que realice la conversion, no sucede nada. Desde ya gracias Hel.</spa>
katso is offline  
Old 10.06.2006, 18:07   #14
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

katso:
As Bruenor says:
Quote:
Originally Posted by Bruenor
You need to insert the following text after "include('config.php');" in npcpos.php (skillacquire.php and petdata.php):
Code:
if(isset($HTTP_GET_VARS['step']))
   $step = intval($HTTP_GET_VARS['step']);
else
   $step = 0;

if(isset($HTTP_GET_VARS['page']))
   $page = intval($HTTP_GET_VARS['page']);
else
   $page = 1;
Also, you should make sure your permissions are set such that the directory is writable by your web server.
hel is offline  
Old 11.06.2006, 00:45   #15
katso
Архивный участник
 
Join Date: Mar 2006
Posts: 70
Default

very thx, hel.
katso is offline  
Old 11.06.2006, 06:01   #16
javas
Архивный участник
 
Join Date: Jun 2006
Posts: 17
Default

Nice share !
javas is offline  
Old 11.06.2006, 22:42   #17
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

First post updated, new pack released.
Added new converter, fixed older.
Let's test it and report here.
Also C4 drops.txt, converted by droplist converter 1.0 added to first post.
hel is offline  
Old 12.06.2006, 07:49   #18
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Half day with no comments and only 3 downloads?
I may stop the project, if no one is interested. -_-
hel is offline  
Old 12.06.2006, 09:59   #19
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

I think the project is a good idea. I personally don't feel I want to convert L2J data at the moment, but it doesn't mean it's a bad project.
mcrabben7 is offline  
Old 12.06.2006, 21:42   #20
Bruenor
Архивный участник
 
Join Date: Jun 2006
Posts: 14
Default

I found another bug. Where the website says "you need install a db 'itemname' to database (setted up to $dbname)", I'm not sure whether you meant to display '$dbname' or the name of the database.
In the first case, insert a \ before the $ to prevent it from being treated as a variable name.
In the second case, insert include("config.php"); before the echo statement. (Although it is already included in the PAGE_DEFAULT function, it isn't visible elsewhere. I tried moving the include statement to the top of the file, but then it wasn't visible inside PAGE_DEFAULT, so apparently you have to put it in both places.)

I also found some more problems related to the fix I posted earlier:
1) Variables do not get assigned a default value when they are first referenced. If you have not previously assigned a value to a variable, trying to get its value results in an error.
2) Sending parameters in the URL does not assign the specified values to your variables. For example, the URL "http://mysite.com/index.php?MyVar=4" does NOT set $MyVar to 4. To get the parameter, use $HTTP_GET_VARS['MyVar'], as demonstrated in my previous post.

You moved the code for setting the variables into PAGE_DEFAULT but then called the function after the value of $page is checked. I think the best way to resolve this is to just move
Code:
if(isset($HTTP_GET_VARS['step'])) $step=intval($HTTP_GET_VARS['step']); else $step=0;
if(isset($HTTP_GET_VARS['page'])) $page=intval($HTTP_GET_VARS['page']); else $page=0;
out of PAGE_DEFAULT and put it before "if($page==0)". (This applies to petdata.php, droplist.php, npcpos.php, and skillacquire.php.)

Here are some more fixes:
skillacquire.php line 72
Code:
if(isset($skill_book_id[$sid]) and $skill_book_id[$sid]==$sid) {
skillacquire.php before line 54
Code:
$num=0; $cid2=0; $classname_end="";
droplist.php line 65
Code:
$spoil_chance=$drops_row["chance"]/10000;
npcpos.php line 44
Code:
if($step=="2") $query="SELECT * FROM spawnlist ORDER BY npc_templateid LIMIT 20001,1000000000";
Bruenor is offline  
Old 12.06.2006, 22:21   #21
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

Tip: Add a multiplier to make drops with rates :]
RipperX is offline  
Old 13.06.2006, 10:20   #22
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

tyvm hel for this tools
madar is offline  
Old 16.06.2006, 17:55   #23
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Bruenor:
1. "$dbname" not interpretted as variable. (only if I set it like " ".$dbname." ")
2. I don't understand, what you mean about moving include('config.php');.

1. You mean, I must set default values for variables?
2. Thanks, I see. :P

1.
Quote:
if(isset($skill_book_id[$sid]) and $skill_book_id[$sid]==$sid)
For what? Is this a checking for empty results?
2.
Quote:
$num=0; $cid2=0; $classname_end="";
Understand, thanks.
3.
Quote:
$spoil_chance=$drops_row["chance"]/10000;
Oops, my mistake.
4.
Quote:
if($step=="2") $query="SELECT * FROM spawnlist ORDER BY npc_templateid LIMIT 20001,1000000000";
I think better is setting up 2001,-1. For infinite.

Very big thanks in advance. You're help me a lot.
Waiting for your reply. :P

2All
I'm noob in php. So don't wait bigger, than I know. :P
Pack1.1 reuploaded!
hel is offline  
Old 16.06.2006, 20:01   #24
Bruenor
Архивный участник
 
Join Date: Jun 2006
Posts: 14
Default

All of the corrections that I posted were fixes to error messages that I got.


Quote:
Originally Posted by hel
"$dbname" not interpretted as variable. (only if I set it like " ".$dbname." ")
This confuses me. The dollar sign forces php to treat the word following it as a variable, so I don't understand how it's being interpreted as text for you.


Quote:
Originally Posted by hel
I don't understand, what you mean about moving include('config.php');.
I was just talking about things I tried doing so that only one "include ('config.php');" would have to appear in the file. The text within the parentheses there wasn't very important.


Quote:
Originally Posted by hel
You mean, I must set default values for variables?
That is correct. It's the reason for most of the corrections that I posted. I'm not sure if the php interpreter you use automatically initializes variables to 0 or "", but mine doesn't, and I'm sure it's the same for other people.


Quote:
Originally Posted by hel
For what? Is this a checking for empty results?
I was getting an error message each time php came across a $skill_book_id[$sid] that wasn't initialized. Checking to see if has been initialized prevents the error message. (Operators in php use short-circuit evaluation. If isset($skill_book_id[$sid]) is false, then $skill_book_id[$sid]==$sid never gets evaluated.)


Quote:
Originally Posted by hel
I think better is setting up 2001,-1. For infinite.
That doesn't work for me. The php interpreter I use does not treat -1 as infinite, so it gives an error message because the second number is smaller than the first.


Maybe the problem is just that I'm using an old version of php, but it's better to program things for the greatest compatibility. :wink:
Bruenor is offline  
Old 16.06.2006, 20:34   #25
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

I use PHP 4.3.8 + Zend Engine v1.3.0.

I see...
Thanks for replies. I'll fix this things, when I can do it.
hel 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 16:15.