tn00013022 發表於 2016-7-16 19:37:15

詢問各位大大預覽試穿的功能疑問

詢問各位大大一下,伺服器使用了"預覽試穿"的功能

"裝備類"頭上中下都可以預覽試穿,都有外觀上的效果

但是"時裝類"就是無法顯現試穿功能法詢問大家有沒有遇到這樣的問題!?

dreamsambit@gma 發表於 2016-7-16 20:43:04

能說清楚一點嗎
時裝=裝備只是穿在不同地方
同一位置當裝備跟時裝都有的時候會顯示時裝而已
既然裝備可以的話那時裝應該就沒啥不行的

LOVE770825 發表於 2016-7-16 21:21:50

本帖最後由 LOVE770825 於 2016-7-16 09:23 PM 編輯

    if(@equip & 1024) atcommand "@changelook 1 " + @view;
    if(@equip & 2048) atcommand "@changelook 2 " + @view;
    if(@equip & 4096) atcommand "@changelook 3 " + @view;給你參考!

dreamsambit@gma 發表於 2016-7-16 21:34:16

LOVE770825 發表於 2016-7-16 09:21 PM static/image/common/back.gif
給你參考!

抱歉看不太懂這幾行的意思
我不知道@equip跟@view是不是sear的保留函數

不過正常來說
應該是check妳的欄位穿的是哪件裝備
然後用類似getiteminfo的函數去取得view值
再changelook比較正確吧


LOVE770825 發表於 2016-7-16 22:49:27

dreamsambit@gma 發表於 2016-7-16 09:34 PM static/image/common/back.gif
抱歉看不太懂這幾行的意思
我不知道@equip跟@view是不是sear的保留函數



啊...忘了他是sear,我這是ra的,他跟我用的腳本應該是同一個吧?等他回覆囉!^^

tn00013022 發表於 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";
      


            }
    }


    //================================================================================================================//



附上腳本供大家參考解惑~ 感恩
頁: [1]
查看完整版本: 詢問各位大大預覽試穿的功能疑問