how to add bonuses when creating account on project blackout server

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    how to add bonuses when creating account on project blackout server

    Anyone know in which part of my server I modify, for the player to receive 10000000 cash and 1000000 gold when creating their account on the server?

    sorry for english


  2. #2
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    Which source are you using and I shall take a look into it.
    The pressure of human nature does not equal the presence of human persistence.

  3. #3
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Pb cross v37

    - - - Updated - - -

    Quote Originally Posted by Bradley View Post
    Which source are you using and I shall take a look into it.
    PB CROSS V37 IS MY SOURCE

  4. #4
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    Is it publicly posted anywhere on RZ as I can't seem to find it?
    The pressure of human nature does not equal the presence of human persistence.

  5. #5
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Quote Originally Posted by Bradley View Post
    Is it publicly posted anywhere on RZ as I can't seem to find it?
    here brother link: PB cross v37

    I just need you to help me, please.

  6. #6
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    Mind telling me what is the default starting cash?

    Is it: 10000000 - 10,000,000

    Code:
                Account account = AccountDaoService.getInstance().accountAuth(login, password);            if (account == null) {
                    if (AuthServerProperty.getInstance().ACCOUNT_AUTO_CREATE && !AccountDaoService.getInstance().accountExist(login)) {
                        account = new Account();
                        account.setLogin(login);
                        account.setPassword(password);
                        account.setActive(true);
                        account.setEmail(login + "@nullmail.ru");
                        account.setMoney(10000000);
                        AccountDaoService.getInstance().create(account);
                        if (account.getId() != null) {
                            state = authAccount(client, account);
                        } else {
                            state = State.ERROR_AUTH;
                        }
                    } else {
                        state = State.ERROR_AUTH;
                    }
                } else {
                    state = authAccount(client, account);
                }
            }
            lock.unlock();
            return state;
        }
    I'm checking all over there doesn't seem to be anything about GP, GOLD, As well as it's not called cash it's classed as Money.

    Code:
    con = DatabaseFactory.getInstance().newConnection();            statement = con.prepareStatement(ACCOUNT_GET_BY_LOGIN_PASSWORD.getQuery());
                statement.setString(1, login);
                statement.setString(2, password);
                rs = statement.executeQuery();
                if (rs.next()) {
                    account = new Account();
                    account.setId(rs.getLong("id"));
                    account.setLogin(rs.getString("login"));
                    account.setPassword(rs.getString("password"));
                    account.setEmail(rs.getString("email"));
                    account.setMoney(rs.getInt("money"));
                    account.setActive(rs.getBoolean("active"));
                }
    Every area it would be in seems to only have the code below

    Code:
    account.setMoney(rs.getInt("money"));
    Last edited by Bradley; 09-01-18 at 09:13 PM.
    The pressure of human nature does not equal the presence of human persistence.

  7. #7
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Quote Originally Posted by Bradley View Post
    Mind telling me what is the default starting cash?

    Is it: 10000000 - 10,000,000

    Code:
                Account account = AccountDaoService.getInstance().accountAuth(login, password);            if (account == null) {
                    if (AuthServerProperty.getInstance().ACCOUNT_AUTO_CREATE && !AccountDaoService.getInstance().accountExist(login)) {
                        account = new Account();
                        account.setLogin(login);
                        account.setPassword(password);
                        account.setActive(true);
                        account.setEmail(login + "@nullmail.ru");
                        account.setMoney(10000000);
                        AccountDaoService.getInstance().create(account);
                        if (account.getId() != null) {
                            state = authAccount(client, account);
                        } else {
                            state = State.ERROR_AUTH;
                        }
                    } else {
                        state = State.ERROR_AUTH;
                    }
                } else {
                    state = authAccount(client, account);
                }
            }
            lock.unlock();
            return state;
        }
    in the case there is the initial cash bonus, the gp is where?

  8. #8
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    I believe this is what you're looking for?

    Code:
    public PlayerCreateTemplate readStartTemplate() {
            Connection con = null;
            PreparedStatement statement = null;
            ResultSet rs = null;
            PlayerCreateTemplate template = null;
            try {
                con = DatabaseFactory.getInstance().newConnection();
                statement = con.prepareStatement(TEMPLATE_SELECT_START_EQIPMENT.getQuery());
                rs = statement.executeQuery();
    
    
                int startmoney = 0;
                int stargp = 0;
                List<PlayerItem> list = new ArrayList<PlayerItem>();
                while (rs.next()) {
                    if (rs.getInt("item_id") == 0) {
                        startmoney = rs.getInt("startmoney");
                        stargp = rs.getInt("startgp");
                        continue;
                    }
                    list.add(new PlayerItem(
                            rs.getBoolean("equipped") ? ItemLocation.valueOf(ItemLocation.EQUIPPED.name()) : ItemLocation.valueOf(ItemLocation.INVENTORY.name()),
                            ItemHolder.getInstance().getTemplate(rs.getInt("item_id")),
                            rs.getInt("count"), (ItemHolder.getInstance().getTemplate(rs.getInt("item_id")).getConsumeType() == ItemConsumeType.PERMANENT) ? 0 : 1,
                            false));
                }
                template = new PlayerCreateTemplate(startmoney, stargp);
                for (PlayerItem item : list)
                    template.addPlayerItem(item);
    
    
            } catch (SQLException e) {
                e.printStackTrace();
            } finally {
                DatabaseUtils.closeDatabaseCSR(con, statement, rs);
            }
            return template;
        }
    Code:
    int startmoney = 0; 
    
    int stargp = 0;

    It's at this location below.

    PB SERVER NANDO\pb-global\src\ru\pb\global\dao\impl

    PlayerDaoImpl.java
    Lines 274, 275.
    Last edited by Bradley; 09-01-18 at 09:21 PM.

  9. #9
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Quote Originally Posted by Bradley View Post
    I believe this is what you're looking for?

    Code:
    public PlayerCreateTemplate readStartTemplate() {
            Connection con = null;
            PreparedStatement statement = null;
            ResultSet rs = null;
            PlayerCreateTemplate template = null;
            try {
                con = DatabaseFactory.getInstance().newConnection();
                statement = con.prepareStatement(TEMPLATE_SELECT_START_EQIPMENT.getQuery());
                rs = statement.executeQuery();
    
    
                int startmoney = 0;
                int stargp = 0;
                List<PlayerItem> list = new ArrayList<PlayerItem>();
                while (rs.next()) {
                    if (rs.getInt("item_id") == 0) {
                        startmoney = rs.getInt("startmoney");
                        stargp = rs.getInt("startgp");
                        continue;
                    }
                    list.add(new PlayerItem(
                            rs.getBoolean("equipped") ? ItemLocation.valueOf(ItemLocation.EQUIPPED.name()) : ItemLocation.valueOf(ItemLocation.INVENTORY.name()),
                            ItemHolder.getInstance().getTemplate(rs.getInt("item_id")),
                            rs.getInt("count"), (ItemHolder.getInstance().getTemplate(rs.getInt("item_id")).getConsumeType() == ItemConsumeType.PERMANENT) ? 0 : 1,
                            false));
                }
                template = new PlayerCreateTemplate(startmoney, stargp);
                for (PlayerItem item : list)
                    template.addPlayerItem(item);
    
    
            } catch (SQLException e) {
                e.printStackTrace();
            } finally {
                DatabaseUtils.closeDatabaseCSR(con, statement, rs);
            }
            return template;
        }
    Code:
    int startmoney = 0; 
    
    int stargp = 0;

    It's at this location below.

    PB SERVER NANDO\pb-global\src\ru\pb\global\dao\impl



    Lines 274, 275.


    in which part do I edit the cash and gold value that players will create when they create the account?in which part do I edit the cash and gold value that players will create when they create the account?

  10. #10
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    You edit this bit.
    Code:
                int startmoney = 0;
                int stargp = 0;
                List<PlayerItem> list = new ArrayList<PlayerItem>();
                while (rs.next()) {
                    if (rs.getInt("item_id") == 0) {
                        startmoney = rs.getInt("startmoney");
                        stargp = rs.getInt("startgp");
                        continue;
    PlayerDaoImpl.java
    The pressure of human nature does not equal the presence of human persistence.

  11. #11
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Quote Originally Posted by Bradley View Post
    You edit this bit.
    Code:
                int startmoney = 0;
                int stargp = 0;
                List<PlayerItem> list = new ArrayList<PlayerItem>();
                while (rs.next()) {
                    if (rs.getInt("item_id") == 0) {
                        startmoney = rs.getInt("startmoney");
                        stargp = rs.getInt("startgp");
                        continue;
    in place of 0, I put the value I want in this?

  12. #12
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    You change the value of 0 for both Startmoney and startgp to what you want, yes.
    The pressure of human nature does not equal the presence of human persistence.

  13. #13
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Quote Originally Posted by Bradley View Post
    You change the value of 0 for both Startmoney and startgp to what you want, yes.
    thank you so much!

    - - - Updated - - -



    Can you tell me any database, for this source?

  14. #14
    History 2017 . R.I.P Bradley is offline
    WTF? Overkill!Rank
    Jan 2013 Join Date
    United KingdomLocation
    909Posts

    Re: how to add bonuses when creating account on project blackout server

    Where did you download it from, as that place might have the database, I'll have a look around for you tho.
    The pressure of human nature does not equal the presence of human persistence.

  15. #15
    Registered inando157 is offline
    MemberRank
    Jan 2018 Join Date
    10Posts

    Re: how to add bonuses when creating account on project blackout server

    Quote Originally Posted by Bradley View Post
    Where did you download it from, as that place might have the database, I'll have a look around for you tho.
    where I downloaded what you have is with some problems, if you want to download it to have a look ...



Page 1 of 2 12 LastLast

Advertisement