Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [Share]L2j NPC Converter (https://postpacific.mmorpg-game.online/showthread.php?t=7975)

Guaresnay 05.07.2007 05:50

[Share]L2j NPC Converter
 
The name basicaly says what is it... It generates a npcdata taking values from l2j tables. It won't generate a perfect npcdata, each mob will need some fixes (like npc_ai) but its better than start from nothing.

v0.1 - First Release
v0.1b - Added "@set_time_limit(0);", fixed the "bigblunts", round collision_radius and collision_height to have 1 decimal value, change the "a" flag for the "w" to overwrite old file in second generation.
v0.2 - Script has been optimised a bit (Thanks to hel). Drop/Spoil lists now use l2off itemnames, you will have to install a new table which was added in this version (itemname.sql).
v0.3 - Script optimised much more (Thanks to hel again). You wont need the itemname table anymore.
v0.3b - Fixed a problem with slot_rhand and slot_lhand which apeared in previous version.


P.S. Sorry if there was another tool for that, I searched but didn't find anything.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
L2j_NPC_Converter_v0.3b.rar — 56489 байт

tpuNIsher 05.07.2007 05:59

Any samples?

And where in l2j do u get collision_height/radius & gound_high/low?

Guaresnay 05.07.2007 06:08

Quote:

Originally Posted by tpuNIsher (Post 90574)
Any samples?

And where in l2j do u get collision_height/radius & gound_high/low?

example:
Code:

npc_begin        warrior        23206        [forgotten_victim]        level=80        acquire_exp_rate=8.532656        acquire_sp=2600        unsowing=0        clan={@tomb_clan}        ignore_clan_list={}        clan_help_range=500        slot_chest=[]        slot_rhand=[monster_only_(zombie_laborer_sword)]        slot_lhand=[]        shield_defense_rate=0        shield_defense=0        skill_list={@s_race_undead}        npc_ai={[forgotten_victim];{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}        category={}        race=fairy        sex=male        undying=0        can_be_attacked=1        corpse_time=7        no_sleep_mode=0        agro_range=1000        ground_high={164;0;0}        ground_low={55;0;0}        exp=1788937098        org_hp=115xx.xx0317        org_hp_regen=xx.xx        org_mp=21xx.xx7297        org_mp_regen=3.09        collision_radius={xx.xx;xx.xx}        collision_height={xx.xx;xx.xx}        str=40        int=21        dex=25        wit=20        con=43        men=10        base_attack_type=sword        base_attack_range=80        base_damage_range={0;0;80;120}        base_rand_dam=30        base_physical_attack=9xx.xx5873        base_critical=4        physical_hit_modify=4.75        base_attack_speed=273        base_reuse_delay=0        base_magic_attack=6xx.xx5091        base_defend=6xx.xx381        base_magic_defend=4xx.xx5418        physical_avoid_modify=0        soulshot_count=0        spiritshot_count=0        hit_time_factor=0.45        item_make_list={}        corpse_make_list={{[rp_spiritshot_s];1;1;0.15};{[sealed_majestic_robe_fabric];1;1;2.5};{[stone_of_purity];1;2;5};{[scroll_enchant_armor_(grade_a)];1;1;0.15};{[sealed_leather_armor_of_nightmare_fabric];1;1;2.5}}        additional_make_list={}        additional_make_multi_list={{{{[adena];4566;9322;100}};70};{{{[varnish];1;3;100}};xx.xx66};{{{[coal];1;3;100}};xx.xx11};{{{[cokes];1;1;100}};7.6011};{{{[mithril_arrow];100;300;100}};0.8823};{{{[stone_of_purity];1;1;100}};2.9411};{{{[mold_lubricant];1;1;100}};0.9174};{{{[sealed_shield_of_nightmare_fragment];1;1;100}};0.7352};{{{[sealed_majestic_circlet_design];1;1;100}};0.7246};{{{[sealed_helm_of_nightmare_design];1;1;100}};0.7011};{{{[rp_shining_arrow_(100%)];1;1;100}};0.046};{{{[sealed_helm_of_nightmare];1;1;100}};0.0088};{{{[sealed_shield_of_nightmare];1;1;100}};0.0088};{{{[sealed_majestic_circlet];1;1;100}};0.0088}}        hp_increase=0        mp_increase=0        safe_height=100        npc_end
npc_begin        warrior        23207        [triol's_layperson]        level=81        acquire_exp_rate=xx.xx6351        acquire_sp=3292        unsowing=0        clan={@tomb_clan}        ignore_clan_list={}        clan_help_range=500        slot_chest=[]        slot_rhand=[monster_only_(heretic_private_axe)]        slot_lhand=[monster_only_(heretic_private_axe)]        shield_defense_rate=0        shield_defense=0        skill_list={}        npc_ai={[triol's_layperson];{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}        category={}        race=fairy        sex=male        undying=0        can_be_attacked=1        corpse_time=7        no_sleep_mode=0        agro_range=1000        ground_high={164;0;0}        ground_low={55;0;0}        exp=2099375834        org_hp=146xx.xx619        org_hp_regen=xx.xx        org_mp=32xx.xx2613        org_mp_regen=3.09        collision_radius={xx.xx;xx.xx}        collision_height={xx.xx;xx.xx}        str=40        int=21        dex=30        wit=20        con=43        men=10        base_attack_type=blunt        base_attack_range=80        base_damage_range={0;0;80;120}        base_rand_dam=50        base_physical_attack=8xx.xx5661        base_critical=1        physical_hit_modify=9        base_attack_speed=273        base_reuse_delay=0        base_magic_attack=6xx.xx5655        base_defend=4xx.xx0769        base_magic_defend=4xx.xx0416        physical_avoid_modify=-6        soulshot_count=0        spiritshot_count=0        hit_time_factor=0.45        item_make_list={}        corpse_make_list={{[metal_hardener];1;2;5};{[sealed_shield_of_nightmare_fragment];1;1;2.5};{[rp_blessed_spiritshot_s];1;1;0.15}}        additional_make_list={}        additional_make_multi_list={{{{[chapel_key];1;1;100}};99};{{{[adena];4584;9387;100}};70};{{{[charcoal];1;3;100}};25};{{{[suede];1;3;100}};10};{{{[high_grade_suede];1;3;100}};4};{{{[dark_crystal];1;1;100}};3.3333};{{{[metal_hardener];1;1;100}};1.988};{{{[sealed_shield_of_nightmare_fragment];1;1;100}};0.8547};{{{[sealed_majestic_circlet_design];1;1;100}};0.8322};{{{[mold_hardener];1;1;100}};0.4237};{{{[sealed_shield_of_nightmare];1;1;100}};0.0088};{{{[sealed_majestic_circlet];1;1;100}};0.0088};{{{[sealed_helm_of_nightmare];1;1;100}};0.0088};{{{[scroll_enchant_weapon_(grade_s)];1;1;100}};0.018}}        hp_increase=0        mp_increase=0        safe_height=100        npc_end
npc_begin        warrior        23208        [triol's_believer]        level=82        acquire_exp_rate=8.323171        acquire_sp=2665        unsowing=0        clan={@tomb_clan}        ignore_clan_list={}        clan_help_range=500        slot_chest=[]        slot_rhand=[monster_only_(heretic_private_staff)]        slot_lhand=[]        shield_defense_rate=0        shield_defense=0        skill_list={}        npc_ai={[triol's_believer];{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}        category={}        race=fairy        sex=male        undying=0        can_be_attacked=1        corpse_time=7        no_sleep_mode=0        agro_range=1000        ground_high={164;0;0}        ground_low={55;0;0}        exp=2099425834        org_hp=118xx.xx4444        org_hp_regen=xx.xx        org_mp=21xx.xx7297        org_mp_regen=3.09        collision_radius={xx.xx;xx.xx}        collision_height={xx.xx;xx.xx}        str=40        int=21        dex=30        wit=20        con=43        men=10        base_attack_type=bigblunt        base_attack_range=80        base_damage_range={0;0;80;120}        base_rand_dam=30        base_physical_attack=8xx.xx3922        base_critical=4        physical_hit_modify=4.75        base_attack_speed=273        base_reuse_delay=0        base_magic_attack=6xx.xx9626        base_defend=4xx.xx0588        base_magic_defend=4xx.xx4531        physical_avoid_modify=0        soulshot_count=0        spiritshot_count=0        hit_time_factor=0.45        item_make_list={}        corpse_make_list={{[sealed_boots_of_nightmare_lining];1;1;2.5};{[rp_soulshot_(s)_compressed_package_(100%)];1;1;0.15};{[sealed_majestic_boots_lining];1;1;2.5}}        additional_make_list={}        additional_make_multi_list={{{{[chapel_key];1;1;100}};99};{{{[adena];5331;10920;100}};70};{{{[iron_ore];1;3;100}};20};{{{[stem];4;12;100}};xx.xx57};{{{[steel];1;1;100}};5.5555};{{{[blessing_of_darkness];1;1;100}};2.255};{{{[asofe];1;1;100}};1.8181};{{{[sealed_majestic_boots_lining];1;1;100}};0.8333};{{{[sealed_gloves_of_nightmare_design];1;1;100}};0.8333};{{{[sealed_majestic_gloves_design];1;1;100}};0.7599};{{{[sealed_boots_of_nightmare_lining];1;1;100}};0.7575};{{{[durable_metal_plate];1;1;100}};0.6993};{{{[scroll_enchant_armor_(grade_s)];1;1;100}};0.0227};{{{[sealed_gloves_of_nightmare];1;1;100}};0.0088};{{{[sealed_boots_of_nightmare];1;1;100}};0.0088};{{{[sealed_majestic_gloves];1;1;100}};0.0088};{{{[sealed_majestic_boots];1;1;100}};0.0088}}        hp_increase=0        mp_increase=0        safe_height=100        npc_end

L2j tables uses same collision_radius and collision_height than l2off and uses final values for run spd and walk spd, so I get them by doing this.. final_runspd/dex_bonus and same for walk

~Marquis~ 05.07.2007 07:37

Just be careful, ground high/low are fucked up in L2J, some mobs are half under the gound or flying (check dorfs :P )
nice share

HF 05.07.2007 07:52

Quote:

Originally Posted by Guaresnay (Post 90575)
example:
Code:

npc_begin        warrior        23206        [forgotten_victim]        level=80        acquire_exp_rate=8.532656        acquire_sp=2600        unsowing=0        clan={@tomb_clan}        ignore_clan_list={}        clan_help_range=500        slot_chest=[]        slot_rhand=[monster_only_(zombie_laborer_sword)]        slot_lhand=[]        shield_defense_rate=0        shield_defense=0        skill_list={@s_race_undead}        npc_ai={[forgotten_victim];{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}        category={}        race=fairy        sex=male        undying=0        can_be_attacked=1        corpse_time=7        no_sleep_mode=0        agro_range=1000        ground_high={164;0;0}        ground_low={55;0;0}        exp=1788937098        org_hp=115xx.xx0317        org_hp_regen=xx.xx        org_mp=21xx.xx7297        org_mp_regen=3.09        collision_radius={xx.xx;xx.xx}        collision_height={xx.xx;xx.xx}        str=40        int=21        dex=25        wit=20        con=43        men=10        base_attack_type=sword        base_attack_range=80        base_damage_range={0;0;80;120}        base_rand_dam=30        base_physical_attack=9xx.xx5873        base_critical=4        physical_hit_modify=4.75        base_attack_speed=273        base_reuse_delay=0        base_magic_attack=6xx.xx5091        base_defend=6xx.xx381        base_magic_defend=4xx.xx5418        physical_avoid_modify=0        soulshot_count=0        spiritshot_count=0        hit_time_factor=0.45        item_make_list={}        corpse_make_list={{[rp_spiritshot_s];1;1;0.15};{[sealed_majestic_robe_fabric];1;1;2.5};{[stone_of_purity];1;2;5};{[scroll_enchant_armor_(grade_a)];1;1;0.15};{[sealed_leather_armor_of_nightmare_fabric];1;1;2.5}}        additional_make_list={}        additional_make_multi_list={{{{[adena];4566;9322;100}};70};{{{[varnish];1;3;100}};xx.xx66};{{{[coal];1;3;100}};xx.xx11};{{{[cokes];1;1;100}};7.6011};{{{[mithril_arrow];100;300;100}};0.8823};{{{[stone_of_purity];1;1;100}};2.9411};{{{[mold_lubricant];1;1;100}};0.9174};{{{[sealed_shield_of_nightmare_fragment];1;1;100}};0.7352};{{{[sealed_majestic_circlet_design];1;1;100}};0.7246};{{{[sealed_helm_of_nightmare_design];1;1;100}};0.7011};{{{[rp_shining_arrow_(100%)];1;1;100}};0.046};{{{[sealed_helm_of_nightmare];1;1;100}};0.0088};{{{[sealed_shield_of_nightmare];1;1;100}};0.0088};{{{[sealed_majestic_circlet];1;1;100}};0.0088}}        hp_increase=0        mp_increase=0        safe_height=100        npc_end
npc_begin        warrior        23207        [triol's_layperson]        level=81        acquire_exp_rate=xx.xx6351        acquire_sp=3292        unsowing=0        clan={@tomb_clan}        ignore_clan_list={}        clan_help_range=500        slot_chest=[]        slot_rhand=[monster_only_(heretic_private_axe)]        slot_lhand=[monster_only_(heretic_private_axe)]        shield_defense_rate=0        shield_defense=0        skill_list={}        npc_ai={[triol's_layperson];{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}        category={}        race=fairy        sex=male        undying=0        can_be_attacked=1        corpse_time=7        no_sleep_mode=0        agro_range=1000        ground_high={164;0;0}        ground_low={55;0;0}        exp=2099375834        org_hp=146xx.xx619        org_hp_regen=xx.xx        org_mp=32xx.xx2613        org_mp_regen=3.09        collision_radius={xx.xx;xx.xx}        collision_height={xx.xx;xx.xx}        str=40        int=21        dex=30        wit=20        con=43        men=10        base_attack_type=blunt        base_attack_range=80        base_damage_range={0;0;80;120}        base_rand_dam=50        base_physical_attack=8xx.xx5661        base_critical=1        physical_hit_modify=9        base_attack_speed=273        base_reuse_delay=0        base_magic_attack=6xx.xx5655        base_defend=4xx.xx0769        base_magic_defend=4xx.xx0416        physical_avoid_modify=-6        soulshot_count=0        spiritshot_count=0        hit_time_factor=0.45        item_make_list={}        corpse_make_list={{[metal_hardener];1;2;5};{[sealed_shield_of_nightmare_fragment];1;1;2.5};{[rp_blessed_spiritshot_s];1;1;0.15}}        additional_make_list={}        additional_make_multi_list={{{{[chapel_key];1;1;100}};99};{{{[adena];4584;9387;100}};70};{{{[charcoal];1;3;100}};25};{{{[suede];1;3;100}};10};{{{[high_grade_suede];1;3;100}};4};{{{[dark_crystal];1;1;100}};3.3333};{{{[metal_hardener];1;1;100}};1.988};{{{[sealed_shield_of_nightmare_fragment];1;1;100}};0.8547};{{{[sealed_majestic_circlet_design];1;1;100}};0.8322};{{{[mold_hardener];1;1;100}};0.4237};{{{[sealed_shield_of_nightmare];1;1;100}};0.0088};{{{[sealed_majestic_circlet];1;1;100}};0.0088};{{{[sealed_helm_of_nightmare];1;1;100}};0.0088};{{{[scroll_enchant_weapon_(grade_s)];1;1;100}};0.018}}        hp_increase=0        mp_increase=0        safe_height=100        npc_end
npc_begin        warrior        23208        [triol's_believer]        level=82        acquire_exp_rate=8.323171        acquire_sp=2665        unsowing=0        clan={@tomb_clan}        ignore_clan_list={}        clan_help_range=500        slot_chest=[]        slot_rhand=[monster_only_(heretic_private_staff)]        slot_lhand=[]        shield_defense_rate=0        shield_defense=0        skill_list={}        npc_ai={[triol's_believer];{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}        category={}        race=fairy        sex=male        undying=0        can_be_attacked=1        corpse_time=7        no_sleep_mode=0        agro_range=1000        ground_high={164;0;0}        ground_low={55;0;0}        exp=2099425834        org_hp=118xx.xx4444        org_hp_regen=xx.xx        org_mp=21xx.xx7297        org_mp_regen=3.09        collision_radius={xx.xx;xx.xx}        collision_height={xx.xx;xx.xx}        str=40        int=21        dex=30        wit=20        con=43        men=10        base_attack_type=bigblunt        base_attack_range=80        base_damage_range={0;0;80;120}        base_rand_dam=30        base_physical_attack=8xx.xx3922        base_critical=4        physical_hit_modify=4.75        base_attack_speed=273        base_reuse_delay=0        base_magic_attack=6xx.xx9626        base_defend=4xx.xx0588        base_magic_defend=4xx.xx4531        physical_avoid_modify=0        soulshot_count=0        spiritshot_count=0        hit_time_factor=0.45        item_make_list={}        corpse_make_list={{[sealed_boots_of_nightmare_lining];1;1;2.5};{[rp_soulshot_(s)_compressed_package_(100%)];1;1;0.15};{[sealed_majestic_boots_lining];1;1;2.5}}        additional_make_list={}        additional_make_multi_list={{{{[chapel_key];1;1;100}};99};{{{[adena];5331;10920;100}};70};{{{[iron_ore];1;3;100}};20};{{{[stem];4;12;100}};xx.xx57};{{{[steel];1;1;100}};5.5555};{{{[blessing_of_darkness];1;1;100}};2.255};{{{[asofe];1;1;100}};1.8181};{{{[sealed_majestic_boots_lining];1;1;100}};0.8333};{{{[sealed_gloves_of_nightmare_design];1;1;100}};0.8333};{{{[sealed_majestic_gloves_design];1;1;100}};0.7599};{{{[sealed_boots_of_nightmare_lining];1;1;100}};0.7575};{{{[durable_metal_plate];1;1;100}};0.6993};{{{[scroll_enchant_armor_(grade_s)];1;1;100}};0.0227};{{{[sealed_gloves_of_nightmare];1;1;100}};0.0088};{{{[sealed_boots_of_nightmare];1;1;100}};0.0088};{{{[sealed_majestic_gloves];1;1;100}};0.0088};{{{[sealed_majestic_boots];1;1;100}};0.0088}}        hp_increase=0        mp_increase=0        safe_height=100        npc_end

L2j tables uses same collision_radius and collision_height than l2off and uses final values for run spd and walk spd, so I get them by doing this.. final_runspd/dex_bonus and same for walk

1) bigblunt? ha
2) monster_only_(zombie_laborer_sword) - this name standart is supported in c4off engine? approved?
3)
Quote:

