[Question]2vs2 PK match

08/06/2010 09:41 Fish*#16
Quote:
Originally Posted by ftp4life View Post
LoL well isnt that a method......... anyways uhm... ok so since

Checks if u have the members now making it so u can only have 2 team at once would be MUCH harder :) id have to set up teams like how wat that previous guy was saying to add Teamjoined1 and team Joined2..
try GC.MyChar.MyTeam <= 2
08/06/2010 19:25 Fish*#17
Quote:
Originally Posted by ThoughtZ View Post
are you retarded? then noone will be able to join, 2 and under...

kthxbai
u dont get it, ur thinking different then me.
neither me or u is wrong.

as u can change the statements places.
get ur facts first dude :)
08/07/2010 00:40 ftp4life#18
thanx grill mad lol now time to add a timer... :) but will be a lil harder i got the set up on adding the teams correct now i just need a timer to make it an event like maybe every 10 minutes or something... +credits to you and everyone in here :)

This is what i have gotten so far thanx to you all... Please feel free to fix any of my errors :) and plz help with a timer
08/07/2010 01:30 Fish*#19
Here is a timer.
Try edit it, so it fits for u :)
in MyThread.cs find:
PHP Code:
            interval Interval;
            
= new Thread(new ThreadStart(Run));
            
T.Start(); 
under it put:
PHP Code:
            System.Timers.Timer ATimer = new System.Timers.Timer(1000.0);
            
ATimer.Start();
            
ATimer.Elapsed += delegate TeamPKStart(); };
            
System.Timers.Timer BTimer = new System.Timers.Timer(1000.0);
            
BTimer.Start();
            
BTimer.Elapsed += delegate TeamPKEnd(); }; 
now anywhere in MyThread.cs put:
PHP Code:
        private static void TeamBCast(string msg)
        {
            foreach (
Character Char in World.H_Chars.Values)
            {
                
Char.MyClient.AddSend(Packets.ChatMessage(0"[TOURNY]""All"msg20110));
                
Char.MyClient.EndSend();
            }
        }
        public static 
bool PKStarter false;
        public static 
bool PKEnder false;
        public static 
void TeamPKStart()
        {
            
//To make it start every 10min, just make one for every 10min
            
if (DateTime.Now.Minute == 00 && PKStarter == false)//Change 00 to any minute in 1 hour from 00-59
            
{
                foreach (
Character Char in World.H_Chars.Values)//Char is all chars, for getting one type of char only write ex. if (Char.Level == 130)
                
{
                    
TeamBCast("Team PK Tournament have started.");
                    
PKStarter true;
                    
PKEnder false;
                    
//What ever starts tournament here
                
}
            }
        }
        public static 
void TeamPKEnd()
        {
            if (
DateTime.Now.Minute == 10 && PKEnder == false)//Change 10 to any minute in 1 hour from 00-59
            
{
                foreach (
Character Char in World.H_Chars.Values)//Char is all chars, for getting one type of char only write ex. if (Char.Level == 130)
                
{
                
TeamBCast("Team PK Tournament have ended!");
                
PKStarter false;
                
PKEnder true;
                
//What ever ends the tournament here
                
}
            }
        } 
08/07/2010 02:58 ftp4life#20
Quote:
Originally Posted by grillmad View Post
Here is a timer.
Try edit it, so it fits for u :)
in MyThread.cs find:
PHP Code:
            interval Interval;
            
= new Thread(new ThreadStart(Run));
            
T.Start(); 
under it put:
PHP Code:
            System.Timers.Timer ATimer = new System.Timers.Timer(1000.0);
            
ATimer.Start();
            
ATimer.Elapsed += delegate TeamPKStart(); };
            
System.Timers.Timer BTimer = new System.Timers.Timer(1000.0);
            
BTimer.Start();
            
BTimer.Elapsed += delegate TeamPKEnd(); }; 
now anywhere in MyThread.cs put:
PHP Code:
        private static void TeamBCast(string msg)
        {
            foreach (
Character Char in World.H_Chars.Values)
            {
                
Char.MyClient.AddSend(Packets.ChatMessage(0"[TOURNY]""All"msg20110));
                
Char.MyClient.EndSend();
            }
        }
        public static 
bool PKStarter false;
        public static 
bool PKEnder false;
        public static 
void TeamPKStart()
        {
            
//To make it start every 10min, just make one for every 10min
            
if (DateTime.Now.Minute == 00 && PKStarter == false)//Change 00 to any minute in 1 hour from 00-59
            
{
                foreach (
Character Char in World.H_Chars.Values)//Char is all chars, for getting one type of char only write ex. if (Char.Level == 130)
                
{
                    
TeamBCast("Team PK Tournament have started.");
                    
PKStarter true;
                    
PKEnder false;
                    
//What ever starts tournament here
                
}
            }
        }
        public static 
