![]() |
|
|
#1 |
|
Архивный участник
Join Date: Oct 2006
Posts: 57
|
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 байт |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Jun 2007
Posts: 78
|
thx, good job
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
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 |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Oct 2006
Posts: 57
|
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 |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
yah yah! im talking about jumps :P
And you forgot about steward AI ... |
|
|
|
|
#6 |
|
Архивный участник
Join Date: Oct 2006
Posts: 57
|
Steward ai ;P everyone can change his ai if he wish, my point was to show how to do that.
|
|
|
|
|
#7 | |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
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:
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... |
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Oct 2006
Posts: 57
|
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. |
|
|
|
|
#9 |
|
Архивный участник
Join Date: Oct 2006
Posts: 108
|
Simply amazing
|
|
|
|
|