//*******************************
//****** Activation Begin *******
//*******************************
$are_you_a_leecher='no, I am not!!';
if($ok_again || $are_you_a_leecher){ //?
$active = 'Activated!';
$answer = 'yes';
}else{
$Active = 'Access denied!';
}
hehe :D
4) very interested formulas inside script. Need check it...

madar 05.07.2007 11:09

collision_radius={xx.xx;xx.xx} collision_height={xx.xx;xx.xx}

you have to strip ".00" or you will get parsing errors

Guaresnay 05.07.2007 14:23

Quote:

Originally Posted by HF (Post 90599)
1) bigblunt? ha
2) monster_only_(zombie_laborer_sword) - this name standart is supported in c4off engine? approved?
3)
hehe :D
4) very interested formulas inside script. Need check it...

1.- oh sorry didn't notice about that "bigblunt" I'll change every bigblunt to blunt
2.- Those weapons doesnt exist for l2off even with another name so you will have to change it anyway. But sometime mobs just use normal weapons like sword_of_damascus and u won't need to change anything.
3.- :P

@madar: Are you sure about that? l2off sometimes use float values i.e. goblin: collision_height={16.5;16.5}. Maybe I'll just have to round it to 1 decimal value.

hel 05.07.2007 16:28

Guaresnay:
good share. i was thinking about making it.
some technical help for you, if you need it. :)

