viewing paste Unknown #27507 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
/*
========================================================
 
- 腳本名稱: 20關副本道館
 
- 腳本作者: Nick
 
- 使用說明:
 
db/instance_db.txt
 
自定編號,初階道館,3600,1@guild,50,50,1@guild
 
- 映射地圖部分: 要有自行新增地圖的能力
 
data/resnametable.txt
 
[email protected]#guild_vs1.gat#
[email protected]#guild_vs1.gnd#
[email protected]#guild_vs1.rsw#
 
data/texture
嶸盪檣攪檜蝶\map\[email protected]#嶸盪檣攪檜蝶\map\guild_vs1.bmp#
 
db/map_index.txt
 
1@guild
 
Conf/maps_athena.conf
 
mep: 1@guild
 
>>>>>>>>>>>>如有轉載請保留以上,非常感激<<<<<<<<<<<<<<
=============================================================*/
 
amatsu,128,154,4    script  20關道場管理員    734,{
 
    if ( !getcharid(1) ) {
        mes .@npc_name$;
        mes "請先組隊再來報名";
        close;
    }
    if ( getcharid(0) != getpartyleader(getcharid(1),2) ) {
        mes .@npc_name$;
        mes "對不起,你不是隊長。";
        close;
    }
    set .Zeny,10; //入場費用(萬元單位)
    set .@map_name$,"初階道館";
    set .@npc_name$,"[20關道場管理員]";
    mes .@npc_name$;
    mes "您是隊伍 " + getpartyname(getcharid(1)) + " 的隊長吧?";
    mes "道場需交 "+.Zeny+" 萬入場費用,你要參與嗎?";
    next;
    switch(select("我想報名 "+.@map_name$,"離開","銷毀副本")) {
 
    case 1:
        if ( instance_create(.@map_name$) < 0 ) {
            mes .@npc_name$;
            mes "隊伍名稱: "+getpartyname(getcharid(1));
            mes "隊伍隊長: "+strcharinfo(0);
            mes "^0000ff"+.@map_name$+" ^000000- 創建失敗!";
            close;
        }
        if ( Zeny < .Zeny*10000) {
            mes .@npc_name$;
            mes "很抱歉,您的金錢不足!";
            close;
        }
        set Zeny,Zeny- .Zeny*10000;
        instance_enter(.@map_name$);
        warpparty instance_mapname("1@guild", instance_id()),50,50,getcharid(1);
        announce "隊伍 "+getpartyname(getcharid(1))+" 進入了20關道場 "+.@map_name$+".",0;
        //----腳本設置
        //----怪物編號設置
        setarray 'monsterid[1],1001,1002,1007,1008,1009,1010,1011;
        //---怪物數量(設定幾隻就是關卡)
        setarray 'monsternum[1],1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;
        //---休息場數
        setarray 'enterromob[1],5,9;
        //---獎品設置
        setarray 'enterItem[1],501,502,503,504,505;
        //---獎品數量
        setarray 'enterCou[1],1,2,3,4,5;
        //---獎金設置
        setarray 'enterZeny[1],100,300;
        close;
    case 2:
        mes .@npc_name$;
        mes "若想挑戰道館,請記得來報名!";
        close;
    case 3:
        instance_destroy;
        close;
    }
OnInit:
    waitingroom "20關道館挑戰",0;
    end;
}
 
 
1@cd_dao,50,49,4    script  道館裁判    758,{
 
    if ( getcharid(0) != getpartyleader(getcharid(1),2) ) {
        mes "[道館裁判]";
        mes "只有隊長有權力開起挑戰";
        close;
    }
    mes "[道館裁判]";
    mes "請問藥開始挑戰了嗎?";
    next;
    switch(select("開始挑戰!","不小心點到!")){
    case 1:
        disablenpc  instance_npcname("道館裁判", instance_id());
        doevent instance_npcname("道館出怪",instance_id())+"::OnMobstar";
        close;
    case 2:
        mes "[道館裁判]";
        mes "那您以後別在那麼不小心哩!";
        close;
    }
}
 
1@guild,0,0,0   script  道館出怪    -1,{
 
OnMobstar:
    set 'Checkpoint,'Checkpoint+1;
    for (set .@n,0; .@n < 'monsternum['Checkpoint]; set .@n,.@n+1) {
        monster instance_mapname("1@guild", instance_id()),rand(45,55),rand(45,55),"--ja--",'monsterid[rand(1,getarraysize('monsterid)-1)],1,instance_npcname("道館出怪")+"::OnKill_Mob";
    }
    set 'mobs,'mobs+.@n;
    end;
 
OnKill_Mob:
    set 'mobs,'mobs-1;
    if( 'mobs > 0 ) {
        end;
    }
    if ( 'Checkpoint ==  getarraysize('monsternum)-1 ) {
        announce "隊伍 "+getpartyname(getcharid(1))+" 挑戰成功.",0;
        sleep2 2000;
        enablenpc  instance_npcname("獎金發放員", instance_id());
        enablenpc  instance_npcname("獎品發放員", instance_id());
        end;
    }
    if ( 'Checkpoint ==  getarraysize('monsternum)-2 ) {
        instance_announce instance_id(),"道館裁判 : 恭喜第 ["+'Checkpoint+"] 關挑戰成功,最後一關挑戰將開始,請繼續努力!",0;
    }
    else {
        instance_announce instance_id(),"道館裁判 : 恭喜第 ["+'Checkpoint+"] 關挑戰成功!",0;
    }
    for (set .@n,1; .@n<getarraysize('enterromob); set .@n,.@n+1)
        if ('Checkpoint ==  'enterromob[.@n]){
            enablenpc  instance_npcname("道館裁判", instance_id());
            end;
        }
    addtimer 5000,instance_npcname("道館出怪")+"::OnMobstar";
    end;
}
 
1@guild,46,53,4 script  獎金發放員 736,{
        mes "[獎金發放員]";
        mes "你很厲害!能打到這裡,讓我給你一些獎勵吧!";
            percentheal 100,100;
        next;
        mes "[獎金發放員]";
        mes "我是負責發放獎金的";
        mes "你可以獲得金錢 "+'enterZeny[1]+" 到 "+'enterZeny[2]+" 萬";
        mes "你確定你要選擇獎金嗎?";
        next;
        if(select("對,我要領獎金!","不了,讓我在考慮一下!") == 2 ) { close; }
        set zeny,zeny+rand('enterZeny[1],'enterZeny[2])*10000;
        warp "amatsu",156,108; //回城設置
        close;
OnInstanceInit:
    disablenpc  instance_npcname("獎金發放員", instance_id());
    end;
}
1@guild,53,53,4 script  獎品發放員 736,{
        mes "[獎品發放員]";
        mes "你很厲害!能打到這裡,讓我給你一些獎勵吧!";
            percentheal 100,100;
        next;
        mes "[獎品發放員]";
        mes "你可以獲得獎品";
        for(set .@n,1; .@n< getarraysize('enterItem); set .@n,.@n+1) {
            mes ""+getitemname('enterItem[.@n])+" x "+'enterCou[.@n]+" 個";
        }
        mes "你確定你要選擇獎品嗎?";
        next;
        if(select("對,我要領獎品!","不了,讓我在考慮一下!") == 2 ) { close; }
        set .@n,rand(1,getarraysize('ChestItem)-1);
        getitem 'enterItem[.@n],'enterCou[.@n];
        warp "amatsu",156,108; //回城設置
        close;
OnInstanceInit:
    disablenpc  instance_npcname("獎品發放員", instance_id());
    end;
}
Viewed 796 times, submitted by Guest.