Jump to content
  • 0

@security #free release


Ukiram

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

//  ___________________________________________________________________
// /                                                                   \
// |            _           _   _   _                                  |
// |           | |__  _ __ / \ | |_| |__   ___ _ __   __ _             |
// |           | '_ \| '__/ _ \| __| '_ \ / _ \ '_ \ / _` |            |
// |           | |_) | | / ___ \ |_| | | |  __/ | | | (_| |            |
// |           |_.__/|_|/_/   \_\__|_| |_|\___|_| |_|\__,_|            |
// |                                                                   |
// |                        brAthena  Script                           |
// |                        www.brathena.org                           |
// |-------------------------------------------------------------------|
// |                                                                   |
// | Copyright (c) brAthena Dev Team                                   |
// |                                                                   |
// |-------------------------------------------------------------------|
// | Licensed under the GNU GPL license                                |
// | For more information read the LICENSE                             |
// | file at the root of the emulator                                  |
// |-------------------------------------------------------------------|
// | Author:                                                           |
// |        - Orce                                                     |
// | Review:                                                           |
// |        - Aly                                                      |
// |        - Vör                                                      |
// |        - Popcorn                                                  |
// |                                                                   |
// | Description: NPC that manages the account protection system.      | 
// |                                                                   |
// \___________________________________________________________________/
//
-    script    ProtectionAcc    -1,{
    
    OnInit:
        ///////////////////////////////////////////////////////////////////////////////
        // Configure below the name of the command to block negotiations
        // Change the word ' security ' to the command you want
        ///////////////////////////////////////////////////////////////////////////////
        setd ".comando$", "security";
        
        ///////////////////////////////////////////////////////////////////////////////
        // Set down the GM level that will have access to the account passwords.
        ///////////////////////////////////////////////////////////////////////////////
        set .gmacess,99;
        
        ///////////////////////////////////////////////////////////////////////////////
        // Don't move from here unless you know what you're doing
        ///////////////////////////////////////////////////////////////////////////////
        bindatcmd .comando$, "ProtectionAcc::OnProtecAcc";
        end;    
        
    OnPCLoginEvent:    
        ///////////////////////////////////////////////////////////////////////////////
        // Informs whether the Account protection system is active
        ///////////////////////////////////////////////////////////////////////////////
        dispbottom "[Account Protection]";
        if(#BLOCKPASS){
            dispbottom "Security System Enable: Use @"+.comando$+" For more information.";
        } else {
            dispbottom "Security System Disable: Use @"+.comando$+" For more information.";
        }
        end;
        
OnProtecAcc:    
    mes "^FF6600.:: Account Protection ::.^000000";
    mes " ";
    if(#BLOCKPASS){
        mes "» Proteção: ^2E8B57Enable^000000";
        if(blockcheck()){
            mes "» Negotiations: ^2E8B57Blocked^000000";
        } else {
            mes "» Negotiations: ^FF0000Released^000000";
        }
            set .@menu$,select( (blockcheck() ? "» ^FF0000Release^000000 Negotiations":"» ^2E8B57Blocked^000000 Negotiations")+":» Change Password::» ^FF0000Remove Password^000000:» Information:» Exit:"+(getgroupid()>=.gmacess ? "» ^FF0000[ADM]^000000 Recover Password":""));
    } else {
        mes "^FF0000Unprotected Account^000000";
        mes " ";
        mes "Would like to ^2E8B57Activate^000000 and set a password for ^2E8B57protect^000000 your account?";            
        set .@menu$,select("» Yes::» No::"+(getgroupid()>=.gmacess ? "» ^FF0000[ADM]^000000 Recover Password":""))+2;
    }
        switch (.@menu$)
        {
            next;
            case 1:
                    if(blockcheck())
                    {
                        mes "^FF6600.:: Account Protection ::.^000000";
                        mes " ";
                        mes "Enter the password to ^FF0000Release^000000 Trading items.";
                        
                        input .@senha;
                        if( #BLOCKPASS != .@senha ){ 
                            mes " "; 
                            mes "^FF0000Ø Incorrect password!! Ø^000000"; 
                            close; 
                        }
                        
                        mes " ";
                        mes "Item Negotiations: ^FF0000Released^000000.";
                        message strcharinfo(0), "Item Negotiations: Released.";
                        
                        block 0;
                        
                    } else {
                        mes "^FF6600.:: Account Protection ::.^000000";
                        mes " ";
                        mes "Item Negotiations: ^2E8B57Blocked^000000.";
                        message strcharinfo(0), "Item Negotiations: Blocked.";
                        block 1;
                    }
                    close;
                    
            case 2:
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "Please enter your current protection password:";
                    mes " ";
                    mes "Report only numbers.";
                    input .@senha;                            
                    if( #BLOCKPASS != .@senha ) { mes "Ø Incorrect password!! Ø"; close; }
                    next;
                    
            case 3:
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "Please inform your protection password:";
                    mes "^333399-> Report only numbers^000000";
                    mes "Note: The password may contain a maximum of 5 digits and at least 1.";
                    input .@senha;                            
                    if( .@senha < 1 || .@senha > 99999 ) { mes "      Ø Invalid password! Ø"; close; }
                    next;
                    
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "Please confirm your protection password:";
                    mes " ";
                    mes "^333399-> Report only numbers^000000";
                    input .@Rsenha;
                    next;
    
                    mes "^FF6600.:: Account Protection ::..^000000";
                    if( .@senha != .@Rsenha )
                    {
                        mes "The confirmation password and password are different.";
                        mes " ";
                        mes "Ø Please repeat the procedure";
                        close;
                    }
    
                    mes "ƒ Your password for the Account Protection System has been saved! ƒ";
                    mes " ";
                    mes "ƒ Use @"+.comando$+" To set up the system! ƒ";
                    set #BLOCKPASS, .@senha;
                    close;
            
            case 4:
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "^FF0000[Attention]^000000";
                    mes "By removing the password you will be disabling the account protection system.";
                    mes "Do you draw continue?";
                    if(select("» ^2E8B57No^000000:» Yes (^FF0000Remove/Disable Protection^000000)")==1)close;
                    next;
                    
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "Please enter your current protection password:";
                    mes " ";
                    mes "Report only numbers.";
                    input .@senha;
                    if( #BLOCKPASS != .@senha ) { mes "Incorrect password!!."; close; }
                    next;
                    
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "Account protection system disabled and password removed successfully.";
                    mes "Use @"+.comando$+" If you want to activate the system again.";
                    set #BLOCKPASS, 0;
                    block 0;
                    close;
                    
            case 5:
                    mes "^FF6600.:: Account Protection ::.^000000";
                    mes "This system will prevent your items from being thrown on the ground, sold or negotiated without your permission.";
                    next;
                    
                    mes "^FF6600.:: Account Protection ::.^000000";
                    mes "Once activated, as soon as you exit the account (log out) and log in, the negotiations will be blocked and released only after you enter the security password.";
                    next;
                    
                    mes "^FF6600.:: Account Protection ::.^000000";
                    mes "!!! ^993300[Attention]^000000 !!!";
                    mes "For your safety it is highly recommended that the account protection system be activated.";
                    close;            
            case 6:
                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes "Use @"+.comando$+" If you want to set up the account protection system.";
                    close;
            
            case 7:
                    function getpass;

                    mes "^FF6600.:: Account Protection ::..^000000";
                    mes " ";
                    mes "Please enter the account ID you want to retrieve the password for:";
                    mes " ";
                    input .@acc;                
                    set .@ResultPass, getpass("SelectPass",.@acc);
                    if(!.@ResultPass){
                        next;
                        mes "^FF6600.:: Account Protection ::..^000000";
                        mes " ";
                        mes "This account does not exist or the protection system is not activated in this account.";
                    } else { mes "Account password: "+.@ResultPass; }
                    close;
        }
        
    function    getpass    {

        if( getarg(0) == "SelectPass" )
        {
            query_sql "SElECT `value` FROM `acc_reg_num_db` WHERE `key`='#BLOCKPASS' AND `account_id`='"+ getarg(1) +"'", .@pass;
            return (.@pass);
        }
        else return 0;
    }

}

error.PNG

Edited by Emistry
Please use codebox.
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

Anyone know how to fix this please? I really really need this. Thankyouuuu so much!

That's my script and the screenshot of error. i don't know how to fix it. Can anyone help me please??? on how to fix this asap??

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   62
  • Joined:  02/04/19
  • Last Seen:  

you need to apply diff to use npc

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

1 hour ago, KeyMaster said:

you need to apply diff to use npc

I'm done i already apply a diff and it works but i have another problem....

When reconnecting

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...