1. add "@set_time_limit(0);" in npcdata.php for unlimited execution time.
2. you can make output npcdata in unicode automaticaly, this is an basic example, which a bit slow, but working well:
functions.php:
Code:

function LineAnsiUni($str){
  return preg_replace_callback("/./",create_function('$match','return ($match[0]."\x00");'),$str);
}

npcdata.php:
Code:

...
$file=fopen("npcdata_new.txt", "a"); // i dont think, thats 'a' flag is good there. :) use "w". or for second generation it will not overwrite previously generated file.
fwrite($file,"\xFF\xFE"); // writing unicode header
...
while($row=mysql_fetch_array($link)){
  ...
  if($Active){if(fwrite($file, LineAnsiUni("npc_begin ... npc_end\r\n"))){$done=2;}} // writing lines with extra-bytes for each symbol (it is required).
  ...
}

3. use mysql_result for small queries, which returns 1 row result. for example you can change this:
Code:

$query="SELECT weaponType FROM weapon WHERE item_id = '".$weapon_id."'";
$link=mysql_query($query);
$row=mysql_fetch_array($link);
$type=$row['weaponType'];

to
Code:

$query="SELECT weaponType FROM weapon WHERE item_id = '".$weapon_id."'";
$link=mysql_query($query);
$type=mysql_result($result,0,'weaponType'); // 0 - first row from result, 'weaponType' is a name of a field

