UID108536
帖子
精華
主題
積分17162
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限30
註冊時間2008-10-6
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 難過 2019-12-25 09:03 AM |
---|
簽到天數: 94 天 連續簽到: 1 天 [LV.6]常住居民II
|
樓主 |
發表於 2016-7-19 12:05:12
|
顯示全部樓層
本帖最後由 louis8604031 於 2016-7-20 09:40 PM 編輯
- - shop quest_shop223 -1,512:100 //生成商店,請無視這行
- glemior,230,284,4 script 商城[頭飾]試戴#1 444,{ //自行設定位子,外觀
- set @i,0;
- mes "[頭飾製作]";
- mes "請按照購買物品似的選擇";
- mes "材料足夠後將直接製作";
- mes "材料不足將直接提示材料";
- mes "請^FF0000一次選購一種^000000頭飾";
- mes "請放心選購^FF3399 查看頭飾時,不會扣除相應Zeny^000000";
- callshop "quest_shop223",1;
- npcshopattach "quest_shop223";
- end;
- OnBuyItem:
-
- if(.BuildQuest) {
- for(set .e,0; !compare(getarg(.e+1)+"","Zeny"); set .e,.e+2) {}
- npcshopadditem "quest_shop223",getarg(.e+2),getarg(.e)*compare(getarg(.e+1)+"","SZeny");
- setarray .Shop[.i],getarg(.e+2);
- set .i,.i+1;
- if(.i%20==0){sleep(1);}
- goto Quest_Setup;
- }
- if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Quest_Setup; }
- mes "- 製作 ^FF0000"+getitemname(@bought_nameid)+"^000000";
- mes "- 請準備好下面材料!";
- for(set @i,0; !compare(getarg(@i+1)+"","Zeny"); set @i,@i+2) mes " ^0066CC" + getitemname(getarg(@i)) + "^000000 x " + ((countitem(getarg(@i))>=getarg(@i+1))? "":"") + "" + getarg(@i+1) + " [^009900" + countitem(getarg(@i)) + "^000000/^FF6600" + getarg(@i+1) + "^000000]"+( countitem(getarg(@i))>=getarg(@i+1)?" ( ^D2691E已完成^000000 )":" ( ^999999未完成^000000 )");
- if(getarg(@i)) mes " ^FF1493需要製作費用^000000 " + ((Zeny>=getarg(@i))? "^FF0000":"") + "" + getarg(@i) + "^000000 "+((Zeny>=getarg(@i))? "( ^D2691E已完成^000000 )":"( ^999999金錢不足^000000 )");
- mes "- 在交換條件裡寫著, 我將會給你:^0000FF";
- for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " 個 " + getitemname(getarg(@i));
- switch(select("- 1、製作 ^FF0000"+getitemname(@bought_nameid)+"^000000:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) || (getiteminfo(@bought_nameid,5) & 4) && @equip==0))? "- 2、試穿戴看看":"") + ":- 3、結束對話")) {
- case 1:
- for(set @i,0; !compare(getarg(@i+1)+"","Zeny"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) {
- next;
- mes "[頭飾製作]";
- mes "你身上有 ^FF0000" + countitem(getarg(@i)) + "^000000 個 ^FF0000" + getitemname(getarg(@i)) + "^000000,我需要 ^009900" + getarg(@i+1) + "^000000 個";
- mes "請補齊 ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + "^000000 個 ^FF0000" + getitemname(getarg(@i)) + "^000000 再來找我.";
- emotion 53;
- close;
- }
- if(Zeny < getarg(@i)) {
- next;
- mes "[頭飾製作]";
- mes "你身上攜帶的金錢不足.";
- mes "請補齊 ^FF0000" + (getarg(@i)-Zeny) + "Zeny差額再來找我^000000.";
- emotion 53;
- close;
- }
- for(set @i,0; !compare(getarg(@i+1)+"","Zeny"); set @i,@i+2) delitem getarg(@i),getarg(@i+1);
- set Zeny,Zeny-getarg(@i);
- for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1);
- specialeffect2 154;
- emotion 21;
- if (compare(getarg(@i,0)+"","announce")) announce strcharinfo(0) + " 獲得了 " + getitemname(@bought_nameid) + "!",bc_all;
- close;
- case 2:
- specialeffect2 6;
- set @bottomview, getlook(3);
- set @topview, getlook(4);
- set @midview, getlook(5);
- addtimer 1000, strnpcinfo(3)+"::On_Leave";
- set @equip,getiteminfo(@bought_nameid, 5);
- set @view, getiteminfo(@bought_nameid, 11);
- if(@equip != -1 && @view > 0) {
- if(@equip & 1) atcommand "@changelook 3 " + @view;
- if(@equip & 256) atcommand "@changelook 1 " + @view;
- if(@equip & 512) atcommand "@changelook 2 " + @view;
- }
- next;
- goto OnBuyItem;
- case 3:
- emotion 12;
- close;
- }
- On_Leave:
- atcommand "@changelook 1 " + @topview;
- atcommand "@changelook 2 " + @midview;
- atcommand "@changelook 3 " + @bottomview;
- set @equip,0;
- set @view,0;
- set @topview,0;
- set @midview,0;
- set @bottomview,0;
- end;
- OnInit:
- npcshopitem "quest_shop223",0,0;
- npcshopdelitem "quest_shop223",0,0;
- set .BuildQuest,1;
- set .i,1;
- Quest_Setup:
- switch(.i) {
- default: set .BuildQuest,0; set .e,0; set .i,0; end;
- case 1: callsub OnBuyItem,7730,30000,7731,30000,10,"SZeny",18868,1,"announce";
- case 2: callsub OnBuyItem,7730,30000,7731,30000,10,"SZeny",18715,1,"announce";
- case 3: callsub OnBuyItem,7730,30000,7731,30000,10,"SZeny",18649,1,"announce";
- case 4: callsub OnBuyItem,7730,30000,7731,30000,10,"SZeny",18581,1,"announce";
- case 5: callsub OnBuyItem,7730,30000,7731,30000,10,"SZeny",18582,1,"announce";
- case 6: callsub OnBuyItem,7730,30000,7731,30000,10,"SZeny",5667,1,"announce";
-
- }
- }
- //================================================================================================================//
複製代碼 附上腳本供大家參考解惑~ 感恩
|
|