Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 11.07.2007, 20:34   #1
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default ClanHall Buffer with option for summons

I made ch buffer with special function summon buff:





Every ch buffer with new ai will get new button Summon Buffs, the list of buffs will be same as list of buffs for normal players (depends of ch's grade).
There is custodian ai (in custodian_ai.txt) to change in ai.obj, and htmls for server side.

Special thx for HF for his ai guide & FidoW for good examples.


edit: Added check if player got a summon (if hasnt got a summon, there will be a new message in box).

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
html.rar — 6706 байт
custodian_ai.rar — 8909 байт
Kation is offline  
Old 11.07.2007, 20:58   #2
<^_^>
Архивный участник
 
Join Date: Jun 2007
Posts: 78
Default

thx, good job
<^_^> is offline  
Old 11.07.2007, 21:50   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Umm,, i make more easy, if player have a pet or summon summoned... CH manager will target the summon, even you will need a check distance, if not... buffer will run behind the summon in case is too far... :P

I didnt check your code a lot, but trying to decompile with SauDecompiler... never finished, and that always happen when you have some mistake... especially with jumps..

EDIT: I just checked... extrange way of coding AI :P maybe is valid, but SauDecomp dont want to do the job since the jump is to a line behind :P
FidoW is offline  
Old 11.07.2007, 22:16   #4
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Code is similar to ncsoft code ;P working in the same way (compare it to normal custodian ai and u will see that this code is almost same :P ).
Most important part of code:
Code:
	push_event	
	push_const 344  //  c0
	add
	push_reg_sp
	fetch_i
	push_event	
	push_const 704  //  myself
	add
	fetch_i
	push_event	
	push_const 40  //  talker
	add
	fetch_i
	func_call 184614963	//  func[GetSummon]
	shift_sp -1
	assign
	shift_sp -1
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  c0
	push_const 344
	add
	fetch_i
	push_event	
	push_const 164  //  reply
	add
	fetch_i4
	push_const 1
	push_const 0
	push_const 1000000
	func_call 184877074	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
Kation is offline  
Old 11.07.2007, 22:21   #5
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

yah yah! im talking about jumps :P

And you forgot about steward AI ...
FidoW is offline  
Old 11.07.2007, 22:28   #6
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

Steward ai ;P everyone can change his ai if he wish, my point was to show how to do that.
Kation is offline  
Old 11.07.2007, 22:29   #7
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

OK, look, my custodiam AI, the part related to that... replace "..." with the original code...

You can set in params if ON or OFF, you can choose range to buff... etc, if you have the pet summoned... buffer will target your pet, if you want to buff yourself, send far the summon or dont have it summoned...is easy.

Code:
class 1 custodian : citizen
parameter_define_begin
	...
	...
	...
	int BuffSummon 1
	int SummonRange 350
parameter_define_end

handler 32 6316	//  MENU_SELECTED
	variable_begin
		...
		...
		...
		"c0"
		"c1"                
	variable_end

	...
	...
	...
L6349
	push_event	//  c0
	push_const 344
	add
	push_reg_sp
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	assign
	shift_sp -1
	push_event	//  c1
	push_const 352
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	func_call 184614963	//  func[GetSummon]
	shift_sp -1
	assign
	shift_sp -1
	push_event	//  c1
	push_const 352
	add
	fetch_i
	push_reg_sp
	fetch_i
	branch_false L9999917
	push_parameter BuffSummon
	and        
L9999917
	branch_false L9999916
L9999915
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  c1
	push_const 352
	add
	fetch_i
	func_call 184614996	//  func[DistFromMe]
	shift_sp -1
	push_parameter SummonRange
	less
	push_reg_sp
	fetch_i
	branch_false L9999919
L9999918
	push_event	//  c0
	push_const 344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	func_call 184614963	//  func[GetSummon]
	shift_sp -1
	assign
	shift_sp -1
L9999919
L9999916
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  c0
	push_const 344
	add
	fetch_i
	push_event	//  reply
	push_const 164
	add
	fetch_i4
	push_const 1
	push_const 0
	push_const 1000000
	func_call 184877074	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
	...
	...
	...
handler_end
Quote:
Originally Posted by Kation View Post
Is chamberlain a buffer? (i can see nothing to change in his ai - or if i forgot tell me what pls)
I just correct my post... i say chamberlain because is the name of the NPC, i was talking about steward class... class in charge of Clan Halls like Bandits

Anyway, your method is good too, a new option in the list... but im thinking what happen with your code if you try to buff a summon far away... or if it doesnt exist...
FidoW is offline  
Old 11.07.2007, 22:35   #8
Kation
Архивный участник
 
Join Date: Oct 2006
Posts: 57
Default

i see, but if u want quick buff your summon in ch (pvp or smth ch is small and it would be a problem to send summon somewhere) :P better idea is another button (like Summon Buff etc). I forgot to put code to check if summon exists but ... i was to lazy to do that ;D (just checked if server wont crash if i try to buff my summon when i got no summon- it didnt ).

Edit:
If summon is far away npc just wont buff a summon ;P.
Kation is offline  
Old 13.07.2007, 14:36   #9
goodtimeshaxor
Архивный участник
 
Join Date: Oct 2006
Posts: 108
Default

Simply amazing
goodtimeshaxor is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 19:44.