4. running sql queries inside cycles, (while, foreach, etc.) is VERY slow the script. in future try to make one big query and try to indexate result to array. for example:
Code:

function get_all_armors_weapons($sql){
  $query="SELECT * FROM weapon";
  $link=mysql_query($query,$sql);
  while($row_items=mysql_fetch_array($link)){
      $weapons_array[($row["item_id"])]=array("name" => $row["name"],"type" => "weapon");
  }
  $query="SELECT * FROM armor";
  $link=mysql_query($query,$sql);
  while($row_items=mysql_fetch_array($link)){
      $armors_array[($row["item_id"])]=array("name" => $row["name"],"type" => "armor");
  }
  return $armors_array+$weapons_array;
}
$id=1;
$wa_items=get_all_armors_weapons($conn);
echo ($wa_items[$id]["name"]." is ".$wa_items[$id]["type"]); // prints "short sword is a weapon".

this way more faster.

sorry if you don't like that i "teach" you how to programming, i just want to help you make your script better, because i'm interested in it, if you want more programming hints - pm me. :)

Guaresnay 05.07.2007 17:06

Thank you for your suggestions hel, I knew some of them but just didnt do it that way b.c. I'm a lil lazy and I chose the easiest way :P
BTW I'll consider all of them.

Guaresnay 06.07.2007 03:55