void TeamPKEnd()
        {
            if (
DateTime.Now.Minute == 10 && PKEnder == false)//Change 10 to any minute in 1 hour from 00-59
            
{
                foreach (
Character Char in World.H_Chars.Values)//Char is all chars, for getting one type of char only write ex. if (Char.Level == 130)
                
{
                
TeamBCast("Team PK Tournament have ended!");
                
PKStarter false;
                
PKEnder true;
                
//What ever ends the tournament here
                
}
            }
        } 
how would this start the timer for that single NPC lmao... :( just curiious sorry bro xD but anywayz in order for this to work i wuld need to add the voids into that npc correct?
08/07/2010 05:00 Fish*#21
use a bool in the npc to check.

ex.
if (TeamPK == true)
{
//Npc say: do you want to join tournament
}
else
{
//Npc say: there is no currently tournament
}

Else try take a look at .Summer, when i released my tdm script.
08/07/2010 08:14 ftp4life#22
god i love u grillmad :) and i was also trying to make it so rite once u die.. u get sent away into jail which failed xD.... ill thank you till i die! lol :) oh yea btw if i had this...
Code:
                        if (Loc.Map == 1005)
                        {
                            Attacker.HonorPoints += 15;
                            World.SendMsgToAll("SYSTEM", Name + " Congratulations! You Got 15 HonorPoint From TeamPK.", 2011, 0);
                        }
would adding this teleport them out once killed and make them lose points
Code:
                        if (Loc.Map == 1005)
                        {
                            Attacker.HonorPoints += 15;
                            World.SendMsgToAll("SYSTEM", Name + " Congratulations! You Got 15 HonorPoint From TeamPK.", 2011, 0);
                        }
                        else
                        {
                            GC.MyChar.Honorpoints -= 5;
                            GC.MyChar.Teleport(1505, 444, 444)
                            World.SendMsgToAll("SYSTEM", Name + " Congratulations! You Got 15 HonorPoint From TeamPK.", 2011, 0);
                        }
08/07/2010 16:45 Fish*#23
I can help you, I will give example on if mapid is arena.
Where u got that Attacker. thing
somewhere in that script put:

Code:
if (Loc.Map == 1005)
{
Teleport(6000, 55, 55);//Teleports the player who dies in jail
}
08/07/2010 18:13 ftp4life#24
ahh thats right i was thinking of Revive.Cs... but that wuld make more sense :/ lol thanks :)

I Put that code you said under this not 100pct if its in the right place but im sure you will help lol


