PDA

View Full Version : 3rd proff problem


KTPSMF
28.08.2006, 06:52
hi 2 all
i cant find problem in ai.obj :/

problem is with 3rd and 5 amulets. npc did not drop it :/

i think it is problem with classes like lv3_wizard but cant find where

Phantom2005
29.08.2006, 09:20
the 3rd is not the only one :)

3rd is bugged 4th is bugged and 6th is bugged..
3 and 4 ai functions are ordered wrong.. the 6th one is nastiest..

KTPSMF
29.08.2006, 17:41
:)
well? will u show me the right way?

Aikeleer
29.08.2006, 20:29
Which NPC is this about? Perhaps I can help you for a bit.

Sakumi
29.08.2006, 20:32
the 3rd is not the only one :)

3rd is bugged 4th is bugged and 6th is bugged..
3 and 4 ai functions are ordered wrong.. the 6th one is nastiest..

Can you give me the Branch# or wtfever its called (is there even documentation?!)

Lxxxxxxxxx for example

So I can look into it as well. It's quite difficult to fix AI problems without documentation, and without people willing to help ^.~

Aikeleer
29.08.2006, 20:41
I'm willing to help Sakumi, I'm pretty sure I can find the problem if I know what NPC this is about and what items etc. I have no clue :P

Sakumi
29.08.2006, 20:44
I'm willing to help Sakumi, I'm pretty sure I can find the problem if I know what NPC this is about and what items etc. I have no clue :P

Yeah I'm not exactly sure which ones but I'll be looking into that this afternoon and will post here the affected areas.

I know for sure its something to do with drops for 3rd class change - the items aren't dropping (as noted below the 3rd, 4th, and 6th amulet drops).

When I get the exact location in AI I'll let you know.

Aikeleer
29.08.2006, 20:58
class 1 lost_knight_adhil : lv3_knight
handler 10 394 // MY_DYING
variable_begin
"always_list"
"code_info"
"i9"
"last_attacker"
"lparty"
"member"
"npc0"
"random1_list"
"target"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // always_list
push_const 688
add
push_reg_sp
fetch_i
push_event // gg
push_const 632
add
fetch_i
func_call 218103812 // func[AllocCodeInfoList]
assign
shift_sp -1
push_event // random1_list
push_const 680
add
push_reg_sp
fetch_i
push_event // gg
push_const 632
add
fetch_i
func_call 218103812 // func[AllocCodeInfoList]
assign
shift_sp -1
push_event // target
push_const 96
add
push_reg_sp
fetch_i
push_event // last_attacker
push_const 656
add
fetch_i
assign
shift_sp -1
push_const 1
branch_false L124765
L124764
push_event // always_list
push_const 688
add
fetch_i
push_const 0
push_event // target
push_const 96
add
fetch_i
func_call 251789313 // func[SetInfo]
shift_sp -2
shift_sp -1
L124765
L124766
push_event // gg
push_const 632
add
fetch_i
push_event // code_info
push_const 696
add
push_reg_sp
fetch_i
push_event // always_list
push_const 688
add
fetch_i
func_call 251658240 // func[Next]
assign
fetch_i
func_call 218169355 // func[IsNull]
shift_sp -1
push_const 0
equal
branch_false L124767
push_event // code_info
push_const 696
add
fetch_i // code
push_const 60
add
fetch_i4
push_reg_sp
fetch_i
push_const 0
equal
branch_false L124770
L124769
push_event // myself
push_const 704
add
fetch_i
push_const 70
func_call 184615017 // func[SetCurrentQuestID]
shift_sp -1
shift_sp -1
push_event // target
push_const 96
add
push_reg_sp
fetch_i
push_event // code_info
push_const 696
add
fetch_i
func_call 335544321 // func[RandomSelectOne]
assign
shift_sp -1
push_event // gg
push_const 632
add
fetch_i
push_event // target
push_const 96
add
fetch_i
func_call 218169355 // func[IsNull]
shift_sp -1
push_const 0
equal
push_reg_sp
fetch_i
branch_false L124771
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
func_call 184614996 // func[DistFromMe]
shift_sp -1
push_const 1500
less_equal
and
L124771
branch_false L124773
L124772
push_event // target
push_const 96
add
fetch_i // is_pc
push_const 100
add
fetch_i4
push_const 1
equal
branch_false L124775
L124774
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 70
func_call 184680543 // func[HaveMemo]
shift_sp -2
push_const 1
equal
push_reg_sp
fetch_i
branch_false L124776
push_event // target
push_const 96
add
fetch_i // occupation
push_const 192
add
fetch_i4
push_const 5
equal
and
push_reg_sp
fetch_i
branch_false L124776
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 70
func_call 184680547 // func[GetMemoState]
shift_sp -2
push_const 7
equal
and
push_reg_sp
fetch_i
branch_false L124776
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 7330
func_call 184680579 // func[OwnItemCount]
shift_sp -2
push_const 0
equal
and
push_reg_sp
fetch_i
branch_false L124776
push_event // target
push_const 96
add
fetch_i // dbid
push_const 988
add
fetch_i4
push_event // myself
push_const 704
add
fetch_i // sm
push_const 544
add
fetch_i // param2
push_const 2272
add
fetch_i4
equal
and
L124776
branch_false L124778
L124777
push_event // myself
push_const 704
add
fetch_i
push_event // myself
push_const 704
add
fetch_i
push_const 7052
S14404. ""
push_string S14404
S14405. ""
push_string S14405
S14406. ""
push_string S14406
S14407. ""
push_string S14407
S14408. ""
push_string S14408
func_call 184942731 // func[MakeFString]
shift_sp -6
func_call 184614973 // func[Say]
shift_sp -1
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 7330
push_const 1
func_call 184746111 // func[GiveItem1]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 70
push_const 9
func_call 184746087 // func[SetFlagJournal]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
S14409. "ItemSound.quest_middle"
push_string S14409
func_call 184680685 // func[SoundEffect]
shift_sp -2
shift_sp -1
L124778

