viewing paste Unknown #705 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
-   script  InviTest    -1,{
 
    OnPCDieEvent:
        if (!.@n)
        {
            dispbottom "You killed by "+rid2name(killerrid);
            end;
        }
  
}
 
new_1-1,56,103,0    script  #DefPattern 100,{
 
        end;
        
    iRight:
    
        announce "Hello World!",0;
        end;
        
    OnInit:
        set .@word$, "word";
        defpattern 1,".*" + .@word,"iRight";
        activatepset 1;
        end;
 
}
 
 
prontera,155,163,3  script  Test    100,{
    setnpcdisplay("Test",101);
    end;
 
    Correct:
        npctalk "OMG";
        end;
 
    OnInit:
        deletepset 1;
        defpattern 1,".*lol","Correct";
        activatepset 1;
        end;
        
}
 
 
 
//===== rAthena Script =======================================
//= The Billion Banker
//===== By: ==================================================
//= Joseph
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena, 3ceam, eAthena
//===== Description: =========================================
//= Withdraw and deposit large amount of Zeny
//===== Additional Comments: =================================
//= 1.0 - Released!
//============================================================
prontera,139,182,5  script  Banker  833,{
 
    function    FailMessage;
    function    Transaction;
 
    // == Configurations =========================================
    set .@mz, 1000000000;   // Server Max Zeny (Default: 1000000000)
    set .@n$, "[Banker]";   // NPC Name
    // ===========================================================
    
    mes .@n$;
    mes "Greetings!";
    mes "How can I help you?";
    mes " ";
    mes "Balance: " + #savings;
    set .@menu$, "Withdraw:Deposit";
    set .@j, select ( .@menu$ ) - 1;
    setarray .@menu$, "Withdraw", "Deposit";    
    next;
    mes .@n$;
    mes "How much would you like to " + .@menu$[.@j] + "?";
    input .@amt,0,.@mz;
    if ( .@amt == 0 )
    {
        next;
        mes .@n$;
        mes "^FF0000Invalid input...^000000";
        close;
    }
    next;
    mes .@n$;
    mes .@menu$[.@j] + ": " + .@amt;
    mes " ";
    mes (.@j!=2)?"Would you like to proceed?":"Thank you!";
    if ( select ( "Yes:No" ) == 2 ) close;
    next;
    mes .@n$;
    if ( FailMessage(.@j,.@amt,.@mz) != "" )
    {
        mes "^FF0000" +@msg$+ "^000000";
        set @msg$, "";
        close;
    }
    Transaction(.@j,.@amt);
    mes .@menu$[.@j] + " successful!";
    close;
 
    function    FailMessage {
    
        switch (getarg(0))
        {
            Case 0: // Withdraw
                if ( getarg(2) < (Zeny + getarg(1)) ) set @msg$, "You can't hold that much Zeny.";
                if ( #savings < getarg(1) ) set @msg$, "You have insufficient amount of Zeny in your bank account.";
                break;
                
            Case 1: // Deposit
                if ( Zeny < getarg(1) ) set @msg$, "You have insufficient amount of Zeny on hand.";
                break;
        }
        return @msg$;
    
    }
    
    function    Transaction {
    
        switch (getarg(0))
        {
            Case 0: // Withdraw
                set Zeny, Zeny + getarg(1);
                set #savings, #savings - getarg(1);
                break;
                
            Case 1: // Deposit
                set Zeny, Zeny - getarg(1);
                set #savings, #savings + getarg(1);
                break;
        }
        return;
        
    }
    
}
Viewed 812 times, submitted by Guest.