Register for your free account! | Forgot your password?

You last visited: Today at 11:38

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

Advertisement



Problem With A Code

Discussion on Problem With A Code within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Hitsugaya Toshiro's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 116
Received Thanks: 42
Problem With A Code

Hey guys i been trying to figure out the Weekly Pk Event for all the classes

But im not sure if i quite got it ._. heres what i got so far

Code:
#region Pk Event
                                    if (DateTime.Now.DayOfWeek == DayOfWeek.Friday)
                                    {

                                        GC.MyChar.OpenWindow("Class pk war is about to begin! Will you join it?");
                                        GC.AddSend(Packets.NPCLink("Yes", 2));
                                        GC.AddSend(Packets.NPCLink("No", 255));

                                    }
                                    if (Control == 2)

                                        GC.MyChar.(Class == 55);
                                        GC.MyChar.Teleport(MAP ID, CORDS, CORDS);

                                    {
                                 }
                                 break;
                             }
                                    #endregion
If anyone can help pleas do it would be nice ._.
Hitsugaya Toshiro is offline  
Thanks
1 User
Old 12/09/2009, 04:51   #2
 
hunterman01's Avatar
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Here you go fixed it up a little bit

Code:
#region Pk Event
                            case 77777:
                                {
                                    if (DateTime.Now.DayOfWeek == DayOfWeek.Friday)
                                    {
                                        if (Control == 0)
                                        {

                                        GC.AddSend(Packets.NPCSay("Class pk war is about to begin! Will you join it?"));
                                        GC.AddSend(Packets.NPCLink("Yes", 1));
                                        GC.AddSend(Packets.NPCLink("No", 255));
                                        }

                                    }
                                    if (Control == 1)
                                    {

                                        GC.MyChar.Job = 55;
                                        GC.MyChar.Teleport(MAP ID, CORDS, CORDS);
                                    }
                                    break;
                                }
                                    #endregion
hunterman01 is offline  
Thanks
2 Users
Old 12/09/2009, 06:34   #3
 
Hitsugaya Toshiro's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 116
Received Thanks: 42
Smile

@Hunterman01 thanks man
Hitsugaya Toshiro is offline  
Old 12/09/2009, 10:56   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
That should work for the npc. To control scores and who is taking part in the actual event you can use a hashtable to link character UID with their score (if you are doing a kill/hit based event) or simply have a binary 1/0 score system to see if they are still qualified to be in the event (aka if they die they are out of the event and when only 1 player exists with a specified value in the hash table, they are the winner)

Then just use a for each loop based on all connected clients to control adding/reading who is taking part in the actual event.


Good luck. The basic system for it shouldn't be super complicated. Only part that bugged me when I was doing it was controlling all the timers/conditions... then again I think I was writing it at 4 am as a break from midterm studying... so that prob explains most of my problems :P
pro4never is offline  
Old 12/09/2009, 17:17   #5
 
Hitsugaya Toshiro's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 116
Received Thanks: 42
Quote:
Originally Posted by pro4never View Post
That should work for the npc. To control scores and who is taking part in the actual event you can use a hashtable to link character UID with their score (if you are doing a kill/hit based event) or simply have a binary 1/0 score system to see if they are still qualified to be in the event (aka if they die they are out of the event and when only 1 player exists with a specified value in the hash table, they are the winner)

Then just use a for each loop based on all connected clients to control adding/reading who is taking part in the actual event.


Good luck. The basic system for it shouldn't be super complicated. Only part that bugged me when I was doing it was controlling all the timers/conditions... then again I think I was writing it at 4 am as a break from midterm studying... so that prob explains most of my problems :P
Well i know im trying to make it work tight but as you can see im not so good ._.
Hitsugaya Toshiro is offline  
Reply


Similar Threads Similar Threads
vb.net - problem im code
03/16/2010 - .NET Languages - 2 Replies
Hey Leute Um mich ein bisschen in XNA und Visual Basic umzuschauen hab ich versucht das Platform Game - Beispiel von C# XNA Game Studio zu übersetzen (gibt im inet en übersetzer, is recht leicht weil ja beide codes in einen gleichen zwischencode übersetzt werden beim compilieren) so, nun hab ich alle klasen übersetzt und hinzugefügt, zeigt auch keine fehler an außer bei einer Zeile: Imports System Imports Microsoft.Xna.Framework Imports Microsoft.Xna.Framework.Graphics Namespace...
Finding the problem with this code...
10/16/2009 - AutoIt - 1 Replies
Hi, i was trying something basic with this code but it does not seem to work and i would like to know if any experienced people with AutoIT and user32.dll could help me out... i found this code in this forums and was trying to send "o down and up" to notepad basic getting it is handle using the window title. I DO realise that there is SEND and CONTROLSEND but that does not solve my problem it has to be with user32.dll Thanks for any help.
Mob appear code, problem with bot IQ
08/30/2009 - Kal Online - 12 Replies
Hello, I've got problem with my bot IQ. Sometimes he is trying to attack mobs on map that are not visible (used 2nd kal client to check it). Sometimes he dont see the nearest mob near him. Especially when aggresive mobs attack my bot. I've filtered the mob list and when X or Y are inproper like: Mob: ID 19351432 X 233 Y 256555 Z 0 HP 207 Mob: ID 1483628888 X 16805481 Y 260840 Z 0 HP 3 Mob: ID 19298786 X -66 Y 257724 Z 0 HP 243
Problem|Error CODE 2 ;(
05/05/2009 - SRO Private Server - 1 Replies
i Install Srogame ver 1.091 and Download the Media.pk2 for NEW and OLD Server Sjsro, and I have some problem Error CODE 2 Soemone tell me Remove the AntiVirus i deleted and the problem was again .. Picture : http://www.siz.co.il/my.php?i=ngzyhjwylerf.bmp Siz - äòìàú úîåðåú | ôúéçú âìøéåú
Code-Problem
02/21/2008 - General Coding - 22 Replies
Hi leute ich hab ma ne frage, weis einer von euch wie ich in einer index-Datei an geben muss, das man was downloaden kann?? weil ich will ne index schreiben, das man sich verschiedene schachen von meinem FTP ziehen kann!! ^^ nur ich weis leider den Befahl net, das das dann funzt!! Bitte um hilfe!!



All times are GMT +1. The time now is 11:38.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.