OK論壇

 找回密碼
 註冊
查看: 1092|回復: 6

map-server沒錯但是玩家使用就有錯

[複製鏈接]
  • TA的每日心情
    開心
    2012-6-20 12:30 AM
  • 簽到天數: 46 天

    連續簽到: 0 天

    [LV.5]常住居民I

    發表於 2008-7-10 21:49:09 | 顯示全部樓層 |閱讀模式
    這個掛點的npc
    map-server   load不到有錯誤
    但是玩家使用就報錯了
    請大大幫忙解決

    還有..經常會出現姒上的東西...好似是技能問題..
    但是不明怎麼去弄...
    只好問大大了

    [ 本帖最後由 a00077100 於 2008-7-11 09:32 PM 編輯 ]
  • TA的每日心情
    開心
    2019-8-18 04:57 PM
  • 簽到天數: 2148 天

    連續簽到: 1 天

    [LV.Master]伴壇終老

    發表於 2008-7-10 22:06:43 | 顯示全部樓層
    你 這 樣 讓 人 看 不 出 所 以 然
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2012-6-20 12:30 AM
  • 簽到天數: 46 天

    連續簽到: 0 天

    [LV.5]常住居民I

     樓主| 發表於 2008-7-10 22:31:06 | 顯示全部樓層
    ...
    不明耶.
    那我po整個掛錢你看看好了


    /**************************************************\
      仙境傳說PRO 遊戲腳本
    ****************************************************
    名稱︰掛錢服務生
    類型︰掛錢
    版本︰2.0
    版權︰(C) 2004 - 2005
    授權︰xuwujun
    ============
      製作人員
    ============
    製作︰雲逝
    改編︰xuwujun
    繁體化: 神無月
    ============
      簡要說明
    ============
    預設設定︰4個檔次(1檔半小時5000Z,2檔1小時12500Z,3檔一個半小時20000Z,4檔125Zeny每分鐘)
    掛錢時不能離開首都...也不能順移...但可以走動..
    ============
      更新說明
    -重新設定算錢模式...
    -新增一個檔..以1分鐘為計算單位...
    ============
    \**************************************************/
    prontera.gat,164,84,2 script 掛錢服務員 838,{
    //初始化
    set @timer1,1800000;
    set @moneyr1,5000;
    set @timer2,3600000;
    set @moneyr2,12500;
    set @timer3,5400000;
    set @moneyr3,20000;
    set @timer4,1000;
    set @moneyr4,500;
    set @needlv,0;
      if(@money_up == 1 || @money_up ==2 || @money_up ==3 || @money_up ==4) goto L_Suanqian;
      if(baselevel < @needlv) goto L_notlevel;
      if(zeny>1000000000) goto L_Fullmoney;
      set @pass,rand(1241,9976);
      mes "[掛錢服務員]";
      mes "如果你需要掛錢服務的話請按下繼續之後選擇你要的檔次。";
      next;
      menu "掛錢",-,"結束對話",L_Quit;
      mes "[掛錢服務員]";
      mes "要開始掛錢的話";
      mes "請正確輸入驗証碼^FF0000"[email=+@pass+]+@pass+"^000000[/email]";
    next;
      input @temp;
      if (@temp != @pass) goto L_ERR;
    menu "中止掛錢服務",L_EXIT,
      "一檔 --> "[email=+@moneyr1]+@moneyr1[/email]+" Zeny",L_Money_1,
      "二檔 --> "[email=+@moneyr2]+@moneyr2[/email]+" Zeny",L_Money_2,
      "三檔 --> "[email=+@moneyr3]+@moneyr3[/email]+" Zeny",L_Money_3,
      "四檔 --> "[email=+@moneyr4]+@moneyr4[/email]+" Zeny",L_Money_4,
      "結算金額[領錢]",L_Suanqian,
      "結束對話",L_Quit;
    L_Money_1:
      set @money_up,1;
      mes "[掛錢服務員]";
      mes "進入一檔 --> "[email=+@moneyr1]+@moneyr1[/email]+" Zeny式掛錢";
      mes "點擊關閉開始掛錢,要保持掛錢服務請勿離開首都以及進入房間,終止自動掛錢請再來一次。";
    close2;
      addtimer @timer1,"Money_UP";
    end;
    L_Money_2:
      set @money_up,2;
      mes "[掛錢服務員]";
      mes "進入二檔 --> "[email=+@moneyr2]+@moneyr2[/email]+" Zeny式掛錢";
      mes "點擊關閉開始掛錢,要保持掛錢服務請勿離開首都以及進入房間,終止自動掛錢請再來一次。 ";
    close2;
      addtimer @timer2,"Money_UP";
    end;
    L_Money_3:
      set @money_up,3;
      mes "[掛錢服務員]";
      mes "進入三檔 --> "[email=+@moneyr3]+@moneyr3[/email]+" Zeny式掛錢";
      mes "點擊關閉開始掛錢,要保持掛錢服務請勿離開首都以及進入房間,終止自動掛錢請再來一次。";
    close2;
      addtimer @timer3,"Money_UP";
      
    end;
    L_Money_4:
      set @money_up,4;
      mes "[掛錢服務員]";
      mes "進入累積式掛錢 --> 124Zeny/1Min";
      mes "點擊關閉開始掛錢,要保持掛錢服務請勿離開首都以及進入房間,終止自動掛錢請再來一次。";
    close2;
      addtimer @timer4,"Money_UP";
      
    end;

    L_Suanqian:
      if (@money_up == 1) goto S_Money_1;
      if (@money_up == 2) goto S_Money_2;
      if (@money_up == 3) goto S_Money_3;
      if (@money_up == 4) goto S_Money_4;
      mes "[掛錢服務員]";
      mes "你目前沒有進行掛錢服務。";
      mes "不能進行結算。";
      close;  
      S_Money_1:
      mes "[掛錢服務員]";
      mes "目前你累積的金額為[^0000FF"[email=+@temp_money1+]+@temp_money1+"^000000]Zeny[/email]";
      mes "是否要馬上進行結算呢?";
      next;
      menu "結算",-,"不結算",L_Quit;
      set @money_up,0;
      deltimer "Money_UP";
      set zeny,zeny+@temp_money1;
      set @temp_money1,0;
      set @temp_min1,0;
      mes "[掛錢服務員]";
      mes "結算完畢,請點清點一下數額是否正確。";
      close;
      S_Money_2:
      mes "[掛錢服務員]";
      mes "目前你累積的金額為[^0000FF"[email=+@temp_money2+]+@temp_money2+"^000000]Zeny[/email]";
      mes "是否要馬上進行結算呢?";
      next;
      menu "結算",-,"不結算",L_Quit;
      set @money_up,0;
      deltimer "Money_UP";
      set zeny,zeny+@temp_money2;
      set @temp_money2,0;
      set @temp_min2,0;
      mes "[掛錢服務員]";
      mes "結算完畢,請點清點一下數額是否正確。";
      close;
      S_Money_3:
      mes "[掛錢服務員]";
      mes "目前你累積的金額為[^0000FF"[email=+@temp_money3+]+@temp_money3+"^000000]Zeny[/email]";
      mes "是否要馬上進行結算呢?";
      next;
      menu "結算",-,"不結算",L_Quit;
      set @money_up,0;
      deltimer "Money_UP";
      set zeny,zeny+@temp_money3;
      set @temp_money3,0;
      set @temp_min3,0;
      mes "[掛錢服務員]";
      mes "結算完畢,請點清點一下數額是否正確。";
      close;
      S_Money_4:
      mes "[掛錢服務員]";
      mes "目前你累積的金額為[^0000FF"[email=+@temp_money4+]+@temp_money4+"^000000]Zeny[/email]";
      mes "是否要馬上進行結算呢?";
      next;
      menu "結算",-,"不結算",L_Quit;
      set @money_up,0;
      deltimer "Money_UP";
      set zeny,zeny+@temp_money4;
      set @temp_money4,0;
      set @temp_min4,0;
      mes "[掛錢服務員]";
      mes "結算完畢,請點清點一下數額是否正確。";
      close;
      

    L_EXIT:
      set @money_up,0;
      deltimer "Money_UP";
      mes "[掛錢服務員]";
      mes "哎..這年頭怎麼越來越多傻子呢。";
      mes "有錢也不賺...";
      close;
    L_ERR:
      mes "[掛錢服務員]";
      mes "驗証碼不正確,不能給你掛錢服務。";
      close;
    L_Fullmoney:
      mes "[掛錢服務員]";
      mes "你的錢已經滿了..不能進行掛錢服務。";
      close;
    L_notlevel:
      mes "[掛錢服務員]";
      mes "基本等級要達到[^0000FF"[email=+@needlv+]+@needlv+"^000000[/email]]級才能享受掛錢服務。";
      close;
    L_Quit:
      close;
    }
    prontera.gat,0,0,0 script Money_UP -1,{
      deltimer "Money_UP";
      if (@money_up == 1) goto L_Money_1;
      if (@money_up == 2) goto L_Money_2;
      if (@money_up == 3) goto L_Money_3;
      if (@money_up == 4) goto L_Money_4;
    end;
    L_Money_1:
      if(zeny>=100000000) end;
      set @temp_min1,@temp_min1+1;
      set @temp_money1,@temp_min1 * @moneyr1;
      addtimer @timer1,"Money_UP";
    end;
    L_Money_2:
      if(zeny>=100000000) end;
      set @temp_min2,@temp_min2+1;
      set @temp_money2,@temp_min2 * @moneyr2;
      addtimer @timer2,"Money_UP";
    end;
    L_Money_3:
      if(zeny>=100000000) end;
      set @temp_min3,@temp_min3+1;
      set @temp_money3,@temp_min3 * @moneyr3;
      addtimer @timer3,"Money_UP";
    end;
    L_Money_4:
      if(zeny>=100000000) end;
      set @temp_min4,@temp_min4+1;
      set @temp_money4,@temp_min4 * @moneyr4;
      addtimer @timer4,"Money_UP";
    end;
    }
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2022-3-25 10:24 AM
  • 簽到天數: 259 天

    連續簽到: 1 天

    [LV.8]以壇為家I

    發表於 2008-7-10 22:55:02 | 顯示全部樓層
    [錯誤標籤]Money_UP
    [修正標籤]OnMoney_UP

    [錯誤]addtimer @timer1,"Money_UP";
    [修正]addtimer @timer1,"掛錢服務員::OnMoney_UP";

    [錯誤]addtimer @timer2,"Money_UP";
    [修正]addtimer @timer2,"掛錢服務員::OnMoney_UP";

    [錯誤]addtimer @timer3,"Money_UP";
    [修正]addtimer @timer3,"掛錢服務員::OnMoney_UP";

    [錯誤]addtimer @timer4,"Money_UP";
    [修正]addtimer @timer4,"掛錢服務員::OnMoney_UP";

    [錯誤]deltimer "Money_UP";
    [修正]deltimer "掛錢服務員::OnMoney_UP";

    另外,請註明版本及版本號。
    原帖由 £×SKY﹋° 於 2008-7-11 11:36 AM 發表
    掛錢服務員 可以拿掉。
    "::OnMoney_UP";


    沒注意Money_UP也是個NPC,以為是個LABEL

    [ 本帖最後由 reasapakisa 於 2008-7-11 01:09 PM 編輯 ]
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    慵懶
    2012-6-13 04:41 PM
  • 簽到天數: 9 天

    連續簽到: 0 天

    [LV.3]偶爾看看II

    發表於 2008-7-11 11:36:33 | 顯示全部樓層
    掛錢服務員 可以拿掉。
    "::OnMoney_UP";
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2012-6-20 12:30 AM
  • 簽到天數: 46 天

    連續簽到: 0 天

    [LV.5]常住居民I

     樓主| 發表於 2008-7-11 13:30:58 | 顯示全部樓層
    是del了"::OnMoney_UP";
    還是按照四樓大大那樣改???
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2022-3-25 10:24 AM
  • 簽到天數: 259 天

    連續簽到: 1 天

    [LV.8]以壇為家I

    發表於 2008-7-11 14:22:07 | 顯示全部樓層
    addtimer 無法直接執行於NPCNAME。
    那是initnpctimer的用法。

    addtimer 必須使用NPCNAME::OnEVENT
    所以拿掉"::OnMoney_UP";也是錯的。

    以上以Ea12716為基準。

    如非使用Ea12716以上版本請另行修改


    修正過程.

    [錯誤]addtimer @timer1,"Money_UP";
    [修正]addtimer @timer1,"Money_UP::OnMoney_UP";

    [錯誤]addtimer @timer2,"Money_UP";
    [修正]addtimer @timer2,"Money_UP::OnMoney_UP";

    [錯誤]addtimer @timer3,"Money_UP";
    [修正]addtimer @timer3,"Money_UP::OnMoney_UP";

    [錯誤]addtimer @timer4,"Money_UP";
    [修正]addtimer @timer4,"Money_UP::OnMoney_UP";

    prontera.gat,0,0,0 script Money_UP -1,{
    [增加]OnMoney_UP:
    [錯誤]deltimer "Money_UP";
    [修正]deltimer "Money_UP::On
    Money_UP";

    修正參照EA12716~12921
    ---------------------------------------
    \\
    5,1.- Time-related commands
    \\
    ---------------------------------------
    *addtimer <ticks>,"<NPC object name>::<label>";
    *deltimer "<NPC object name>::<event label>";
    *addtimercount <ticks>,"<NPC object name>::<event label>";
    These commands will create, destroy, and delay a countdown timer - 'addtimer' to
    create, 'deltimer' to destroy and 'addtimercount' to delay it by the specified
    number of ticks. For all three cases, the event label given is the identifier of
    that timer.
    When this timer runs out, a new execution thread will start in the specified NPC
    object at the specified label. If no such label is found in the NPC object, it
    will run as if clicked. In either case, the script runs with no RID attached.
    The ticks are given in 1/1000ths of a second.
    One more thing. These timers are stored as part of player data. If the player
    logs out, all of these get immediately deleted, without executing the script.
    If this behavior is undesirable, use some other timer mechanism (like 'sleep').
    ---------------------------------------
    *initnpctimer{ "<NPC name>" {, <Attach Flag>} } |
                 { "<NPC name>" | <Attach Flag> };
    *stopnpctimer{ "<NPC name>" {, <Detach Flag>}  } |
                 { "<NPC name>" | <Detach Flag> };
    *startnpctimer{ "<NPC name>" {, <Attach Flag>} } |
                  { "<NPC name>" | <Attach Flag> };
    *setnpctimer <tick>{,"<NPC name>"};
    *getnpctimer(<type of information>{,"<NPC name>"});
    *attachnpctimer {"<character name>"};
    *detachnpctimer {"<NPC name>"};
    This set of commands and functions will create and manage an NPC-based timer.
    The NPC name may be omitted, in which case the calling NPC is used as target.
    Contrary to addtimer/deltimer commands which let you have many different timers
    referencing different labels in the same NPC, each with their own countdown,
    'initnpctimer' can only have one per NPC object. But it can trigger many labels
    and let you know how many were triggered already and how many still remain.
    This timer is counting up from 0 in ticks of 1/1000ths of a second each. Upon
    creating this timer, the execution will not stop, but will happily continue
    onward. The timer will then invoke new execution threads at labels
    "OnTimer<time>:" in the NPC object it is attached to.
    To create the timer, use the 'initnpctimer', which will start it running.
    'stopnpctimer' will pause the timer, without clearing the current tick, while
    'startnpctimer' will let the paused timer continue.
    By default timers do not have a RID attached, which lets them continue even
    if the player that started them logs off. To attach a RID to a timer, you can
    either use the optional "attach flag" when using 'initnpctimer/startnpctimer',
    or do it manually by using 'attachnpctimer'. Likewise, the optional flag of
    stopnpctimer lets you detach any RID after stopping the timer, and by using
    'detachnpctimer' you can detach a RID at any time.
    Normally there is only a single timer per NPC, but as an exception, as long as
    you attach a player to the timer, you can have multiple timers running at once,
    because these will get stored on the players instead of the NPC.
    NOTE: You need to attach the RID before the timer _before_ you start it to
    get a player-attached timer. Otherwise it'll stay a NPC timer (no effect).
    If the player that is attached to the npctimer logs out, the "OnTimerQuit:"
    event label of that npc will be triggered, so you can do the appropiate
    cleanup (the player is still attached when this event is triggered).
    The 'setnpctimer' command will explicitly set the timer to a given tick.
    'getnpctimer' provides timer information. Its parameter defines what type:
    0 - Will return the current tick count of the timer.
    1 - Will return 1 if there are remaining "OnTimer<ticks>:" labels in the
         specified NPC waiting for execution.
    2 - Will return the number of times the timer has triggered an "OnTimer<tick>:"
         label in the specified NPC.
    Example 1:
        <NPC Header> {
            initnpctimer;
            npctalk "I cant talk right now, give me 10 seconds";
            end;
        OnTimer5000:
            npctalk "Ok 5 seconds more";
            end;
        OnTimer6000:
            npctalk "4";
            end;
        OnTimer7000:
            npctalk "3";
            end;
        OnTimer8000:
            npctalk "2";
            end;
        OnTimer9000:
            npctalk "1";
            end;
        OnTimer10000:
            stopnpctimer;
            mes "[Man]";
            mes "Ok we can talk now";
        }
    Example 2:
        OnTimer15000:
    npctalk "Another 15 seconds have passed.";
            setnpctimer 0;
            end;
          
        // This OnInit label will run when the script is loaded, so that the timer
        // is initialised immediately as the server starts. It is dropped back to 0
        // every time the NPC says something, so it will cycle continiously.
        OnInit:
            initnpctimer;
            end;
    Example 3:
        mes "[Man]";
        mes "I have been waiting "+(getnpctimer(0)/1000)+" seconds for you";
        // we divide the timer returned by 1000 cause it will be displayed in
        // milliseconds otherwise
        close;
    Example 4:
        mes "[Man]";
        mes "Ok I will let you have 30 sec more";
        close2;
        setnpctimer (getnpctimer(0)-30000);
        // Notice the 'close2'. If there were a 'next' there the timer would be
        // changed only after the player pressed the 'next' button.
        end;

    ---------------------------------------

    [ 本帖最後由 reasapakisa 於 2008-7-11 02:47 PM 編輯 ]

    評分

    參與人數 1積分 +10 現金 +10 積極性 +10 收起 理由
    £×SKY﹋° + 10 + 10 + 10 ∼幫忙解決問題 +10分

    查看全部評分

    回復 支持 反對

    使用道具 舉報

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

    本版積分規則

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

    GMT+8, 2025-7-6 03:38 AM , Processed in 0.061920 second(s), 23 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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