Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Rarity Server Service
- // Date 19.06.28
- prontera,130,142,4 script 守護女神 10104,{
- disable_items;
- mes "["+strnpcinfo(1)+"]";
- mes "你好, 請問要參加 "+.insname$+" 嗎~";
- if ( .CostZeny )
- mes "進入需要收 "+F_InsertComma(.CostZeny)+" z 的手續費哦!";
- next;
- .@party_id = getcharid(1);
- .@party_leader = getpartyleader(getcharid(1),2);
- .@char_id = getcharid(0);
- .@Acoount_id = getcharid(3);
- if ( !.@party_id ){
- message strcharinfo(0),"需要創建組隊才可以報名守護女神。";
- end;
- }
- .@OptionVar = select((.@char_id == .@party_leader)?"- 報名"+.insname$+"":"",instance_id()?"- 進入"+.insname$+"":"",(.@char_id == .@party_leader)?"- 銷毀"+.insname$+"":"","- 取消對話");
- switch(.@OptionVar){
- case 1:
- if ( .@party_leader != .@char_id ){
- message strcharinfo(0),"請隊長來與我對話。";
- end;
- }
- if(instance_create(.insname$) < 0) {
- message strcharinfo(0),""+.insname$+"副本創建失敗!";
- end;
- }
- 'ins_name$ = .insname$;
- 'party_name$ = getpartyname(getcharid(1));
- getpartymember getcharid(1),0;
- getpartymember getcharid(1),1;
- getpartymember getcharid(1),2;
- 'party_id = getcharid(1);
- .@partymembercount = $@partymembercount;
- copyarray .@partymembername$,$@partymembername$[0],.@partymembercount;
- copyarray .@partymembercid,$@partymembercid[0],.@partymembercount;
- copyarray .@partymemberaid,$@partymemberaid[0],.@partymembercount;
- for ( .@i = 0; .@i < .@partymembercount; .@i++ ){
- if ( !isloggedin(.@partymemberaid[.@i],.@partymembercid[.@i]) )
- continue;
- if ( readparam(Baselevel,.@partymembercid[.@i]) < .LevelMin )
- continue;
- if ( readparam(Baselevel,.@partymembercid[.@i]) > .LevelMax )
- continue;
- if ( 'partymembercount >= .SignupCount )
- continue;
- 'Challengelist$[getarraysize('Challengelist$)] = .@partymembername$[.@i];
- 'ChallengeAidlist[getarraysize('ChallengeAidlist)] = .@partymemberaid[.@i];
- 'partymembercount++;
- }
- mes "["+strnpcinfo(1)+"]";
- mes "副本初始化已完成。";
- end;
- case 2:
- .@index = inarray('Challengelist$,strcharinfo(0));
- if ( .@index == -1 ){
- mes "["+strnpcinfo(1)+"]";
- mes ""+strcharinfo(0)+"不符合挑戰規定, 禁止進入.";
- end;
- }
- if ( .CostZeny ){
- if ( Zeny < .CostZeny ){
- mes "["+strnpcinfo(1)+"]";
- mes "進入費用不足, 進入需要 "+F_InsertComma(.CostZeny)+"z.";
- end;
- }
- }
- if ( .Cooldown ){
- .@cooldown = GuardianGoddess-gettimetick(2)+.Cooldown;
- .@Hertired = (.@cooldown/3600)%60;
- .@Mintired = (.@cooldown/60)%60;
- .@Sectired = .@cooldown%60;
- if ( gettimetick(2) - GuardianGoddess < .@cooldown || .@cooldown > 0 ){
- mes "["+strnpcinfo(1)+"]";
- mes "- 剩餘冷卻時間 : "+(.@Hertired?""+.@Hertired+"時":"")+""+(.@Mintired?""+.@Mintired+"分":"")+""+.@Sectired+"秒";
- end;
- }
- }
- if ( 'Start ){
- mes "["+strnpcinfo(1)+"]";
- mes "副本挑戰已開始, 無法再進入.";
- end;
- }
- switch(instance_enter(.insname$)) {
- case IE_NOMEMBER: message strcharinfo(0),""+.insname$+"副本數據不存在!"; break;
- case IE_NOINSTANCE: message strcharinfo(0),"請先申請副本!"; break;
- case IE_OTHER: message strcharinfo(0),"副本場地已滿或副本數據不存在!"; break;
- default:
- if ( .Cooldown )
- GuardianGoddess = gettimetick(2);
- if ( .CostZeny )
- Zeny = Zeny - .CostZeny;
- if ( is_party_leader() == true )
- announce "由隊長 "+strcharinfo(0)+" 帶領的隊伍 "+getpartyname(getcharid(1))+" 進入了 "+'ins_name$+" 副本!",bc_all;
- break;
- }
- end;
- case 3:
- if ( instance_id() )
- instance_destroy;
- end;
- case 4:
- end;
- }
- end;
- OnTimer1000:
- showscript "[ 守護女神 ]";
- initnpctimer;
- end;
- OnInit:
- showscript "[ 守護女神 ]";
- initnpctimer;
- // 副本名稱
- .insname$ = "守護女神";
- // 最小等級限制
- .LevelMin = 120;
- // 最大等級限制
- .LevelMax = 185;
- // 最大報名人數
- .SignupCount = 12;
- // 進入花費金錢 ( 0 : 關閉 )
- .CostZeny = 0;
- // 是否開啟冷卻時間 ( 0 : 關閉 | 填入秒數 : 開啟 )
- .Cooldown = 0;
- end;
- }
- 1@guar,76,63,4 script 守護女神#副本 403,{
- if( is_party_leader() == false )
- end;
- mes "[規則說明]";
- mes "^0000FF一直保護女神到最大關卡^000000";
- mes "^0000FF消滅每關所有出現的怪物^000000";
- mes " ";
- mes "^FF0000女神死亡的話將挑戰失敗^000000";
- if(select("開始挑戰","在等一下")==2) end;
- close2;
- 'Start++;
- set 'pid,getcharid(1);
- set 'mpcs,0;
- set 'mvpgg,0;
- // set 'sysfor,10;
- set 'gp_item,0;
- set 'my_level,1;
- set 'map$,instance_mapname("1@guar");
- set 'bg1,bg_monster(1,'map$,76,63,"--ja--",20559,instance_npcname(strnpcinfo(0))+"::OnMvpDead");
- setunitdata 'bg1,UMOB_AI,1;
- setunitdata 'bg1,UMOB_MASTERAID,getcharid(3);
- setarray 'mobid[1],1447,1446,1445,1444,1443,1442,1441,1440,1399,1115;
- setarray 'mobAmount[1],1,2,3,4,5,6,7,8,2,2;
- mapannounce 'map$,"[規則說明]: 保護女神 至 第 "+getarraysize('mobid)+" 關 全部魔物殺死 ",15,"0x00FF99";
- hideonnpc instance_npcname(strnpcinfo(0));
- donpcevent instance_npcname("守護女神#副本")+"::OnMobLoop";
- end;
- OnMobLoop:
- if(!'mobid['my_level]){
- set 'mobid['my_level],1002;
- debugmes "[守護女神]: 第 "+'my_level+" 關 怪物為 NULL 系統修正為 波利";
- }
- set .@answer$,strmobinfo (2,'mobid['my_level]);
- mapannounce 'map$,"[守護女神]: 第 "+'my_level+" 關 已放出 "+.@answer$+"",15,"0x77DDFF";
- set 'mpcs,'mobAmount['my_level]*4;
- .@sysfor = 'mobAmount['my_level];
- for( .@i = 1; .@i <= .@sysfor; .@i++){
- set 'mob1,bg_monster (2,'map$,58,63,"--ja--",'mobid['my_level],instance_npcname(strnpcinfo(0))+"::OnMobDead");//左
- set 'mob2,bg_monster (2,'map$,93,64,"--ja--",'mobid['my_level],instance_npcname(strnpcinfo(0))+"::OnMobDead");//右
- set 'mob3,bg_monster (2,'map$,76,81,"--ja--",'mobid['my_level],instance_npcname(strnpcinfo(0))+"::OnMobDead");//上
- set 'mob4,bg_monster (2,'map$,76,47,"--ja--",'mobid['my_level],instance_npcname(strnpcinfo(0))+"::OnMobDead");//下
- if('mvpgg)
- end;
- sleep rand(300,600);
- if ( 'mob1 )
- unitwalk 'mob1,70,63;
- if ( 'mob2 )
- unitwalk 'mob2,81,64;
- if ( 'mob3 )
- unitwalk 'mob3,76,68;
- if ( 'mob4 )
- unitwalk 'mob4,76,60;
- }
- end;
- OnMvpDead:
- set 'mvpgg,1;
- mapannounce 'map$,"[守關女神]: 闖關失敗 3秒後 自動傳送回城",15,"0x00FF99";
- killmonster 'map$,instance_npcname(strnpcinfo(0))+"::OnMobDead";
- initnpctimer;
- end;
- instance_warpall "prontera",156,77;
- end;
- OnMobDead:
- set 'mpcs,'mpcs-1;
- if('mpcs)
- end;
- set 'my_level,'my_level+1;
- if( 'my_level < getarraysize('mobid) ){
- donpcevent instance_npcname("守護女神#副本")+"::OnMobLoop";
- end;
- }
- getmapxy(.@map$,'x,'y,BL_PC);
- donpcevent instance_npcname("守護女神#副本")+"::OnInstgp";
- end;
- Oninstgp:
- set 'gp_item,1;
- donpcevent instance_npcname("副本寶箱#guar")+"::OnGpitem";
- end;
- }
- 1@guar,0,0,0 script 副本寶箱#guar 10005,{
- if ( is_party_leader() == false ){
- showscript "請隊長與我對話。";
- end;
- }
- if ( select( "領取獎勵", "取消對話" ) == 2 )
- end;
- for ( .@i = 0; .@i < getarraysize('Reward_Chance); .@i++ )
- .@MaxChance += 'Reward_Chance[.@i];
- for ( .@j = 0; .@j < getarraysize('ChallengeAidlist); .@j++ ){
- if ( !isloggedin('ChallengeAidlist[.@j]) )
- continue;
- .@chance = rand(0,.@MaxChance);
- for ( .@e = 0; .@e <= getarraysize('Reward_Chance); .@e++ ){
- .@chancev2 += 'Reward_Chance[.@e];
- if ( .@chance >= (.@chancev2-'Reward_Chance[.@e]) && .@chance < .@chancev2 ){
- getitem 'Reward_Item[.@e],'Reward_Amount[.@e],'ChallengeAidlist[.@j];
- break;
- }
- }
- }
- instance_warpall "prontera",156,77;
- end;
- OnGpitem:
- enablenpc instance_npcname(strnpcinfo(0));
- movenpc instance_npcname("副本寶箱#guar"),'x,'y;
- end;
- OnInstanceInit:
- setarray 'Reward_Item,501,502,503,504,505,506,507,508,509,510;
- setarray 'Reward_Amount,1,2,3,4,5,6,7,8,9,10;
- setarray 'Reward_Chance,10,10,10,10,10,10,10,10,10,10;
- disablenpc instance_npcname(strnpcinfo(0));
- end;
- }
- 1@guar mapflag noteleport
- 1@guar mapflag nosave SavePoint
- 1@guar mapflag nomemo
- 1@guar mapflag nobranch
- 1@guar mapflag monster_noteleport
- 1@guar mapflag nopenalty
- 1@guar mapflag nomvploot
- 1@guar mapflag nomobloot
- 1@guar mapflag restricted 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement