Всем привет.
Знатоки ПТС помогите прочитать код рб Queen Shyeed (Королева Шиид):
вопрос в том, что рб как то странно ресается, предполагаю что какое то дополнительное условие респа в нем есть, но прочитать код не могу(
Знатоки ПТС помогите прочитать код рб Queen Shyeed (Королева Шиид):
Код:
set_compiler_opt base_event_type(@NTYPE_NPC_EVENT)
class n_spike_stakato_qn_shyid : ai_queen_shyid
{
parameter:
int AbsorbRate11 = 0;
int AbsorbRate12 = 0;
int AbsorbRate13 = 100;
int AbsorbRate14 = 100;
int AbsorbRate15 = 50;
int AbsorbRate16 = 30;
int AbsorbRate17 = 0;
int AbsorbRate18 = 0;
handler:
EventHandler MY_DYING( target, i0, i2, i3, i4, i5, i6, i9, last_attacker, lparty, random1_list, always_list, code_info )
{
always_list = AllocCodeInfoList( );
random1_list = AllocCodeInfoList( );
target = last_attacker;
if ( IsNull( lparty ) == 0 ) {
for ( i9 = 0; i9 < lparty.member_count; ++i9 ) {
target = myself.GetMemberOfParty( lparty, i9 );
if ( HaveMemo( target, 350 ) == 1 ) {
always_list.SetInfo( 0, target );
}
if ( HaveMemo( target, 146 ) == 1 && GetMemoState( target, 146 ) == 1 ) {
random1_list.SetInfo( 1, target );
}
}
} else {
if ( HaveMemo( target, 350 ) == 1 ) {
always_list.SetInfo( 0, target );
}
if ( HaveMemo( target, 146 ) == 1 && GetMemoState( target, 146 ) == 1 ) {
random1_list.SetInfo( 1, target );
}
}
while( IsNull( code_info = always_list.Next( ) ) == 0 ) {
select ( code_info.code ) {
case 0: {
myself.SetCurrentQuestID( 350 );
while( IsNull( target = code_info.Next( ) ) == 0 ) {
if ( myself.DistFromMe( target ) <= 1500 ) {
myself.SetCurrentQuestID( 350 );
i0 = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( OwnItemCount( target, 4651 ) + OwnItemCount( target, 4652 ) ) + OwnItemCount( target, 4653 ) ) + OwnItemCount( target, 4654 ) ) + OwnItemCount( target, 4655 ) ) + OwnItemCount( target, 4656 ) ) + OwnItemCount( target, 4657 ) ) + OwnItemCount( target, 4658 ) ) + OwnItemCount( target, 4659 ) ) + OwnItemCount( target, 4660 ) ) + OwnItemCount( target, 4661 ) ) + OwnItemCount( target, 5579 ) ) + OwnItemCount( target, 5582 ) ) + OwnItemCount( target, 5914 ) ) + OwnItemCount( target, 4629 ) ) + OwnItemCount( target, 4630 ) ) + OwnItemCount( target, 4631 ) ) + OwnItemCount( target, 4632 ) ) + OwnItemCount( target, 4633 ) ) + OwnItemCount( target, 4634 ) ) + OwnItemCount( target, 4635 ) ) + OwnItemCount( target, 4636 ) ) + OwnItemCount( target, 4637 ) ) + OwnItemCount( target, 4638 ) ) + OwnItemCount( target, 4639 ) ) + OwnItemCount( target, 5577 ) ) + OwnItemCount( target, 5580 ) ) + OwnItemCount( target, 5908 ) ) + OwnItemCount( target, 4640 ) ) + OwnItemCount( target, 4641 ) ) + OwnItemCount( target, 4642 ) ) + OwnItemCount( target, 4643 ) ) + OwnItemCount( target, 4644 ) ) + OwnItemCount( target, 4645 ) ) + OwnItemCount( target, 4646 ) ) + OwnItemCount( target, 4647 ) ) + OwnItemCount( target, 4648 ) ) + OwnItemCount( target, 4649 ) ) + OwnItemCount( target, 4650 ) ) + OwnItemCount( target, 5578 ) ) + OwnItemCount( target, 5581 ) ) + OwnItemCount( target, 5911 ) ) + OwnItemCount( target, 9571 ) ) + OwnItemCount( target, 10161 ) ) + OwnItemCount( target, 9570 ) ) + OwnItemCount( target, 10160 ) ) + OwnItemCount( target, 9572 ) ) + OwnItemCount( target, 10162 ) ) + OwnItemCount( target, 10482 ) ) + OwnItemCount( target, 10481 ) ) + OwnItemCount( target, 10480 ) ) + OwnItemCount( target, 13072 ) ) + OwnItemCount( target, 13073 ) ) + OwnItemCount( target, 13071 ) ) + OwnItemCount( target, 15542 ) ) + OwnItemCount( target, 15543 ) ) + OwnItemCount( target, 15541 ) ) + OwnItemCount( target, 15827 ) ) + OwnItemCount( target, 15828 ) ) + OwnItemCount( target, 15826 ) );
if ( i0 == 1 ) {
i2 = 0;
i6 = 0;
if ( OwnItemCount( target, 4661 ) == 1 ) {
i2 = 4661;
i3 = 5579;
i4 = 35051;
i5 = 11;
i6 = AbsorbRate11;
} else {
if ( OwnItemCount( target, 5579 ) == 1 ) {
i2 = 5579;
i3 = 5582;
i4 = 35051;
i5 = 12;
i6 = AbsorbRate12;
} else {
if ( OwnItemCount( target, 5582 ) == 1 ) {
i2 = 5582;
i3 = 5914;
i4 = 35051;
i5 = 13;
i6 = AbsorbRate13;
} else {
if ( OwnItemCount( target, 5914 ) == 1 ) {
i2 = 5914;
i3 = 9571;
i4 = 35051;
i5 = 14;
i6 = AbsorbRate14;
} else {
if ( OwnItemCount( target, 9571 ) == 1 ) {
i2 = 9571;
i3 = 10481;
i4 = 35051;
i5 = 15;
i6 = AbsorbRate15;
} else {
if ( OwnItemCount( target, 10481 ) == 1 ) {
i2 = 10481;
i3 = 13072;
i4 = 35051;
i5 = 16;
i6 = AbsorbRate16;
} else {
if ( OwnItemCount( target, 13072 ) == 1 ) {
i2 = 13072;
i3 = 15542;
i4 = 35051;
i5 = 17;
i6 = AbsorbRate17;
} else {
if ( OwnItemCount( target, 15542 ) == 1 ) {
i2 = 15542;
i3 = 15827;
i4 = 35051;
i5 = 18;
i6 = AbsorbRate18;
} else {
if ( OwnItemCount( target, 4639 ) == 1 ) {
i2 = 4639;
i3 = 5577;
i4 = 35052;
i5 = 11;
i6 = AbsorbRate11;
} else {
if ( OwnItemCount( target, 5577 ) == 1 ) {
i2 = 5577;
i3 = 5580;
i4 = 35052;
i5 = 12;
i6 = AbsorbRate12;
} else {
if ( OwnItemCount( target, 5580 ) == 1 ) {
i2 = 5580;
i3 = 5908;
i4 = 35052;
i5 = 13;
i6 = AbsorbRate13;
} else {
if ( OwnItemCount( target, 5908 ) == 1 ) {
i2 = 5908;
i3 = 9570;
i4 = 35052;
i5 = 14;
i6 = AbsorbRate14;
} else {
if ( OwnItemCount( target, 9570 ) == 1 ) {
i2 = 9570;
i3 = 10480;
i4 = 35052;
i5 = 15;
i6 = AbsorbRate15;
} else {
if ( OwnItemCount( target, 10480 ) == 1 ) {
i2 = 10480;
i3 = 13071;
i4 = 35052;
i5 = 16;
i6 = AbsorbRate16;
} else {
if ( OwnItemCount( target, 13071 ) == 1 ) {
i2 = 13071;
i3 = 15541;
i4 = 35052;
i5 = 17;
i6 = AbsorbRate17;
} else {
if ( OwnItemCount( target, 15541 ) == 1 ) {
i2 = 15541;
i3 = 15826;
i4 = 35052;
i5 = 18;
i6 = AbsorbRate18;
} else {
if ( OwnItemCount( target, 4650 ) == 1 ) {
i2 = 4650;
i3 = 5578;
i4 = 35053;
i5 = 11;
i6 = AbsorbRate11;
} else {
if ( OwnItemCount( target, 5578 ) == 1 ) {
i2 = 5578;
i3 = 5581;
i4 = 35053;
i5 = 12;
i6 = AbsorbRate12;
} else {
if ( OwnItemCount( target, 5581 ) == 1 ) {
i2 = 5581;
i3 = 5911;
i4 = 35053;
i5 = 13;
i6 = AbsorbRate13;
} else {
if ( OwnItemCount( target, 5911 ) == 1 ) {
i2 = 5911;
i3 = 9572;
i4 = 35053;
i5 = 14;
i6 = AbsorbRate14;
} else {
if ( OwnItemCount( target, 9572 ) == 1 ) {
i2 = 9572;
i3 = 10482;
i4 = 35053;
i5 = 15;
i6 = AbsorbRate15;
} else {
if ( OwnItemCount( target, 10482 ) == 1 ) {
i2 = 10482;
i3 = 13073;
i4 = 35053;
i5 = 16;
i6 = AbsorbRate16;
} else {
if ( OwnItemCount( target, 13073 ) == 1 ) {
i2 = 13073;
i3 = 15543;
i4 = 35053;
i5 = 17;
i6 = AbsorbRate17;
} else {
if ( OwnItemCount( target, 15543 ) == 1 ) {
i2 = 15543;
i3 = 15828;
i4 = 35053;
i5 = 18;
i6 = AbsorbRate18;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if ( i2 > 0 && i6 > 0 ) {
if ( Rand( 1000 ) < i6 ) {
myself.DeleteItem1( target, i2, 1 );
myself.GiveItem1( target, i3, 1 );
AddLog( 6, target, i3 );
myself.SoundEffect( target, "ItemSound.quest_itemget" );
myself.ShowSystemMessage( target, 974 );
"".UNKNOWN_FUNC_235405993( );
} else {
myself.ShowSystemMessage( target, 975 );
}
} else {
myself.ShowSystemMessage( target, 1264 );
}
} else {
if ( i0 > 1 ) {
myself.ShowSystemMessage( target, 977 );
} else {
myself.ShowSystemMessage( target, 1265 );
}
}
}
}
break;
}
}
}
code_info = random1_list.RandomSelectOne( );
if ( IsNull( code_info ) == 0 ) {
select ( code_info.code ) {
case 1: {
myself.SetCurrentQuestID( 146 );
while( IsNull( target = code_info.Next( ) ) == 0 ) {
if ( myself.DistFromMe( target ) <= 1500 ) {
myself.SetCurrentQuestID( 146 );
if ( OwnItemCount( target, 14859 ) < 1 ) {
myself.GiveItem1( target, 14859, 1 );
myself.SetMemoState( target, 146, 2 );
myself.SetFlagJournal( target, 146, 2 );
myself.ShowQuestMark( target, 146 );
myself.SoundEffect( target, "ItemSound.quest_middle" );
}
}
}
break;
}
}
}
super;
}
}
вопрос в том, что рб как то странно ресается, предполагаю что какое то дополнительное условие респа в нем есть, но прочитать код не могу(