Register for your free account! | Forgot your password?

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

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

Advertisement



[Request] 5165 Class Ban

Discussion on [Request] 5165 Class Ban within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old 01/22/2015, 07:38   #16
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
Try != at the first if (Job ==50) , if you say the others are banned and ninja isn't.
mujake is offline  
Thanks
1 User
Old 01/22/2015, 14:15   #17
 
stormy547's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 47
Received Thanks: 2
Alright, so putting != fixed the ban on the ninja, but we still have that slight error of spamming characters into the database, yet not being able to play any.

I'm not sure if at this point that the CharacterMaking.cs will matter, but it doesn't look like it. Here it is anyways:

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling
{
    class CharacterMaking
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {            
            string CharName = "";
            for (int i = 0; i < 16; i++)
                if (Data[20 + i] != 0)
                    CharName += Convert.ToChar(Data[20 + i]);

            ushort Body = BitConverter.ToUInt16(Data, 52);
            byte Job = Data[54];
            if (GC.ValidName(CharName))
            {
                GC.AddSend(Packets.PopUpMessage(GC.MessageID, Database.CreateCharacter(GC.AuthInfo.Account, CharName, Body, Job)));
            }
            else
                GC.AddSend(Packets.PopUpMessage(GC.MessageID, "Invalid character name!"));
        }
    }
}
stormy547 is offline  
Old 01/22/2015, 14:23   #18
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
You suppose to put the ninja check before allowing the character file to be created.Come on not that hard to figure out where it should be placed...
mujake is offline  
Old 01/22/2015, 17:06   #19
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
He couldn't figure out how to use the logic operators == and !=
What do you expect?
pintinho12 is offline  
Thanks
1 User
Old 01/23/2015, 00:53   #20
 
stormy547's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 47
Received Thanks: 2
Alright then, I have probably led you on. When I claimed I'm not a "rookie", I was not talking about coding, I was speaking of in general. I can't be tricked, as I formerly thought someone was trying to.
Need to know a bit? Look under my name. It says "Learning" for a reason. I have told you my skill level, creating NPCs and Commands by copy and pasting existing code for most of it, and a bit I create, but very little.
I have never claimed to be an experienced coder, and I am simply asking for help. I am tired of you people insulting my lack of skill.

As for the code, it is placed in the database.cs, where there is character creation. I just found out about this CharacterMaking.cs, since when I searched for the character creation code, it took me to database.cs. I am simply asking for help, and I am very sorry that you expect more from me.
stormy547 is offline  
Old 01/23/2015, 03:31   #21
 
Freszone's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 71
Received Thanks: 79
I wouldn't call it learning if you're copy & pasting some (rather bad) code made by someone else without at least trying to understand what's going on there.
If you really wanted to learn, you would start by reading and learning the basic syntax and operations of given language and then trying to understand the code you're copy & pasting instead of just mindlessly trying to place it in different places and crying for help.

Regarding your issue, there's an exception being thrown somewhere in the try-block.
If you knew how to use your basic tools like breakpoints, you would probably find the issue pretty easily.
Freszone is offline  
Thanks
2 Users
Old 01/23/2015, 04:05   #22
 
stormy547's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 47
Received Thanks: 2
Actually, I am attempting to understand what is going on. Currently I am learning how NPCs work, and until I have a basic understanding of that, I will not go for other stuff. I am taking it on step at a time, and it is not my fault that it is the wrong step.
stormy547 is offline  
Old 01/23/2015, 06:53   #23
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
OMG....Dude you make the check for right before the client sends the OK message for character, you don't need to programming guru to create this line of code.
All you will have to use is "if" and "else".I managed to pull that few years ago on LOTF, and I have no basics in programming, it's about thinking where to place and how it would look like.
Try pasting the check in different positions inside the character creation, but right before writing the file.
mujake is offline  
Thanks
1 User
Old 01/23/2015, 14:20   #24
 
stormy547's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 47
Received Thanks: 2
If you were paying attention, you would know that the check is working, but it seems to of messed up the other classes creation code, seeing as when the character makes, in an unusual way, it simply makes the character, and doesn't even relate it to the account.
stormy547 is offline  
Old 01/23/2015, 16:24   #25
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
I did, that's mainly because you have placed the code in the wrong position, and if you have ninja it would let some part of the code process but if you have other character it won't process the whole code so this way you end up with corrupted characters...
mujake is offline  
Thanks
1 User
Old 01/23/2015, 22:01   #26
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Do you ever heard of programming logic? Or even logic?

