Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 12:12

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

Advertisement



[Release] $AddAccount command

Discussion on [Release] $AddAccount command within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2019
Posts: 19
Received Thanks: 12
[Release] $AddAccount command

Tired of making accounts by hand and you don't want to make a site? No problem here is an order that I drop directly from the NosWorld source.

Code:
using OpenNos.Core;
using OpenNos.Domain;

namespace OpenNos.GameObject.CommandPackets
{
    [PacketHeader("$AddAccount", PassNonParseablePacket = true, Authorities = new AuthorityType[] { AuthorityType.Owner })]
    public class AddAccountPacket : PacketDefinition
    {
        #region Properties

        [PacketIndex(0)]
        public string Name { get; set; }

        [PacketIndex(1)]
        public string Password { get; set; }

        [PacketIndex(2)]
        public int Authority { get; set; }

        public static string ReturnHelp() => "$AddAccount <Name> <Password> <Authority>";

        #endregion
    }
}
Code:
     /// <summary>
        /// $AddAccount Command
        /// </summary>
        /// <param name="addAccountPacket"></param>
        public void AddAccount(AddAccountPacket addAccountPacket)
        {
            if (addAccountPacket != null)
            {
                AuthorityType Autoridad = AuthorityType.Banned;
                switch (addAccountPacket.Authority)
                {
                    case 0:
                        Autoridad = AuthorityType.User;
                        break;
                    case 20:
                        Autoridad = AuthorityType.GS;
                        break;
                    case 30:
                        Autoridad = AuthorityType.TMOD;
                        break;
                    case 31:
                        Autoridad = AuthorityType.MOD;
                        break;
                    case 32:
                        Autoridad = AuthorityType.SMOD;
                        break;
                    case 50:
                        Autoridad = AuthorityType.TGM;
                        break;
                    case 51:
                        Autoridad = AuthorityType.GM;
                        break;
                    case 60:
                        Autoridad = AuthorityType.TM;
                        break;
                    case 80:
                        Autoridad = AuthorityType.DEV;
                        break;
                    case 100:
                        Autoridad = AuthorityType.Administrator;
                        break;
                    case 150:
                        Autoridad = AuthorityType.CoOwn;
                        break;
                    case 666:
                        Autoridad = AuthorityType.Owner;
                        break;
                }
                AccountDTO account = new AccountDTO
                {
                    Authority = Autoridad,
                    Name = addAccountPacket.Name,
                    Password = CryptographyBase.Sha512(addAccountPacket.Password)
                };
                DAOFactory.AccountDAO.InsertOrUpdate(ref account);
            }
            else
            {
                Session.SendPacket(Session.Character.GenerateSay(AddAccountPacket.ReturnHelp(), 10));
            }
        }
To avoid any misunderstanding. No I am not the creator of this order.

Good game everyone !
Ritahxyel is offline  
Old 12/14/2019, 23:22   #2
 
InnoTx's Avatar
 
elite*gold: 100
Join Date: Dec 2016
Posts: 342
Received Thanks: 82
Quote:
Originally Posted by Ritahxyel View Post
Tired of making accounts by hand and you don't want to make a site? No problem here is an order that I drop directly from the NosWorld source.

Code:
using OpenNos.Core;
using OpenNos.Domain;

namespace OpenNos.GameObject.CommandPackets
{
    [PacketHeader("$AddAccount", PassNonParseablePacket = true, Authorities = new AuthorityType[] { AuthorityType.Owner })]
    public class AddAccountPacket : PacketDefinition
    {
        #region Properties

        [PacketIndex(0)]
        public string Name { get; set; }

        [PacketIndex(1)]
        public string Password { get; set; }

        [PacketIndex(2)]
        public int Authority { get; set; }

        public static string ReturnHelp() => "$AddAccount <Name> <Password> <Authority>";

