古詩詞大全網 - 成語查詢 - openkore的參數問題

openkore的參數問題

talknpc的參數介紹

[quote]

# ai_talkNPC(x, y, sequence)

# x, y: the position of the NPC to talk to.

# sequence: A string containing the NPC talk sequences.

#

# Talks to an NPC. You can specify an NPC position, or an NPC ID.

#

# $sequence is a list of whitespace-separated commands:

# ~l

# c : Continue

# r# : Select option # from menu.

# n : Stop talking to NPC.

# b : Send the "Show shop item list" (Buy) packet.

# w# : Wait # seconds.

# x : Initialize conversation with NPC. Useful to perform multiple transaction with a single NPC.

# t="str" : send the text str to NPC, double quote is needed only if the string contains space

# ~l~

#

# Example:

# # Sends "Continue", "Select option 0" to the NPC at (102, 300)

# ai_talkNPC(102, 300, "c r0");

[/quote]

這段是在OK官方論壇上看到的,以往壹直以為talknpc只有c/r/n三個參數而已.

大概的翻譯下其他幾個的介紹(我還沒有試過,只能靠字面理解,E文不好別見怪XD)

b :顯示商店商品清單

w# : 等待 # 秒鐘

x : 初始化和NPC的對話,用於需要多次和同壹個NPC對話的場合.

t="str" :發送 類似於 talktext,既把"str"發送給NPC.雙引號只有當要發送的字符串用空格分開的時候才需要.

talknpc是指直接的和某個坐標的NPC對話,OK會自動在該點上找NPC,然後根據妳輸入的“C”也就是過程對話。實現的原理和運行掛機腳本時OK 和其他NPC對話的情況壹樣的(這點我也是在研究疊加NPC的時候發現的),所以說talknpc是OK最為“原版”的和NPC對話的方式。

talk @npc xxx yyy其實是OK裏面talk #命令和MACRO裏面@npc xxx yyy的結合。@npc xxx yyy的作用是返回該坐標點NPC的序號ID。talk #這個命令的運行方式是直接讓OK訪問該序號的NPC,所以比talknpc快,不用計算不用循環。但是,因為序號ID是和所在視野內的NPC數量以及先後次序有關的,所以在網絡卡的時候,有可能返回的@npc xxx yyy的數值是錯誤的,所以,在壹些復雜腳本裏面,如果環境比較淩亂,NPC比較多,那麽推薦用talknpc說話。