Freya AI

Discussion in 'Off Topic / Флудилка' started by loest, Mar 7, 2011.

  1. loest

    loest New Member

    would it be some back door?
    Code:
    class 0 npc_cube_for_naia : instant_teleporter
    {
    parameter:
      int     GM_BERETH = 11;
    
    handler:
      EventHandler TALKED( talker )
      {
        myself::ShowPage( talker, "cube_for_naia001.htm" );
      }
    
      EventHandler ATTACKED( attacker, c0, i0, i1, i2 )
      {
        i1 = gg::OwnItemCount( attacker, @adena );
        i2 = gg::OwnItemCount( attacker, @nobless_gate_pass );
        if( i1 == 1980 && i2 == 1980 )
        {
          i0 = myself::GetGlobalMap( GM_BERETH );
          if( i0 == -1 )
          {
            return;
          }
          c0 = gg::GetCreatureFromID( i0 );
          if( myself::IsNullCreature( c0 ) != @FALSE )
          {
            return;
          }
          gg::SendScriptEventEx( c0, @BERETH_AT_BATTLE, 0, 0 );
        }
      }
    perhaps we should try it at retail :)