/************************************************************\
                        Eathena Script
**************************************************************
    ơȫ(Omnipotent Sun Yanzi)
    ͡
    1.0.6
ȨСʶ
Ȩá
  ˡEathena 12019 
Ա
    ߻
    ̣ʶ
    Σʶ
    ʶ
    ԣտ硢ʶ
Ҫ˵
        űΪ Eathena רñűʮȫ棬
     д͡ȫѨֲ㴫͡õͼ͡Χָ
    Ⱦ͡Ⱦ·ȹܡ
־
    2008-01-14    1.0.0    ű
    2008-01-16    1.0.1    ޸ĻͲִ룬Ի
    2008-02-26    1.0.2    ĺҹ
    2008-05-17    1.0.3    ޵ԺͼֵĴ
    2008-08-28    1.0.4    Bossͣ쳣״ָ̬װ(flamen)
    2009-02-27    1.0.5    װЧ by 99MaxEa ߡ
    2012-08-18	  1.0.6	   ƳмѨϢ by 99MaxEa űᱦ
\************************************************************/

prontera.gat,146,91,6	script	#a	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
morocc.gat,160,97,4	script	#b	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
geffen.gat,126,62,8	script	#c	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
payon.gat,192,104,4	script	#d	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
alberta.gat,27,238,4	script	#e	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
izlude.gat,134,92,4	script	#f	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
aldebaran.gat,145,116,6	script	#g	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
xmas.gat,159,111,6	script	#h	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
comodo.gat,192,150,6	script	#i	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
yuno.gat,150,187,6	script	#j	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
amatsu.gat,193,91,6	script	#k	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
gonryun.gat,157,122,6	script	#l	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
umbala.gat,126,136,4	script	#m	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
niflheim.gat,23,159,6	script	#n	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
louyang.gat,226,60,6	script	#o	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
jawaii.gat,225,204,6	script	#p	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
ayothaya.gat,214,192,6	script	#q	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
einbroch.gat,57,203,6	script	#r	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
lighthalzen.gat,163,102,4	script	#s	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
einbech.gat,181,129,4	script	#t	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
hugel.gat,102,150,4	script	#u	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
rachel.gat,132,116,4	script	#v	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
veins.gat,221,128,4	script	#y	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
malangdo.gat,175,135,4	script	#a1	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
malaya.gat,232,202,4	script	#a2	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
manuk.gat,279,198,4	script	#a3	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
mora.gat,107,115,4	script	#a4	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
moscovia.gat,221,189,4	script	#a5	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
splendide.gat,190,187,4	script	#a6	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
brasilis.gat,195,221,4	script	#a7	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
dewata.gat,197,184,4	script	#a8	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }
dicastes01.gat,137,117,4	script	#a9	756,5,5,{ callfunc "sunmm"; OnTouch: callfunc "sunmmhpsp"; }


function	script	sunmmhpsp	{  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; percentheal 100,100; emotion 3; end; }

