prontera,102,102,5	script	Dead Branch Room	100,{
setarray $@maps$[1], "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08";
setarray .@price[1], 0, 		1000000, 	1000000, 		1000000, 		1000000, 	1000000, 		1000000, 	1000000;
for(set .@b,1; .@b < getarraysize($@maps$); set .@b,.@b + 1) {
	if(.@b==1){ set .@menu$, .@menu$  + "Public Room "+((getmapusers($@maps$[.@b])>=30)?"^CD0000Closed^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+") [z"+.@price[.@b]+"]")+":"; } else { set .@menu$, .@menu$  + "Private["+(.@b-1)+"]- "+((getmapusers(""+$@maps$[.@b]+"")>=5)?"^CD0000Closed^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+") [z"+.@price[.@b]+"]")+":"; }
}
if(select(.@menu$)) {
	if(Zeny<.@price[@menu]){mes "I'm sorry but you don't have enough Zeny, please come back later."; close;}
	if(getmapusers($@maps$[@menu])<=30&&@menu==1){
		set Zeny,Zeny-.@price[@menu];
		set $@maps$,$@maps$[@menu];
		setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],0,0; end;
	}
	if(!getmapusers($@maps$[@menu])){
		mes "Input a new password.";
		input($password$[@menu]);
		set Zeny,Zeny-.@price[@menu];
		set $@maps$,$@maps$[@menu];
		next; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],0,0; end;
	}
	if(getmapusers($@maps$[@menu])<=5&&@menu!=1) {
		mes "This room is password protected please input the password now.";
		input(@name$);
		if(@name$==$password$[@menu]){
			set Zeny,Zeny-.@price[@menu];
			set $@maps$,$@maps$[@menu];
			mes "correct!"; next; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],0,0; end;
		} else {
			mes "Incorrect!";
			close;
		}
	} else {
		mes "I'm sorry this room is full.";
		close;
	}
}

OnTimer3600000:
if(strcharinfo(3)==$@maps$){
	warp "prontera",0,0;
	end;
}
}

06guild_01,49,49,5	script	Heal#h1-1::Heal	110,{

	if((@h_last) && (getnpctimer(1))) goto L_doubleclick;
	
	set @h_last,1;
	percentheal 100,100;
	specialeffect 312;
	skilleffect 28,32767;
	sc_end SC_STONE;
	sc_end SC_FREEZE;
	sc_end SC_STUN;
	sc_end SC_SLEEP;
	sc_end SC_POISON;
	sc_end SC_CURSE;
	sc_end SC_SILENCE;
	sc_end SC_CONFUSION;
	sc_end SC_BLIND;
	sc_end SC_BLEEDING;
	sc_end SC_DPOISON;
	dispbottom "HP/SP fully restored.";
	if(!getnpctimer(1)){setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;}
	end;
	
L_doubleclick:
	killmonsterall strcharinfo(3);
	npctalk "I've killed all monsters.";
	end;

OnTimer1000:
	set @h_last,0;
	stopnpctimer;
	end;

OnInit:
	while(1){
		sleep 1000 * 60 * 5;
		if(!getusers(8) && mobcount strnpcinfo(5),all){ killmonsterall strnpcinfo(5);}
	}
}

// --------- NPC Clones ---------
06guild_01,49,49,5	duplicate(Heal)	Heal#h1-2	742
06guild_02,49,49,5	duplicate(Heal)	Heal#h1-3	742
06guild_03,49,49,5	duplicate(Heal)	Heal#h1-4	742
06guild_04,49,49,5	duplicate(Heal)	Heal#h1-5	742
06guild_05,49,49,5	duplicate(Heal)	Heal#h1-6	742
06guild_06,49,49,5	duplicate(Heal)	Heal#h1-7	742
06guild_07,49,49,5	duplicate(Heal)	Heal#h1-8	742
06guild_08,49,49,5	duplicate(Heal)	Heal#h1-9	742