UID91444
帖子
精華
主題
積分-192
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限0
註冊時間2008-6-9
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 難過 2014-10-4 08:18 PM |
---|
簽到天數: 27 天 連續簽到: 2 天 [LV.4]偶爾看看III
|
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
努力爬文都沒有相關回復
試著改空格 改語法也不能
還請熟悉系統的大大們教我怎麼修改
附上兩個腳本- payon,149,238,6 script 專武交換系統 984,{
- switch(select("近戰系專武","遠攻系專武","法師系專武")){
- case 1:
- swich(select("劍士","商人","盜賊")){
- case 1:callfunc "Weapon_Swordman"; end;
- case 2:callfunc "Weapon_Merchant"; end;
- case 3:callfunc "Weapon_Thief"; end; }
- case 2:
- switch(select("弓箭手.槍手")){
- case 1:callfunc "Weapon_Archer"; end; }
- case 3:
- switch(select("魔法師","服事")){
- case 1:callfunc "Weapon_Magician"; end;
- case 2:callfunc "Weapon_Acolyte"; end; }
- }
- OnInit:
- waitingroom "專用武器交換系統",0;
- }
複製代碼 - function script Weapon_Swordman {
- switch(select("製作 ^0000FF強化騎士長矛 ^000000",
- "製作 ^0000FF強化雙手巨劍 ^000000")) {
- case 1:
- setarray .@QW1[1],1491,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- case 2:
- setarray .@QW1[1],21000,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break; }
- mes "[專武交換系統]";
- mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
- mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
- next;
- switch(select("開始製作","放棄製作","返回選單")) {
- case 1: break;
- case 2: close;
- case 3: callfunc "Weapon_Swordman"; end; }
- if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
- if ( .@No_Item == 1 ) { mes "[製作系統]";
- mes "抱歉您身上的物品不足!!";
- close; }
- delitem .@QW1[2],.@QW2[2];
- delitem .@QW1[3],.@QW2[3];
- delitem .@QW1[4],.@QW2[4];
- delitem .@QW1[5],.@QW2[5];
- delitem .@QW1[6],.@QW2[6];
- getitem .@QW1[1],.@QW2[1];
- mes "[製作系統]";
- mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
- close;
- }
- //====================================================//
- function script Weapon_Merchant {
- switch(select("製作 ^0000FF強化雙手斧 ^000000")) {
- case 1:
- setarray .@QW1[1],1394,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- mes "[專武交換系統]";
- mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
- mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
- next;
- switch(select("開始製作","放棄製作","返回選單")) {
- case 1: break;
- case 2: close;
- case 3: callfunc "Weapon_Merchant"; end; }
- if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
- if ( .@No_Item == 1 ) { mes "[製作系統]";
- mes "抱歉您身上的物品不足!!";
- close; }
- delitem .@QW1[2],.@QW2[2];
- delitem .@QW1[3],.@QW2[3];
- delitem .@QW1[4],.@QW2[4];
- delitem .@QW1[5],.@QW2[5];
- delitem .@QW1[6],.@QW2[6];
- getitem .@QW1[1],.@QW2[1];
- mes "[製作系統]";
- mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
- close;
- }
- //====================================================//
- function script Weapon_Thief {
- switch(select("製作 ^0000FF強化卡塔勒拳刃 ^000000",
- "製作 ^0000FF強化大駒短劍 ^000000")) {
- case 1:
- setarray .@QW1[1],1394,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- case 2:
- setarray .@QW1[1],13071,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- mes "[專武交換系統]";
- mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
- mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
- next;
- switch(select("開始製作","放棄製作","返回選單")) {
- case 1: break;
- case 2: close;
- case 3: callfunc "Weapon_Thief"; end; }
- if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
- if ( .@No_Item == 1 ) { mes "[製作系統]";
- mes "抱歉您身上的物品不足!!";
- close; }
- delitem .@QW1[2],.@QW2[2];
- delitem .@QW1[3],.@QW2[3];
- delitem .@QW1[4],.@QW2[4];
- delitem .@QW1[5],.@QW2[5];
- delitem .@QW1[6],.@QW2[6];
- getitem .@QW1[1],.@QW2[1];
- mes "[製作系統]";
- mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
- close;
- }
- //====================================================//
- function script Weapon_Archer {
- switch(select("製作 ^0000FF強化弓 ^000000",
- "製作 ^0000FF強化左輪手槍 ^000000")) {
- case 1:
- setarray .@QW1[1],18112,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- case 2:
- setarray .@QW1[1],13115,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- mes "[專武交換系統]";
- mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
- mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
- next;
- switch(select("開始製作","放棄製作","返回選單")) {
- case 1: break;
- case 2: close;
- case 3: callfunc "Weapon_Archer"; end; }
- if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
- if ( .@No_Item == 1 ) { mes "[製作系統]";
- mes "抱歉您身上的物品不足!!";
- close; }
- delitem .@QW1[2],.@QW2[2];
- delitem .@QW1[3],.@QW2[3];
- delitem .@QW1[4],.@QW2[4];
- delitem .@QW1[5],.@QW2[5];
- delitem .@QW1[6],.@QW2[6];
- getitem .@QW1[1],.@QW2[1];
- mes "[製作系統]";
- mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
- close;
- }
- //====================================================//
- function script Weapon_Magician {
- switch(select("製作 ^0000FF強化智慧魔杖 ^000000")) {
- case 1:
- setarray .@QW1[1],2015,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- mes "[專武交換系統]";
- mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
- mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
- next;
- switch(select("開始製作","放棄製作","返回選單")) {
- case 1: break;
- case 2: close;
- case 3: callfunc "Weapon_Magician"; end; }
- if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
- if ( .@No_Item == 1 ) { mes "[製作系統]";
- mes "抱歉您身上的物品不足!!";
- close; }
- delitem .@QW1[2],.@QW2[2];
- delitem .@QW1[3],.@QW2[3];
- delitem .@QW1[4],.@QW2[4];
- delitem .@QW1[5],.@QW2[5];
- delitem .@QW1[6],.@QW2[6];
- getitem .@QW1[1],.@QW2[1];
- mes "[製作系統]";
- mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
- close;
- }
- //====================================================//
- function script Weapon_Acolyte {
- switch(select("製作 ^0000FF強化書籍 ^000000",
- "製作 ^0000FF強化鐵錘 ^000000")) {
- case 1:
- setarray .@QW1[1],1585,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- case 2:
- setarray .@QW1[1],16019,7199,985,984,948,909;
- setarray .@QW2[1],1,1,50,50,100,100;
- break;
- mes "[專武交換系統]";
- mes "製作 ^0000FF"+getitemname(.@QW1[1])+"^000000 所需材料如下:";
- mes "材料 ^FF0000"+getitemname(.@QW1[2])+" "+.@QW2[2]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[3])+" "+.@QW2[3]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[4])+" "+.@QW2[4]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[5])+" "+.@QW2[5]+"^000000 個";
- mes " 和 ^FF0000"+getitemname(.@QW1[6])+" "+.@QW2[6]+"^000000 個";
- next;
- switch(select("開始製作","放棄製作","返回選單")) {
- case 1: break;
- case 2: close;
- case 3: callfunc "Weapon_Acolyte"; end; }
- if ( countitem(.@QW1[2]) < .@QW2[2] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[3]) < .@QW2[3] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[4]) < .@QW2[4] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[5]) < .@QW2[5] ) { set .@No_Item,1; }
- if ( countitem(.@QW1[6]) < .@QW2[6] ) { set .@No_Item,1; }
- if ( .@No_Item == 1 ) { mes "[製作系統]";
- mes "抱歉您身上的物品不足!!";
- close; }
- delitem .@QW1[2],.@QW2[2];
- delitem .@QW1[3],.@QW2[3];
- delitem .@QW1[4],.@QW2[4];
- delitem .@QW1[5],.@QW2[5];
- delitem .@QW1[6],.@QW2[6];
- getitem .@QW1[1],.@QW2[1];
- mes "[製作系統]";
- mes "恭喜 [^0000FF"+getitemname(.@QW1[1])+"^000000] 製作已完成!!";
- close;
- }
複製代碼 |
|