Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 18.06.2007, 20:17   #1
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default New pet help on the file AI

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
can you help me for write a line for exchange my new big pet .I have a create all file for 3 pets but on other file (npcdata.txt, etc....

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
Genes2 is offline  
Old 19.06.2007, 04:49   #2
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

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
Pretty much change that.
McBigMac is offline  
Old 19.06.2007, 10:35   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

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.
FidoW is offline  
Old 19.06.2007, 10:47   #4
McBigMac
Архивный участник
 
Join Date: Aug 2005
Posts: 34
Default

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.
McBigMac is offline  
Old 19.06.2007, 11:48   #5
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Yah, in other words, "If it works, why try understanding?"
too much of a leecher theory, meh.
tpuNIsher is offline  
Old 19.06.2007, 13:21   #6
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default

thx i have resolved my problem

very thx
Genes2 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 15:02.