仙境傳說RO:NPC對話| mes/next/close函數(shù)用法詳解

仙境傳說RO:NPC對話| mes/next/close函數(shù)用法詳解
大家好,我是艾西,今天跟大家講解下仙境傳說mes/next/close函數(shù),在游戲中所有的NPC對話都是用mes函數(shù)來創(chuàng)建的。
我們先打開官方文檔的script _commands.txt文件,搜索*mes
?

?
?
search *mes
mes "Hello,world!";
注意:默認(rèn)是沒有關(guān)團(tuán)或next按鈕的,必須用close/next命令創(chuàng)建。如果不創(chuàng)建這些按鈕,客戶端就什么也做不了了,只能重啟客戶端,.所以時(shí)刻記得加上這些按鈕很重要。
?
顏色^RGB 16進(jìn)制:例子mes "This is ^FF0000 red ^000000 and this is ^00FF00 green, ^000000 so.";用完記得還原 ?^FF0000 red是紅色,如果后面不輸入^000000 那么后面整個(gè)都是紅色的,^000000即為還原
注:非英文字符要留空格,否則可能解析出錯(cuò)可以uTools里的顏色插件來預(yù)覽顏色
?


?
?
多行代碼:
//一行代碼顯示三行
mes "Line 1", Lirine 2", "Line 3";
?
?
導(dǎo)航.
2011-10-10之后的客戶端才可以用導(dǎo)航鏈接。
語法:
<NAVI>Display Name<FNF0>mapname,x,y,0,000 ,flag</INFO> </NAVI>
(< NAVI是navigation這個(gè)單詞的縮寫> Display Name顯示名字 ?x,y,0,000 信息參數(shù) </INFO> </NAVI>就是xml的標(biāo)記語言 )
The *flag" parameter can be: 0: Do not open Navigation Window (default). 1: Open Navigation Window.
(flag是有兩個(gè)可選參數(shù) 0就是默認(rèn)不打開導(dǎo)航窗口,1就是打開導(dǎo)航窗口)
The example below will make the [Tool Shop] text clickable and begin navigation to alberta (98,154) when clicked.
?
mes "Have you checked out the <NAVI>[Tool Shop]<INF0>alberta ,98, 154,0, 000, 0</INF0></NAVI>?";
?
See also 'navigateto', which can be used for certain NPC events
?
?
?
?
道具
ltems
You can refer to items by using HTML-like links to certain items:
?
<ITEMLINK>Display Name<INFO>Item ID</INF0></ITEMLINK>
(ITEMLINK道具鏈接的意思)(Item ID道具信息,道具信息數(shù)據(jù)庫必須得有不然點(diǎn)擊不了)
?
Where <Display Name> is the name that will be displayed for your link and <ltem ID> being the ID of the item you want tolink to when clicked.
In 2015 the tag name was changed to <ITEM> resulting in the following syntax:
?
<ITEM>Display Name<INFO>Item ID</INF0></ITEM>
?
The following sample will open a preview window for Red Potion:
?
mes "Did you ever consume a <ITEMLINK>Red Potion<INF0>501</INFO></ITEMLINK>?";
// Or in 2015:
mes "Did you ever consume a <ITEM>Red Potion<INFO>501</INF0></ITEM>?";
?
NOTE: Be aware that item links are rendered incorrectly in 2015+ clients at the moment.
?
?
?
URLs(超鏈接)
Similarly, you can create links to websites that launch in a new window:
?
<URL>Display Name<INFO>http:/ /www . 27server . com/</INFO></URL>" ;
?
<URL>就是超鏈接 <INFO>這里面就是地址
?
示例:

?
?
?
*next ;
This command will display a' next' button in the message window for theinvoking character. Clicking on it will cause the window to clear and display?a new one. Used to segment NPC -talking,next is often used in combination with?mes?and?close'.
(此命令將在消息窗口中顯示一個(gè)“Next”按鈕,用于調(diào)用信息。單擊它將導(dǎo)致窗口清除并顯示一個(gè)新窗口。使用為了分割NPC對話,Next常與MES和CLOSE結(jié)合使用。)
?
?
*close;
This command will create a ' close?button in the message window for the invoking?character. If no window is currently on screen, the script execution will end. This is?of the ways to end a speech from an NPC. Once the button is clicked, the NPC?script execution will end, and the message box will disappear.
?
mes”[Woman]" ;
mes "I am finished talking to you. Click the close button.";
close;
mes” This command will not run at all, since the script has ended." ;
?
?
*關(guān)閉;
此命令將創(chuàng)建一個(gè)“關(guān)閉”事件的消息窗口中的信息。如果當(dāng)前屏幕上沒有窗口,腳本執(zhí)行將結(jié)束,一旦單擊按鈕,則NPC腳本執(zhí)行將結(jié)束,消息框?qū)⑾А?/p>
?