I am not saying you're dumb or shaming you, we just got a bunch of peoples who claim they're trying to learn, but they can't even build an algorithm on the paper. It's most likely they don't even read any article about programming, they just come to the forum with their questions.

There are alot of programming logic pdf's on the internet, you could read about them first, they have the basic that will be used on all programming languages, that's my tip for you. You need to see each if {} else {}, see what needs to be inside them, what can be processed outside so you don't need to write the code twice and alot of other things.

Quote:
it simply makes the character, and doesn't even relate it to the account.
Why? What's causing this problem? There is any method related to this? Did you press F12 to find the source and read if there is anything wrong? What else could cause this?

Good luck on that.
pintinho12 is offline  
Thanks
1 User
Old 01/31/2015, 05:45   #27
 
stormy547's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 47
Received Thanks: 2
Alright, so I would like to apologize to every single one of you, and it would be lovely if we can call this off, because I found out that the codes I had were indeed correct the first time, the only thing that was wrong was that since I removed every ninja item from the itemtype, apparently it has VERY strict regulations that ****** up the creation somehow. Thank you all for your help, and each post will get a thanks.

#Request Closed, Reason: Resolved
stormy547 is offline  
Old 02/01/2015, 11:04   #28
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
This thread was a ******* joy to read.
Rookie.
InsomniacPro is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
[Release]Sub Class Items 5165!
05/06/2018 - CO2 PServer Guides & Releases - 97 Replies
(Note: This is not an edit, This files contains the .dbc files!!!) Guide on how to add the Sub-Class Items: First: You have to download this textures and Meshes. And extract it on your 5165 client. Multiupload.com - upload your files to multiple file hosting sites! It contains the texture, mesh and also the Icons. Second: Add this to your Items.txt (on your LOTF source) and also in your itemtype.dat (on your client) Third: You need to add this also into your ItemMinIcon.ani in...
[5165] My Class PkEnvoy Bugs
12/15/2010 - CO2 Private Server - 6 Replies
Hello i have a co pserver 5165 , well i added ClassPkEnvoy to my source it's working 100% , but when some1 is in the pk map of ClassPkEnvoy and he Disconnect (normal disconnecting, from hes connetion ) and Relog , he find himself Without gears and empty enventry, cps and gold don't go well, he goes to TC for exemple, he relog and gears back could you help me ? tell me what's where's the problem, and how to fix it the ClassPkEnvoy Are : 1735 1734 etc...
itemType.ini That Contain Sub-Class Items for 5165
07/09/2010 - CO2 Private Server - 9 Replies
hey all i Need itemType.ini That Contain Sub-Class Items for 5165 or how to add it :handsdown: ... at Client/ini anyone Can Help ! :D 134159 WaterflowArmor 190 0 130 0 0 0 0 0 0 0 129000 0 0 0 435 0 0 0 0 4098 4098 0 0 0 0 0 0 147 80 1 1000 0 0 0 0 Taoist`sRobe None 5 131159 WarriorSoulArmor 25 0 130 0 0 0 0 0 0 0 129000 0 0 0 1258 0 0 0 0 4098 4098 0 0 0 0 0 0 0 49 1 1000 0 0 0 0 Warrior`sArmor None 5 133159 ArcherSoulArmor 45 0 130 0 0 240 0 0 0 0 258000 0 0 0 700 0 0 0 0 4098 4098 0...
[Release]Class PK Envoy for 5165
01/17/2010 - CO2 PServer Guides & Releases - 16 Replies
thats Class Pk Envoy for 5165 and ProfPKChief for WeeklyPKChampion #region Top WeeklyPKChampion case 1502: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Hey there i hold WeeklyPKChampion for Trojans, Warriors, Ninjas, Taoists And Archers , So Tell me your Class so i can Sign you Up.at 19:45!")); GC.AddSend(Packets.NPCLink("Iam a Trojan", 1));



All times are GMT +1. The time now is 07:01.


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