viewing paste Unknown #11056 | Athena

Posted on the | Last edited on
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
prontera,150,150,5  script  Build Manager   617,{
function ManageBuild;
 
mes "Select Your Services";
next;
switch( select( ( .BMMode & 1 )?"^FF0000Save & Switch Builds^000000":"",
                ( .BMMode & 2 )?"^0000FFReset Status^000000":"",    
                ( .BMMode & 4 )?"^0000FFReset Skills^000000":"")){
    case 1:
        for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 )
            set .@Menu$,.@Menu$ + (( getd( "Slot_"+.@i+"$" ) == "" )?"^FF0000Empty Slot^000000":getd( "Slot_"+.@i+"$" ) )+":";
        set .@Slot,select( .@Menu$ );
        do{
            next;
            mes "Build : ^FF0000"+(( getd( "Slot_"+.@Slot+"$" ) == "" )?"Slot "+.@Slot:getd( "Slot_"+.@Slot+"$" ) )+"^000000";
            mes "STR - ^0000FF"+getd( "STR_"+.@Slot )+"^000000      INT - ^0000FF"+getd( "INT_"+.@Slot )+"^000000";
            mes "AGI - ^0000FF"+getd( "AGI_"+.@Slot )+"^000000      DEX - ^0000FF"+getd( "DEX_"+.@Slot )+"^000000";
            mes "VIT - ^0000FF"+getd( "VIT_"+.@Slot )+"^000000      LUK - ^0000FF"+getd( "LUK_"+.@Slot )+"^000000";
            mes " ";
            mes "Remaining Points : ^0000FF"+getd( "STATS_"+.@Slot )+"^000000";
            set .@Option,select(( getd( "Slot_"+.@Slot+"$" ) == "" )?"":"^0000FFSwitch",
                                ( getd( "Slot_"+.@Slot+"$" ) == "" )?"Save":"",
                                ( getd( "Slot_"+.@Slot+"$" ) == "" )?"":"^FF0000Clear" );
            ManageBuild( .@Slot,.@Option);
        }while( .@Option != 1 );
        break;
    case 2:
        resetstatus;
        mes "Status has been Reseted.";
        break;
    case 3:
        resetskill;
        mes "Skills has been Reseted.";
        break;
}
close;
 
function    ManageBuild {
switch( getarg(1) ){
    case 1: //  Switch Build
        message strcharinfo(0),"Build has been ^FF0000Switched^000000.";
            resetstatus;
            set StatusPoint,getd( "STATS_"+getarg(0) );
            statusup2 bStr,getd( "STR_"+getarg(0) ) - 1;
            statusup2 bAgi,getd( "AGI_"+getarg(0) ) - 1;
            statusup2 bVit,getd( "VIT_"+getarg(0) ) - 1;
            statusup2 bInt,getd( "INT_"+getarg(0) ) - 1;
            statusup2 bDex,getd( "DEX_"+getarg(0) ) - 1;
            statusup2 bLuk,getd( "LUK_"+getarg(0) ) - 1;
        break;
    case 2: //  Save Build
            setd( "STR_"+getarg(0) ),readparam(bStr);
            setd( "AGI_"+getarg(0) ),readparam(bAgi);
            setd( "VIT_"+getarg(0) ),readparam(bVIT);
            setd( "INT_"+getarg(0) ),readparam(bInt);
            setd( "DEX_"+getarg(0) ),readparam(bDex);
            setd( "LUK_"+getarg(0) ),readparam(bLuk);
            setd( "STATS_"+getarg(0) ),StatusPoint;
        if( .Length[0] < .Length[1] && .Length[0] ){
            mes "Input a ^FF0000Name^000000 for this Slot.";
            mes "Name Length : "+.Length[0]+" ~ "+.Length[1]+" Chars";
            do{
                input getd( "Slot_"+getarg(0)+"$" );
            }while( getstrlen( getd( "Slot_"+getarg(0)+"$" ) ) < .Length[0] || getstrlen( getd( "Slot_"+getarg(0)+"$" ) ) > .Length[1] );
        }else{
            setd( "Slot_"+getarg(0)+"$" ),"Build "+getarg(0);
        }
        message strcharinfo(0),"Build has been ^FF0000Saved^000000.";
        break;
    case 3: //  Remove Build
        message strcharinfo(0),"Build has been ^FF0000Cleared^000000.";
            setd( "STR_"+getarg(0) ),0;
            setd( "AGI_"+getarg(0) ),0;
            setd( "VIT_"+getarg(0) ),0;
            setd( "INT_"+getarg(0) ),0;
            setd( "DEX_"+getarg(0) ),0;
            setd( "LUK_"+getarg(0) ),0;
            setd( "STATS_"+getarg(0) ),0;
            setd( "Slot_"+getarg(0)+"$" ),"";
        break;
}
return;
}   
    
OnInit:
// Mode of NPC
// 1 = Save & Switch 
// 2 = Reset Status
// 4 = Reset Skills
// 7 = All of Above [ 1+2+4 = 7 ]
set .BMMode,7;
// How Many Slots available to Save Status Builds.
set .MaxSlots,3;
// Enable Stats Slot Rename + Max Name Length ( 0 = Disable )
setarray .Length,4,26; // Min. ~ Max. Words.
end;
 
}
Viewed 834 times, submitted by leloush.