I Searched for
Quote:
public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)
then found at the bottom of that void there was
Code:
                    Alive = false;
                    CurHP = 0;

                    if (AT != AttackType.Magic && !IsSkill)
                        World.Action(this, Packets.AttackPacket(Attacker.EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
                    World.Action(this, Packets.AttackPacket(Attacker.EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AttackType.Kill).Get);

                    StatEff.Remove(StatusEffectEn.Cyclone);
                    StatEff.Remove(StatusEffectEn.FatalStrike);
                    StatEff.Remove(StatusEffectEn.BlueName);
                    StatEff.Remove(StatusEffectEn.Flashy);
                    StatEff.Remove(StatusEffectEn.ShurikenVortex);
                    BlueName = false;
                    StatEff.Remove(StatusEffectEn.SuperMan);
                    StatEff.Remove(StatusEffectEn.XPStart);
                    StatEff.Remove(StatusEffectEn.Ride);
                    StatEff.Add(StatusEffectEn.Dead);
                    DeathHit = DateTime.Now;

                    if (PKPoints >= 1000)
                    World.SendMsgToAll("SYSTEM", Attacker.Name + " has captured " + Name + " and sent him to jail.", 2000, 0);
then i just added
Code:
                    Alive = false;
                    CurHP = 0;

                    if (AT != AttackType.Magic && !IsSkill)
                        World.Action(this, Packets.AttackPacket(Attacker.EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
                    World.Action(this, Packets.AttackPacket(Attacker.EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AttackType.Kill).Get);

                    StatEff.Remove(StatusEffectEn.Cyclone);
                    StatEff.Remove(StatusEffectEn.FatalStrike);
                    StatEff.Remove(StatusEffectEn.BlueName);
                    StatEff.Remove(StatusEffectEn.Flashy);
                    StatEff.Remove(StatusEffectEn.ShurikenVortex);
                    BlueName = false;
                    StatEff.Remove(StatusEffectEn.SuperMan);
                    StatEff.Remove(StatusEffectEn.XPStart);
                    StatEff.Remove(StatusEffectEn.Ride);
                    StatEff.Add(StatusEffectEn.Dead);
                    DeathHit = DateTime.Now;

                    [COLOR="Red"]if (Loc.Map == 1005)
                    {
                        HonorPoints -= 5;
                        Teleport(1505, 154, 218);//Teleports the player who dies in jail
                        World.SendMsgToAll("SYSTEM", Name + " Has Gained a DeathPoint.", 2011, 0);
                    }[/COLOR]
                    if (PKPoints >= 1000)
                    World.SendMsgToAll("SYSTEM", Attacker.Name + " has captured " + Name + " and sent him to jail.", 2000, 0);
08/07/2010 18:30 Fish*#25
Try make it
Code:
                    if (Loc.Map == 1005 && TEAMJOIN)//Change TEAMJOIN to a check for f u are signed up to the tournament
                    {
                        HonorPoints -= 5;
                        Teleport(6000, 55, 55);//Teleports the player who dies in jail
                        World.SendMsgToAll("SYSTEM", Name + " Has Gained a DeathPoint.", 2011, 0);
                    }
08/07/2010 21:40 ftp4life#26
in the red is the thing im stuck on is cuz there are two teams remember i have TeamJoined1 and TeamJoined2 or shuld i just place MyTeam
Quote:
Originally Posted by grillmad View Post
Try make it
Code:
                    if (Loc.Map == 1005 && [COLOR="Red"]TEAMJOIN[/COLOR])//Change TEAMJOIN to a check for f u are signed up to the tournament
                    {
                        HonorPoints -= 5;
                        Teleport(6000, 55, 55);//Teleports the player who dies in jail
                        World.SendMsgToAll("SYSTEM", Name + " Has Gained a DeathPoint.", 2011, 0);
                    }
yes that would work way better... but as i was setting that up the NPC wasnt checking if the tournament was even on in the first place so the npc wuldnt show dialouge well actually wuldnt open at all.... i used this
Code:
                                   if (Control == 0)
                                    {
                                        [COLOR="Red"]if (GC.MyChar.Job == 40 || GC.MyChar.Job == 41 || GC.MyChar.Job == 42 || GC.MyChar.Job == 43 || GC.MyChar.Job == 44 || GC.MyChar.Job == 45 || GC.MyChar.Job >= 100 || GC.MyChar.Job == 50 || GC.MyChar.Job == 51 || GC.MyChar.Job == 52 || GC.MyChar.Job == 53 || GC.MyChar.Job == 54 || GC.MyChar.Job == 55)[/COLOR]
                                        [COLOR="Red"]{
                                            GC.AddSend(Packets.NPCSay("You can't sign up, if you are archer, ninja or taoist."));
                                            GC.AddSend(Packets.NPCLink("Okay i see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }[/COLOR]
                                        [COLOR="Red"]else if (MyThread.PKStarter == true)[/COLOR]
                                        {
                                            GC.AddSend(Packets.NPCSay("Do you want enter the TeamPK Tournament, You Need A Team Of Two To Enter?"));
                                            GC.AddSend(Packets.NPCLink("Yes.", 1));
                                            GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
even this wasnt opening the NPC
08/08/2010 01:02 Fish*#27
Quote:
Originally Posted by ftp4life View Post
in the red is the thing im stuck on is cuz there are two teams remember i have TeamJoined1 and TeamJoined2 or shuld i just place MyTeam


yes that would work way better... but as i was setting that up the NPC wasnt checking if the tournament was even on in the first place so the npc wuldnt show dialouge well actually wuldnt open at all.... i used this
Code:
                                   if (Control == 0)
                                    {
                                        [COLOR="Red"]if (GC.MyChar.Job == 40 || GC.MyChar.Job == 41 || GC.MyChar.Job == 42 || GC.MyChar.Job == 43 || GC.MyChar.Job == 44 || GC.MyChar.Job == 45 || GC.MyChar.Job >= 100 || GC.MyChar.Job == 50 || GC.MyChar.Job == 51 || GC.MyChar.Job == 52 || GC.MyChar.Job == 53 || GC.MyChar.Job == 54 || GC.MyChar.Job == 55)[/COLOR]
                                        [COLOR="Red"]{
                                            GC.AddSend(Packets.NPCSay("You can't sign up, if you are archer, ninja or taoist."));
                                            GC.AddSend(Packets.NPCLink("Okay i see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }[/COLOR]
                                        [COLOR="Red"]else if (MyThread.PKStarter == true)[/COLOR]
                                        {
                                            GC.AddSend(Packets.NPCSay("Do you want enter the TeamPK Tournament, You Need A Team Of Two To Enter?"));
                                            GC.AddSend(Packets.NPCLink("Yes.", 1));
                                            GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
even this wasnt opening the NPC
the npc is not even getting open, because the check u used with bool. is for the bool to the timer.
make a new and use for the npc.
08/08/2010 01:33 ftp4life#28
so make a new class like that Team Death Match
08/08/2010 01:39 Fish*#29
ye u could do that :)
08/08/2010 01:47 ftp4life#30
rawr alot of more work AHAHA its ok lol... but would that mean id need to change the timer u set up for me?