viewing paste Unknown #15478 | 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
poring_w02,172,175,4    script  Guild Warehouse 112,{
    cutin "kafra_06",2;
 
    mes "[Guild Warehouse]";
    mes "This is the guild warehouse coupler service."; 
    next;
    menu "Access Guild Warehouse", GS_OPEN, "Set Guild Warehouse Password", GS_PASS, "Exit", GS_EXIT3;
 
GS_OPEN:
    if(getd("$gspass"+getcharid(2)+"$")!=""){
        mes "[Guild Warehouse]";
        mes "Please input your guild's password."; input(.@gspass$);
        if(.@gspass$==getd("$gspass"+getcharid(2)+"$")){ mes "Welcome!"; } else { mes "I'm sorry but the password you entered is incorrect."; goto GS_EXIT4; }
    }
    set @flag,guildopenstorage;
    if(@flag == 1) goto GS_EXIT1;
    if(@flag == 2) goto GS_EXIT2;
    goto GS_EXIT4;
 
GS_PASS:
    if(!getcharid(2)) { mes "[Guild Warehouse]"; mes "I'm sorry but you don't have a guild."; goto GS_EXIT4; }
    query_sql("SELECT `master` FROM `guild` WHERE `guild_id` = '"+ getcharid(2) +"';",.@b$);
    if(.@b$!=strcharinfo(0)){   mes "[Guild Warehouse]"; mes "I'm sorry but you're not the guild leader of "+strcharinfo(2)+"."; goto GS_EXIT4; }
    if(getd("$gspass"+getcharid(2)+"$")!=""){   mes "[Guild Warehouse]"; mes "Did you forget, your guild password is "+getd("$gspass"+getcharid(2)+"$")+". Do you still want to change it?"; if(select("Yes:No")-1) goto GS_EXIT4; }
    mes "[Guild Warehouse]";
    mes "Please input your new guild storage password.";
    input(.@gspass1$);  mes "[Guild Warehouse]"; mes "Again."; input(.@gspass2$); if(.@gspass1$==.@gspass2$){ setd "$gspass"+getcharid(2)+"$",.@gspass1$; } else {  mes "[Guild Warehouse]"; mes "I'm sorry, but passwords entered didn't match. Please try again."; goto GS_PASS; }
    mes "[Guild Warehouse]";
    mes getd("$gspass"+getcharid(2)+"$")+" has been set as your password.";
    goto GS_EXIT4;
 
GS_EXIT1:
    mes "[Guild Warehouse]";
    mes "The guild warehouse is being used right now.";
    mes "Please check back later.";
    goto GS_EXIT4;
 
GS_EXIT2:
    mes "[Guild Warehouse]";
    mes "You can't use this service if you're not in a guild!";
    goto GS_EXIT4;
 
GS_EXIT3:
    mes "[Guild Warehouser]";
    mes "Come back whenever you want.";
 
GS_EXIT4:
    cutin "kafra_06",255;
    close;
}
Viewed 559 times, submitted by Guest.