![]() |
|
|
#1 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
Code:
push_property BuyList4 push_parameter ShopName push_parameter fnSell push_parameter fnUnableItemSell push_const 50 negate func_call 184942672 // func[Buy] shift_sp -6 shift_sp -1 L3796 jump L3797 L3770 push_event // ask push_const 160 add fetch_i4 push_const 506 negate equal branch_false L3799 L3798 push_event // myself push_const 704 add fetch_i push_const 212 push_event // talker push_const 40 add fetch_i func_call 184680529 // func[ShowMultisell] shift_sp -2 shift_sp -1 jump L3800 L3799 push_event // ask push_const 160 add fetch_i4 push_const 507 negate equal branch_false L3802 L3801 push_event // myself push_const 704 add fetch_i push_const 221 push_event // talker push_const 40 add fetch_i func_call 184680529 // func[ShowMultisell] shift_sp -2 shift_sp -1 jump L3803 L3802 push_event // ask push_const 160 add fetch_i4 push_const 1001 negate equal branch_false L3805 L3804 push_event // reply push_const 164 add fetch_i4 push_reg_sp fetch_i push_const 0 equal branch_false L3808 L3807 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7585 <=== ticket for baby kookaboora func_call 184680579 // func[OwnItemCount] shift_sp -2 push_const 0 greater branch_false L3810 L3809 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7585 <=== ticket for baby kookaboora push_const 1 func_call 184746114 // func[DeleteItem1] shift_sp -3 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6650 <=== kookaboora ocarina func_call 184680580 // func[GetItemData] shift_sp -2 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6650 <=== kookaboora ocarina push_const 1012781 push_const 24 func_call 184811786 // func[CreatePet] shift_sp -4 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S875. "pet_manager_trade_pet.htm" push_string S875 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L3811 L3810 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S876. "pet_manager_no_ticket.htm" push_string S876 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 L3811 jump L3806 jump L3812 L3808 push_reg_sp fetch_i push_const 1 equal branch_false L3813 L3812 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7583 <=== ticket baby buffalo func_call 184680579 // func[OwnItemCount] shift_sp -2 push_const 0 greater branch_false L3815 L3814 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7583 <=== ticket baby buffalo push_const 1 func_call 184746114 // func[DeleteItem1] shift_sp -3 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6648 <=== baby buffalo ocarina func_call 184680580 // func[GetItemData] shift_sp -2 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6648 <=== baby buffalo ocarina push_const 1012780 push_const 25 func_call 184811786 // func[CreatePet] shift_sp -4 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S877. "pet_manager_trade_pet.htm" push_string S877 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L3816 L3815 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S878. "pet_manager_no_ticket.htm" push_string S878 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 L3816 jump L3806 jump L3817 L3813 push_reg_sp fetch_i push_const 2 equal branch_false L3818 L3817 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7584 <=== ticket baby coogar func_call 184680579 // func[OwnItemCount] shift_sp -2 push_const 0 greater branch_false L3820 L3819 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7584 <=== ticket baby coogar push_const 1 func_call 184746114 // func[DeleteItem1] shift_sp -3 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6649 <==== baby coogar chime func_call 184680580 // func[GetItemData] shift_sp -2 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6649 <==== baby coogar chime push_const 1012782 push_const 26 func_call 184811786 // func[CreatePet] shift_sp -4 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S879. "pet_manager_trade_pet.htm" push_string S879 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L3821 L3820 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S880. "pet_manager_no_ticket.htm" push_string S880 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 L3821 jump L3806 jump L3822 L3818 L3822 L3806 shift_sp -1 L3805 L3803 L3800 L3797 call_super handler_end class_end but I do not success has to create the code lines for my three new fapetrts in file AI. Thanks for agreeing to help me. thx |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Aug 2005
Posts: 34
|
The push reg_sp part:
" push_reg_sp fetch_i push_const 2" Is your ask/reply number. Check the html for the pet manager, change the push_const 2 to a number not used, copy one of the lines of the other c4 pets and change the reply ID within it. Change all the L's/S's (Branches/Strings) too something new(unused number for example, "1337" "1338" etc) and make sure they follow each other. Also recount all your lines within that handler when done and exchange it with the number at the top of the handler. Change the own item counts/DeletelItem to your new pet ticket id. Change getitem func to your pet summon item id. In the create pet function push_const 6649 <---- Item Id for pet item summon push_const 1012782 <----- Npcpch id of pet push_const 26 <------- Level Code:
L3813 push_reg_sp fetch_i push_const 2 equal branch_false L3818 L3817 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7584 <=== ticket baby coogar func_call 184680579 // func[OwnItemCount] shift_sp -2 push_const 0 greater branch_false L3820 L3819 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 7584 <=== ticket baby coogar push_const 1 func_call 184746114 // func[DeleteItem1] shift_sp -3 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6649 <==== baby coogar chime func_call 184680580 // func[GetItemData] shift_sp -2 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 6649 <==== baby coogar chime push_const 1012782 push_const 26 func_call 184811786 // func[CreatePet] shift_sp -4 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i S879. "pet_manager_trade_pet.htm" push_string S879 func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L3821 |
|
|
|
|
#3 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
This can be named as "Tutorial of HOW TO modify AI without understand it at all, only change random numbers" :P
haha, sorry for the irony, is much more easy if you do it with a decompiler, you can modify the code and see fast what are the real changes, is a start, later, when spent some hours in front of the monitor looking at that code you will start understand it without decompiler... isnt too hard, and even if you know the basics about ASM that will help you too. |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Aug 2005
Posts: 34
|
Really now fidow?
Wouldn't that be the quickest way? Copy paste, exchange id's on checks for tickets, delete ticket's, give item/create pet. Making sure branches/strings don't conflict and the handler counter is correct. It would, hardly any decompiler needed, the ai in this case is that simple. Someone wanting to do this quickly, could care less about structure of code nor what it does, as long as changing it works. play bigball all you want, it's the quickest way. |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Mar 2006
Posts: 685
|
Yah, in other words, "If it works, why try understanding?"
too much of a leecher theory, meh. |
|
|
|
|
#6 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
thx i have resolved my problem
very thx |
|
|
|
|