First post updated.

tpuNIsher 06.07.2007 05:28

Well might sound like a noob, but l2j is really not my thing, anyways, i still can't find any table in l2jdb where they has npc collisions, well actually found some but those were mainly summons.. What table in l2j db has them?

And ok, if we use c4 npc collisions from retail, all is cool. What about new ones? Your tool can find correct collision for c5 / interlude npcs?

Thanks.

Guaresnay 06.07.2007 05:37

you can find collision_radius and collision_height in 'npc' table with the same names. I took the l2j db from here .. http://www.l2jdp.com/svn/C5_Datapack/
The problems is that both values for each case will be always the same i mean {X;Y} X=Y always..

tpuNIsher 06.07.2007 05:55

Yes, and which is wrong. Half of them will fly or be under ground :|
I've been researching about this for quite a while now, there's a way to get collision info from meshes as i know, though have not done it myself yet. Anyways, nice share. Nice base to work from.

~Marquis~ 06.07.2007 08:12

Yeah, also always check the attack speed, i mean when it's 278, it means 253 in l2off, it seems most of the stats are different between l2j and l2off ( logical since l2j is still using C1 basis ). So *if* you could add to your script: 0.91*L2J's atkspd = 1*l2off's atk spd this'd be better than nothing.
The attack range sometimes is also really fucked up so you gotta check it out by hands :P

