Esempio n. 1
0
        public static void Main()
        {
            var dm       = NWGameObject.OBJECT_SELF;
            var area     = NWNXEvents.OnDMSpawnObject_GetArea();
            var areaName = GetName(area);
            var obj      = NWNXEvents.OnDMSpawnObject_GetObject();
            var objName  = GetName(obj);
            var type     = NWNXEvents.OnDMSpawnObject_GetObjectType();
            var x        = NWNXEvents.OnDMSpawnObject_GetPositionX();
            var y        = NWNXEvents.OnDMSpawnObject_GetPositionY();
            var z        = NWNXEvents.OnDMSpawnObject_GetPositionZ();

            WriteLog(dm, "Spawn Object", $"{areaName} - {objName} - {type} - ({x}, {y}, {z})");
        }
Esempio n. 2
0
        private static string ProcessEventAndBuildDetails(int eventID)
        {
            string   details = string.Empty;
            NWObject target;
            int      amount;

            switch (eventID)
            {
            case 1:     // Spawn Creature
                string     areaName     = NWNXEvents.OnDMSpawnObject_GetArea().Name;
                NWCreature creature     = NWNXEvents.OnDMSpawnObject_GetObject().Object;
                int        objectTypeID = NWNXEvents.OnDMSpawnObject_GetObjectType();
                float      x            = NWNXEvents.OnDMSpawnObject_GetPositionX();
                float      y            = NWNXEvents.OnDMSpawnObject_GetPositionY();
                float      z            = NWNXEvents.OnDMSpawnObject_GetPositionZ();
                creature.SetLocalInt("DM_SPAWNED", _.TRUE);
                details = areaName + "," + creature.Name + "," + objectTypeID + "," + x + "," + y + "," + z;
                break;

            case 22:     // Give XP
                amount  = NWNXEvents.OnDMGiveXP_GetAmount();
                target  = NWNXEvents.OnDMGiveXP_GetTarget();
                details = amount + "," + target.Name;
                break;

            case 23:     // Give Level
                amount  = NWNXEvents.OnDMGiveLevels_GetAmount();
                target  = NWNXEvents.OnDMGiveLevels_GetTarget();
                details = amount + "," + target.Name;
                break;

            case 24:     // Give Gold
                amount  = NWNXEvents.OnDMGiveGold_GetAmount();
                target  = NWNXEvents.OnDMGiveGold_GetTarget();
                details = amount + "," + target.Name;
                break;
            }

            return(details);
        }