viewing paste DIsguiser | Athena

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
//=============================================
//= Disguise NPC
//===== By: ==================================================
//= Akinari
//============================================================
 
aero,189,213,6  script  Disguiser   719,{
 
    //Configuration for script
    set .@price,50000;    //Price for disguising
//  set .@maxdisguise,10  //Maximum allowed disguised at a time
 
    if(AgitCheck()) {
        mes "King/War of Emperium is currently active.  You can't be disguised at this time.";
        close;
    }
 
    //Checks for an already disguised character
    while(.@i < .num) {
        if(.curdisguised[.@i] == getcharid(3)){
            mes "You've already been disguised, Bro!  Want me to switch you back?";
            if(select("Sounds Awesome!","No Way!") == 1) {
                undisguise;
                deletearray .curdisguised[.@i],1;
                .num--;
                mes "Dum ~ Dee ~ Dum Dum DUM!!  DONE!";
            }
            close;
        }
        .@i++;
    }
    mes "Yo bud!  I'm gonna make you look like a beast!";
    next;
    mes "Want me to give you a lovely new face?  This process has a ^0000FF"+.@price+" Zeny^000000 fee.";
    if(select("Absolutely!","No thank you.") == 1){
        if(Zeny < .@price){
            mes "Tsk tsk tsk... Them pockets ain't got enough loot in them.  Come back with the ^0000FF"+.@price+" Zeny^000000 I asked for.";
            close;
        }
        input .@pdisguise;
        //Monster validity check
        if(!getmobdrops(.@pdisguise)){
            mes "WHOA WHOA WHOA!!  Hold on a second there!  That's not a real monster.";
            next;
            mes "Give me something I can at least work with!";
            close;
        }
        disguise .@pdisguise;
        setarray .curdisguised[.num],getcharid(3);
        .num++;
        set Zeny,Zeny - .@price;
        mes "All done!";
        close;
    }
    mes "You know where I'll be Sweet Cheeks!";
    close;
 
//Remove all disguises for WoE
OnAgitStart:
    while(.@i < .num){
        attachrid .curdisguised[.@i];
        undisguise;
        detachrid;
        .@i++;
    }
    deletearray .curdisguised[0],127;
    set .num,0;
    end;
 
//Remove player from disguise array on logout
OnPCLogoutEvent:
    while(.@i < .num){
        if(.curdisguised[.@i] == getcharid(3)) {
            deletearray .curdisguised[.@i],1;
            .num--;
        }
        .@i++;
    }
    end;
 
}
Viewed 678 times, submitted by Guest.