ZeniMax 06.07.2007 13:28

Code:

Notice: Undefined variable: ok_again in c:\program files\easyphp1-8\www\config.php on line 15

Notice: Undefined variable: ok_again in c:\program files\easyphp1-8\www\config.php on line 15

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\functions.php on line 436

Notice: Undefined variable: ok_again in c:\program files\easyphp1-8\www\config.php on line 15

Notice: Undefined variable: x in c:\program files\easyphp1-8\www\npcdata.php on line 22

Notice: Undefined variable: string in c:\program files\easyphp1-8\www\functions.php on line 23

Notice: Undefined variable: string1 in c:\program files\easyphp1-8\www\functions.php on line 124

Notice: Undefined variable: string2 in c:\program files\easyphp1-8\www\functions.php on line 125

Notice: Undefined variable: is_drop in c:\program files\easyphp1-8\www\functions.php on line 136

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\npcdata.php on line 91

Notice: Undefined variable: x in c:\program files\easyphp1-8\www\npcdata.php on line 22

Notice: Undefined variable: string in c:\program files\easyphp1-8\www\functions.php on line 23

Notice: Undefined variable: string1 in c:\program files\easyphp1-8\www\functions.php on line 124

Notice: Undefined variable: string2 in c:\program files\easyphp1-8\www\functions.php on line 125

