i need help here pliz in this condition

11/01/2011 03:54 thesamuraivega#1
Hi i need help here pliz

Code:
public static void cathdie(Network.GamePackets.Data generalData)
        {
            if (DateTime.Now.Second == 1 && signup == true)
            {
                Client.GameState[] Clients = Conquer_Online_Server.ServerBase.Kernel.GamePool.Values.ToArray();
                foreach (Client.GameState client in Clients)
                {
                    if (client.Entity.MapID == 10001 && client.Entity.Dead)
                    {
                        client.Entity.Action = Conquer_Online_Server.Game.Enums.ConquerAction.None;
                        client.ReviveStamp = Time32.Now;
                        client.Attackable = false;
                        client.Entity.TransformationID = 0;
                        client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Dead);
                        client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Ghost);
                        client.Entity.Hitpoints = client.Entity.MaxHitpoints;
                    }
                }
            }
        }
no work the condition pliz help! :S
i need auto revive players in x map
i have this code in my system killtheterrorist.cs i need put this in other .cs?
ty :)
11/01/2011 05:16 pro4never#2
are you actually running this method from anywhere? It seems kinda odd coding to me but that's just my own personal preference...


Personally I'd use some sort of delayed action system to say if user.Map.ContainsEffect(MapEffects.AutoRevive) user.DelayedActions.Add(ActionType.Revive, 10000);

Something like that but of course you'd need to write in the map effects system as well as the delayed actions system... a timer would work but I try to avoid using lots of them just as a rule.


You're issue is probably just you never actually calling this method.

Breakpoint it and you'll see if it's actually running this code ever. You could also just right click the method name and do 'find all references' to see where you're calling it from.
11/01/2011 06:03 thesamuraivega#3
Quote:
Originally Posted by pro4never View Post
are you actually running this method from anywhere? It seems kinda odd coding to me but that's just my own personal preference...


Personally I'd use some sort of delayed action system to say if user.Map.ContainsEffect(MapEffects.AutoRevive) user.DelayedActions.Add(ActionType.Revive, 10000);

Something like that but of course you'd need to write in the map effects system as well as the delayed actions system... a timer would work but I try to avoid using lots of them just as a rule.


You're issue is probably just you never actually calling this method.

Breakpoint it and you'll see if it's actually running this code ever. You could also just right click the method name and do 'find all references' to see where you're calling it from.
or you know how i can revive in x map and no in twincity? :confused:
ty men
11/01/2011 07:37 pro4never#4
Quote:
Originally Posted by thesamuraivega View Post
or you know how i can revive in x map and no in twincity? :confused:
ty men
I can guarentee your source has some sort of teleport method (look at scrolls or npcs which do it) and simply use that to send them to w/e map and coords you want rofl.