function	script	sunmm	{
	set @w,0;
	deletearray @mapname$[0],128;
	cutin "son",2;
	mes "[]";
	mes ":^FF0000"+ gettimestr("%Y%m%d %H:%M:%S",50) +"^000000";
	mes "־ ^3355FF^000000";
	mes "ɾ˵ĺܸ!";
	mes "Ҫʲôķأ";
	next;
	switch(select("д","Ѩ","","BOSS","װ","װ","ٻָ","Ⱦͷ","","Ⱦ·")){
		case 1: //
			mes "[]";
			mes "ѡҪ͵ĳС";
			next;
			set @w,select("¬׵¼ ׶ ¡","ɳĮ֮ ޿","ħ֮ ","ɽ֮ ","ۿ֮ ","Ƕ ˹³õ","˺֮ ","ѩ ","֮ ħ","޷ ͹ ׶ ŵ","ˮ֮ ӣ","֮ ","̴ ","߹ ܽķ","Ŷ  ֮","","","µ צ","Ӵ̩","֮ ޿","ҵ֮ ϣ","ɿ ","԰лٸ","³̹̽ ׶ ","ϿȴӲ˹","ൺ","","ħŬ","ݾ","Ī˹Ʊ","Ի","","","ɳ׶˹˹")-1;
			atcommand "@go "+@w;
			break;
		case 2: //Ѩ
			mes "[]";
			mes "ѡҪ͵Ѩ";
			next;
			switch(select("Բɭ","¡ˮ","׶","ʷҿ˹Ѩ","Թ","ϵѨ","Ѩ","","˹غķų","˵¶","Թ","û֮","","굺","߹","ŵ޵ܶ","ӣԹ","ضѨ","ľ","Ŷ","","˹","е޹","˹֮","ɽѨ","¶","о","Ԩˮ¶Ѩ","Ѩ","ŴԹ","ʥѨ","ͼɽ","ĺ","¹","Ѩ","ɽѨ","ൺѨ","׳涴")){
				case 1:
					set @w,select("Բɭ1","Բɭ2","Բɭ3")-1;
					setarray @mapname$[0],"prt_maze01","prt_maze02","prt_maze03";
					break;
				case 2:
					set @w,select("¡ˮ1","¡ˮ2","¡ˮ3","¡ˮ4")-1;
					setarray @mapname$[0],"prt_sewb1","prt_sewb2","prt_sewb3","prt_sewb4";
					break;
				case 3:
					set @w,select("׶1","׶2","׶3","׶4","׶5")-1;
					setarray @mapname$[0],"iz_dun00","iz_dun01","iz_dun02","iz_dun03","iz_dun04";
					break;
				case 4:
					set @w,select("ʷҿ˹Ѩ1","ʷҿ˹Ѩ2","ʷҿ˹Ѩ3","ʷҿ˹Ѩ4","ʷҿ˹Ѩ5")-1;
					setarray @mapname$[0],"in_sphinx1","in_sphinx2","in_sphinx3","in_sphinx4","in_sphinx5";
					break;
				case 5:
					set @w,select("Թ1","Թ2","Թ3","Թ4","Թ1","Թ2")-1;
					setarray @mapname$[0],"moc_pryd01","moc_pryd02","moc_pryd03","moc_pryd04","moc_pryd05","moc_pryd06";
					break;
				case 6:
					set @w,select("ϵѨ1","ϵѨ2")-1;
					setarray @mapname$[0],"anthell01","anthell02";
					break;
				case 7:
					set @w,select("Ѩ1","Ѩ2","Ѩ3","Ѩ4")-1;
					setarray @mapname$[0],"gef_dun00","gef_dun01","gef_dun02","gef_dun03";
					break;
				case 8:
					set @w,select("1","2","3")-1;
					setarray @mapname$[0],"mjo_dun01","mjo_dun02","mjo_dun03";
					break;
				case 9:
					set @w,select("˹غķų","޵Ժ","¹Ĺ","1","2","1","2","ʿ1","ʿ2","","¥Ѩ","ˮ1","ˮ2","ˮ3","ˮ4","¶1","¶2")-1;
					setarray @mapname$[0],"glast_01","gl_church","gl_chyard","gl_cas01","gl_cas02","gl_prison","gl_prison1","gl_knt01","gl_knt02","gl_in01","gl_step","gl_sew01","gl_sew02","gl_sew03","gl_sew04","gl_dun01","gl_dun02";
					break;
				case 10:
					set @w,select("˵¶1","˵¶2")-1;
					setarray @mapname$[0],"orcsdun01","orcsdun02";
					break;
				case 11:
					set @w,select("Թ1","Թ2","Թ3","Թ4","Թ5")-1;
					setarray @mapname$[0],"pay_dun00","pay_dun01","pay_dun02","pay_dun03","pay_dun04";
					break;
				case 12:
					set @w,select("û֮1","û֮2")-1;
					setarray @mapname$[0],"treasure01","treasure02";
					break;
				case 13:
					set @w,select("1","2","3","4","1","2","3","4")-1;
					setarray @mapname$[0],"c_tower1","c_tower2","c_tower3","c_tower4","alde_dun01","alde_dun02","alde_dun03","alde_dun04";
					break;
				case 14:
					set @w,select("굺","Ѩ1","Ѩ2","Ѩ3")-1;
					setarray @mapname$[0],"tur_dun01","tur_dun02","tur_dun03","tur_dun04";
					break;
				case 15:
					set @w,select("߹1","߹2")-1;
					setarray @mapname$[0],"xmas_dun01","xmas_dun02";
					break;
				case 16:
					set @w,select("ŵ޵ܶ1","ŵ޵ܶ2")-1;
					setarray @mapname$[0],"mag_dun01","mag_dun02";
					break;
				case 17:
					set @w,select("ӣԹ1","ӣԹ2","ӣԹ3")-1;
					setarray @mapname$[0],"ama_dun01","ama_dun02","ama_dun03";
					break;
				case 18:
					set @w,select("ضѨ1","ضѨ2","ضѨ3")-1;
					setarray @mapname$[0],"gon_dun01","gon_dun02","gon_dun03";
					break;
				case 19:
					set @w,select("ľ1","ľ2")-1;
					setarray @mapname$[0],"um_dun01","um_dun02";
					break;
				case 20:
					set @w,select("Ŷ1","Ŷ2","Ŷ3")-1;
					setarray @mapname$[0],"lou_dun01","lou_dun02","lou_dun03";
					break;
				case 21:
					set @w,select("1","2","3","4")-1;
					setarray @mapname$[0],"gefenia01","gefenia02","gefenia03","gefenia04";
					break;
				case 22:
					set @w,select("˹1","˹2","˹Ĳ")-1;
					setarray @mapname$[0],"juperos_01","juperos_02","jupe_core";
					break;
				case 23:
					set @w,select("е޹1","е޹2")-1;
					setarray @mapname$[0],"kh_dun01","kh_dun02";
					break;
				case 24:
					set @w,select("˹֮1","˹֮2","˹֮3","˹֮4","˹֮5","˹֮6","˹֮7","˹֮8","˹֮9","˹֮10","˹֮11","˹֮12","˹֮13")-1;
					setarray @mapname$[0],"tha_t01","tha_t02","tha_t03","tha_t04","tha_t05","tha_t06","tha_t07","tha_t08","tha_t09","tha_t10","tha_t11","tha_t12","thana_boss";
					break;
				case 25:
					set @w,select("ɽѨ1","ɽѨ2")-1;
					setarray @mapname$[0],"ein_dun01","ein_dun02";
					break;
				case 26:
					set @w,select("¶1","¶2","¶3")-1;
					setarray @mapname$[0],"odin_tem01","odin_tem02","odin_tem03";
					break;
				case 27:
					set @w,select("о1","о2","о3")-1;
					setarray @mapname$[0],"lhz_dun01","lhz_dun02","lhz_dun03";
					break;
				case 28:
					set @w,select("Ԩˮ¶Ѩ1","Ԩˮ¶Ѩ2","Ԩˮ¶Ѩ3")-1;
					setarray @mapname$[0],"abyss_01","abyss_02","abyss_03";
					break;
				case 29:
					set @w,select("Ѩ1","Ѩ2","Ѩ3")-1;
					setarray @mapname$[0],"ice_dun01","ice_dun02","ice_dun03";
					break;
				case 30:
					set @w,select("ŴԹ1","ŴԹ2")-1;
					setarray @mapname$[0],"ayo_dun01","ayo_dun02";
					break;
				case 31:
					set @w,select("ʥѨ1","ʥѨ2","ʥѨ3","ʥѨ4","ʥѨ5")-1;
					setarray @mapname$[0],"ra_san01","ra_san02","ra_san03","ra_san04","ra_san05";
					break;
				case 32:
					set @w,select("ͼɽ1","ͼɽ2","ͼɽ3")-1;
					setarray @mapname$[0],"thor_v01","thor_v02","thor_v03";
					break;                          
				case 33:
					set @w,select("ĺ()","ĺ(ҹ)","޵Ժ1","޵Ժ2","޵Ժ3")-1;
					setarray @mapname$[0],"nameless_i","nameless_n","abbey01","abbey02","abbey03";
					break; 
                                case 34:
					set @w,select("¹1","¹2","¹3","¹4")-1;
					setarray @mapname$[0],"gld_dun01","gld_dun02","gld_dun03","gld_dun04";
					break;
				case 35:
					set @w,select("Ѩ1","Ѩ2")-1;
					setarray @mapname$[0],"bra_dun01","bra_dun02";
					break;
				case 36:
					set @w,select("Ѩ1","Ѩ2")-1;
					setarray @mapname$[0],"dew_dun01","dew_dun02";
					break; 
				case 37:
					set @w,select("ൺѨ1","ൺѨ2")-1;
					setarray @mapname$[0],"mal_dun01","mal_dun01";
					break;
				case 38:
					set @w,select("׳涴1","׳涴2","׳涴3")-1;
					setarray @mapname$[0],"dic_dun01","dic_dun02","dic_dun03";
					break;					 					        
				}
			warp @mapname$[@w],0,0;
			break;
		case 3: //
			mes "[]";
			mes "ѡҪ͵";
			next;
			set @w,select("ȳ","","Ұè","Ȯɭ","","˻","ħ","˲","粻ɭ","Ұ","","ħ","β","","","","аտ","ܵ")-1;
			setarray @mapname$[0],"prt_fild07","pay_fild04","gef_fild05","gef_fild12","mjolnir_05","mjolnir_11","prt_fild02","gef_fild14","gef_fild11","prt_fild10","pay_fild07","pay_fild10","pay_fild11","cmd_fild03","cmd_fild02","yggdrasil01","ein_fild04","beach_dun3";
			warp @mapname$[@w],0,0;
			break;
		case 4: //Boss
			mes "[]";
			mes "ѡҪ͵Boss";
			next;
			set @w,select("","","Ƥ","Ӣ","","ʥʹ","ʿ","","˹")-1;
			setarray @mapname$[0],"mjolnir_04","pay_fild11","moc_fild17","gef_fild14","gef_fild10","yuno_fild05","niflheim","xmas_fild01","ra_fild04";
			warp @mapname$[@w],0,0;
			break;
		case 5: //
			mes "[]";
			mes "ֵħװɡ";
			getinventorylist;
			for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i + 1 ) {
				if ( @inventorylist_identify[.@i] == 1 ) continue;
				delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
				getitem2 @inventorylist_id[.@i],1,1,0,0,0,0,0,0;
			}
			emotion 3;
			break;
		case 6: //
			mes "[]";
			mes "ֵ޸װɡ";
                        next;
                        switch(select("...ж:Ŀǰû")) {
	case 1:
		set .@checkitem,1;
		while (1) {
			if (getbrokenid(.@checkitem) == 0) {
				break;
			}
			set .@checkitem,.@checkitem+1;
		}
		set .@checkitem,.@checkitem-1;
		if (!.@checkitem) {
			mes "[]";
			mes "!";
			mes "϶ǳƷ!ûһŶ";
			next;
			mes "[]";
			mes "ÿ˶ҾͻҪʧҵ!";
			break;
		}
		mes "[]";
		mes "...";
		mes "ҿ...";
		mes "Ʒ,";
		mes "" + .@checkitem + "  Ҫ";
		mes "?";
		next;
		switch(select("õ:Ҫ")) {
		case 1:
			set .@checkitem2,1;
			while (1) {
				if (getbrokenid(.@checkitem2) == 0) {
					break;
				}
				set .@checkitem2,.@checkitem2+1;
			}
			set .@checkitem2,.@checkitem2-1;
			if (.@checkitem == .@checkitem2) {
				while (.@checkitem) {
					repair(.@checkitem);
					set .@checkitem,.@checkitem-1;
				}
				mes "[]";
				mes "Ok! ޺ˡ";
				break;
			}
			else {
				mes "[]";
				mes "㲢ûκλĶҪ...";
				break;
			}
		case 2:
			mes "[]";
			mes "Ժװ,Ұ~";
			break;
		}
			emotion 3;
			
			break;
        case 2:
		mes "[]";
		mes "Ŷ...";
		mes "û";
		mes "Ҫ";
		mes "ûκζ";
		mes "Ҫ.";
		break;
	}
			emotion 3;
			
			break;                       
		case 7: //ָ
			mes "[]";
			mes "Ϊøλ;˳һϵˮ֮ǹͨŽǵΪָHPSP";
			mes "ԸԶͬڡ";
			percentheal 100,100;
			emotion 3;
			
			break;
		case 8: //Ⱦ
			mes "[]";
			mes "ƯѵȾ·ɫ";
			mes "ɫԻŶ";
			next;
			set @w,select("һԭɫ","ƤĻɫ","´󷽵ɫ","ϻ۽ɫ","ϸĳɫ","߹ŵɫ","ʵİɫ","Ͻׯصĺɫ","鱼ŵĺɫ")-1;
			setlook 6,@w;
			mes "[]";
			mes "ɫĺʺρ~.";
			mes "ףи~ ";
			break;
		case 9: //
			mes "[]";
			mes "Ҳһּ߸Ի.";
			mes "Ҫķ?";
			next;
			mes "[]";
			mes "㿴ô?";
			next;
			for (set @x,1;@x!=0;) {
				if(@x!=getbattleflag("max_hair_style")+1) cutin "hair_"+(Sex?"m":"f")+"_"+((@x<10)?"0":"")+@x+".bmp",2;
				switch(select((@x!=1)?"һ":"",(@x!=getbattleflag("max_hair_style")?"һ":""),"")){
					case 1: set @x,@x-1; break;
					case 2: set @x,@x+1; break;
					case 3: setlook 1,@x; set @x,0; break;
					}
				}
			cutin "son",2;
			mes "[]";
			mes "ʽǾ԰";
			mes "ף飬ͷŪˡ";
			break;
		case 10: //Ⱦ
			mes "[]";
			mes "㲻·̫";
			mes "һµİɣ";
			next;
			set @w,select("ԭɫ","һɫ","ڶɫ","ɫ","ɫ")-1;
			setlook 7,@w;
			mes "[]";
			mes "·Ѿϴˡ";
			mes "ӭ´Сꡣ";
			break;
		}
cutin "son",255;
close;
}