Notice: Undefined variable: is_drop in c:\program files\easyphp1-8\www\functions.php on line 136

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\npcdata.php on line 91

Notice: Undefined variable: x in c:\program files\easyphp1-8\www\npcdata.php on line 22

Notice: Undefined variable: string in c:\program files\easyphp1-8\www\functions.php on line 23

Notice: Undefined variable: string1 in c:\program files\easyphp1-8\www\functions.php on line 124

Notice: Undefined variable: string2 in c:\program files\easyphp1-8\www\functions.php on line 125

Notice: Undefined variable: is_drop in c:\program files\easyphp1-8\www\functions.php on line 136

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\npcdata.php on line 91

Notice: Undefined variable: x in c:\program files\easyphp1-8\www\npcdata.php on line 22

Notice: Undefined variable: string in c:\program files\easyphp1-8\www\functions.php on line 23

Notice: Undefined variable: string1 in c:\program files\easyphp1-8\www\functions.php on line 124

Notice: Undefined variable: string2 in c:\program files\easyphp1-8\www\functions.php on line 125

Notice: Undefined variable: is_drop in c:\program files\easyphp1-8\www\functions.php on line 136

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\npcdata.php on line 91

Notice: Undefined variable: x in c:\program files\easyphp1-8\www\npcdata.php on line 22

Notice: Undefined variable: string in c:\program files\easyphp1-8\www\functions.php on line 23

Notice: Undefined variable: string1 in c:\program files\easyphp1-8\www\functions.php on line 124

Notice: Undefined variable: string2 in c:\program files\easyphp1-8\www\functions.php on line 125

Notice: Undefined variable: is_drop in c:\program files\easyphp1-8\www\functions.php on line 136

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\npcdata.php on line 91

Notice: Undefined variable: x in c:\program files\easyphp1-8\www\npcdata.php on line 22

Notice: Undefined variable: string in c:\program files\easyphp1-8\www\functions.php on line 23

Notice: Undefined variable: string1 in c:\program files\easyphp1-8\www\functions.php on line 124

Notice: Undefined variable: string2 in c:\program files\easyphp1-8\www\functions.php on line 125

Notice: Undefined variable: is_drop in c:\program files\easyphp1-8\www\functions.php on line 136

Notice: Undefined variable: Active in c:\program files\easyphp1-8\www\npcdata.php on line 91


~Marquis~ 06.07.2007 13:42

Check your php/mysql version, easyphp uses outdated versions ;)

Guaresnay 06.07.2007 20:42

Quote:

