Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 30.04.2006, 02:13   #1
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default [Share] summon hex, w/ 1 l2npc new func

thx to jiaqiang





(喜欢发别人东西人 下次发的时候请� ��名原作者,曾经记得我写的火龙ai 摇身一变成人家的东西了,居然连1个� ��都没少,连我故意把SKILL_INTERRUPTED事� ��去掉后放出的ai 一模一样)
目前的召唤兽召唤方式已经改变 所� �大家需要对summon类型 进行适当修改
快5章了 发点东西 也希望大家能有� ��长进 过段时间会放出一些地图版本 (主要分为2种 有环境变量,和无环境� �量的2个版本,各有好处 因为目前没 有正确的pn辅助,所以有环境变量(也� �是你们说的不能穿墙的,很容易导致� ��怪)并不是最好的)
言归正转

简单介绍L2NPC的1个func
45:func_call 44 // func[ShowSystemMesage]

eg:
shift_sp 1
push_event // talker
push_const 32     
add
fetch_i
push_const 0
func_call 44 // func[ShowSystemMesage]
shift_sp -2
shift_sp -1


要实现这个功能需要对L2NPC1处封包进� �修改 原来的处理上有点问题
在4EB45C 这个位置
用直接把封包类型修改成cdddd(原始的� �cddd)
即4EB460(UE即eb460)的位置修改把00 修改成64即可
因为summon类型的种类比较多 所以这� �需要借助parameter 以方便编写
我这边是这么处理的
summon_heal
summon_physicalattack
summon_magicalattack
summon_buff(你们的AI暂时不存在此类型)
他的父类我重新定义了1个 已方便对� ��据的简化编写
class summon : default_npc
parameter_define_begin
int itemcount 0
parameter_define_end
handler 13 // CREATED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_const 170
func_call 53 // func[SetTimerPeriod]
shift_sp -1
shift_sp -1
handler_end

handler 11 // TIMER_FIRED
variable_begin
"myself"
"master"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_event // myself
push_const 28
add
fetch_i
push_const 2404
add
fetch_i
push_const 1458
func_call 81 // func[OwnItemCount]
shift_sp -2
push_parameter itemcount
greater_equal
and
L2116
branch_false L2118
L2117
shift_sp 1
push_event // myself
push_const 28
add
fetch_i
push_const 2404
add
fetch_i
push_const 1458
push_parameter itemcount
func_call 80 // func[DeleteItem1]
shift_sp -3
shift_sp -1
jump L2115
L2118
shift_sp 1
push_event // myself
push_const 28
add
fetch_i
push_const 2404
add
fetch_i
push_const 1143
func_call 44 // func[ShowSystemMesage]
shift_sp -2
shift_sp -1
shift_sp 1
func_call 175 // func[Despawn]
shift_sp -1
L2115
handler_end
class_end

然后对子类进行相关修改

class summon_heal : summon
parameter_define_begin
int HealMagic 1030401
parameter_define_end
handler 13 // CREATED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_const xx.xx0000
func_call 14 // func[AddPetDefaultDesire_Follow]
shift_sp -1
shift_sp -1
L1
call_super
handler_end
...
class_end
以此类推
summon_physicalattack
summon_magicalattack
都进行相关修改

"itemcount" 为消耗数量

下面以1个实际调用到的npc为例子
class dark_panther_a : summon_physicalattack
parameter_define_begin
int itemcount 1
parameter_define_end
class_end


class dark_panther_b : summon_physicalattack
parameter_define_begin
int itemcount 1
parameter_define_end
class_end


class dark_panther_c : summon_physicalattack
parameter_define_begin
int itemcount 2
parameter_define_end
class_end

class dark_panther_d : summon_physicalattack
parameter_define_begin
int itemcount 3
parameter_define_end
class_end

class dark_panther_e : summon_physicalattack
parameter_define_begin
int itemcount 3
parameter_define_end
class_end

class dark_panther_f : summon_physicalattack
parameter_define_begin
int itemcount 4
parameter_define_end
class_end

class dark_panther_g : summon_physicalattack
parameter_define_begin
int itemcount 4
parameter_define_end
class_end

实际的召唤时候数量(skilldata控制)和消 耗数量(AI控制)请参照客户端的skillname-cn.txt
进行相关的修改
Digital is offline  
Old 30.04.2006, 03:10   #2
Eanae
Архивный участник
 
Join Date: Jun 2005
Posts: 262
Default

what exactly does this do?
Eanae is offline  
Old 30.04.2006, 04:53   #3
Sire
Архивный участник
 
Join Date: Feb 2006
Posts: 87
Default

Looks like system message. Like the "Welcome to the world of lineage 2." message. Seems he's using it on pets to display the system message when you do not have the required items to maintain a summon. Also would show in the system message screen on C4 client.

Thanks Digital.
Sire is offline  
Old 30.04.2006, 08:06   #4
max_rain
Архивный участник
 
Join Date: Apr 2006
Posts: 42
Default

hm... he create skill to summon pets...
max_rain is offline  
Old 16.05.2006, 12:02   #5
zer99
Архивный участник
 
Join Date: Jun 2005
Posts: 2
Default

汗。。。。。。。。。。

it's pets auto get food script.....
from 99nets jiaqing
zer99 is offline  
Old 18.05.2006, 17:30   #6
Thalone
Архивный участник
 
Join Date: Feb 2005
Posts: 134
Default

it makes work the unsummon button for summons
Thalone 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 15:10.