Register for your free account! | Forgot your password?

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

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

Advertisement



How to stop people from spamming marriage

Discussion on How to stop people from spamming marriage within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 01/15/2018, 18:26   #16
 
elite*gold: 0
Join Date: Jul 2013
Posts: 37
Received Thanks: 2
Quote:
Originally Posted by turk55 View Post
OMG! That is so amazing! You only did it in 20 hours!!!
Didn't notice the sarcasme?

Topic can be closed anyway as the problem was solved. Thanks
~OwnageBoy is offline  
Old 01/19/2018, 05:21   #17
 
m e n a's Avatar
 
elite*gold: 0
Join Date: Apr 2007
Posts: 137
Received Thanks: 57
Debating society. 😂😂
Missed you guys.
m e n a is offline  
Old 01/19/2018, 14:15   #18
 
Ultimation's Avatar
 
elite*gold: 0
Join Date: Mar 2005
Posts: 1,425
Received Thanks: 1,565
Quote:
Originally Posted by ~OwnageBoy View Post
This is the code i'm currently using. You can send out invites to several chars and press ''Marry'' on all chars and it will have marriage to all the chars. Where can i put another check to make it stop being able to marry more than 1 char?

PHP Code:
 public class Marriage
    
{
        public static 
void Handle(Main.GameClient GCbyte[] Data)
        {
            
uint AttackType BitConverter.ToUInt32(Data20);

            if (
AttackType == 8)
            {
                
uint TargetUID BitConverter.ToUInt32(Data12);
                
Game.Character TargetMarry null;

                if (
Game.World.H_Chars.ContainsKey(TargetUID))
                    
TargetMarry Game.World.H_Chars[TargetUID];
                if (
TargetMarry == null)
                    return;

                if (
GC.MyChar.Spouse != "None" && GC.MyChar.Spouse != " " && GC.MyChar.Spouse != "")
                {
                    
GC.LocalMessage(2005"You are married."); return;
                }
                if (
TargetMarry.Spouse != "None" && TargetMarry.Spouse != " " && TargetMarry.Spouse != "")
                {
                    
GC.LocalMessage(2005"The target is married."); return;
                }
                if ((
TargetMarry.Body == 1003 || TargetMarry.Body == 1004) && (GC.MyChar.Body == 1003 || GC.MyChar.Body == 1004))
                {
                    
GC.LocalMessage(2005"No male and male marriage is permited!"); return;
                }
                if ((
TargetMarry.Body == 2001 || TargetMarry.Body == 2002) && (GC.MyChar.Body == 2001 || GC.MyChar.Body == 2002))
                {
                    
GC.LocalMessage(2005"No female and female marriage is permited!"); return;
                }

                
TargetMarry.MyClient.AddSend(Packets.AttackPacket(GC.MyChar.EntityIDTargetMarry.EntityIDTargetMarry.Loc.XTargetMarry.Loc.Y08));
            }
            else if (
AttackType == 9)
            {
            
                
uint TargetUID BitConverter.ToUInt32(Data12);
                
Game.Character TargetMarry null;
               
                if (
Game.World.H_Chars.ContainsKey(TargetUID))
                    
TargetMarry Game.World.H_Chars[TargetUID];
              
                
TargetMarry.Spouse GC.MyChar.Name;
                    
GC.MyChar.Spouse TargetMarry.Name;
                
TargetMarry.MyClient.AddSend(Packets.String(TargetMarry.EntityID6TargetMarry.Spouse));
                
GC.AddSend(Packets.String(GC.MyChar.EntityID6GC.MyChar.Spouse));
               
                
Database.SaveCharacter(TargetMarryTargetMarry.MyClient.AuthInfo.Account);
                
Database.SaveCharacter(GC.MyCharGC.AuthInfo.Account);
                if (
GC.MyChar.Body == 1003 || GC.MyChar.Body == 1004)
                    
Game.World.SendMsgToAll("SYSTEM"GC.MyChar.Name " and " TargetMarry.Name " are married now."20050);
                else
                    
Game.World.SendMsgToAll("SYSTEM"TargetMarry.Name " and " GC.MyChar.Name " are married now."20050);
            }
        }
    }

ALL OF THIS could be replaced with

Code:
if ((target.Body / 1000) == (Gc.MyChar.Body / 1000))
{
GC.LocalMessage(2005, "You cannot marry the same gender!"); return;
}
PS. please use enums for your MsgTalkTypes not 2005 etc xD

also, having GC.MyChar seems very counter productive.. Why not just have GC inherit mychar class? or merge them?
Ultimation is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Non Stop Non Stop 24/7] For Ever Free MM Service [Non Stop 24/7]
01/10/2012 - Middleman - 38 Replies
ch möchte hier meine Dienste als Middleman anbieten. Deutsch ✔] Telefon Verifizierung ✔] Seit 3 Monaten registriert ✔] Mehr als 300 Posts ✔] Mind. 10 TBM-Bewertungen ✔] Kein negatives Rating Welchen Service biete ich an?
STOP SPAMMING IDIOTS.
10/11/2009 - Grand Chase - 2 Replies
I KNOW I KNOW . JUST SAYING STOP SPAMMING. THREAD CLOSED
Stop people from hitting multiple stakes in TG/Stop weapon skill
12/06/2007 - CO2 Exploits, Hacks & Tools - 21 Replies
Let me start off by saying this is a pretty dirty trick! But if you really don't like someone you can stop them from getting their max exp in TG. Explained: When someone uses a club/wand/FOH/etc in TG, it hits multiple stakes. You can make it so it doesn't hit a certain stake(s). This is easiest achieved by using the #alone feature in proxy. Use the #alone feature and stack on top of the stake you wish for the person not to hit. That's it! Their skill isn't hitting the stake(s) for some...



All times are GMT +2. The time now is 16: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.