Quest "Seductive Whispers" fixeada como deberia funcionar en interlude.

Iniciado por pablo699, Nov 07, 2022, 08:05 AM

Tema anterior - Siguiente tema
Nov 07, 2022, 08:05 AM Ultima modificación: Nov 22, 2023, 11:16 PM por dandiarena
En estos files, la quest "Seductive Whispers" está rota por todos lados, además de que funciona como en gracia final, y no está bien.

Aquí les dejo la IA decompilada de esta quest, funcionando como debe funcionar en interlude

class 1 blacksmith_wilbert : blacksmith
{
handler:
  EventHandler TALK_SELECTED( talker, i0, fhtml0 )
  {
    if( myself::GetInventoryInfo( talker, 0 ) >= myself::GetInventoryInfo( talker, 1 ) * 0.800000 ||
        myself::GetInventoryInfo( talker, 2 ) >= myself::GetInventoryInfo( talker, 3 ) * 0.800000 )
    {
      myself::ShowSystemMessage( talker, 1118 );
      return;
    }
    if( _from_choice == 0 )
    {
      if( myself::HaveMemo( talker, 663 ) == 0 && talker.level >= 50 )
      {
        _choiceN = _choiceN + 1;
        _code = 0;
        myself::AddChoice( 0, "Seductive Whispers" );
      }
      else if( myself::HaveMemo( talker, 663 ) == 1 )
      {
        i0 = myself::GetMemoState( talker, 663 );
        if( i0 > 0 )
        {
          _choiceN = _choiceN + 1;
          _code = 1;
          myself::AddChoice( 1, "Seductive Whispers (Continue)" );
        }
        else
        {
          _choiceN = _choiceN + 1;
          _code = 2;
          myself::AddChoice( 2, "Seductive Whispers (Continue Game)" );
        }
      }
    }
    if( _from_choice || _choiceN == 1 )
    {
      switch( _code )
      {
        case 0:
        {
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_01.htm" );
          break;
        }
        case 1:
        {
          i0 = myself::GetMemoState( talker, 663 );
          if( i0 > 0 )
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_05.htm" );
          }
          break;
        }
        case 2:
        {
          i0 = myself::GetMemoState( talker, 663 );
          if( i0 == 1005 )
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_23.htm" );
          }
          else if( i0 == 1006 )
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_26.htm" );
          }
          else if( i0 == 1007 )
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_11.htm" );
          }
          else if( i0 == 1008 )
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_15.htm" );
          }
          else if( i0 == 1009 )
          {
            i0 = myself::GetMemoStateEx( talker, 663, 1 );
            i0 = i0 / 10000;
            myself::FHTML_SetFileName( fhtml0, "blacksmith_wilbert_q0663_16.htm" );
            myself::FHTML_SetInt( fhtml0, "wincount", i0 );
            myself::ShowFHTML( talker, fhtml0 );
          }
          break;
        }
      }
      return;
    }
    super;
  }

  EventHandler MENU_SELECTED( ask, reply, talker, i0, i1, i2, i3, i4, fhtml0 )
  {
    if( ask == 663 )
    {
      myself::SetCurrentQuestID( 663 );
      if( myself::GetInventoryInfo( talker, 0 ) >= myself::GetInventoryInfo( talker, 1 ) * 0.800000 ||
          myself::GetInventoryInfo( talker, 2 ) >= myself::GetInventoryInfo( talker, 3 ) * 0.800000 )
      {
        myself::ShowSystemMessage( talker, 1118 );
        return;
      }
      if( reply == 1 && myself::HaveMemo( talker, 663 ) == 0 &&
          talker.level >= 50 )
      {
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_01a.htm" );
      }
      if( reply == 20 && myself::HaveMemo( talker, 663 ) == 1 )
      {
        myself::RemoveMemo( talker, 663 );
        myself::SoundEffect( talker, "ItemSound.quest_finish" );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_30.htm" );
        myself::AddLog( 3, talker, 663 );
      }
      if( reply == 4 && myself::HaveMemo( talker, 663 ) == 1 )
      {
        i0 = myself::GetMemoState( talker, 663 );
        if( i0 > 0 )
        {
          if( myself::OwnItemCount( talker, @q_spirit_bead ) >= 50 )
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_09.htm" );
            myself::SetMemoState( talker, 663, 2 );
          }
          else
          {
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_10.htm" );
          }
        }
      }
      if( reply == 5 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 2 )
      {
        myself::DeleteItem1( talker, @q_spirit_bead, 50 );
        if( gg::Rand( 100 ) < 66 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_1_success.htm" );
          myself::SetMemoState( talker, 663, 3 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 6 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 3 )
      {
        if( gg::Rand( 100 ) < 64 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_2_success.htm" );
          myself::SetMemoState( talker, 663, 4 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 7 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 4 )
      {
        if( gg::Rand( 100 ) < 62 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_3_success.htm" );
          myself::SetMemoState( talker, 663, 5 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 8 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 5 )
      {
        if( gg::Rand( 100 ) < 60 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_4_success.htm" );
          myself::SetMemoState( talker, 663, 6 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 9 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 6 )
      {
        if( gg::Rand( 100 ) < 58 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_5_success.htm" );
          myself::SetMemoState( talker, 663, 7 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 10 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 7 )
      {
        if( gg::Rand( 100 ) < 56 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_6_success.htm" );
          myself::SetMemoState( talker, 663, 8 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 11 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 8 )
      {
        if( gg::Rand( 100 ) < 54 )
        {
          myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_7_success.htm" );
          myself::SetMemoState( talker, 663, 9 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 12 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 9 )
      {
        if( gg::Rand( 100 ) < 52 )
        {
          myself::SoundEffect( talker, "ItemSound.quest_jackpot" );
          myself::ShowPage( talker,
                            "blacksmith_wilbert_q0663_09_8_success.htm" );
          myself::SetMemoState( talker, 663, 1 );
          myself::GiveItem1( talker, @adena, 2384000 );
          myself::GiveItem1( talker, @scrl_of_ench_wp_a, 1 );
          myself::GiveItem1( talker, @scrl_of_ench_am_a, 2 );
        }
        else
        {
          myself::SoundEffect( talker, "ItemSound3.sys_failed" );
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_09_fail.htm" );
          myself::SetMemoState( talker, 663, 1 );
        }
      }
      if( reply == 101 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 3 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 40000 );
      }
      if( reply == 102 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 4 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 80000 );
      }
      if( reply == 103 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 5 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 110000 );
        myself::GiveItem1( talker, @scrl_of_ench_wp_d, 1 );
      }
      if( reply == 104 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 6 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 199000 );
        myself::GiveItem1( talker, @scrl_of_ench_wp_c, 1 );
      }
      if( reply == 105 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 7 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 388000 );
        switch( gg::Rand( 19 ) )
        {
          case 0:
          {
            myself::GiveItem1( talker, @rp_great_axe_i, 1 );
            break;
          }
          case 1:
          {
            myself::GiveItem1( talker, @rp_arthro_nail_i, 1 );
            break;
          }
          case 2:
          {
            myself::GiveItem1( talker, @rp_kris_i, 1 );
            break;
          }
          case 3:
          {
            myself::GiveItem1( talker, @rp_sword_of_valhalla_i, 1 );
            break;
          }
          case 4:
          {
            myself::GiveItem1( talker, @rp_kshanberk_i, 1 );
            break;
          }
          case 5:
          {
            myself::GiveItem1( talker, @rp_sprite_s_staff_i, 1 );
            break;
          }
          case 6:
          {
            myself::GiveItem1( talker, @rp_great_sword_i, 1 );
            break;
          }
          case 7:
          {
            myself::GiveItem1( talker, @rp_heavy_war_axe_i, 1 );
            break;
          }
          case 8:
          {
            myself::GiveItem1( talker, @rp_hazard_bow_i, 1 );
            break;
          }
          case 9:
          {
            myself::GiveItem1( talker, @rp_bellion_cestus_i, 1 );
            break;
          }
          case 10:
          {
            myself::GiveItem1( talker, @rp_demon_s_sword_i, 1 );
            break;
          }
          case 11:
          {
            myself::GiveItem1( talker, @rp_lancia_i, 1 );
            break;
          }
          case 12:
          {
            myself::GiveItem1( talker, @rp_staff_of_evil_sprit_i, 1 );
            break;
          }
          case 13:
          {
            myself::GiveItem1( talker, @rp_sword_of_damascus_i, 1 );
            break;
          }
          case 14:
          {
            myself::GiveItem1( talker, @rp_art_of_battle_axe_i, 1 );
            break;
          }
          case 15:
          {
            myself::GiveItem1( talker, @rp_spell_breaker_i, 1 );
            break;
          }
          case 16:
          {
            myself::GiveItem1( talker, @rp_bone_of_kaim_vanul_i, 1 );
            break;
          }
          case 17:
          {
            myself::GiveItem1( talker, @rp_ice_storm_hammer_i, 1 );
            break;
          }
          case 18:
          {
            myself::GiveItem1( talker, @rp_star_buster_i, 1 );
            break;
          }
        }
      }
      if( reply == 106 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 8 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 675000 );
        switch( gg::Rand( 19 ) )
        {
          case 0:
          {
            myself::GiveItem1( talker, @great_axe_head, 1 );
            break;
          }
          case 1:
          {
            myself::GiveItem1( talker, @arthro_nail_blade, 1 );
            break;
          }
          case 2:
          {
            myself::GiveItem1( talker, @kris_edge, 1 );
            break;
          }
          case 3:
          {
            myself::GiveItem1( talker, @sword_of_valhalla_blade, 1 );
            break;
          }
          case 4:
          {
            myself::GiveItem1( talker, @kshanberk_blade, 1 );
            break;
          }
          case 5:
          {
            myself::GiveItem1( talker, @sprite_s_staff_head, 1 );
            break;
          }
          case 6:
          {
            myself::GiveItem1( talker, @great_sword_blade, 1 );
            break;
          }
          case 7:
          {
            myself::GiveItem1( talker, @heavy_war_axe_head, 1 );
            break;
          }
          case 8:
          {
            myself::GiveItem1( talker, @hazard_bow_shaft, 1 );
            break;
          }
          case 9:
          {
            myself::GiveItem1( talker, @bellion_cestus_edge, 1 );
            break;
          }
          case 10:
          {
            myself::GiveItem1( talker, @demon_s_sword_edge, 1 );
            break;
          }
          case 11:
          {
            myself::GiveItem1( talker, @lancia_blade, 1 );
            break;
          }
          case 12:
          {
            myself::GiveItem1( talker, @staff_of_evil_sprit_head, 1 );
            break;
          }
          case 13:
          {
            myself::GiveItem1( talker, @sword_of_damascus_blade, 1 );
            break;
          }
          case 14:
          {
            myself::GiveItem1( talker, @art_of_battle_axe_blade, 1 );
            break;
          }
          case 15:
          {
            myself::GiveItem1( talker, @spell_breaker_head1, 1 );
            break;
          }
          case 16:
          {
            myself::GiveItem1( talker, @bones_head_of_kaim_vanul1, 1 );
            break;
          }
          case 17:
          {
            myself::GiveItem1( talker, @ice_storm_hammer_head1, 1 );
            break;
          }
          case 18:
          {
            myself::GiveItem1( talker, @star_buster_head1, 1 );
            break;
          }
        }
      }
      if( reply == 107 && myself::HaveMemo( talker, 663 ) == 1 &&
          myself::GetMemoState( talker, 663 ) == 9 )
      {
        myself::SoundEffect( talker, "ItemSound.quest_itemget" );
        myself::SetMemoState( talker, 663, 1 );
        myself::ShowPage( talker, "blacksmith_wilbert_q0663_reward.htm" );
        myself::GiveItem1( talker, @adena, 1284000 );
        myself::GiveItem1( talker, @scrl_of_ench_wp_b, 2 );
        myself::GiveItem1( talker, @scrl_of_ench_am_b, 2 );
      }
      if( reply == 14 && myself::HaveMemo( talker, 663 ) == 1 )
      {
        if( myself::OwnItemCount( talker, @q_spirit_bead ) >= 1 )
        {
          myself::DeleteItem1( talker, @q_spirit_bead, 1 );
          if( gg::Rand( 100 ) < 66 )
          {
            myself::SoundEffect( talker, "ItemSound3.sys_sow_success" );
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_22.htm" );
          }
          else
          {
            myself::SoundEffect( talker, "ItemSound3.sys_failed" );
            myself::ShowPage( talker, "blacksmith_wilbert_q0663_22a.htm" );
          }
        }
        else
        {
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_10.htm" );
        }
      }
      return;
    }
    super;
  }

  EventHandler QUEST_ACCEPTED( quest_id, talkre )
  {
    if( quest_id == 663 )
    {
      myself::SetCurrentQuestID( 663 );
      if( myself::GetInventoryInfo( talker, 0 ) >= myself::GetInventoryInfo( talker, 1 ) * 0.800000 ||
          myself::GetInventoryInfo( talker, 2 ) >= myself::GetInventoryInfo( talker, 3 ) * 0.800000 )
      {
        myself::ShowSystemMessage( talker, 1118 );
        return;
      }
      if( myself::GetMemoCount( talker ) >= 25 )
      {
        myself::ShowPage( talker, "fullquest.htm" );
        return;
      }
      if( myself::HaveMemo( talker, 663 ) == 0 && talker.level >= 50 )
      {
        if( myself::GetCurrentTick() - talker.quest_last_reward_time > 1 )
        {
          talker.quest_last_reward_time = myself::GetCurrentTick();
          myself::ShowPage( talker, "blacksmith_wilbert_q0663_03.htm" );
          myself::SetMemo( talker, 663 );
          myself::SetMemoState( talker, 663, 1 );
          myself::ShowQuestMark( talker, 663 );
          myself::SoundEffect( talker, "ItemSound.quest_accept" );
          myself::AddLog( 1, talker, 663 );
        }
      }
      return;
    }
    super;
  }
}

Y los HTML correspondientes:
Descargar HTMLs

Enjoy ;)


Una pregunta muchachos, recien fui a probar la quest, tengo el pack de dandi, y active la quest y solo me pide ir a matar mobs por unas perlitas azules, que es lo que cambia esta modificacion? por que pareciera q anda bien la quest, gracias!