/// <summary>
        /// 
        /// </summary>
        /// <param name="script"></param>
        public ChangeWallToken(Script script)
            : base(script)
        {
            Type = script.ReadByte();
            switch (Type)
            {
                // All sides
                case 0xf7:
                {
                    Target = Location.FromScript(script); // script.ReadPosition();
                    To = script.ReadByte();
                    From = script.ReadByte();
                }
                break;
                // One side
                case 0xe9:
                {
                    Target = Location.FromScript(script); // script.ReadPosition();
                    Side = script.ReadByte();
                    To = script.ReadByte();
                    From = script.ReadByte();
                }
                break;
                // Open door
                case 0xea:
                {
                    Target = Location.FromScript(script); // script.ReadPosition();
                }
                break;

            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="script"></param>
 public ConsumeItemToken(Script script)
     : base(script)
 {
     Type = script.ReadByte();
     if (Type != 0xff)
         Target = Location.FromScript(script);
 }
Exemple #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="script"></param>
        public SetWallToken(Script script)
            : base(script)
        {
            Type = script.ReadByte();
            switch (Type)
            {
                // All sides
                case 0xf7:
                {
                    Target = Location.FromScript(script);
                    To = script.ReadByte();
                }
                break;
                // One side
                case 0xe9:
                {
                    Target = Location.FromScript(script);
                    Side = script.ReadByte();
                    To = script.ReadByte();
                }
                break;
                // Change party direction
                case 0xed:
                {
                    direction = script.ReadByte();
                }
                break;
                default:
                {

                }
                break;
            }
        }
Exemple #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="script"></param>
        public NewItemToken(Script script)
            : base(script)
        {
            ItemID = script.ReadAddr();
            Type = script.ReadAddr();
            switch (Type)
            {
                case 0xffff:
                {
                    Unknown0 = script.ReadByte();
                    Unknown1 = script.ReadByte();
                }
                break;

                case 0xfffe:
                {
                    Unknown0 = script.ReadByte();
                    Unknown1 = script.ReadByte();
                    Unknown2 = script.ReadByte();
                }
                break;

                default:
                {
                    Target = Location.FromValue(Type);
                    SubPos = script.ReadByte();
                    Unknown0 = script.ReadByte();
                }
                break;
            }
        }
Exemple #5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="script"></param>
        public SoundToken(Script script)
            : base(script)
        {
            Id = script.ReadByte();
            byte b = script.ReadByte();
            if (b != 0x00)
                Target = Location.FromValue(b);

            Flag = script.ReadByte();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="script"></param>
        public TeleportToken(Script script)
            : base(script)
        {
            Type = script.ReadByte();
            switch (Type)
            {
                // Party
                case 0xe8:
                {
                    Unknown0 = script.ReadShort();
                    Destination = Location.FromScript(script);
                }
                break;

                //
                case 0xe1:
                {
                    Destination = Location.FromScript(script);
                }
                break;

                // Monster
                case 0xf3:
                // Item
                case 0xf5:
                {

                }
                break;

                default:
                {
                    Source = Location.FromScript(script);
                    Destination = Location.FromScript(script);
                }
                break;
            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="script"></param>
 public ConditionalGetWallNumber(Script script)
     : base(script)
 {
     Target = Location.FromScript(script);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="script"></param>
 public OpenDoorToken(Script script)
     : base(script)
 {
     Target = Location.FromScript(script);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="script"></param>
 public ConditionalGetWallSide(Script script)
     : base(script)
 {
     Side = script.ReadByte();
     target = Location.FromScript(script);
 }