Exemple #1
0
    public override void OnLoad()
    {
        SetName("_<mini>NPC</mini> Piano Player");
        SetRace(10001);
        SetFace(skin: 18, eye: 0, eyeColor: 49, lip: 48);
        SetLocation(52, 46224, 43756, 206);

        EquipItem(Pocket.Hair, 9200, 0x000000, 0, 0);
        EquipItem(Pocket.Face, 3900, 0, 0, 0);
        EquipItem(Pocket.Armor, 15001, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
        EquipItem(Pocket.Shoe, 220056, 0xFFFFFF, 0xFFFFFF, 0x000000);

        // Spawn piano
        var pos  = NPC.GetPosition();
        var prop = new MabiProp(44311, NPC.Region, pos.X, pos.Y, MabiMath.DirToRad(NPC.Direction));

        prop.State     = "stand";
        prop.ExtraData = string.Format("<xml OWNER='{0}' SITCHAR='{0}'/>", NPC.Id);
        SpawnProp(prop);

        // Sit
        NPC.Temp.SittingProp = prop;
        NPC.State           |= CreatureStates.SitDown;
    }