Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 02.08.2007, 09:10   #1
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default [SHARE] C5 NPC IDs

Conversion of C4 to C5 NPC IDs

This is per the L2J NPC.sql (rev. 2121)

I'm unable to test however as my L2Server.exe crashes when parsing the NPCDATA.

If someone would like to share the hex offset and new value to fix this it would be greatly appreciated.

Thanks.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
npcid c4 to c5 from l2j.rar — 15191 байт
khelben is offline  
Old 02.08.2007, 09:14   #2
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Use this to change your npc ids (put npcdata.txt to folder with exe)
http://files.filefront.com//;8207172;;/
Kation is offline  
Old 02.08.2007, 09:23   #3
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

gi
I has it it my tool, but i find formula for it. Maybe exist formula for conversion old id to new? It no good create big file with all ids.
HF is offline  
Old 02.08.2007, 09:23   #4
zaferk
Архивный участник
 
Join Date: Apr 2006
Posts: 92
Default

im just wondering though, with changing all the npc ids, wont that screw up alot of other stuff, like AI for example :\
zaferk is offline  
Old 02.08.2007, 09:33   #5
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

Quote:
Originally Posted by zaferk View Post
im just wondering though, with changing all the npc ids, wont that screw up alot of other stuff, like AI for example :\
If you only change it in your npcdata, yes.

But if you search for the functions that spawn NPCs in your AI and replace the push_const numbers for the NPCs then you shouldn't have an issue.

Regardless, you'll need a l2server.exe that doesn't crash when parsing the new NPCDATA ID range.
khelben is offline  
Old 02.08.2007, 10:12   #6
ZeniMax
Архивный участник
 
Join Date: May 2006
Posts: 209
Default

Use this npcdata convertor to c5. Note you must fix 50 ids manually and summons.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
NpcId转换工具.rar — 133322 байт
ZeniMax is offline  
Old 02.08.2007, 10:32   #7
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by ZeniMax View Post
Use this npcdata convertor to c5. Note you must fix 50 ids manually and summons.
see above. Already shared
HF is offline  
Old 02.08.2007, 10:43   #8
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by khelben View Post
If you only change it in your npcdata, yes.

But if you search for the functions that spawn NPCs in your AI and replace the push_const numbers for the NPCs then you shouldn't have an issue.
Where in AI ... ids are ussed to spawn something ? ...
FidoW is offline  
Old 02.08.2007, 11:56   #9
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

Quote:
Originally Posted by FidoW View Post
Where in AI ... ids are ussed to spawn something ? ...
The first thing that comes to mind is CreatePrivate for spawning mobs for quests.
khelben is offline  
Old 02.08.2007, 12:35   #10
BioNicle
Архивный участник
 
Join Date: Mar 2007
Posts: 60
Default

Interlude npcdata =)
https://postpacific.loc-online.com/f...ead.php?t=8193
BioNicle is offline  
Old 02.08.2007, 12:40   #11
Fot@r@s
Архивный участник
 
Join Date: Mar 2007
Posts: 118
Default

thx man very usefull for C5 tests
Fot@r@s is offline  
Old 02.08.2007, 12:55   #12
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by khelben View Post
The first thing that comes to mind is CreatePrivate for spawning mobs for quests.
Then start looking again because CreatePrivates works with strings and not with integers

Code:
void CNPC::CreatePrivates(WCHAR* privates);
Code:
class 1 party_leader_param_warrior : warrior
parameter_define_begin
	int AttackLowHP 0
	string Privates "orc:party_private:1:20sec"
	int ShoutTarget 0
	int SummonPrivateRate 0
parameter_define_end
handler 13 39	//  CREATED
	variable_begin
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_parameter SummonPrivateRate
	push_const 0
	equal
	branch_false L7720
L7719
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_parameter Privates
	func_call 184615141	//  func[CreatePrivates]
	shift_sp -1
	shift_sp -1
FidoW is offline  
Old 02.08.2007, 13:51   #13
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

Quote:
Originally Posted by FidoW View Post
Then start looking again because CreatePrivates works with strings and not with integers

Code:
void CNPC::CreatePrivates(WCHAR* privates);
Code:
class 1 party_leader_param_warrior : warrior
parameter_define_begin
	int AttackLowHP 0
	string Privates "orc:party_private:1:20sec"
	int ShoutTarget 0
	int SummonPrivateRate 0
parameter_define_end
handler 13 39	//  CREATED
	variable_begin
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_parameter SummonPrivateRate
	push_const 0
	equal
	branch_false L7720
L7719
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_parameter Privates
	func_call 184615141	//  func[CreatePrivates]
	shift_sp -1
	shift_sp -1
Sorry, didn't have my cheat sheet open at the time.
It's CreateOnePrivate

tks
khelben is offline  
Old 02.08.2007, 13:56   #14
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by khelben View Post
Sorry, didn't have my cheat sheet open at the time.
It's CreateOnePrivate

tks
Ok... thats yes
Code:
void CNPC::CreateOnePrivate(int private_class_id, const WCHAR* pszAI, int private_weight_point)
FidoW is offline  
Old 02.08.2007, 14:01   #15
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

There may be others, I haven't had a chance to comb through it yet, just got home from work and I'm pretty tired. I need a beer and a bed.
khelben is offline  
Old 02.08.2007, 18:50   #16
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

You have to edit this npc's id in ai. (i had to :P to get server c5 started with no errors :P)
file contains:
c4id c5id

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
id_ai.txt — 6118 байт
Kation is offline  
Old 04.08.2007, 07:46   #17
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

I only found the following functions to use NPCID:

184811750 func [CreateOnePrivate]
185270503 func [CreateOnePrivateEx]

If anyone has seen others, please let me know.
Thanks!
khelben is offline  
Old 04.08.2007, 08:21   #18
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

Quote:
Originally Posted by Kation View Post
You have to edit this npc's id in ai. (i had to :P to get server c5 started with no errors :P)
file contains:
c4id c5id
You missed some.

My results show approximately 953 instances in the standard C4 AI that need changed.
khelben is offline  
Old 04.08.2007, 17:43   #19
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Maybe u r right, but i just want to get server started without errors:P (and that npcs id were enught to do that).
Kation 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.