//===== rAthena Script =======================================
//= Sample: Guild Storage Test
//===== By: ==================================================
//= rAthena Dev Team
//===== Last Updated: ========================================
//= 20180906
//===== Description: ========================================= 
//= Contains commands needed for a guild warehouse NPC.
//============================================================

prontera,165,188,4	script	Guild Warehouse	112,{
	cutin "kafra_06",2;

	mes "[Guild Warehouse Coupler]";
	mes "This is the guild warehouse coupler service."; 
	mes "You will not receive zeny for this is a test.";
	next;
	if (select("Access Guild Warehouse","Exit") != 1) {
		mes "[Guild Warehouser]";
		mes "Come back whenever you want.";
		cutin "kafra_06", 255;
		close;
	}

	switch(guildopenstorage()){
		case GSTORAGE_STORAGE_ALREADY_OPEN:
			mes "[Guild Warehouse]";
			mes "you are using your storage.";
			mes "Please wait a while, then come back.";
			break;
		case GSTORAGE_ALREADY_OPEN:
			mes "[Guild Warehouse]";
			mes "The guild warehouse is being used right now.";
			mes "Please wait a while, then come back.";
			break;
		case GSTORAGE_NO_GUILD:
			mes "[Guild Warehouse]";
			mes "You can't use this service if you're not in a guild!";
			break;
		case GSTORAGE_NO_STORAGE:
			mes "[Guild Warehouse]";
			mes "The guild does not have a guild storage.";
			break;
		case GSTORAGE_NO_PERMISSION:
			mes "[Guild Warehouse]";
			mes "You don't have permission to use the guild storage!";
			break;
	}
	cutin "kafra_06",255;
	close;
}
