Register for your free account! | Forgot your password?

You last visited: Today at 03:38

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

Advertisement



[Release] Broadcast

Discussion on [Release] Broadcast within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
[Release] Broadcast

Well first of all, The broadcast release by ArcherMaster didn't work for me.. So I just made my own

This code is better, Because you can't broadcast in botjail.. Nor spam the broadcast..

Lets get started
In, Client.cs Search
Code:
public class Client
    {
After that add;
Code:
public DateTime CanBroadcastTime = DateTime.Now;
        public bool CanBroadcast = true;

Now search for "case 2050:"

Replace the entire case with;

Code:
case 2050:
                        {
                            if (MyChar.LocMap == 6001 || MyChar.LocMap == 6000)
                            {
                                SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You can't do that here!", 2005));
                            }
                            else
                            {
                                if (!CanBroadcast)
                                    if (DateTime.Now >= CanBroadcastTime)
                                        CanBroadcast = true;
                                if (CanBroadcast)
                                {
                                    if (Data[4] == 3 && MyChar.CPs >= 5)
                                    {
                                        MyChar.CPs -= 5;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                        byte Len = Data[13];
                                        string Message = "";
                                        for (int i = 0; i < Len; i++)
                                        {
                                            Message += Convert.ToChar(Data[14 + i]);
                                        }
                                        World.SendMsgToAll(Message, MyChar.Name, 2500);
                                        SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Message sent successfully!.", 2005));
                                        CanBroadcast = false;
                                        CanBroadcastTime = DateTime.Now.AddSeconds(20);
                                    }
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Please wait to send your message!", 2005));
                                }
                            }
                            break;
                        }
If I helped you press `Thanks'
Vortex. is offline  
Thanks
4 Users
Old 05/18/2009, 22:45   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
lol you probaly copied the whole thing all you had to do was change the chat type from like 2000 to 2500
PeTe Ninja is offline  
Old 05/18/2009, 22:48   #3
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
This is from Cov2
Pete1990 is offline  
Old 05/18/2009, 23:11   #4
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
@ Petee didn't even download CoV2.. Cause of the bad reviews..

@PeTe Yeah I knew that.. Even AlexBigFoot tried.. And it didn't work.. Anyway this method is better to me
Vortex. is offline  
Old 05/19/2009, 05:21   #5
 
elite*gold: 0
Join Date: Jun 2008
Posts: 20
Received Thanks: 0
hey vortex where can i put this codes and where can i find client.cs or character.cs? plz reply back asap!
vladrage08 is offline  
Old 05/19/2009, 09:29   #6
 
leavemealone's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 2,168
Received Thanks: 8,593
I have to say, Over time all the Broadcasts scripts posted have the most basic broadcast systems. It's not very hard to write a broadcast system that supports a queue system.
leavemealone is offline  
Old 05/19/2009, 21:15   #7
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
Quote:
Originally Posted by vladrage08 View Post
hey vortex where can i put this codes and where can i find client.cs or character.cs? plz reply back asap!
LOL..
Vortex. is offline  
Old 05/19/2009, 21:34   #8
 
LetterX's Avatar
 
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
Quote:
Originally Posted by vladrage08 View Post
hey vortex where can i put this codes and where can i find client.cs or character.cs? plz reply back asap!
You find "Client.cs" and "Character.cs" in the LOTF source.

But considering you just asked that question; I recommend learning C# first or AT LEAST get a basic understanding of it X_X
LetterX is offline  
Old 05/19/2009, 22:30   #9
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by LetterX View Post
You find "Client.cs" and "Character.cs" in the LOTF source.

But considering you just asked that question; I recommend learning C# first or AT LEAST get a basic understanding of it X_X
Take your own advice plz.
tao4229 is offline  
Old 05/19/2009, 23:58   #10
 
elite*gold: 0
Join Date: Jul 2008
Posts: 215
Received Thanks: 44
does this let me do free broadcast?
bigjesse is offline  
Old 05/20/2009, 01:35   #11
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
Nope, but edit the code and you can
Vortex. is offline  
Old 05/30/2009, 18:23   #12
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 705
Quote:
Originally Posted by Vortex. View Post
Code:
case 2050:
                        {
                            if (MyChar.LocMap == 6001 || MyChar.LocMap == 6000)
                            {
                                SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You can't do that here!", 2005));
                            }
                            else
                            {
                                if (!CanBroadcast)
                                    if (DateTime.Now >= CanBroadcastTime)
                                        CanBroadcast = true;
                                if (CanBroadcast)
                                {
                                    if (Data[4] == 3 && MyChar.CPs >= 5)
                                    {
                                        MyChar.CPs [COLOR="Red"]-= 5;[/COLOR]
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                        byte Len = Data[13];
                                        string Message = "";
                                        for (int i = 0; i < Len; i++)
                                        {
                                            Message += Convert.ToChar(Data[14 + i]);
                                        }
                                        World.SendMsgToAll(Message, MyChar.Name, 2500);
                                        SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Message sent successfully!.", 2005));
                                        CanBroadcast = false;
                                        CanBroadcastTime = DateTime.Now.AddSeconds(20);
                                    }
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Please wait to send your message!", 2005));
                                }
                            }
                            break;
                        }
if you want to make it free change -=5 ; into -=0 ; and your done
turk55 is offline  
Old 05/30/2009, 18:33   #13
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Quote:
if (MyChar.LocMap == 6001 || MyChar.LocMap == 6000)
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You cannot broadcast in here",2005));
else
{
if (DateTime.Now >= BroadCast.AddSeconds(10))
{
if (Data[4] == 3 && MyChar.CPs >= 5)
{
MyChar.CPs -= 5;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
string Message = "";
for (int i = 0; i < Data[13]; i++)
{
Message += Convert.ToChar(Data[14 + i]);
}
World.SendMsgToAll(Message, MyChar.Name, 2500);
}
else
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Please wait a few seconds before broadcasting again!",2005));

}

that's what I had in my old old old old old old old old old old LOTF source, probably is better.
_Emme_ is offline  
Old 06/08/2009, 02:26   #14
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
Hows it better?
Vortex. is offline  
Old 08/12/2010, 23:10   #15
 
elite*gold: 0
Join Date: Jul 2010
Posts: 7
Received Thanks: 0
Don't work for me.
syko666 is offline  
Reply


Similar Threads Similar Threads
GM BroadCast
02/17/2011 - EO PServer Hosting - 24 Replies
Has Any1 Found A Fix To The GM broadcast Command? Mine Doesn't Work Just says in pink
[RELEASE]Fix broadcast spam
05/01/2010 - CO2 PServer Guides & Releases - 21 Replies
This is for LOTF 5017, because im currently working on fixing the most things in it. So, i will release some of the stuff. Here is how to fix broadcast, so you can't spam it. Just wondered why it never was fixed. This should work, but is not tested yet. First in World.cs find public static Hashtable GWScores = new Hashtable(); Below it add: public static bool BroadcastSend = false; public static bool Broadcast = false;
[Release] Real Broadcast (Same as in Real Co)
04/04/2009 - CO2 PServer Guides & Releases - 36 Replies
hey my first release since im back at epvp and the owner from copals asked me for this (that is the reason why i quited his team) so here is the release from the real broadcast. Requirements: one of the lotf sources eyes hands first open the project from your source and go to client.cs, then search for; MyChar.CPs -= 5; you will see the broadcast stuff and replace the whole case for;



All times are GMT +1. The time now is 03:39.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.