Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:01

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

Advertisement



[Help] Anti-Abuse Gm/Pm

Discussion on [Help] Anti-Abuse Gm/Pm within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
[Help] Anti-Abuse Gm/Pm

Hi,

Im using Source 5165.
In the source GM/PM Can't trade, can't drop and can't PK. But they can still drop when they get kill, and buy item in Personnal Shop of players.

So i tried to fix that.
On my server Guard 1 Hit Everybody who get blue name:

Quote:
if (Mesh == 900 && PlayerTarget.BlueName)
PlayerTarget.CurHP = 0;
But they 1 hit Gm under /protection too. I would like to make that if a GM or Pm is Bluename they don't attack him. But i just began to C# ( Gm can't attack players but can attack Guards and become blue name. The prohibit guard scrip on this forum, spam my console, and make some bugs like people can't pk sometimes.)

Or maybe Someone know how to make Gm/Pm Invincible in .cs. Without command.

2nd Thing is to make Gm/Pm unable to Buy player's items in stalls ( personnal shops market)

So i tried in packetHandler.cs:

Quote:
case 24:
{
uint ItemUID = BitConverter.ToUInt32(Data, 4);
uint StallID = BitConverter.ToUInt32(Data, 8);

if (Game.World.H_PShops.Contains(StallID))
{
Features.PersonalShops.Shop S = (Features.PersonalShops.Shop)Game.World.H_PShops[StallID];
S.Buy(ItemUID, GC.MyChar);
}
else if (GC.GM)
{
GC.AddSend(Packets.ChatMessage(0, "SYSTEM", GC.MyChar.Name, "You're GM, you can't buy player's Items!", 2001, 0));
return;
}
break;
}
Don't work. I tried lot of possibility and i always can buy...

