matt070516 發表於 2016-3-5 21:03:26

如何設定NPC轉生後某個等級無法使用NPC功能

本帖最後由 matt070516 於 2016-3-8 06:59 PM 編輯

如題,我只找的到怎麼限制等級或職業,可是一直都沒找到要怎麼限制轉生然後又同時限制等級。
我要寫的內容大概是這樣:if (BaseLevel > 80)
{
                mes "[超級補助人員]";
                mes "轉生等級超過 80 以上的玩家";
                mes "是無法免費使用本服務的";
                mes "需要付費使用";
                mes "一次50000zeny";
      next;
      menu "我要付費使用",L0,"太貴了不要",LEnd;

      L0:
                mes "[超級補助人員]";
                if (Zeny < 50000) goto NeedZenys;
                mes "謝謝你,歡迎再次使用";
                set Zeny,zeny-50000;
                percentheal 100,100;
                sc_start SC_INCREASEAGI,3600000,10;
                sc_start SC_BLESSING,3600000,10;
                sc_start SC_ASSUMPTIO,300000,5;
                close;

                NeedZenys:
                mes "抱歉,你沒有足夠的金錢";
                close;

      LEnd:
      close;有人知道要怎麼寫這塊嗎?謝謝你


Residue 發表於 2016-3-5 21:29:52

本帖最後由 Residue 於 2016-3-5 09:32 PM 編輯

if( Upper )
{.....}

doc資料夾裡 script_commands.txt 有很多詳細說明

matt070516 發表於 2016-3-5 22:25:25

Residue 發表於 2016-3-5 09:29 PM static/image/common/back.gif
if( Upper )
{.....}



感謝相助,後來我去看試一試終於成功了!
Upper說明- 0 if the character is a normal class(轉生前), 1 if advanced(轉生後), 2 if baby(寶寶職業). if (BaseLevel>=80)&(UPPER==1)//同時具備要轉生又80等含以上
{
      mes "[超級補助人員]";
      mes "^FF3355轉生等級超過 80 以上的玩家";
      mes "是無法免費使用本服務的";
      mes "需要付費使用";
      mes "一次50000zeny";
    next;
    menu "我要付費使用",L0,"太貴了不要",LEnd;

sinya 發表於 2016-3-5 22:53:50

matt070516 發表於 2016-3-5 10:25 PM static/image/common/back.gif
感謝相助,後來我去看試一試終於成功了!
Upper說明- 0 if the character is a normal class(轉生前), ...

&&不是 &

1588 發表於 2016-3-6 00:01:41

matt070516 發表於 2016-3-5 10:25 PM static/image/common/back.gif
感謝相助,後來我去看試一試終於成功了!
Upper說明- 0 if the character is a normal class(轉生前), ...

http://okayro.com/thread-35143-1-1.html

matt070516 發表於 2016-3-6 01:41:44

sinya 發表於 2016-3-5 10:53 PM static/image/common/back.gif
&&不是 &

感謝4樓、5樓的大大補充,很實用的文章,現在更懂了!


頁: [1]
查看完整版本: 如何設定NPC轉生後某個等級無法使用NPC功能