counter and restart 機制 - 金庸修真錄 MUD
By Kama
at 2014-11-02T22:39
at 2014-11-02T22:39
Table of Contents
chat上看到有人說trigger有時會停下來
我這邊有設計一個restart 的機制供大家參考
首先要先有counter的變數 #var counter 0 或 #math counter 0
每個動作前面都加#math counter @counter+1
然後timer裡面寫 #if (@counter = 0) {//重新啟動bot的指令};#math counter 0
timer 的秒數要根據bot的動作多久沒動作視為閒置去做調整
這樣就可以了
--
═║═║═║═人生如果沒有遺憾,═║═║═║═║═║═║═║═║═║═
║═║═║═║那就不叫自己的人生,═║═║═║═║═║═║═║═║═║
═║═║═║═而叫別人的劇本。║═║═║═║═║═║═║═圖: pauleagle
║═║═║═║═║═║═║═║═║═║═║═║═║═║═║文: kyod═║
═║═║═【傳說】 P_Alice已完稿═║═║═║═║═║═║═║═║═║═
--
Tags:
線上
All Comments
By Kelly
at 2014-11-05T03:48
at 2014-11-05T03:48
By Victoria
at 2014-11-07T08:57
at 2014-11-07T08:57
By Lydia
at 2014-11-09T14:06
at 2014-11-09T14:06
Related Posts
檢舉
By Xanthe
at 2014-11-02T21:50
at 2014-11-02T21:50
大黑招募
By John
at 2014-11-02T21:33
at 2014-11-02T21:33
WoWs 開發者日誌 第二集 各艦種介紹
By Quintina
at 2014-11-02T20:37
at 2014-11-02T20:37
NA 周間任務 Day 7
By Freda
at 2014-11-02T19:28
at 2014-11-02T19:28
想回鍋
By Enid
at 2014-11-02T18:50
at 2014-11-02T18:50