I know it can seems easy for you, but i begin i try to learn.
So if someone can or want to help me with the code, i think it will help others people too. Thx
flex30 is offline  
Old 06/18/2010, 20:06   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
errrr
Code:
case 24:
{
uint ItemUID = BitConverter.ToUInt32(Data, 4);
uint StallID = BitConverter.ToUInt32(Data, 8);

if (Game.World.H_PShops.Contains(StallID))
{
if (!GC.GM)
{
Features.PersonalShops.Shop S = (Features.PersonalShops.Shop)Game.World.H_PShops[StallID];
S.Buy(ItemUID, GC.MyChar);
}
else
{
GC.AddSend(Packets.ChatMessage(0, "SYSTEM", GC.MyChar.Name + " you are a " + GC.MyChar.AuthInfo.Status + " you cannot buy items ", 2011, 0));
}
}
break;
}
I'll think about how the other one is dont why done u just do
Code:
if (PlayerTarget.BlueName = true && (PlayerTarget.AuthInfo != ("GM") && (PlayerTarget.AuthInfo != ("PM")))
_DreadNought_ is offline  
Old 06/18/2010, 20:22   #3
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Quote:
if (PlayerTarget.BlueName = true && (PlayerTarget.AuthInfo != ("GM") && (PlayerTarget.AuthInfo != ("PM")))
You didn't put the mesh of guard.

So i tried:

Quote:
if (Mesh == 900 && PlayerTarget.BlueName = true && (PlayerTarget.AuthInfo != ("GM") && (PlayerTarget.AuthInfo != ("PM")))
But i get an error :
Quote:
Error 1 Operator '!=' cannot be applied to operands of type 'method group' and 'string' C:\CoSX\CoSX\Game\Mob.cs 854 69 CoSX
flex30 is offline  
Old 06/18/2010, 20:39   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Code:
if (Mesh == 900 && PlayerTarget.BlueName = true)
{
//;
}
else if (Mesh == 900 && (PlayerTarget.AuthInfo.Status != ("GM")))
{
return;
}
_DreadNought_ is offline  
Old 06/18/2010, 21:00   #5
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Don't works lol

Quote:
Error 1 'CoSX.Game.Character.AuthInfo(string)' is a 'method', which is not valid in the given context C:\CoSX\CoSX\Game\Mob.cs 854 87 CoSX
flex30 is offline  
Old 06/18/2010, 21:38   #6
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
uhhh
Make it this
in Character.cs add under
Code:
DateTime LastSave = DateTime.Now;
add
Code:
public bool GmPmBlueName = false;
In Chat.cs under
Code:
if (Cmd[0] == "/guard")
                        {
                            StreamWriter SW = new StreamWriter(@"C:\CoSX\Database\MobSpawns.txt", true);
                            SW.WriteLine(97 + " " + 1 + " " + GC.MyChar.Loc.Map + " " + GC.MyChar.Loc.X + " " + GC.MyChar.Loc.Y + " " + GC.MyChar.Loc.X + " " + GC.MyChar.Loc.Y);
                            SW.Flush();
                            SW.Close();
                        }
Add
Code:
                        if (Cmd[0] == "/falsee")
                        {
                            GC.MyChar.GmPmBlueName = true;
                        }
And make the shit in mob.cs this
Code:
if (Mesh == 900 && (PlayerTarget.BlueName = true && (PlayerTarget.GmPmBlueName == true)))
                    {
There they use /falseee and they cant be attacked by guard :P
_DreadNought_ is offline  
Old 06/18/2010, 21:45   #7
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
lol but if you do that they can get killed by guard when they want and drop items, and so players can pick them up lol

Or if you know how to make that Gm can't be bluename maybe it would be easier lol

So If a GM or Pm attack a guard he will not flash blue.
flex30 is offline  
Old 06/18/2010, 21:49   #8
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
ermmmmm I will quickly do the can't drop thing btw for auto-no bluename just do
Code:
if (Mesh == 900 && (PlayerTarget.BlueName = true && (PlayerTarget.MyClient.AuthInfo.Status != ("GM") || (PlayerTarget.MyClient.AuthInfo.Status != ("PM"))))
                    {
I'll look into letting them not be bluenamed

Bluenamed shit
Code:
if (Type == MobBehaveour.HuntBlueNames || Type == MobBehaveour.HuntMobsAndBlue)
            {
                Attacker.BlueName = true;
                if (Attacker.BlueNameLasts < 60)
                    Attacker.BlueNameLasts = 15;
            }
Make that
Code:
if (Type == MobBehaveour.HuntBlueNames || Type == MobBehaveour.HuntMobsAndBlue)
            {
                if (!Attacker.MyClient.GM)
                {
                    Attacker.BlueName = true;
                    if (Attacker.BlueNameLasts < 60)
                        Attacker.BlueNameLasts = 15;
                }
            }
Find
Code:
if (Type != MobBehaveour.HuntMobsAndBlue || C.BlueName)
                                            {
                                                NDist = (byte)MyMath.PointDistance(Loc.X, Loc.Y, C.Loc.X, C.Loc.Y);
                                                PlayerTarget = C;
                                            }
Make that
Code:
if (Type != MobBehaveour.HuntMobsAndBlue || C.BlueName && !C.MyClient.GM)
                                            {
                                                NDist = (byte)MyMath.PointDistance(Loc.X, Loc.Y, C.Loc.X, C.Loc.Y);
                                                PlayerTarget = C;
                                            }
Find
Code:
if (PlayerTarget != null && (PlayerTarget.CanBeMeleed || AtkType != AttackType.Melee) && PlayerTarget.Alive && PlayerTarget.MyClient != null && MyMath.PointDistance(Loc.X, Loc.Y, PlayerTarget.Loc.X, PlayerTarget.Loc.Y) < Math.Max(15, (int)AttackDist) && (Type != MobBehaveour.HuntMobsAndBlue || PlayerTarget.BlueName))
                    {
Make that
Code:
if (PlayerTarget != null && (PlayerTarget.CanBeMeleed || AtkType != AttackType.Melee) && PlayerTarget.Alive && PlayerTarget.MyClient != null && MyMath.PointDistance(Loc.X, Loc.Y, PlayerTarget.Loc.X, PlayerTarget.Loc.Y) < Math.Max(15, (int)AttackDist) && (Type != MobBehaveour.HuntMobsAndBlue || PlayerTarget.BlueName && !PlayerTarget.MyClient.GM))
                    {
Find
Code:
if (Type == MobBehaveour.HuntBlueNames || Type == MobBehaveour.HuntMobsAndBlue)
                    return true;
make that
Code:
if (Type == MobBehaveour.HuntBlueNames || Type == MobBehaveour.HuntMobsAndBlue && !PlayerTarget.MyClient.GM)
                    return true;
And for not dropping
find
Code:
f (!World.FreePKMaps.Contains(Loc.Map))
                    LoseInvItemsAndSilvers();
make that
Code:
f (!World.FreePKMaps.Contains(Loc.Map) && !MyClient.GM)
                    LoseInvItemsAndSilvers();
DONE!
_DreadNought_ is offline  
Old 06/18/2010, 22:26   #9
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Your code for not dropping don't work.

BUT! My Gm can't be blue name anymore and can't attack guard. it still stay that if a Gm be kileld by a monster it can die. So maybe there is a way to take the cde of /protect and make that when a gm log in they get the protect staut automaticaly, and i delete the /protect command?

And for the other problem i rly don't find how to fix it >.<

GM can buy items in personal shop at market. So Users can sell an item for 100000cp and the gm buy it :/
flex30 is offline  
Old 06/18/2010, 23:32   #10
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Right ive done too much work for you
Code:
case 24:
{
uint ItemUID = BitConverter.ToUInt32(Data, 4);
uint StallID = BitConverter.ToUInt32(Data, 8);

if (Game.World.H_PShops.Contains(StallID))
{
if (!GC.GM)
{
Features.PersonalShops.Shop S = (Features.PersonalShops.Shop)Game.World.H_PShops[StallID];
S.Buy(ItemUID, GC.MyChar);
}
else
{
GC.AddSend(Packets.ChatMessage(0, "SYSTEM", GC.MyChar.Name + " you are a " + GC.MyChar.AuthInfo.Status + " you cannot buy items ", 2011, 0));
}
}
break;
}
_DreadNought_ is offline  
Old 06/19/2010, 11:26   #11
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Quote:
Originally Posted by Eliminationn View Post
Right ive done too much work for you
Yea, and thanks to you, now my gm can't help players with items or cps ;p
And hopefully there is people like you here.

I think i'll find where to put the /protection code to make GM/Pm invincible when they login and i'll post it, can always help someone.
If someone find before me don't hesitate to post it
flex30 is offline  
Old 06/19/2010, 12:20   #12
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
uhhhhhhhhhh
In teleport.cs add
[CODE]
if (GC.MyChar.Name.Contains("GM"))
{
GC.MyChar.Protection = true
}
_DreadNought_ is offline  
Thanks
1 User
Old 06/19/2010, 12:45   #13
 
elite*gold: 0
Join Date: May 2007
Posts: 35
Received Thanks: 6
Quote:
Originally Posted by Eliminationn View Post
uhhhhhhhhhh
In teleport.cs add
[CODE]
if (GC.MyChar.Name.Contains("GM"))
{
GC.MyChar.Protection = true
}
didn't work so i tried:

Quote:
if (GC.AuthInfo.Status == "[PM]" || GC.AuthInfo.Status == "[GM]")
{
GC.MyChar.Protection = true;
}
And it works !! Thanks to your help really!
flex30 is offline  
Old 06/19/2010, 13:37   #14
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Unexpected to see ppl helpin eachother o.O WTF has happened to epvpers =O

My whole respect to you Elimination
~Yuki~ is offline  
Thanks
1 User
Old 06/19/2010, 15:20   #15
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Thanks Yuki!

I help people with what I can.
_DreadNought_ is offline  
Reply


Similar Threads Similar Threads
Anti Recoil+Anti flash+anti smoke+Clear scope
03/07/2010 - Soldier Front Hacks, Bots, Cheats & Exploits - 12 Replies
Hi guys my brother making hack new not me image program 1. open the program 2.select all 3.open soldier front virus scan
Anti Recoil+Anti flash+anti smoke+Clear scope
03/06/2010 - Soldier Front - 2 Replies
Hi guys my brother making hack new not me image program http://img519.imageshack.us/img519/1492/wwwwo.jpg 1. open the program 2.select all 3.open soldier front virus scan



All times are GMT +1. The time now is 16:02.


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

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