//無限枝回廊(説明は途中で挫折ですorz) http://test-ro.net78.net/ //スクリプト //流れ main → Warp_Exe → Set_Mobs → 倒す → Monster_Killed → View_WP → // Monster_Killed 倒した敵 // View_WP1-[1-4] ワープポイント表示 // Warp_Exe ワープ実行 //サーバー変数 //$@Now_Area 階数(この階数分Infinity_Pointが加算されます。) //$@Mob_Count モンスター数 //$@Kill_Count モンスター殺害数 //$@Now_Info その階のMOBの種類 //$@Next_Info 次の階のMOBの種類 //$@Info_Mes$ その階のアナウンス //$@Csv_File$ CSVファイル名 //$@Rooms CSVの列数(=部屋の数) //スクリプト変数 //'read_first 初期設定フラグ //'ptid パーティID //'ptname$ パーティ名 //キャラクター変数 //Infinity_Point 何かに使用してください。 - script 美妙枝#main 831{ //--------初期設定----- if (!'read_first) { set $@Csv_File$, "script/original/db/infinity_mob.csv"; set $@Rooms, csvgetcols($@Csv_File$,0); set 'read_first, 1; for(set '@i,1; '@i <= 4; set '@i, '@i + 1) { disablenpc "View_WP" + '@i + "-5"; } } //----------終了------- if ('ptid == 0) { mes "[美妙枝]"; mes "いきますか?いきませんか?"; next; switch (select("いきます","いきません","説明を…")) { case 1: if(!getcharid(1) || getpartyleader(getcharid(1)) != strcharinfo(0)) { mes "[美妙枝]"; mes "参加申請を行えるのは"; mes "パーティーのリーダーのみです。"; close; } else if('ptid == 0) { //参加手続き開始 initnpctimer; //必要変数をセット set $@Mob_Count, 10; set $@Kill_Count, 0; callfunc "Set_Mobs",$@Mob_Count; set $@Now_Area,1; set 'ptid, getcharid(1); set 'ptname$, getpartyname(getcharid(1)); announce "パーティー「" + 'ptname$ + "」が無限回廊に挑戦するようです。",0x11; mes "[美妙枝]"; mes "セット完了です。"; mes "もう一度話しかけてね。"; close; } else { mes "[美妙枝]"; mes "少し遅かったです…。"; mes "パーティー^0000FF「" + 'ptname$ + "」^000000が"; mes "挑戦することになりました。"; close; } case 2: mes "[美妙枝]"; mes "分かりました。"; if (getgmlevel() > 50){ set 'read_first, 0; mes "設定を初期化しました。"; } close; case 3: goto L_Introduction; } } else{ mes "[美妙枝]"; set '@time, 3600000 - getnpctimer(0,"美妙枝"); set '@time_min, ('@time/60000); if('ptid != getcharid(1)) { mes "申し訳ないですが、今は"; mes "パーティー^0000FF「" +'ptname$+ "」^000000が"; mes "挑戦中です。"; mes "終了まであと" + '@time_min + "分です。"; next; if (select("説明を…","了解です")==1) goto L_Introduction; close; } else { mes "終了まであと" + '@time_min + "分です。"; mes "詰まった時にチェックしてくださいね。"; mes "$@Now_Area : " + $@Now_Area; mes "$@Now_Info : " + $@Now_Info; mes "$@Next_Info : " + $@Next_Info; mes "$@Mob_Count : " + $@Mob_Count; mes "$@Kill_Count : " + $@Kill_Count; mes "$@Rooms : " + $@Rooms; if (select("行く","行かない")==1) callfunc "Warp_Exe"; close; end; } close; } return; L_Introduction: mes "[美妙枝]"; mes "新しいダンジョン^FF0000「無限回廊」^000000が"; mes "発見されました。"; mes "私はそのダンジョンの挑戦者を探しています。"; mes "内部は通称「枝モンスター」と呼ばれる敵が徘徊しています。"; mes "稀にボスモンスターとか出る場合もあるみたいです。"; next; mes "[美妙枝]"; mes "無限回廊には魔力が満ち溢れていて、"; mes "色々不思議な事が起こります。"; next; mes "[美妙枝]"; mes "^FF00001.入れるのは1PTのみ^000000"; mes "どういう理屈かわかりませんが、"; mes "パーティという繋がりがないと"; mes "ダンジョンに入れません。"; mes "でも、挑戦の途中からでも"; mes "パーティに入れば挑戦可能です。"; next; mes "[美妙枝]"; mes "^FF00002.魔力ポイントの付与^000000"; mes "魔力ポイント、通称^FF0000「MP」^000000です。"; mes "^FF0000MPはモンスターを全滅させた時に出現する"; mes "ワープポータルに乗った時に加算されます。^000000"; mes "このMPはキャラクターにくっついてるのですが、"; mes "それを利用した技術もあるそうです。"; next; mes "[美妙枝]"; mes "^FF00003.制限時間は1時間^000000"; mes "1時間が経過すると"; mes "問答無用で弾きだされます。"; mes "なので最深部があるのかは不明です。"; close; return; OnTimer3000000: announce "パーティー「" + 'ptname$ + "」の挑戦があと10分です",0x10; end; OnTimer3600000: announce "パーティー「" + 'ptname$ + "」の挑戦が終了しました",0x10; for(set '@i,1; '@i <= 4; set '@i, '@i + 1) { set '@Gat_Name$,"pvp_n_" + '@i + "-5.gat"; areawarp '@Gat_Name$,0,0,400,400,"SavePoint",0,0; disablenpc "View_WP" + '@i + "-5"; killmonsterall '@Gat_Name$; } set $@Kill_Count, 0; set 'ptid,0; set $@Now_Area,0; set 'ptname$,""; set $@Next_Info,0; set $@Now_Info,0; stopnpctimer; end; } function script Warp_Exe { set '@Gat_Name$,"pvp_n_" + (($@Now_Area + 3) % 4 + 1) + "-5.gat"; warp '@Gat_Name$,65,99; return; } function script Set_Mobs { // モンスター召喚 set '@num$, (($@Now_Area) % 4 + 1) + "-5"; set '@Gat_Name$, "pvp_n_" + '@num$ + ".gat"; if($@Next_Info == 0){ areamonster '@Gat_Name$,80,80,119,119,"--ja--",-1,getarg(0),"Monster_Killed" + '@num$ + "::OnKilled"; } else{ set '@Call_Number, csvread($@Csv_File$, 1, $@Next_Info); //召喚数の取得 if ('@Call_Number == 0){ //0の場合は全MOBがそのカテゴリー内から召喚 for(set @i,0;@i < getarg(0);set @i,@i+1) { set '@randam, rand(1, csvfind($@Csv_File$, $@Next_Info, E)); areamonster '@Gat_Name$,80,80,119,119,"--ja--",csvread($@Csv_File$, '@randam, $@Next_Info),1,"Monster_Killed" + '@num$ + "::OnKilled"; } } else { for(set @i,0;@i < getarg(0);set @i,@i+1) { set '@randam, rand(1, csvfind($@Csv_File$, $@Next_Info, E)); if ((@i % '@Call_Number) == 1) areamonster '@Gat_Name$,80,80,119,119,"--ja--",csvread($@Csv_File$, '@randam, $@Next_Info),1,"Monster_Killed" + '@num$ + "::OnKilled"; else areamonster '@Gat_Name$,80,80,119,119,"--ja--",-1,1,"Monster_Killed" + '@num$ + "::OnKilled"; } } } return; } //ワープポータル - script View_WP 45{ set Infinity_Point,Infinity_Point + $@Now_Area - 1; callfunc "Warp_Exe"; if($@Now_Info != 0){ announce $@Info_Mes$,0x03; } end; } pvp_n_1-5.gat,134,99,6 duplicate(View_WP) View_WP1-5 45,1,1 pvp_n_2-5.gat,134,99,6 duplicate(View_WP) View_WP2-5 45,1,1 pvp_n_3-5.gat,134,99,6 duplicate(View_WP) View_WP3-5 45,1,1 pvp_n_4-5.gat,134,99,6 duplicate(View_WP) View_WP4-5 45,1,1 //全滅チェック - script Monster_Killed -1{ OnKilled: set $@Kill_Count,$@Kill_Count + 1; if($@Kill_Count == $@Mob_Count) { set '@time, 3600000 - getnpctimer(0,"美妙枝"); set '@time_min, ('@time / 60000); announce ($@Now_Area) + " 階のモンスターを全滅させました!!(残り" + '@time_min + "分)",0x11; set $@Kill_Count, 0; set $@Mob_Count, $@Mob_Count + 2; callfunc "Set_Mobs",(($@Mob_Count - 4) % 20 + 4); disablenpc "View_WP"+ (($@Now_Area + 1) % 4 + 1) + "-5"; enablenpc "View_WP"+ (($@Now_Area + 3) % 4 + 1) + "-5"; set $@Now_Area, $@Now_Area + 1; set $@Now_Info, $@Next_Info; set $@Next_Info,rand($@Rooms * 2); if ($@Next_Info >= $@Rooms) set $@Next_Info,0; set $@Info_Mes$, csvread($@Csv_File$, 0, $@Now_Info); } else if((($@Mob_Count - $@Kill_Count) % 20) == 0){ callfunc "Set_Mobs",20; } end; } pvp_n_1-5.gat,0,0,0 duplicate(Monster_Killed) Monster_Killed1-5 -1 pvp_n_2-5.gat,0,0,0 duplicate(Monster_Killed) Monster_Killed2-5 -1 pvp_n_3-5.gat,0,0,0 duplicate(Monster_Killed) Monster_Killed3-5 -1 pvp_n_4-5.gat,0,0,0 duplicate(Monster_Killed) Monster_Killed4-5 -1 hugel.gat,42,124,5 duplicate(美妙枝#main) 美妙枝 831