viewing paste Unknown #14656 | 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
//guildmaker script by Normynator v1.0
prontera,148,171,4  script  Master of Guilds    48,{
    setarray .@items[0], 4070, 4103, 4212, 4106, 4098, 4100, 4060, 4066;
    mes "[Master of Guilds]";
    mes "Are you interested in having your one Guild?";
    if(select("Yes:No") -1) end;
    next;
    mes "[Master of Guilds]";
    mes "I'm the only one who is allowed to issue guild permits.";
    mes "You will need a guild permit besides the usual emperium to create a Guild.";
    next;
    mes "[Master of Guilds]";
    mes "Do you want to have your Guild?";
    if(select("Yes, sure:No, I'm not ready!") -1) end;
    next;
    mes "You need to prove yourself trustworthy of owning a guild!";
    mes "You have to bring me the following items from four important monster races:";
    next;
    mes "[Master of Guilds]";
    mes "Formless Race: Eggyra or Horong Card.";
    mes "Undead Race: Bongun or Mummy Card.";
    mes "Demon Race: Dokebi or Sohee Card.";
    mes "Demi-Human Race: Goblin or Orc Warrior Card.";
    mes "And you also need 5x Credits as a fee for my Service.";
    next;
    mes "Do you want to give the items to me?";
    if(select("Yes, Create a Guild!:No, my items!") -1) end;
    set .@i, 0;
    set .@b, 0;
    while(1){
        //dispbottom getitemname(.@items[.@i]) + " " + getitemname(.@items[.@i + 1]);
        //dispbottom strcharinfo(2) + "here";
        if(countitem(.@items[.@i]) > 0 || countitem(.@items[.@i + 1]) > 0){
            if(countitem(.@items[.@i]) > 0 && countitem(.@items[.@i + 1]) > 0){
                next;
                mes "Choose which Card you want to give me!";
                if(select(""+getitemname(.@items[.@i])+":"+getitemname(.@items[.@i + 1])+"") -1){
                    set @inv[.@b], .@items[.@i +1];
                }else{
                    set @inv[.@b], .@items[.@i];
                }
            }else if(.@items[.@i] > 0){
                set @inv[.@b], .@items[.@i];
            }else{
                set @inv[.@b], .@items[.@i +1];
            }
            .@b++;
            //dispbottom "i = " + .@i;
            if(.@i == 6){
                if(countitem(7179) >= 5){
                    if(strcharinfo(2) == ""){
                        set @w, 1;
                        while(@w == 1){
                            next;
                            mes "[Master of Guilds]";
                            mes "Input your Guildname!";
                            input @name$;
                            next;
                            mes "[Master of Guilds]";
                            mes "Is " + @name$ + " correct?";
                            if(select("Yes:No") -1){
                                set @w, 1;
                            }else{
                                set @w, 0;
                                .@size  = query_sql("SELECT `name` FROM `guild`", .@id$);
                                for(.@q = 0;.@q < .@size; .@q++){
                                    if(.@id$[.@q] == @name$){
                                        next;
                                        mes "This Guild already exists!";
                                        set @w, 1;
                                    }
                                }
                            }
                        }
                        for(.@o = 0; .@o < 4; .@o++){
                            dispbottom "Give away: " + getitemname(@inv[.@o]);
                            delitem @inv[.@o], 1;
                        }
                        delitem 7179, 5;
                        atcommand "@guild "+ @name$;
                        end;
                    }else{
                        next;
                        mes "[Master of Guilds]";
                        mes "You already have a guild!";
                        mes "Please come back later!";
                        close;
                        end;
                    }
                }
            }
        }else{
            mes "[Master of Guilds]";
            mes "You do not have all items.";
            mes "I am sorry.";
            mes "Come back if you have all items.";
            end;
        }
        set .@i, .@i + 2;
    }
}
Viewed 611 times, submitted by Normynator.