Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 21.11.2005, 01:03   #1
andreagighi
Архивный участник
 
Join Date: Mar 2005
Posts: 74
Default [SHARE] AI for party with self-healing as C3

AI code for party with self-healing guard as many C3 clan got.

Code:
class party_private_casting_heal : party_private
parameter_define_begin
	int DDHeal 1024257
	int PartyNPCBoss 1000761
	int PartyNPCPrivate 1000762
parameter_define_end

handler 23	//  CLAN_ATTACKED
	variable_begin
		"attacker"
		"victim"
		"damage"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  victim
	push_const 40
	add
	fetch_i	//  npc_class_id
	push_const 1620
	add
	fetch_i
	push_parameter PartyNPCBoss
	equal
	push_reg_sp
	fetch_i
	branch_true L49973
	push_event	//  victim
	push_const 40
	add
	fetch_i	//  npc_class_id
	push_const 1620
	add
	fetch_i
	push_parameter PartyNPCPrivate
	equal
	or
L49973
	push_reg_sp
	fetch_i
	branch_false L49974
	push_event	//  victim
	push_const 40
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	push_event	//  victim
	push_const 40
	add
	fetch_i	//  max_hp
	push_const 1000
	add
	fetch_d
	push_const 0.600000
	mul
	less
	and
	push_reg_sp
	fetch_i
	branch_false L49974
	shift_sp 1
	push_const 100
	func_call 55	//  func[Rand]
	shift_sp -1
	push_const 20
	less
	and
L49974
	branch_false L49976
L49975
	shift_sp 1
	push_const 1040647
	func_call 155	//  func[Skill_GetConsumeMP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  mp
	push_const 352
	add
	fetch_d
	less
	push_reg_sp
	fetch_i
	branch_false L49977
	shift_sp 1
	push_parameter DDHeal
	func_call 154	//  func[Skill_GetConsumeHP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	less
	and
	push_reg_sp
	fetch_i
	branch_false L49977
	shift_sp 1
	push_parameter DDHeal
	func_call 160	//  func[Skill_InReuseDelay]
	shift_sp -1
	push_const 0
	equal
	and
L49977
	branch_false L49979
L49978
	shift_sp 1
	push_event	//  victim
	push_const 40
	add
	fetch_i
	push_parameter DDHeal
	push_const 1
	push_const 1
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
L49979
L49976
handler_end

class_end
Example:
Code:
npc_ai={[pytan_knight];{[DDHeal]=@s_npc_heal5};{[PartyNPCBoss]=@pytan};{[PartyNPCPrivate]=@pytan_knight}}
andreagighi is offline  
Old 21.11.2005, 03:22   #2
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

I donk know really for C3 group mobs, but if they heal self on off serv, this good share
RmzVoid is offline  
Old 21.11.2005, 09:56   #3
Flamestrike
Архивный участник
 
Join Date: Aug 2005
Posts: 434
Default

Sweet. And the id's of the party groups can be changed also :P
Nice work m8.
Flamestrike is offline  
Old 03.12.2005, 20:51   #4
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

need change skill_id for correct work animation

npc_ai={[pytan_knight];{[DDHeal]=@s_npc_life_chant7};{[PartyNPCBoss]=@pytan};{[PartyNPCPrivate]=@pytan_knight}}

class party_private_casting_heal : party_private
parameter_define_begin
int DDHeal 1048839 // @s_npc_life_chant7
...
HF is offline  
Old 04.12.2005, 04:34   #5
rodier
Архивный участник
 
Join Date: May 2005
Posts: 979
Default

but where find which NPCs are in which clan ? can you share your part of npcdata with npcs using this code?
thanks a lot
rodier is offline  
Old 04.12.2005, 14:39   #6
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by rodier
but where find which NPCs are in which clan ? can you share your part of npcdata with npcs using this code?
thanks a lot
Example above. LoA boss - Pytan and bodyguard - Pytan Knight. part from npcdata for Knight and change ai class for knight:

class pytan_knight : party_private_casting_heal
class_end

It is hard?

Exist more mobs with this Heal skill to Private Leader. Do search in npcdata for this skill and find it. If you have good npcdata sure
HF is offline  
Old 11.06.2006, 22:55   #7
lexa
Архивный участник
 
Join Date: Aug 2005
Posts: 68
Default

tnx, good share
lexa 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 17:50.