Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class 0 platinum_tribe_shaman : warrior_ag_casting_3skill_magical
- {
- handler:
- EventHandler MY_DYING( always_list, code_info, i0, i1, i4, i9, last_attacker, lparty, member, random1_list, target )
- {
- always_list = gg::AllocCodeInfoList();
- random1_list = gg::AllocCodeInfoList();
- target = last_attacker;
- if( gg::HaveMemo( target, @arrogant_quest ) &&
- ( gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 12 ||
- gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 13 ) &&
- gg::OwnItemCount( target, @q0348_white_fabric ) > 0 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::HaveMemo( target, @arrogant_quest ) &&
- ( gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 12 ||
- gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 13 ) &&
- gg::OwnItemCount( target, @q0348_white_fabric ) > 0 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::IsNull( lparty ) == 0 )
- {
- for( i9 = expr =; i9 < lparty.member_count; i9 = i9 + 1 )
- {
- target = myself::GetMemberOfParty( lparty, i9 );
- if( gg::HaveMemo( target, @arrogant_quest ) &&
- ( gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 12 ||
- gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 13 ) &&
- gg::OwnItemCount( target, @q0348_white_fabric ) > 0 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- }
- }
- target = last_attacker;
- if( gg::HaveMemo( target, @whispers_of_destiny ) == 1 &&
- gg::GetMemoState( target, @whispers_of_destiny ) == 8 &&
- gg::OwnItemCount( target, @q_white_fabric_q0234 ) > 0 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::HaveMemo( target, @whispers_of_destiny ) == 1 &&
- gg::GetMemoState( target, @whispers_of_destiny ) == 8 &&
- gg::OwnItemCount( target, @q_white_fabric_q0234 ) > 0 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::IsNull( lparty ) == 0 )
- {
- for( i9 = expr =; i9 < lparty.member_count; i9 = i9 + 1 )
- {
- target = myself::GetMemberOfParty( lparty, i9 );
- if( gg::HaveMemo( target, @whispers_of_destiny ) == 1 &&
- gg::GetMemoState( target, @whispers_of_destiny ) == 8 &&
- gg::OwnItemCount( target, @q_white_fabric_q0234 ) > 0 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- }
- }
- target = last_attacker;
- if( gg::HaveMemo( target, @reagent_supplier ) )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::HaveMemo( target, @reagent_supplier ) )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::IsNull( lparty ) == 0 )
- {
- for( i9 = expr =; i9 < lparty.member_count; i9 = i9 + 1 )
- {
- target = myself::GetMemberOfParty( lparty, i9 );
- if( gg::HaveMemo( target, @reagent_supplier ) )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- }
- }
- target = last_attacker;
- if( gg::HaveMemo( target, @get_fishing_shot ) == 1 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::HaveMemo( target, @get_fishing_shot ) == 1 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- if( gg::IsNull( lparty ) == 0 )
- {
- for( i9 = expr =; i9 < lparty.member_count; i9 = i9 + 1 )
- {
- target = myself::GetMemberOfParty( lparty, i9 );
- if( gg::HaveMemo( target, @get_fishing_shot ) == 1 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- }
- }
- target = last_attacker;
- if( gg::HaveMemo( target, @put_the_power_in_your_blade ) == 1 )
- {
- random1_list::SetInfo( Fetch Base pointer, target );
- }
- while( gg::IsNull( code_info = always_list::Next() ) == 0 )
- {
- code_info.code;
- }
- code_info = random1_list::RandomSelectOne();
- if( gg::IsNull( code_info ) == 0 )
- {
- switch( code_info.code )
- {
- case select_case compare:
- {
- myself::SetCurrentQuestID( SetCurrentQuestID );
- target = code_info::RandomSelectOne();
- if( gg::IsNull( target ) == 0 &&
- myself::DistFromMe( target ) <= 1500 )
- {
- if( gg::HaveMemo( target, @arrogant_quest ) &&
- gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 12 &&
- gg::OwnItemCount( target, @q0348_white_fabric ) > 0 )
- {
- target.quest_last_reward_time = myself::GetCurrentTick();
- i0 = gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST );
- i0 = i0 + 600;
- myself::SetMemoStateEx( target, @arrogant_quest,
- unary->INTEGER_CONST, i0 );
- if( gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) + 600 > 80000 )
- {
- myself::GiveItem1( target, @q0348_blooded_fabric,
- unary->INTEGER_CONST );
- myself::DeleteItem1( target, @q0348_white_fabric,
- unary->INTEGER_CONST );
- myself::RemoveMemo( target, @arrogant_quest );
- gg::AddLog( AddLog, target, 348 );
- myself::SoundEffect( target, "ItemSound.quest_finish" );
- }
- }
- if( gg::HaveMemo( target, @arrogant_quest ) &&
- gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) == 13 &&
- gg::OwnItemCount( target, @q0348_white_fabric ) > 0 )
- {
- target.quest_last_reward_time = myself::GetCurrentTick();
- i0 = gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST );
- i0 = i0 + 600;
- myself::SetMemoStateEx( target, @arrogant_quest,
- unary->INTEGER_CONST, i0 );
- if( gg::GetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST ) + 600 > 100000 )
- {
- myself::GiveItem1( target, @q0348_blooded_fabric,
- unary->INTEGER_CONST );
- myself::DeleteItem1( target, @q0348_white_fabric,
- unary->INTEGER_CONST );
- myself::SetMemoStateEx( target, @arrogant_quest, unary->INTEGER_CONST,
- unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_middle" );
- }
- }
- }
- break;
- }
- case select_case compare:
- {
- myself::SetCurrentQuestID( SetCurrentQuestID );
- target = code_info::RandomSelectOne();
- if( gg::IsNull( target ) == 0 &&
- myself::DistFromMe( target ) <= 1500 )
- {
- myself::GiveItem1( target, @q_bloody_fabric_q0234,
- unary->INTEGER_CONST );
- myself::DeleteItem1( target, @q_white_fabric_q0234,
- unary->INTEGER_CONST );
- if( gg::OwnItemCount( target, @q_bloody_fabric_q0234 ) >= 29 )
- {
- myself::SetFlagJournal( target, @whispers_of_destiny,
- unary->INTEGER_CONST );
- myself::ShowQuestMark( target, 234 );
- myself::SoundEffect( target, "ItemSound.quest_middle" );
- }
- else
- {
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- }
- }
- break;
- }
- case select_case compare:
- {
- myself::SetCurrentQuestID( SetCurrentQuestID );
- target = code_info::RandomSelectOne();
- if( gg::IsNull( target ) == 0 &&
- myself::DistFromMe( target ) <= 1500 )
- {
- i4 = gg::Rand( Rand );
- if( i4 < 658 )
- {
- myself::GiveItem1( target, @ingredient_pouch2,
- unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- }
- else if( i4 < 100 )
- {
- myself::GiveItem1( target, @quicksilver, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- }
- }
- break;
- }
- case select_case compare:
- {
- myself::SetCurrentQuestID( SetCurrentQuestID );
- target = code_info::RandomSelectOne();
- if( gg::IsNull( target ) == 0 &&
- myself::DistFromMe( target ) <= 1500 )
- {
- if( gg::Rand( Rand ) < 935 )
- {
- myself::GiveItem1( target, @q_sweet_water,
- unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- }
- else
- {
- myself::GiveItem1( target, @q_sweet_water,
- unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- }
- }
- break;
- }
- case select_case compare:
- {
- myself::SetCurrentQuestID( SetCurrentQuestID );
- target = code_info::RandomSelectOne();
- if( gg::IsNull( target ) == 0 &&
- myself::DistFromMe( target ) <= 1500 )
- {
- if( target == myself.c_quest0 && myself.i_quest0 == 2 )
- {
- if( gg::OwnItemCount( target, @blue_soul_crystal_0 ) + gg::OwnItemCount( target, @blue_soul_crystal_1 ) + gg::OwnItemCount( target, @blue_soul_crystal_2 ) + gg::OwnItemCount( target, @blue_soul_crystal_3 ) + gg::OwnItemCount( target, @blue_soul_crystal_4 ) + gg::OwnItemCount( target, @blue_soul_crystal_5 ) + gg::OwnItemCount( target, @blue_soul_crystal_6 ) + gg::OwnItemCount( target, @blue_soul_crystal_7 ) + gg::OwnItemCount( target, @blue_soul_crystal_8 ) + gg::OwnItemCount( target, @blue_soul_crystal_9 ) + gg::OwnItemCount( target, @blue_soul_crystal_10 ) + gg::OwnItemCount( target, @blue_soul_crystal_11 ) + gg::OwnItemCount( target, @blue_soul_crystal_12 ) + gg::OwnItemCount( target, @blue_soul_crystal_13 ) + gg::OwnItemCount( target, @red_soul_crystal_0 ) + gg::OwnItemCount( target, @red_soul_crystal_1 ) + gg::OwnItemCount( target, @red_soul_crystal_2 ) + gg::OwnItemCount( target, @red_soul_crystal_3 ) + gg::OwnItemCount( target, @red_soul_crystal_4 ) + gg::OwnItemCount( target, @red_soul_crystal_5 ) + gg::OwnItemCount( target, @red_soul_crystal_6 ) + gg::OwnItemCount( target, @red_soul_crystal_7 ) + gg::OwnItemCount( target, @red_soul_crystal_8 ) + gg::OwnItemCount( target, @red_soul_crystal_9 ) + gg::OwnItemCount( target, @red_soul_crystal_10 ) + gg::OwnItemCount( target, @red_soul_crystal_11 ) + gg::OwnItemCount( target, @red_soul_crystal_12 ) + gg::OwnItemCount( target, @red_soul_crystal_13 ) + gg::OwnItemCount( target, @green_soul_crystal_0 ) + gg::OwnItemCount( target, @green_soul_crystal_1 ) + gg::OwnItemCount( target, @green_soul_crystal_2 ) + gg::OwnItemCount( target, @green_soul_crystal_3 ) + gg::OwnItemCount( target, @green_soul_crystal_4 ) + gg::OwnItemCount( target, @green_soul_crystal_5 ) + gg::OwnItemCount( target, @green_soul_crystal_6 ) + gg::OwnItemCount( target, @green_soul_crystal_7 ) + gg::OwnItemCount( target, @green_soul_crystal_8 ) + gg::OwnItemCount( target, @green_soul_crystal_9 ) + gg::OwnItemCount( target, @green_soul_crystal_10 ) + gg::OwnItemCount( target, @green_soul_crystal_11 ) + gg::OwnItemCount( target, @green_soul_crystal_12 ) + gg::OwnItemCount( target, @green_soul_crystal_13 ) + gg::OwnItemCount( target, @blue_soul_crystal_14 ) + gg::OwnItemCount( target, @cursed_blue_soul_crystal_14 ) + gg::OwnItemCount( target, @red_soul_crystal_14 ) + gg::OwnItemCount( target, @cursed_red_soul_crystal_14 ) + gg::OwnItemCount( target, @green_soul_crystal_14 ) + gg::OwnItemCount( target, @cursed_green_soul_crystal_14 ) + gg::OwnItemCount( target, @green_soul_crystal_15 ) + gg::OwnItemCount( target, @blue_soul_crystal_15 ) + gg::OwnItemCount( target, @red_soul_crystal_15 ) + gg::OwnItemCount( target, @blue_soul_crystal_16 ) + gg::OwnItemCount( target, @green_soul_crystal_16 ) + gg::OwnItemCount( target, @red_soul_crystal_16 ) == 1 )
- {
- i0 = gg::Rand( Rand );
- if( i0 <= 9 )
- {
- if( gg::OwnItemCount( target, @blue_soul_crystal_0 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_0, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_1, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_1 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_1, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_2, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_2 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_2, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_3, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_3 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_3, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_4, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_4 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_4, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_5, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_5 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_5, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_6, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_6 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_6, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_7, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_7 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_7, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_8, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_8 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_8, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_9, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @blue_soul_crystal_9 ) == 1 )
- {
- myself::DeleteItem1( target, @blue_soul_crystal_9, unary->INTEGER_CONST );
- myself::GiveItem1( target, @blue_soul_crystal_10, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_0 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_0, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_1, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_1 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_1, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_2, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_2 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_2, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_3, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_3 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_3, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_4, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_4 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_4, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_5, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_5 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_5, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_6, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_6 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_6, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_7, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_7 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_7, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_8, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_8 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_8, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_9, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @red_soul_crystal_9 ) == 1 )
- {
- myself::DeleteItem1( target, @red_soul_crystal_9, unary->INTEGER_CONST );
- myself::GiveItem1( target, @red_soul_crystal_10, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_0 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_0, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_1, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_1 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_1, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_2, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_2 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_2, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_3, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_3 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_3, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_4, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_4 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_4, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_5, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_5 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_5, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_6, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_6 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_6, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_7, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_7 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_7, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_8, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_8 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_8, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_9, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else if( gg::OwnItemCount( target, @green_soul_crystal_9 ) == 1 )
- {
- myself::DeleteItem1( target, @green_soul_crystal_9, unary->INTEGER_CONST );
- myself::GiveItem1( target, @green_soul_crystal_10, unary->INTEGER_CONST );
- myself::SoundEffect( target, "ItemSound.quest_itemget" );
- myself::ShowSystemMessage( target, 974 );
- }
- else
- {
- myself::ShowSystemMessage( target, 978 );
- }
- }
- else
- {
- myself::ShowSystemMessage( target, 975 );
- }
- }
- else
- {
- myself::ShowSystemMessage( target, 977 );
- }
- }
- }
- break;
- }
- }
- }
- super;
- }
- EventHandler ATTACKED( attacker, c0, c1, c2, damage, i0, i1, i2, i3, skill_name_id )
- {
- myself::SetCurrentQuestID( SetCurrentQuestID );
- c1 = attacker;
- if( c1.master )
- {
- c1 = c1.master;
- }
- i1 = gg::Party_GetCount( c1 );
- i2 = expr =;
- if( i1 == 0 )
- {
- if( gg::HaveMemo( c1, @arrogant_quest ) &&
- ( gg::GetMemoStateEx( c1, @arrogant_quest, unary->INTEGER_CONST ) == 12 ||
- gg::GetMemoStateEx( c1, @arrogant_quest, unary->INTEGER_CONST ) == 13 ) &&
- gg::OwnItemCount( c1, @q0348_white_fabric ) > 0 )
- {
- c2 = c1;
- }
- }
- else
- {
- for( i0 = expr =; i0 < i1; i0 = i0 + 1 )
- {
- c0 = gg::Party_GetCreature( c1, i0 );
- if( gg::HaveMemo( c0, @arrogant_quest ) &&
- ( gg::GetMemoStateEx( c0, @arrogant_quest, unary->INTEGER_CONST ) == 12 ||
- gg::GetMemoStateEx( c0, @arrogant_quest, unary->INTEGER_CONST ) == 13 ) &&
- gg::OwnItemCount( c0, @q0348_white_fabric ) > 0 )
- {
- i3 = gg::Rand( Rand );
- if( i2 <= i3 )
- {
- i2 = i3;
- c2 = c0;
- }
- }
- }
- }
- if( myself::IsNullCreature( c2 ) == 0 &&
- myself::DistFromMe( c2 ) <= 1500 )
- {
- if( gg::HaveMemo( c2, @arrogant_quest ) &&
- gg::GetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST ) == 12 &&
- gg::OwnItemCount( c2, @q0348_white_fabric ) > 0 )
- {
- if( myself::GetCurrentTick() - c2.quest_last_reward_time > 1 )
- {
- c2.quest_last_reward_time = myself::GetCurrentTick();
- i0 = gg::GetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST );
- i0 = i0 + 60;
- myself::SetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST,
- i0 );
- if( gg::GetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST ) + 60 > 80000 )
- {
- myself::GiveItem1( c2, @q0348_blooded_fabric,
- unary->INTEGER_CONST );
- myself::DeleteItem1( c2, @q0348_white_fabric,
- unary->INTEGER_CONST );
- myself::RemoveMemo( c2, @arrogant_quest );
- gg::AddLog( AddLog, c2, 348 );
- myself::SoundEffect( c2, "ItemSound.quest_finish" );
- }
- }
- }
- if( gg::HaveMemo( c2, @arrogant_quest ) &&
- gg::GetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST ) == 13 &&
- gg::OwnItemCount( c2, @q0348_white_fabric ) > 0 )
- {
- if( myself::GetCurrentTick() - c2.quest_last_reward_time > 1 )
- {
- c2.quest_last_reward_time = myself::GetCurrentTick();
- i0 = gg::GetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST );
- i0 = i0 + 60;
- myself::SetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST,
- i0 );
- if( gg::GetMemoStateEx( c2, @arrogant_quest, unary->INTEGER_CONST ) + 60 > 100000 )
- {
- myself::GiveItem1( c2, @q0348_blooded_fabric,
- unary->INTEGER_CONST );
- myself::DeleteItem1( c2, @q0348_white_fabric,
- unary->INTEGER_CONST );
- myself::SetMemoStateEx( c2, @arrogant_quest,
- unary->INTEGER_CONST,
- unary->INTEGER_CONST );
- myself::SoundEffect( c2, "ItemSound.quest_middle" );
- }
- }
- }
- }
- myself::SetCurrentQuestID( SetCurrentQuestID );
- switch( myself.i_quest0 )
- {
- case select_case compare:
- {
- myself.i_quest0 = expr =;
- if( skill_name_id / 65536 == 137363457 / unary->INTEGER_CONST &&
- myself.sm.hp <= myself.sm.max_hp * 0.500000 )
- {
- myself.i_quest0 = expr =;
- myself.c_quest0 = attacker;
- }
- break;
- }
- case select_case compare:
- {
- if( skill_name_id / 65536 == 137363457 / unary->INTEGER_CONST &&
- myself.sm.hp <= myself.sm.max_hp * 0.500000 )
- {
- myself.i_quest0 = expr =;
- myself.c_quest0 = attacker;
- }
- break;
- }
- case select_case compare:
- {
- break;
- }
- }
- super;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement