OK論壇

 找回密碼
 註冊
查看: 929|回復: 1

兌換專武NPC sever無法讀取腳本

 關閉 [複製鏈接]
  • TA的每日心情
    難過
    2014-10-4 08:18 PM
  • 簽到天數: 27 天

    連續簽到: 2 天

    [LV.4]偶爾看看III

    發表於 2013-10-17 13:13:25 | 顯示全部樓層 |閱讀模式
    EA
    私服版號: SeAr_1.9.00
    問題內容: 腳本問題
    本帖最後由 gm470520 於 2013-10-17 03:58 PM 編輯

    不好意思
    我今天試著設定了"兌換專武"的NPC
    可是sever跑出以下訊息
    [Error]:loading NPC file:npc/Oboryuh/專武系統/Weapon.txt
    script error on npc/Oboryuh/專武系統/Weapon.txt line 21
              parse_line:expect command, missing function name or calling undeclared function
    [Error]:missing 5 right curlys at file' npc/Oboryuh/專武系統/Weapon_Item.txt, line 277

    努力爬文都沒有相關回復
    試著改空格 改語法也不能
    還請熟悉系統的大大們教我怎麼修改
    附上兩個腳本
    1. payon,149,238,6        script        專武交換系統        984,{

    2. switch(select("近戰系專武","遠攻系專武","法師系專武")){
    3. case 1:
    4. swich(select("劍士","商人","盜賊")){
    5. case 1:callfunc "Weapon_Swordman";        end;
    6. case 2:callfunc "Weapon_Merchant";        end;
    7. case 3:callfunc "Weapon_Thief";        end;        }
    8. case 2:
    9. switch(select("弓箭手.槍手")){
    10. case 1:callfunc "Weapon_Archer";        end;        }
    11. case 3:
    12. switch(select("魔法師","服事")){
    13. case 1:callfunc "Weapon_Magician";        end;
    14. case 2:callfunc "Weapon_Acolyte";        end;        }

    15.         }

    16. OnInit:
    17. waitingroom "專用武器交換系統",0;
    18. }
    複製代碼

    1. function        script        Weapon_Swordman        {

    2.           switch(select("製作 ^0000FF強化騎士長矛 ^000000",
    3.                         "製作 ^0000FF強化雙手巨劍 ^000000")) {
    4. case 1:
    5.         setarray .@QW1[1],1491,7199,985,984,948,909;
    6.         setarray .@QW2[1],1,1,50,50,100,100;
    7.         break;
    8. case 2:
    9.         setarray .@QW1[1],21000,7199,985,984,948,909;
    10.         setarray .@QW2[1],1,1,50,50,100,100;
    11.         break;   }

    12.         mes "[專武交換系統]";
    13.         mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
    14.         mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
    15.         mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
    16.         mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
    17.         mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
    18.         mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
    19.         next;
    20.         switch(select("開始製作","放棄製作","返回選單")) {
    21.         case 1:        break;
    22.         case 2:        close;
    23.         case 3:        callfunc "Weapon_Swordman";        end;        }
    24.         if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
    25.         if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
    26.         if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
    27.         if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
    28.         if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
    29.         if ( .@No_Item == 1 ) {        mes "[製作系統]";
    30.                                 mes "抱歉您身上的物品不足!!";
    31.                                 close;        }
    32.         delitem .@QW1[2],.@QW2[2];
    33.         delitem .@QW1[3],.@QW2[3];
    34.         delitem .@QW1[4],.@QW2[4];
    35.         delitem .@QW1[5],.@QW2[5];
    36.         delitem .@QW1[6],.@QW2[6];
    37.         getitem .@QW1[1],.@QW2[1];
    38.         mes "[製作系統]";
    39.         mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
    40.         close;
    41. }

    42. //====================================================//

    43. function        script        Weapon_Merchant        {

    44.         switch(select("製作 ^0000FF強化雙手斧 ^000000")) {
    45. case 1:
    46.         setarray .@QW1[1],1394,7199,985,984,948,909;
    47.         setarray .@QW2[1],1,1,50,50,100,100;
    48.         break;

    49.         mes "[專武交換系統]";
    50.         mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
    51.         mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
    52.         mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
    53.         mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
    54.         mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
    55.         mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
    56.         next;
    57.         switch(select("開始製作","放棄製作","返回選單")) {
    58.         case 1:        break;
    59.         case 2:        close;
    60.         case 3:        callfunc "Weapon_Merchant";        end;        }
    61.         if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
    62.         if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
    63.         if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
    64.         if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
    65.         if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
    66.         if ( .@No_Item == 1 ) {        mes "[製作系統]";
    67.                                 mes "抱歉您身上的物品不足!!";
    68.                                 close;        }
    69.         delitem .@QW1[2],.@QW2[2];
    70.         delitem .@QW1[3],.@QW2[3];
    71.         delitem .@QW1[4],.@QW2[4];
    72.         delitem .@QW1[5],.@QW2[5];
    73.         delitem .@QW1[6],.@QW2[6];
    74.         getitem .@QW1[1],.@QW2[1];
    75.         mes "[製作系統]";
    76.         mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
    77.         close;
    78. }

    79. //====================================================//

    80. function        script        Weapon_Thief        {

    81.         switch(select("製作 ^0000FF強化卡塔勒拳刃 ^000000",
    82.                         "製作 ^0000FF強化大駒短劍 ^000000")) {
    83. case 1:
    84.         setarray .@QW1[1],1394,7199,985,984,948,909;
    85.         setarray .@QW2[1],1,1,50,50,100,100;
    86.         break;
    87. case 2:
    88.         setarray .@QW1[1],13071,7199,985,984,948,909;
    89.         setarray .@QW2[1],1,1,50,50,100,100;
    90.         break;

    91.         mes "[專武交換系統]";
    92.         mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
    93.         mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
    94.         mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
    95.         mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
    96.         mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
    97.         mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
    98.         next;
    99.         switch(select("開始製作","放棄製作","返回選單")) {
    100.         case 1:        break;
    101.         case 2:        close;
    102.         case 3:        callfunc "Weapon_Thief";        end;        }
    103.         if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
    104.         if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
    105.         if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
    106.         if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
    107.         if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
    108.         if ( .@No_Item == 1 ) {        mes "[製作系統]";
    109.                                 mes "抱歉您身上的物品不足!!";
    110.                                 close;        }
    111.         delitem .@QW1[2],.@QW2[2];
    112.         delitem .@QW1[3],.@QW2[3];
    113.         delitem .@QW1[4],.@QW2[4];
    114.         delitem .@QW1[5],.@QW2[5];
    115.         delitem .@QW1[6],.@QW2[6];
    116.         getitem .@QW1[1],.@QW2[1];
    117.         mes "[製作系統]";
    118.         mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
    119.         close;
    120. }
    121. //====================================================//

    122. function        script        Weapon_Archer        {

    123.         switch(select("製作 ^0000FF強化弓 ^000000",
    124.                         "製作 ^0000FF強化左輪手槍 ^000000")) {

    125. case 1:
    126.         setarray .@QW1[1],18112,7199,985,984,948,909;
    127.         setarray .@QW2[1],1,1,50,50,100,100;
    128.         break;
    129. case 2:
    130.         setarray .@QW1[1],13115,7199,985,984,948,909;
    131.         setarray .@QW2[1],1,1,50,50,100,100;
    132.         break;

    133.         mes "[專武交換系統]";
    134.         mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
    135.         mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
    136.         mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
    137.         mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
    138.         mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
    139.         mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
    140.         next;
    141.         switch(select("開始製作","放棄製作","返回選單")) {
    142.         case 1:        break;
    143.         case 2:        close;
    144.         case 3:        callfunc "Weapon_Archer";        end;        }
    145.         if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
    146.         if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
    147.         if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
    148.         if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
    149.         if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
    150.         if ( .@No_Item == 1 ) {        mes "[製作系統]";
    151.                                 mes "抱歉您身上的物品不足!!";
    152.                                 close;        }
    153.         delitem .@QW1[2],.@QW2[2];
    154.         delitem .@QW1[3],.@QW2[3];
    155.         delitem .@QW1[4],.@QW2[4];
    156.         delitem .@QW1[5],.@QW2[5];
    157.         delitem .@QW1[6],.@QW2[6];
    158.         getitem .@QW1[1],.@QW2[1];
    159.         mes "[製作系統]";
    160.         mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
    161.         close;
    162. }
    163. //====================================================//
    164. function        script        Weapon_Magician        {

    165.         switch(select("製作 ^0000FF強化智慧魔杖 ^000000")) {

    166. case 1:
    167.         setarray .@QW1[1],2015,7199,985,984,948,909;
    168.         setarray .@QW2[1],1,1,50,50,100,100;
    169.         break;

    170.         mes "[專武交換系統]";
    171.         mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
    172.         mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
    173.         mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
    174.         mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
    175.         mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
    176.         mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
    177.         next;
    178.         switch(select("開始製作","放棄製作","返回選單")) {
    179.         case 1:        break;
    180.         case 2:        close;
    181.         case 3:        callfunc "Weapon_Magician";        end;        }
    182.         if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
    183.         if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
    184.         if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
    185.         if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
    186.         if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
    187.         if ( .@No_Item == 1 ) {        mes "[製作系統]";
    188.                                 mes "抱歉您身上的物品不足!!";
    189.                                 close;        }
    190.         delitem .@QW1[2],.@QW2[2];
    191.         delitem .@QW1[3],.@QW2[3];
    192.         delitem .@QW1[4],.@QW2[4];
    193.         delitem .@QW1[5],.@QW2[5];
    194.         delitem .@QW1[6],.@QW2[6];
    195.         getitem .@QW1[1],.@QW2[1];
    196.         mes "[製作系統]";
    197.         mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
    198.         close;
    199. }
    200. //====================================================//
    201. function        script        Weapon_Acolyte        {

    202.         switch(select("製作 ^0000FF強化書籍 ^000000",
    203.                         "製作 ^0000FF強化鐵錘 ^000000")) {

    204. case 1:
    205.         setarray .@QW1[1],1585,7199,985,984,948,909;
    206.         setarray .@QW2[1],1,1,50,50,100,100;
    207.         break;
    208. case 2:
    209.         setarray .@QW1[1],16019,7199,985,984,948,909;
    210.         setarray .@QW2[1],1,1,50,50,100,100;
    211.         break;

    212.         mes "[專武交換系統]";
    213.         mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
    214.         mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
    215.         mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
    216.         mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
    217.         mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
    218.         mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
    219.         next;
    220.         switch(select("開始製作","放棄製作","返回選單")) {
    221.         case 1:        break;
    222.         case 2:        close;
    223.         case 3:        callfunc "Weapon_Acolyte";        end;        }
    224.         if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
    225.         if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
    226.         if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
    227.         if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
    228.         if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
    229.         if ( .@No_Item == 1 ) {        mes "[製作系統]";
    230.                                 mes "抱歉您身上的物品不足!!";
    231.                                 close;        }
    232.         delitem .@QW1[2],.@QW2[2];
    233.         delitem .@QW1[3],.@QW2[3];
    234.         delitem .@QW1[4],.@QW2[4];
    235.         delitem .@QW1[5],.@QW2[5];
    236.         delitem .@QW1[6],.@QW2[6];
    237.         getitem .@QW1[1],.@QW2[1];
    238.         mes "[製作系統]";
    239.         mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
    240.         close;
    241. }
    複製代碼
    回復

    使用道具 舉報

  • TA的每日心情
    難過
    2014-10-4 08:18 PM
  • 簽到天數: 27 天

    連續簽到: 2 天

    [LV.4]偶爾看看III

     樓主| 發表於 2013-10-17 15:57:42 | 顯示全部樓層
    阿 不好意思自己解決了><
    回復 支持 反對

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2024-5-15 06:42 AM , Processed in 0.053818 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表