I am currently working on the 5165 NCOS and I do not intend to divert from it any time soon.
I am trying to add a ban on ninjas, and I have seen this done in other 5165 servers. I know around where the code is needed, but I don't have the knowledge of what should be added to it.
My slight knowledge of C# is in the NPC/Command making area. I can make NPCs, and I can make commands based on other codes in the source, but I do not recognize the codes in the database.cs, I apologize for my earlier comments.
As for the code you gave, I believe it would work, except the source does not recognize "client" "class" and "message"
My slight knowledge of C# is in the NPC/Command making area. I can make NPCs, and I can make commands based on other codes in the source, but I do not recognize the codes in the database.cs, I apologize for my earlier comments.
As for the code you gave, I believe it would work, except the source does not recognize "client" "class" and "message"
Just go to the Character creation sections add an line where it checks the class, if it's 50 make it pop up a message telling you are not allowed, i did that while ago and it worked.
It won't require more C# knowledge than making an NPC check ffs.
If (Character.Profession == 50)
{
Message ("You are not allowed to create ninja")
return;
}
Something like this, now look in your source and figure it out, not that had.
if (Job == 50)
{
return ("You are not allowed to create ninja");
}
And now, every account, regardless of class, gets the error message "Error! Try again.", and on second attempt, it says "Error: Character already exists!".
It also adds a new char file, with given name. If you try to login with that acc and pass, it takes you back to the character creation.
because you are doing it wrong, you have to check for job right before it creates it and sends the answer....
It easy, just try different places every time, it's basic logic here.
We've given you tons of help. We're telling you the logic that needs to be entered in to block a specific character from being created.
Your job is now this.
#1: Locate where characters are created (it will be reading from a packet the client sends)
#2: Determine where in the packet the player's profession is stored (it should be obvious because the source already has to read it)
#3: Check that profession against what is either allowed or banned (in this case ninja profession which is base profession 50... you should really be going with a list of allowed base professions though or I can just spoof a packet and create a max promotion character at lvl 1)
#4: Return an error to the client if they try to create a character with a profession you don't want them able to use
And I thank you all very much for the help you have given me.
I only have one issue left, for some reason now no class can be made. Ninja is fully banned, but I'm not sure if I've left something out of the code I made with your help. Currently the entire creation code is as follows:
if (Job == 50)
{
return ("Ninja is not allowed. Pick another class.");
}
Now the message comes through for "Ninja is not allowed. Pick another class." every single time, without creating a new character. Every other class, it first says "Error! Try again." and then if you try again with the same name, it says "Error: Character already exists!", and the new character that it created has no account, its simply a character created. You can't login with it, and you can spam the database with accounts.
Now, Ninja isn't banned, instead every other class is banned with the No Ninja message. Also, Ninja now has that error about the "try again' and then "character already created". I think that this didn't fix anything, but actually reversed the desired effect 0.o
[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));