summaryrefslogblamecommitdiff
path: root/npc/guilds/logs.txt
blob: fcd555f9926be4c063a458debcab8b37337d0c6e (plain) (tree)
1
2
3
4
5
6
7
8
9






                                                       
                       
                                                      




































                                                                                   






                
// Moubootaur Legends Script
// Author:
//    Jesusalva
// Description:
//  Guild Facility - Contains recipe list

guilds,47,39,0	script	Guild Logs	NPC_NO_SPRITE,{
    .@gid=getcharid(2);
    mesc l("Your guild doesn't know any recipes."), 1;
    if (getguildrole(.@gid, getcharid(3)) > GPOS_VICELEADER)
        close;
    do
    {
        select
            l("Do nothing"),
            rif(strcharinfo(0) == getguildmaster(.@gid), l("Raise max members"));
        mes "";

        switch (@menu) {
            case 2:
                .@cur_lv=getguildlvl(.@gid);
                .@min_lv=(getskilllv(GD_EXTENSION)+1)*4;
                .@price=.@min_lv*274;
                if (.@cur_lv < .@min_lv)
                {
                    mesc l("Guild Level is not enough: @@/@@", .@cur_lv, .@min_lv);
                    next;
                    break;
                }
                mesc l("Raising this skill will allow to recruit 4 more members.");
                mesc l("The cost for Guild Vault is @@ GP.", .@price);
                next;
                select
                    rif($GUILD_BANK[.@gid] >= .@price, l("Upgrade it")),
                    l("Don't upgrade it");
                mes "";
                if (@menu == 1 && $GUILD_BANK[.@gid] >= .@price)
                {
                    $GUILD_BANK[.@gid]-=.@price;
                    skill GD_EXTENSION, getskilllv(GD_EXTENSION)+1, 0;
                    break;
                }
                break;
        }

    } while (@menu != 1);
    close;

OnInit:
    .distance=2;
    end;
}