        #endregion
    }
}
Code:
     /// <summary>
        /// $AddAccount Command
        /// </summary>
        /// <param name="addAccountPacket"></param>
        public void AddAccount(AddAccountPacket addAccountPacket)
        {
            if (addAccountPacket != null)
            {
                AuthorityType Autoridad = AuthorityType.Banned;
                switch (addAccountPacket.Authority)
                {
                    case 0:
                        Autoridad = AuthorityType.User;
                        break;
                    case 20:
                        Autoridad = AuthorityType.GS;
                        break;
                    case 30:
                        Autoridad = AuthorityType.TMOD;
                        break;
                    case 31:
                        Autoridad = AuthorityType.MOD;
                        break;
                    case 32:
                        Autoridad = AuthorityType.SMOD;
                        break;
                    case 50:
                        Autoridad = AuthorityType.TGM;
                        break;
                    case 51:
                        Autoridad = AuthorityType.GM;
                        break;
                    case 60:
                        Autoridad = AuthorityType.TM;
                        break;
                    case 80:
                        Autoridad = AuthorityType.DEV;
                        break;
                    case 100:
                        Autoridad = AuthorityType.Administrator;
                        break;
                    case 150:
                        Autoridad = AuthorityType.CoOwn;
                        break;
                    case 666:
                        Autoridad = AuthorityType.Owner;
                        break;
                }
                AccountDTO account = new AccountDTO
                {
                    Authority = Autoridad,
                    Name = addAccountPacket.Name,
                    Password = CryptographyBase.Sha512(addAccountPacket.Password)
                };
                DAOFactory.AccountDAO.InsertOrUpdate(ref account);
            }
            else
            {
                Session.SendPacket(Session.Character.GenerateSay(AddAccountPacket.ReturnHelp(), 10));
            }
        }
To avoid any misunderstanding. No I am not the creator of this order.

Good game everyone !

no one will need this first of all it is so easy to make an account from DB and 2. you can just Create an account by Website ??? for what will someone need this xDD


Nothing against you but yeah ... xDDD
InnoTx is offline  
Old 12/14/2019, 23:27   #3
 
elite*gold: 0
Join Date: Dec 2019
Posts: 19
Received Thanks: 12
Simply to create an account on the db you must create the hash 512.
with this command, you just have to do $ AddAccount Username password Authority and the hash automatically creates itself on the database. so no need to go to a hashing site every time to create an account. Which is much more practical and it is not necessarily given to everyone to know how to make a site those who simply do not want create the website because they do not know how to make captcha. He can use this command. In addition, it avoids database hack problems if your website is not protected
Ritahxyel is offline  
Old 12/14/2019, 23:54   #4
 
Roxeez's Avatar
 
elite*gold: 0
Join Date: Jun 2019
Posts: 102
Received Thanks: 228
And what about starting being a bit profesionnal and start doing things properly ?

If nobody in your team can create a basic registration form, you shouldn't even think about running a private server.
Roxeez is offline  
Thanks
2 Users
Old 12/15/2019, 00:18   #5
 
elite*gold: 0
Join Date: Dec 2019
Posts: 19
Received Thanks: 12
be professional for a private server on Nostale it tells me nothing and I never talk about myself I released this order for others
Ritahxyel is offline  
Old 12/15/2019, 06:39   #6
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,018
Worst idea ever... their is already too much places where nostale send plaintext password... why adding another one...
0Lucifer0 is offline  
Old 12/19/2019, 11:46   #7
 
elite*gold: 0
Join Date: Jul 2019
Posts: 29
Received Thanks: 0
I am the creator for the NosWorld source and Cucalon source, but is a simple InsertOrUpdate ����

And isn't tested
Nagisa Shiota is offline  
Old 12/19/2019, 13:30   #8
 
MANUEL PERES's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 297
Received Thanks: 74
Quote:
Originally Posted by Nagisa Shiota View Post
I am the creator for the NosWorld source and Cucalon source, but is a simple InsertOrUpdate ����

And isn't tested


You should not say that the source is yours because the source of the opennos has many contributions that is to say it is not yours.
MANUEL PERES is offline  
Old 12/20/2019, 13:54   #9
 
elite*gold: 0
Join Date: Jul 2019
Posts: 29
Received Thanks: 0
Quote:
Originally Posted by MANUEL PERES View Post


You should not say that the source is yours because the source of the opennos has many contributions that is to say it is not yours.
I dont say that this source is mine, only i say that this code is developed but me, and is not tested xd. If you read, this say "for" this sources
Nagisa Shiota is offline  
Reply

Tags
addaccount, alfheim, nostale, opennos, ritahxyel


Similar Threads Similar Threads
friends what is bonus add "command" like "71051" and "71052" jobs command its need fo
12/22/2013 - Metin2 Private Server - 0 Replies
friends what is bonus add "command" like "71051" and "71052" jobs commands its need for me for quest boni so i want add boni as "71051" and "71052" but with quest push
Command line interface working command
08/05/2012 - DarkOrbit - 27 Replies
I found only one working command: Enter "J" when you are in teleport Anyone know other commands?



All times are GMT +1. The time now is 12:13.


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.