Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   ClanHall Buffer with option for summons (https://postpacific.loc-online.com/showthread.php?t=8047)

Kation 11.07.2007 20:34

ClanHall Buffer with option for summons
 
I made ch buffer with special function summon buff:

http://img266.imageshack.us/img266/9...008ahw0.th.jpg
http://img266.imageshack.us/img266/2...0003jk2.th.jpg
http://img160.imageshack.us/img160/6...0007eq1.th.jpg

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 байт

<^_^> 11.07.2007 20:58

thx, good job

FidoW 11.07.2007 21:50

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

Kation 11.07.2007 22:16

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


FidoW 11.07.2007 22:21

yah yah! im talking about jumps :P

And you forgot about steward AI ...

Kation 11.07.2007 22:28

Steward ai ;P everyone can change his ai if he wish, my point was to show how to do that.

FidoW 11.07.2007 22:29

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 (Post 91607)
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...

Kation 11.07.2007 22:35

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.

goodtimeshaxor 13.07.2007 14:36

Simply amazing


All times are GMT. The time now is 15:26.