Is your memostate actually 7? (of questid 70) It checks if you don't already have 7330, q_resonance_amulet3_01, and then it says smoething.

Try class 1 lost_knight_adhil : lv3_knight
handler 10 394 // MY_DYING
variable_begin
"always_list"
"code_info"
"i9"
"last_attacker"
"lparty"
"member"
"npc0"
"random1_list"
"target"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // always_list
push_const 688
add
push_reg_sp
fetch_i
push_event // gg
push_const 632
add
fetch_i
func_call 218103812 // func[AllocCodeInfoList]
assign
shift_sp -1
push_event // random1_list
push_const 680
add
push_reg_sp
fetch_i
push_event // gg
push_const 632
add
fetch_i
func_call 218103812 // func[AllocCodeInfoList]
assign
shift_sp -1
push_event // target
push_const 96
add
push_reg_sp
fetch_i
push_event // last_attacker
push_const 656
add
fetch_i
assign
shift_sp -1
push_const 1
branch_false L124765
L124764
push_event // always_list
push_const 688
add
fetch_i
push_const 0
push_event // target
push_const 96
add
fetch_i
func_call 251789313 // func[SetInfo]
shift_sp -2
shift_sp -1
L124765
L124766
push_event // gg
push_const 632
add
fetch_i
push_event // code_info
push_const 696
add
push_reg_sp
fetch_i
push_event // always_list
push_const 688
add
fetch_i
func_call 251658240 // func[Next]
assign
fetch_i
func_call 218169355 // func[IsNull]
shift_sp -1
push_const 0
equal
branch_false L124767
push_event // code_info
push_const 696
add
fetch_i // code
push_const 60
add
fetch_i4
push_reg_sp
fetch_i
push_const 0
equal
branch_false L124770
L124769
push_event // myself
push_const 704
add
fetch_i
push_const 70
func_call 184615017 // func[SetCurrentQuestID]
shift_sp -1
shift_sp -1
push_event // target
push_const 96
add
push_reg_sp
fetch_i
push_event // code_info
push_const 696
add
fetch_i
func_call 335544321 // func[RandomSelectOne]
assign
shift_sp -1
push_event // gg
push_const 632
add
fetch_i
push_event // target
push_const 96
add
fetch_i
func_call 218169355 // func[IsNull]
shift_sp -1
push_const 0
equal
push_reg_sp
fetch_i
branch_false L124771
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
func_call 184614996 // func[DistFromMe]
shift_sp -1
push_const 1500
less_equal
and
L124771
branch_false L124773
L124772
push_event // target
push_const 96
add
fetch_i // is_pc
push_const 100
add
fetch_i4
push_const 1
equal
branch_false L124775
L124774
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 70
func_call 184680543 // func[HaveMemo]
shift_sp -2
push_const 1
equal
push_reg_sp
fetch_i
branch_false L124776
push_event // target
push_const 96
add
fetch_i // occupation
push_const 192
add
fetch_i4
push_const 5
equal
and
push_reg_sp
fetch_i
branch_false L124776
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 70
func_call 184680547 // func[GetMemoState]
shift_sp -2
push_const 7
equal
and
push_reg_sp
fetch_i
branch_false L124776
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 7330
func_call 184680579 // func[OwnItemCount]
shift_sp -2
push_const 0
equal
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 7330
push_const 1
func_call 184746111 // func[GiveItem1]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
push_const 70
push_const 9
func_call 184746087 // func[SetFlagJournal]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // target
push_const 96
add
fetch_i
S14409. "ItemSound.quest_middle"
push_string S14409
func_call 184680685 // func[SoundEffect]
shift_sp -2
shift_sp -1
L124778 to test, that one skips the say-part.

Mind that it could be something else in the code that's bugged, but I didn't really spend much time on it yet. I still have to analyze all the C4 quest AI-code.

Phantom2005
31.08.2006, 10:01
like i said.. its ordered wrong.. you have to edit about 64 mobs manually.
The checks(havememo ownitem etc.) have to be moved to the part above setinfo.

Sakumi
31.08.2006, 19:22
like i said.. its ordered wrong.. you have to edit about 64 mobs manually.
The checks(havememo ownitem etc.) have to be moved to the part above setinfo.

There's lovely documentation so this should be no problem.

Thanks for being so helpful!

/scarasm at it's finest.

Aikeleer
31.08.2006, 21:00
Sakumi, he IS being helpful. The information about telling what exactly is wrong is pretty damn handy. ;)

montejo1974
04.09.2006, 11:41
The problem is exactly the assign instruction at the attacked event of the class lv3_monster, just after calling GetNPCFromId ;)

KTPSMF
08.09.2006, 08:34
cant find :/
add
fetch_i4
func_call 218169350 // func[GetNPCFromID]
shift_sp -1
assign
shift_sp -1
push_event // npc0
push_const 480
add
fetch_i // i_quest0
push_const 288
add
push_reg_sp
fetch_i
push_const 0
assign4
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
func_call 184549616 // func[Despawn]
shift_sp -1

TuMBLer
13.09.2006, 14:32
Up. Someone help us plz.

Chobito
15.06.2007, 18:11
I need help in this too


I've spended a week in this problem ,, I dont want to summon free npc class changer...
Can someone share the parts that I have to change in ai?