Register for your free account! | Forgot your password?

You last visited: Today at 08:16

  • 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   #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   #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   #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   #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   #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



« Previous Thread | Next Thread »

Similar Threads
Is something wrong with SRO?
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...
4 Replies - SRO Ask the Experts
WTf is wrong with C#
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...
4 Replies - CO2 PServer - Discussions / Questions



All times are GMT +2. The time now is 08:16.


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.