Originally Posted by ~Marquis~ (Post 90821)
Yeah, also always check the attack speed, i mean when it's 278, it means 253 in l2off, it seems most of the stats are different between l2j and l2off ( logical since l2j is still using C1 basis ). So *if* you could add to your script: 0.91*L2J's atkspd = 1*l2off's atk spd this'd be better than nothing.
The attack range sometimes is also really fucked up so you gotta check it out by hands :P

The attack spd is fixed since 1st version, its l2j_atkspd / dex_bonus

ZeniMax 07.07.2007 12:36

mmmm using latest php and mysql version I have error.
Code:

There was a problem writting the new npcdata

madar 07.07.2007 14:37

got busted by the antil33cher protect?

Guaresnay 07.07.2007 17:50

Quote:

Originally Posted by ZeniMax (Post 91023)
mmmm using latest php and mysql version I have error.
Code:

There was a problem writting the new npcdata

You have to activate it :)

ZeniMax 07.07.2007 19:17

Lol sorry need sleep (Zzz). Good anti-leecher protection! :P

Edit: Sorry I forgot, add this to functions.php
Code:


                          case 'L2SiegeNpc':
                        $type='citizen';
                        break;
                case 'L2WyvernManager':
                        $type='citizen';
                        break;
                case 'L2MercManager':
                        $type='citizen';
                        break;
                case 'L2Artefact':
                        $type='citizen';
                        break;
                case 'L2CastleChamberlain':
                        $type='citizen';
                        break;
                case 'L2CastleTeleporter':
                        $type='citizen';
                        break;
                case 'L2Fisherman':
                        $type='citizen';
                        break;
                case 'L2SymbolMaker':
                        $type='citizen';
                        break;
                case 'L2SignsPriest':
                        $type='citizen';
                        break;
                case 'L2CabaleBuffer':
                        $type='citizen';
                        break;
                case 'L2Observation':
                        $type='citizen';
                        break;


Guaresnay 07.07.2007 20:40

:) ok thanks, I knew there were some missing classes

SImon 07.07.2007 20:50

There was a problem writting the new npcdata (what problem?)

hel 07.07.2007 22:52

Guaresnay:
1. why you're getting itemnames through sql and not simply parse item_pch? :)
Code:

foreach(file("item_pch.txt") as $iitem){
        str_replace(array("\xFF\xFE","\x00"),"",trim($iitem));
        $iitem=str_replace(array(" ","\t"),"",$iitem);
        $eitem=explode("=",$iitem);
        $itemids[($eitem[1])]=str_replace(array("[","]"),"",$eitem[0]);
}
// after that you may use for example $itemids[1], it returns short_sword.

as you see, there is many citizen classes. why not set as there:
Code:

function get_type($type){
        switch($type){
                ...
                default:
                        $type="citizen";break; //every case need to break, or switch will continue from begining, you forgot about it.
        }
        return $type;
}

the $type=$type is wrong. it will cause l2server parsing problems.

Guaresnay 07.07.2007 23:11

Quote:

Originally Posted by hel (Post 91062)
Guaresnay:
1. why you're getting itemnames through sql and not simply parse item_pch? :)
Code:

foreach(file("item_pch.txt") as $iitem){
        str_replace(array("\xFF\xFE","\x00"),"",trim($iitem));
        $iitem=str_replace(array(" ","\t"),"",$iitem);
        $eitem=explode("=",$iitem);
        $itemids[($eitem[1])]=str_replace(array("[","]"),"",$eitem[0]);
}
// after that you may use for example $itemids[1], it returns short_sword.

as you see, there is many citizen classes. why not set as there:
Code:

function get_type($type){
        switch($type){
                ...
                default:
                        $type="citizen";break; //every case need to break, or switch will continue from begining, you forgot about it.
        }
        return $type;
}

the $type=$type is wrong. it will cause l2server parsing problems.

1.- I've tested both ways and for some reason parsing the txt file takes longer, so I chose the sql one.
2.- Yeh I'll change the default to 'citizen', my bad. Are you sure the default case also need the "break;"? I though switch wasn't iterative, so it doesnt continue from begining...


All times are GMT. The time now is 21:58.