Register for your free account! | Forgot your password?

You last visited: Today at 13:30

  • Please register to post and access all features, it's quick, easy and FREE!


What is wrong with this?

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2006
Posts: 532
Received Thanks: 66
What is wrong with this?

Ok it`s not actually giving my archer char the halo?

Code:
else if (Control == 1)
                                    {
                                        if (DateTime.Now.DayOfWeek == DayOfWeek.Friday)
                                        {
                                            if (GC.MyChar.Job == 40 && GC.MyChar.Job == 45 && (DateTime.Now.Hour == 23 && DateTime.Now.Minute >= 30))
                                            {
                                                GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
                                                GC.MyChar.CPs += 3000;
                                                GC.Message(2005, GC.MyChar.Name + "Has won the TopArcher Congratulations");
                                                GC.MyChar.Teleport(1002, 429, 378);
                                                GC.AddSend(Packets.NPCSay("Good luck and be carefull"));
                                                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                                try
                                                {
                                                    StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopArcher.txt");
                                                    sw.WriteLine("" + GC.MyChar.EntityID + "#1099511627776");
                                                    sw.Close();
                                                }
                                                catch (Exception e)
                                                {
                                                    Console.WriteLine(e.Message);
                                                }
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You can Take it Later at 20:10"));
                                                GC.AddSend(Packets.NPCLink("sorry", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                    }



WHITELIONX is offline  
Old 02/06/2010, 00:37   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,268
if (GC.MyChar.Job == 40) || ( GC.MyChar.Job == 45) && (DateTime.Now.Hour == 23 && DateTime.Now.Minute >= 30))

You were using an and statement isntead of an or.


Arcо is offline  
Old 02/06/2010, 01:56   #3
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Also it has to be directly on that mintue or its not gonna work
hunterman01 is offline  
Thanks
1 User
Old 02/06/2010, 18:06   #4
 
elite*gold: 0
Join Date: Apr 2006
Posts: 532
Received Thanks: 66
Yup hunterman I know I tried that arco but it gave me a few errors >.< call incriment I think and missing ; several times etc.


WHITELIONX is offline  
Old 02/06/2010, 18:21   #5
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 320
Code:
StreamWriter sw = new StreamWriter("C:\OldCODB\Tops\TopArcher.txt");
Also dont Add

Code:
GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
When it writes it it loads it and gives it to the char,
-Shunsui- is offline  
Old 02/06/2010, 20:12   #6
 
elite*gold: 0
Join Date: Sep 2008
Posts: 17
Received Thanks: 1
try

if (((GC.MyChar.Job >= 40) && ( GC.MyChar.Job <= 45)) && (DateTime.Now.Hour == 23 && DateTime.Now.Minute >= 30))


metalfa_n1 is offline  
Reply



« [Help] someone has the system to lock the items | 5165 Damage issues »

Similar Threads
Is something wrong with SRO?
12/17/2009 - SRO Ask the Experts - 4 Replies
Hey guys, as topic says, is something going wrong with sro, both of my chars just got dced and now i can't even launch sro either from my loader or from my original client. EDIT : and i can't even enter SRO website
WTf is wrong with C#
10/03/2008 - CO2 PServer - Discussions / Questions - 4 Replies
Help pls I am trying to add code to my client.cs but when i restart the server the changes i made r not there...what am i doing wrong? I think i need to build, but no build option avail so all i can do is save changes...and that doesnt seem to work...



All times are GMT +2. The time now is 13:30.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.