//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; } }